一键导入
create-tasks
Generate actionable tasks from a plan, outputting to Beads issues (--beads), Linear project issues (--linear), or TODO.md
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Generate actionable tasks from a plan, outputting to Beads issues (--beads), Linear project issues (--linear), or TODO.md
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Ask the Cerberus model panel an arbitrary question
Produce a technical implementation plan (design-focused), optionally interviewing the user, then run multi-model generator and plan review gate
Interview the user to produce a feature spec, then run multi-model generator and spec review gate
Iterative code review with external reviewers
Iterative plan review with external reviewers
Iterative spec review with external reviewers
| name | create-tasks |
| disable-model-invocation | true |
| description | Generate actionable tasks from a plan, outputting to Beads issues (--beads), Linear project issues (--linear), or TODO.md |
| argument-hint | [--beads | --linear [project]] [--linear-team <team>] [--from-plan <path/to/plan.md>] |
Before running any Bash snippet in this skill, run the shared Cerberus resolver below. It lazily builds and executes bin/cerberus from the configured plugin root.
# --- shared resolver (canonical body; identical across all callers) ---
set +u
if [ -n "${CODEX_THREAD_ID:-}" ] || [ -n "${PLUGIN_ROOT:-}" ]; then
host=codex
elif [ -n "${CLAUDE_SESSION_ID}" ] || [ -n "${CLAUDE_PLUGIN_ROOT}" ] || [ -n "${CLAUDE_SKILL_DIR}" ]; then
host=claude
else
host="${CERBERUS_HOST:-}"
if [ "$host" = claude-code ]; then
host=claude
fi
fi
root="${CERBERUS_ROOT:-}"
if [ -z "$root" ] && [ "$host" = codex ]; then
root="${PLUGIN_ROOT:-}"
fi
if [ -z "$root" ] && [ "$host" = codex ] && [ -n "${CODEX_THREAD_ID:-}" ]; then
cache_home="${HOME:-}"
[ -n "$cache_home" ] || cache_home="${USERPROFILE:-}"
if [ -n "$cache_home" ]; then
cache_file="$cache_home/.codex/cerberus/sessions/$CODEX_THREAD_ID/plugin-root"
if [ -r "$cache_file" ]; then
IFS= read -r root < "$cache_file" || true
fi
fi
fi
if [ -z "$root" ] && [ "$host" != codex ]; then
root="${CLAUDE_PLUGIN_ROOT}"
[ -n "$root" ] || root="${PLUGIN_ROOT:-}"
fi
if [ -z "$root" ] && [ "$host" != codex ]; then
skill_dir="${CLAUDE_SKILL_DIR}"
if [ -n "$skill_dir" ]; then
root="$(cd "$skill_dir/../.." && pwd)"
fi
fi
[ -n "$root" ] || { echo "cerberus: plugin root not set; set CERBERUS_ROOT and retry" >&2; exit 127; }
bin="$root/bin/cerberus"
export CERBERUS_ROOT="$root"
claude_session="${CLAUDE_SESSION_ID}"
if [ "$host" = claude ]; then
export CERBERUS_HOST=claude
elif [ "$host" = codex ]; then
export CERBERUS_HOST=codex
fi
if [ "$host" = codex ] && [ -n "${CODEX_THREAD_ID:-}" ]; then
export CERBERUS_HOST=codex CERBERUS_SESSION_ID="$CODEX_THREAD_ID"
elif [ "$host" = claude ] && [ -n "$claude_session" ]; then
export CERBERUS_HOST=claude CERBERUS_SESSION_ID="${CERBERUS_SESSION_ID:-$claude_session}"
fi
command -v make >/dev/null 2>&1 || { echo "cerberus: make not found on PATH; install make and retry." >&2; exit 127; }
if ! make -q -C "$root" build >/dev/null 2>&1; then
command -v go >/dev/null 2>&1 || { echo "cerberus: Go >= 1.22 not found on PATH; install Go and retry." >&2; exit 127; }
echo "cerberus: building... (this happens once after clone or upgrade)" >&2
start=$(date +%s)
make -C "$root" build >&2 || exit $?
end=$(date +%s)
echo "cerberus: build complete in $((end-start))s" >&2
fi
# --- shared resolver above; per-caller exec below (allowed to diverge) ---
exec "$bin" "$@"
Use bin/cerberus through the configured plugin root when invoking Cerberus commands below.
Convert a stable implementation plan into actionable, dependency-ordered tasks. Output to Beads issues (with --beads flag), Linear issues in a project (with --linear), or a TODO.md file (default).
Upstream: This command accepts output from
/create-plan. Downstream: Output is validated by/review-tasksfor local/Beads artifacts, or by applying the same validation checks before creating Linear issues.
Generate a validated execution task graph from a stable plan and write it to the requested target (TODO.md, Beads, or Linear).
Before writing output, validate the task graph against the gates in this skill. Use the narrowest checks that prove the artifact is executable: coverage tables and dependency checks (including required epic dependencies and no cross-epic task dependencies) for all modes, br ready for Beads, and project/issue/dependency re-listing for Linear.
Return the Phase 7 summary: output location or tracker target, task count, phase/dependency highlights, coverage status, and the next execution command or review step. Do not include hidden reasoning or intermediate drafts.
Completing ALL generated tasks MUST fully implement the plan.
This is the fundamental contract of task generation. When a user completes every task in the generated graph, the feature must be 100% complete—not 90%, not "mostly done", but FULLY DONE with no remaining work.
Every objective, acceptance criterion, and MUST/SHALL obligation from the plan MUST have at least one owning task. If this invariant cannot be satisfied, task generation MUST fail.
| Flag | Output | Best For |
|---|---|---|
| (default) | TODO.md in plan directory | Quick projects, no issue tracker |
--beads | Beads issues with dependencies | Multi-agent parallelization, tracked work |
--linear [project] | Linear issues in an existing or newly confirmed Linear project | Teams coordinating work in Linear |
Output modes are mutually exclusive. If more than one of --beads or --linear is supplied, abort before generating output.
Linear mode details:
--linear enables Linear output. With no project value, derive the project name from the plan title.--linear <id|url|name> targets a specific Linear project by ID, URL, or exact name. If a name has no exact match, ask whether to create a new project with that name instead of making the user rerun with a different flag.--linear-team <key|id|name> is optional and only disambiguates team selection. If supplied without --linear, abort before generating output.Linear examples:
/cerberus:create-tasks --linear uses the plan title as the Linear project name./cerberus:create-tasks --linear "Plugin Port" targets or, after confirmation, creates a project named Plugin Port./cerberus:create-tasks --linear "Plugin Port" --linear-team ENG disambiguates the Linear team only when needed.The user provides either:
--from-plan path/to/plan.mddocs/ or ~/.claude/plans/Use the phases below to gather enough evidence, generate the graph, and validate it. They are generation constraints, not a transcript format: keep detailed reasoning internal and emit only the required artifacts, validation tables, and final summary.
Locate plan file:
--from-plan provided, use that path*-plan.md in docs/ or ~/.claude/plans/Load repo guidance (if present):
CLAUDE.md or AGENTS.md exist, read only the parts needed for conventions that affect generated tasks (tests, commands, style, ownership)Extract from plan:
Plan completeness check:
[TBD] in Technical Design or Testing Strategy:
/create-plan review gateExtract artifact references (do not load yet):
Before generating tasks, verify all referenced files:
Extract file paths from:
File Impact Summary (primary source)Technical Design sections (supplemental)High-Level Approach (supplemental mentions)Classify each path:
Build verification table:
- src/auth/middleware.ts — Exists
- src/auth/session.ts — New (to be created)
- tests/auth/session.test.ts — New (test file)
Missing referenced artifact gate:
New in plan: Create a prerequisite "Author <artifact>" task; downstream tasks that need it must depend on this task; use plan-only decomposition until artifact existsNew: abort: "Missing referenced artifact: <path>. Provide it or update the plan."Handle ambiguous paths:
Load verified artifacts:
Substrate grounding — measure the code/data you're decomposing over; don't infer it from the plan: The plan describes the work in prose, but tasks must be sliced against the actual substrate — a self-consistent task graph built on a false premise is still wrong. Before Phase 3, spend a bounded amount of effort (read the key existing code/symbols the tasks will touch; run any cheap diagnostic the repo already supports) to confirm whichever of these the work actually depends on:
Substrate: N/A is a valid entry — don't manufacture analysis. If grounding contradicts the plan, stop and surface it — do not generate tasks on a premise you have shown to be false. (These claims are re-verified against the repo by review-tasks Phase 2b, so a written Notes block is not a substitute for actually checking.)Goal: Prevent requirement drift between spec/legacy → plan → tasks.
Build a Requirements Snapshot from the plan (verbatim):
Cross-check against spec/legacy (if referenced):
Create a Consistency Audit table (required output):
Create a Deviation Log (required output):
Freeze requirements for task generation:
Generate tasks following these rules:
Goal: Ensure all plan obligations are captured, owned by tasks, and verifiable.
Goal: Produce tasks that enforce "red before green" and keep parallel work safe: (1) code compiles early, (2) end-to-end behavior is specified early via failing integration tests, (3) implementation tasks turn tests green with local unit tests.
Definitions:
Per-Feature Steps — follow in order for each feature/user story:
Skeleton + Integration test task (combined when creating new modules/classes)
NotImplemented.[integration-path-test] in the task title.Implementation tasks (parallel where possible)
Build-before-wire (do not hide construction inside a "make-green" or [system-wiring] task): the skeleton→green structure only works when turning the integration test green is wiring already-built components together. If making a feature's integration test pass requires creating components that do not yet exist (new modules/services/handlers/algorithms/schemas/kernels), those are separate implementation tasks and the wiring/"green" task depends on them. A task whose real cost is "build the thing that makes this pass" is mis-sized — split the build out. Be suspicious of "wire up", "integrate", "make the test pass", or "system-wiring" attached to work that is mostly net-new construction (confirm against Substrate Notes: existing vs to-build).
Bugfix Variant:
[integration-path-test].Dependency Rules:
Example (new module):
src/foo/service.ts + DI registration (stubs) + failing end-to-end test via create_app()Prerequisites and infra/config items in High-Level Approach[system-wiring]File Impact Summary to assign Primary Files to each taskAcceptance Criteria Coverage table to ensure every AC has exactly one primary owner task (supporting tasks may reference ACs but must not claim ownership)Size tasks by files touched, subsystems crossed, and atomic acceptance criteria — these are the best observable proxies for context window consumption and implementation obligation count. These proxies undercount net-new construction: a 3-file task that builds three new behaviors from scratch is larger than its file count implies. Also weigh the number of not-yet-existing components the task must create (see split triggers).
Target range: 3-8 files, 1-2 subsystems per task.
Hard limits:
Mechanical sweep exception (same change across many files):
Split triggers — if any are true, task is too big:
Prefer fewer, larger tasks — batching small fixes beats many micro-tasks. Aim for 5-15 tasks per feature/epic.
Use sub-epics for natural structure — when the plan names clear phases, milestones, or distinct workstreams, create a parent epic for the overall feature and one sub-epic per natural phase/workstream. Create sub-epics only when each group contains multiple executable tasks or the grouping materially improves review/execution clarity; avoid one-task sub-epics or cosmetic phase containers. Put each executable task under the most specific sub-epic. Within one epic/sub-epic, use task-to-task dependencies as the source of truth for execution order. When ordering crosses epic/sub-epic boundaries, set a dependency between the corresponding epics/sub-epics; do not add task-to-task dependencies across epic boundaries. If a specific task-level dependency would cross epics, re-slice or reparent the work so the dependent tasks share one parent epic, or represent the boundary with an epic dependency.
Defining subsystems: A subsystem is a distinct functional area of the codebase with its own responsibilities. Count subsystems by identifying the top-level domains or modules touched:
auth, api, database, email, ui, config, clisrc/ or top-level package nameAvoid unnecessarily long dependency chains:
Avoid vague polish/cleanup tasks:
Avoid overlapping AC ownership:
Cross-cutting changes (same pattern across many files):
Feature flags: When flags are involved, create three tasks:
These rules prevent cross-layer gaps where changes are made in one layer but wiring in composition roots, adapters, or DI builders is never updated.
Identifying wiring files: Look for these patterns to find the "composition root" / wiring layer:
main.py, main.ts, app.py, index.ts, CLI entrypointscreate_app(), build_container(), configure_services()*_wiring.py, container.ts, di.py, providers.ts*_adapter.py, files that import from multiple domainsEnd-to-end wiring checkpoint:
Origin → transport → consumptionconfig.yaml → OrchestratorConfig → AgentSessionConfig → SessionRunnerAdapter/bridge coverage:
DomainPromptProvider and PipelinePromptProvider), explicitly list how each handles the change:
Changes (e.g., "Update orchestration_wiring.py to map new prompt fields")Template lifecycle:
Dependency notation: T002 → T001 means "T002 depends on T001" (T001 must complete before T002 can start). This matches br dep add T002 T001.
main.py, container.ts), create a dedicated "shared foundation" task for that file, then parallelize downstream tasks that no longer touch itThese describe the structure of the generated tasks, not the workflow phases above:
For each task, create a rich specification.
Each task should read like a compact engineering-ticket prompt for an implementation agent. Preserve the standard section names below for parser/review compatibility, but keep content task-specific and outcome-focused instead of restating generic agent process.
Prompt-quality requirements:
Source Document Links (Hard Gate):
Every task MUST include a **Source Documents**: section. This is validated in Phase 5.
Requirements:
plan.md#L45-L67). Include multiple links when a task spans Technical Design, File Impact Summary, Testing Strategy, etc.Line Number Accuracy (Anti-Guessing Rule):
Spec Exists Rule: A spec exists if ANY of these are true:
*-spec.md file exists in the same directory as the planWhy this matters: These links enable agents executing tasks to quickly reference original requirements without searching. Accurate line numbers prevent "fake compliance" where links exist but don't point to relevant content.
### [T001] Title
**Type**: task | bug | feature | chore
**Priority**: P0 | P1 | P2 | P3
**Story**: [US1] | [US2] | (none for setup/foundation)
**Parallel**: [P] if parallelizable, blank if sequential
**Primary Files**: path1.ts, path2.ts
**Subsystems**: auth, api (list all subsystems touched)
**Dependencies**: T000 (if any)
**Plan Mapping**:
- Plan Item(s): objective/AC/phase/obligation identifiers or quoted plan text this task owns
- Infra/Support Justification: N/A, or why this setup/support task is necessary for mapped plan work
**Source Documents**:
- Plan: [plan-name.md#L45-L67](path/to/plan-name.md#L45-L67) — Section: Technical Design
- Plan: [plan-name.md#L120-L135](path/to/plan-name.md#L120-L135) — Section: File Impact Summary
- Spec: [spec-name.md#L12-L34](path/to/spec-name.md#L12-L34) — US1: User can login
- Spec: [spec-name.md#L50-L55](path/to/spec-name.md#L50-L55) — AC3: Session timeout
<!-- Use "Spec: N/A" if no spec exists per the Spec Exists Rule above -->
**Goal**:
The concrete outcome this task accomplishes (1-2 sentences). Phrase as the desired end state, not a generic activity.
**Context**:
- Why this matters for the plan
- Only the task-specific plan/spec background needed to execute safely
- No generic agent process reminders or repo rules already covered by AGENTS.md/tooling
**Scope**:
- In: what will be changed
- Out: explicit non-goals and constraints
**Premises** (assumptions this task relies on — each grounded in Substrate Notes, not the plan's prose):
- e.g. "component X already exists and is importable", "input has ≤ N items", "the Y reference/oracle is computable at this scale", "the Z hazard occurs in fixture F". If a premise is unverified, say so and raise the task's risk. A premise that is false makes the task wrong even if every section is filled in.
**Changes**:
- `path/to/file.ts` — [Exists|New] — what to do
- `path/to/other.ts` — [Exists|New] — what to do
**Wiring Map** (required when introducing new data/config/templates):
- `<origin> → <transport> → <consumption>` (one line per new field/config/template)
- Example: `idle_timeout config → OrchestratorConfig → AgentSessionConfig.idle_timeout → SessionRunner`
**Acceptance Criteria**:
- What good means for this task, expressed as observable outcomes
- Keep to the task's owned behavior; reference supporting ACs without claiming primary ownership
- Use one observable criterion per bullet. Do not reduce bullet count by packing independent checks with semicolons, conjunctions, or paragraph-style criteria.
**Verification**:
- The narrowest commands/checks that prove this task is complete
- Test commands to run and the expected passing signal
- **Config override test** (required for new configurable values): At least one test proving a non-default override reaches runtime via the normal load/construction path (not by constructing config objects directly in the test)
- **Merge/precedence semantics** (if applicable): Explicit tests for merge/override/precedence/default behavior
- **Negative cases** (if applicable): At least one test covering rejection/error/invalid input behavior
- **Runnable reference** (required when the task compares against an oracle/baseline/golden/reference): name the reference and confirm it exists and is computable at this task's scale within the test budget. If the natural reference is intractable or doesn't model this input, specify the substitute up front (a smaller tractable fixture, a pinned snapshot, or a property/invariant check) — never write an acceptance check that cannot actually be executed.
**Integration Path Test** (per-feature, not per-task):
- At least one task per feature must include a test exercising the top-level construction path
- Examples: `main.py` → full app, `create_app()` factory, CLI entrypoint, DI container resolution
- Mark that task with `[integration-path-test]` so validation can verify coverage
- Other tasks may depend on this task or include it in final verification
**Notes for Agent**:
- Edge cases, gotchas, constraints
- Completion response should summarize the outcome, files changed, verification commands/results, and any remaining risk or blocker
After generating task specs, produce a sizing summary table and verify all tasks are within bounds:
| Task | Files | Subsystems | ACs | Mechanical? | Status | Action |
|------|-------|------------|-----|-------------|--------|--------|
| T001 | 4 | 1 | 2 | No | OK | — |
| T002 | 8 | 2 | 5 | No | OK | 5 tightly-coupled ACs share one verification path |
| T003 | 14 | 4 | 2 | No | Over | MUST split (>12 files, >3 subsystems) |
| T004 | 16 | 1 | 1 | Yes | OK | Mechanical sweep allowed |
| T005 | 5 | 1 | 3 bullets / 7 atomic | No | Over | MUST split; semicolon-packing does not count |
Gating rule: No tasks exceeding hard limits may proceed:
Count atomic ACs, not bullets. A task with 3 bullets that each contain multiple unrelated checks can exceed the limit; a task with 5 crisp, tightly-coupled ACs can pass. Do not cosmetically combine distinct ACs to pass the gate.
Split and re-estimate until all pass.
Provide the following required artifacts after task specs:
Requirements Snapshot (required):
| Requirement Type | Source | Text (verbatim) |
|------------------|--------|----------------|
| Objective | Plan | ... |
| AC | Plan | ... |
| MUST/SHALL | Plan | ... |
Consistency Audit (required):
| Item | Spec/Legacy | Plan | Status | Notes |
|------|-------------|------|--------|-------|
| AC #3: ... | ... | ... | Match/Deviation | ... |
Deviation Log (required):
| Source | Deviation | Rationale | Approved? |
|--------|-----------|-----------|-----------|
| Spec AC #3 | ... | ... | Yes/No |
Obligation Coverage (required):
| Plan Clause | Task(s) | Verification |
|------------|---------|--------------|
| "MUST ... " | T001 | Unit test X + integration test Y |
System Wiring Coverage (required when applicable):
| Flow | Wiring Task(s) | Verification |
|------|----------------|--------------|
| config → DI → runtime | T002 [system-wiring] | Integration test |
Propagation Map (required for new/repurposed inputs/fields/signals):
| Input/Field/Signal | Origin | Transport | Consumption | Verification |
|-------------------|--------|-----------|-------------|--------------|
| idle_timeout | config.yaml | OrchestratorConfig → AgentSessionConfig | SessionRunner | Integration test T001 |
Plan proposes: "Implement full password reset flow (backend + email + UI)"
This is a gate, not advisory. If any check fails, you MUST adjust tasks (merge/split/add deps) and re-run the checklist before proceeding to output.
| Check | Gate | Rule | Fix |
|---|---|---|---|
| Obligation coverage | Hard | All MUST/SHALL/REQUIRED/PROHIBIT/FORBID/FAIL-FAST/DEPRECATED/BREAKING CHANGE clauses mapped to tasks + verification | Add task(s) or update verification |
| File overlap | Hard | No two parallel tasks share files | Add dependency |
| Task mapping | Hard | Every task maps to at least one plan item or has an infra/setup/support justification tied to mapped plan work | Add mapping/justification or remove task |
| Task format | Hard | Every task includes required sections: Source Documents, Plan Mapping (Plan Item(s) + Infra/Support Justification), Goal, Context, Scope, Changes, Acceptance Criteria, Verification, and task-specific Notes/Completion Response guidance when applicable | Add missing sections |
| AC coverage | Hard | Every spec AC maps to exactly one primary task (if spec present) | Add task or reassign |
| No orphan ACs | Hard | No AC claimed by multiple tasks as primary (if spec present) | Reassign ownership |
| Consistency audit | Hard | Spec/legacy → plan matches, or deviations logged + approved | Add deviations or abort |
| Requirement freeze | Hard | Tasks mirror plan requirements verbatim (ACs/enums/constants/thresholds) | Rewrite tasks to match plan |
| Dependencies complete | Hard | When uncertain, add the dep | Add dependency |
| No cross-epic task deps | Hard | Task-to-task dependencies stay within one parent epic/sub-epic | Move tasks under the same epic, re-slice, or add an epic-to-epic dependency |
| Epic dependencies complete | Hard | Multiple epics/sub-epics with required ordering have explicit epic-to-epic dependencies | Add the missing epic dependency |
| One outcome per task | Hard | No bundled multi-behavior tasks | Split task |
| Prompt quality | Hard | Every task reads as a compact coder prompt: outcome, what good means, task-specific constraints, focused verification, completion response; no generic process scaffolding unless required | Rewrite task prompt |
| Sizing: standard | Hard | No task over 12 files / 3 subsystems / 5 atomic ACs; 4-5 ACs require tight coupling and one coherent verification path; semicolon-packed bullets count by atomic checks | MUST split or genuinely reduce scope |
| Sizing: mechanical | Hard | Mechanical sweeps: max 18 files, must be 1 subsystem, grep-able/scriptable pattern, scripted verification, ≤ 5 atomic ACs with 4-5 only when tightly coupled and sharing one coherent verification path | Split by subsystem or convert to standard |
| No vague tasks | Hard | Every task has concrete files + verification steps | Rewrite or delete |
| Startup vs runtime | Hard | Config/boot-time semantics have separate startup/load-path verification | Add startup/load-path test |
| Negative-case coverage | Hard | Rejection/error/invalid inputs have explicit negative tests | Add negative tests |
| Merge/precedence semantics | Hard | Merge/override/precedence/defaults have explicit tests | Add tests |
| End-to-end wiring | Hard | New data/config/templates have wiring maps; tasks cover each hop | Add wiring map + missing tasks/deps |
| System wiring coverage | Hard | End-to-end flows include a [system-wiring] task | Add wiring task |
| Adapter/bridge coverage | Hard | Field changes mapped across all adapters/mappers/DI builders | Add/update adapter tasks |
| Config override test | Hard | New config values have override tests reaching runtime | Add override test |
| Template lifecycle | Hard | New templates are loaded, passed through, and used | Add missing lifecycle steps |
| Missing referenced artifacts | Hard | Plan-referenced docs/specs exist (or declared New with prereq task) | Abort or add prereq task |
| Substrate grounding | Hard | Substrate Notes record what was actually checked (not merely filled in), or Substrate: N/A for trivial tasks; no task rests on a plan assumption the substrate contradicts | Re-measure; re-slice; surface contradictions before output |
| Runnable verification | Hard | Every task's Verification/ACs compare against a reference that exists and is computable at the task's scale, or name a tractable substitute | Replace the unrunnable gate with a tractable reference |
| Build-before-wire | Hard | No wiring/"make-green"/[system-wiring] task depends on not-yet-built components; net-new construction is its own task | Split out the build; add the dependency |
| Requirement applicability | Hard | Each emphasized hazard/requirement is exercised by an available input/fixture, or is explicitly flagged as untestable/vacuous | Add a fixture that triggers it, or drop/flag the requirement |
| Integration path test | Hard | At least one task marked [integration-path-test] per feature | Add integration test task |
| Source document links | Hard | Every task has **Source Documents**: with valid plan link(s), spec link(s) if spec exists per Spec Exists Rule, line numbers in #L<n> or #L<n>-L<m> format, and labels matching text actually present in referenced range | Read files to get accurate line numbers; add labels matching section headings |
| Sizing: target | Advisory | Aim for 3-8 files, 1-2 subsystems | Consider splitting if outside range |
Hard gates block output. Advisory checks are recommendations.
Validation loop: Run checks → fix violations → re-run checks → repeat until all pass.
Task generation succeeds when ALL of the following are true:
Plan Item(s) and Infra/Support Justification[integration-path-test] task, skeleton before implementation[system-wiring] task(Substrate grounding, runnable verification, build-before-wire, and requirement applicability are enforced as hard gates in the Phase 5 table — criterion #2 covers them; not restated here.)
Tasks may ONLY be output when all success criteria are met.
Only proceed here after Phase 5 validation passes.
--beads flag is set:Use the beads skill to create issues. Follow these patterns:
Important: Use only task or epic types. Do NOT use bug or chore. Epics are purely organizational containers—if work needs to be done in an agent thread, it must be a task.
| Plan Context | Type | Priority |
|---|---|---|
| New feature from spec | task | P1-P2 (based on story priority) |
| Refactor/restructure | task | P2 |
| Bug fix from risks section | task | P1 |
| Infrastructure/setup | task | P1 |
| Documentation/polish | task | P3 |
| Parent grouping (3+ child tasks) | epic | P1 |
| Cleanup/tech debt | task | P3-P4 |
De-duplicate first:
br list --status open for existing related issuesbr search "<keywords>" to find potential overlapsbr list --title-contains "<phrase>" for exact matchesbr update <id> --description "..." instead of creating duplicateCreate epics in dependency order (if 3+ tasks):
br create "Epic: [Feature Name]" -p 1 --type epic --description "..."
# Returns EPIC-ID
If the plan has natural phases, milestones, or distinct workstreams, create sub-epics beneath the top-level epic and parent tasks to the most specific sub-epic. Use sub-epics only when each group contains multiple executable tasks or materially improves review/execution clarity:
br create "Epic: [Feature Name] - [Phase/Workstream]" -p 1 --type epic --parent EPIC-ID --description "..."
# Returns SUB-EPIC-ID
Create blocker epics/sub-epics before dependent epics/sub-epics. If multiple epics/sub-epics require ordering, add each epic dependency immediately after the dependent epic is created and both IDs are known; do not wait until all epics and tasks are created:
br dep add <blocked-epic> <blocker-epic>
Create tasks with --parent:
br create / br update --description MUST include the full Phase 4 task spec, preserving Source Documents, Plan Mapping (Plan Item(s) + Infra/Support Justification), Primary Files, Dependencies, Goal, Context, Scope, Changes, Acceptance Criteria, Verification, and Notes for Agent.br create "[T001] Task title" -p 2 --type task --parent SUB-EPIC-ID --description "..."
# Returns TASK-ID
Use the top-level EPIC-ID as the task parent only when no sub-epics were created.
Create tasks in dependency order within each parent epic/sub-epic. Immediately after each task is created, add any same-epic dependency whose blocker task already exists. If the blocker does not exist yet, create or reorder the blocker first rather than creating all tasks and bulk-adding dependencies at the end.
Add dependencies as IDs become available (file overlap, phase/workstream order, or logical order):
br dep add <blocked-task> <blocker-task>
br dep add <blocked-epic> <blocker-epic>
Important: Tasks must NEVER depend on their parent or ancestor epic, and task dependencies must NEVER cross epic/sub-epic boundaries. The --parent flag establishes hierarchy. Task dependencies establish executable ordering within one parent epic/sub-epic; epic dependencies establish ordering between epics/sub-epics. For file overlap, logical prerequisites, or phase/workstream boundary prerequisites that cross parent boundaries, add br dep add <blocked-epic> <blocker-epic> between the relevant epics/sub-epics instead of a cross-epic task edge. Do not add epic dependencies when workstreams can proceed independently.
Verify the task graph:
br ready
--linear flag is set:Use the available Linear integration (MCP tools, CLI, or API client configured in the environment) to create or update Linear issues. Do not create any Linear objects until Phase 5 validation passes and project/team resolution is complete.
Authenticate/tooling gate:
Resolve the project target:
--linear. If no value is supplied, or the next token is another flag, use the plan title as the desired Linear project name.Resolve the team:
--linear-team <key|id|name> when supplied.--linear-team is supplied for an existing project, verify that the team is compatible with the project before creating or updating issues. If it conflicts, abort rather than guessing.--linear-team is omitted.--linear-team if supplied. Otherwise, use the only available Linear team or an unambiguous workspace default if the tooling exposes one.Create the project only when needed:
--linear covers both reuse and confirmed creation.| Task Priority | Linear Priority |
|---|---|
| P0 | Urgent |
| P1 | High |
| P2 | Medium |
| P3 | Low |
| P4 | No priority |
De-duplicate within the target project first:
T### prefix, primary files, and source document anchors. Do not include the generated sequence number alone in this marker.[T###] in the title as display-only, not as identity.Create or update one Linear issue per generated task:
[T001] Task title.cerberus; include phase/story labels when the Linear workspace already uses compatible labels.Cerberus Sync block containing the plan path, task marker, generated task ID, and generated timestamp. Then include the full Phase 4 task spec, preserving Source Documents, Plan Mapping (Plan Item(s) + Infra/Support Justification), Primary Files, Dependencies, Goal, Context, Scope, Changes, Acceptance Criteria, Verification, and Notes for Agent.Keep a task-to-issue map:
T001 -> LIN-123
T002 -> LIN-124
Use this map for dependencies and the Phase 7 report.
Add Linear dependency relations as issue IDs become available:
T002 → T001, set the Linear relation so the T001 issue blocks the T002 issue.Verify the Linear project graph:
Generate TODO.md in the same directory as the plan.
Use templates/tasks-template.md if it exists; otherwise use the following fallback structure.
TODO.md format: Embed full task specs (from Phase 4) in collapsible <details> blocks under each checklist item, so agents have complete context without needing separate files.
Key sections to include:
- [ ] **T00X** [P] [USn] Outcome-focused description with Source Documents, Plan Mapping (Plan Item(s) + Infra/Support Justification), Dependencies, Goal, Context, Scope, Changes, Acceptance Criteria, Verification, and Completion Response guidance. The description should be a coder prompt summary, not a process script.Output summary:
## Tasks Generated
**Output**: [TODO.md path] or [Beads epic ID] or [Linear project URL/ID]
**Linear Issues**: Created X, updated Y (only for Linear output)
**Total Tasks**: N
**Phases**: X
**Parallelizable**: M tasks can run concurrently
### Phase Breakdown
- Setup: 2 tasks
- Foundation: 3 tasks
- US1 [P1]: 5 tasks
- Polish: 2 tasks
### Dependencies Added
- T003 → T005 (file overlap: src/auth/session.ts)
- T004 → T005 (logical: types needed first)
- Epic: US2 → Epic: Foundation (phase ordering)
### AC Coverage
- 5/5 acceptance criteria mapped to tasks
### Ready to Execute
Run `/implement` to begin execution, review TODO.md first, or start from the Linear project backlog.
Apply the malicious compliance test to all acceptance criteria:
Apply the coder-prompt test to each task description:
[TBD] markers: Warn user, either abort or create "Clarify gaps" task firstHandled by Phase 2 "Missing referenced artifact gate". Summary:
New: Create prerequisite "Author <artifact>" task; downstream tasks depend on it.New: Abort with "Missing referenced artifact: <path>".br command fails mid-run: Stop immediately, report what was created, don't leave half-created epic graph