You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(hook): add score floor HOK_MIN_SCORE=0.3 to silence weak matches (HOK-01)
The hook took the top-5 matches by rank, ignoring r.score, so incidental single-keyword matches (~0.1-0.25) leaked irrelevant pointers (observed: claude-guardian/duel-system on a memory-os prompt). Add a calibrated min-score floor: against the live 336-entry index, noise tops out ~0.25 and genuine topical matches begin ~0.33+, so 0.3 delivers the design's 'below-threshold -> emit nothing'. Recall on keyword-rich entries (game canon) is a separate Phase-2 keyword-curation concern. smoke-test.ps1 now does a mirror-vs-live drift check (HOK-05) and runs under a scratch HOME so it never writes the live usage.jsonl.
Applied to mirror + live (byte-identical, hash 21879425...); live backup at loadout-hook.mjs.bak-pre-hok01-20260616. settings.json wiring unchanged. Verified: noise/off-topic prompts silent, strong matches preserved, ~51ms.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Write-Output"WARN: no live index at $liveIndex — matching will be empty"
51
+
}
52
+
53
+
# Redirect the hook's homedir() (USERPROFILE on Windows) to the scratch dir so
54
+
# usage events land in scratch, never the live ~/.ai-loadout/usage.jsonl.
55
+
$origUserProfile=$env:USERPROFILE
56
+
$origHome=$env:HOME
57
+
$env:USERPROFILE=$scratch
58
+
$env:HOME=$scratch
3
59
4
60
$prompts=@(
5
61
@{ label='1. GAME prompt (Star Freight visual canon)';
6
62
payload=@{ prompt='I want to update the Star Freight visual canon — the Renna identity packet needs a new portrait variant. Open the right canon paths and the workflow profile.' } },
7
63
@{ label='2. TOOL prompt (shipcheck a repo before publish)';
8
64
payload=@{ prompt='Run shipcheck audit on the role-os repo before npm publish — full treatment afterwards if it passes.' } },
0 commit comments