@tekyzinc/gsd-t 4.0.27 → 4.0.29

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.
@@ -1,153 +1,396 @@
1
- # Infrastructure GSD-T Framework (@tekyzinc/gsd-t)
1
+ # Infrastructure - GSD-T Framework (@tekyzinc/gsd-t)
2
2
 
3
- ## Last Updated: 2026-03-22 (M23 — Headless Mode)
3
+ ## Last Updated: 2026-06-04 (deep-scan M80)
4
4
 
5
- > **Scan #11 note (2026-04-16, v3.11.11)**: the `ANTHROPIC_API_KEY` setup section
6
- > below is now stale — the context meter switched to a local token estimator
7
- > in v3.11.11 and the key is no longer required by the meter. The key is still
8
- > consumed by `bin/runway-estimator.js` and some telemetry paths. Doctor was
9
- > updated; this doc was not. See `.gsd-t/techdebt.md` TD-103.
5
+ ---
10
6
 
11
7
  ## Quick Reference
12
8
 
13
9
  | Task | Command |
14
10
  |------|---------|
15
11
  | Install GSD-T | `npx @tekyzinc/gsd-t install` |
16
- | Check status | `npx @tekyzinc/gsd-t status` |
17
12
  | Update GSD-T | `npx @tekyzinc/gsd-t update` |
18
- | Update all projects | `npx @tekyzinc/gsd-t update-all` |
13
+ | Update GSD-T + all projects | `npx @tekyzinc/gsd-t update-all` |
14
+ | Check installation status | `npx @tekyzinc/gsd-t status` |
19
15
  | Diagnose issues | `npx @tekyzinc/gsd-t doctor` |
16
+ | Scaffold a project | `npx @tekyzinc/gsd-t init [project-name]` |
17
+ | Register current dir | `npx @tekyzinc/gsd-t register` |
20
18
  | View changelog | `npx @tekyzinc/gsd-t changelog` |
21
- | Register project | `npx @tekyzinc/gsd-t register` |
22
- | Publish to npm | `npm publish` (runs `npm test` automatically via prepublishOnly) |
19
+ | Uninstall | `npx @tekyzinc/gsd-t uninstall` |
20
+ | Run unit tests | `npm test` (Node built-in runner; prepublishOnly hook) |
21
+ | Run E2E tests | `npm run e2e` (Playwright - chromium) |
22
+ | Install Playwright | `npm run e2e:install` |
23
+ | Publish to npm | `npm publish` (runs `npm test` first via prepublishOnly) |
23
24
  | Headless exec | `gsd-t headless <command> [--json] [--timeout=N] [--log]` |
24
- | Headless query | `gsd-t headless query <type>` (no LLM, <100ms) |
25
+ | Headless query (no LLM) | `gsd-t headless query <type>` (<100ms, pure file parse) |
26
+ | Code graph index | `gsd-t graph index` |
27
+ | Code graph status | `gsd-t graph status` |
28
+ | Code graph query | `gsd-t graph query <entity>` |
29
+ | Preflight check | `gsd-t preflight [--json]` |
30
+ | Context brief | `gsd-t brief --kind <kind> [--domain <d>]` |
31
+ | Verify gate | `gsd-t verify-gate [--json]` |
32
+ | CI-parity check | `gsd-t ci-parity [--json]` |
33
+ | Build coverage check | `gsd-t build-coverage [--json]` |
34
+ | Test data ledger | `gsd-t test-data --list | --purge --run <id>` |
35
+ | Parallel tasks | `gsd-t parallel [--dry-run] [--domain <d>]` |
36
+ | Workflow path resolver | `gsd-t workflow-path <name>` |
37
+ | Journey coverage | `gsd-t check-coverage [--report] [--strict]` |
38
+ | Doctor (full) | `gsd-t doctor [--prune] [--install-playwright] [--install-hooks] [--install-journey-hook]` |
39
+ | Archive progress log | `node bin/archive-progress.cjs [--project DIR] [--dry-run] [--keep N]` |
40
+
41
+ ---
25
42
 
26
43
  ## Local Development
27
44
 
28
45
  ### Setup
46
+
29
47
  ```bash
30
- # Clone and install
48
+ # Clone the repo
31
49
  git clone https://github.com/Tekyz-Inc/get-stuff-done-teams.git
32
50
  cd get-stuff-done-teams
33
51
 
34
- # No npm install needed zero dependencies
35
- # Test the CLI directly:
52
+ # No npm install needed for runtime - zero runtime dependencies
53
+ # Install dev dependency (Playwright) if running E2E tests:
54
+ npm install
55
+
56
+ # Test the CLI directly (no build step needed):
36
57
  node bin/gsd-t.js status
58
+ node bin/gsd-t.js install
59
+ node bin/gsd-t.js doctor
37
60
  ```
38
61
 
39
62
  ### Testing
63
+
40
64
  ```bash
41
- # Run automated test suite (205 tests, zero dependencies)
65
+ # Run all unit tests (Node built-in test runner, 78 test files)
42
66
  npm test
43
67
 
44
- # Test CLI subcommands manually
45
- node bin/gsd-t.js install
68
+ # Run E2E tests (Playwright - requires chromium)
69
+ npm run e2e:install # one-time: install chromium
70
+ npm run e2e # run E2E suite
71
+
72
+ # Test specific CLI subcommands manually
46
73
  node bin/gsd-t.js status
47
74
  node bin/gsd-t.js doctor
48
75
  node bin/gsd-t.js init test-project
49
76
 
50
- # Validate command files exist
51
- ls commands/*.md | wc -l # Should be 48
52
- ls templates/*.md | wc -l # Should be 9
77
+ # Validate command file counts
78
+ ls commands/*.md | wc -l # 51 command files
79
+ ls templates/stacks/*.md # stack rule templates
53
80
 
54
- # Test new utility scripts
55
- node scripts/gsd-t-tools.js validate
56
- node scripts/gsd-t-tools.js git pre-commit-check
81
+ # Test scan HTML export
82
+ node bin/gsd-t.js scan --export=html
83
+ # Output: scan-report.html (self-contained)
57
84
 
58
- # Test scan visual output
59
- node bin/gsd-t.js scan --export html
60
- # Output: scan-report.html (self-contained, no external deps)
85
+ # Test stream feed server (loopback only, port 7842)
86
+ node scripts/gsd-t-stream-feed-server.js --port 7842
61
87
 
62
- # Test dashboard server
63
- node scripts/gsd-t-dashboard-server.js --port 7433 --detach
64
- # Browser: http://localhost:7433
65
- node scripts/gsd-t-dashboard-server.js --stop
88
+ # Test design review server (default port 3456)
89
+ node scripts/gsd-t-design-review-server.js --port 3456 --target http://localhost:5173
90
+
91
+ # Validate a workflow script path
92
+ node bin/gsd-t.js workflow-path execute
93
+ node bin/gsd-t.js workflow-path verify
66
94
  ```
