@tekyzinc/gsd-t 3.13.16 → 3.16.11

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.
Files changed (54) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/README.md +1 -0
  3. package/bin/gsd-t-benchmark-orchestrator.js +437 -0
  4. package/bin/gsd-t-capture-lint.cjs +276 -0
  5. package/bin/gsd-t-completion-check.cjs +106 -0
  6. package/bin/gsd-t-orchestrator-config.cjs +64 -0
  7. package/bin/gsd-t-orchestrator-queue.cjs +180 -0
  8. package/bin/gsd-t-orchestrator-recover.cjs +231 -0
  9. package/bin/gsd-t-orchestrator-worker.cjs +219 -0
  10. package/bin/gsd-t-orchestrator.js +534 -0
  11. package/bin/gsd-t-stream-feed-client.cjs +151 -0
  12. package/bin/gsd-t-task-brief-compactor.cjs +89 -0
  13. package/bin/gsd-t-task-brief-template.cjs +96 -0
  14. package/bin/gsd-t-task-brief.js +249 -0
  15. package/bin/gsd-t-token-backfill.cjs +366 -0
  16. package/bin/gsd-t-token-capture.cjs +306 -0
  17. package/bin/gsd-t-token-dashboard.cjs +318 -0
  18. package/bin/gsd-t-token-regenerate-log.cjs +129 -0
  19. package/bin/gsd-t-transcript-tee.cjs +246 -0
  20. package/bin/gsd-t-unattended-heartbeat.cjs +188 -0
  21. package/bin/gsd-t-unattended-platform.cjs +191 -27
  22. package/bin/gsd-t-unattended-safety.cjs +8 -1
  23. package/bin/gsd-t-unattended.cjs +192 -31
  24. package/bin/gsd-t.js +329 -2
  25. package/bin/supervisor-pid-fingerprint.cjs +126 -0
  26. package/commands/gsd-t-debug.md +63 -51
  27. package/commands/gsd-t-design-decompose.md +2 -7
  28. package/commands/gsd-t-doc-ripple.md +20 -11
  29. package/commands/gsd-t-execute.md +82 -50
  30. package/commands/gsd-t-integrate.md +43 -16
  31. package/commands/gsd-t-plan.md +20 -7
  32. package/commands/gsd-t-prd.md +19 -12
  33. package/commands/gsd-t-quick.md +64 -29
  34. package/commands/gsd-t-resume.md +51 -4
  35. package/commands/gsd-t-unattended.md +19 -20
  36. package/commands/gsd-t-verify.md +48 -32
  37. package/commands/gsd-t-visualize.md +19 -17
  38. package/commands/gsd-t-wave.md +29 -27
  39. package/docs/architecture.md +16 -0
  40. package/docs/m40-benchmark-report.md +35 -0
  41. package/docs/requirements.md +20 -0
  42. package/package.json +1 -1
  43. package/scripts/gsd-t-dashboard-server.js +291 -4
  44. package/scripts/gsd-t-dashboard.html +31 -1
  45. package/scripts/gsd-t-design-review-server.js +3 -1
  46. package/scripts/gsd-t-stream-feed-server.js +428 -0
  47. package/scripts/gsd-t-stream-feed.html +1168 -0
  48. package/scripts/gsd-t-token-aggregator.js +373 -0
  49. package/scripts/gsd-t-transcript.html +422 -0
  50. package/scripts/hooks/gsd-t-in-session-probe.js +62 -0
  51. package/scripts/hooks/pre-commit-capture-lint +26 -0
  52. package/templates/CLAUDE-global.md +69 -0
  53. package/scripts/gsd-t-agent-dashboard-server.js +0 -424
  54. package/scripts/gsd-t-agent-dashboard.html +0 -1043
@@ -257,14 +257,14 @@ node scripts/gsd-t-watch-state.js advance --agent-id "$GSD_T_AGENT_ID" --parent-
257
257
 
258
258
  ⚙ [sonnet] gsd-t-unattended → spawning detached supervisor
259
259
 
260
- **Before spawn — read starting context tokens (observability bracket):**
260
+ **Before spawn — capture start timestamp (observability bracket):**
261
261
 
