$npx -y skills add pavel-molyanov/molyanov-ai-dev --skill task-decomposition-coarseDecompose approved coarse tech-spec into task files with parallel creation and validation. Coarse variant: each Implementation Task in tech-spec produces one task file covering one skill's cohesive scope. Use when: "разбей на задачи coarse", "декомпозиция крупно", "разбей задачи
| 1 | <!-- Generated by sync-to-codex v1. Do not edit directly. --> |
| 2 | |
| 3 | # Task Decomposition (Coarse Variant) |
| 4 | |
| 5 | Decompose coarse tech-spec Implementation Tasks into individual task files with parallel creation and validation. Each task covers one skill's cohesive scope — not atomic units. |
| 6 | |
| 7 | **Input:** `work/{feature}/tech-spec.md` (status: approved, produced by tech-spec-planning-coarse) |
| 8 | **Output:** `work/{feature}/tasks/*.md` (validated) |
| 9 | **Language:** Task files in English; communication with the user in the language the user writes in |
| 10 | |
| 11 | ## Phase 1: Create Tasks |
| 12 | |
| 13 | 1. Ask user for feature name if not provided. |
| 14 | |
| 15 | 2. Read `work/{feature}/tech-spec.md`. Check frontmatter `status: approved`. |
| 16 | If not approved — tell the user (in their language): "tech-spec is not approved. Run `/new-tech-spec-coarse` first and get it to approved." Stop. |
| 17 | |
| 18 | 3. Read `work/{feature}/user-spec.md`. |
| 19 | |
| 20 | 4. Note the task template path: `~/.claude/shared/work-templates/tasks/task.md.template` |
| 21 | |
| 22 | 5. Read skills/reviewers catalog from [skills-and-reviewers.md](~/.claude/skills/tech-spec-planning/references/skills-and-reviewers.md) — shared across standard and coarse variants. |
| 23 | |
| 24 | 6. For each task in Implementation Tasks — launch [`task-creator-coarse`](~/.claude/agents/task-creator-coarse.md) subagent in parallel. |
| 25 | Pass each task-creator-coarse: |
| 26 | - feature_path, task_number, task_name |
| 27 | - template_path: `~/.claude/shared/work-templates/tasks/task.md.template` |
| 28 | - files_to_modify, files_to_read (from tech-spec) |
| 29 | - depends_on, wave, skills, reviewers, verify (from tech-spec) |
| 30 | - teammate_name (if specified in tech-spec, optional) |
| 31 | |
| 32 | Each task-creator-coarse copies the template to `tasks/{N}.md` first, then edits each section in place — this ensures no sections are skipped. For coarse tasks: What to do is filled as a checklist of related steps with commit points between them. |
| 33 | |
| 34 | **Coarse rule:** each task scopes to exactly one skill from the catalog. Exception: audit/QA tasks (Code Audit, Security Audit, Test Audit, pre-deploy-qa, post-deploy-qa) use methodology skills and sit in their own waves — they are not subject to the one-skill-per-task rule. |
| 35 | |
| 36 | 7. Confirm each task-creator-coarse returned a file path. Skip reading task content — preserve context budget for validation phase. |
| 37 | 8. Git commit: `draft(tasks): create {N} coarse tasks from tech-spec for {feature}` |
| 38 | |
| 39 | **Checkpoint:** |
| 40 | - [ ] All `tasks/*.md` files created |
| 41 | - [ ] Each task-creator-coarse returned file path |
| 42 | - [ ] Draft committed |
| 43 | |
| 44 | ## Phase 2: Validation (up to 3 iterations) |
| 45 | |
| 46 | Tech-spec was already validated. This phase checks only: (1) task-creator-coarse correctly expanded tasks by template with coarse-specific content, (2) no mismatches with real code appeared during detailing, (3) one-skill-per-task rule holds. |
| 47 | |
| 48 | ### Validators |
| 49 | |
| 50 | Launch both in parallel: |
| 51 | |
| 52 | [`task-validator-coarse`](~/.claude/agents/task-validator-coarse.md) (sonnet) — Template Compliance + Scope + AC/TDD carry-forward: |
| 53 | - Batch: 5 tasks per call |
| 54 | - Pass: feature_path, task_numbers array, batch_number, iteration |
| 55 | - Report: `logs/tasks/template-batch{N}-review.json` |
| 56 | |
| 57 | [`reality-checker`](~/.claude/agents/reality-checker.md) (sonnet) — Reality & Adequacy (shared agent, no coarse variant needed): |
| 58 | - Batch: 3 tasks per call |
| 59 | - Pass: feature_path, task_numbers array, batch_number, iteration |
| 60 | - Report: `logs/tasks/reality-batch{N}-review.json` |
| 61 | |
| 62 | ### Process |
| 63 | |
| 64 | 1. Launch both validators in parallel. |
| 65 | 2. Read JSON reports, collect findings. |
| 66 | 3. If issues found — for each task with issues, launch [`task-creator-coarse`](~/.claude/agents/task-creator-coarse.md) in fix mode: |
| 67 | - Pass: same inputs as creation + `mode: fix` + `findings` from validators |
| 68 | - task-creator-coarse reads existing task, applies fixes, overwrites file |
| 69 | 4. After each validation round, git commit: `chore(tasks): validation round {N} — {summary}` |
| 70 | 5. Re-validate fixed tasks. Maximum 3 iterations. |
| 71 | 6. If problems remain after 3rd iteration — show the user (in their language): "Here's what's left — let's resolve it together." |
| 72 | |
| 73 | ### Cross-Task Integration Check |
| 74 | |
| 75 | After individual validation passes, run a final cross-task check: |
| 76 | |
| 77 | 1. Launch both validators on ALL tasks in a single batch: |
| 78 | - `task-validator-coarse` — focus: skill overlap across tasks (two tasks with same skill on same module = merge candidate), shared resource ownership, no competing instances in same wave |
| 79 | - `reality-checker` — focus: duplicate heavy resource init, hidden dependencies, inconsistent approaches |