You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You tell Claude Code:
"I need to add rate limiting to the job API following
the layered spec pattern in specs/mtls/. This involves
updating the server, adding Redis, and new Terraform
resources. Estimated 8 hours of work."
Claude Code will automatically:
Create specs/rate-limiting/ directory
Generate README.md with navigation
Create 00-architecture.md with design
Create 5 phase files for implementation
Add operations-runbook.md
Create examples/ with code references
The pattern is now documented and repeatable! π
For complex features requiring significant implementation work (multi-package changes, infrastructure updates, new authentication systems), follow the layered specification pattern demonstrated in specs/mtls/.
Phase 4: Deployment - Production deployment, verification
Phase 5: Cleanup - Remove old code, update docs
Checkpoint between each phase:
Each phase must have clear success criteria
Must be verifiable independently
Next phase should not start until previous succeeds
Instructing Claude Code
When asking Claude Code to create layered specs, provide this template:
I need to create a layered specification for [FEATURE NAME] following the pattern in specs/mtls/.
The feature involves:
- [List key components/packages affected]
- [Infrastructure changes needed]
- [Estimated complexity: X hours]
Please create a layered spec structure with:
1. README.md as entry point
2. 00-architecture.md with design decisions and diagrams
3. Phase files (01-0X) for sequential implementation
4. operations-runbook.md for Day 2 operations
5. examples/ directory with code references
Follow the pattern established in specs/mtls/ including:
- Inline code for interfaces and small snippets
- Examples directory for complete implementations
- Success criteria for each phase
- Verification commands
- Mermaid diagrams where appropriate
See AGENT.md "Specification Documentation Standards" section for complete guidelines.
Example: mTLS Authentication Spec
Reference implementation:specs/mtls/
This spec demonstrates:
β Clear README with navigation and quick start
β Architecture file with design decisions and Mermaid diagrams
β 5 phase files for sequential implementation
β Operations runbook with procedures and metrics
β Examples directory with 12 code reference files
β Original 3,056-line spec archived for reference
β Each phase independently actionable
β Total: 3,062 lines across 8 focused spec files
Key principles demonstrated:
Each file is independently readable
Cross-references between files are clear
Developers can start at README and execute sequentially
Examples are copy-paste ready when needed
Original consolidated spec preserved for reference
Use this template when instructing Claude Code to create a new layered specification.
Quick Instruction for Claude Code
I need to create a layered specification for [FEATURE NAME] following the pattern in specs/mtls/.
The feature involves:
- [List key components/packages affected]
- [Infrastructure changes needed]
- [Estimated complexity: X hours]
Please create a layered spec structure with:
1. README.md as entry point
2. 00-architecture.md with design decisions and diagrams
3. Phase files (01-0X) for sequential implementation
4. operations-runbook.md for Day 2 operations
5. examples/ directory with code references
Follow the pattern established in specs/mtls/ including:
- Inline code for interfaces and small snippets
- Examples directory for complete implementations
- Success criteria for each phase
- Verification commands
- Mermaid diagrams where appropriate
See AGENT.md "Specification Documentation Standards" section for complete guidelines.