taskmaster
Original:🇺🇸 English
Translated
Unified task execution protocol for Codex-only work. Supports Single Task, Epic Task, and Batch Task while preserving CSV truth-source, validation gates, context recovery, and Debug-First failure exposure. WHEN TO USE: user asks to "track tasks", "create todo list", "make a plan", "track progress", "long task", "big project", "build from scratch", "autonomous session", "跟踪任务", "自主执行", "长时任务", "从零开始", "任务管理", "做个计划", "大工程", or when a task clearly requires 3+ ordered steps that produce file changes. DO NOT USE: single-step fixes, pure Q&A, code review, explaining code, search/research tasks, tasks with fewer than 3 steps, or tasks that do not produce file changes.
4installs
Sourcehjdyzy/aicoding-cookbook
Added on
NPX Install
npx skill4agent add hjdyzy/aicoding-cookbook taskmasterTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Taskmaster — v5 Task Protocol
Purpose
Taskmaster is the default execution protocol for multi-step Codex work. v5
keeps the existing Debug-First core while expanding the skill into three task
shapes:
- Single Task — one deliverable, one shared context
- Epic Task — multiple child tasks with dependencies
- Batch Task — homogeneous row-level work executed through
spawn_agents_on_csv
Core Principles
- The current truth artifact on disk wins over memory.
- No step, subtask, or batch row becomes without explicit validation.
DONE - Keep verbose reasoning in ,
PROGRESS.md, or batch output files, not in the chat.EPIC.md - Keep failures visible. Do not silently downgrade to manual or serial execution.
- Keep planning CSVs and batch worker CSVs separate.
- Build for Codex-only recovery: a cold restart must be resumable from files alone.
Shape Router
| Shape | Use when | Truth artifacts | Example |
|---|---|---|---|
| Single Task | One deliverable with shared context | | Fix one OAuth redirect bug |
| Epic Task | Multiple deliverables, modules, or dependency chains | | Ship billing dashboard across API, UI, docs |
| Batch Task | Same instruction template across independent rows | | Audit 80 Markdown files for frontmatter |
Router Rules
- Start with Single Task when the user wants one deliverable and progress can stay in one shared context.
- Promote to Epic Task when one starts carrying phases, subprojects, or independent deliverables.
TODO.csv - Use Batch Task only when rows are independent, share one instruction template, and success can be expressed in structured output fields.
- An Epic Task can contain ,
single-compact, orsingle-fullchild tasks.batch - A Batch Task must not be used for heterogeneous roles, cross-row dependencies, or shared write scopes.
Single Task
Single Task preserves backward compatibility with the old LITE/FULL behavior by
supporting two execution profiles.
Compact Single
Use Compact Single when the task is short, linear, and does not need recovery
logs or cached research artifacts.
- Files: project-root only
TODO.csv - Template: compact_todo_template.csv
- Status set:
TODO | IN_PROGRESS | DONE - Best for: short documentation edits, tiny cleanup passes, quick rename tasks
Compact Single example:
csv
id,task,status,completed_at,notes
1,Locate root cause,IN_PROGRESS,,
2,Implement fix,TODO,,
3,Run verification,TODO,,Full Single
Use Full Single for all code changes, long-running tasks, or any work that must
survive a context reset. This is the default single-task path.
- Files: ,
.codex-tasks/<task-name>/SPEC.md,TODO.csv,PROGRESS.mdraw/ - Templates:
- SPEC_TEMPLATE.md
- PROGRESS_TEMPLATE.md
- todo_template.csv
- perf_todo_template.csv
- Status set:
TODO | IN_PROGRESS | DONE | FAILED - Best for: code implementation, bug fixes, refactors, multi-hour work
Full Single directory example:
text
.codex-tasks/20260313-auth-fix/
├── SPEC.md
├── TODO.csv
├── PROGRESS.md
└── raw/Single Task Rules
- Re-read the active before every new step.
TODO.csv - Keep leaf-level only. Do not store phases, child projects, or batch rows there.
TODO.csv - Use only when validation cannot be automated, and record why.
echo SKIP - If retries hit 5, change strategy explicitly or promote the task shape.
Epic Task
Epic Task is the parent coordination shape for large work that spans multiple
deliverables or dependency chains.
- Files:
.codex-tasks/<epic-name>/EPIC.md.codex-tasks/<epic-name>/SUBTASKS.csv.codex-tasks/<epic-name>/PROGRESS.md.codex-tasks/<epic-name>/tasks/<child-task>/...
- Templates:
- EPIC_TEMPLATE.md
- subtasks_template.csv
- Status set:
TODO | IN_PROGRESS | DONE | FAILED - Best for: multi-module features, staged refactors, long projects with clear child deliverables
Epic directory example:
text
.codex-tasks/20260313-billing-epic/
├── EPIC.md
├── SUBTASKS.csv
├── PROGRESS.md
└── tasks/
├── 20260313-api/
├── 20260313-frontend/
└── 20260313-docs/Epic workflow:
- Define the global goal and delivery boundary in .
EPIC.md - Register child tasks in with
SUBTASKS.csv, dependencies, andtask_type.task_dir- : use
depends_onto list multiple dependency IDs (e.g.,;). Empty means no dependency.1;2
- Execute each child task with its own Single or Batch protocol.
- Bubble child validation back to and parent
SUBTASKS.csv.PROGRESS.md - Close the Epic only when all child rows are and the final validation passes.
DONE
Use Epic instead of a single when one task file starts reading like
project management instead of execution.
TODO.csvBatch Task
Batch Task is for homogeneous row-level work that should be executed through
. It can be a standalone task or a child inside an Epic.
spawn_agents_on_csv- Files:
.codex-tasks/<task-name>/SPEC.md- for 3-5 high-level steps
.codex-tasks/<task-name>/TODO.csv .codex-tasks/<task-name>/PROGRESS.md.codex-tasks/<task-name>/batch/BATCH.md.codex-tasks/<task-name>/batch/workers-input.csv.codex-tasks/<task-name>/batch/workers-output.csv.codex-tasks/<task-name>/raw/
- Templates:
- BATCH_TEMPLATE.md
- workers_input_template.csv
- workers_output_template.csv
- Best for: bulk file audits, bulk metadata updates, structured per-row analysis
Batch directory example:
text
.codex-tasks/20260313-doc-audit/
├── SPEC.md
├── TODO.csv
├── PROGRESS.md
├── batch/
│ ├── BATCH.md
│ ├── workers-input.csv
│ └── workers-output.csv
└── raw/Batch Eligibility Checklist
Only use Batch Task when all of the following are true:
- One instruction template can describe every row.
- Rows are independent and can be retried independently.
- Output can be expressed as structured fields in .
output_schema - Writes are disjoint, or the batch is read-only.
Batch Lifecycle
- Identify a parent step that is truly row-level and homogeneous.
TODO.csv - Create and define:
batch/BATCH.md- instruction template
id_columnoutput_schemamax_workersmax_runtime_secondsoutput_csv_path
- Build from real artifacts, not from plan steps.
workers-input.csv - Run with explicit
spawn_agents_on_csv,id_column,output_schema,max_workers, andmax_runtime_seconds.output_csv_path - Inspect . Failed rows remain visible and may be retried with a filtered input CSV.
workers-output.csv - Merge the aggregate result into parent and only then mark the parent step
PROGRESS.md.DONE
Example Batch step sequence:
csv
id,task,status,acceptance_criteria,validation_command,completed_at,retry_count,notes
1,Build workers-input.csv,IN_PROGRESS,batch/workers-input.csv exists,test -f batch/workers-input.csv,,0,
2,Run spawn_agents_on_csv,TODO,batch/workers-output.csv exists,test -f batch/workers-output.csv,,0,
3,Merge row results,TODO,Failed rows are handled and summary is written,test -f PROGRESS.md,,0,Mixed Shapes
- A Single Task can promote to Epic when one execution stream stops being coherent.
- A Single or Epic child step can delegate homogeneous work to Batch.
- Use the current layer's truth file only:
- for step planning
TODO.csv - for child-task state
SUBTASKS.csv - for row results
workers-output.csv
Mid-Task Shape Promotion
When complexity outgrows the current shape, promote in-place:
Single → Epic
- Create from the existing
.codex-tasks/<task-name>/EPIC.mdgoal.SPEC.md - Convert remaining rows into child task entries in
TODO.csv.SUBTASKS.csv - Move the original ,
SPEC.md,TODO.csvintoPROGRESS.mdas the first child.tasks/<original-task>/ - Create new child directories for the additional deliverables.
- Log the promotion reason in the parent .
PROGRESS.md
Single/Epic Step → Batch
- Identify the or
TODO.csvrow that is actually N homogeneous items.SUBTASKS.csv - Replace it with a 3-step Batch sequence: build input → run workers → merge results.
- Create directory with
batch/andBATCH.md.workers-input.csv - The parent step stays until the batch merge completes.
IN_PROGRESS - Log the delegation in .
PROGRESS.md
Validation Rules
- Re-read the active truth file before every new step.
- No parent task can claim success while a child subtask or batch row still fails its merge criteria.
- Keep retry counts explicit.
- Keep raw fetched material under for Full, Epic, and Batch shapes.
raw/ - If the work is heterogeneous, use a dedicated multi-agent flow instead of forcing it into Batch.
Context Recovery Protocol
Use the smallest artifact set that fully restores state:
- Compact Single: read , resume from the first non-
TODO.csvrow.DONE - Full Single: read ,
SPEC.md, then theTODO.csvrecovery block.PROGRESS.md - Epic Task: read ,
EPIC.md, parentSUBTASKS.csv, then the current child task directory.PROGRESS.md - Batch Task: read ,
SPEC.md,TODO.csv,batch/BATCH.md, then thebatch/workers-output.csvrecovery block.PROGRESS.md
Every recovery message must include:
- goal
任务: 形态:single-compact | single-full | epic | batch- X/Y
进度: - current step, child task, or failed row set
当前: - active truth artifact path
文件: - exact next action
下一步:
Output Contract
Every status update must include:
- one-line goal
任务: - current task shape
形态: - X/Y steps or rows complete
进度: - active step, child task, or batch stage
当前: - latest validation command and result
验证: - active task directory or truth artifact
文件:
References
- SPEC_TEMPLATE.md
- PROGRESS_TEMPLATE.md
- todo_template.csv
- perf_todo_template.csv
- compact_todo_template.csv
- EPIC_TEMPLATE.md
- BATCH_TEMPLATE.md
- subtasks_template.csv
- workers_input_template.csv
- workers_output_template.csv
- EXAMPLES.md