diff --git a/bin/gstack-retro-metrics b/bin/gstack-retro-metrics index fa1801bdd..58c2c0518 100755 --- a/bin/gstack-retro-metrics +++ b/bin/gstack-retro-metrics @@ -297,6 +297,9 @@ echo "PRS_REFERENCED: $(printf '%s' "$_PRS" | wc -w | tr -d ' ')" [ -n "$_PRS" ] && echo "PR_REFS: $_PRS" || true # ── Test health (repo-wide + window) ───────────────────────────────────────── +# Deliberately suffix-only (narrower than is_test's dir-based patterns): the +# repo-wide census counts conventional test FILES; is_test additionally counts +# dir-homed helpers toward test-insertion ratios. _TF_TOTAL=$(git ls-files 2>/dev/null | grep -cE '(\.test\.|\.spec\.|_test\.|_spec\.)' || true) case "$_TF_TOTAL" in ''|*[!0-9]*) _TF_TOTAL=0 ;; esac echo "TEST_FILES_TOTAL: $_TF_TOTAL" diff --git a/lib/gbrain-local-status.ts b/lib/gbrain-local-status.ts index 5398c71a8..92eca2bdd 100644 --- a/lib/gbrain-local-status.ts +++ b/lib/gbrain-local-status.ts @@ -146,9 +146,9 @@ function gbrainConfigPath(env?: NodeJS.ProcessEnv): string { * cwd's NEAREST-ANCESTOR project scope only (#2499 made project scope * visible; the per-project scoping fixes the machine-wide bleed where ONE * project's remote registration reclassified broken local engines as - * thin-client for EVERY cwd). Ancestor matching mirrors the - * GBRAIN_MCP_ENTRY_JQ resolution in - * scripts/resolvers/preamble/generate-brain-sync-block.ts: cwd == key or + * thin-client for EVERY cwd). Ancestor matching mirrors the inline jq + * resolution in bin/gstack-skill-start (the single bash copy of the #2499 + * resolution, moved there in token-reduction Phase 1): cwd == key or * cwd startswith key + separator, longest matching key that actually * carries a gbrain entry wins (a nested project WITHOUT gbrain doesn't * shadow its parent's registration). diff --git a/scripts/resolvers/preamble.ts b/scripts/resolvers/preamble.ts index 155c1e28a..205fe6d2e 100644 --- a/scripts/resolvers/preamble.ts +++ b/scripts/resolvers/preamble.ts @@ -28,8 +28,6 @@ import { generatePlanModeInfo, } from './preamble/generate-completion-status'; -// One-time onboarding prompts - // Host-specific instructions import { generateBrainHealthInstruction } from './preamble/generate-brain-health-instruction'; diff --git a/scripts/resolvers/preamble/generate-brain-sync-block.ts b/scripts/resolvers/preamble/generate-brain-sync-block.ts index bcab045da..e5552b955 100644 --- a/scripts/resolvers/preamble/generate-brain-sync-block.ts +++ b/scripts/resolvers/preamble/generate-brain-sync-block.ts @@ -6,9 +6,10 @@ * daily pull, queue-depth status) now runs inside `bin/gstack-skill-start` * (invoked by the Preamble fence above) and reports through the same STATUS * lines it always emitted: the GBrain hint text and the `ARTIFACTS_SYNC:` - * line. What remains here is the prose the model acts on — including the - * one-time privacy stop-gate, which stays inline until the Phase 2 - * instruction-emission layer moves it behind its runtime gate. + * line. What remains here is the prose the model acts on. The one-time + * privacy stop-gate moved behind its runtime gate in Phase 2: it now arrives + * as a GSTACK_INSTRUCTION block from gstack-skill-start when consent is + * actually pending; this generator only carries the interpretation prose. * * Skill-END sync is no longer a separate fence: `bin/gstack-skill-end` * (invoked by the Telemetry step) drains the queue before logging. diff --git a/scripts/resolvers/question-tuning.ts b/scripts/resolvers/question-tuning.ts index 68dc218ff..e2608daa1 100644 --- a/scripts/resolvers/question-tuning.ts +++ b/scripts/resolvers/question-tuning.ts @@ -33,9 +33,9 @@ Before each AskUserQuestion, choose \`question_id\` from \`${registry}\` or \`{s **Embed the option recommendation via the \`(recommended)\` label suffix** on exactly one option per AUQ. The PreToolUse hook parses \`(recommended)\` first, falls back to "Recommendation: X" prose, and refuses to auto-decide if ambiguous. Two \`(recommended)\` labels = refuse. -After answer, log best-effort (PostToolUse hook also captures deterministically when installed; dedup on (source, tool_use_id) handles double-writes): +After answer, log best-effort (PostToolUse hook also captures deterministically when installed; dedup on (source, tool_use_id) handles double-writes). Substitute \`SESSION_ID\` with the value the preamble's skill-start output echoed — shell variables do not survive between Bash calls: \`\`\`bash -${bin}/gstack-question-log '{"skill":"${ctx.skillName}","question_id":"","question_summary":"","category":"","door_type":"","options_count":N,"user_choice":"","recommended":"","session_id":"'"$_SESSION_ID"'"}' 2>/dev/null || true +${bin}/gstack-question-log '{"skill":"${ctx.skillName}","question_id":"","question_summary":"","category":"","door_type":"","options_count":N,"user_choice":"","recommended":"","session_id":"SESSION_ID"}' 2>/dev/null || true \`\`\` For two-way questions, offer: "Tune this question? Reply \`tune: never-ask\`, \`tune: always-ask\`, or free-form."