fix(plan): tighten /plan hand-offs after review

Ask researchers to flag reference-doc needs, add the wayfinder "no"
branch, name the docs branch and give only applicable doc commands,
resolve the label ID before stripping Ready for Agent from the spec,
point the /to-spec rerun at step 8's block, and call /write-docs and
/research-docs user-run.

Refs: #255
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi
This commit is contained in:
Defame1297andClaude Opus 5.5 committed 2026-11-29 17:33:24 +00:00
1 parent 99054c8cd2
commit fe0e297f98
2 files changed
+19 -13

No files matched your search

+13 -8
View File
@@ -8,8 +8,8 @@ Input (raw, verbatim):
$ARGUMENTS $ARGUMENTS
You are the orchestrator. Delegate the reading to subagents and keep only their conclusions. Speak You are the orchestrator. Delegate the reading to subagents and keep only their conclusions. Speak
to me only to ask, to present, or to report. Every hand-invoked command you ask me to run goes in a to me only to ask, to present, or to report. Every command you ask me to run goes in a code block
code block I can copy. I can copy.
## 0. Entry ## 0. Entry
@@ -36,8 +36,11 @@ park the idea instead.
/wayfinder <intent> — <grilling answers> /wayfinder <intent> — <grilling answers>
``` ```
3. **Research**: dispatch `plan-researcher` twice in parallel, scope `repo` and scope `web`. They On no, ask me which of the other two tracks to take, then continue to step 3.
flag when lasting reference docs for an external tool or library are needed. Nothing is written.
3. **Research**: dispatch `plan-researcher` twice in parallel, scope `repo` and scope `web`. Ask
each to flag when lasting reference docs for an external tool or library are needed. Nothing is
written.
4. **Validate**: dispatch `plan-validator` with the findings. `regrill` → back to 2. `stop` → tell 4. **Validate**: dispatch `plan-validator` with the findings. `regrill` → back to 2. `stop` → tell
me why and stop. me why and stop.
5. **Offer a plan**: options, considerations, recommendation, impact, expected results, and the 5. **Offer a plan**: options, considerations, recommendation, impact, expected results, and the
@@ -52,8 +55,9 @@ park the idea instead.
Dispatch `plan-recorder` with the agreed plan, its decisions, and the candidate terms and ADRs from Dispatch `plan-recorder` with the agreed plan, its decisions, and the candidate terms and ADRs from
step 2. My agreement in step 6 authorizes its branch, commit, push and docs PR. Keep the PR link. step 2. My agreement in step 6 authorizes its branch, commit, push and docs PR. Keep the PR link.
If step 5 listed docs: ask me for the `research-docs` output path, then tell me to run these on the If step 5 listed docs: if it listed `research-docs` topics, ask me for the `research-docs` output
docs branch and push to the same PR: path. Then tell me the docs branch name (from the PR) and to run these on it, only the lines that
apply, and push to the same PR:
``` ```
/write-docs <target> /write-docs <target>
@@ -71,7 +75,8 @@ Wait for me.
``` ```
My running it is my approval of the spec. Wait for it. `to-spec` sets `Status/Ready for Agent` on My running it is my approval of the spec. Wait for it. `to-spec` sets `Status/Ready for Agent` on
the spec issue; remove it with `gitea-issues` if present. the spec issue; if present, resolve its label ID with `gitea-labels-milestones` and remove it with
`gitea-issues`.
## 9–10. Tickets ## 9–10. Tickets
@@ -84,7 +89,7 @@ conversation, on the tickets-only track):
It proposes the breakdown, and my approval inside it covers the whole batch. It files the tickets It proposes the breakdown, and my approval inside it covers the whole batch. It files the tickets
and sets `Status/Ready for Agent`; a ticket without acceptance criteria must not carry it. If the and sets `Status/Ready for Agent`; a ticket without acceptance criteria must not carry it. If the
breakdown shows a gap in the spec, tell me to rerun `/to-spec` first. breakdown shows a gap in the spec, tell me to rerun step 8's `/to-spec` block first.
After it files them, read each filed ticket with `gitea-issues`. Resolve the label IDs with After it files them, read each filed ticket with `gitea-issues`. Resolve the label IDs with
`gitea-labels-milestones`, remove `Status/Ready for Agent` from any ticket with no acceptance `gitea-labels-milestones`, remove `Status/Ready for Agent` from any ticket with no acceptance
+6 -5
View File
@@ -72,7 +72,8 @@ stops. Steps 3-10 are skipped.
docs branch and push to the same PR. `/plan` first asks the user for the `research-docs` output docs branch and push to the same PR. `/plan` first asks the user for the `research-docs` output
path. Both need the user in the loop, so they cannot run inside a subagent. path. Both need the user in the loop, so they cannot run inside a subagent.
8. **Write the spec** as an issue in the tracker (Gitea included). This step runs on the spec and 8. **Write the spec** as an issue in the tracker (Gitea included). This step runs on the spec and
tickets track only. tickets track only. The spec issue never carries `Status/Ready for Agent`; `/plan` strips the
one `/to-spec` sets.
9. **Propose a breakdown** into tickets. If the breakdown shows a gap in the spec, go back to 9. **Propose a breakdown** into tickets. If the breakdown shows a gap in the spec, go back to
step 8. step 8.
10. **Approval and filing.** One explicit approval covers the whole batch. The plugin files the 10. **Approval and filing.** One explicit approval covers the whole batch. The plugin files the
@@ -81,7 +82,7 @@ stops. Steps 3-10 are skipped.
label IDs for the Ready-for-Agent strip. On the spec track it also creates the label IDs for the Ready-for-Agent strip. On the spec track it also creates the
`Spec: <title>` milestone, and `gitea-issues` assigns the filed tickets to it. `Spec: <title>` milestone, and `gitea-issues` assigns the filed tickets to it.
Every hand-invoked command `/plan` asks the user to run is presented as a copyable code block. Every command `/plan` asks the user to run is presented as a copyable code block.
### Loops ### Loops
@@ -197,9 +198,9 @@ sequenceDiagram
with `domain-modeling` (no edits during grilling) and `plan-track` in step 2, including the with `domain-modeling` (no edits during grilling) and `plan-track` in step 2, including the
wayfinder early exit; `codebase-design` in step 5; and `gitea-labels-milestones` and wayfinder early exit; `codebase-design` in step 5; and `gitea-labels-milestones` and
`gitea-issues` in steps 8–10 for the Ready-for-Agent strip and the `Spec:` milestone with ticket `gitea-issues` in steps 8–10 for the Ready-for-Agent strip and the `Spec:` milestone with ticket
assignment. Hand-invoked commands (`/wayfinder`, `/write-docs`, `/research-docs`, `/to-spec`, assignment. Hand-invoked commands (`/wayfinder`, `/to-spec`, `/to-tickets`) and user-run ones
`/to-tickets`) are given to the user as copyable code blocks, and the user running them is the (`/write-docs`, `/research-docs`) are given to the user as copyable code blocks, and the user
approval. running them is the approval.
- `.apm/agents/`: `plan-gate` (step 1), `plan-researcher` (step 3), `plan-validator` (step 4), - `.apm/agents/`: `plan-gate` (step 1), `plan-researcher` (step 3), `plan-validator` (step 4),
read-only (the researcher may write only to the scratchpad), and `plan-recorder` (step 7, the docs PR). read-only (the researcher may write only to the scratchpad), and `plan-recorder` (step 7, the docs PR).
- `.apm/skills/plan-track/`: the track criteria for all three tracks, `wayfinder` included. - `.apm/skills/plan-track/`: the track criteria for all three tracks, `wayfinder` included.