Plan

From poteto/noodle · View interactive version

Plan is an AI agent skill from the GitHub repository poteto/noodle. Systematic planning for medium-to-large tasks. Gathers context, identifies domain skills, writes phased plans to brain/plans/. Does NOT implement. Use for new features, multi-file refactors, or architectural changes — not small fixes. Triggers: "plan this", "break this down".

How to use this skill

Skill file

Plan

Produce implementation plans grounded in project principles. Write plans to brain/plans/. Do NOT implement anything — the plan is the deliverable.

Autonomous Session Mode

When this skill runs in a non-interactive Noodle execution session (for example Cook, Oops, or Repair):

All other steps proceed normally.

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.

Step 0 — Triage Complexity

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):

Step 1 — Load Principles

Read brain/principles.md. Follow every [[wikilink]] and read each linked principle file. These principles govern all plan decisions — cite them by name in the plan overview and phase files.

Do NOT skip this. Do NOT use memorized principle content — always read fresh. The self-check in Step 5b will verify citations exist.

Step 2 — Define Scope and Constraints

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.

Step 3 — Explore Context with Subagents

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. For large explorations, use a team.

Step 4 — Gather Domain Skills

Match installed skills and discover missing ones. See references/domain-skills.md for the routing table and discovery workflow.

Step 5 — Write the Plan

Create the plan using file tools. See references/templates.md for the full directory structure, overview/phase file formats, verification strategy, and CLI scaffolding steps.

Phase sizing

Redesign check

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.

Alternatives check

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. See brain/principles/exhaust-the-design-space.md.

Update plans index and todos

Verify both entries exist after writing the plan:

New todo: read <!-- next-id: N -->, append N. [ ] description [[plans/NN-plan-name/overview]], increment next-id. Do NOT edit brain/index.md — the auto-index hook maintains it.

Archiving completed plans

Move directory to brain/archive/plans/, update brain/plans/index.md, mark todo done via the todo skill.

Step 5b — Self-Check

After writing all plan files, verify these three constraints before proceeding. Fix any violations before moving on.

Principles cited: The overview must reference at least 2 brain principles by [[wikilink]]. If not, re-read brain/principles.md and add the most relevant ones to the overview's design decisions.

Phase sizing: Review each phase. If any phase touches >3 files or lists >5 test cases, split it into smaller phases. Count the files listed under "Changes" — if the list exceeds 3, the phase is too big.

No code in phases: Phase files must not contain Go/TS/Python code blocks. Name types and functions but do not define them. A phase should read like a brief to a senior engineer, not a diff or implementation spec. If you find code blocks, replace them with prose describing the intended shape.

Step 6 — Present and Yield

Summarize the plan: list the phases, scope boundaries, applicable skills, and verification approach. Ask the user to review the plan files in brain/plans/.

Emit stage_yield to signal the deliverable is complete:

noodle event emit --session $NOODLE_SESSION_ID stage_yield --payload '{"message": "Plan written to brain/plans/NN-slug-name/overview.md"}'

This tells the Noodle backend the stage's work is done, even if the agent process hasn't exited yet. Without this, the stage only completes on clean process exit.

Stop here. Do not begin implementation. The user decides when and how to execute the plan.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.