Anatomy of a task
| Part | Example |
|---|---|
| Goal | "Add a date filter for orders" |
| Context | "The list is in @src/pages/Orders.vue, the API in @src/api/orders.ts" |
| Constraints | "No new dependencies, use our DatePicker" |
| Verification | "Add a test and run npm test" |
| Done when | "The filter is kept in the URL and tests pass" |
Plan mode
For multi-file tasks turn on plan mode (Shift+Tab). The agent explores the code and proposes a plan without changing anything. You edit the plan, and only then the agent writes code. Fixing a plan is cheaper than rewriting an implementation.
Plan first, no code changes: how do we add multilingual support to catalogue pages? Which files change, what are the risks?
File references and errors
@path/to/fileadds a file to context right away.- Paste the full error text or stack trace, not "something doesn’t work".
- You can paste a UI screenshot right into the terminal: the agent will see it.
Split big tasks
"Rebuild authentication" is five tasks: models, migrations, API, UI, tests. Give them one by one in a session, or with /clear between independent parts. Review git diff after each part.
When the agent goes the wrong way
- Press Esc to stop it and clarify the task.
- Say directly what’s wrong: "don’t change the DB schema, add a field to the DTO".
- If the session is tangled, start over with
/clearand a better task. Often faster than fixing.
Task template
Goal: … Context: @file1 @file2, currently it works like … Constraints: … Verify: run …, add a test for … Done when: …
Today's task
Take a medium-sized backlog task. Ask for a plan in plan mode, edit it, then let the agent implement it with tests.