67
95
 
68
- ### Scripts
96
+ ### Scripts Reference
97
+
69
98
  | Script | Purpose |
70
99
  |--------|---------|
71
- | `scripts/gsd-t-heartbeat.js` | Claude Code hook event logger (JSONL output, secret scrubbing) |
72
- | `scripts/npm-update-check.js` | Background npm registry version checker (path-validated) |
100
+ | `scripts/gsd-t-heartbeat.js` | Claude Code hook event logger - JSONL output, secret scrubbing |
101
+ | `scripts/gsd-t-auto-route.js` | UserPromptSubmit hook - auto-routes plain text via /gsd in GSD-T projects |
102
+ | `scripts/gsd-t-update-check.js` | SessionStart hook - fetches latest npm version, emits update banners |
73
103
  | `scripts/gsd-t-fetch-version.js` | Synchronous npm registry fetch (5s timeout, 1MB limit) |
74
- | `scripts/gsd-t-tools.js` | State utility CLI state get/set, validate, list, git check, template read (M13) |
75
- | `scripts/gsd-t-statusline.js` | Context usage bar + project state for Claude Code statusLine setting (M13) |
76
- | `scripts/gsd-t-event-writer.js` | Structured JSONL event appender CLI writes to .gsd-t/events/ (M14) |
77
- | `scripts/gsd-t-dashboard-server.js` | Zero-dep SSE server for real-time dashboard port 7433 (M15) |
78
- | `scripts/gsd-t-auto-route.js` | UserPromptSubmit hook auto-routes plain text via /gsd in GSD-T projects (M16) |
79
- | `scripts/gsd-t-update-check.js` | SessionStart hook fetches latest npm version, auto-updates GSD-T (M16) |
80
- | `bin/scan-schema.js` | ORM/DB schema detector + extractor 7 ORM types (M17) |
81
- | `bin/scan-diagrams.js` | Diagram orchestrator 6 diagram types, renders to SVG or placeholder (M17) |
82
- | `bin/scan-report.js` | Self-contained HTML scan report generator (M17) |
83
- | `bin/scan-export.js` | Export subcommand DOCX (pandoc) + PDF (md-to-pdf) stubs (M17) |
104
+ | `scripts/gsd-t-tools.js` | State utility CLI - get/set/validate/list/git-check/template-read |
105
+ | `scripts/gsd-t-statusline.js` | Context usage bar + project state for Claude Code statusLine |
106
+ | `scripts/gsd-t-event-writer.js` | Structured JSONL event appender CLI - writes to `.gsd-t/events/` |
107
+ | `scripts/gsd-t-stream-feed-server.js` | WebSocket + SSE server for real-time agent stream (port 7842) |
108
+ | `scripts/gsd-t-dashboard-autostart.cjs` | Dashboard process management - start/stop/check |
109
+ | `scripts/gsd-t-date-guard.js` | PreToolUse hook - blocks Write/Edit with stale timestamps (+-5 min) |
110
+ | `scripts/gsd-t-calibration-hook.js` | Detects compaction events from transcript - updates calibration data |
111
+ | `scripts/gsd-t-compact-detector.js` | Appends compaction JSONL rows to `.gsd-t/metrics/compactions.jsonl` |
112
+ | `scripts/gsd-t-compaction-scanner.js` | Backfills compaction log by scanning transcript history |
113
+ | `scripts/gsd-t-token-aggregator.js` | Aggregates stream-feed JSONL into per-task token-usage.jsonl |
114
+ | `scripts/gsd-t-watch-state.js` | Writes/reads agent watch-state JSON files (atomic write) |
115
+ | `scripts/gsd-t-design-review-server.js` | Design review proxy server with inject overlay (port 3456) |
116
+ | `scripts/npm-update-check.js` | Background npm registry version checker (path-validated) |
117
+
118
+ ### Bin Modules Reference
119
+
120
+ | Module | Purpose |
121
+ |--------|---------|
122
+ | `bin/gsd-t.js` | Main CLI entry point - install, update, init, status, doctor, graph, headless, etc. |
123
+ | `bin/orchestrator.js` | Design-phase orchestrator - element inventory + build pipeline |
124
+ | `bin/design-orchestrator.js` | Design-to-code build pipeline - elements, widgets, pages |
125
+ | `bin/cli-preflight.cjs` | Preflight gate - branch guard, dirty tree, ports, contract stability |
126
+ | `bin/gsd-t-context-brief.cjs` | Per-spawn context brief generator (11 kinds: execute, verify, qa, etc.) |
127
+ | `bin/gsd-t-verify-gate.cjs` | Track 1+2 verify gate - preflight + parallel CLI substrate |
128
+ | `bin/gsd-t-verify-gate-judge.cjs` | Synthesis judge - merges triad results into VERIFIED / VERIFY-FAILED |
129
+ | `bin/gsd-t-build-coverage.cjs` | CI-parity gate: checks all top-level dirs appear in Dockerfile COPY |
130
+ | `bin/gsd-t-ci-parity.cjs` | CI-parity gate: compares local build config with CI config |
131
+ | `bin/gsd-t-parallel.cjs` | Task parallelism orchestrator - mode-aware gating, fan-out decisions |
132
+ | `bin/parallel-cli.cjs` | Worker pool executor - failFast, SIGTERM/SIGKILL escalation, tee |
133
+ | `bin/parallel-cli-tee.cjs` | Tee streaming helper for parallel-cli output |
134
+ | `bin/gsd-t-task-graph.cjs` | Task dependency graph builder |
135
+ | `bin/gsd-t-file-disjointness.cjs` | File-disjointness safety gate for parallel worker safety |
136
+ | `bin/gsd-t-depgraph-validate.cjs` | Dependency graph validation for task ordering |
137
+ | `bin/gsd-t-test-data-ledger.cjs` | Test data registration/purge ledger for E2E cleanup |
138
+ | `bin/archive-progress.cjs` | Rolls old Decision Log entries out of progress.md into archives |
139
+ | `bin/global-sync-manager.js` | Global cross-project metrics sync to `~/.claude/metrics/` |
140
+ | `bin/patch-lifecycle.js` | Candidate/applied/measured/promoted/graduated patch state machine |
141
+ | `bin/metrics-collector.js` | Task-metrics JSONL writer for `.gsd-t/metrics/task-metrics.jsonl` |
142
+ | `bin/rule-engine.js` | Loads rules from `.gsd-t/metrics/rules.jsonl`, evaluates, creates candidates |
143
+ | `bin/model-selector.js` | Declarative phase-to-model mapping (haiku/sonnet/opus) |
144
+ | `bin/playwright-bootstrap.cjs` | Playwright install + health check library |
145
+ | `bin/ui-detection.cjs` | Detects whether project has a UI layer |
146
+ | `bin/journey-coverage.cjs` | Journey coverage manifest builder |
147
+ | `bin/journey-coverage-cli.cjs` | CLI wrapper for journey-coverage |
148
+ | `bin/graph-cgc.js` | CodeGraphContext (CGC) Neo4j adapter |
149
+ | `bin/graph-indexer.js` | Project file indexer for code graph |
150
+ | `bin/graph-store.js` | Graph index read/write (8 JSON files per project) |
151
+ | `bin/graph-query.js` | Query callers/imports/surfaces via grep fallback |
152
+ | `bin/graph-overlay.js` | Overlays domain/contract metadata onto graph |
153
+ | `bin/graph-parsers.js` | AST parsers for JS/TS/Python call extraction |
154
+ | `bin/advisor-integration.js` | Advisor hook integration |
155
+ | `bin/component-registry.js` | Component registry with atomic JSONL write |
156
+ | `bin/debug-ledger.js` | Debug cycle ledger for headless debug-loop |
157
+ | `bin/scan-*.js` | Scan engine modules (data-collector, schema, schema-parsers, report, report-sections, renderer, export, diagrams, diagrams-generators) |
158
+ | `bin/gsd-t-time-format.cjs` | `localIsoWithOffset()` for POSIX-correct local timestamps |
159
+ | `bin/gsd-t-completion-check.cjs` | Completion status check for milestone gate |
160
+
161
+ ---
84
162
 
