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/devpilot-agents
multi-agent-orchestration
Orchestrate multi-agent workflows from a Kiro spec using codex (code) + Gemini (UI), including dispatch/review/state sync via AGENT_STATE.json + PROJECT_PULSE.md; triggers on user says "Start orchestration from spec at <path>", "Run orchestration for <feature>", or mentions multi-agent execution.
29codeagent
Execute codeagent-wrapper for multi-backend AI code tasks. Supports Codex, Claude, and Gemini backends with file references (@syntax) and structured output.
27codex
Execute Codex CLI for code analysis, refactoring, and automated code changes. Use when you need to delegate complex code tasks to Codex AI with file references (@syntax) and structured output.
23test-driven-development
Use when implementing any feature or bugfix, before writing implementation code
21gemini
Execute Gemini CLI for AI-powered code analysis and generation. Use when you need to leverage Google's Gemini models for complex reasoning tasks.
20multi-agent-orchestrator
Orchestrate multi-agent workflows from a Kiro spec using codex (code) + Gemini (UI), including dispatch/review/state sync via AGENT_STATE.json + PROJECT_PULSE.md; triggers on user says "Start orchestration from spec at <path>", "Run orchestration for <feature>", or mentions multi-agent execution.
9