Loading...
Loading...
Writing Plans decomposes any implementation task into a sequence of atomic steps, each completable in 2-5 minutes, with exact file paths, complete code blocks, and verification commands.
npx skill4agent add itallstartedwithaidea/agent-skills writing-planssrc/api/routes/users.tsGET /users/:id/preferencesUserPreferencesthemelocalenotificationspreferencesSchemasrc/api/schemas.tsgraph TD
A[Task Description] --> B[Identify Affected Files]
B --> C[Determine Change Order]
C --> D[Write Step 1: File + Code + Verify]
D --> E[Write Step 2: File + Code + Verify]
E --> F[Write Step N: File + Code + Verify]
F --> G[Add Rollback Instructions]
G --> H[Estimate Total Duration]
H --> I[Present Plan for Approval]
I -->|Approved| J[Save as plan.md]
I -->|Needs Revision| B# Plan: Add User Preferences API
**Estimated Duration**: 15 minutes (5 steps × 3 min avg)
**Affected Files**: 4 files modified, 1 file created
## Step 1: Define Schema (2 min)
**File**: `src/api/schemas.ts`
**Action**: Add after line 23
export const preferencesSchema = z.object({
theme: z.enum(["light", "dark", "system"]).default("system"),
locale: z.string().regex(/^[a-z]{2}-[A-Z]{2}$/).default("en-US"),
notifications: z.boolean().default(true),
});
export type UserPreferences = z.infer<typeof preferencesSchema>;
**Verify**: `npx tsc --noEmit` exits 0
## Step 2: Add Database Migration (3 min)
**File**: `src/db/migrations/004_user_preferences.sql` (CREATE)
CREATE TABLE user_preferences (
user_id TEXT PRIMARY KEY REFERENCES users(id),
theme TEXT NOT NULL DEFAULT 'system',
locale TEXT NOT NULL DEFAULT 'en-US',
notifications BOOLEAN NOT NULL DEFAULT true
);
**Verify**: `npx wrangler d1 migrations apply buddy-brain --local`
## Step 3: Add Route Handler (3 min)
**File**: `src/api/routes/users.ts`
**Action**: Add after the existing GET /users/:id handler
// ... [complete handler code here]
**Verify**: `curl localhost:8787/users/test-id/preferences` returns 200| Platform | Support | Notes |
|---|---|---|
| Cursor | Full | Plans saved as workspace files |
| VS Code | Full | Markdown plan files |
| Windsurf | Full | Plan-and-execute workflow |
| Claude Code | Full | TodoWrite + plan files |
| Cline | Full | Task-based planning |
| aider | Full | Commit-per-step execution |
planningtask-decompositionstep-by-stepimplementation-planfile-pathsverification-stepsatomic-stepshandoff-ready