@tekyzinc/gsd-t 4.0.12 → 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 +37 -0
- package/bin/gsd-t.js +60 -15
- package/commands/gsd-t-complete-milestone.md +6 -12
- package/commands/gsd-t-feature.md +2 -6
- package/commands/gsd-t-gap-analysis.md +3 -6
- package/commands/gsd-t-help.md +2 -2
- package/commands/gsd-t-init-scan-setup.md +7 -7
- package/commands/gsd-t-scan.md +45 -652
- package/package.json +1 -1
- package/templates/CLAUDE-global.md +1 -0
- package/templates/workflows/gsd-t-scan.workflow.js +711 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,43 @@
|
|
|
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
|
+
|
|
17
|
+
## [4.0.14] - 2026-05-29 (M67 Scan Deep Document Phase — patch)
|
|
18
|
+
|
|
19
|
+
### Added — deterministic deep document cross-population in the scan Workflow
|
|
20
|
+
|
|
21
|
+
M66 made the tech-debt register deep but left living-document cross-population as a non-deterministic "lead-agent follow-on" — effectively dropped, a regression vs the old prose scan's Step 5. M67 adds a `Document` phase to `templates/workflows/gsd-t-scan.workflow.js` (between Synthesis and Render) that fans out **one agent per document**, each drawing on the same slices + verified findings the finders produced, so the docs are as thorough as the register.
|
|
22
|
+
|
|
23
|
+
- `templates/workflows/gsd-t-scan.workflow.js`: new `Document` phase produces `docs/{architecture,workflows,infrastructure,requirements}.md` + `README.md` (merge-not-overwrite, Edit-not-Write on existing files) and the five `.gsd-t/scan/{architecture,security,quality,business-rules,contract-drift}.md` dimension files in the renderer's parsed formats. Component map + a user journey per feature-domain slice. Synthesis no longer writes the dimension files (moved to the doc stage); runs before Render so the HTML report reads the deep `architecture.md`.
|
|
24
|
+
- Red Team (FAIL → GRUDGING-PASS, 1 fix cycle): HIGH-1 doc-clobber data-loss → deterministic `.gsd-t/scan/.doc-backup/` snapshot before the fan-out; HIGH-2 render double-count → grand total written as a `| Grand Total | N files | LOC |` table row that the parser short-circuits on (verified 1809, not 1919); LOW → dropped `-f` from git add + pathspec-excluded and gitignored `.doc-backup`.
|
|
25
|
+
- `commands/gsd-t-scan.md`, `commands/gsd-t-help.md`, `templates/CLAUDE-global.md`: doc-ripple for the new phase. `.gitignore`: `.gsd-t/scan/.doc-backup/`.
|
|
26
|
+
|
|
27
|
+
Suite: 1267 pass / 0 fail / 4 skip — zero regressions.
|
|
28
|
+
|
|
29
|
+
## [4.0.13] - 2026-05-29 (M66 Scan Volume-Scaled Workflow Migration — patch)
|
|
30
|
+
|
|
31
|
+
### Fixed — scan-depth regression: scan now fans out by codebase volume, not a fixed 5-teammate count
|
|
32
|
+
|
|
33
|
+
Scan was the only major phase never migrated to a native Workflow. It hard-coded exactly 5 teammates (one per dimension) with zero volume scaling — a 5-file repo and a 1,809-file repo both got 5 agents, so a single `quality` agent sampled the top ~5 issues across the whole codebase and stopped. On a large codebase that produced a cursory 16-item register where a deep per-domain scan surfaced 117 findings. It also referenced a retired `autoSpawnHeadless()` + `headless-default-contract v2.0.0`.
|
|
34
|
+
|
|
35
|
+
- `templates/workflows/gsd-t-scan.workflow.js` (NEW): `preflight → volume-probe (derives a per-area slice list, scaling 1-3 slices tiny → 15-40 large) → pipeline(per-slice deep finder "enumerate don't sample" → single verify) → deterministic JS archive + TD-numbering → synthesis (dedup/merge/re-rank) → render`. Slice depth is budget-aware.
|
|
36
|
+
- `commands/gsd-t-scan.md`: rewritten as a thin `Workflow({scriptPath, args})` invoker; dead `autoSpawnHeadless`/`headless-default-contract v2.0.0` references stripped.
|
|
37
|
+
- Red Team (FAIL → GRUDGING-PASS, 2 fix cycles): prose-driven archive/TD-numbering → deterministic JS (`fs.renameSync` collision-safe + `_parseMaxTd` + prior register content threaded into synthesis); render hollow-report guard + prompt↔parser format alignment; pipeline stage-2 defensive signature; probe model haiku→sonnet.
|
|
38
|
+
- Doc-ripple: removed retired fixed-5-teammate scan-dimension references from `gsd-t-{complete-milestone,gap-analysis,feature,init-scan-setup}.md`; `templates/CLAUDE-global.md` + `commands/gsd-t-help.md`.
|
|
39
|
+
|
|
40
|
+
Suite: 1267 pass / 0 fail / 4 skip — zero regressions.
|
|
41
|
+
|
|
5
42
|
## [4.0.12] - 2026-05-29
|
|
6
43
|
|
|
7
44
|
### Removed — M61-carryover test cleanup (green the suite)
|
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
|
|
2477
|
-
//
|
|
2478
|
-
//
|
|
2479
|
-
//
|
|
2480
|
-
|
|
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
|
|
2541
|
-
|
|
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
|
}
|
|
@@ -463,19 +463,13 @@ node scripts/gsd-t-watch-state.js advance --agent-id "$GSD_T_AGENT_ID" --parent-
|
|
|
463
463
|
|
|
464
464
|
Before tagging, ensure scan docs reflect the final state of the codebase after all milestone work. This is the full-refresh counterpart to the micro-updates done during execute/quick/debug.
|
|
465
465
|
|
|
466
|
-
If `.gsd-t/
|
|
467
|
-
1. Check `.gsd-t/scan/.cache.json`
|
|
468
|
-
2. If **
|
|
469
|
-
- Log: "Running milestone scan checkpoint — refreshing
|
|
470
|
-
- Re-run
|
|
471
|
-
- Stale `architecture.md` → architecture teammate (model: haiku)
|
|
472
|
-
- Stale `quality.md` → quality teammate (model: sonnet)
|
|
473
|
-
- Stale `security.md` → security teammate (model: sonnet)
|
|
474
|
-
- Stale `business-rules.md` → business-rules teammate (model: haiku)
|
|
475
|
-
- Stale `contract-drift.md` → contracts teammate (model: haiku)
|
|
476
|
-
- Update `.gsd-t/scan/.cache.json` after refresh
|
|
466
|
+
If `.gsd-t/techdebt.md` exists (a prior scan has been run):
|
|
467
|
+
1. Check staleness — count commits since the register was last written (use `.gsd-t/scan/.cache.json` if present, else the register's git mtime).
|
|
468
|
+
2. If **stale** (>0 commits since scan):
|
|
469
|
+
- Log: "Running milestone scan checkpoint — refreshing the tech-debt register..."
|
|
470
|
+
- Re-run the scan by invoking the volume-scaled scan Workflow (`templates/workflows/gsd-t-scan.workflow.js`, same as `/gsd-t-scan`) — the probe re-slices the codebase and the finders refresh the register. This replaces the retired fixed-5-teammate dimension refresh.
|
|
477
471
|
- Update `.gsd-t/techdebt.md` — mark any items resolved during this milestone as `[RESOLVED]`
|
|
478
|
-
3. If
|
|
472
|
+
3. If fresh → skip with log: "Scan register is fresh — no checkpoint refresh needed"
|
|
479
473
|
|
|
480
474
|
If `.gsd-t/scan/` doesn't exist → skip (no scan data to maintain).
|
|
481
475
|
|
|
@@ -14,12 +14,8 @@ If `.gsd-t/scan/.cache.json` exists:
|
|
|
14
14
|
1. Read the cache and check `scannedAt` for each dimension
|
|
15
15
|
2. Count commits since the scan: `git rev-list --count --after="{scannedAt}" HEAD`
|
|
16
16
|
3. If **>10 commits since scan** OR **scan is older than 14 days**:
|
|
17
|
-
- Log: "Auto-refreshing
|
|
18
|
-
- Re-run
|
|
19
|
-
- If `quality.md` stale → spawn quality teammate (model: sonnet)
|
|
20
|
-
- If `architecture.md` stale → spawn architecture teammate (model: haiku)
|
|
21
|
-
- If `security.md` stale → spawn security teammate (model: sonnet)
|
|
22
|
-
- Update `.gsd-t/scan/.cache.json` after refresh
|
|
17
|
+
- Log: "Auto-refreshing the tech-debt register (stale by {N} commits / {N} days)..."
|
|
18
|
+
- Re-run the scan by invoking the volume-scaled scan Workflow (`templates/workflows/gsd-t-scan.workflow.js`, same as `/gsd-t-scan`) — the probe re-slices the codebase and the finders refresh the register. This replaces the retired fixed-dimension teammate refresh.
|
|
23
19
|
4. If fresh → proceed silently
|
|
24
20
|
|
|
25
21
|
If `.gsd-t/scan/` doesn't exist at all → skip (no scan data to refresh).
|
|
@@ -14,14 +14,11 @@ If `.gsd-t/scan/.cache.json` exists:
|
|
|
14
14
|
1. Read the cache and check `scannedAt` for each dimension
|
|
15
15
|
2. Count commits since the scan: `git rev-list --count --after="{scannedAt}" HEAD`
|
|
16
16
|
3. If **>10 commits since scan** OR **scan is older than 14 days**:
|
|
17
|
-
- Log: "Auto-refreshing
|
|
18
|
-
- Re-run
|
|
19
|
-
- If `architecture.md` stale → spawn architecture teammate (model: haiku)
|
|
20
|
-
- If `quality.md` stale → spawn quality teammate (model: sonnet)
|
|
21
|
-
- Update `.gsd-t/scan/.cache.json` after refresh
|
|
17
|
+
- Log: "Auto-refreshing the tech-debt register (stale by {N} commits / {N} days)..."
|
|
18
|
+
- Re-run the scan by invoking the volume-scaled scan Workflow (`templates/workflows/gsd-t-scan.workflow.js`, same as `/gsd-t-scan`) — the probe re-slices the codebase and the finders refresh the register. This replaces the retired fixed-dimension teammate refresh.
|
|
22
19
|
4. If fresh → proceed silently
|
|
23
20
|
|
|
24
|
-
If `.gsd-t/
|
|
21
|
+
If no prior `.gsd-t/techdebt.md` exists at all → skip (no scan data to refresh).
|
|
25
22
|
|
|
26
23
|
## Step 1: Load Context
|
|
27
24
|
|
package/commands/gsd-t-help.md
CHANGED
|
@@ -196,9 +196,9 @@ Use these when user asks for help on a specific command:
|
|
|
196
196
|
- **Use when**: Adding significant new functionality to existing project
|
|
197
197
|
|
|
198
198
|
### scan
|
|
199
|
-
- **Summary**: Deep codebase analysis producing
|
|
199
|
+
- **Summary**: Deep codebase analysis producing techdebt.md — volume-scaled native Workflow (`templates/workflows/gsd-t-scan.workflow.js`): a probe carves the codebase into per-area slices, one deep finder per slice (enumerate-don't-sample), a single verify pass drops false positives, synthesis dedups/re-ranks into the register. Finder count scales with codebase volume (1-3 slices tiny → 15-40 large), not a fixed 5.
|
|
200
200
|
- **Auto-invoked**: No
|
|
201
|
-
- **Creates**: `.gsd-t/
|
|
201
|
+
- **Creates**: `.gsd-t/techdebt.md` (prior archived to `.gsd-t/techdebt_YYYY-MM-DD.md`), the `.gsd-t/scan/*.md` dimension files, the full living-doc set (`docs/architecture.md`, `docs/workflows.md`, `docs/infrastructure.md`, `docs/requirements.md`, `README.md` — merged not overwritten, via the M67 document phase), and the HTML scan report
|
|
202
202
|
- **Use when**: Understanding an existing codebase or auditing technical debt
|
|
203
203
|
|
|
204
204
|
### gap-analysis
|
|
@@ -101,16 +101,16 @@ If the project has source code, graph indexing (`.gsd-t/graph/`) will run as par
|
|
|
101
101
|
|
|
102
102
|
## Step 4: Deep Codebase Scan (gsd-t-scan)
|
|
103
103
|
|
|
104
|
-
Execute the full scan
|
|
104
|
+
Execute the full scan by invoking the volume-scaled scan Workflow (same as `/gsd-t-scan` — `templates/workflows/gsd-t-scan.workflow.js`):
|
|
105
105
|
|
|
106
|
-
1.
|
|
107
|
-
2.
|
|
108
|
-
3. Cross-populate findings into living documents (docs/architecture.md, docs/workflows.md, docs/infrastructure.md, docs/requirements.md)
|
|
109
|
-
4. Update README.md with discovered tech stack and setup info
|
|
106
|
+
1. The volume-probe slices the codebase by area (scaling with volume, not a fixed dimension set); per-slice deep finders enumerate; a single verify pass drops false positives.
|
|
107
|
+
2. Synthesis builds the `.gsd-t/techdebt.md` register and the `.gsd-t/scan/*.md` analysis files.
|
|
108
|
+
3. Cross-populate findings into living documents (docs/architecture.md, docs/workflows.md, docs/infrastructure.md, docs/requirements.md) from the register + analysis files.
|
|
109
|
+
4. Update README.md with discovered tech stack and setup info.
|
|
110
110
|
|
|
111
|
-
|
|
111
|
+
The Workflow's fan-out scales with codebase volume automatically — no team-mode toggle.
|
|
112
112
|
|
|
113
|
-
**If `.gsd-t/techdebt.md` already exists**:
|
|
113
|
+
**If `.gsd-t/techdebt.md` already exists**: the Workflow archives it to `.gsd-t/techdebt_YYYY-MM-DD.md` and continues TD numbering.
|
|
114
114
|
|
|
115
115
|
## Step 5: Generate Project CLAUDE.md (gsd-t-setup)
|
|
116
116
|
|