262
262
  ```bash
263
- T_START=$(date +%s) && DT_START=$(date +"%Y-%m-%d %H:%M")
264
- T0_TOKENS=$(node -e "try{const s=require('fs').readFileSync('.gsd-t/.context-meter-state.json','utf8');process.stdout.write(String(JSON.parse(s).inputTokens||0))}catch(_){process.stdout.write('0')}")
265
- T0_PCT=$(node -e "try{const tb=require('./bin/token-budget.cjs');process.stdout.write(String(tb.getSessionStatus('.').pct||0))}catch(_){process.stdout.write('0')}")
263
+ DT_START=$(date +"%Y-%m-%d %H:%M")
266
264
  ```
267
265
 
266
+ The detached supervisor is a `node -e spawnSupervisor` fire-and-forget (no Claude result envelope). Timing is recorded via `recordSpawnRow` (Pattern B) after spawn returns.
267
+
268
268
  If `--dry-run` was specified, print:
269
269
 
270
270
  ```
@@ -307,28 +307,27 @@ console.log('SPAWNED_PID=' + result.pid);
307
307
 
308
308
  Capture `SPAWNED_PID` from the output.
309
309
 
310
- **After spawn — record observability bracket:**
311
-
312
- ```bash
313
- T_END=$(date +%s) && DT_END=$(date +"%Y-%m-%d %H:%M") && DURATION=$((T_END-T_START))
314
- T1_TOKENS=$(node -e "try{const s=require('fs').readFileSync('.gsd-t/.context-meter-state.json','utf8');process.stdout.write(String(JSON.parse(s).inputTokens||0))}catch(_){process.stdout.write('0')}")
315
- T1_PCT=$(node -e "try{const tb=require('./bin/token-budget.cjs');process.stdout.write(String(tb.getSessionStatus('.').pct||0))}catch(_){process.stdout.write('0')}")
316
- COUNTER=$(node bin/task-counter.cjs status 2>/dev/null | node -e "let s='';process.stdin.on('data',d=>s+=d).on('end',()=>{try{process.stdout.write(String(JSON.parse(s).count||''))}catch(_){process.stdout.write('')}})")
317
- ```
318
-
319
- Append to `.gsd-t/token-log.md` (create with header if missing):
310
+ **After spawn — record row via `recordSpawnRow` (Pattern B, no usage envelope):**
320
311
 
321
312
  ```bash
313
+ DT_END=$(date +"%Y-%m-%d %H:%M")
322
314
  node -e "
323
- const fs = require('fs');
324
- const LOG = '.gsd-t/token-log.md';
325
- const header = '| Datetime-start | Datetime-end | Command | Step | Model | Duration(s) | Notes | Domain | Task | Tasks-Since-Reset |\n|---|---|---|---|---|---|---|---|---|---|\n';
326
- const row = '| ${DT_START} | ${DT_END} | gsd-t-unattended | Step 2 | sonnet | ${DURATION}s | supervisor spawned PID ${SPAWNED_PID} | | | ${COUNTER} |\n';
327
- if (!fs.existsSync(LOG)) fs.writeFileSync(LOG, header);
328
- fs.appendFileSync(LOG, row);
315
+ const { recordSpawnRow } = require('./bin/gsd-t-token-capture.cjs');
316
+ recordSpawnRow({
317
+ projectDir: '.',
318
+ command: 'gsd-t-unattended',
319
+ step: 'Step 2',
320
+ model: 'sonnet',
321
+ startedAt: process.env.DT_START,
322
+ endedAt: process.env.DT_END,
323
+ // usage omitted → Tokens cell renders as '—' (no envelope from a fire-and-forget node spawn)
324
+ notes: 'supervisor spawned PID ' + (process.env.SPAWNED_PID || '?'),
325
+ });
329
326
  "
330
327
  ```
331
328
 
329
+ The row lands under the canonical `.gsd-t/token-log.md` header with Tokens = `—`, Ctx% pulled via `getSessionStatus()`. No usage envelope is available because the supervisor is a fire-and-forget `node -e spawnSupervisor` child, not a `claude -p` or Task subagent.
330
+
332
331
  ## Step 3: Verify Supervisor Liveness
333
332
 
334
333
  ```bash
