update-spec

Capture implementation decisions into structured code-spec documents under .trellis/spec/.

3|Updated Jan 25, 2026
One-click install
npx skills add https://github.com/BaSui01/agentflow --skill update-spec-basui01
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: update-spec
Source: https://github.com/BaSui01/agentflow/tree/main/.agents/skills/update-spec
Command: npx skills add https://github.com/BaSui01/agentflow --skill update-spec-basui01

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill ensures that implementation learnings, bug fixes, design choices, and cross-layer contract changes are recorded as actionable, testable code-spec documents so future developers and AIs can implement and validate behavior reliably.

Core Features & Use Cases

  • Post-implementation capture: Turn what was learned during implementation or debugging into concrete spec sections.
  • Infra and cross-layer enforcement: Require mandatory sections (scope, signatures, contracts, validation matrix, test points) for infra or contract-impacting changes.
  • Guided templates and checklist: Provide templates for scenarios, design decisions, conventions, patterns, and gotchas to keep specs consistent.
  • Use Case: After fixing an API bug, add a spec entry detailing the signature changes, request/response contracts, validation rules, and required tests so CI and future engineers enforce correct behavior.

Quick Start

Use update-spec to add a structured code-spec entry to .trellis/spec/ immediately after finishing an implementation, bug fix, or design decision.

Frequently Asked Questions about update-spec

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

FAQPage Schema
How do I document code contracts and design decisions after implementation?

Document cross-layer contract changes by formalizing backend, frontend, and infrastructure interactions into structured spec sections. This captures signatures, validation matrices, and error handling to ensure testability across all impacted layers.

What's the best way to capture bug fixes into machine-readable specs?

Capture bug fixes into machine-readable specs by detailing signature changes, request and response contracts, and required tests with assertion points. This ensures CI pipelines and future engineers can reliably enforce the corrected behavior.

What sections are required when documenting cross-layer contract changes?

Required sections for documenting cross-layer contract changes include scope, signatures, contracts, validation matrices, and test points. These mandatory sections ensure infra and contract-impacting changes remain testable and machine-readable.

When do I need to generate a validation matrix for code specifications?

Generate a validation matrix for code specifications when recording post-implementation learnings or cross-layer contract modifications. This matrix maps good, base, and bad cases to specific test assertion points to enforce testability.

Does this approach work for both frontend and infrastructure spec updates?

Yes, this approach works for frontend, backend, and infrastructure spec updates by applying guided templates to capture conventions, patterns, and gotchas. It updates the index in .trellis/spec/ to maintain consistent, machine-readable contracts across all layers.