Pull request #470 Merged 2026-07-27 plan-agent 4.4.0 → 5.0.0

build can now author the plan it implements

/plan-agent:build used to stop and tell you to go make a plan first. Now, when you run the command without naming one, it walks you through making that plan — proposal, plan, review — and then implements what comes back.

At a glance

8Changes shipped
10Files touched
7Decisions
5Open items
9→18Tests
MAJORVersion bump

The second half of the change is a safety fix: when you ran build bare, it used to quietly pick up whatever unfinished plan it happened to find. It now shows you the candidates and asks. Nothing about the assistant's automatic behaviour changed — the new chain is reachable only when you type the slash command yourself.


What changed

Eight things are different

build with no plan now makes one

Affects: anyone running the command

The command no longer dead-ends. It asks whether to start from a proposal or go straight to plan authoring, hands off to the skill that owns each stage, and implements the plan that comes back.

/plan-agent:build

You can hand it an objective instead of a file

Affects: anyone running the command

The command accepts free text. The first word decides how the argument is read — a path if it ends in .md/.html or contains a /, otherwise an objective.

/plan-agent:build add a health check endpoint

Bare build asks instead of assuming

Breaking Affects: anyone relying on the old pickup

A single unfinished plan used to be adopted with no prompt. It is now presented as an option, alongside None of these — author a new plan. The offer shows at most three candidates and states how many were hidden, because the question widget renders at most four choices.

/plan-agent:build # in a repo with todo plans

New argument format

Breaking Affects: scripts and notes

Flags are stripped before anything is classified, so --dir tmp/plans on its own is still a bare build, not an objective named --dir.

[<plan.md|plan.html>] [<objective>] [--dir <path>]

The uncommitted-work check moved to the front

Affects: anyone with a dirty tree

The check used to sit just before implementation. On a chained run that meant crossing a whole proposal loop and plan interview before being asked about files you already had open. It now runs first — and it ignores the plan's own spec, its rendered HTML, and any proposal the chain just wrote, since those are not pre-existing work.

The model is pinned for the implementation stage

Affects: nobody directly

A skill's model override lasts the rest of the turn and does not unwind when the skill ends, so without the pin a chained run would write source code on whatever model the last planning skill happened to declare.

model: opus

Every gate has an answer when it cannot ask

Affects: headless and automated runs

When the question tool is unavailable, every gate stops and reports the choice it would have offered. It never picks for you.

Test coverage doubled

Affects: contributors

Nine new checks covering the chain, the discovery offer, guard ordering, and the argument grammar. Each was proven load-bearing by reverting the step it guards and confirming it fails.

bash tests/plugins/test-build-skill.sh # 18/18

How it works now

Two shapes changed

ends .md or .html, or has a slash

plain text

nothing left

yes

no

some

none

a candidate

None of these

/plan-agent:build $ARGUMENTS

Strip --dir and other flags

First positional token?

Treat as plan path

Treat as objective

Discovery

File found?

Implement it

STOP - name both paths tried, never author a plan on a typo

Step 1b - author a plan

todo / in-progress specs?

OFFER top 3 plus 'None of these' - never adopt silently

Ask for an objective

Argument routing. Follow the plain text and nothing left branches — those are the new ones. The no branch out of File found? deliberately still stops rather than chaining.
build (nested)implementation-planbuild-proposalbuild (outer)Youbuild (nested)implementation-planbuild-proposalbuild (outer)You--dir is not forwarded here - it resolves its own directoryalt[Start with a proposal]alt[Implement now]/plan-agent:build (objective)Proposal first, or straight to plan?Skill(build-proposal, objective)proposal path, or nothing for a Tier 0 ideaSkill(implementation-plan, objective plus --dir)Step 8 - how do you want to execute?Skill(build, plan path)implemented, gates runoutcome and plan pathreport - no re-entry, no second run
The authoring chain. Note the loop: the plan skill's own “what next” menu calls build back, and that nested run is the one that writes the code. The outer chain then reports its result and stops.

Before and after

Behaviour, rule by rule

SituationBeforeAfter
No plan namedStopped, told you to run implementation-planEnters the chain: proposal → plan → review → implement
Exactly one unfinished planAdopted it silentlyOffers it, alongside “author a new plan”
Many unfinished plansAsked, unbounded listOffers the newest three, states how many were hidden
A free-text objectiveRead as a plan path, then failedSkips discovery, goes straight to authoring
Objective whose first word has a slashBare list of paths triedNames the misparse and says to reword
A mistyped plan pathFell through to discovery, could implement a different planStops and names both paths it tried
HTML-only legacy planStoppedStill stops — needs its spec reconstructed, not a new plan on top
Uncommitted files presentAsked just before implementingAsked first, before any authoring; plan artifacts excluded
Model during implementationInherited from the last planning skillPinned to Opus
Question tool unavailableUndefined — resolved inconsistentlyEvery gate stops and reports the options
Ambient activationRequires an existing planUnchanged, byte-identical description

