skills/tech-spec-planning/SKILL.md
Creates tech-spec.md with architecture, decisions, testing strategy, and implementation plan. Use when: "сделай техспек", "составь техспек", "техническая спецификация", "tech spec", "создай тз", "составь тз", "new-tech-spec", "/new-tech-spec" Requires existing user-spec.md as input (create with user-spec-planning skill first if missing).
npx skillsauth add pavel-molyanov/molyanov-ai-dev tech-spec-planningInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Create technical specification through code research, adaptive clarification, and multi-validator review.
Input: work/{feature}/user-spec.md + Project Knowledge
Output: work/{feature}/tech-spec.md (approved)
Language: Technical documentation in English, communication in Russian
Ask user for feature name if not provided. Check work/{feature}/ exists, create if needed.
Read work/{feature}/user-spec.md. If missing — ask user to describe the task or create user-spec first.
Extract size: S|M|L from user-spec frontmatter — it determines testing strategy depth in tech-spec.
Read all files in .claude/skills/project-knowledge/references/ (project.md, architecture.md, patterns.md, deployment.md, ux-guidelines.md, and any custom domain files). Missing files are fine — not all projects have all guides.
user-spec.md is the single input source — all information from interview.yml and code research is already consolidated there.
Checkpoint:
Launch code-researcher subagent (Task tool, opus) with feature path and user-spec path. The agent reads existing code-research.md (from user-spec phase if available) and deepens analysis for implementation.
After subagent completes — read {feature_path}/code-research.md. Use in Phase 3 clarification and Phase 4 spec writing.
If during later phases a gap is discovered — launch code-researcher again with the specific question.
Checkpoint:
Analyze if additional information is needed based on user-spec and code research.
Checkpoint:
Copy template to feature folder:
cp ~/.claude/shared/work-templates/tech-spec.md.template work/{feature}/tech-spec.md
Then edit sections one by one using Edit tool. This keeps template structure and examples visible while you work.
Fill frontmatter:
created: today's datestatus: draftsize: copy from user-spec (S|M|L)branch: devFill all template sections. The template defines section structure — follow it directly. In Architecture → Shared Resources: list heavy resources (ML models, DB pools, browser instances, API clients) shared across components. Specify owner (who creates), consumers, instance count. If none — write "None".
User-spec anchoring: Every decision in the Decisions section must reference a user-spec requirement it serves (e.g., "Supports US-3: push notifications"). If a decision is purely technical (not derived from any user-spec requirement) — mark it [TECHNICAL] with justification. If a decision contradicts or changes a user-spec requirement — document it in the User-Spec Deviations section and mark as [PENDING USER APPROVAL]. All deviations must be documented explicitly — this preserves the user's original intent for review.
Fill Implementation Tasks by waves. For each task provide: Description, Skill, Reviewers, Verify-smoke (optional), Verify-user (optional), Files to modify, Files to read. Select skill and reviewers from skills-and-reviewers.md (execution skills catalog, reviewer agents, default mappings).
For each task, write Verify-smoke: when the task involves:
python -c or import check that verifies setupdocker compose build, docker run commandsVerify-user: when user should check something: UI on localhost, behavior, UX.
Omit both if task is purely internal logic covered by unit tests.Task brevity rules:
The last two waves are always Audit Wave and Final Wave, in that order:
Audit Wave (always present) — 3 tasks running in parallel, reviewers: none:
code-reviewing) — holistic code quality review of all feature codesecurity-auditor) — OWASP Top 10 across all componentstest-master) — test quality and coverage across all componentsAuditors read all source files from the feature and write reports (analysis only). If issues found — feature-execution lead spawns a fixer agent, auditors become reviewers for the fix.
Final Wave:
pre-deploy-qa) — always present. Acceptance testing: run all tests, verify acceptance criteria from user-spec and tech-spec.deploy-pipeline) — only if deploy is needed for this feature.post-deploy-qa) — only if live-environment checks are needed (MCP tools listed in Agent Verification Plan → Tools required).
QA is mandatory. Deploy and post-deploy — if applicable.Fill User-Spec Deviations section. For each element in tech-spec that changes, extends, or contradicts user-spec — add an entry with the requirement ID, what user-spec says, what tech-spec does differently, and why. Mark each entry [PENDING USER APPROVAL]. If no deviations — write "None".
Task Count Check: if >15 tasks — propose splitting into MVP + Extension phases. Wait for user decision.
Git commit: draft(techspec): create tech-spec for {feature}
Checkpoint:
[TECHNICAL]Launch all as subagents, each writes JSON report to logs/techspec/{name}-review.json:
| Validator | Agent | Checks |
|-----------|-------|--------|
| Mirage detector | skeptic | Non-existent files, APIs, functions, dependencies |
| Completeness + adequacy | completeness-validator | Bidirectional traceability, scope creep, overengineering, underengineering, solution depth |
| Security | security-auditor | OWASP, input validation, auth, sensitive data |
| Testing strategy | test-reviewer | Test plan adequacy for feature size S/M/L |
| Template + wave conflicts | tech-spec-validator | All sections filled, frontmatter, format, skills/reviewers, wave conflict detection |
Pass to each validator: work/{feature}/tech-spec.md + work/{feature}/user-spec.md.
Read all 5 reports. For each finding:
User-spec alignment findings require user decision. When completeness-validator reports gap, scope_creep, overengineering, or shallow_solution — present each finding to the user with your recommendation (fix / keep / adjust). Reason: these findings mean the tech-spec may contradict what the user asked for — only the user can decide whether the deviation is acceptable.
If fixes were made:
work/{feature}/tech-spec.md.chore(techspec): validation round {N} — {summary of fixes}If problems remain after 3 iterations — show user: "Validation didn't pass in 3 iterations. Here's what remains — let's resolve together."
Checkpoint:
status: draft → status: approved in tech-spec frontmatter.chore(techspec): approve tech-spec for {feature}/decompose-tech-spec to create task files.Checkpoint:
development
Creates user-spec.md through adaptive interview with codebase scanning and dual validation. Use when: "сделай юзер спек", "проведи интервью для юзер спека", "создай юзерспек", "user spec", "detailed planning", "хочу продумать фичу", "опиши требования к фиче", "сделай описание фичи", "/new-user-spec" For tech planning use tech-spec-planning. For project planning use project-planning.
testing
Testing methodology: when to write which tests, how to ensure test quality, test pyramid strategy. Use when: "напиши тесты", "как тестировать", "проанализируй тесты", "проверь качество тестов", "ревью тестов", "тестовая стратегия"
tools
Decompose approved tech-spec into atomic task files with parallel creation and validation. Use when: "разбей на задачи", "декомпозиция", "decompose tech-spec", "создай задачи из техспека", "/decompose-tech-spec"
testing
Test skills end-to-end: design test cases, run with/without skill, grade results, test description triggering accuracy, produce improvement report. Use when: "протестируй скилл", "запусти тесты для скилла", "проверь скилл", "run skill tests", "test this skill", "skill eval", "оцени скилл", "придумай тесты для скилла", "создай сценарии тестирования"