@@ -199,15 +199,24 @@ Teammate assignments:
199
199
  Report: severity-ranked findings.
200
200
 
201
201
  Lead: After receiving teammate reports:
202
- **OBSERVABILITY LOGGING (MANDATORY):**
203
- Before spawning — run via Bash:
204
- `T_START=$(date +%s) && DT_START=$(date +"%Y-%m-%d %H:%M")`
205
- Spawn a Task subagent (spawnType: validation) to run the full test suite and contract audit — always headless.
206
- After subagent returns — run via Bash:
207
- `T_END=$(date +%s) && DT_END=$(date +"%Y-%m-%d %H:%M") && DURATION=$((T_END-T_START)) && CTX_PCT=$(node -e "const tb=require('./bin/token-budget.cjs'); process.stdout.write(String(tb.getSessionStatus('.').pct||'N/A'))" 2>/dev/null || echo "N/A")`
208
- Append to `.gsd-t/token-log.md` (create with header `| Datetime-start | Datetime-end | Command | Step | Model | Duration(s) | Notes | Ctx% |` if missing):
209
- `| {DT_START} | {DT_END} | gsd-t-verify | Step 4 | haiku | {DURATION}s | test audit + contract review | {CTX_PCT} |`
210
- Collect all reports, synthesize, create remediation plan.
202
+ **OBSERVABILITY LOGGING (MANDATORY) — wrap the validation spawn with `captureSpawn`:**
203
+ ```
204
+ node -e "
205
+ const { captureSpawn } = require('./bin/gsd-t-token-capture.cjs');
206
+ (async () => {
207
+ await captureSpawn({
208
+ command: 'gsd-t-verify',
209
+ step: 'Step 4',
210
+ model: 'haiku',
211
+ description: 'test audit + contract review',
212
+ projectDir: '.',
213
+ notes: 'test audit + contract review',
214
+ spawnFn: async () => { /* Task subagent (spawnType: validation) runs the full test suite and contract audit — always headless */ },
215
+ });
216
+ })();
217
+ "
218
+ ```
219
+ `captureSpawn` parses `result.usage` and writes the row to `.gsd-t/token-log.md` under the canonical header. Tokens column renders as `in=N out=N cr=N cc=N $X.XX` or `—`, never `N/A`. Collect all reports, synthesize, create remediation plan.
211
220
  ```
212
221
 
213
222
  ## Step 5: Compile Verification Report
@@ -410,33 +419,40 @@ If status is VERIFY-FAILED:
410
419
  If status is VERIFIED or VERIFIED-WITH-WARNINGS:
411
420
  1. Log: "✅ Verify complete — spawning complete-milestone agent..."
412
421
 
413
- **OBSERVABILITY LOGGING (MANDATORY):**
414
- Before spawning — run via Bash:
415
- `T_START=$(date +%s) && DT_START=$(date +"%Y-%m-%d %H:%M")`
416
-
417
- 2. Spawn a Task subagent (spawnType: validation, model: sonnet, mode: bypassPermissions) — always headless, `--watch` ignored:
418
- ```
419
- "Execute the complete-milestone phase of the current GSD-T milestone.
420
-
421
- Read and follow the full instructions in commands/gsd-t-complete-milestone.md
422
- (resolve from ~/.claude/commands/ if not in project).
423
- Read .gsd-t/progress.md for current milestone and state.
424
- Read CLAUDE.md for project conventions.
425
- Read .gsd-t/contracts/ for domain interfaces.
422
+ **OBSERVABILITY LOGGING (MANDATORY) — wrap the complete-milestone auto-invoke with `captureSpawn`:**
426
423
 
427
- Complete the phase fully:
428
- - Follow every step in the command file
429
- - Update .gsd-t/progress.md status when done
430
- - Run document ripple as specified
431
- - Commit your work
424
+ 2. Spawn through `captureSpawn` — `spawnType: 'validation'`, model: sonnet, mode: bypassPermissions (always headless, `--watch` ignored):
432
425
 
