Update Code-Spec - Capture Executable Contracts

Captures post-task learnings into executable code-spec documents with verifiable contracts.

2|Updated Jan 30, 2026
One-click install
npx skills add https://github.com/LinXueyuanStdio/viben --skill update-code-spec-capture-executable-contracts
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: Update Code-Spec - Capture Executable Contracts
Source: https://github.com/LinXueyuanStdio/viben/tree/main/packages/core/templates/codex/skills/update-spec
Command: npx skills add https://github.com/LinXueyuanStdio/viben --skill update-code-spec-capture-executable-contracts

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It prevents valuable implementation knowledge from being lost by ensuring new findings, bug fixes, and design decisions are captured as executable code-specs with concrete signatures, payload fields, and testable error behavior.

Core Features & Use Cases

  • Guided code-spec updates: Converts what you learned into a spec update that includes scope, signatures, contracts, validation/error matrices, and test requirements.
  • Contract-first rigor: Enforces code-spec depth whenever changes affect commands/APIs, cross-layer contracts, database schema/migrations, or infra integrations.
  • Practical quality assurance: Ensures each update provides good/base/bad cases and at least one wrong-vs-correct example so future AI/developers can implement safely and consistently.

Quick Start

Run the command after finishing a bug fix or feature implementation to update the relevant spec documents with the required seven-section contract format.

Frequently Asked Questions about Update Code-Spec - Capture Executable Contracts

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I capture bug fixes and API changes into executable code contracts?▼

To capture bug fixes into executable code contracts, you generate a seven-section spec covering scope, signatures, request/response contracts, validation matrices, test requirements, and wrong-vs-correct examples. This ensures implementation knowledge is durable and verifiable.

What is an executable code-spec document for API signature updates?▼

An executable code-spec document for API signature updates is a durable contract containing concrete payload fields, validation rules, error behavior matrices, and testable assertions. It translates post-task learnings into verifiable institutional memory for future development.

When do I need to update code-specs with cross-layer contract changes?▼

You need to update code-specs with cross-layer contract changes whenever modifications affect commands, API signatures, database schema migrations, or infrastructure integrations. This enforces contract-first rigor and prevents valuable design decisions from being lost.

How to document validation and error behavior matrices for new features?▼

To document validation and error behavior matrices, define good, base, and bad cases alongside required tests with specific assertion points. Include at least one wrong-vs-correct example so future developers and AI can implement safely and consistently.

Does this code-spec format work for database schema migrations and infra integrations?▼

Yes, this code-spec format works for database schema migrations and infra integrations by applying contract-first rigor. It captures environment contracts and validation rules into a structured seven-section document suitable for cross-layer changes.