| name | task-decomposition |
| description | Decompose approved tech-spec into atomic task files with parallel creation and validation.
Use when: "разбей на задачи", "декомпозиция", "decompose tech-spec",
"создай задачи из техспека", "/decompose-tech-spec"
|
Task Decomposition
Decompose tech-spec Implementation Tasks into individual task files with parallel creation and validation.
Input: work/{feature}/tech-spec.md (status: approved)
Output: work/{feature}/tasks/*.md (validated)
Language: Task files in English; communication with the user in the language the user writes in
Phase 1: Create Tasks
-
Ask user for feature name if not provided.
-
Read work/{feature}/tech-spec.md. Check frontmatter status: approved.
If not approved — tell the user (in their language): "tech-spec is not approved. Run /new-tech-spec first and get it to approved." Stop.
-
Read work/{feature}/user-spec.md.
-
Note the task template path: ~/.claude/shared/work-templates/tasks/task.md.template
-
Read skills/reviewers catalog from skills-and-reviewers.md — for passing correct skills/reviewers to task-creators.
-
For each task in Implementation Tasks — launch task-creator subagent in parallel.
Pass each task-creator:
- feature_path, task_number, task_name
- template_path:
~/.claude/shared/work-templates/tasks/task.md.template
- files_to_modify, files_to_read (from tech-spec)
- depends_on, wave, skills, reviewers, verify (from tech-spec)
- teammate_name (if specified in tech-spec, optional)
Each task-creator copies the template to
tasks/{N}.md first, then edits each section in place. This ensures no sections are skipped.
-
Confirm each task-creator returned a file path. Skip reading task content — preserve context budget for validation phase.
-
Git commit: draft(tasks): create {N} tasks from tech-spec for {feature}
Checkpoint:
Phase 2: Validation (up to 3 iterations)
Tech-spec was already validated by 6 validators. This phase checks only: (1) task-creator correctly expanded tasks by template, (2) no mismatches with real code appeared during detailing.
Validators
Launch both in parallel:
task-validator (sonnet) — Template Compliance + AC/TDD carry-forward:
- Batch: 5 tasks per call
- Pass: feature_path, task_numbers array, batch_number, iteration
- Report:
logs/tasks/template-batch{N}-review.json
reality-checker (sonnet) — Reality & Adequacy:
- Batch: 3 tasks per call
- Pass: feature_path, task_numbers array, batch_number, iteration
- Report:
logs/tasks/reality-batch{N}-review.json
Process
- Launch both validators in parallel (task-validator in batches of 5, reality-checker in batches of 3).
- Read JSON reports, collect findings.
- If issues found — for each task with issues, launch
task-creator in fix mode:
- Pass: same inputs as creation +
mode: fix + findings from validators
- task-creator reads existing task, applies fixes, overwrites file
- After each validation round, git commit:
chore(tasks): validation round {N} — {summary}
- Re-validate fixed tasks (repeat 1-4). Maximum 3 iterations.
- If problems remain after 3rd iteration — show the user (in their language): "Here's what's left — let's resolve it together."
Cross-Task Integration Check
After individual validation passes, run a final cross-task check:
-
Launch both validators on ALL tasks in a single batch (not split into smaller batches):
task-validator — focus: shared resource ownership (one owner, consumers depend_on owner), no competing instances in same wave
reality-checker — focus: duplicate heavy resource init, hidden dependencies, inconsistent approaches across tasks
-
If issues found → launch task-creator in fix mode for affected tasks. Re-validate fixed tasks.
-
Max 2 iterations for cross-task check (on top of the 3 individual iterations).
Checkpoint:
Phase 3: Present to User
- Summary: task count, waves, dependencies, validation results (iterations, issues found/fixed).
- Wait for user approval.
- Git commit:
chore(tasks): task decomposition approved for {feature}
- Suggest next step:
/do-task for individual tasks.
Checkpoint:
Final Check