| name | task-decomposition-coarse |
| description | Decompose 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", "декомпозиция крупно", "разбей задачи крупно",
"крупная декомпозиция задач", "decompose tech-spec coarse", "skill-scoped tasks",
"one task per skill", "task decomposition coarse", "/decompose-tech-spec-coarse"
|
Task Decomposition (Coarse Variant)
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.
Input: work/{feature}/tech-spec.md (status: approved, produced by tech-spec-planning-coarse)
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-coarse 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 — shared across standard and coarse variants.
-
For each task in Implementation Tasks — launch task-creator-coarse subagent in parallel.
Pass each task-creator-coarse:
- 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-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.
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.
-
Confirm each task-creator-coarse returned a file path. Skip reading task content — preserve context budget for validation phase.
-
Git commit: draft(tasks): create {N} coarse tasks from tech-spec for {feature}
Checkpoint:
Phase 2: Validation (up to 3 iterations)
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.
Validators
Launch both in parallel:
task-validator-coarse (sonnet) — Template Compliance + Scope + 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 (shared agent, no coarse variant needed):
- 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.
- Read JSON reports, collect findings.
- If issues found — for each task with issues, launch
task-creator-coarse in fix mode:
- Pass: same inputs as creation +
mode: fix + findings from validators
- task-creator-coarse reads existing task, applies fixes, overwrites file
- After each validation round, git commit:
chore(tasks): validation round {N} — {summary}
- Re-validate fixed tasks. 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:
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
reality-checker — focus: duplicate heavy resource init, hidden dependencies, inconsistent approaches across tasks
-
If issues found → launch task-creator-coarse 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): coarse task decomposition approved for {feature}
- Suggest next step:
/do-feature for full feature execution, or /do-task for individual tasks.
Checkpoint:
Final Check