85
163
  ## Distribution
86
164
 
87
165
  ### npm Package
166
+
88
167
  - **Registry**: https://www.npmjs.com/package/@tekyzinc/gsd-t
89
- - **Publish**: `npm publish` (requires npm login with Tekyz account)
90
- - **Version**: Managed in `package.json`, synced to `.gsd-t/progress.md`
168
+ - **Current version**: see `package.json` ("version" field) - track at `~/.claude/.gsd-t-version`
169
+ - **Publish**: `npm publish` (requires npm login with Tekyz account; `prepublishOnly` runs `npm test`)
170
+ - **Zero runtime dependencies** - installer uses only Node.js built-ins
171
+ - **Dev dependency**: `@playwright/test` ^1.55.0 (E2E tests only)
91
172
  - **Files shipped**: `bin/`, `commands/`, `scripts/`, `templates/`, `examples/`, `docs/`, `CHANGELOG.md`
92
173
 
93
174
  ### Installed Locations
175
+
94
176
  | What | Where |
95
177
  |------|-------|
96
- | Slash commands (48 files) | `~/.claude/commands/` |
97
- | Global config | `~/.claude/CLAUDE.md` |
178
+ | Slash commands (51 files) | `~/.claude/commands/` |
179
+ | Global CLAUDE.md | `~/.claude/CLAUDE.md` |
98
180
  | Heartbeat script | `~/.claude/scripts/gsd-t-heartbeat.js` |
181
+ | Update-check script | `~/.claude/scripts/gsd-t-update-check.js` |
182
+ | Auto-route script | `~/.claude/scripts/gsd-t-auto-route.js` |
99
183
  | State utility CLI | `~/.claude/scripts/gsd-t-tools.js` |
100
184
  | Statusline script | `~/.claude/scripts/gsd-t-statusline.js` |
185
+ | Shared templates | `~/.claude/templates/` |
101
186
  | Hook configuration | `~/.claude/settings.json` (hooks section) |
102
187
  | Version file | `~/.claude/.gsd-t-version` |
103
188
  | Update cache | `~/.claude/.gsd-t-update-check` |
104
189
  | Project registry | `~/.claude/.gsd-t-projects` |
190
+ | Global bin tools | `~/.claude/bin/` (see list below) |
191
+
192
+ **Global bin tools** (copied to `~/.claude/bin/` on install):
193
+
194
+ | Tool | Purpose |
195
+ |------|---------|
196
+ | `cli-preflight.cjs` | Preflight gate dispatch target |
197
+ | `gsd-t-context-brief.cjs` | Brief generator dispatch target |
198
+ | `gsd-t-verify-gate.cjs` | Verify gate dispatch target |
199
+ | `gsd-t-verify-gate-judge.cjs` | Judge dispatch target |
200
+ | `parallel-cli.cjs` | Parallel worker pool executor |
201
+ | `gsd-t-build-coverage.cjs` | Build coverage check |
202
+ | `gsd-t-ci-parity.cjs` | CI parity check |
203
+ | `parallelism-report.cjs` | Parallelism report generator |
204
+ | `live-activity-report.cjs` | Live activity report generator |
205
+
206
+ ### Installed Hooks (settings.json)
105
207
 
106
- ## Repository Structure
208
+ GSD-T registers these hooks in `~/.claude/settings.json`:
107
209
 
210
+ | Hook type | Script | Purpose |
211
+ |-----------|--------|---------|
212
+ | `UserPromptSubmit` | `gsd-t-auto-route.js` | Emits `[GSD-T NOW]` clock signal; routes plain text via /gsd in GSD-T project dirs |
213
+ | `SessionStart` | `gsd-t-update-check.js` | Fetches latest npm version; emits `[GSD-T AUTO-UPDATE]` / `[GSD-T UPDATE]` / `[GSD-T]` |
214
+ | `UserPromptSubmit` | `gsd-t-heartbeat.js` | Logs conversation events to `.gsd-t/events/YYYY-MM-DD.jsonl` |
215
+ | `PostToolUse` (dead) | context-meter hook | Installed but non-functional - context meter was retired in M61; hook silently exits 0 |
216
+ | `PreToolUse` | `gsd-t-date-guard.js` | Blocks Write/Edit calls with timestamps drifting >5 min from live clock |
217
+
218
+ Note: The context-meter PostToolUse hook is still written to settings.json on install (known defect - finding in scan) but silently no-ops since `scripts/gsd-t-context-meter.js` does not exist.
219
+
220
+ ### Figma MCP
221
+
222
+ Auto-configured during install via `claude mcp add`:
223
+
224
+ ```bash
225
+ # Configured automatically by gsd-t install. To add manually:
226
+ claude mcp add --transport http -s user figma https://mcp.figma.com/mcp
108
227
  ```
109
- get-stuff-done-teams/
110
- ├── bin/gsd-t.js — CLI installer (~1,438 lines, zero dependencies)
111
- ├── commands/ — 45 slash command files (41 GSD-T + 4 utility)
112
- ├── scripts/ — 5 hook/utility scripts (added gsd-t-tools.js, gsd-t-statusline.js in M13)
113
- ├── templates/ — 9 document templates
114
- ├── examples/ — Reference project structure
115
- ├── docs/ — Methodology + living docs
116
- ├── .gsd-t/ — GSD-T state (self-managed)
117
- └── package.json — npm package config
228
+
229
+ Check current status:
230
+ ```bash
231
+ gsd-t doctor
118
232
  ```
