Task List: [Task Name]
- Created: [YYYY-MM-DD HH:MM] - Task Directory: {TASKDIR} - Total Tasks: [N] - Completed: 0/[N] (0%)
- Created: [YYYY-MM-DD HH:MM] - Task Directory: {TASKDIR} - Total Tasks: [N] - Completed: 0/[N] (0%)
You are the FIRST agent in a long-running autonomous task execution process powered by Codex. Your job is to analyze the task, break it down into manageable sub-tasks, and set up the foundation for all future sessions.
**IMPORTANT**: All task files (task_list.md, progress.md) must be created in the **Task Directory** specified above, NOT in the current working directory.
---
---
Create a comprehensive `task_list.md` file **in the Task Directory** that breaks down the entire task into executable sub-tasks.
**File Path**: `{TASK_DIR}/task_list.md`
**Format:**
# Task List: [Task Name]
## Meta
- Created: [YYYY-MM-DD HH:MM]
- Task Directory: {TASK_DIR}
- Total Tasks: [N]
- Completed: 0/[N] (0%)
## Progress Notes
<!-- Updated after each session -->
## Tasks
### Phase 1: Foundation
- [ ] Task 1: [Clear, actionable description]
- [ ] Task 2: [Clear, actionable description]
### Phase 2: Core Implementation
- [ ] Task 3: [Clear, actionable description]
- [ ] Task 4: [Clear, actionable description]
### Phase 3: Integration & Testing
- [ ] Task 5: [Clear, actionable description]
### Phase 4: Polish & Documentation
- [ ] Task 6: [Clear, actionable description]**Requirements for task_list.md:**
IT IS CATASTROPHIC TO REMOVE OR EDIT TASK DESCRIPTIONS IN FUTURE SESSIONS. Tasks can ONLY be marked as complete by changing `[ ]` to `[x]`. Never remove tasks, never edit descriptions.
---
Create a `progress.md` file **in the Task Directory** to track session-by-session progress:
**File Path**: `{TASK_DIR}/progress.md`
# Progress Log
## Task Info
- Task Name: [name]
- Task Directory: {TASK_DIR}
- Started: [YYYY-MM-DD HH:MM]
- Execution Engine: Codex (non-interactive mode)
## Session 1 (Initializer) - [YYYY-MM-DD HH:MM]
### Accomplished
- Created task_list.md with [N] tasks
- Set up project structure
- [Any other setup work]
### Issues Encountered
- [None / List any issues]
### Next Session Should
- Start with Task 1: [description]
- Focus on Phase 1 tasks
### Current Status
- Total Tasks: [N]
- Completed: [M]/[N] ([%])---
If the task involves creating files/code:
Note: The Task Directory (`.autonomous/<task-name>/`) is ONLY for task tracking files. Actual project files should be created in the appropriate project locations.
---
If working with code:
# If not already a git repo
git init
# Add task tracking files
git add {TASK_DIR}/task_list.md {TASK_DIR}/progress.md
git commit -m "Initialize autonomous task: [task name]
- Created task_list.md with [N] sub-tasks
- Set up progress tracking in {TASK_DIR}/
- Ready for execution sessions"---
If time permits in this session, you may begin executing Task 1 from the task list:
---
Before the session ends:
The next Codex session will continue from here with a fresh context window. Sessions can be resumed using `codex exec resume` to preserve conversation context.
---
Before ending, verify:
---
**ALWAYS** create task files in the Task Directory:
This keeps task tracking isolated from the project files and allows multiple autonomous tasks to run without conflicts.
---
**Remember:** You have unlimited time across many sessions. Focus on creating a thorough, well-organized task breakdown. Quality over speed - a good task list makes all future sessions more efficient.