refactor: remove vestigial plan-mode handshake resolver

Delete scripts/resolvers/preamble/generate-plan-mode-handshake.ts and
its four question-registry entries. Split the authoritative
"Plan Mode Safe Operations" and "Skill Invocation During Plan Mode"
sections out of generate-completion-status.ts into a sibling
generatePlanModeInfo() export in the same module, wired at preamble
position 1 where the handshake used to live. Same text, new position.

The vestigial handshake told interactive review skills to emit an
A=exit-and-rerun / C=cancel AskUserQuestion before running their
interactive STOP-Ask workflow. That contradicted the authoritative
rule at the tail of completion-status.ts saying AskUserQuestion
satisfies plan mode's end-of-turn requirement. Skills now run
directly when invoked in plan mode, with each finding gated by
AskUserQuestion just like outside plan mode.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Garry Tan
2026-04-24 01:58:59 -07:00
parent 2014557e7f
commit e25b83d311
4 changed files with 46 additions and 204 deletions
-39
View File
@@ -261,45 +261,6 @@ export const QUESTIONS = {
description: "Approve the design doc, revise sections, or start over?",
},
// -----------------------------------------------------------------------
// Plan-mode handshake — fires at the top of any interactive review skill
// when the user is in plan mode. Safety-critical, always asked regardless
// of user's tuning preferences. See scripts/resolvers/preamble/generate-
// plan-mode-handshake.ts.
// -----------------------------------------------------------------------
'plan-ceo-review-plan-mode-handshake': {
id: 'plan-ceo-review-plan-mode-handshake',
skill: 'plan-ceo-review',
category: 'routing',
door_type: 'one-way',
options: ['exit-and-rerun', 'cancel'],
description: "Plan mode detected — exit and rerun interactively, or cancel?",
},
'plan-eng-review-plan-mode-handshake': {
id: 'plan-eng-review-plan-mode-handshake',
skill: 'plan-eng-review',
category: 'routing',
door_type: 'one-way',
options: ['exit-and-rerun', 'cancel'],
description: "Plan mode detected — exit and rerun interactively, or cancel?",
},
'plan-design-review-plan-mode-handshake': {
id: 'plan-design-review-plan-mode-handshake',
skill: 'plan-design-review',
category: 'routing',
door_type: 'one-way',
options: ['exit-and-rerun', 'cancel'],
description: "Plan mode detected — exit and rerun interactively, or cancel?",
},
'plan-devex-review-plan-mode-handshake': {
id: 'plan-devex-review-plan-mode-handshake',
skill: 'plan-devex-review',
category: 'routing',
door_type: 'one-way',
options: ['exit-and-rerun', 'cancel'],
description: "Plan mode detected — exit and rerun interactively, or cancel?",
},
// -----------------------------------------------------------------------
// /plan-ceo-review — scope & strategy
// -----------------------------------------------------------------------