Decisions

What was chosen, and what was turned down

The chain is delegation, not re-implementation.

Step 1b makes real Skill() calls to build-proposal and implementation-plan.

Rejected: copying their logic into build, which would have produced a second plan-authoring implementation to keep in sync with the first.

Re-entrancy is allowed, made safe by re-resolving the plan by path.

The plan skill's Step 8 already calls back into build, so a chained run enters build twice.

Rejected: a re-entry flag or guard. Resolving the produced spec by its path lets the existing completed/resume preconditions do the deciding, with no new state to get wrong.

Implement now at the nested menu is terminal for the outer chain.

Skill() is synchronous, so by the time control returns the nested run has already finished.

Rejected: continuing the outer run — it would ask whether to redo work that just completed, or restart a run the user deliberately stopped. This overrode two rows in the original proposal's appendix.

The chain is reachable only from the slash command.

The description frontmatter is byte-identical to main, so automatic activation keeps its old contract exactly.

Rejected: widening the trigger to catch “build a todo app” — the same widening also catches “build fails on CI” and “build the docker image”. The word is too overloaded.

Two no-plan branches deliberately still stop.

A named-but-missing path, and an HTML-only legacy plan.

Rejected: chaining on both. Authoring an entire plan because of a typo is worse than stopping, and a legacy plan needs its spec reconstructed rather than a new plan written over it.

--dir is forwarded to plan authoring but not to proposal writing.

It names where the plan goes; build-proposal resolves its own proposals directory.

Corrected during review: the first pass withheld it from both, which would have written the spec to the default directory and then failed to find it on return.

The discovery offer is capped at three.

AskUserQuestion renders at most four options, and one slot is reserved for None of these.

Rejected: an unbounded list, which would not render at all.


Learnings

Found by running it, not reading it

A pull request carries no record of what was tried and abandoned, so this section is thin by construction. Two items survived into the PR description because they came out of live runs rather than review:


Open items

What is still outstanding


Files touched

Ten files, one behavioural change

The change itself

  • kit/plugins/plan-agent/skills/build/SKILL.md The whole behaviour change: new Step 1b chain, rewritten Step 1 resolution, hoisted dirty-tree guard, model: opus pin, new argument-hint, and Skill added to allowed-tools. +163 lines.

Tests

  • tests/plugins/test-build-skill.sh Nine new static checks (9 → 18) covering the chain, the offer, guard ordering, and the argument grammar. +174 lines.

Plugin metadata and docs

  • .claude-plugin/marketplace.json Version 4.4.0 → 5.0.0, and a description mentioning the no-plan behaviour.
  • kit/plugins/plan-agent/.claude-plugin/plugin.json Metadata touch-up.
  • kit/plugins/plan-agent/CHANGELOG.md The 5.0.0 entry, including both breaking changes.
  • kit/plugins/plan-agent/README.md The new command behaviour and objective-only usage.
  • CLAUDE.md The repo-level plugin table row for plan-agent.

Plan record

  • docs/plans/add-plan-authoring-to-build.md Marked completed, with the Completion Report and verification notes.
  • docs/plans/add-plan-authoring-to-build.html The re-rendered plan.
  • docs/plans/index.html Gallery card and count.

Glossary

Terms on this page

plan-agent
The plugin that owns the plan lifecycle: authoring, review, implementation, follow-through.
build
The skill that implements a plan — walks its steps, ticks the spec, re-renders it, runs the completion gates.
implementation-plan
The skill that authors a plan. It ends with a Step 8 menu asking how to execute.
build-proposal
The skill that turns a rough idea into a decision-complete proposal document, before any plan exists.
Step 1b
The new section of build holding the no-plan authoring chain.
Step 8
The menu at the end of implementation-plan: Implement now, Exit, or Run as workflow.
spec
The Markdown plan file. It is the source of truth; the HTML is a render of it.
discovery
build scanning the plans directory for specs whose status is todo or in-progress.
ambient activation
The assistant starting a skill on its own from the wording of a request, rather than you typing the slash command.
AskUserQuestion
The tool that renders a multiple-choice prompt. It displays at most four options.
Tier 0 idea
One that build-proposal judges small enough to answer directly, producing no proposal document.
dirty working tree
Uncommitted changes present in git.
--dir
The flag overriding which directory plans are read from and written to.