Task Harness — Structured Task Management System
Decompose any requirements into structured task lists and establish a reliable task tracking system for long-running Agents.
When to Use
- Large requirements need to be broken down into multiple subtasks
- Projects require continuous development across multiple Agent sessions
- Need to track feature completion progress (Completed / Incomplete)
- Users say "task decomposition", "task management", "project planning", "create task list"
Core Process
Step 1: Analyze Codebase
Explore the project structure to understand:
- Tech stack (languages, frameworks, build tools)
- Directory structure and architectural patterns
- Existing configurations (package.json, go.mod, etc.)
- Key entry files
Step 2: Design Task List
Based on user requirements, break down work into specific features. Each feature requires:
- A unique (e.g., , )
- classification (foundation, layout, components, etc.)
- (smaller numbers mean higher priority)
- a one-sentence description
- main involved file path (can be null)
- array of specific operation steps (one string per step)
- boolean value (initially false)
- verification conditions
Step 3: Generate 4 Harness Files
Generate the following files in the project root directory:
— Task List (Single Source of Truth)
json
{
"project": "Project Name",
"description": "Project Description",
"features": [
{
"id": "feat-01",
"category": "foundation",
"priority": 1,
"description": "One-sentence description of what to do",
"file": "path/to/main/file.js",
"steps": [
"Specific Step 1",
"Specific Step 2"
],
"passes": false,
"verification": "How to verify this feature is completed"
}
]
}
Complete template can be found at references/templates/feature_list.json
Why JSON instead of Markdown? Models tend to freely rewrite Markdown files (rephrasing, restructuring, deleting content). JSON files are treated more carefully by models — they're more likely to only modify specific fields. This is critical for maintaining task integrity.
— Narrative Progress Log
Record detailed work content of each session for subsequent sessions to understand context.
Complete template can be found at references/templates/progress.txt
— Environment Initialization Script
Run at the start of each new session to restore full context within 5 seconds.
Complete template can be found at references/templates/init.sh
— Project Overview
Record project-level information such as milestones, rules, file lists, etc.
Complete template can be found at references/templates/task.json
Step 4: Configure AGENTS.md Rules
Add a Task Management System section to the project's
file to ensure all Agent sessions follow the workflow. Refer to the corresponding section in the current project's
.
Step 5: Initial Verification
- The script can execute normally
- feature_list.json is parsed correctly
- Progress statistics are displayed accurately
Step 6: Output Next Steps Guidance
Tell the user:
- List of created files
- How to start the first task
- How to resume work in a new session
Agent Workflow (Per Session)
1. bash init.sh ← 5-second context restoration
2. Read progress.txt ← Understand what was done before and why
3. Read feature_list.json ← Find the highest priority incomplete feature
4. Pick 1~2 features ← Don't bite off more than you can chew; incremental progress is key
5. Execute the feature's steps ← Follow steps strictly
6. Verify ← Must actually verify, don't assume
7. Update feature_list.json ← Only change passes: false → true
8. git commit ← One commit per feature
9. git push ← Sync to remote
10. Append progress.txt ← Record work done in this session
Strict Rules
- Only modify the field: In feature_list.json, only change from to . Never delete features, edit descriptions, modify priorities, or restructure the JSON.
- One feature at a time: Unless the feature is very small (e.g., changing a constant), only work on one feature per session.
- Must commit + push: After completing each feature, must git commit and push to ensure progress is never lost and can be rolled back independently.
- Must verify before marking as completed: Read code, run dev server, or check output. Don't trust assumptions.
- Must update progress.txt: Update the progress log at the end of the session so the next session has complete context.
- Stop when blocked: Record the reason for blocking in progress.txt and stop. Don't silently bypass issues.
Relationships Between Files
init.sh ──reads──→ feature_list.json (Task Status)
│
└──prompts──→ progress.txt (Historical Context)
task.json ────→ Project Overview (Milestones, Rules, File Lists)
AGENTS.md ────→ Agent Behavior Specifications (References harness rules)
References
- Methodology Details — Why use harnesses, common issues, best practices
- Template Files — Blank templates for all harness files