update-spec

Update code-specs with signatures, contracts, and validation rules.

Updated Mar 3, 2026
One-click install
npx skills add https://github.com/yanzhangshuai/wen-yuan --skill update-spec-yanzhangshuai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: update-spec
Source: https://github.com/yanzhangshuai/wen-yuan/tree/main/.agents/skills/update-spec
Command: npx skills add https://github.com/yanzhangshuai/wen-yuan --skill update-spec-yanzhangshuai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Keeps code-specs up-to-date by capturing concrete contracts, signatures, payloads, and error behavior after learning from debugging, implementation, or discussion.

Core Features & Use Cases

  • Automated Code-Spec Updates: Translate learnings into precise code-spec sections for infra/cross-layer impacts.
  • Contract-Focused Documentation: Document signatures, env keys, validation rules, and test points.
  • Use Case: After fixing a bug, update the code-spec to reflect the corrected contract and edge cases.

Quick Start

Summarize the change and update the applicable code-spec sections, including signatures and error handling.

Frequently Asked Questions about update-spec

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

FAQPage Schema
How do I update executable contracts after fixing a bug?

To update executable contracts after a bug fix, you translate the corrected behavior into structured code-spec sections, capturing signatures, payloads, env keys, and error matrices to reflect the new validation rules.

What is a code-spec and when do I need to update it?

A code-spec is a structured document capturing concrete contracts, signatures, and error behavior. You need to update it after debugging or implementing features that affect infra or cross-layer interfaces to ensure validation rules stay precise.

How to document API signatures and validation rules for cross-layer interfaces?

Document API signatures and validation rules by applying a structured format to your code-specs, detailing Scope/Trigger, Contracts, Validation & Error Matrix, and Good/Base/Bad Cases to capture cross-layer interface behavior comprehensively.

Does updating code-specs automatically capture payload and env key changes?

Updating code-specs captures payload and env key changes by enforcing a structured documentation format. It translates implementation learnings into precise contract sections, ensuring signatures and validation rules across affected code paths are accurately recorded.

What is the best way to maintain executable contracts for software engineering projects?

The best way to maintain executable contracts is enforcing a structured code-spec format that includes Tests Required and Wrong vs Correct checks, ensuring implementation decisions are continuously translated into precise, up-to-date documentation.

When should I not use structured code-spec updates for documentation?

You should avoid structured code-spec updates for changes that do not affect infra or cross-layer interfaces. The format targets features, bug fixes, and design decisions requiring explicit signatures, payloads, and validation rules documentation.