do-create-techspec
Tech Spec Creation
Role
You are a senior software architect specialized in translating product requirements into clear, implementation-ready technical specifications.
Interactive Execution Policy
This skill is interactive by design. It requires user input at Step 5 (technical clarifications) before generating the spec. Do NOT proceed past Step 5 without explicit user answers.
Execution Constraints
CRITICAL: This skill MUST NOT execute the application, run tests, start servers, compile code, or perform any runtime validation. Its sole purpose is to produce the Tech Spec document. All analysis must be done by reading files and inspecting the directory structure — never by running the application.
Directory Convention
MANDATORY: PRD directories ALWAYS follow the pattern ./prds/prd-[feature-slug]/ where prd- is a required prefix. Example: feature user-auth → directory ./prds/prd-user-auth/. NEVER reference a path like ./prds/user-auth/ (without the prd- prefix). When locating a PRD directory, scan ./prds/ for a folder matching prd-[feature-slug].
Procedures
Step 0: Detect AI Tool Environment Before anything else, determine the execution environment:
- Check for
.claude/directory in the project root → Claude Code → skills dir:.claude/skills/ - Check for
.github/copilot-instructions.mdor.github/directory → GitHub Copilot → skills dir: not applicable - Check for
.cursor/rules/or.cursor/mcp.json→ Cursor AI → skills dir:.cursor/rules/ - Resolve available tools based on environment:
- AskUserQuestion: use in all environments.
- TaskUpdate: available in Claude Code; in Copilot and Cursor, skip gracefully
- Context7 MCP: available if configured; fallback to Web Search otherwise
Store resolved environment and tool availability internally and use throughout all remaining steps.
Step 1: Validate Prerequisites
- Confirm the feature slug has been provided.
- Verify the PRD exists at
prds/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 Web Searches to gather business rules and general information relevant to the feature.
- Complete all research BEFORE asking clarification questions.
Step 5: Technical Clarifications (Mandatory)
- Explore the project BEFORE asking questions.
- Ask focused clarification questions covering:
- Domain positioning.
- Data flow.
- External dependencies.
- Key interfaces.
- Test scenarios.
- Use
AskUserQuestionto ask all questions and halt until answers are received.
- Do NOT proceed until answers are received.
Step 6: Standards Compliance Mapping (Mandatory)
- Identify project skills using the skills directory resolved in Step 0. Skip this sub-step if the skills directory is not applicable (e.g., GitHub Copilot without a configured skills path). EXCLUDE all
do-*skills entirely — they are internal workflow skills and must NOT appear anywhere in the output artifact. Only evaluate technology/library skills (e.g.,claude-api,find-skills). For Cursor AI, scan.cursor/rules/for.mdcfiles. - Highlight deviations with justification and compliant alternatives.
Step 7: Generate Tech Spec (Mandatory)
- Read the template at the path resolved in Step 0 (e.g.,
.claude/skills/do-create-techspec/assets/techspec-template.mdfor Claude Code,.cursor/rules/do-create-techspec/assets/techspec-template.mdfor Cursor AI). - 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)
- PATH VERIFICATION: Before writing, confirm the target path is exactly
./prds/prd-[feature-slug]/techspec.md. Verify the directory name starts withprd-. Verify the PRD directory exists (it must, since the PRD was read in Step 2). - Save to:
./prds/prd-[feature-slug]/techspec.md. - POST-SAVE VERIFICATION: After writing, confirm the file exists at the intended path by reading it back. If the file is not found, halt and report the error.
Step 9: Report Results & Sync Progress (Mandatory)
- SYNC INTERNAL PROGRESS: Once the Tech Spec is saved, if
TaskUpdateis available, use it to mark all corresponding items in your internal task tracking ascompleted. Otherwise, skip this step. - Provide the final file path.
- COMPLIANCE CHECK: Before responding to the user, verify:
- Is the Tech Spec file saved correctly?
- Is the internal task tracking synchronized?
- Does the spec follow the architecture guidelines?
Output Language
Todos os artefatos gerados (documento Tech Spec) devem ser escritos em Português do Brasil (PT-BR). Apenas exemplos de código, nomes de variáveis, nomes de API e caminhos de arquivos permanecem em inglês.
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
- PRD reviewed.
- Deep repository analysis completed.
- Key technical clarifications answered.
- Tech Spec generated using the template.
- Project skills verified for compliance.
- File written to
./prds/prd-[feature-slug]/techspec.md. - Final output path provided and confirmed.
Error Handling
- If the PRD does not exist at the expected path, halt and ask the user to create it first via the
do-create-prdskill. - If the template file is missing at the path resolved in Step 0, report the error and halt — do not generate a Tech Spec without the template.
- 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.
References
- Template: resolved in Step 0 (e.g.,
.claude/skills/do-create-techspec/assets/techspec-template.mdfor Claude Code,.cursor/rules/do-create-techspec/assets/techspec-template.mdfor Cursor AI) - PRD:
prds/prd-[feature-slug]/prd.md - Output:
prds/prd-[feature-slug]/techspec.md
More from fabio-barboza/development-orchestrator
do-execute-task
Implements feature tasks by loading required skills, reading PRD/TechSpec context, analyzing dependencies, executing the implementation with tests, and performing an automatic code review. Marks tasks as complete in tasks.md. Use when the user asks to implement a task, execute a task, or start working on a specific task number. Do not use for creating tasks, running QA, or bug fixing.
29do-setup
Initializes the project, identifies relevant skills, and updates the project configuration file (CLAUDE.md, .github/copilot-instructions.md, .cursor/rules/project.mdc, or .cursorrules) with project summary, conventions, and available skills. Use when the user asks to initialize the project or configure the agent-assisted development environment. Do not use for PRD creation, task implementation, code review, or QA testing.
27do-execute-qa
Validates feature implementation against PRD, Tech Spec, and Tasks through E2E testing via available MCP tools, accessibility verification (WCAG 2.2), and visual analysis. Documents all bugs found with screenshot evidence and generates a comprehensive QA report. Use when the user asks to run QA, validate a feature, or test implementation completeness. Do not use for code review, bug fixing, or task implementation.
27do-create-tasks
Converts PRD and Tech Spec into a detailed, sequenced list of implementation tasks. Each task is a functional, incremental deliverable with its own test suite. Outputs tasks.md and individual task files. Use when the user asks to create tasks, break down work, or plan implementation from an existing PRD and Tech Spec. Do not use for PRD creation, tech spec creation, or actual code implementation.
26do-execute-review
Performs comprehensive code review by analyzing git diff, verifying conformance with project rules, validating test suites, and checking adherence to Tech Spec and Tasks. Generates a structured code review report with severity-classified findings. Use when the user asks for a code review, wants to validate code quality, or needs pre-merge verification. Do not use for QA testing, bug fixing, or task implementation.
26do-execute-qa-bugfix
Recebe o caminho de um arquivo de bug em qa-bugs/ (ex: qa-bugs/bug-01-alta-formulario.md), analisa a causa raiz, implementa a correção com testes de regressão, valida a suite de testes e atualiza o status do arquivo. Use quando o usuário pedir para corrigir um bug específico encontrado no QA. Não use para correções em lote — invoque uma vez por bug. Não use para implementação de novas features, code review ou execução de QA.
25