From 51f1d947eec5224055107e49b1800757e1891544 Mon Sep 17 00:00:00 2001 From: garrytan Date: Sat, 3 Oct 2026 01:47:06 +0000 Subject: [PATCH] test(W7h): pin the CEO /office-hours prerequisite structure free MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replacement check for the plan-ceo-review-benefits paid retirement (t14 F7). The paid case had a model summarize plan-ceo-review/SKILL.md and grep the summary for "office hours" and "design doc". The rendered text is static, so this free test checks it directly: the Prerequisite Skill Offer triggers on the design-doc check's "No design doc found", offers 'A) Run /office-hours now' and 'B) Skip — proceed with standard review', does not re-offer later in the session, and Mid-session detection (0A) offers `/office-hours`. Per the Eng Retirements item, CEO invariants become periodic-only once this gate case retires, so they keep this structural free check. Control (scratch worktree, generated plan-ceo-review/SKILL.md): removing the /office-hours option, the no-design-doc trigger, the mid-session offer or the no-re-offer rule goes red; rewording the pitch stays green (5/5). Log: .context/mutation-ceo-benefits.md. --- test/gen-skill-docs.test.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/gen-skill-docs.test.ts b/test/gen-skill-docs.test.ts index 09e316689..7ed82d5b7 100644 --- a/test/gen-skill-docs.test.ts +++ b/test/gen-skill-docs.test.ts @@ -1859,6 +1859,17 @@ describe('BENEFITS_FROM resolver', () => { expect(ceoContent).toContain('/office-hours'); }); + test('plan-ceo-review offers /office-hours when no design doc exists and detects a lost user mid-session', () => { + const offer = extractMarkdownSection(ceoContent, '## Prerequisite Skill Offer'); + expect(offer.replace(/\s+/g, ' ')).toMatch(/when the design doc check above prints "No design doc found,?"/i); + expect(offer).toContain('A) Run /office-hours now'); + expect(offer).toContain('B) Skip — proceed with standard review'); + expect(offer).toMatch(/do not re-offer later in the session/i); + expect(ceoContent).toContain('**Mid-session detection (0A):**'); + const midSession = ceoContent.indexOf('**Mid-session detection (0A):**'); + expect(ceoContent.slice(midSession, midSession + 300)).toMatch(/offer `\/office-hours`/); + }); + test('plan-eng-review contains prerequisite skill offer', () => { expect(engContent).toContain('Prerequisite Skill Offer'); expect(engContent).toContain('/office-hours');