119
233
 
120
- ## Headless Mode (M23)
234
+ ---
121
235
 
122
- Headless mode enables non-interactive GSD-T execution for CI/CD pipelines and overnight builds.
236
+ ## Project Directory Structure (.gsd-t/)
237
+
238
+ Each GSD-T project has a `.gsd-t/` state directory created by `gsd-t init`. Key subdirectories:
239
+
240
+ | Path | Purpose | Committed? |
241
+ |------|---------|-----------|
242
+ | `.gsd-t/progress.md` | Milestone/phase state + decision log | Yes |
243
+ | `.gsd-t/backlog.md` | Backlog items | Yes |
244
+ | `.gsd-t/backlog-settings.md` | Backlog defaults (apps, types) | Yes |
245
+ | `.gsd-t/contracts/` | Domain interface contracts (STABLE/DRAFT) | Yes |
246
+ | `.gsd-t/domains/` | Per-domain scope/tasks/constraints | Yes |
247
+ | `.gsd-t/milestones/` | Completed milestone archives + archive-meta.json | Yes |
248
+ | `.gsd-t/progress-archive/` | Rolled-out decision log entries (NNN-YYYY-MM-DD.md) | Yes |
249
+ | `.gsd-t/techdebt.md` | Tech debt register | Yes |
250
+ | `.gsd-t/scan/` | Deep-scan output (architecture.md, security.md, quality.md, etc.) | Yes |
251
+ | `.gsd-t/events/` | JSONL event stream (YYYY-MM-DD.jsonl, heartbeat writes) | No (gitignored) |
252
+ | `.gsd-t/metrics/` | Task metrics, compaction log, token-usage, rollup | No (gitignored) |
253
+ | `.gsd-t/stream-feed/` | WebSocket frame JSONL (YYYY-MM-DD.jsonl) | No (gitignored) |
254
+ | `.gsd-t/briefs/` | Per-spawn context briefs (ephemera) | No (gitignored) |
255
+ | `.gsd-t/.unattended/` | Supervisor state, PID, run log, stop sentinel | No (gitignored) |
256
+ | `.gsd-t/token-log.md` | Headless exec token log rows | No (gitignored) |
257
+ | `.gsd-t/token-metrics.jsonl` | Legacy M35-era per-spawn token records | No (gitignored) |
258
+ | `.gsd-t/.context-meter-state.json` | Context meter state (retired, kept for compat) | No (gitignored) |
259
+ | `.gsd-t/.last-playwright-pass` | Timestamp of last Playwright pass (pre-commit gate) | No |
123
260
 
124
- ### headless exec
261
+ ---
262
+
263
+ ## Ports and Services
264
+
265
+ | Service | Default Port | Env Override | Notes |
266
+ |---------|-------------|--------------|-------|
267
+ | Stream Feed Server | 7842 | `GSD_T_STREAM_FEED_PORT` | Loopback only (127.0.0.1) - WebSocket + SSE |
268
+ | Design Review Server | 3456 | `--port` arg | Proxies dev server with inject overlay |
269
+ | Neo4j (graph engine) | 7687 (Bolt) / 7474 (HTTP) | Docker container | Container name: `gsd-t-neo4j` |
270
+
271
+ ---
272
+
273
+ ## Graph Engine (CGC + Neo4j)
274
+
275
+ The code graph engine is an optional feature for deep code analysis. It requires Docker.
276
+
277
+ ### Setup
278
+
279
+ ```bash
280
+ # Install CGC (CodeGraphContext) - requires Python
281
+ pip install codegraphcontext
282
+
283
+ # Install/start Neo4j container (done automatically by gsd-t install / gsd-t doctor)
284
+ docker run -d --name gsd-t-neo4j \
285
+ -p 7474:7474 -p 7687:7687 \
286
+ -e NEO4J_AUTH=neo4j/gsdt-graph-2026 \
287
+ --restart unless-stopped \
288
+ neo4j:5-community
289
+
290
+ # Configure CGC to point at the container
291
+ cgc config set DEFAULT_DATABASE neo4j
292
+ cgc config set NEO4J_URI bolt://localhost:7687
293
+ cgc config set NEO4J_PASSWORD gsdt-graph-2026
294
+ ```
295
+
296
+ **Security note**: The password `gsdt-graph-2026` is hardcoded in the installer (known defect - see techdebt.md). This is a local-only Neo4j instance but the password is publicly known. For sensitive codebases, change the password after setup:
297
+
298
+ ```bash
299
+ # Change Neo4j password post-install (Neo4j browser at http://localhost:7474)
300
+ # Then update CGC config:
301
+ cgc config set NEO4J_PASSWORD <new-password>
302
+ ```
303
+
304
+ ### Container Management
305
+
306
+ ```bash
307
+ # Check container status
308
+ gsd-t doctor
309
+
310
+ # Start stopped container
311
+ docker start gsd-t-neo4j
312
+
313
+ # Stop container
314
+ docker stop gsd-t-neo4j
315
+
316
+ # Check if running
317
+ docker inspect gsd-t-neo4j --format '{{.State.Running}}'
318
+ ```
319
+
320
+ ### Graph CLI Usage
321
+
322
+ ```bash
323
+ # Index the current project
324
+ gsd-t graph index
325
+
326
+ # Check index status
327
+ gsd-t graph status
328
+
329
+ # Query an entity
330
+ gsd-t graph query MyClass
331
+
332
+ # Show task domain assignments
333
+ gsd-t graph tasks [table|json]
334
+ ```
335
+
336
+ ---
337
+
338
+ ## Secrets and Credentials
339
+
340
+ **Names only - never store values in docs.**
341
+
342
+ | Name | Purpose | Where set |
343
+ |------|---------|-----------|
344
+ | `ANTHROPIC_API_KEY` | Token counting / diagnostics only (NOT inference - inference uses Claude Max subscription) | Shell profile or CI secret |
345
+ | `GSD_T_STREAM_FEED_PORT` | Override stream feed server port | Environment |
346
+ | `GSD_T_AGENT_ID` | Agent identity for watch-state files (CLI arg `--agent-id` preferred) | Environment or CLI |
347
+ | Neo4j password | CGC graph engine auth - see security note above | `~/.codegraphcontext/.env` |
348
+
349
+ **ANTHROPIC_API_KEY** is used only for `count_tokens` diagnostics. All LLM inference uses the Claude Max subscription (local install) - never billed to the API key for build work.
350
+
351
+ ```bash
352
+ # Set in shell profile (optional - only needed for token diagnostics)
353
+ export ANTHROPIC_API_KEY="sk-ant-..."
354
+
355
+ # Verify
356
+ gsd-t doctor
357
+ ```
358
+
359
+ ---
125
360
 
