planning-foundation

Implements persistent file-based planning for complex tasks. Creates .planning/ directory with progress.md and findings.md. Use when starting complex multi-step tasks, research projects, or any task requiring >5 tool calls. Foundation layer inherited by all other skills.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "planning-foundation" with this command: npx skills add sipengxie2024/superpower-planning/sipengxie2024-superpower-planning-planning-foundation

Planning Foundation

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 Directory Convention

.planning/                     # gitignored, ephemeral working state
├── 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/
    └── ...

Plans go in docs/plans/. .planning/ is ephemeral session state. The agents/ directory is NOT created at init — each subagent creates its own subdirectory when dispatched.

Quick Start

Before ANY complex task:

  1. Create .planning/ directory with init script or manually
  2. Create progress.md — Use templates/progress.md (includes Task Status Dashboard)
  3. Create findings.md — Use templates/findings.md as reference
  4. Re-read plan before decisions — Refreshes goals in attention window
  5. Update after each phase — Mark complete, log errors

The Core Pattern

Context Window = RAM (volatile, limited)
Filesystem = Disk (persistent, unlimited)

-> Anything important gets written to disk.

File Purposes

FilePurposeWhat Goes HereWhen to Update
findings.mdKnowledge base: discoveries, decisions, surprisesCode patterns, architecture insights, technical decisions + rationale, rejected alternatives, unexpected behavior, edge cases, dependency constraints, debugging root causesAfter ANY discovery or decision
progress.mdOperations log: status, actions, evidenceTask Status Dashboard rows, phase status changes, actions taken (files modified), error log + retries, test results, verification evidence, batch/phase summariesAfter ANY status change, action, or error

Critical Rules

1. Create Planning Dir First

Never start a complex task without .planning/. Plans always go in docs/plans/. Execution status is tracked via the Task Status Dashboard in progress.md.

2. The 2-Action Dispatch Rule

"After every 2 read/search/explore operations, IMMEDIATELY save to the appropriate file by content type."

Dispatch by content type:

Content typeTarget fileExamples
Discoveries, decisions, surprisesfindings.mdCode patterns, constraints, approach chosen and why, edge cases
Status, actions, errors, resultsprogress.mdTask marked complete, files modified, error + retry, test pass/fail

This prevents both knowledge AND progress from being lost.

3. Read Before Decide

Before major decisions, read the plan file. This keeps goals in your attention window.

4. Update After Act

After completing any phase:

  • Mark phase status: in_progress -> complete
  • Log any errors encountered
  • Note files created/modified

5. Log ALL Errors

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

6. Never Repeat Failures

if action_failed:
    next_action != same_action

Track what you tried. Mutate the approach.

The 3-Strike Error Protocol

ATTEMPT 1: Diagnose & Fix
  -> Read error carefully
  -> Identify root cause
  -> Apply targeted fix

ATTEMPT 2: Alternative Approach
  -> Same error? Try different method
  -> Different tool? Different library?
  -> NEVER repeat exact same failing action

ATTEMPT 3: Broader Rethink
  -> Question assumptions
  -> Search for solutions
  -> Consider updating the plan

AFTER 3 FAILURES: Escalate to User
  -> Explain what you tried
  -> Share the specific error
  -> Ask for guidance

Read vs Write Decision Matrix

SituationActionReason
Just wrote a fileDON'T readContent still in context
Viewed image/PDFWrite findings NOWMultimodal -> text before lost
Browser returned dataWrite to fileScreenshots don't persist
Starting new phaseRead plan/findingsRe-orient if context stale
Error occurredRead relevant fileNeed current state to fix
Resuming after gapRead all planning filesRecover state

The 5-Question Reboot Test

If you can answer these, your context management is solid:

QuestionAnswer 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

When to Use This Pattern

Use for:

  • Multi-step tasks (3+ steps)
  • Research tasks
  • Building/creating projects
  • Tasks spanning many tool calls
  • Subagent orchestration

Skip for:

  • Simple questions
  • Single-file edits
  • Quick lookups

Per-Agent Planning Directories

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.

Templates

Scripts

  • scripts/init-planning-dir.sh — Initialize .planning/ directory with all files
  • scripts/check-complete.sh — Verify all phases complete
  • scripts/session-catchup.py — Recover context from previous session

Anti-Patterns

Don'tDo Instead
Use TaskCreate/TaskUpdate as cross-session persistenceUse .planning/progress.md Task Status Dashboard for persistent status. Task API is for session-scoped orchestration only.
State goals once and forgetRe-read plan before decisions
Hide errors and retry silentlyLog errors to plan file
Stuff everything in contextStore large content in files
Start executing immediatelyCreate plan file FIRST
Repeat failed actionsTrack attempts, mutate approach
Let subagent findings disappearAggregate into top-level findings.md

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

subagent-driven

No summary provided by upstream source.

Repository SourceNeeds Review
General

brainstorming

No summary provided by upstream source.

Repository SourceNeeds Review
General

verification

No summary provided by upstream source.

Repository SourceNeeds Review
Automation

parallel-agents

No summary provided by upstream source.

Repository SourceNeeds Review