433
- Report back: one-line status summary."
426
+ ```
427
+ node -e "
428
+ const { captureSpawn } = require('./bin/gsd-t-token-capture.cjs');
429
+ (async () => {
430
+ await captureSpawn({
431
+ command: 'gsd-t-verify',
432
+ step: 'Step 8',
433
+ model: 'sonnet',
434
+ description: 'auto-complete-milestone',
435
+ projectDir: '.',
436
+ notes: 'auto-complete-milestone',
437
+ spawnFn: async () => { /* Task subagent (spawnType: validation, model: sonnet, mode: bypassPermissions):
438
+ 'Execute the complete-milestone phase of the current GSD-T milestone.
439
+ Read and follow the full instructions in commands/gsd-t-complete-milestone.md
440
+ (resolve from ~/.claude/commands/ if not in project).
441
+ Read .gsd-t/progress.md for current milestone and state.
442
+ Read CLAUDE.md for project conventions.
443
+ Read .gsd-t/contracts/ for domain interfaces.
444
+ Complete the phase fully:
445
+ - Follow every step in the command file
446
+ - Update .gsd-t/progress.md status when done
447
+ - Run document ripple as specified
448
+ - Commit your work
449
+ Report back: one-line status summary.' */ },
450
+ });
451
+ })();
452
+ "
434
453
  ```
435
454
 
436
- After subagent returns run via Bash:
437
- `T_END=$(date +%s) && DT_END=$(date +"%Y-%m-%d %H:%M") && DURATION=$((T_END-T_START)) && CTX_PCT=$(node -e "const tb=require('./bin/token-budget.cjs'); process.stdout.write(String(tb.getSessionStatus('.').pct||'N/A'))" 2>/dev/null || echo "N/A")`
438
- Append to `.gsd-t/token-log.md`:
439
- `| {DT_START} | {DT_END} | gsd-t-verify | Step 8 | sonnet | {DURATION}s | auto-complete-milestone | | | {CTX_PCT} |`
455
+ `captureSpawn` parses `result.usage` and writes the row to `.gsd-t/token-log.md` under the canonical header. Tokens column renders as `in=N out=N cr=N cc=N $X.XX` or `—`, never `N/A`.
440
456
 
441
457
  3. Verify subagent result: Read `.gsd-t/progress.md` — confirm status is COMPLETED. If not, report the failure.
442
458
 
@@ -6,27 +6,29 @@ You are launching the GSD-T real-time agent dashboard — an SSE-backed browser
6
6
 
7
7
  When invoked directly by the user, spawn yourself as a Task subagent for a fresh context window.
8
8
 
9
- **OBSERVABILITY LOGGING — before spawning:**
10
-
11
- Run via Bash:
12
- `T_START=$(date +%s) && DT_START=$(date +"%Y-%m-%d %H:%M")`
9
+ **OBSERVABILITY LOGGING (MANDATORY) wrap the visualize subagent spawn with `captureSpawn`:**
13
10
 
14
11
  ```
15
- Task subagent (general-purpose, model: sonnet):
16
- "Run the GSD-T visualize command. Read commands/gsd-t-visualize.md for your full instructions.
17
- Arguments: {$ARGUMENTS}
18
- Skip Step 0 — you are already the subagent."
12
+ node -e "
13
+ const { captureSpawn } = require('./bin/gsd-t-token-capture.cjs');
14
+ (async () => {
15
+ await captureSpawn({
16
+ command: 'gsd-t-visualize',
17
+ step: 'Step 0',
18
+ model: 'sonnet',
19
+ description: 'dashboard launched',
20
+ projectDir: '.',
21
+ notes: 'dashboard launched',
22
+ spawnFn: async () => { /* Task subagent (general-purpose, model: sonnet):
23
+ 'Run the GSD-T visualize command. Read commands/gsd-t-visualize.md for your full instructions.
24
+ Arguments: {\$ARGUMENTS}
25
+ Skip Step 0 — you are already the subagent.' */ },
26
+ });
27
+ })();
28
+ "
19
29
  ```
20
30
 
