Implement Phase 2 of the guideline-driven plan generation proposal: replace the implementation-plan skill's prescriptive HTML rulebook with a four-document guidelines library and rewrite SKILL.md so the agent authors a Markdown spec and renders it with the bundled build-plan-html.mjs.
Plan authors stop hand-typing 85 KB of HTML — the agent writes a small markdown spec guided by a judgment-based guidelines library, and a bundled script renders the styled interactive plan. We'll know it worked when the skill's own smoke tests pass and this very plan renders from its markdown source.
Read and implement all steps in the plan at docs/plans/add-plan-guidelines-library.md — Ship the guidelines library and markdown-first authoring for implementation-plan. Verify against the plan's Tests, Verification, and Acceptance Criteria before reporting done. If everything passed, mark completion in docs/plans/add-plan-guidelines-library.md — tick each step's [x] marker and each criterion's - [x], set status: completed — and re-render the HTML from the spec. If any check failed, leave status: in-progress and say which.
More ways to run this plan — goal & workflow prompts, file path
Achieve this goal: Ship the guidelines library and markdown-first authoring for implementation-plan. The plan at docs/plans/add-plan-guidelines-library.md describes one approach — use it as reference, but optimize for the outcome. Verify against the plan's Tests, Verification, and Acceptance Criteria before reporting done. If everything passed, mark completion in docs/plans/add-plan-guidelines-library.md — tick each step's [x] marker and each criterion's - [x], set status: completed — and re-render the HTML from the spec. If any check failed, leave status: in-progress and say which.
add-plan-guidelines-library.html
docs/plans/add-plan-guidelines-library.html
docs/plans/add-plan-guidelines-library.md
Context
The story behind this plan — what prompted the work and why it matters now.
Phase 1 (plan-agent 2.18.0) shipped the deterministic renderer: build-plan-html.mjs parses a small markdown plan spec and emits the full styled HTML plan with the exact DOM contract downstream tools depend on. The skill, however, still instructed the agent to copy a 2,015-line HTML skeleton and fill placeholders by hand — roughly 60k tokens of pure mechanics per plan run. Phase 2 (this plan) inverts the authoring flow per docs/proposals/plan-generation-from-markdown-guidelines.md: guidelines carry the judgment, the spec carries the content, the renderer carries the presentation.
Files that change
Every file this plan touches, and what happens to each one.
- kit/plugins/plan-agent/skills/implementation-plan/guidelines/
planning-principles.mdnew falsifiable done, what/why/verify, scope disciplinesection-catalog.mdnew section menu with purpose, triggers, and exact spec syntaxright-sizing.mdnew minimal/standard/deep depth profiles and calibration tablewriting-style.mdnew tone and plain-language rules moved out of the workflow doc
kit/plugins/plan-agent/skills/implementation-plan/SKILL.mdmodified rewritten around explore, read guidelines, author spec, render, deliverkit/plugins/plan-agent/skills/implementation-plan/reference/SKELETON.mdmodified now the copyable spec starter in the parser's exact format- tests/plugins/
test-goal-prompt.shmodified SKILL assertion checks the derived goal-prompt contract, not a placeholdertest-resources-section.shmodified Resources guidance assertion repointed to the guidelines and spec skeleton
- kit/plugins/plan-agent/
README.mdmodified structure tree and component section reflect the pipelineCHANGELOG.mdmodified 2.19.0 entry
.claude-plugin/marketplace.jsonmodified plan-agent bumped to 2.19.0, description updated
Steps
The step-by-step work, in order — each step says what to do, why it matters, and how to check it worked.
Tests
The tests that prove the change does what it promises.
Definition of done
The plan counts as done when every statement below is true — check each one off as you verify it.
Final check
One last pass to confirm the whole change works end to end.
Render this plan's own markdown source with node kit/plugins/plan-agent/scripts/build-plan-html.mjs docs/plans/add-plan-guidelines-library.md and confirm it exits 0 and produces the styled sibling HTML — the pipeline the plan ships is the pipeline that built the plan. Then run the tests/plugins suite end to end and confirm zero failures.
Wrapping up
Three gates that must all pass before this plan is marked completed.
Completion Report
No items to report — all requirements met.