Planning and task breakdown

From tranhieutt/software_development_department · View interactive version

Planning and task breakdown is an AI agent skill from the GitHub repository tranhieutt/software_development_department. When dealing with a complex issue, epic, or multi-step feature request, break it down into executable, testable, agent-ready tasks before writing code.

How to use this skill

Skill file

Planning and Task Breakdown

Purpose

Turn approved requirements into an implementation plan that another agent can

execute task by task without guessing. The plan must lock down scope, file

ownership, dependencies, test strategy, and verification before any code changes.

This is a Plan Gate under using-sdd. A plan is not permission to execute. The

user must approve the plan before RED tests, production edits, or implementation

subagents begin.

Prefer tracer-bullet vertical slices: each task should deliver the thinnest

complete path that is independently verifiable. Avoid horizontal tasks that only

build one layer unless that layer is a prerequisite contract, migration, or

bounded infrastructure step with its own verification.

When the plan will later be published to an issue tracker, keep each task shaped

like an independently grabbable issue: narrow outcome, explicit blockers,

acceptance criteria, and enough context that another agent or human can execute

it without reopening the whole spec.

Workflow

1. Establish Inputs

or prior conversation summary.

existing patterns.

spec-driven-development before planning.

2. Scope Check

Before tasking, decide whether this is one plan or multiple plans.

Split into separate plans when the request contains independent subsystems, such

as billing plus analytics plus auth, or mobile plus backend plus release

automation. Each plan must produce working, testable value on its own.

If the request is too broad for one plan, present the split and ask which plan to

write first.

3. File Responsibility Map

Before defining tasks, map the files or modules that will be created or modified.

For each file, capture:

Prefer small files with clear responsibilities. Follow existing codebase

patterns. Do not add unrelated refactors. If an existing file is too large and

the requested change touches its tangled area, include a scoped split task and

explain why it is necessary.

4. Task Decomposition

Break work into atomic tasks. Each task should be small enough to execute and

verify independently.

A valid task:

multiple layers

HITL when it requires human approval, design choice, external access, manual

review, or unresolved tradeoff

Invalid tasks:

task, unless it is explicitly a contract or setup task

4a. AFK/HITL Classification

Classify each task before presenting the plan:

| Classification | Meaning | Typical examples |

| --- | --- | --- |

| AFK | Agent-ready. Requirements, files, acceptance criteria, and verification are clear enough to execute without more human decisions. | Narrow bug fix, approved behavior slice, mechanical docs update, isolated test coverage |

| HITL | Human-in-the-loop. Work is blocked on judgment, access, design approval, or a durable tradeoff. | Architecture choice, UX decision, credentials, release approval, ADR acceptance |

Default to HITL when the task contains unresolved product, security, release,

or architecture judgment. Do not hide uncertainty inside an AFK task.

Also classify the plan's execution risk honestly:

pending design choice hidden behind "implement as needed".

pick schema path, provide credential, accept ADR, confirm rollout window.

dependency explicit instead of pretending the whole chain is agent-ready.

4b. Tracer-Bullet Issue Shape

When a task represents user-facing behavior or a reviewable slice, shape it like

an issue another implementer could pick up directly:

Do not produce pseudo-issues such as "backend support", "frontend wiring", or

"add tests" unless they are genuine prerequisite setup tasks with their own

verification contract.

5. Dependency Mapping

Order tasks by dependency:

  1. Contracts and interfaces before consumers
  2. Schema/data changes before API code
  3. API behavior before UI integration
  4. Implementation before docs
  5. Tests and verification at every task boundary

Mark tasks as sequential unless they touch disjoint files and have no input

dependency. If parallel execution is genuinely safe, say whether to use

fork-join or orchestrate.

Prefer blocker-first sequencing that mirrors issue-tracker publication order:

publish or present true blockers before dependent slices so later tasks can

reference real upstream work instead of vague "depends on prior implementation".

6. Create Plan and Request Approval

Output the plan in the required format below. End by asking for explicit approval

to execute Task 1. Do not create tests, edit production files, or spawn

implementation agents before approval.

Required Plan Format

Use this structure exactly. Keep it concise, but do not omit required fields.

# [Feature/Epic Name] Implementation Plan

