Persistent Planning
You are managing a complex task that requires structured planning and progress tracking. Use the filesystem as persistent memory — write plans, track progress, and maintain context so work survives across sessions.
Core Principle
The filesystem is your memory. Write everything down. If it's not in a file, it doesn't exist between sessions.
File Structure
Create a .plan/ directory in the project root (or use an existing planning directory):
.plan/
├── plan.md # The master plan — goals, phases, current status
├── progress.md # Running log of completed work with timestamps
└── context.md # Key decisions, constraints, and discoveries
1. plan.md — The Master Plan
Create this file at the start of any multi-step task.
# Plan: [Task Title]
## Goal
[One sentence: what does "done" look like?]
## Constraints
- [Timeline, tech stack, dependencies, blockers]
## Phases
### Phase 1: [Name]
- [ ] Step 1.1 — [specific, actionable task]
- [ ] Step 1.2 — [specific, actionable task]
- [x] Step 1.3 — [completed task]
### Phase 2: [Name]
- [ ] Step 2.1 — [specific, actionable task]
## Current Focus
> Phase 1, Step 1.2 — [brief description of what's actively being worked on]
## Open Questions
- [Anything that needs user input or research]
Rules for plan.md
- Every step must be specific and actionable — "refactor auth" is bad, "extract login form into
LoginFormcomponent" is good - Update
Current Focusevery time you start a new step - Check off steps (
[x]) immediately when completed - Keep phases to 3-7 steps each — split larger phases
- Never delete completed steps — they serve as documentation
2. progress.md — The Work Log
Append to this file after completing each significant step.
# Progress Log
## [Date or Session Identifier]
### Completed
- ✅ Extracted `LoginForm` component from `pages/auth.tsx`
- Created `components/LoginForm.tsx` (47 lines)
- Updated imports in `pages/auth.tsx`
- Added unit test `LoginForm.test.tsx`
### Files Changed
- `components/LoginForm.tsx` — CREATED
- `pages/auth.tsx` — modified (removed inline form)
- `components/LoginForm.test.tsx` — CREATED
### Decisions Made
- Used controlled form pattern instead of `useRef` for inputs
- Reason: consistent with existing form patterns in the codebase
### Blockers / Notes
- Need to confirm email validation regex with the user
Rules for progress.md
- Always list files changed with what happened (CREATED, modified, deleted)
- Record decisions made with reasoning — future you needs this
- Append new entries at the top (newest first)
- Keep entries concise but specific enough to resume from
3. context.md — Persistent Context
Store discoveries, constraints, and decisions that affect the entire task.
# Context
## Project Facts
- Framework: Next.js 14 with App Router
- Database: PostgreSQL via Drizzle ORM
- Auth: NextAuth.js v5
- Deployment: Vercel
## Key Decisions
| Decision | Rationale | Date |
| -------- | --------- | ---- |
| Use server actions over API routes | Reduces boilerplate, team prefers colocation | 2025-01-15 |
## Patterns Discovered
- All forms use controlled inputs with `useActionState`
- Error handling follows `Result<T, E>` pattern in `lib/result.ts`
- CSS uses `--ui-*` custom properties from `globals.css`
## Constraints
- Must maintain backward compatibility with v2 API
- Cannot modify `legacy/` directory — shared with another team
Rules for context.md
- Update when you discover project patterns or constraints
- Record decisions that affect future steps
- Keep it factual — no opinions, just observations
Workflow
Starting a New Task
- Create
.plan/directory if it doesn't exist - Write
plan.md— break the task into phases and steps - Write
context.md— record any known constraints and project facts - Create empty
progress.mdwith the header - Update
Current Focusin plan.md to the first step - Begin work on the first step
Resuming Work (Continuing a Previous Session)
- Read all three files — plan.md, progress.md, context.md
- Check
Current Focusin plan.md — this is where you left off - Review recent progress.md entries — understand what was just completed
- Continue from where you left off — don't re-plan, don't restart
During Work
- Before starting a step: Update
Current Focusin plan.md - After completing a step: Check it off in plan.md, append to progress.md
- When you learn something new: Add it to context.md
- When blocked: Add to
Open Questionsin plan.md and note in progress.md
Completing a Task
- Verify all steps are checked off in plan.md
- Write a final progress.md entry summarizing what was accomplished
- Update plan.md — change
Current Focusto "✅ Complete"
Step Granularity Guide
| Task Size | Steps Per Phase | Example |
|---|---|---|
| Small (< 1 hour) | 2-3 steps total | Fix a bug, add a field |
| Medium (1-4 hours) | 3-5 steps per phase, 2-3 phases | Add a feature, refactor a module |
| Large (multi-day) | 5-7 steps per phase, 3-5 phases | Migration, new subsystem |
Anti-Patterns
| Don't | Do Instead |
|---|---|
| Plan everything upfront in extreme detail | Plan Phase 1 in detail, outline future phases |
| Skip progress logging for "small" changes | Log everything — small changes compound |
| Rewrite plan.md from scratch each session | Append and update — history is valuable |
| Store context in your "memory" | Write it to context.md — files persist, memory doesn't |
| Create plans with vague steps | Every step should pass the "could I start this right now?" test |
| Delete completed steps from plan.md | Check them off — they're your receipt |
Integration with Other Skills
When using persistent-planning alongside other skills:
project-scaffold— After planning, use project-scaffold to generate the structuregit-workflow— Create a branch per phase, commit after each stepcode-review— Review completed phases before starting the nexttesting— Include test steps in every phase, not just at the endrefactoring— Use the plan to track refactoring progress across files