Capstone: Multi-Agent Task
Time: 30-60 minutes | Skills: Plan Mode, Agent Tool, Subagents, Multi-File Projects
The Scenario
You have been asked to build a small but complete project from scratch: a CLI task manager that lets users add, list, complete, and delete tasks. The tasks should be stored in a JSON file.
Instead of jumping straight into coding, you will use the plan-then-implement workflow — designing the solution first with plan mode, reviewing the plan, and then letting Claude (with its agents) implement it.
Requirements
The CLI task manager should have these features:
- Add a task:
node tasks.js add "Buy groceries" - List all tasks:
node tasks.js list - Complete a task:
node tasks.js done 1(marks task #1 as complete) - Delete a task:
node tasks.js delete 1 - Tasks are stored in a
tasks.jsonfile - Each task has an id, description, status (pending/done), and creation date
The project should have at least these files:
tasks.js— the main CLI entry pointstorage.js— handles reading and writing the JSON filedisplay.js— formats output for the terminaltasks.json— the data file (auto-created on first use)
Step-by-Step Guide
Part 1: Set Up the Project
mkdir task-manager
cd task-manager
npm init -y
git init
Part 2: Plan with Plan Mode
- Start Claude Code:
claude
- Use plan mode to design the solution:
/plan Build a CLI task manager with these features:
- Add tasks: node tasks.js add "description"
- List tasks: node tasks.js list
- Complete tasks: node tasks.js done <id>
- Delete tasks: node tasks.js delete <id>
- Store tasks in tasks.json
- Each task has: id, description, status (pending/done), created date
The project should have separate files for: main CLI (tasks.js),
storage logic (storage.js), and display formatting (display.js).
-
Read through the plan carefully. Check for:
- Does each file have a clear responsibility?
- Is the data format for tasks.json reasonable?
- Are edge cases handled (empty task list, invalid ID, file does not exist yet)?
-
If anything is missing, ask Claude to adjust:
What happens if the user tries to complete a task that does not exist?
Add error handling for invalid IDs to the plan.
Part 3: Approve and Implement
- Once the plan looks good, tell Claude to implement it:
The plan looks good. Please implement it. Create all the files.
- Claude will create the files — it may use subagents to work on different files in parallel. Watch the process and notice:
- How Claude breaks the work into parts
- How it creates files in a logical order (storage before the main CLI)
- How it handles the JSON file creation
Part 4: Test the Implementation
Test each feature of the task manager:
# Add some tasks
node tasks.js add "Buy groceries"
node tasks.js add "Walk the dog"
node tasks.js add "Write documentation"
# List all tasks
node tasks.js list
# Complete a task
node tasks.js done 1
# List again to see the status change
node tasks.js list
# Delete a task
node tasks.js delete 2
# Final list
node tasks.js list
If any command fails or produces unexpected output, tell Claude what happened. For example: "When I run node tasks.js done 99 it crashes instead of showing an error message." Claude will fix the issue.
Part 5: Use Agents for Enhancements
Now ask Claude to enhance the project using a multi-part request that may trigger subagent usage:
Please make these three improvements to the task manager:
1. Add a "search" command that filters tasks by keyword
2. Add colored output (green for done, yellow for pending)
3. Add a "stats" command that shows total, pending, and completed counts
This is a multi-part task that touches multiple files. Claude may use subagents to handle each improvement independently.
Part 6: Review with Plan Mode
Before committing, use plan mode to verify everything is solid:
/plan Review the current state of the task manager project.
Are there any issues, missing error handling, or improvements
that should be made before we consider this done?
Review Claude's analysis and address any issues it finds.
Part 7: Commit the Result
When you are satisfied with the implementation:
/commit
Self-Assessment
- Used plan mode to explore and design the solution before writing any code
- Reviewed the plan and asked for adjustments where needed
- Approved the plan and let Claude implement it
- Tested all four core features (add, list, done, delete)
- Asked Claude for multi-part enhancements (triggering agent/subagent usage)
- Used plan mode again to review the final result
- Committed the working project with a descriptive message
How was this lesson? Take 2 minutes to share your feedback — it helps us make the tutorials better for everyone.