Manuals / AI Coding with Cursor / Chapter 2
A · Task Design · beginner · ~35 min · Chapter 2 of 11
Writing agent task briefs
Agents fail on vague tasks. A good brief: goal, scope (files/paths), constraints, acceptance criteria, and what NOT to touch.
Path progress14%
Step 1 of 2
Brief template
Goal / Files / Constraints / Acceptance / Do-not-touch.
Example
## Goal
Add client-side email validation to LoginForm.jsx
## Files
- src/components/LoginForm.jsx
- src/components/LoginForm.test.jsx (create if missing)
## Constraints
- Use existing form library (react-hook-form)
- Show inline error below field
- No new dependencies
## Acceptance
- Invalid email shows "Enter a valid email"
- Valid email clears error
- Test covers both cases
## Do NOT touch
- Auth logic in src/api/auth.js
- RoutingDo this now
Write a brief for "add input validation to the login form." Run it.
Was this step clear?
Chapter learning outcomes
- Task briefs
- Scope control
- Acceptance criteria
Clear these before you leave
Side quest
Bug fix brief
Write a brief for a real bug. Execute. Review diff before accepting.