126
- Wraps `claude -p "/gsd-t-{command} {args}"` for unattended execution.
361
+ ## Headless Execution
362
+
363
+ Headless mode runs GSD-T commands non-interactively via `claude -p` with `--dangerously-skip-permissions`.
364
+
365
+ ### headless exec
127
366
 
128
367
  ```bash
129
368
  gsd-t headless verify --json --timeout=1200 --log
130
369
  gsd-t headless execute --timeout=3600
131
370
  gsd-t headless wave --json
371
+ gsd-t headless quick "add error handling to auth module"
132
372
  ```
133
373
 
134
374
  **Flags:**
375
+
135
376
  | Flag | Default | Description |
136
377
  |------|---------|-------------|
137
- | `--json` | off | Output structured JSON envelope |
138
- | `--timeout=N` | 300s | Kill process after N seconds |
139
- | `--log` | off | Write output to `.gsd-t/headless-{timestamp}.log` |
378
+ | `--json` | off | Output structured JSON envelope |
379
+ | `--timeout=N` | 300s | Kill process after N seconds |
380
+ | `--log` | off | Write output to `.gsd-t/headless-{timestamp}.log` |
140
381
 
141
382
  **Exit codes:**
383
+
142
384
  | Code | Meaning |
143
385
  |------|---------|
144
- | 0 | success |
145
- | 1 | verify-fail (tests or quality gates failed) |
146
- | 2 | context-budget-exceeded (split the milestone) |
147
- | 3 | error (claude CLI error or process failure) |
148
- | 4 | blocked-needs-human (requires manual intervention) |
386
+ | 0 | Success |
387
+ | 1 | Verify-fail (tests or quality gates failed) |
388
+ | 2 | Context-budget-exceeded (split the milestone) |
389
+ | 3 | Error (claude CLI error or process failure) |
390
+ | 4 | Blocked-needs-human (requires manual intervention) |
391
+
392
+ **JSON envelope shape:**
149
393
 
150
- **JSON envelope shape (--json flag):**
151
394
  ```json
152
395
  {
153
396
  "success": true,
@@ -156,265 +399,238 @@ gsd-t headless wave --json
156
399
  "command": "verify",
157
400
  "args": [],
158
401
  "output": "...",
159
- "timestamp": "2026-03-22T10:00:00.000Z",
402
+ "timestamp": "2026-06-04T10:00:00.000Z",
160
403
  "duration": 42150,
161
- "logFile": ".gsd-t/headless-1742641200000.log"
404
+ "logFile": ".gsd-t/headless-1749034800000.log"
162
405
  }
163
406
  ```
164
407
 
165
408
  ### headless query
166
409
 
167
- Pure Node.js file parsing no LLM calls, <100ms response.
410
+ Pure Node.js file parsing - no LLM calls, <100ms.
168
411
 
169
412
  ```bash
170
- gsd-t headless query status # Version, milestone, phase
171
- gsd-t headless query domains # Domain list with flags
172
- gsd-t headless query contracts # Contract file list
173
- gsd-t headless query debt # Tech debt items
174
- gsd-t headless query context # Token log summary
175
- gsd-t headless query backlog # Backlog items
176
- gsd-t headless query graph # Graph index metadata
413
+ gsd-t headless query status # Version, milestone, phase
414
+ gsd-t headless query domains # Domain list with flags
415
+ gsd-t headless query contracts # Contract file list
416
+ gsd-t headless query debt # Tech debt items
417
+ gsd-t headless query context # Token log summary
418
+ gsd-t headless query backlog # Backlog items (note: parse bug - always empty, see techdebt)
419
+ gsd-t headless query graph # Graph index metadata
177
420
  ```
178
421
 
179
422
  All queries return JSON to stdout.
180
423
 
181
- ### CI/CD Integration
424
+ ### debug-loop
425
+
426
+ ```bash
427
+ gsd-t headless --debug-loop <command>
428
+ ```
429
+
430
+ Runs up to 20 fix/verify cycles on a failing command. Exits code 0 (fixed), 1 (max iterations), or 4 (escalation needed).
182
431
 
183
- Example workflow files are in `docs/ci-examples/`:
184
- - `github-actions.yml` — GitHub Actions workflow with verify + status gate jobs
185
- - `gitlab-ci.yml` — GitLab CI pipeline with status/verify/report stages
432
+ **Known defect**: `spawnClaudeSession` (used by debug-loop) is missing `--dangerously-skip-permissions`, causing all tool use to fail. See techdebt.md.
433
+
434
+ ---
435
+
436
+ ## CI/CD Integration
437
+
438
+ ### GitHub Actions
186
439
 
187
- **Quick setup for GitHub Actions:**
188
440
  ```yaml
189
441
  - name: GSD-T Verify
190
- env:
191
- ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
192
442
  run: gsd-t headless verify --json --timeout=1200
193
443
  ```
194
444
 
195
- **Quick setup for GitLab CI:**
445
+ Note: `ANTHROPIC_API_KEY` is optional (token diagnostics only). Inference runs via Claude Max and does not require the API key in CI.
446
+
447
+ ### GitLab CI
448
+
196
449
  ```yaml
197
450
  gsd-t-verify:
198
451
  script:
199
452
  - gsd-t headless verify --json --timeout=1200
200
- variables:
201
- ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY}
202
453
  ```
203
454
 
204
- ## Context Meter Setup (M34, v2.75.10+)
455
+ ### Pre-commit Hooks (opt-in)
205
456
 
206
- The Context Meter is a PostToolUse hook that measures real context consumption via the Anthropic `count_tokens` API. It is **required** for the `gsd-t-execute`, `gsd-t-wave`, `gsd-t-quick`, `gsd-t-integrate`, and `gsd-t-debug` session-stop gates to work.
457
+ Install via `gsd-t init --install-hooks` or `gsd-t doctor --install-hooks`:
207
458
 
208
- **API key required**
459
+ | Hook | Script | Status |
460
+ |------|--------|--------|
461
+ | Playwright gate | `scripts/hooks/pre-commit-playwright-gate` | Active |
462
+ | Journey coverage | `scripts/hooks/pre-commit-journey-coverage` | Active |
463
+ | Capture lint | `scripts/hooks/pre-commit-capture-lint` | BROKEN - references retired `gsd-t capture-lint` subcommand (see techdebt) |
209
464
 