21
- **OBSERVABILITY LOGGING after subagent returns:**
22
-
23
- Run via Bash:
24
- `T_END=$(date +%s) && DT_END=$(date +"%Y-%m-%d %H:%M") && DURATION=$((T_END-T_START)) && CTX_PCT=$(node -e "const tb=require('./bin/token-budget.cjs'); process.stdout.write(String(tb.getSessionStatus('.').pct||'N/A'))" 2>/dev/null || echo "N/A")`
25
-
26
- Append to `.gsd-t/token-log.md` (create with header `| Datetime-start | Datetime-end | Command | Step | Model | Duration(s) | Notes | Ctx% |` if missing):
27
- `| {DT_START} | {DT_END} | gsd-t-visualize | Step 0 | sonnet | {DURATION}s | dashboard launched | {CTX_PCT} |`
28
-
29
- Return the subagent's output and stop. Only skip Step 0 if you are already running as a subagent.
31
+ `captureSpawn` parses `result.usage` and writes the row to `.gsd-t/token-log.md` under the canonical header. Tokens column renders as `in=N out=N cr=N cc=N $X.XX` or `—`, never `N/A`. Return the subagent's output and stop. Only skip Step 0 if you are already running as a subagent.
30
32
 
31
33
  ## Step 1: Write command_invoked Event
32
34
 
@@ -132,50 +132,52 @@ Violations are task failures, not warnings.
132
132
 
133
133
  If STACK_RULES is empty (no templates/stacks/ dir or no matches), skip silently.
134
134
 
135
- **OBSERVABILITY LOGGING (MANDATORY) — repeat for every phase spawn:**
136
- Before spawning — run via Bash:
137
- `T_START=$(date +%s) && DT_START=$(date +"%Y-%m-%d %H:%M")`
135
+ **OBSERVABILITY LOGGING (MANDATORY) — wrap every phase spawn with `captureSpawn`:**
138
136
 
139
137
  ```
140
- Task agent (spawnType: primary, subagent_type: "general-purpose", mode: "bypassPermissions"):
141
- "Execute the {PHASE} phase of the current GSD-T milestone.
142
-
143
- Read and follow the full instructions in commands/gsd-t-{phase}.md
144
- Read .gsd-t/progress.md for current milestone and state.
145
- Read CLAUDE.md for project conventions.
146
- Read .gsd-t/contracts/ for domain interfaces.
147
-
148
- Complete the phase fully:
149
- - Follow every step in the command file
150
- - Update .gsd-t/progress.md status when done
151
- - Run document ripple as specified
152
- - Commit your work
153
-
154
- Report back: one-line status summary."
138
+ node -e "
139
+ const { captureSpawn } = require('./bin/gsd-t-token-capture.cjs');
140
+ (async () => {
141
+ await captureSpawn({
142
+ command: 'gsd-t-wave',
143
+ step: '{PHASE}',
144
+ model: 'sonnet',
145
+ description: 'phase: {PHASE}',
146
+ projectDir: '.',
147
+ notes: 'phase: {PHASE}',
148
+ spawnFn: async () => { /* Task agent (spawnType: primary, subagent_type: 'general-purpose', mode: 'bypassPermissions'):
149
+ 'Execute the {PHASE} phase of the current GSD-T milestone.
150
+ Read and follow the full instructions in commands/gsd-t-{phase}.md
151
+ Read .gsd-t/progress.md for current milestone and state.
152
+ Read CLAUDE.md for project conventions.
153
+ Read .gsd-t/contracts/ for domain interfaces.
154
+ Complete the phase fully:
155
+ - Follow every step in the command file
156
+ - Update .gsd-t/progress.md status when done
157
+ - Run document ripple as specified
158
+ - Commit your work
159
+ Report back: one-line status summary.' */ },
160
+ });
161
+ })();
162
+ "
155
163
  ```
156
164
 
157
- After phase agent returns run via Bash:
158
- `T_END=$(date +%s) && DT_END=$(date +"%Y-%m-%d %H:%M") && DURATION=$((T_END-T_START))`
165
+ `captureSpawn` parses `result.usage` and writes the row to `.gsd-t/token-log.md` under the canonical header. Tokens column renders as `in=N out=N cr=N cc=N $X.XX` or `—`, never `N/A`. Ctx% is pulled from `getSessionStatus()` automatically.
159
166
 
160
167
  **Wave Orchestrator Context Gate (MANDATORY) — single-band measurement via Context Meter state file:**
161
168
 
