plan

A codebase-aware interview that turns a feature request into a written specification. It detects whether the project is an existing codebase, a new project, or a cosmetic change, then follows the matching planning process.

In plain words
What is it for?
Use it to plan features in an existing repository, define a new project, or clarify styling, copy, dependency, documentation, and small refactoring requests.
Why use it?
It helps uncover requirements and understand how a requested feature fits the current code before implementation begins. For existing projects, it maps relevant code flows as part of the specification work.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/alphabravo-oss/guild/plan
Clone the repo
git clone --depth 1 https://github.com/alphabravo-oss/guild
Per session 10 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 12,514 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00010 $0.12514
Opus 5 $0.00005 $0.06257
Sonnet 5 $0.00002 $0.02503
Haiku 4.5 $0.00001 $0.01251

Measured 2d ago against content hash d90d34385455, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

plan scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Unrestricted tool accessmediumExcessive agency

A wildcard tool grant or "run any command" leaves no least-privilege boundary at all.

- NO Bash tool calls — do not run any commands
plugins/forge/commands/plan.md · 515 lines

How it starts

The opening of the file, as written. The whole thing — 515 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Forge Plan Command

Execute the setup script to initialize the research + interview session:

"${CLAUDE_PLUGIN_ROOT}/scripts/setup-forge.sh" $ARGUMENTS

You are now conducting a codebase-aware specification interview. Follow the instructions provided by the setup script exactly.

MODE DETECTION (R-pre)

Before R0, detect which pipeline this run uses. Three modes:

Mode When Pipeline
brownfield existing codebase, flow-shaped request V3: flow-mapper → flow-interviewer → flow-delta.json (plus spec.md for compatibility)
greenfield empty or near-empty target, flow-shaped request V2 pipeline unchanged (end-state-first is correct when there is no upstream to honor)
cosmetic non-flow-shaped request (styling, copy, deps, docs, minor refactor) in any codebase V2 pipeline, no flow mapping

Detection procedure:

  1. If --brownfield, --greenfield, or --cosmetic flag was passed → use that mode verbatim. Skip auto-detection.
  2. Otherwise, auto-detect:
    • Count relevant-language source files under target paths (Go *.go, TS/JS *.ts|*.tsx|*.js|*.jsx, Python *.py, Rust *.rs, excluding tests, vendored code, node_modules/).
      find "${PROJECT_ROOT}" -type f \( -name "*.go" -o -name "*.ts" -o -name "*.tsx" -o -name "*.js" -o -name "*.jsx" -o -name "*.py" -o -name "*.rs" \) \
        -not -path "*/vendor/*" -not -path "*/node_modules/*" -not -path "*/target/*" -not -path "*/__pycache__/*" \
        -not -name "*_test.go" -not -name "*.test.ts" -not -name "*.test.tsx" -not -name "*.spec.ts" \
        | wc -l
      
    • If count ≤ 20 → default greenfield.
    • Else → read the user's feature-name / initial prompt. If the request is flow-shaped (adds a new feature, new endpoint, new page, new data flow, new module) → default brownfield. If it is cosmetic (styling, copy edit, README update, dependency bump, minor refactor with no behavioral change) → default cosmetic.
  3. Confirm with the user via AskUserQuestion — always. Show the detected mode, the file count, and a one-line rationale. Options: confirm | force-greenfield | force-brownfield | force-cosmetic | abort.
  4. Record the chosen mode to state.md as mode: brownfield|greenfield|cosmetic before proceeding.

Read the full file on GitHub · 515 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 515 lines · 10 tokens per session scan B d90d34385455

Subscribe to this mod's changes

plan is a command published in the GitHub repository alphabravo-oss/guild (2 stars, last pushed 3d ago), licensed MIT. It adds 10 tokens to every session and 12,514 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (unrestricted tool access). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.