Skip to content

fix(ce-plan): inline handoff menu so post-plan options are never skipped#615

Merged
tmchow merged 1 commit intomainfrom
tmchow/ce-plan-handoff-eval
Apr 20, 2026
Merged

fix(ce-plan): inline handoff menu so post-plan options are never skipped#615
tmchow merged 1 commit intomainfrom
tmchow/ce-plan-handoff-eval

Conversation

@tmchow
Copy link
Copy Markdown
Collaborator

@tmchow tmchow commented Apr 20, 2026

Summary

Agents running ce-plan could write the plan file, offer to start /ce-work in prose, and stop, skipping the blocking post-generation menu that should gate the handoff. This PR restructures the final phase so the menu cannot be missed.

What was happening

SKILL.md deferred both the trigger action (present the menu) and the branching logic (issue creation, Proof HITL flow) to references/plan-handoff.md. The confidence-check "passed" exit in 5.3.2 pointed to Phase 5.3.8 by section number. The 5.3.8 to 5.4 stub in turn said, in passive voice, "read this reference file when reaching this phase." The skill then ended with NEVER CODE! Research, decide, and write the plan., which reads as a terminal completion admonition.

On the common path where the confidence check passed and no deepening was needed, the agent never re-entered the skill body at 5.3.8, never loaded the reference, and treated writing the plan as the final act.

Fix

  • The 5.3.2 exit is now imperative: load references/plan-handoff.md now and execute 5.3.8, 5.3.9, 5.4 in sequence. The load is the instruction, not a section signpost.
  • The 5.3.8 to 5.4 stub now inlines the menu question and its 4 options directly in SKILL.md. Branching (issue creation, Proof HITL, post-HITL resync) stays in the reference.
  • A new Completion check at the terminal position tells the agent it is not done until the menu has been presented.
  • NEVER CODE moves to Phase 4, where implementation temptation is actually live. The final line is no longer a behavior guardrail that reads as a stop signal.
  • Pipeline-mode exception remains explicit for LFG/SLFG contexts.

The extraction architecture (offload detailed branching to a reference) is preserved. Only the trigger (the 10-line menu itself) moves inline. Pattern: defer branching, never defer the trigger.

Test plan

  • Run /ce-plan on a low-risk scenario where the confidence check exits early. Confirm the agent loads plan-handoff.md, runs ce-doc-review, and presents the blocking menu before stopping.
  • Confirm pipeline-mode (LFG/SLFG) still skips the menu and returns control to the caller.

Compound Engineering
Claude Code

The 5.3.8-5.4 section deferred both the trigger (present the menu) and
branching (issue creation, Proof flow) to references/plan-handoff.md.
Agents reaching the "confidence check passed" exit would stop after
writing the plan, never loading the reference, and instead offer to
start ce-work in prose.

Fixes:
- 5.3.2 "no deepening" exit now imperatively loads the reference
- 5.3.8-5.4 stub now inlines the menu question + 4 options; branching
  logic stays in the reference
- Terminal line replaced with an explicit completion check
- "NEVER CODE" moved to Phase 4 (where implementation temptation is live)
@tmchow tmchow merged commit 9497a00 into main Apr 20, 2026
2 checks passed
@tmchow tmchow mentioned this pull request Apr 20, 2026
This was referenced Apr 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant