This example demonstrates a complete Track CLI workflow from project initialization to completion, building a simple todo list application.
You're building a todo list web app with a single feature (task management) and three tasks:
- Create the UI component
- Add state management
- Implement persistence
cd ~/projects/todo-app
track init "Todo List App"Output:
✓ Project initialized: Todo List App (a1b2c3d4)
Database: /Users/you/projects/todo-app/.track/track.db
What happened:
- Created
.track/directory - Created SQLite database
- Created root track with ID
a1b2c3d4
track statusOutput:
Todo List App (a1b2c3d4) [planned]
The project starts with just the root track.
track new "Task Management" \
--summary "Core feature: users can add, complete, and delete tasks" \
--next "Start with the UI component - task list and input form"Output:
✓ Track created: Task Management (e5f6g7h8)
Parent: a1b2c3d4 (Todo List App)
Status: planned
Files: 0
track statusOutput:
Todo List App (a1b2c3d4) [planned]
└── Task Management (e5f6g7h8) [planned]
Notice the hierarchy: feature under project.
track new "TodoList UI Component" \
--parent e5f6g7h8 \
--summary "Need component to display tasks and input form" \
--next "Create TodoList.tsx with task list and input field" \
--file src/components/TodoList.tsxOutput:
✓ Track created: TodoList UI Component (i9j0k1l2)
Parent: e5f6g7h8 (Task Management)
Status: planned
Files: 1
track update i9j0k1l2 \
--summary "Starting work on TodoList component" \
--next "Create component structure with task list and input" \
--status in_progressOutput:
✓ Track updated: i9j0k1l2
Status: in_progress
Files: 1
track statusOutput:
Todo List App (a1b2c3d4) [planned]
└── Task Management (e5f6g7h8) [planned]
└── TodoList UI Component (i9j0k1l2) [in_progress]
Files: src/components/TodoList.tsx
The tree shows your current work: TodoList UI Component is in progress.
track update i9j0k1l2 \
--summary "Created TodoList component with basic structure. Renders task list and has input form. Using map() for tasks. Input has onChange handler. No actual functionality yet - just UI skeleton." \
--next "Add props interface: tasks array and onAddTask callback. Wire up input to call onAddTask on submit." \
--status in_progressOutput:
✓ Track updated: i9j0k1l2
Status: in_progress
Files: 1
track update i9j0k1l2 \
--summary "TodoList component complete. Props: tasks (Task[]), onAddTask (fn), onToggle (fn), onDelete (fn). Renders task list with checkboxes and delete buttons. Input form with controlled component pattern. Form submit calls onAddTask. All interactions working. Responsive CSS added." \
--next "None - component complete and ready for integration" \
--status done \
--file src/components/TodoList.cssOutput:
✓ Track updated: i9j0k1l2
Status: done
Files: 2
track new "Add State Management" \
--parent e5f6g7h8 \
--summary "Need to manage task state (add, toggle, delete)" \
--next "Create useTodos hook with useState and handlers" \
--file src/hooks/useTodos.tsOutput:
✓ Track created: Add State Management (m3n4o5p6)
Parent: e5f6g7h8 (Task Management)
Status: planned
Files: 1
track statusOutput:
Todo List App (a1b2c3d4) [planned]
└── Task Management (e5f6g7h8) [planned]
├── TodoList UI Component (i9j0k1l2) [done]
│ Files: src/components/TodoList.tsx, src/components/TodoList.css
└── Add State Management (m3n4o5p6) [planned]
Files: src/hooks/useTodos.ts
First task is done, second task is planned.
track update m3n4o5p6 \
--summary "Created useTodos hook with useState<Task[]>. Implemented handlers: addTask (generates ID, appends), toggleTask (finds by ID, flips completed), deleteTask (filters out by ID). All handlers working correctly." \
--next "None - hook complete" \
--status doneOutput:
✓ Track updated: m3n4o5p6
Status: done
Files: 1
track new "Add LocalStorage Persistence" \
--parent e5f6g7h8 \
--summary "Tasks should persist across page refreshes" \
--next "Add localStorage.setItem on task changes, getItem on mount"Output:
✓ Track created: Add LocalStorage Persistence (q7r8s9t0)
Parent: e5f6g7h8 (Task Management)
Status: planned
Files: 0
track update q7r8s9t0 \
--status in_progress \
--summary "Working on localStorage integration" \
--next "Add useEffect to save tasks on change, load on mount" \
--file src/hooks/useTodos.tsOutput:
✓ Track updated: q7r8s9t0
Status: in_progress
Files: 1
track update q7r8s9t0 \
--summary "Added localStorage persistence to useTodos hook. useEffect saves tasks to 'todos' key on any change. Initial state loads from localStorage with fallback to empty array. Tested: tasks persist across page refresh. Works correctly." \
--next "None - persistence complete" \
--status doneOutput:
✓ Track updated: q7r8s9t0
Status: done
Files: 1
Now that all tasks are done, mark the feature as complete:
track update e5f6g7h8 \
--summary "Task management feature complete. UI component (TodoList.tsx), state management (useTodos hook), and localStorage persistence all implemented and tested. Users can add, complete, and delete tasks. Data persists across sessions." \
--next "None - feature ready for testing and code review" \
--status doneOutput:
✓ Track updated: e5f6g7h8
Status: done
Files: 0
track statusOutput:
Todo List App (a1b2c3d4) [planned]
└── Task Management (e5f6g7h8) [done]
├── TodoList UI Component (i9j0k1l2) [done]
│ Files: src/components/TodoList.tsx, src/components/TodoList.css
├── Add State Management (m3n4o5p6) [done]
│ Files: src/hooks/useTodos.ts
└── Add LocalStorage Persistence (q7r8s9t0) [done]
Files: src/hooks/useTodos.ts
All tasks and the feature are marked done.
track status --jsonOutput (truncated for readability):
{
"tracks": [
{
"id": "a1b2c3d4",
"title": "Todo List App",
"parent_id": null,
"summary": "",
"next_prompt": "",
"status": "planned",
"kind": "super",
"files": []
},
{
"id": "e5f6g7h8",
"title": "Task Management",
"parent_id": "a1b2c3d4",
"summary": "Task management feature complete. UI component...",
"next_prompt": "None - feature ready for testing and code review",
"status": "done",
"kind": "feature",
"files": []
},
{
"id": "i9j0k1l2",
"title": "TodoList UI Component",
"parent_id": "e5f6g7h8",
"summary": "TodoList component complete. Props: tasks...",
"next_prompt": "None - component complete and ready for integration",
"status": "done",
"kind": "task",
"files": [
"src/components/TodoList.tsx",
"src/components/TodoList.css"
]
}
]
}-
Validate the walkthrough left three tasks and nothing planned:
track status --json | jq '{tasks: [.tracks[] | select(.kind=="task")] | length, planned: [.tracks[] | select(.status=="planned")] | length}'
Expected after finishing:
tasks: 3,planned: 0. -
Surface the active next step (first non-done with a breadcrumb):
track status --json | jq -r '[.tracks[] | select(.status!="done" and .next_prompt|length>0)][0].next_prompt'
Project (super)
└── Feature (feature)
├── Task 1 (task)
├── Task 2 (task)
└── Task 3 (task)
- Super: Root project (
a1b2c3d4) - Feature: Has children (
e5f6g7h8) - Tasks: Leaf nodes (
i9j0k1l2,m3n4o5p6,q7r8s9t0)
- planned → Created but not started
- in_progress → Currently working on
- done → Completed
Summaries became more detailed as work progressed:
- Start: "Starting work on TodoList component"
- Mid: "Created TodoList component with basic structure..."
- End: "TodoList component complete. Props: tasks..."
Each update adds more context, building a complete picture.
Files were associated as created:
TodoList.tsx- Added during task creationTodoList.css- Added when completeduseTodos.ts- Added during state management task
The final status shows which files belong to which tracks.
- Initialize project -
track init - Create feature -
track new(defaults to root parent) - Break into tasks -
track newwith--parent - Work sequentially - Start task → Update → Complete → Next task
- Update feature - Mark feature done when all tasks complete
track status --json | jq '.tracks[] | select(.status == "in_progress")'track status --json | jq '[.tracks | group_by(.status)[] | {status: .[0].status, count: length}]'track status --json | jq -r '.tracks[].files[]' | sort | uniqOutput:
src/components/TodoList.css
src/components/TodoList.tsx
src/hooks/useTodos.ts
track status --json | jq -r '.tracks[] | select(.kind == "task") | .title'Output:
TodoList UI Component
Add State Management
Add LocalStorage Persistence
- See AI Agent Usage Example for AI session patterns
- See Complex Project Example for multi-feature projects
- Read Usage Guide for detailed workflows