162
- Run via Bash AFTER each phase agent returns:
169
+ After each phase agent returns, run via Bash:
163
170
 
164
171
  ```bash
165
172
  node -e "const tb=require('./bin/token-budget.cjs'); const s=tb.getSessionStatus('.'); process.stdout.write(JSON.stringify(s));"
166
173
  ```
167
174
 
168
- The JSON on stdout contains `{pct, threshold}` where `threshold` is `normal` or `threshold` (single-band model per `context-meter-contract.md` v1.3.0). Capture `pct` as `{CTX_PCT}` for the token-log row.
175
+ The JSON on stdout contains `{pct, threshold}` where `threshold` is `normal` or `threshold` (single-band model per `context-meter-contract.md` v1.3.0).
169
176
 
170
177
  Handling:
171
178
  - `threshold === 'normal'` → proceed to the next phase.
172
179
  - `threshold === 'threshold'` → the Context Meter's PostToolUse hook has already emitted the `next-spawn-headless:true` marker; the orchestrator routes subsequent subagent spawns through `autoSpawnHeadless()`. No manual checkpoint/halt — the meter + spawn primitive together handle handoff.
173
180
 
174
- Append to `.gsd-t/token-log.md` (create with header `| Datetime-start | Datetime-end | Command | Step | Model | Duration(s) | Notes | Domain | Task | Ctx% |` if missing):
175
- `| {DT_START} | {DT_END} | gsd-t-wave | {PHASE} | sonnet | {DURATION}s | phase: {PHASE} | | | {CTX_PCT} |`
176
-
177
- Where `{CTX_PCT}` is the `pct` field from the JSON the getSessionStatus command just printed.
178
-
179
181
  ### Phase Sequence
180
182
 
181
183
  Execute phases in this order, spawning one agent per phase:
@@ -433,6 +433,22 @@ Alert thresholds (inline display):
433
433
 
434
434
  `gsd-t-status` displays token breakdown by domain/task/phase. `gsd-t-visualize` consumes the same data for dashboard rendering.
435
435
 
436
+ **Token Pipeline (M40 → M41 → M43 D3)**
437
+
438
+ Canonical store: `.gsd-t/metrics/token-usage.jsonl` (append-only JSONL; schema in `.gsd-t/contracts/metrics-schema-contract.md` — v1 M40, v2 M43 additive).
439
+
440
+ ```
441
+ producers ─┬─► .gsd-t/metrics/token-usage.jsonl ─┬─► gsd-t tokens (dashboard)
442
+ │ ├─► gsd-t tokens --regenerate-log (→ token-log.md)
443
+ │ └─► M43 D2 tool-attribution (planned)
444
+ ├── scripts/gsd-t-token-aggregator.js (M40 worker stream-json)
445
+ ├── bin/gsd-t-token-capture.cjs (M41 recordSpawnRow / captureSpawn)
446
+ ├── bin/gsd-t-token-backfill.cjs (M41 D3 historical recovery)
447
+ └── M43 D1 in-session capture (hook or tee — branch pending)
448
+ ```
449
+
450
+ Under v2, `.gsd-t/token-log.md` is a **regenerated view** (`gsd-t tokens --regenerate-log`), not hand-maintained. Wrapper still appends in real time for live visibility; regeneration is an explicit operator step that requires the JSONL to be fully backfilled first. Regeneration is idempotent and deterministic (sort order: `startedAt` asc → `session_id` asc → `turn_id` asc, numeric when both turn IDs parse).
451
+
436
452
  ### GSD 2 Tier 3 — Quality Culture & Design (M32 — complete v2.53.10)
437
453
 
438
454
  Three enhancements for project-level quality identity and design consistency.
