fix(ce-plan): inline post-generation menu routing so option 1 actually starts /ce-work#715
Conversation
…y starts /ce-work
Phase 5.4 presents a 4-option menu (Start /ce-work, Create Issue,
Open in Proof, Done for now). The per-option routing lived only in
references/plan-handoff.md, so an agent that didn't load the reference
rendered the menu, captured the user's selection, and stopped — without
firing the routed action. Even an agent that loaded the reference saw
ambiguous language ("Call /ce-work with the plan path") that could be
read as "tell the user to type /ce-work" rather than "fire the Skill
tool now."
Fix:
- Inline a Routing block in SKILL.md Phase 5.4 with one explicit action
per menu option. Use platform-explicit invocation language naming the
skill-invocation primitive (Skill in Claude Code, equivalent on
Codex/Gemini/Pi) and the plan path as the argument.
- Mirror the platform-explicit phrasing in references/plan-handoff.md so
both surfaces converge. The reference still owns the elaborate
sub-flows (Proof HITL state machine, Issue Creation tracker detection,
post-HITL ce-doc-review resync, upload-failure fallback).
- Add tests/skills/ce-plan-handoff-routing.test.ts as a regression guard
asserting all four inline routing lines are present and that the
Start /ce-work routing names both the skill-invocation primitive and
the plan path.
- Document the underlying authoring principle in docs/solutions/skill-
design/post-menu-routing-belongs-inline-2026-04-28.md: always-on
routing belongs inline; only conditional, multi-step sub-flows belong
in references.
Closes EveryInc#714.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0aaa9da0ca
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
tmchow
left a comment
There was a problem hiding this comment.
Two inline comments below.
…TOP-tier load + prose trim) Three review items, all valid: - Codex P2 (tests/skills/ce-plan-handoff-routing.test.ts): the inline-routing regex used `\s*` around the action separator, which consumed newlines, so a bullet with no action text on its own line could match by spilling into the next bullet's leading `-`. The first test in this file would silently pass on a real regression. Tighten the inter-token gaps to `[ \t]*` and require `[^\n]+` of action text on the same line. Add a dedicated negative-case test that proves the fix: a hand-rolled fixture with an empty-action bullet followed by a legitimate bullet must not match the routing regex (and a same-line shape still does). - tmchow inline (SKILL.md L899): the routing block carried a second sentence — "stated inline below so it cannot be missed" — that was authoring rationale, not agent behavior. AGENTS.md Rationale Discipline says cut anything that wouldn't change agent behavior; the rationale lives in the new `docs/solutions/` entry already. Apply the verbatim suggestion: a two-sentence header. - tmchow inline (SKILL.md L887): the existing "Load `references/plan-handoff.md` now" line was below STOP-tier — its "do not skip" attached to document review, not the load itself. Replace with the STOP-tier paragraph that matches `ce-brainstorm/SKILL.md:216` and `ce-ideate/SKILL.md:345` (STOP + non-optional + named failure mode). This is the actual root-cause hardening for issue EveryInc#714: an agent that doesn't load the reference now sees a STOP instruction, an explicit "non-optional" tag, and the exact failure mode (renders menu, captures selection, stops without firing the routed action) it would otherwise repeat. bun test tests/skills/ce-plan-handoff-routing.test.ts: 4 pass, 0 fail bun run release:validate: clean
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d008977792
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Closes #714.
Summary
ce-planPhase 5.4 presents a 4-option post-generation menu where option 1 is "Start `/ce-work` (Recommended)". The per-option routing lived only in `references/plan-handoff.md`. Two failure modes followed:Reproduced live on 2026-04-28: user picked option 1, agent acknowledged the choice in prose, and stopped without invoking `ce-work`.
Changes
Why scope this way
The plugin's `AGENTS.md` "Conditional and Late-Sequence Extraction" rule says to extract conditional or late-sequence content. The bare per-option routing is late-sequence but not conditional — option 1 always means "invoke ce-work." The same AGENTS.md, in "Skill Design Principles," already says: "For load-bearing rules (those that MUST fire reliably), put strong language at the top of the relevant phase in SKILL.md, not just in the reference." This PR applies that principle to Phase 5.4 routing while keeping genuinely conditional flows (HITL, Issue Creation) in the reference.
Verification
Test plan