with one click
planning-foundation
// Use when starting complex multi-step tasks, research projects, or anything needing >5 tool calls. Provides the persistent .planning/ directory used as on-disk working memory across sessions.
// Use when starting complex multi-step tasks, research projects, or anything needing >5 tool calls. Provides the persistent .planning/ directory used as on-disk working memory across sessions.
[HINT] Download the complete skill directory including SKILL.md and all related files
| name | planning-foundation |
| description | Use when starting complex multi-step tasks, research projects, or anything needing >5 tool calls. Provides the persistent .planning/ directory used as on-disk working memory across sessions. |
Work like Manus: Use persistent markdown files as your "working memory on disk."
Every workflow skill in superpower-planning inherits this foundation. .planning/ is the "RAM on disk" for the current work session.
.planning/ # gitignored, ephemeral working state
āāā design.md # design spec (created by brainstorming)
āāā plan.md # implementation plan (created by writing-plans)
āāā findings.md # aggregated findings
āāā progress.md # Task Status Dashboard + session log
āāā agents/ # created on demand by subagents
ā āāā implementer/ # one dir per role, reused across tasks
ā ā āāā findings.md # this agent's discoveries (appended across tasks)
ā ā āāā progress.md # this agent's action log (appended across tasks)
ā āāā spec-reviewer/
ā āāā ...
āāā stash/ # paused projects (directory per entry)
ā āāā YYYY-MM-DD-<name>/
ā āāā design.md, plan.md, findings.md, progress.md
ā āāā agents/
āāā archive/ # completed projects (directory per entry)
āāā YYYY-MM-DD-<name>/
āāā design.md, plan.md, findings.md, progress.md
āāā summary.md
All project documents live in .planning/. The agents/ directory is NOT created at init ā each subagent creates its own subdirectory when dispatched.
Lifecycle directories:
.planning/stash/ ā paused projects (each entry is a subdirectory with all active files).planning/archive/ ā completed projects (each entry is a subdirectory with all active files + summary.md)Before ANY complex task:
.planning/ directory with init script or manuallyprogress.md ā Use templates/progress.md (includes Task Status Dashboard)findings.md ā Use templates/findings.md as referenceContext Window = RAM (volatile, limited)
Filesystem = Disk (persistent, unlimited)
-> Anything important gets written to disk.
| File | Purpose | What Goes Here | When to Update |
|---|---|---|---|
design.md | Design spec: architecture and requirements | Created by brainstorming skill. Architecture, components, data flow, error handling, testing strategy | After design approval or spec review |
plan.md | Implementation plan: bite-sized tasks | Created by writing-plans skill. File structure, task steps, parallelism groups, verification commands | After plan approval or plan review |
findings.md | Knowledge base: discoveries, decisions, surprises | Code patterns, architecture insights, technical decisions + rationale, rejected alternatives, unexpected behavior, edge cases, dependency constraints, debugging root causes | After ANY discovery or decision |
progress.md | Operations log: status, actions, evidence | Task Status Dashboard rows, phase status changes, actions taken (files modified), error log + retries, test results, verification evidence, batch/phase summaries | After ANY status change, action, or error |
Never start a complex task without .planning/. All project documents (design, plan, findings, progress) live in .planning/. Execution status is tracked via the Task Status Dashboard in progress.md.
"After every 2 read/search/explore operations, IMMEDIATELY save to the appropriate file by content type."
Dispatch by content type:
| Content type | Target file | Examples |
|---|---|---|
| Discoveries, decisions, surprises | findings.md | Code patterns, constraints, approach chosen and why, edge cases |
| Status, actions, errors, results | progress.md | Task marked complete, files modified, error + retry, test pass/fail |
This prevents both knowledge AND progress from being lost.
Before major decisions, read the plan file. This keeps goals in your attention window.
After completing any phase:
in_progress -> completeEvery error goes in the plan file. This builds knowledge and prevents repetition.
## Errors Encountered
| Error | Attempt | Resolution |
|-------|---------|------------|
| FileNotFoundError | 1 | Created default config |
| API timeout | 2 | Added retry logic |
if action_failed:
log what you tried and observed
escalate to user for direction
Do NOT independently try alternative approaches. Log the failure and follow the Error Escalation Protocol.
ATTEMPT 1: Diagnose & Fix
-> Read error carefully
-> Identify root cause
-> Apply targeted fix
ATTEMPT 1 FAILED: Escalate to User
-> Show: what failed, what you tried, what you observed
-> Ask: is this a bug? a plan gap? an environment issue?
-> Align on direction BEFORE proceeding
AFTER ALIGNMENT (based on user's judgment):
-> Bug ā use systematic debugging skill
-> Plan gap ā update plan with user
-> Environment ā fix environment
-> Architecture ā broader rethink with user
Why escalate early: The plan was carefully designed. Self-directed alternative approaches bypass plan intent and create workarounds. Always align with the user before changing direction.
| Situation | Action | Reason |
|---|---|---|
| Just wrote a file | DON'T read | Content still in context |
| Viewed image/PDF | Write findings NOW | Multimodal -> text before lost |
| Browser returned data | Write to file | Screenshots don't persist |
| Starting new phase | Read plan/findings | Re-orient if context stale |
| Error occurred | Read relevant file | Need current state to fix |
| Resuming after gap | Read all planning files | Recover state |
If you can answer these, your context management is solid:
| Question | Answer Source |
|---|---|
| Where am I? | Task Status Dashboard in progress.md |
| Where am I going? | Remaining phases |
| What's the goal? | Goal statement in plan |
| What have I learned? | findings.md |
| What have I done? | progress.md |
Use for:
Skip for:
When dispatching subagents, each gets its own planning dir:
.planning/agents/{role}/
āāā findings.md # agent's discoveries (appended across tasks)
āāā progress.md # agent's action log (appended across tasks)
Do NOT create per-task directories like implementer-task-1/. One directory per role, updated continuously.
The orchestrator aggregates agent findings into top-level .planning/findings.md and .planning/progress.md after each task completes.
Planning lifecycle:
scripts/init-planning-dir.sh ā Initialize .planning/ with findings.md and progress.mdscripts/planning-reset.sh ā Reset active state, preserve archive/ and stash/scripts/check-planning-state.sh ā Check state: missing | empty | active | completescripts/check-complete.sh ā Verify all tasks completescripts/snapshot-save.sh ā Copy active project files to a target directory (shared by stash/archive)Stash/archive:
scripts/stash-list.sh ā List available stashes (directory + legacy format)scripts/stash-restore.sh ā Restore stash to active .planning/ statescripts/archive-search.sh ā Search archives by keywordscripts/unique-filename.sh ā Generate unique dated filename/dirnameAgent orchestration:
scripts/aggregate-agent-findings.sh ā Merge agent "Critical for Orchestrator" items into top-level filesProject detection:
scripts/detect-base-branch.sh ā Detect main/master/developscripts/detect-test-command.sh ā Detect project test commandscripts/detect-project-setup.sh ā Detect and run project setupOther:
scripts/release.sh ā Version bump, tag, GitHub Releasescripts/session-catchup.py ā Recover context from previous session (manual utility, requires Python)| Don't | Do Instead |
|---|---|
| Use TaskCreate/TaskUpdate as cross-session persistence | Use .planning/progress.md Task Status Dashboard for persistent status. Task API is for session-scoped orchestration only. |
| State goals once and forget | Re-read plan before decisions |
| Hide errors and retry silently | Log errors to plan file |
| Stuff everything in context | Store large content in files |
| Start executing immediately | Create plan file FIRST |
| Repeat failed actions or independently try alternatives | Log failure, escalate to user for direction |
| Let subagent findings disappear | Aggregate into top-level findings.md |