living-documentation
Living Documentation
Spec guides generation. Code changes update spec.
When Triggered
- Modifying code that implements behavior defined in
requirements.md - Changing architecture/interfaces described in
design.md - Discovering edge cases or patterns not yet documented
Lifecycle
| Phase | Authority | Action |
|---|---|---|
| Generate | Spec → Code | Follow spec as contract |
| Modify | Code → Spec | Update spec to reflect code |
Sync Protocol
After completing code change:
-
Identify Affected Specs
- Check task's
_writes:manifest - Map to spec sections: which requirements/design does this touch?
- Check task's
-
Update Spec Content
- Remove obsolete descriptions
- Document actual implementation approach
- Add discovered edge cases as new ACs
- Keep spec readable without code
-
Add Traceability
<!-- impl: path/to/file.ts#FunctionName --> -
Commit Together
- Spec changes in same commit as code changes
What to Update
| Code Change | Spec Update |
|---|---|
| New function/module | Add to design.md#Components |
| Behavior change | Update ACs in requirements.md |
| Edge case handling | Add AC with EARS format |
| Architecture decision | Document rationale in design.md |
| Removed feature | Delete from both specs |
Quality Check
- Spec describes current reality, not original plan
- No stale sections left
- New reader understands system from spec alone
- Traceability links added
More from peterfile/my-common-skills
kiro-specs
Create a Kiro spec for a feature in .kiro/specs create/update feature spec/PRD/RFC—requirements, design doc, and implementation tasks checklist.Trigger on spec/specification/PRD/RFC/tech spec, requirements/user story/acceptance criteria/EARS, design doc/architecture, task breakdown/implementation plan/checklist; 需求/验收/设计/任务.
9pnpm
Node.js package manager with strict dependency resolution. Use when running pnpm specific commands, configuring workspaces, or managing dependencies with catalogs, patches, or overrides.
3canvas-design
Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.
3turborepo
|
3typescript-write
Write TypeScript and JavaScript code following Metabase coding standards and best practices. Use when developing or refactoring TypeScript/JavaScript code.
3frontend-design
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.
3