@tekyzinc/gsd-t 3.13.14 → 3.13.16

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,42 @@
2
2
 
3
3
  All notable changes to GSD-T are documented here. Updated with each release.
4
4
 
5
+ ## [3.13.16] - 2026-04-17
6
+
7
+ ### Changed — Removed proactive suggestions to use `/gsd-t-unattended`; positioned as overnight/idle-only
8
+
9
+ The unattended supervisor remains supported for genuine overnight or multi-hour idle runs but is no longer pitched as a general workflow option. In practice it runs 5–10× slower than in-session execution because every worker iteration pays cold-context startup cost (re-reads CLAUDE.md, progress.md, all domain files) before doing real work, then is bounded to a 270s cache-warm budget. Daytime work belongs in-session.
10
+
11
+ **Files**:
12
+ - `templates/CLAUDE-global.md` — removed the "Unattended Execution (M36)" section that pitched it as a feature alongside in-session.
13
+ - `commands/gsd-t-help.md` — repositioned the `unattended*` rows under AUTOMATION as overnight-only with a slowness caveat.
14
+ - `README.md` — removed the top-level "Unattended execution" feature bullet; renamed the commands-table heading and the full section heading to "Overnight / Idle-Run …" with a leading callout that daytime work runs in-session; reworded the M38 headless-by-default bullet to drop "via the unattended supervisor" framing.
15
+
16
+ **No behavioral changes.** Commands `/gsd-t-unattended`, `/gsd-t-unattended-watch`, `/gsd-t-unattended-stop` continue to work exactly as before. The supervisor contract is unchanged.
17
+
18
+ ## [3.13.15] - 2026-04-17
19
+
20
+ ### Fixed — Self-protection guard now uses package-name identity + narrow `bin/*.cjs` gitignore rule
21
+
22
+ Two bugs in v3.13.14 surfaced when `gsd-t update-all` ran against GSD-T's own source repo from the globally-installed CLI:
23
+
24
+ **Bug 1 — Self-protection guard bypassed**: The v3.13.14 guard compared `realpathSync(projectBinDir)` against `realpathSync(PKG_ROOT/bin)`. When `update-all` runs from the globally-installed CLI (`/usr/local/lib/node_modules/@tekyzinc/gsd-t`), `PKG_ROOT` points there — NOT to the local GSD-T source at `/Users/…/projects/GSD-T`. The paths never match in the typical dogfood setup, so the guard returned `false` and the sweep ate the source `bin/gsd-t.js`.
25
+
26
+ **Fix**: identity is now by `package.json` name. The sweep reads `projectDir/package.json` and skips if `name === "@tekyzinc/gsd-t"`. Works regardless of whether `update-all` runs from the local source tree or the global install.
27
+
28
+ **Bug 2 — Gitignore rule overly broad**: `UNATTENDED_GITIGNORE_ENTRIES` included `bin/*.cjs`, which ignored every `.cjs` under `bin/` — contradicting the adjacent comment ("legitimate `.cjs` source files under `bin/` ARE tracked"). With the broad rule active, new source `.cjs` files (e.g., `bin/headless-exit-codes.cjs`) couldn't be committed without `--force`.
29
+
30
+ **Fix**: the gitignore entry narrows to exactly `bin/context-meter-state.cjs` — the single session-state artifact that was the original intent.
31
+
32
+ **Files**:
33
+ - `bin/gsd-t.js` — `isSourcePackage` now reads `package.json.name`; `UNATTENDED_GITIGNORE_ENTRIES` narrowed.
34
+ - `test/bin-gsd-t-resilience.test.js` — self-protection test reshaped: seeds a tmp `package.json` with `name: "@tekyzinc/gsd-t"` + a signature-matching stray, asserts the stray survives the sweep.
35
+ - `.gitignore` — deduped and restored to the narrow form.
36
+
37
+ **Tests**: 1240/1240 pass (unchanged count; existing self-protection test reshaped). E2E: N/A.
38
+
39
+ **Impact**: `gsd-t update-all` is now safe to run with GSD-T itself registered as a project, regardless of where the CLI is installed from. Legitimate `.cjs` source files in `bin/` are no longer blanket-ignored in downstream projects' `.gitignore`. bee-poc's supervisor, which started loading cleanly on v3.13.14, continues to load on v3.13.15 (this release is purely dogfood-protection + gitignore repair; no supervisor-behavior change).
40
+
5
41
  ## [3.13.14] - 2026-04-17
6
42
 
7
43
  ### Fixed — Supervisor no longer requires project-local `bin/gsd-t.js` + sweep self-protection
package/README.md CHANGED
@@ -10,11 +10,10 @@ A methodology for reliable, parallelizable development using Claude Code with op
10
10
  **Protects existing work** — destructive action guard prevents schema drops, architecture replacements, and data loss without explicit approval.
11
11
  **Visualizes execution in real time** — live browser dashboard renders agent hierarchy, tool activity, and phase progression from the event stream.
