mirror of
https://github.com/garrytan/gstack.git
synced 2026-08-18 12:07:14 +02:00
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:
co-authored by
Claude Opus 4.7
parent
2014557e7f
commit
e25b83d311
@@ -22,9 +22,11 @@ import { generateQuestionTuning } from './question-tuning';
|
||||
|
||||
// Core bootstrap
|
||||
import { generatePreambleBash } from './preamble/generate-preamble-bash';
|
||||
import { generatePlanModeHandshake } from './preamble/generate-plan-mode-handshake';
|
||||
import { generateUpgradeCheck } from './preamble/generate-upgrade-check';
|
||||
import { generateCompletionStatus } from './preamble/generate-completion-status';
|
||||
import {
|
||||
generateCompletionStatus,
|
||||
generatePlanModeInfo,
|
||||
} from './preamble/generate-completion-status';
|
||||
|
||||
// One-time onboarding prompts
|
||||
import { generateLakeIntro } from './preamble/generate-lake-intro';
|
||||
@@ -79,13 +81,12 @@ export function generatePreamble(ctx: TemplateContext): string {
|
||||
}
|
||||
const sections = [
|
||||
generatePreambleBash(ctx),
|
||||
// Plan-mode handshake at position 1: after bash (so _SESSION_ID / _BRANCH /
|
||||
// _TEL env vars are live for the synchronous telemetry write) and before
|
||||
// all onboarding AskUserQuestion gates (so fresh-install users in plan mode
|
||||
// see the handshake first, not drowned in telemetry / proactive / routing
|
||||
// prompts). Host-scoped to Claude + interactive-frontmatter-scoped inside
|
||||
// the resolver — no-op for every other skill/host combination.
|
||||
generatePlanModeHandshake(ctx),
|
||||
// Plan-mode-skill semantics at position 1: after bash (so _SESSION_ID /
|
||||
// _BRANCH / _TEL env vars are live) and before all onboarding gates so
|
||||
// models read the authoritative "AskUserQuestion satisfies plan mode's
|
||||
// end-of-turn" rule before any other instruction. Renders for all skills
|
||||
// (not interactive-gated); the text applies universally.
|
||||
generatePlanModeInfo(ctx),
|
||||
generateUpgradeCheck(ctx),
|
||||
generateWritingStyleMigration(ctx),
|
||||
generateLakeIntro(),
|
||||
|
||||
Reference in New Issue
Block a user