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 progress
14%

Step 1 of 2

Brief template

Goal / Files / Constraints / Acceptance / Do-not-touch.

Brief templateDrag stickies · tap for tips
Study mapDrag stickies · tap for tipsKeep it shortdrag · tap →Name the waitdrag · tap →Scope locatorsdrag · tap →Trace when stuckdrag · tap →One browser firstdrag · tap →Isolate statedrag · tap →Assert the UIdrag · tap →Retry wiselydrag · tap →Seed datadrag · tap →Close the loopdrag · tap →Keep it shortdrag · tap →Name the waitdrag · tap →Scope locatorsdrag · tap →Trace when stuckdrag · tap →One browser firstdrag · tap →Isolate statedrag · tap →Pathwise hackdrag · tap →Brief templatedrag · tap →Try thisdrag · tap →Follow the dashed drag · tap →

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
- Routing

Do 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.