12
12
  **Generates visual scan reports** — every `/gsd-t-scan` produces a self-contained HTML report with 6 live architectural diagrams, a tech debt register, and domain health scores; optional DOCX/PDF export via `--export docx|pdf`.
13
- **Unattended execution** — `gsd-t unattended --hours=N` spawns a detached OS-process supervisor that drives the active milestone to completion over hours or days with zero human intervention. A ScheduleWakeup watch loop ticks every 270 seconds; `/clear` + resume transparently re-attaches to the running supervisor.
14
13
  **Self-learning rule engine** — declarative rules in rules.jsonl detect failure patterns from task metrics. Candidate patches progress through a 5-stage lifecycle (candidate, applied, measured, promoted, graduated) with >55% improvement gates before becoming permanent methodology artifacts.
15
14
  **Cross-project learning** — proven rules propagate to `~/.claude/metrics/` and sync across all registered projects via `update-all`. Rules validated in 3+ projects become universal; 5+ projects qualify for npm distribution. Cross-project signal comparison and global ELO rankings available via `gsd-t-metrics --cross-project` and `gsd-t-status`.
16
15
  **Stack Rules Engine** — auto-detects project tech stack (React, TypeScript, Node API, Python, Go, Rust) from manifest files and injects mandatory best-practice rules into subagent prompts at execute-time. Universal security rules always apply; stack-specific rules layer on top. Includes **design-to-code** rules for pixel-perfect frontend implementation from Figma, screenshots, or design images — with Figma MCP integration, design token extraction, stack capability evaluation, and mandatory visual verification: every screen is rendered in a real browser, screenshotted at mobile/tablet/desktop, and compared pixel-by-pixel against the Figma design. Auto-bootstraps during partition when design references are detected. Extensible: drop a `.md` file in `templates/stacks/` to add a new stack.
17
- **Headless-by-Default Spawn (M38, v3.12.10)** — long-running workflow commands (execute, wave, integrate, debug repair loops) spawn detached by default via the unattended supervisor. The interactive session prints a launch banner, logs the event-stream path, and exits. Pass `--watch` to keep a live status block in the session (270s `ScheduleWakeup` ticks, cache-window-safe). The supervisor emits JSONL events to `.gsd-t/events/YYYY-MM-DD.jsonl` at every phase boundary — shared by watch command and dashboard. See `.gsd-t/contracts/headless-default-contract.md` v1.0.0 and `unattended-event-stream-contract.md` v1.0.0.
16
+ **Headless-by-Default Spawn (M38, v3.12.10)** — long-running workflow commands (execute, wave, integrate, debug repair loops) spawn detached by default. The interactive session prints a launch banner, logs the event-stream path, and exits. Pass `--watch` to keep a live status block in the session (270s `ScheduleWakeup` ticks, cache-window-safe). Detached workers emit JSONL events to `.gsd-t/events/YYYY-MM-DD.jsonl` at every phase boundary — shared by watch command and dashboard. See `.gsd-t/contracts/headless-default-contract.md` v1.0.0 and `unattended-event-stream-contract.md` v1.0.0.
18
17
  - **Surgical model selection** — `bin/model-selector.js` assigns haiku/sonnet/opus per phase via a declarative rules table; `/advisor` escalation path with convention-based fallback.
19
18
  - **Per-spawn token telemetry** — `.gsd-t/token-metrics.jsonl` records one 18-field row per Task subagent spawn.
20
19
  **Context Meter (M34/M38)** — PostToolUse hook writes `.gsd-t/.context-meter-state.json` via local token estimation. Single-band model (`context-meter-contract.md` v1.3.0): one threshold (default 85%), one action — hand off to a detached headless spawn. The meter informs spawn-time routing, not in-flight pauses.
@@ -172,11 +171,11 @@ This will replace changed command files, back up your CLAUDE.md if customized, a
172
171
  | `/gsd-t-verify` | Run quality gates + goal-backward behavior verification | In wave |
173
172
  | `/gsd-t-complete-milestone` | Archive + git tag (goal-backward gate required) | In wave |
174
173
 
175
- ### Unattended Execution
174
+ ### Overnight / Idle-Run Commands (slower than in-session — use only for unattended overnight or multi-hour idle runs)
176
175
 
177
176
  | Command | Purpose | Auto |
178
177
  |---------|---------|------|
179
- | `/gsd-t-unattended` | Launch detached supervisor runs active milestone to completion with zero human intervention | Manual |
178
+ | `/gsd-t-unattended` | Launch detached supervisor for overnight/idle runs only | Manual |
180
179
  | `/gsd-t-unattended-watch` | Watch tick — fires every 270s via ScheduleWakeup, reports supervisor status | Auto |
181
180
  | `/gsd-t-unattended-stop` | Touch stop sentinel — supervisor halts after current worker finishes | Manual |
182
181
 
@@ -314,15 +313,15 @@ your-project/
314
313
 
315
314
  ---
316
315
 
317
- ## Unattended Execution (M36 — v3.10.10+)
316
+ ## Overnight / Idle-Run Supervisor (M36 — v3.10.10+)
318
317
 
