update-spec

Updates code-spec documents with executable contracts, design decisions, and validation matrices.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Valuable lessons learned during debugging, feature implementation, and design discussions are often lost between sessions. This Skill captures those insights as executable code-spec documents so future developers and AI sessions can implement safely without repeating mistakes. ## Core Features & Use Cases - Structured Spec Updates: Classifies learnings into design decisions, conventions, patterns, anti-patterns, common mistakes, and gotchas, then writes them into the correct spec file under .trellis/spec/. - Executable Contract Enforcement: Requires signatures, request/response contracts, validation and error matrices, Good/Base/Bad cases, and test assertion points for infra or cross-layer changes. - Code-Spec vs Guide Separation: Routes "how to implement" content into backend/ or frontend/ specs and "what to consider" checklists into guides/. - Use Case: After fixing a subtle Windows stdout encoding bug, run this Skill to add a Wrong vs Correct example and a convention entry to backend/script-conventions.md so the mistake is never repeated. ## Quick Start Ask the AI to update the relevant code-spec with what was just learned from the completed task or bug fix.

Frequently Asked Questions about update-spec

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

FAQPage Schema
How do I document a bug fix so future developers avoid it?▼

Classify the fix as a common mistake or gotcha, then add it to the relevant code-spec file with the symptom, cause, fix, and prevention steps. Include a code example showing the wrong and correct approaches.

What is the difference between a code-spec and a guide?▼

Code-specs in backend/ or frontend/ describe how to implement code safely with signatures, contracts, and test points. Guides in guides/ are short checklists about what to consider before writing code, and they point to specs rather than duplicating rules.

When should I update a code-spec document?▼

Update after implementing a feature, fixing a bug, making a design decision, discovering a reusable pattern, hitting a non-obvious gotcha, or establishing a team convention. Any learning future developers need qualifies.

What sections are required for infrastructure or cross-layer specs?▼

Infra and cross-layer specs require seven sections: Scope/Trigger, Signatures, Contracts, Validation and Error Matrix, Good/Base/Bad Cases, Tests Required with assertion points, and at least one Wrong vs Correct pair.

Where should a new coding convention be documented?▼

Add conventions to the relevant backend/ or frontend/ spec file using the convention template with what, why, and a code example. Update the category index.md if you added a new section.