Teach write-prompt to right-size its output — plain-prose prompts for simple asks, full XML scaffolding for complex ones — and to classify how each prompt should run: one-shot, loop, workflow, or goal, delivered ready to paste in that mode.
Read and implement all steps in the plan at docs/plans/add-dynamic-depth-and-mode-to-refine-prompt.md — Dynamic depth and execution mode for write-prompt. Verify against the plan's Tests, Verification, and Acceptance Criteria before reporting done. If everything passed, mark completion in docs/plans/add-dynamic-depth-and-mode-to-refine-prompt.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: Dynamic depth and execution mode for write-prompt. The plan at docs/plans/add-dynamic-depth-and-mode-to-refine-prompt.md describes one approach — use it as reference, but optimize for the outcome. Fan out across parallel subagents where that serves the outcome. Verify against the plan's Tests, Verification, and Acceptance Criteria before reporting done. If everything passed, mark completion in docs/plans/add-dynamic-depth-and-mode-to-refine-prompt.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.
Run a workflow to implement the plan at docs/plans/add-dynamic-depth-and-mode-to-refine-prompt.md — Dynamic depth and execution mode for write-prompt. Brief subagents with the plan file at docs/plans/add-dynamic-depth-and-mode-to-refine-prompt.md. Reserve a final verification phase for the lead agent, not a subagent. Verify against the plan's Tests, Verification, and Acceptance Criteria before reporting done. If everything passed, mark completion in docs/plans/add-dynamic-depth-and-mode-to-refine-prompt.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-dynamic-depth-and-mode-to-refine-prompt.html
docs/plans/add-dynamic-depth-and-mode-to-refine-prompt.html
docs/plans/add-dynamic-depth-and-mode-to-refine-prompt.md
Context
The story behind this plan — what prompted the work and why it matters now.
The write-prompt skill ( kit/plugins/plan-agent/skills/write-prompt/SKILL.md ) runs a fixed pipeline: classify into one of four prompt types, run a batched interview, apply the full XML technique matrix for that type, and fill a template from references/ . There is no depth axis anywhere — a trivial ask like "summarize this doc in 3 bullets" gets <context> , <example> , and <thinking> scaffolding it does not need, because the technique matrix is keyed only on type , never on complexity . The skill has an escalation valve ("go deeper?") but no de-escalation valve.
Separately, the skill never considers how the finished prompt will run. A prompt meant to poll CI every ten minutes needs an interval and a /loop wrapper; a repo-wide audit prompt benefits from workflow orchestration; an autonomous objective needs a stated completion condition. Today all of these are delivered as bare one-shot text. An investigation on 2026-07-01 confirmed both gaps are fixable with edits to a single SKILL.md — the four templates stay untouched. Interview decisions locked in: the lite path always asks exactly one batched clarifying question; mode is judged by run-intent (not raw keywords) and announced only when non-one-shot, with a symmetric "run as one-shot" override; depth and mode are independent axes; existing saved prompts are not backfilled (that is a follow-up).
Files that change
Every file this plan touches, and what happens to each one.
.claude-plugin/marketplace.jsonmodified plan-agent 3.0.0 → 3.1.0- kit/plugins/plan-agent/
CHANGELOG.mdmodified 3.1.0 entry for depth + modeREADME.mdmodified document lite/full and execution modes
kit/plugins/plan-agent/skills/write-prompt/SKILL.mdmodified depth axis, lite path, mode phase, delivery + savetests/plugins/test-write-prompt-dynamic.shnew smoke test for dynamic-output markers
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.
Run bash tests/plugins/test-write-prompt-dynamic.sh and confirm exit 0. Then dry-run the routing by reading the edited SKILL.md top to bottom against two simulated invocations: /plan-agent:write-prompt summarize this doc in 3 bullets must route lite/one-shot (one clarifying question, prose draft, no template read, no mode announcement), and /plan-agent:write-prompt watch CI every 10 minutes and report failures must route loop (mode announced with the "run as one-shot" override, interval question added, delivery pre-wrapped in /loop , frontmatter carrying mode: loop ). Finally confirm .claude-plugin/marketplace.json parses with plan-agent at 3.1.0 (higher than main's 3.0.0), the CHANGELOG entry exists, and the four template files under references/ are byte-identical to before.
Wrapping up
Three gates that must all pass before this plan is marked completed.
Completion Report
No items to report — all requirements met.