@tekyzinc/gsd-t 4.0.14 → 4.0.15

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,18 @@
2
2
 
3
3
  All notable changes to GSD-T are documented here. Updated with each release.
4
4
 
5
+ ## [4.0.15] - 2026-06-01 (M68 update-all Retired-Tool Prune — patch)
6
+
7
+ ### Fixed — update-all now prunes bin tools retired in M61/M65
8
+
9
+ `update-all` kept the propagated 7-tool subset fresh but never deleted tools GSD-T retired — the `DEPRECATED_BIN_STRAYS` sweep list only carried `gsd-t.js`. Result: 22 of 24 registered projects carried 11-17 dead `.cjs` files (the M61/M65 token-telemetry, unattended-relay, headless-spawn, and context-meter clusters), and the "already current" summary masked it. Surfaced when a project appeared not to update.
10
+
11
+ - `bin/gsd-t.js`: added the 17 M61/M65-retired tools to `DEPRECATED_BIN_STRAYS`; generalized the stray sweep so retired `.cjs` are pruned only when they carry a GSD-T provenance marker (`_hasGsdtProvenance`) — a user's same-named file without the marker is left untouched. `gsd-t.js` keeps its bespoke "GSD-T CLI Installer" header match.
12
+ - `test/bin-gsd-t-resilience.test.js`: +2 regression tests (retired-provenance `.cjs` swept; user-authored same-named `.cjs` survives).
13
+ - One-off: pruned 273 retired `.cjs` across the 21 affected projects (proved no live requirers first — the only references were retirement-breadcrumb comments).
14
+
15
+ Suite: 1269 pass / 0 fail / 4 skip — zero regressions.
16
+
5
17
  ## [4.0.14] - 2026-05-29 (M67 Scan Deep Document Phase — patch)
6
18
 
7
19
  ### Added — deterministic deep document cross-population in the scan Workflow
