@tekyzinc/gsd-t 5.16.11 → 5.16.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,41 @@
2
2
 
3
3
  All notable changes to GSD-T are documented here. Updated with each release.
4
4
 
5
+ ## [5.16.12] - 2026-08-29
6
+
7
+ ### Fixed — a retired hook fired on every tool call, on every machine, since M61
8
+
9
+ An audit of installed hooks against what the installer registers found all 16
10
+ expected hooks present and correct — plus one that should not have been there.
11
+
12
+ M61 deleted `scripts/gsd-t-context-meter.js` (native `/context` replaced it) and
13
+ unwired the subsystem from `init()` and `doctor()`. `install()` was missed, so it
14
+ kept calling `configureContextMeterHooks()` and re-adding a `PostToolUse` hook
15
+ matching `*` on every install and every update.
16
+
17
+ **It never errored, which is why it survived eight months.** The command is
18
+ guarded `[ -f … ] && node … || true`, so on every single tool call it spawned a
19
+ bash + `npm root -g` subprocess, found nothing, and exited 0 silently — a real
20
+ cost with no signal.
21
+
22
+ The fix is two parts, because dropping the registration alone fixes nobody: a
23
+ machine that installed the hook once keeps running it out of its own
24
+ `settings.json`, and the installer is the only thing that reaches those machines.
25
+
26
+ - `bin/gsd-t.js`: removed the `configureContextMeterHooks()` call from `install()`
27
+ - `bin/gsd-t.js`: added the marker to `removeRetiredHooks()`, so existing machines
28
+ get it stripped on their next install — the same mechanism that retired the
29
+ M105 worktree guard
30
+ - `bin/gsd-t.js`: exported `removeRetiredHooks` — it was not testable from
31
+ outside at all, which is part of why this went unnoticed
32
+ - `test/m61-context-meter-hook-retired.test.js`: 6 regression tests, mutation-tested
33
+ by reverting each half of the fix
34
+ - `.gsd-t/contracts/graph-metrics-contract.md`: stale line citation for `doMetrics`
35
+ (:5486 → :5488), shifted by the edit above and caught by the M99 contract-line test
36
+
37
+ `configureContextMeterHooks` and `removeContextMeterHook` stay defined for the
38
+ uninstall path. No migration needed — the next `gsd-t update` removes the hook.
39
+
5
40
  ## [5.16.11] - 2026-08-27
6
41
 
7
42
  ### Fixed — the voice fix was the wrong fix, and the gate was measuring the wrong thing
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # GSD-T: Contract-Driven Development for Claude Code
2
2
 
3
- **v5.16.11** - A methodology for reliable, parallelizable development using Claude Code with optional Agent Teams support.
3
+ **v5.16.12** - A methodology for reliable, parallelizable development using Claude Code with optional Agent Teams support.
4
4
 
5
5
  **Eliminates context rot** — task-level fresh dispatch (one subagent per task, ~10-20% context each) means compaction never triggers.
6
6
  **Compaction-proof debug loops** — `gsd-t headless --debug-loop` runs test-fix-retest cycles as separate `claude -p` sessions. A JSONL debug ledger persists all hypothesis/fix/learning history across fresh sessions. Anti-repetition preamble injection prevents retrying failed hypotheses. Escalation tiers (sonnet → opus → human) and a hard iteration ceiling enforced externally.
package/bin/gsd-t.js CHANGED
@@ -1205,11 +1205,16 @@ function removeInterceptHooks(settingsPath) {
1205
1205
  // session signal, but subagents write those too, so one session with agents
1206
1206
  // looked like several colliding sessions and the guard blocked its own user.
1207
1207
  //
1208
+ // gsd-t-context-meter — M61, script deleted; native /context replaced it.
1209
+ // init() stopped provisioning it then, but install() kept re-registering it,
1210
+ // so every machine still runs it on EVERY tool call: a bash + `npm root -g`
1211
+ // subprocess spawned to look for a file that no longer ships.
1212
+ //
1208
1213
  // Throws on any failure. A retired hook that silently survives keeps blocking
1209
1214
  // edits forever, so "could not remove it" must stop the install loudly rather
1210
1215
  // than report success.
1211
1216
  function removeRetiredHooks(settingsPath) {
1212
- const RETIRED_HOOK_MARKERS = ["gsd-t-worktree-guard"];
1217
+ const RETIRED_HOOK_MARKERS = ["gsd-t-worktree-guard", CONTEXT_METER_HOOK_MARKER];
1213
1218
  const targetPath = settingsPath || SETTINGS_JSON;
1214
1219
  if (!fs.existsSync(targetPath)) return { removed: 0 };
1215
1220
 
@@ -2285,13 +2290,10 @@ async function doInstall(opts = {}) {
2285
2290
  heading("Global Bin Tools (~/.claude/bin/)");
2286
2291
  installGlobalBinTools();
2287
2292
 
2288
- heading("Context Meter (PostToolUse)");
2289
- const cmHook = configureContextMeterHooks(SETTINGS_JSON);
2290
- if (cmHook.installed) {
2291
- if (cmHook.action === "added") success("Context meter PostToolUse hook added");
2292
- else if (cmHook.action === "updated") success("Context meter hook command refreshed");
2293
- else info("Context meter hook already configured");
2294
- }
2293
+ // M61: Context Meter retired (scripts/gsd-t-context-meter.js deleted; native
2294
+ // /context replaces it). The configureContextMeterHooks() call that stood here
2295
+ // re-registered a PostToolUse hook pointing at that deleted script on every
2296
+ // install. removeRetiredHooks() below now strips it instead.
2295
2297
 
2296
2298
  heading("Graph-Intercept (PostToolUse on Grep — M97)");
2297
2299
  const giHook = configureGraphInterceptHook(SETTINGS_JSON);
@@ -2318,7 +2320,7 @@ async function doInstall(opts = {}) {
2318
2320
 
2319
2321
  const retired = removeRetiredHooks(SETTINGS_JSON);
2320
2322
  if (retired.removed > 0) {
2321
- success(`Removed ${retired.removed} retired hook(s) from settings.json (worktree-collision guard — M105)`);
2323
+ success(`Removed ${retired.removed} retired hook(s) from settings.json (worktree-collision guard — M105; context meter — M61)`);
2322
2324
  }
2323
2325
 
2324
2326
  // M105 worktree-collision guard RETIRED (2026-08-08). It detected sessions from
@@ -5610,6 +5612,7 @@ module.exports = {
5610
5612
  installContextMeter,
5611
5613
  configureContextMeterHooks,
5612
5614
  removeContextMeterHook,
5615
+ removeRetiredHooks,
5613
5616
  // M97/M98: intercept hook installers
5614
5617
  configureGraphInterceptHook,
5615
5618
  configureReadInterceptHook,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tekyzinc/gsd-t",
3
- "version": "5.16.11",
3
+ "version": "5.16.12",
4
4
  "description": "GSD-T: Contract-Driven Development for Claude Code — 54 slash commands with headless-by-default workflow spawning, unattended supervisor relay with event stream, graph-powered code analysis, real-time agent dashboard, task telemetry, doc-ripple enforcement, backlog management, impact analysis, test sync, milestone archival, and PRD generation",
5
5
  "author": "Tekyz, Inc.",
6
6
  "license": "MIT",