From d355df24c7c38b443186ccd09a3bd620220d989e Mon Sep 17 00:00:00 2001 From: garrytan Date: Fri, 2 Oct 2026 23:57:10 +0000 Subject: [PATCH] plan-ceo-review: remove the handoff-note reader and cleanup for files nothing writes (s04 F6, s04 F7) CEO handoff notes (*-ceo-handoff-*.md) have not been written since v0.11.5.1; no template, resolver or bin script produces them. The reader cost a bash call on every CEO run, depended on $SLUG/$BRANCH from another shell, and looked under $GSTACK_STATE_ROOT where pre-state-root notes never lived. W7a pin: test/skill-ceo-section-ordering.test.ts:320 sliced up to the removed '## Handoff Note Cleanup' heading; it now slices to the next heading ('## Review Log') with the same assertions. Note: the ceo-mode-option / ceo-mode-prerequisite PTY cases fail under the image's Bun 1.3.14 with or without this change and pass under Bun 1.4.0. expected red until the regeneration commit --- plan-ceo-review/SKILL.md.tmpl | 12 ------------ plan-ceo-review/sections/review-sections.md.tmpl | 12 ------------ test/skill-ceo-section-ordering.test.ts | 2 +- 3 files changed, 1 insertion(+), 25 deletions(-) diff --git a/plan-ceo-review/SKILL.md.tmpl b/plan-ceo-review/SKILL.md.tmpl index 6c61ded66..2c296a70b 100644 --- a/plan-ceo-review/SKILL.md.tmpl +++ b/plan-ceo-review/SKILL.md.tmpl @@ -116,18 +116,6 @@ BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null | tr '/' '-' || echo 'no-br ``` Read any `/office-hours` design doc as the problem, constraints and approach source of truth. `Supersedes:` marks a revised design. -**Handoff note check** (reuses $SLUG and $BRANCH from the design doc check above): -```bash -eval "$(~/.claude/skills/gstack/bin/gstack-paths)"; : "${GSTACK_STATE_ROOT:?gstack-paths failed; reinstall with ./setup or /gstack-upgrade}" -setopt +o nomatch 2>/dev/null || true # zsh compat -HANDOFF=$(ls -t "$GSTACK_STATE_ROOT"/projects/$SLUG/*-$BRANCH-ceo-handoff-*.md 2>/dev/null | head -1) -[ -n "$HANDOFF" ] && echo "HANDOFF_FOUND: $HANDOFF" || echo "NO_HANDOFF" -``` -In a separate shell, first recompute $SLUG and $BRANCH with the design-doc commands. -Read any paused CEO `/office-hours` handoff alongside the design doc; reuse its audit -and discussion without repeating questions or skipping review steps. Tell the user: -"Found a handoff note from your prior CEO review session. I'll use that context to pick up where we left off." - {{BENEFITS_FROM}} **Mid-session detection (0A):** If the user cannot articulate a stable problem, says "I'm not sure" diff --git a/plan-ceo-review/sections/review-sections.md.tmpl b/plan-ceo-review/sections/review-sections.md.tmpl index 4e62799f3..323551f02 100644 --- a/plan-ceo-review/sections/review-sections.md.tmpl +++ b/plan-ceo-review/sections/review-sections.md.tmpl @@ -520,18 +520,6 @@ complete plan, report and summary as not persisted, then use **Gate outcome: Blocked**. This delivers the review content without claiming saved completion; skip Review Log, success telemetry and the next-skill handoff. -## Handoff Note Cleanup - -After producing the Completion Summary, remove this branch's handoff notes only if the storage policy permits cleanup. Otherwise retain them and report that cleanup was not performed. - -```bash -eval "$(~/.claude/skills/gstack/bin/gstack-paths)"; : "${GSTACK_STATE_ROOT:?gstack-paths failed; reinstall with ./setup or /gstack-upgrade}" -setopt +o nomatch 2>/dev/null || true # zsh compat -# gstack-slug prints both SLUG and BRANCH; eval sets them in this shell. -{{SLUG_EVAL}} -rm -f "$GSTACK_STATE_ROOT"/projects/$SLUG/*-$BRANCH-ceo-handoff-*.md 2>/dev/null || true -``` - ## Review Log Attempt these history writes only after the plan/report's successful write and diff --git a/test/skill-ceo-section-ordering.test.ts b/test/skill-ceo-section-ordering.test.ts index c41f3b609..f2e4c7bdd 100644 --- a/test/skill-ceo-section-ordering.test.ts +++ b/test/skill-ceo-section-ordering.test.ts @@ -317,7 +317,7 @@ test('CEO output stages prepare body before report and publish only after verifi expect(section).toContain('no stage depends on a completion log written later'); expect(section).toContain('After the report Read-back gate passes'); expect(section).toContain('Do not append it after the report in the file'); - const chat = section.slice(section.indexOf('If no plan/report write is permitted'), section.indexOf('## Handoff Note Cleanup')); + const chat = section.slice(section.indexOf('If no plan/report write is permitted'), section.indexOf('## Review Log')); expect(chat).toContain('complete plan, report and summary as not persisted, then use **Gate outcome: Blocked**'); expect(chat).toContain('without claiming saved completion'); expect(chat).toContain('skip Review Log, success telemetry and the next-skill handoff');