From b00a0f19b0ff1ce3f9a52ef12030103b7022350a Mon Sep 17 00:00:00 2001 From: garrytan Date: Fri, 2 Oct 2026 23:43:51 +0000 Subject: [PATCH] fix(proactive): PROACTIVE=false means no suggestions, including 'want me to run /X?' (W5.1) The router forbade suggesting skills when PROACTIVE is false while the preamble told the model to ask 'want me to run it?'. Decision: false means never auto-invoke and never suggest, including by asking. The preamble line in generate-upgrade-check.ts now matches the router, and both quote the value as `false`, the way gstack-skill-start prints it. Restore with gstack-config set proactive true. W7a pin: test/gen-skill-docs.test.ts:4488 used the old quoted sentence as a preamble-order marker; it now finds the PROACTIVE-false rule with a quote-tolerant, case-insensitive pattern. --- SKILL.md.tmpl | 7 ++++--- scripts/resolvers/preamble/generate-upgrade-check.ts | 2 +- test/gen-skill-docs.test.ts | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/SKILL.md.tmpl b/SKILL.md.tmpl index 16b0b3428..e0c33a2da 100644 --- a/SKILL.md.tmpl +++ b/SKILL.md.tmpl @@ -46,9 +46,10 @@ output echoed: ~/.claude/skills/gstack/bin/gstack-telemetry-log --event-type route --skill gstack --outcome ROUTE_OUTCOME --session-id "SESSION_ID" 2>/dev/null || true ``` -If `PROACTIVE` is `false`: do NOT proactively invoke or suggest other gstack skills during -this session. Only run skills the user explicitly invokes. This preference persists across -sessions via `gstack-config`. +If `PROACTIVE` is `false`: do not proactively invoke or suggest other gstack skills during +this session, including by asking whether to run one ("want me to run /X?"). Only run +skills the user explicitly invokes. This preference persists across sessions via +`gstack-config`. If `PROACTIVE` is `true` (default): **invoke the Skill tool** when the user's request matches a skill's purpose. Do NOT answer directly when a skill exists for the task. diff --git a/scripts/resolvers/preamble/generate-upgrade-check.ts b/scripts/resolvers/preamble/generate-upgrade-check.ts index ff226f140..bf77ddb7b 100644 --- a/scripts/resolvers/preamble/generate-upgrade-check.ts +++ b/scripts/resolvers/preamble/generate-upgrade-check.ts @@ -8,7 +8,7 @@ import type { TemplateContext } from '../types'; * the fence prose scopes and the model follows. */ export function generateUpgradeCheck(ctx: TemplateContext): string { - return `If \`PROACTIVE\` is \`"false"\`, do not auto-invoke or proactively suggest skills. If a skill seems useful, ask: "I think /skillname might help here — want me to run it?" + return `If \`PROACTIVE\` is \`false\`, do not auto-invoke or suggest skills, including by asking whether to run one. Only run skills the user explicitly invokes. If \`SKILL_PREFIX\` is \`"true"\`, suggest/invoke \`/gstack-*\` names. Disk paths stay \`${ctx.paths.skillRoot}/[skill-name]/SKILL.md\`.`; } diff --git a/test/gen-skill-docs.test.ts b/test/gen-skill-docs.test.ts index 709461d2a..0d12ac2f4 100644 --- a/test/gen-skill-docs.test.ts +++ b/test/gen-skill-docs.test.ts @@ -4485,7 +4485,7 @@ describe('plan-mode-info resolver (handshake-replacement)', () => { 'utf-8', ); const planModeIdx = content.indexOf(PLAN_MODE_INFO_MARKER); - const upgradeIdx = content.indexOf('If `PROACTIVE` is `"false"`'); + const upgradeIdx = content.search(/If `PROACTIVE` is `"?false"?`/i); expect(planModeIdx).toBeGreaterThan(0); expect(upgradeIdx).toBeGreaterThan(0); expect(planModeIdx).toBeLessThan(upgradeIdx);