| name | cria-techspec |
| description | Creates Technical Specifications from existing PRDs, translating product requirements into architectural decisions and implementation guidance. Performs deep project analysis, uses Context7 MCP for technical research and Web Search for business rules. Use when the user asks to create a tech spec, define architecture, or plan implementation for a feature with an existing PRD. Do not use for PRD creation, task breakdowns, or direct code implementation. |
Tech Spec Creation
Procedures
Step 1: Validate Prerequisites
- Confirm the feature slug has been provided.
- Verify the PRD exists at
tasks/prd-[feature-slug]/prd.md. If missing, halt and report.
Step 2: Analyze PRD (Mandatory)
- Read the PRD completely — do NOT skip this step.
- Identify technical content, constraints, and success metrics.
- Extract core requirements for architectural consideration.
Step 3: Deep Project Analysis (Mandatory)
- Explore the codebase to discover files, modules, interfaces, and integration points.
- Map symbols, dependencies, and critical paths.
- Analyze: callers/callees, configs, middleware, persistence, concurrency, error handling, tests, infra.
- Explore solution strategies, patterns, risks, and alternatives.
Step 4: Research (Mandatory)
- Use Context7 MCP to resolve technical questions about frameworks and libraries.
- Perform at least 3 Web Searches to gather business rules and general information.
- Complete all research BEFORE asking clarification questions.
Step 5: Technical Clarifications (Mandatory)
- Explore the project BEFORE asking questions.
- Ask focused clarification questions using the AskUserQuestion tool covering:
- Domain positioning.
- Data flow.
- External dependencies.
- Key interfaces.
- Test scenarios.
- Do NOT proceed until answers are received.
Step 6: Standards Compliance Mapping (Mandatory)
- Identify project skills in
.claude/skills/ that apply to this spec.
- Highlight deviations with justification and compliant alternatives.
Step 7: Generate Tech Spec (Mandatory)
- Read the template at
assets/techspec-template.md.
- Provide: architecture overview, component design, interfaces, data models, endpoints, integration points, impact analysis, test strategy, observability.
- Focus on HOW, not WHAT (the PRD owns what/why).
- Avoid repeating functional requirements from the PRD.
- The spec is about specification, NOT detailed implementation code.
- Keep under ~2,000 words.
- Do NOT deviate from the template structure.
- Prefer existing libraries over custom development.
Step 8: Save Tech Spec (Mandatory)
- Save to:
tasks/prd-[feature-slug]/techspec.md.
- Confirm the write operation and path.
Core Principles
- Tech Spec focuses on HOW, not WHAT (PRD owns the what/why).
- Prefer simple, evolutionary architecture with clear interfaces.
- Provide testability and observability considerations upfront.
- Prefer existing libraries over custom solutions.
Quality Checklist
Error Handling
- If the PRD does not exist at the expected path, halt and ask the user to create it first via the
cria-prd skill.
- If Context7 MCP is unavailable, fall back to Web Search for technical documentation.
- If the output file already exists, confirm with the user before overwriting.