From 57ccafd933373d9645c1dcaf8c1bb2bacabb488f Mon Sep 17 00:00:00 2001 From: garrytan Date: Tue, 6 Oct 2026 21:02:06 +0000 Subject: [PATCH] fix(office-hours): the reviewer receipt must match the receipt grammar before the check runs Co-authored-by: dgrant --- office-hours/sections/design-and-handoff.md | 5 +++-- scripts/resolvers/spec-review.ts | 5 +++-- test/gen-skill-docs.test.ts | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/office-hours/sections/design-and-handoff.md b/office-hours/sections/design-and-handoff.md index 516097fe1..2fd40eb76 100644 --- a/office-hours/sections/design-and-handoff.md +++ b/office-hours/sections/design-and-handoff.md @@ -214,10 +214,11 @@ customer facts from committed behavior, and requires evidence for every prior st After each verdict, BEFORE fixing any findings or dispatching again, validate the saved files with the helper. Pass the reviewer's entire response unchanged as the -receipt and list every completed round in order: +receipt (a lone `OFFICE_HOURS_VERDICT` line; with a quote, backtick, `$` or `\` it is +malformed) and list every completed round in order: ```bash -~/.claude/skills/gstack/bin/gstack-office-hours-review check --receipt "" "" "" "" +~/.claude/skills/gstack/bin/gstack-office-hours-review check --receipt "" "" "" "" ``` A missing, malformed, or mismatched receipt fails the check: that attempt is a failed review. diff --git a/scripts/resolvers/spec-review.ts b/scripts/resolvers/spec-review.ts index ccd36ad58..7b000d3ac 100644 --- a/scripts/resolvers/spec-review.ts +++ b/scripts/resolvers/spec-review.ts @@ -72,10 +72,11 @@ customer facts from committed behavior, and requires evidence for every prior st After each verdict, BEFORE fixing any findings or dispatching again, validate the saved files with the helper. Pass the reviewer's entire response unchanged as the -receipt and list every completed round in order: +receipt (a lone \`OFFICE_HOURS_VERDICT\` line; with a quote, backtick, \`$\` or \`\\\` it is +malformed) and list every completed round in order: \`\`\`bash -~/.claude/skills/gstack/bin/gstack-office-hours-review check --receipt "" "" "" "" +~/.claude/skills/gstack/bin/gstack-office-hours-review check --receipt "" "" "" "" \`\`\` A missing, malformed, or mismatched receipt fails the check: that attempt is a failed review. diff --git a/test/gen-skill-docs.test.ts b/test/gen-skill-docs.test.ts index 3ead7c008..0f226e499 100644 --- a/test/gen-skill-docs.test.ts +++ b/test/gen-skill-docs.test.ts @@ -1558,7 +1558,7 @@ describe('SPEC_REVIEW_LOOP resolver', () => { const output = render('office-hours'); const step2 = output.slice(output.indexOf('**Step 2:'), output.indexOf('**Step 3:')); expectMentions(step2, [['before','dispatching','findings']], 'step2'); - ordered(step2, ['gstack-office-hours-review check --receipt ""', 'mismatched receipt fails the check', '- PASS:', '- CONVERGENCE:', '- MAX_ITERATIONS: round 3', '- CONTINUE:', 'gstack-office-hours-review finalize --design']); + ordered(step2, ['gstack-office-hours-review check --receipt ""', 'mismatched receipt fails the check', '- PASS:', '- CONVERGENCE:', '- MAX_ITERATIONS: round 3', '- CONTINUE:', 'gstack-office-hours-review finalize --design']); expectMentions(step2, [['fix only the blocking findings'], ['do not edit for minor findings']], 'step2'); expectMentions(step2, [['do not','re-dispatch','again']], 'step2'); expectMentions(step2, [['do not','generated','section']], 'step2');