@@ -0,0 +1,35 @@
1
+ # M40 Speed Benchmark — Gate Verdict
2
+
3
+ - **Generated**: 2026-04-20T20:25:33.610Z
4
+ - **Runs per side**: 1
5
+ - **Fixture**: /Users/david/projects/GSD-T/test/fixtures/m40-benchmark-workload
6
+ - **Verdict**: **PASS** — orchestrator 226451ms ≤ in-session 315567ms × 1.05 (331345ms) — Waves 2+3+4 unlocked
7
+
8
+ ## Environment
9
+
10
+ - Node: v24.14.1
11
+ - Platform: darwin-25.4.0 (arm64)
12
+ - CPUs: 18
13
+ - RAM: 2849 MB free / 49152 MB total
14
+
15
+ ## Per-run timings (ms) and commit-discipline audit
16
+
17
+ | # | Orchestrator (ms / exit / commits) | In-session (ms / exit / commits) |
18
+ |---|------------------------------------|----------------------------------|
19
+ | 1 | 226451 / 0 / 20/20 | 315567 / 0 / 20/20 |
20
+
21
+ - **Median orchestrator**: 226451 ms
22
+ - **Median in-session**: 315567 ms
23
+ - **Threshold** (insession × 1.05): 331345 ms
24
+
25
+ ## Methodology
26
+
27
+ - Same fixture (`test/fixtures/m40-benchmark-workload/`) copied to a fresh
28
+ tmp dir per run; git initialized; no cross-run state.
29
+ - Orchestrator path: `bin/gsd-t-orchestrator.js` drives waves via the
30
+ D1 spawn loop + D2 brief builder.
31
+ - In-session path: a single `claude -p` session handed the tasks
32
+ sequentially — no subagents.
33
+ - `Date.now()` wall-clock, millisecond precision. Both sides include
34
+ their full lifecycle (startup + work + teardown).
35
+ - PASS when `median(orchestrator_ms) ≤ median(in-session_ms) × 1.05`.
@@ -441,3 +441,23 @@ A reference implementation of the HTML report output is at `scan-report-mock.htm
441
441
  - ~~Backlog file format drift (TD-014)~~ — RESOLVED
442
442
  - ~~Progress.md format drift (TD-015)~~ — RESOLVED
443
443
  - ~~7 backlog commands missing from GSD-T-README (TD-016)~~ — RESOLVED
444
+
445
+ ## M40 Requirements Traceability (plan phase — 2026-04-19)
446
+
447
+ Milestone 40 (External Task Orchestrator + Streaming Watcher UI) decomposes into 5 measurable requirements drawn directly from `progress.md` Current Milestone § Success criteria. Task numbers reference `.gsd-t/domains/*/tasks.md`.
448
+
449
+ | REQ-ID | Requirement Summary | Domain | Task(s) | Status |
450
+ |--------|---------------------|--------|---------|--------|
451
+ | REQ-M40-01 | Speed parity or better vs in-session (D0 kill-switch gate) | d0-speed-benchmark | Tasks 1, 2, 3 | pending |
452
+ | REQ-M40-02 | No compaction — one task per spawn, fresh context each time | d1-orchestrator-core | Tasks 3, 4, 6 | pending |
453
+ | REQ-M40-03 | Live streaming UI on localhost:7842 at zero Claude token cost | d4-stream-feed-server, d5-stream-feed-ui | D4 Tasks 1–5, D5 Tasks 1–5 | pending |
454
+ | REQ-M40-04 | Per-wave Promise.all parallelism with Team Mode §15 ceiling (15 max) | d1-orchestrator-core | Tasks 1, 4, 6 | pending |
455
+ | REQ-M40-05 | Recovery from durable JSONL + progress.md on orchestrator crash | d6-recovery-and-resume | Tasks 1, 2, 3, 4 | pending |
456
+
457
+ Supporting contracts (no direct REQ mapping — shared infrastructure):
458
+ - `task-brief-contract.md` (d2-task-brief-builder Tasks 1–3) — enables REQ-M40-02 via self-contained briefs
459
+ - `completion-signal-contract.md` (d3-completion-protocol Tasks 1–3) — enables REQ-M40-02 and REQ-M40-05 via deterministic done-signal
460
+ - `wave-join-contract.md` (d1-orchestrator-core) — enables REQ-M40-04
461
+ - `stream-json-sink-contract.md` (d1↔d4 joint) — enables REQ-M40-03
462
+
463
+ All 5 REQs map to at least one task; no orphaned requirements. All 25 tasks across 7 domains trace to at least one REQ (task-brief/completion tasks support via contract infra).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tekyzinc/gsd-t",
3
- "version": "3.13.16",
3
+ "version": "3.16.11",
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",