package/bin/gsd-t.js CHANGED
@@ -2473,11 +2473,60 @@ const PROJECT_BIN_TOOLS = [
2473
2473
 
2474
2474
  // Files that older versions of this installer copied into project bin/ but
2475
2475
  // are no longer part of PROJECT_BIN_TOOLS. On each update-all pass, sweep the
2476
- // project's bin/ and remove any stray file that still byte-matches the source
2477
- // copy in this package — that proves it's an old installer artifact, not a
2478
- // user's own file sharing the same name. User-owned files (byte-divergent)
2479
- // are left alone.
2480
- const DEPRECATED_BIN_STRAYS = ["gsd-t.js"];
2476
+ // project's bin/ and remove any stray that carries GSD-T provenance — that
2477
+ // proves it's an old installer artifact, not a user's own file sharing the
2478
+ // name. User-owned files (no GSD-T provenance marker) are left alone.
2479
+ //
2480
+ // M68: the M61/M65 retirement removed the token-telemetry + unattended +
2481
+ // headless-spawn + context-meter clusters from the package and from
2482
+ // PROJECT_BIN_TOOLS, but never added them here — so update-all kept the current
2483
+ // 7 tools fresh while leaving 11-17 dead .cjs lingering in every project's bin/.
2484
+ // Adding them closes that gap so future retirements prune cleanly.
2485
+ // Each retired tool maps to one or more VERBATIM header sentinels it actually
2486
+ // shipped with (recovered from git history at the commit before each was deleted).
2487
+ // A stray is swept only when its content contains the exact product header — proof
2488
+ // it was SHIPPED by this installer, not merely that it mentions "gsd-t". This is the
2489
+ // M68 red-team fix: the prior loose substring (`/gsd-t/` over 1200 chars) would have
2490
+ // deleted a user's own same-named helper that happened to reference a `.gsd-t/` path.
2491
+ // A user file can match only by reproducing a verbatim product header — implausible.
2492
+ const DEPRECATED_BIN_STRAY_SIGNATURES = {
2493
+ "gsd-t.js": ["GSD-T CLI Installer"], // bespoke installer header
2494
+ // M61 D3 — token telemetry / context-runway cluster
2495
+ "gsd-t-token-capture.cjs": ["GSD-T Token Capture", "gsd-t-token-capture"],
2496
+ "token-telemetry.cjs": ["GSD-T Token Telemetry"],
2497
+ "token-budget.cjs": ["GSD-T Token Budget"],
2498
+ "token-optimizer.cjs": ["GSD-T Token Optimizer"],
2499
+ "runway-estimator.cjs": ["GSD-T Runway", "runway-estimator"],
2500
+ // Verbatim shipped comment header (no bare "GSD-T" — red-team HIGH-1: a bare token
2501
+ // would delete a user's same-named file that merely mentions GSD-T).
2502
+ "context-budget-audit.cjs": ["Context Budget Audit — measures the static context cost"],
2503
+ "context-meter-config.cjs": ["Context Meter config loader (M34)"],
2504
+ "context-meter-config.test.cjs": ["context-meter-config"],
2505
+ // M61 D2 — unattended relay + headless spawn cluster
2506
+ "gsd-t-unattended.cjs": ["GSD-T Unattended", "gsd-t-unattended"],
2507
+ "gsd-t-unattended-platform.cjs": ["GSD-T Unattended", "gsd-t-unattended"],
2508
+ "gsd-t-unattended-safety.cjs": ["GSD-T Unattended", "gsd-t-unattended"],
2509
+ "headless-auto-spawn.cjs": ["GSD-T Headless Auto-Spawn"],
2510
+ "headless-exit-codes.cjs": ["GSD-T headless exit-code contract"],
2511
+ "handoff-lock.cjs": ["GSD-T Handoff Lock — Fail-safe sentinel"],
2512
+ "unattended-watch-format.cjs": ["bin/unattended-watch-format.cjs", "unattended watch-tick activity block"],
2513
+ // M61 D1/D4 — misc retired
2514
+ "log-tail.cjs": ["Log Tail — print the last N lines"], // verbatim shipped comment
2515
+ "event-stream.cjs": ["bin/event-stream.cjs", "unattended supervisor watch-tick"],
2516
+ };
2517
+ const DEPRECATED_BIN_STRAYS = Object.keys(DEPRECATED_BIN_STRAY_SIGNATURES);
2518
+
2519
+ // A stray is swept only if its first 1200 chars contain one of the VERBATIM header
2520
+ // sentinels the tool actually shipped with. "Mentions gsd-t" is NOT enough — that
2521
+ // would risk deleting a user's same-named file (red-team HIGH-1). Returns the matched
2522
+ // sentinel (for logging) or null.
2523
+ function _matchedStraySignature(name, content) {
2524
+ const sigs = DEPRECATED_BIN_STRAY_SIGNATURES[name];
2525
+ if (!sigs) return null;
2526
+ const head = content.slice(0, 1200);
2527
+ for (const s of sigs) if (head.includes(s)) return s;
2528
+ return null;
2529
+ }
2481
2530
 
2482
2531
  function copyBinToolsToProject(projectDir, projectName) {
2483
2532
  const projectBinDir = path.join(projectDir, "bin");
@@ -2537,19 +2586,15 @@ function copyBinToolsToProject(projectDir, projectName) {
2537
2586
  if (!fs.existsSync(strayPath)) continue;
2538
2587
  try {
2539
2588
  const strayContent = fs.readFileSync(strayPath, "utf8");
2540
- const head = strayContent.slice(0, 400);
2541
- // Signature-match any version this installer ever shipped. The marker
2542
- // is unique enough to rule out user-owned files: node shebang + the
2543
- // verbatim JSDoc header "GSD-T CLI Installer". Matches every historical
2544
- // version of bin/gsd-t.js, not just the current one, so older strays
2545
- // (e.g. v3.13.11 left behind on v3.13.12+) are still swept.
2546
- const isOurs =
2547
- head.startsWith("#!/usr/bin/env node") &&
2548
- head.includes("GSD-T CLI Installer");
2549
- if (isOurs) {
2589
+ const matched = _matchedStraySignature(stray, strayContent);
2590
+ if (matched) {
2550
2591
  fs.unlinkSync(strayPath);
2551
2592
  cleaned++;
2593
+ // Red-team fix (HIGH-2): name every deleted file so a destructive sweep
2594
+ // across many projects is reconstructable from scrollback, not a bare count.
2595
+ info(`${projectName} — removed retired bin/${stray} (matched shipped header "${matched.slice(0, 40)}")`);
2552
2596
  }
2597
+ // No signature match → leave it alone (user's own same-named file).
2553
2598
  } catch {
2554
2599
  // leave the file alone on any read error
2555
2600
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tekyzinc/gsd-t",
3
- "version": "4.0.14",
3
+ "version": "4.0.15",
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",