**Goal:** [One sentence describing the working outcome]
**Source of Truth:** [spec/issue/request path or short description]
**Pre-Code Gate:** Plan Gate required because [multi-step / multi-file / cross-domain reason]
**Approval Required Before:** RED tests, production edits, implementation subagents
**Execution Mode Recommendation:** [Inline TDD | subagent-driven-development | orchestrate | fork-join] because [reason]
**Slice Strategy:** [Tracer-bullet vertical slices | Contract/setup tasks first, then vertical slices] because [reason]

## Architecture Summary

[2-4 sentences describing approach, boundaries, data/control flow, and how this
fits existing patterns.]

## File Responsibility Map

| File | Action | Responsibility | Owner Task | Verification |
| --- | --- | --- | --- | --- |
| `exact/path/file.ext` | Create/Modify/Test | [purpose] | Task N | `[command/check]` |

## Plan

### Task 1: [Atomic Outcome]

**Issue Shape:** [Short issue-style title]
**Classification:** [AFK | HITL] because [why the agent can proceed alone or what human decision is required]
**Purpose:** [Why this task exists]
**Dependencies:** None / Task N
**Files:**
- Create: `exact/path/new-file.ext`
- Modify: `exact/path/existing-file.ext`
- Test: `exact/path/test-file.ext`

**Acceptance Criteria:**
- [ ] [Concrete observable result]
- [ ] [Edge case or failure behavior]
- [ ] [Independent verification/demo result for this slice]

- [ ] **Step 1: RED - write the failing test**

Describe the exact test to add. Include code when the API or assertion is known:

it("does the expected behavior", () => {

// concrete assertion

});


- [ ] **Step 2: Run RED verification**

Run: `[exact command]`
Expected: FAIL because `[specific missing behavior or assertion mismatch]`

- [ ] **Step 3: GREEN - implement the minimum code**

Describe the smallest implementation change. Include code only when it is
short, stable, and not likely to conflict with existing patterns.

- [ ] **Step 4: Run GREEN verification**

Run: `[exact command]`
Expected: PASS with `[expected pass count / clean output]`

- [ ] **Step 5: REFACTOR - clean up while staying green**

Allowed cleanup: [naming / duplication / extraction]. No behavior expansion.

- [ ] **Step 6: Task review**

Run: `[task-specific review command/check]`
Expected: [clean result]

- [ ] **Step 7: Commit**

Commit message: `type(scope): concise task result`

### Task 2: [Atomic Outcome]

[Repeat the same complete structure. Do not say "same as Task 1".]

## Cross-Task Verification

- [ ] Run `[full test/build/lint command]`
- [ ] Verify [critical user flow / artifact / docs link]
- [ ] Review changed files against source of truth

## Risks and Rollback

- Risk: [specific risk]. Mitigation: [specific check].
- Rollback: [how to revert or disable safely].

## Approval Request

Plan is ready. Do you approve executing Task 1 using `test-driven-development`?

No Placeholders

The plan must not contain:

If exact code is not knowable until implementation, state the interface,

acceptance criteria, and verification command instead of inventing code.

Self-Review

Before presenting the plan, review it yourself:

verification, and expected command output

unless a contract/setup task is required first

with blockers and acceptance criteria

Fix issues inline before showing the plan.

Execution Handoff

After approval:

need per-task implementation, spec-compliance review, and code-quality review.

Before the first edit after approval, state:

Pre-code gate: Plan satisfied by user approval; next edit is RED test <file>; verification: <failing test command>.

Anti-Rationalizations

| Excuse | Required correction |

| --- | --- |

| "The user asked me to build it, not plan it." | Multi-step work requires Plan Gate. Present the plan first. |

| "I can start Task 1 while waiting for approval." | A plan is not permission. Wait for explicit approval. |

| "The first step is only a test." | RED tests are execution. Approval still comes first. |

| "The task is obvious enough." | If it spans multiple files or behaviors, make it explicit. |

| "Exact commands are tedious." | Commands are the verification contract. Include them. |

| "I'll let the implementer figure out details." | The plan must remove avoidable guessing. |

| "Similar to Task N is concise." | Repeat the needed details; tasks may execute independently. |

Edge Cases

document checks, link checks, or reviewer checklist.

screenshot/manual visual checks, target viewports, and acceptance criteria.

Do not pretend manual checks are TDD.

commands and expected decision output.

Related Skills

planning skill.

with implementer and reviewer subagents.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.