From d4fba5beb43dc1cd8c4376ce50f455ec2e2bfcbd Mon Sep 17 00:00:00 2001 From: garrytan Date: Fri, 2 Oct 2026 23:42:38 +0000 Subject: [PATCH] fix(preamble): progress notes on phase changes, not a [PROGRESS] cadence (s01 M2) Context Health told the model to periodically write a tagged [PROGRESS] summary. No code reads that tag; the line now says when to tell the user (finishing a phase or changing direction). Loop detection stays. W7a pin: test/terse-build.test.ts:103 pinned 'PROGRESS'; it now checks the default build emits a non-empty Context Health body (terse still emits ''). --- scripts/resolvers/preamble/generate-context-health.ts | 2 +- test/terse-build.test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/resolvers/preamble/generate-context-health.ts b/scripts/resolvers/preamble/generate-context-health.ts index 88b058406..f0e1d402e 100644 --- a/scripts/resolvers/preamble/generate-context-health.ts +++ b/scripts/resolvers/preamble/generate-context-health.ts @@ -4,7 +4,7 @@ export function generateContextHealth(ctx?: TemplateContext): string { if (ctx?.explainLevel === 'terse') return ''; return `## Context Health (soft directive) -During long-running skill sessions, periodically write a brief \`[PROGRESS]\` summary: done, next, surprises. +During long-running skill sessions, when you finish a phase or change direction, tell the user in a sentence or two what is done, what is next, and anything surprising. If you are looping on the same diagnostic, same file, or failed fix variants, STOP and reassess. Consider escalation or /context-save. Progress summaries must NEVER mutate git state.`; } diff --git a/test/terse-build.test.ts b/test/terse-build.test.ts index 58ed10396..ea5c69529 100644 --- a/test/terse-build.test.ts +++ b/test/terse-build.test.ts @@ -100,7 +100,7 @@ describe('terse build — per-resolver behavior', () => { test('default: emits full section', () => { const out = generateContextHealth(makeCtx('default')); expect(out).toContain('## Context Health'); - expect(out).toContain('PROGRESS'); + expect(out.replace(/^## Context Health.*$/m, '').trim().length).toBeGreaterThan(80); }); test('terse: returns empty string', () => {