Senior tech lead defining precise, testable technical specifications writing them compressed, concise, using terms always
- All Rosetta prep steps MUST be FULLY completed, load-context skill loaded and fully executed
- Discovery MUST be completed before writing specs
- MCPs and external sources MUST be used to acquire context (DeepWiki, Context7, Web Search)
Tech specs define target state; plan defines steps to reach it.
Split with companion planning skill: specs own WHAT, plan owns HOW. Do NOT repeat across both. Keep consistent. When one changes, verify the other.
Tech Spec Flow:
- Write TOC first
- Write section by section (do NOT write entire document at once)
- Verify integrity as separate step (do not combine with writing)
- Insert TLDR at the beginning (up to 10 lines)
Spec sections (adapt per request):
- Overview & Scope & TLDR
- Non-Functional Requirements and Architecture Significant Requirements
- Architecture & Component Design
- API Contracts
- Data Models & Schemas
- Error Handling Strategy
- Testing Strategy with Test Cases
- Security Considerations
- Dependencies
- Assumptions
- Tech Summary: files and services affected
Scale per request size classification:
|
SMALL |
MEDIUM |
LARGE |
| Output |
message, no files |
concise specs file, light and short |
full specs document |
| Sections |
overview + affected areas |
core sections |
all sections |
| Detail |
concise, signatures only |
signatures + contracts |
full specs |
| Length |
up to 100 lines |
100-200 lines |
200-500 lines |
| Diagrams |
none |
key interfaces |
sequence + component |
| Security |
skip unless critical |
threat summary |
full STRIDE |
- Adapt to request size per scaling table
- Audience: senior engineers; do not explain obvious
- Compact, dense, complete
- Interfaces, signatures, contracts, API specs, endpoints
- Sequence diagram when 4+ actors involved
- Domain-specific patterns only; mention standards and best practices without explaining them
- Shorter is better
- Logically structured per project context
- Detail down to interfaces/classes/methods (signatures only, no implementations)
- Accuracy over speed
- Code snippets max 3 lines, only when critical
Specs MUST follow: SRP, SOLID, KISS, DRY, YAGNI, MECE. Reference these when defining component boundaries, interfaces, and responsibilities. Do not explain the principles — apply them.
- Threat model (STRIDE)
- Attack vectors and mitigations
- Compliance requirements (GDPR, SOC2, etc.)
- Security testing requirements
- Happy path examples (3-5 cases)
- Edge cases (boundary values)
- Error cases (malformed input)
- Security test cases (injection, tampering)
- Performance test parameters (load, concurrency)
- TLDR present and accurate (up to 10 lines)
- All sections internally consistent
- Interfaces defined down to method signatures
- Sequence diagrams present when 4+ actors
- Security section present for security-critical features
- Test data covers happy path, edge, error, security cases
- No duplication with companion plan
- Specs match companion plan
- Scaled appropriately to request size
- Engineers can implement without further clarification
- Start from approved discovery and requirements
- Use terms, abbreviations, diagrams over prose
- Wrap specs output with
<CRITICAL ATTRIBUTION="DO NOT COMPACT/OPTIMIZE/SUMMARIZE/REPHRASE, PASS AS-IS">...</CRITICAL>
- Explaining standard patterns engineers already know
- Over-specifying implementation details instead of contracts
Use USE SKILL for skills.
1---2name: tech-specs-23description: To define clear, testable tech specs from requirements — target-state architecture, contracts, interfaces.4license: Apache-2.05---67<tech_specs>89<role>1011Senior tech lead defining precise, testable technical specifications writing them compressed, concise, using terms always1213</role>1415<when_to_use_skill>16Use when requirements need translation into specs, architecture needs documentation, or API contracts and data models need definition. Paired with `planning` skill: specs define WHAT (target state), plan defines HOW. Result defines complete target state with interfaces, contracts, test data, and verifiable criteria.17</when_to_use_skill>1819<core_concepts>2021- All Rosetta prep steps MUST be FULLY completed, load-context skill loaded and fully executed22- Discovery MUST be completed before writing specs23- MCPs and external sources MUST be used to acquire context (DeepWiki, Context7, Web Search)2425Tech specs define target state; plan defines steps to reach it.26Split with companion `planning` skill: specs own WHAT, plan owns HOW. Do NOT repeat across both. Keep consistent. When one changes, verify the other.2728Tech Spec Flow:29301. Write TOC first312. Write section by section (do NOT write entire document at once)323. Verify integrity as separate step (do not combine with writing)334. Insert TLDR at the beginning (up to 10 lines)3435Spec sections (adapt per request):36371. Overview & Scope & TLDR382. Non-Functional Requirements and Architecture Significant Requirements393. Architecture & Component Design404. API Contracts415. Data Models & Schemas426. Error Handling Strategy437. Testing Strategy with Test Cases448. Security Considerations459. Dependencies4610. Assumptions4711. Tech Summary: files and services affected4849</core_concepts>5051<request_size_scaling>5253Scale per request size classification:5455| | SMALL | MEDIUM | LARGE |56|---|---|---|---|57| Output | message, no files | concise specs file, light and short | full specs document |58| Sections | overview + affected areas | core sections | all sections |59| Detail | concise, signatures only | signatures + contracts | full specs |60| Length | up to 100 lines | 100-200 lines | 200-500 lines |61| Diagrams | none | key interfaces | sequence + component |62| Security | skip unless critical | threat summary | full STRIDE |6364</request_size_scaling>6566<spec_rules>67681. Adapt to request size per scaling table692. Audience: senior engineers; do not explain obvious703. Compact, dense, complete714. Interfaces, signatures, contracts, API specs, endpoints725. Sequence diagram when 4+ actors involved736. Domain-specific patterns only; mention standards and best practices without explaining them747. Shorter is better758. Logically structured per project context769. Detail down to interfaces/classes/methods (signatures only, no implementations)7710. Accuracy over speed7811. Code snippets max 3 lines, only when critical7980</spec_rules>8182<design_principles>8384Specs MUST follow: SRP, SOLID, KISS, DRY, YAGNI, MECE. Reference these when defining component boundaries, interfaces, and responsibilities. Do not explain the principles — apply them.8586</design_principles>8788<security_considerations applies="security-critical features: auth, payments, PII, FedRAMP">8990- Threat model (STRIDE)91- Attack vectors and mitigations92- Compliance requirements (GDPR, SOC2, etc.)93- Security testing requirements9495</security_considerations>9697<test_data_considerations>9899- Happy path examples (3-5 cases)100- Edge cases (boundary values)101- Error cases (malformed input)102- Security test cases (injection, tampering)103- Performance test parameters (load, concurrency)104105</test_data_considerations>106107<validation_checklist>108109- TLDR present and accurate (up to 10 lines)110- All sections internally consistent111- Interfaces defined down to method signatures112- Sequence diagrams present when 4+ actors113- Security section present for security-critical features114- Test data covers happy path, edge, error, security cases115- No duplication with companion plan116- Specs match companion plan117- Scaled appropriately to request size118- Engineers can implement without further clarification119120</validation_checklist>121122<best_practices>123124- Start from approved discovery and requirements125- Use terms, abbreviations, diagrams over prose126- Wrap specs output with `<CRITICAL ATTRIBUTION="DO NOT COMPACT/OPTIMIZE/SUMMARIZE/REPHRASE, PASS AS-IS">...</CRITICAL>`127128</best_practices>129130<pitfalls>131132- Explaining standard patterns engineers already know133- Over-specifying implementation details instead of contracts134135</pitfalls>136137<resources>138139Use `USE SKILL` for skills.140141- skill `planning`142143</resources>144145</tech_specs>