210
- ```bash
211
- # Shell profile (~/.zshrc, ~/.bashrc, ~/.config/fish/config.fish)
212
- export ANTHROPIC_API_KEY="sk-ant-..."
465
+ **Do not install `pre-commit-capture-lint`** - it will block all commits unconditionally. The `gsd-t capture-lint` subcommand was removed in M61.
213
466
 
214
- # Verify
215
- echo $ANTHROPIC_API_KEY | head -c 10
216
- ```
217
-
218
- Get a key at [https://console.anthropic.com](https://console.anthropic.com). Free tier is sufficient — `count_tokens` is billed per call at negligible cost.
219
-
220
- **CI/CD**: set `ANTHROPIC_API_KEY` as a secret (`secrets.ANTHROPIC_API_KEY` in GitHub Actions, masked variables in GitLab CI). The existing verify workflow example above already threads the secret through.
467
+ ---
221
468
 
222
- **Per-project `.env.local` (optional)**: drop `ANTHROPIC_API_KEY=sk-ant-...` into the project's ignored env file and source it in your shell profile if you need per-project keys.
469
+ ## Workflow Scripts
223
470
 
224
- **Verify with doctor**:
471
+ Native Workflow scripts live in `templates/workflows/`. Use `gsd-t workflow-path <name>` to resolve the absolute path (required for `Workflow({scriptPath})` calls from consumer projects).
225
472
 
226
473
  ```bash
227
- npx @tekyzinc/gsd-t doctor
474
+ # Get absolute path to a workflow script
475
+ gsd-t workflow-path execute
476
+ gsd-t workflow-path verify
477
+ gsd-t workflow-path wave
228
478
  ```
229
479
 
230
- Expected GREEN output:
480
+ Available workflow scripts:
231
481
 
232
- ```
233
- Context Meter
234
- API key set (ANTHROPIC_API_KEY)
235
- PostToolUse hook registered in ~/.claude/settings.json
236
- scripts/gsd-t-context-meter.js exists
237
- .gsd-t/context-meter-config.json loads cleanly
238
- count_tokens dry-run: 7 tokens
239
- ```
482
+ | Script | Purpose |
483
+ |--------|---------|
484
+ | `gsd-t-execute.workflow.js` | Preflight + brief + disjointness + parallel domain workers + integrate + verify-gate |
485
+ | `gsd-t-verify.workflow.js` | Orthogonal triad (code-review + Red Team + QA) + CI-parity + test-data purge |
486
+ | `gsd-t-wave.workflow.js` | Composes execute + verify as sub-workflows |
487
+ | `gsd-t-integrate.workflow.js` | Cross-domain wire-up + light verify-gate |
488
+ | `gsd-t-debug.workflow.js` | 2-cycle diagnose/fix/verify debug loop |
489
+ | `gsd-t-quick.workflow.js` | Preflight + brief + single-task + verify-gate |
490
+ | `gsd-t-phase.workflow.js` | Generic upper-stage runner (partition/plan/discuss/impact/milestone/prd) |
491
+ | `gsd-t-scan.workflow.js` | Volume-scaled deep codebase analysis + dimension files + HTML report |
492
+
493
+ **Known defect (M71 - CRITICAL)**: All workflow scripts except `gsd-t-scan.workflow.js` use `require('./_lib.js')` at the top level. The native Workflow sandbox does not provide `require` - these crash immediately with `ReferenceError: require is not defined`. Migration to sandbox-native patterns is pending. See techdebt.md.
494
+
495
+ ---
240
496
 
241
- If any check is RED, doctor exits with code 1.
497
+ ## Context Meter / Calibration
242
498
 
243
- **Config file** `.gsd-t/context-meter-config.json`:
499
+ The context meter was retired in M61. The calibration hook (`scripts/gsd-t-calibration-hook.js`) and compaction detector (`scripts/gsd-t-compact-detector.js`) remain active and write to `.gsd-t/metrics/compactions.jsonl`.
500
+
501
+ **Context window**: Opus 4.7/4.8 and Sonnet 4.5+ have 1M token context windows. The `templates/context-meter-config.json` template ships with a stale 200K `modelWindowSize` - update per-project configs to 1000000. The calibration hook uses `SAFE_DEFAULT_WINDOW = 1_000_000` correctly.
244
502
 
245
503
  ```json
246
504
  {
247
505
  "enabled": true,
248
- "apiKeyEnvVar": "ANTHROPIC_API_KEY",
249
- "modelWindowSize": 200000,
250
- "thresholdPct": 85,
506
+ "modelWindowSize": 1000000,
507
+ "thresholdPct": 75,
251
508
  "checkFrequency": 1
252
509
  }
253
510
  ```
254
511
 
255
- **Threshold bands** (M35 v3.0.0 — three bands, lower-bound inclusive):
512
+ ---
256
513
 
257
- | Band | Range | Orchestrator action |
258
- |--------|----------|----------------------------------------------------------------------------------|
259
- | normal | 0–69% | Proceed |
260
- | warn | 70–84% | Log warning; cue for explicit pause/resume at the next clean boundary |
261
- | stop | ≥85% | Halt cleanly with resume instruction; command refuses to start if runway crosses |
514
+ ## Model Selection
262
515
 
263
- **Zero silent quality degradation.** There is no `downgrade` band and no `conserve` band. Models are **never** swapped at runtime under context pressure — model choice is a plan-time decision made by `bin/model-selector.js`, and quality-critical phases (Red Team, doc-ripple, Design Verify) always run at their designated tier. See `.gsd-t/contracts/token-budget-contract.md` v3.0.0.
516
+ `bin/model-selector.js` maps phases to inference tiers:
264
517
 
265
- **Structural guarantee**: because the runway estimator refuses runs that project past 85% and the stop band fires at 85%, the runtime's 95% native compact is structurally unreachable under healthy operation. `halt_type: native-compact` in `.gsd-t/token-metrics.jsonl` is a defect signal.
518
+ | Phase | Model | Notes |
519
+ |-------|-------|-------|
520
+ | `execute` | sonnet | Domain workers |
521
+ | `verify` / `qa` | sonnet | QA subagent |
522
+ | `red-team` | opus | Adversarial analysis |
523
+ | `design-verify` | opus | Visual comparison |
524
+ | `plan` | sonnet | Note: contract says opus - known divergence (see techdebt) |
525
+ | `integrate` | sonnet | Cross-domain wire-up |
526
+ | `scan` | sonnet | Volume-scaled slices |
527
+ | `debug` | sonnet | Fix cycles |
266
528
 
267
- **Upgrading from pre-M34**: `gsd-t update-all` runs a one-time task-counter retirement migration in every registered project (deletes `bin/task-counter.cjs`, `.gsd-t/task-counter-config.json`, `.gsd-t/.task-counter-state.json`, and the `.gsd-t/.task-counter` file; writes `.gsd-t/.task-counter-retired-v1` marker). After upgrade you **must** set `ANTHROPIC_API_KEY` — doctor will fail otherwise.
529
+ Use `gsd-t doctor` to verify model-selector is loaded correctly.
268
530
 
269
- ## Runway-Protected Execution (M35)
531
+ ---
270
532
 
271
- M35 adds four components on top of the Context Meter. Together they replace graduated degradation with a pre-flight gate + pause/resume model.
533
+ ## Unattended Supervisor
272
534
 
273
- ### Per-phase model selection `bin/model-selector.js`
535
+ The unattended supervisor runs a GSD-T milestone to completion in a detached process. Underlying commands were rearchitected in M61 - `/gsd-t-unattended` and `/gsd-t-unattended-watch` commands reference deleted bin modules and are currently non-functional (see techdebt.md CRITICAL finding). Use the `/loop` skill with native Workflows instead.
274
536
 
275
- Declarative rules table mapping each phase (`plan`, `execute`, `red-team`, `doc-ripple`, `design-verify`, `qa`, `integrate`, ...) to a default tier (`haiku`|`sonnet`|`opus`). Complexity signals promoted from the task plan (`cross_module_refactor`, `security_boundary`, `data_loss_risk`, `contract_design`) escalate sonnet→opus. Each command file documents its assignments in a `## Model Assignment` block.
537
+ ### State Files
276
538
 
277
- Contract: `.gsd-t/contracts/model-selection-contract.md` v1.0.0
539
+ | File | Purpose |
540
+ |------|---------|
541
+ | `.gsd-t/.unattended/supervisor.pid` | Integer PID - exists only while supervisor is alive |
542
+ | `.gsd-t/.unattended/state.json` | Live state snapshot - status, iter, milestone, lastTick |
543
+ | `.gsd-t/.unattended/run.log` | Append-only worker stdout+stderr |
544
+ | `.gsd-t/.unattended/stop` | Sentinel - touching this requests graceful stop |
545
+ | `.gsd-t/.unattended/config.json` | Optional per-project config overrides |
278
546
 
279
- ### Pre-flight runway estimator — `bin/runway-estimator.js`
547
+ Contract: `.gsd-t/contracts/unattended-supervisor-contract.md` v1.0.0
280
548
 
281
- Reads historical per-spawn consumption from `.gsd-t/token-metrics.jsonl` via a three-tier query fallback (exact match on `{command, phase, domain}` → command+phase → command) and produces a confidence-weighted projection of end-of-run `pct`. If the projection would cross `STOP_THRESHOLD_PCT = 85`, the command refuses to start — the interactive session exits cleanly and an autonomous headless continuation is auto-spawned. The user never types `/clear`.
549
+ ---
282
550
 
283
- ### Headless auto-spawn — `bin/headless-auto-spawn.js`
551
+ ## Progress Log Archival
284
552
 
285
- Detached child-process spawn (`child_process.spawn` with `detached:true`, `stdio:['ignore', fd, fd]`, `child.unref()`). Writes `.gsd-t/headless-sessions/{session-id}.json` with session metadata, polls with `process.kill(pid, 0)` liveness probe (timer `.unref()`-ed), marks `status: completed`, and posts a macOS `osascript` notification when done (graceful no-op on non-darwin). `bin/check-headless-sessions.js` renders the read-back banner on the next `gsd-t-resume` / `gsd-t-status`.
553
+ Old Decision Log entries are rolled out of `progress.md` into numbered archives to keep it lean.
286
554
 
287
- Directory: `.gsd-t/headless-sessions/` — one JSON per session, plus optional `{id}-context.json` and log files.
555
+ ```bash
556
+ # Run archival (idempotent)
557
+ node bin/archive-progress.cjs
288
558
 
289
- ### Per-spawn token telemetry — retired in M38
559
+ # Preview without changes
560
+ node bin/archive-progress.cjs --dry-run
290
561
 
291
- Between M35 and M38 GSD-T wrote an 18-field JSONL record per subagent spawn to `.gsd-t/token-metrics.jsonl`. M38 deletes that instrumentation along with the runway estimator and the three-band meter that consumed it; the headless-by-default spawn model doesn't need pre-flight projection, and the single-band meter measures itself directly via the Anthropic count_tokens API. Historical records are preserved in milestone archives but the file is no longer written.
562
+ # Override defaults (keep 5 live, 20 per archive)
563
+ node bin/archive-progress.cjs --keep 10 --per-archive 30
292
564
 
293
- ## Metrics CLI `gsd-t metrics`
565
+ # Target a specific project
566
+ node bin/archive-progress.cjs --project /path/to/project
567
+ ```
294
568
 
295
- Read-only surface onto the token telemetry stream. Backward-compatible with pre-M35 `metrics` output; new flags surface M35 data.
569
+ Archives land in `.gsd-t/progress-archive/NNN-YYYY-MM-DD.md`. An `index.md` is rebuilt on each run.
296
570
 
297
- | Flag | Output |
298
- |-----------------------|----------------------------------------------------------------------------------------|
299
- | (no flag) | Task telemetry, process ELO, domain health (pre-M35 behavior) |
300
- | `--tokens` | Per-command / per-phase token usage summary from `.gsd-t/token-metrics.jsonl` |
301
- | `--halts` | Count + breakdown of `halt_type` values — flags any `native-compact` as a defect |
302
- | `--context-window` | Trailing 20-run window of `end_pct` with runway headroom |
303
- | `--cross-project` | Cross-project ranking (pre-M35, unchanged) |
571
+ ---
304
572
 
305
- ## `/advisor` escalation convention
573
+ ## Security Notes
306
574
 
307
- When a sonnet-default phase hits a complexity signal that warrants opus (e.g., cross-module refactor detected mid-execution), the command may emit an `/advisor` hook line in its output — a structured suggestion for the orchestrator to escalate the **next** spawn of that phase to opus. This is a plan-time signal, not a runtime swap: the current spawn completes at its assigned tier, and the escalation applies to subsequent work. See `.gsd-t/contracts/model-selection-contract.md` for the hook schema.
575
+ - Zero npm runtime dependencies - no supply chain risk
576
+ - All file writes check for symlinks first
577
+ - Input validation on project names, versions, session IDs, paths
578
+ - Heartbeat stdin capped at 1MB
579
+ - HTTP requests use HTTPS with timeouts (5s for version check)
580
+ - Init operations use exclusive file creation (`{ flag: "wx" }`)
581
+ - Watch-state files: `gsd-t-watch-state.js` uses `--agent-id` to construct file paths - ensure agent IDs contain only alphanumeric/hyphen/underscore characters (path traversal vulnerability in current version, see techdebt)
582
+ - Stream feed POST `/ingest` has no body size limit (denial-of-service risk, see techdebt)
583
+ - Neo4j password is hardcoded in installer (see techdebt) - change after install for sensitive codebases
584
+ - Design review server: `item.id` values from queue files are used unsanitized in file paths (path traversal, see techdebt)
308
585
 
309
- ## Unattended Supervisor Setup (M36)
586
+ ---
310
587
 
311
- The unattended supervisor runs an active GSD-T milestone to completion in a detached OS process — no terminal needed, no human intervention required.
588
+ ## Troubleshooting
312
589
 
313
- ### Quick Start
590
+ **`gsd-t: command not found`**
314
591
 
315
592
  ```bash
316
- # From within an interactive Claude session:
317
- /gsd-t-unattended
318
-
319
- # From the terminal (detached — returns immediately):
320
- gsd-t unattended --hours=24 --milestone=M36
321
-
322
- # Watch current run status (in-session, 270s tick):
323
- /gsd-t-unattended-watch
324
-
325
- # Request a graceful stop:
326
- /gsd-t-unattended-stop
593
+ # Install globally
594
+ npm install -g @tekyzinc/gsd-t
595
+ # or use npx
596
+ npx @tekyzinc/gsd-t status
327
597
  ```
328
598
 
329
- ### CLI Flags
599
+ **Hooks not firing**
330
600
 
601
+ ```bash
602
+ gsd-t doctor
603
+ # Check "Hooks" section output
604
+ # Re-run install if missing:
605
+ npx @tekyzinc/gsd-t install
331
606
  ```
332
- gsd-t unattended [OPTIONS]
333
- --hours=24 Wall-clock cap in hours (default: 24)
334
- --max-iterations=200 Worker iteration cap (default: 200)
335
- --project=. Project directory (default: cwd)
336
- --branch=AUTO Branch to run on; AUTO = current non-protected branch
337
- --on-done=print Terminal action: print | merge-commit (merge-commit is v2)
338
- --dry-run Preflight only; no spawn
339
- --verbose Extra log detail
340
- --test-mode Uses stub worker; for CI and smoke tests
341
- ```
342
-
343
- ### Config File (optional)
344
607
 
345
- `.gsd-t/unattended-config.json` per-project overrides. Absence = hardcoded defaults.
608
+ **Workflow fails with `ReferenceError: require is not defined`**
346
609
 
347
- ```json
348
- {
349
- "hours": 24,
350
- "maxIterations": 200,
351
- "gutterNoProgressIters": 5,
352
- "workerTimeoutMs": 3600000,
353
- "protectedBranches": ["main", "master", "develop", "trunk"],
354
- "dirtyTreeWhitelist": [".gsd-t/.unattended/*", ".gsd-t/events/*.jsonl"]
355
- }
356
- ```
610
+ This is a known CRITICAL defect (M71 migration incomplete). All workflow scripts except `gsd-t-scan.workflow.js` crash in the native Workflow sandbox. See techdebt.md. Workaround: use `/gsd-t-execute` etc. in hand-driven mode via Claude Code slash commands, not via the native `Workflow()` tool directly.
357
611
 
358
- ### State Files
612
+ **Neo4j container stopped**
359
613
 
360
- | File | Purpose |
361
- |------|---------|
362
- | `.gsd-t/.unattended/supervisor.pid` | Integer PID. Exists only while supervisor is alive. |
363
- | `.gsd-t/.unattended/state.json` | Live state snapshot — status, iter, milestone, lastTick, etc. Full schema in `unattended-supervisor-contract.md`. |
364
- | `.gsd-t/.unattended/run.log` | Append-only worker stdout+stderr. Never truncated during a run. |
365
- | `.gsd-t/.unattended/stop` | Sentinel — touching this file requests a graceful stop. |
366
- | `.gsd-t/.unattended/config.json` | Optional per-project config overrides (same keys as CLI flags). |
367
-
368
- ### Required Platform Helpers
369
-
370
- | Platform | Sleep Prevention | Notifications |
371
- |----------|-----------------|---------------|
372
- | macOS | `caffeinate` (built-in) | `osascript` (built-in) |
373
- | Linux | `systemd-inhibit` or no-op | `notify-send` (install via `apt`/`dnf`) |
374
- | Windows | NOT supported — see `docs/unattended-windows-caveats.md` | no-op |
375
-
376
- macOS and Linux work out of the box on standard installs. Windows can run the supervisor but the machine may sleep mid-run.
377
-
378
- ### Contract
379
-
380
- `.gsd-t/contracts/unattended-supervisor-contract.md` v1.0.0 — authoritative state schema, exit-code table, status enum, launch/resume handshakes.
381
-
382
- ### Troubleshooting
383
-
384
- **Supervisor won't start**
385
- - Check `.gsd-t/.unattended/run.log` for error output
386
- - Run `gsd-t unattended --dry-run` to run pre-flight checks without spawning
387
- - Verify no protected branch: `git branch --show-current`
388
-
389
- **"Already running" error**
390
614
  ```bash
391
- # Verify supervisor is actually alive:
392
- kill -0 $(cat .gsd-t/.unattended/supervisor.pid) && echo "alive" || echo "stale PID"
615
+ docker start gsd-t-neo4j
616
+ # Or check status:
617
+ gsd-t doctor
618
+ ```
393
619
 
394
- # If stale, remove PID file:
395
- rm .gsd-t/.unattended/supervisor.pid
620
+ **Dashboard orphan processes**
396
621
 
397
- # Or request a graceful stop:
398
- /gsd-t-unattended-stop
399
- # (or) touch .gsd-t/.unattended/stop
622
+ ```bash
623
+ gsd-t doctor --prune
400
624
  ```
401
625
 
402
- **Watch loop stopped firing**
403
- - Re-invoke `/gsd-t-resume` from a fresh session
404
- - Step 0 auto-reattach reads `supervisor.pid` — if the supervisor is still alive, it re-enters the watch loop automatically (no manual steps needed)
626
+ **Journey coverage pre-commit hook blocks commits**
405
627
 
406
- **Supervisor crashed mid-run**
407
- - The watch loop detects crash via `kill -0` failure
408
- - Check `.gsd-t/.unattended/run.log` and final `state.json` for diagnostics
409
- - Resume normally with `/gsd-t-resume` — the milestone continues from its last checkpoint
410
-
411
- ---
628
+ ```bash
629
+ # Check which files are missing coverage
630
+ gsd-t check-coverage --report
631
+ # Or remove the hook from .git/hooks/pre-commit if not needed
632
+ ```
412
633
 
413
- ## Security Notes
634
+ **All commits blocked by pre-commit-capture-lint hook**
414
635
 
415
- - Zero npm dependencies no supply chain risk
416
- - All file writes check for symlinks first
417
- - Input validation on project names, versions, session IDs, paths
418
- - Heartbeat stdin capped at 1MB
419
- - HTTP requests use HTTPS with timeouts
420
- - Init operations use exclusive file creation (`{ flag: "wx" }`)
636
+ Remove the hook section from `.git/hooks/pre-commit` - the `gsd-t capture-lint` subcommand was retired in M61 and no longer exists. The hook unconditionally exits 1.