$npx -y skills add pavel-molyanov/molyanov-ai-dev --skill tech-spec-planning-coarseCreates tech-spec.md with architecture, decisions, testing strategy, and coarse implementation plan. Coarse variant: groups related work into skill-scoped tasks instead of atomic ones. Fewer tasks, each covers one skill's cohesive scope in the feature. Use when: "сделай техспек c
| 1 | <!-- Generated by sync-to-codex v1. Do not edit directly. --> |
| 2 | |
| 3 | # Tech Spec Planning (Coarse Variant) |
| 4 | |
| 5 | Create technical specification with coarse implementation plan: one task per skill's cohesive scope, not atomic units. |
| 6 | |
| 7 | **Input:** `work/{feature}/user-spec.md` + Project Knowledge |
| 8 | **Output:** `work/{feature}/tech-spec.md` (approved) |
| 9 | **Language:** Technical documentation in English; communication with the user in the language the user writes in |
| 10 | |
| 11 | ## Phase 1: Load Context |
| 12 | |
| 13 | 1. Ask user for feature name if not provided. Check `work/{feature}/` exists, create if needed. |
| 14 | |
| 15 | 2. Read `work/{feature}/user-spec.md`. If missing — ask user to describe the task or create user-spec first. |
| 16 | Extract `size: S|M|L` from user-spec frontmatter — it determines testing strategy depth. |
| 17 | |
| 18 | 3. 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. |
| 19 | |
| 20 | 4. user-spec.md is the single input source — all information from interview.yml and code research is already consolidated there. |
| 21 | |
| 22 | **Checkpoint:** |
| 23 | - [ ] Feature folder exists |
| 24 | - [ ] user-spec.md read, size extracted |
| 25 | - [ ] Project Knowledge read |
| 26 | |
| 27 | ## Phase 2: Code Research |
| 28 | |
| 29 | Launch `code-researcher` subagent (spawn_agent, 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. |
| 30 | |
| 31 | After subagent completes — read `{feature_path}/code-research.md`. Use in Phase 3 clarification and Phase 4 spec writing. |
| 32 | |
| 33 | If during later phases a gap is discovered — launch `code-researcher` again with the specific question. |
| 34 | |
| 35 | **Checkpoint:** |
| 36 | - [ ] code-research.md created/updated with implementation-level analysis |
| 37 | - [ ] Research file read by orchestrator |
| 38 | |
| 39 | ## Phase 3: Clarification (Adaptive) |
| 40 | |
| 41 | Analyze if additional information is needed based on user-spec and code research. |
| 42 | |
| 43 | - Ask technical questions if gaps exist. |
| 44 | - Focus: technical constraints, integration points, data sources, external dependencies. |
| 45 | - If gaps found in user-spec requirements — discuss with user and update user-spec too. |
| 46 | - If requirements are fundamentally unclear — suggest creating user-spec first. |
| 47 | |
| 48 | **Checkpoint:** |
| 49 | - [ ] All technical gaps clarified (or none existed) |
| 50 | |
| 51 | ## Phase 4: Create tech-spec |
| 52 | |
| 53 | 1. Copy template to feature folder: |
| 54 | ```bash |
| 55 | cp ~/.claude/shared/work-templates/tech-spec.md.template work/{feature}/tech-spec.md |
| 56 | ``` |
| 57 | Then edit sections one by one using Edit tool. |
| 58 | |
| 59 | 2. Fill frontmatter: |
| 60 | - `created`: today's date |
| 61 | - `status`: draft |
| 62 | - `size`: copy from user-spec (S|M|L) |
| 63 | - `branch`: `dev` |
| 64 | |
| 65 | 3. Fill all template sections. The template defines section structure — follow it directly. |
| 66 | In Architecture → Shared Resources: list heavy resources (ML models, DB pools, browser instances, API clients) shared across components. Specify owner, consumers, instance count. If none — write "None". |
| 67 | |
| 68 | **User-spec anchoring:** Every decision in the Decisions section must reference a user-spec requirement it serves. If a decision is purely technical — mark it `[TECHNICAL]`. If a decision contradicts user-spec — document it in User-Spec Deviations as `[PENDING USER APPROVAL]`. |
| 69 | |
| 70 | 4. **Coarse decomposition rule:** fill Implementation Tasks by grouping related work into skill-scoped tasks. |
| 71 | |
| 72 | **How to decompose:** |
| 73 | - Start from the list of execution skills needed (from [skills-and-reviewers.md](~/.claude/skills/tech-spec-planning/references/skills-and-reviewers.md)): `code-writing`, `layout-writing`, `prompt-master`, `skill-master`, `infrastructure-setup`, `deploy-pipeline`. |
| 74 | - **Group into one task:** work that shares a skill AND (same module OR shared files OR logical dependency). All ingestion code → one `code-writing` task. All system prompts for one pipeline → one `prompt-master` task. |
| 75 | - **Split into separate tasks:** independent modules within the same skill (enables parallel execution in the same wave). Backend ingest + frontend dashboard → two `code-writing` tasks when each owns a separate set of files and can proceed in parallel. |
| 76 | - **Layout ownership:** pure layout is its own one-skill `layout-writing` task. Planned mixed layout + business-logic scope splits into l |