319
- Run the active milestone to completion over hours or daysno human in the loop.
318
+ > **Daytime work runs in-session.** This supervisor is provided for unattended overnight or multi-hour idle runs only it is dramatically slower than in-session execution because every worker iteration pays cold-context startup cost (re-reads CLAUDE.md, progress.md, all domain files) before doing real work, then is bounded to a 270s cache-warm budget. Reach for it only when you genuinely cannot supervise the run.
320
319
 
321
320
  ```bash
322
321
  # Launch from the CLI (detached OS process)
323
322
  gsd-t unattended --hours=24
324
323
 
325
- # Or from within Claude Code (starts a 270s watch loop)
324
+ # Or from within Claude Code
326
325
  /gsd-t-unattended
327
326
 
328
327
  # Stop (graceful — supervisor halts after the current worker finishes)
package/bin/gsd-t.js CHANGED
@@ -2161,18 +2161,23 @@ function copyBinToolsToProject(projectDir, projectName) {
2161
2161
  }
2162
2162
  }
2163
2163
  }
2164
- // Self-protection: NEVER sweep the package's own bin/. Without this guard,
2164
+ // Self-protection: NEVER sweep GSD-T's own source repo. Without this guard,
2165
2165
  // running `gsd-t update-all` with the GSD-T source repo itself registered
2166
2166
  // as a project (legitimate during development) would signature-match
2167
2167
  // bin/gsd-t.js — which IS the installer — and delete the source file.
2168
- // Resolve both paths to handle symlinks / relative path quirks.
2169
- const resolvedProjectBin = fs.realpathSync.native
2170
- ? (() => { try { return fs.realpathSync(projectBinDir); } catch { return projectBinDir; } })()
2171
- : projectBinDir;
2172
- const resolvedPkgBin = (() => {
2173
- try { return fs.realpathSync(path.join(PKG_ROOT, "bin")); } catch { return path.join(PKG_ROOT, "bin"); }
2168
+ // Identity is by package.json name, NOT by path — when update-all runs from
2169
+ // the globally-installed package, PKG_ROOT points to the global install and
2170
+ // realpath comparison against the local source always fails.
2171
+ const isSourcePackage = (() => {
2172
+ try {
2173
+ const pkgPath = path.join(projectDir, "package.json");
2174
+ if (!fs.existsSync(pkgPath)) return false;
2175
+ const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf8"));
2176
+ return pkg && pkg.name === "@tekyzinc/gsd-t";
2177
+ } catch {
2178
+ return false;
2179
+ }
2174
2180
  })();
2175
- const isSourcePackage = resolvedProjectBin === resolvedPkgBin;
2176
2181
  let cleaned = 0;
2177
2182
  if (!isSourcePackage) {
2178
2183
  for (const stray of DEPRECATED_BIN_STRAYS) {
@@ -2324,7 +2329,7 @@ function ensureUnattendedConfig(projectDir, projectName) {
2324
2329
  }
2325
2330
 
2326
2331
  const UNATTENDED_GITIGNORE_ENTRIES = [
2327
- "bin/*.cjs",
2332
+ "bin/context-meter-state.cjs",
2328
2333
  ".gsd-t/.archive-migration-v1",
2329
2334
  ".gsd-t/.task-counter-retired-v1",
2330
2335
  ];
@@ -43,7 +43,7 @@ MILESTONE WORKFLOW [auto] = in wave
43
43
  AUTOMATION Auto
44
44
  ───────────────────────────────────────────────────────────────────────────────
45
45
  wave Full cycle: partition → ... → complete (auto-advances)
46
- unattended Run active milestone unattended detached OS supervisor, multi-worker relay (24h+)
46
+ unattended Detached supervisor for overnight/multi-hour idle runs only slower than in-session
47
47
  unattended-watch Show live supervisor status; reschedules every 270s via ScheduleWakeup
48
48
  unattended-stop Request graceful supervisor stop (sentinel file — safe mid-worker)
49
49
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tekyzinc/gsd-t",
3
- "version": "3.13.14",
3
+ "version": "3.13.16",
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",
@@ -284,11 +284,6 @@ KEEP GOING. Only stop for:
284
284
  3. Milestone completion (checkpoint for user review)
285
285
  4. Destructive actions (see Destructive Action Guard above — ALWAYS stop)
286
286
 
287
- ## Unattended Execution (M36, v3.10.10+)
288
-
289
- `/gsd-t-unattended` launches a detached supervisor that drives the active milestone to completion via a `claude -p` worker relay (fresh context per worker). `/gsd-t-resume` auto-reattaches via watch loop if `supervisor.pid` is live; `/gsd-t-unattended-stop` halts after the current worker. macOS/Linux fully supported; Windows lacks sleep-prevention.
290
- Contract: `.gsd-t/contracts/unattended-supervisor-contract.md` (state schema, exit codes, CLI flags, platform matrix).
291
-
292
287
  ## Pre-Commit Gate (MANDATORY)
293
288
 
294
289
  NEVER commit code without running this checklist. This is not optional.