一键导入
plan
// Break down medium-to-large tasks into phased plans in docs/plans/. Planning only — does not implement. Use for new features, multi-file refactors, or architectural changes — not small fixes. Triggers: "plan this", "break this down".
// Break down medium-to-large tasks into phased plans in docs/plans/. Planning only — does not implement. Use for new features, multi-file refactors, or architectural changes — not small fixes. Triggers: "plan this", "break this down".
Read/write brain files (Obsidian vault at docs/). Use for any task that persists knowledge — reflection, planning, or direct edits. Triggers: docs/ modifications, "add to brain".
Audit and evolve the brain vault — prune outdated content, discover cross-cutting principles, review skills for structural encoding opportunities. Triggers: "meditate", "audit the brain".
Reflect on the conversation and update the brain. Use when wrapping up, after mistakes or corrections, or when significant codebase knowledge was gained. Triggers: "reflect", "remember this".
Principle-grounded review of code changes, PRs, or plans. Use when asked to review, critique, or assess quality of work — "review", "review this", "code review", "check this".
Mine past Claude Code conversations for uncaptured patterns, corrections, and knowledge. Cross-references with existing brain content. Triggers: "ruminate", "mine my history".
| name | plan |
| description | Break down medium-to-large tasks into phased plans in docs/plans/. Planning only — does not implement. Use for new features, multi-file refactors, or architectural changes — not small fixes. Triggers: "plan this", "break this down". |
Produce implementation plans grounded in project principles. Write plans to docs/plans/. Do NOT implement anything — the plan is the deliverable.
Use Tasks to track progress. Create a task for each step (TaskCreate), mark each in_progress when starting and completed when done (TaskUpdate). Check TaskList after completing each step.
Before running the full planning workflow, assess whether this task actually needs a plan:
Trivially small (1–2 files, obvious approach): Tell the user this task doesn't need a plan and suggest implementing directly without the plan skill. Stop here — do not implement.
Needs planning (proceed to Step 1):
Read docs/principles.md. Follow every [[wikilink]] and read each linked principle file. These principles govern all plan decisions — refer back to them throughout.
Do NOT skip this. Do NOT use memorized principle content — always read fresh.
Use AskUserQuestion to resolve ambiguity before exploring the codebase:
Frame questions with concrete options. If the request is already clear, confirm scope boundaries briefly and move on.
Always delegate exploration to subagents via the Task tool. Never do large-scale codebase exploration in the main context.
Spawn exploration agents (subagent_type: Explore) to:
Run multiple agents in parallel when investigating independent areas.
Check installed skills (.agents/skills/, .claude/skills/) for any that match the plan's domain. Invoke matched skills — read their output and incorporate domain guidance into the plan.
If the plan touches a domain not covered by installed skills, use find-skills to search for a relevant skill. If one is found, install it (project-local) and incorporate its guidance. Note what was installed so the user can see it. After the plan is written, delete any one-off skills that won't be needed again.
Create the plan directory and files manually:
docs/plans/NN-slug-name/overview.md (or a single file for simple plans)docs/plans/index.md with a link to the new planFor small plans, a single file at docs/plans/NN-plan-name.md is fine.
For plans with 3+ phases, create a directory:
docs/plans/42-mvp/
├── overview.md
├── phase-1-scaffold.md
├── phase-2-layout.md
├── phase-3-drawing.md
└── testing.md
Non-phase files (like testing.md) are fine alongside phases.
Must include:
[[plans/42-mvp/phase-1-scaffold]]Each phase file must include:
Back to [[plans/42-mvp/overview]]Keep plans high-level. Describe what and why, not how at the code level. A phase should read like a brief to a senior engineer: goals, boundaries, key types, and verification — not code snippets or pseudocode.
Order phases per the sequencing principle: infrastructure and shared types first, features after. Each phase should be independently shippable.
Skill changes: If a phase involves creating or updating a skill (any file in .claude/skills/ or .agents/skills/), the phase must instruct the implementer to use the skill-creator skill during that phase.
For changes touching existing code, apply redesign-from-first-principles:
"If we were building this from scratch with this requirement, what would we build?"
Don't bolt changes onto existing designs — redesign holistically.
For architectural decisions, briefly sketch 2-3 approaches in the overview's Constraints section. State which was chosen and why. This prevents premature commitment and documents the design space explored.
Every phase must have a verification section with both:
Per prove-it-works: "it compiles" is not verification. Every phase must describe how to prove the change works.
Update docs/plans/index.md with a wikilink to the new plan's overview.
Do NOT edit docs/index.md — the auto-index hook maintains it automatically.
Summarize the plan: list the phases, scope boundaries, applicable skills, and verification approach. Ask the user to review the plan files in docs/plans/.
Stop here. Do not begin implementation. The user decides when and how to execute the plan.