gsdd-cli 0.16.1 → 0.18.1

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 (50) hide show
  1. package/README.md +111 -61
  2. package/agents/README.md +1 -1
  3. package/bin/adapters/claude.mjs +8 -1
  4. package/bin/adapters/codex.mjs +5 -1
  5. package/bin/adapters/opencode.mjs +7 -1
  6. package/bin/gsdd.mjs +25 -20
  7. package/bin/lib/evidence-contract.mjs +112 -0
  8. package/bin/lib/health-truth.mjs +29 -31
  9. package/bin/lib/health.mjs +61 -106
  10. package/bin/lib/init-flow.mjs +91 -34
  11. package/bin/lib/init-runtime.mjs +46 -25
  12. package/bin/lib/init.mjs +3 -7
  13. package/bin/lib/lifecycle-preflight.mjs +333 -0
  14. package/bin/lib/lifecycle-state.mjs +476 -0
  15. package/bin/lib/manifest.mjs +24 -20
  16. package/bin/lib/phase.mjs +81 -26
  17. package/bin/lib/provenance.mjs +295 -54
  18. package/bin/lib/rendering.mjs +70 -12
  19. package/bin/lib/runtime-freshness.mjs +264 -0
  20. package/bin/lib/session-fingerprint.mjs +106 -0
  21. package/distilled/DESIGN.md +707 -13
  22. package/distilled/EVIDENCE-INDEX.md +166 -1
  23. package/distilled/README.md +44 -28
  24. package/distilled/SKILL.md +4 -4
  25. package/distilled/templates/agents.block.md +1 -1
  26. package/distilled/workflows/audit-milestone.md +50 -0
  27. package/distilled/workflows/complete-milestone.md +38 -2
  28. package/distilled/workflows/execute.md +16 -3
  29. package/distilled/workflows/map-codebase.md +15 -4
  30. package/distilled/workflows/new-milestone.md +53 -24
  31. package/distilled/workflows/new-project.md +44 -25
  32. package/distilled/workflows/pause.md +1 -1
  33. package/distilled/workflows/plan.md +187 -74
  34. package/distilled/workflows/progress.md +135 -31
  35. package/distilled/workflows/quick.md +20 -12
  36. package/distilled/workflows/resume.md +152 -65
  37. package/distilled/workflows/verify.md +55 -20
  38. package/docs/BROWNFIELD-PROOF.md +95 -0
  39. package/docs/RUNTIME-SUPPORT.md +77 -0
  40. package/docs/USER-GUIDE.md +443 -0
  41. package/docs/VERIFICATION-DISCIPLINE.md +59 -0
  42. package/docs/claude/context-monitor.md +98 -0
  43. package/docs/proof/consumer-node-cli/README.md +37 -0
  44. package/docs/proof/consumer-node-cli/ROADMAP.md +14 -0
  45. package/docs/proof/consumer-node-cli/SPEC.md +17 -0
  46. package/docs/proof/consumer-node-cli/brief.md +9 -0
  47. package/docs/proof/consumer-node-cli/phases/01-foundation/01-01-PLAN.md +34 -0
  48. package/docs/proof/consumer-node-cli/phases/01-foundation/01-01-SUMMARY.md +10 -0
  49. package/docs/proof/consumer-node-cli/phases/01-foundation/01-VERIFICATION.md +30 -0
  50. package/package.json +26 -20
@@ -0,0 +1,443 @@
1
+ # Workspine User Guide
2
+
3
+ A detailed reference for Workspine workflows, troubleshooting, and configuration. Workspine is the public product name; the package, CLI, workflow names, and workspace remain `gsdd-cli`, `gsdd`, `gsdd-*`, and `.planning/` as retained technical contracts. Runtime floor: Node 20+. For quick-start setup and the public proof pack, start with the [README](../README.md).
4
+
5
+ ---
6
+
7
+ ## Table of Contents
8
+
9
+ - [Workflow Diagrams](#workflow-diagrams)
10
+ - [Command Reference](#command-reference)
11
+ - [Configuration Reference](#configuration-reference)
12
+ - [Usage Examples](#usage-examples)
13
+ - [Troubleshooting](#troubleshooting)
14
+ - [Recovery Quick Reference](#recovery-quick-reference)
15
+
16
+ ---
17
+
18
+ ## Workflow Diagrams
19
+
20
+ ### Full Project Lifecycle
21
+
22
+ ```
23
+ ┌──────────────────────────────────────────────────┐
24
+ │ NEW PROJECT │
25
+ │ gsdd-new-project │
26
+ │ Questions -> Research -> Spec -> Roadmap │
27
+ └─────────────────────────┬────────────────────────┘
28
+
29
+ ┌──────────────▼─────────────┐
30
+ │ FOR EACH PHASE: │
31
+ │ │
32
+ │ ┌────────────────────┐ │
33
+ │ │ gsdd-plan │ │ <- Research + Plan + Check
34
+ │ └──────────┬─────────┘ │
35
+ │ │ │
36
+ │ ┌──────────▼─────────┐ │
37
+ │ │ gsdd-execute │ │ <- Wave-based execution
38
+ │ └──────────┬─────────┘ │
39
+ │ │ │
40
+ │ ┌──────────▼─────────┐ │
41
+ │ │ gsdd-verify │ │ <- 3-level gate
42
+ │ └──────────┬─────────┘ │
43
+ │ │ │
44
+ │ Next Phase?────────────┘
45
+ │ │ No
46
+ └─────────────┼──────────────┘
47
+
48
+ ┌──────────────▼──────────────┐
49
+ │ gsdd-audit-milestone │
50
+ └─────────────────────────────┘
51
+ ```
52
+
53
+ Optional closure and milestone-continuation workflows in the shipped surface:
54
+
55
+ - `gsdd-verify-work` adds conversational UAT when user-facing behavior needs explicit validation.
56
+ - `gsdd-plan-milestone-gaps` turns audit findings into gap-closure phases when a milestone is not ready to ship.
57
+ - `gsdd-complete-milestone` archives a shipped milestone, evolves `SPEC.md`, and collapses `ROADMAP.md`.
58
+ - `gsdd-new-milestone` starts the next milestone after closure.
59
+
60
+ ### Planning Agent Coordination
61
+
62
+ ```
63
+ gsdd-plan (phase N)
64
+
65
+ ├── Phase Researcher (x4 parallel)
66
+ │ ├── Stack researcher
67
+ │ ├── Features researcher
68
+ │ ├── Architecture researcher
69
+ │ └── Pitfalls researcher
70
+ │ │
71
+ │ ┌─────▼───────┐
72
+ │ │ RESEARCH.md │
73
+ │ └─────┬───────┘
74
+ │ │
75
+ │ ┌─────▼──────┐
76
+ │ │ Planner │ <- Reads SPEC.md, ROADMAP.md, RESEARCH.md
77
+ │ └─────┬──────┘
78
+ │ │
79
+ │ ┌─────▼──────────────┐ ┌────────┐
80
+ │ │ Plan Checker │────>│ PASS? │
81
+ │ │ (fresh context, │ └───┬────┘
82
+ │ │ 7 dimensions, │ │
83
+ │ │ typed JSON) │ Yes │ No
84
+ │ └────────────────────┘ │ │ │
85
+ │ │ └───┘ (max 3 cycles)
86
+ │ │
87
+ │ ┌─────▼──────┐
88
+ │ │ PLAN files │
89
+ │ └────────────┘
90
+ └── Done
91
+ ```
92
+
93
+ The plan checker runs in a **separate context window** from the planner. This prevents the checker from inheriting the planner's blind spots — the same reasoning error that produced the plan cannot suppress the review of that plan. This is the [ICLR-validated](https://arxiv.org/abs/2310.01798) pattern for LLM self-refinement.
94
+
95
+ The 7 check dimensions: requirement coverage, task completeness, dependency correctness, key-link completeness, scope sanity, must-have quality, context compliance.
96
+
97
+ ### Execution Wave Coordination
98
+
99
+ ```
100
+ gsdd-execute (phase N)
101
+
102
+ ├── Analyze plan dependencies
103
+
104
+ ├── Wave 1 (independent plans):
105
+ │ ├── Executor A (fresh 200K context) -> commit
106
+ │ └── Executor B (fresh 200K context) -> commit
107
+
108
+ ├── Wave 2 (depends on Wave 1):
109
+ │ └── Executor C (fresh 200K context) -> commit
110
+
111
+ └── Phase summary written to disk
112
+ ```
113
+
114
+ ### Brownfield Workflow (Existing Codebase)
115
+
116
+ ```
117
+ Brownfield repo
118
+
119
+ ├── bounded change already concrete
120
+ │ │
121
+ │ ▼
122
+ │ gsdd-quick
123
+ │ bounded feature work
124
+ │ with inline baseline
125
+
126
+ ├── repo unfamiliar / risky / deeper orientation needed
127
+ │ │
128
+ │ ▼
129
+ │ gsdd-map-codebase
130
+ │ │
131
+ │ └── continue with gsdd-quick or gsdd-new-project
132
+
133
+ └── fuzzy scope / full lifecycle setup
134
+
135
+
136
+ gsdd-new-project
137
+ canonical initializer
138
+ ```
139
+
140
+ ### Verification Gate
141
+
142
+ ```
143
+ gsdd-verify (phase N)
144
+
145
+ ├── Level 1: EXISTS
146
+ │ └── Do the expected files exist?
147
+
148
+ ├── Level 2: SUBSTANTIVE
149
+ │ └── Is the code real, not stubs?
150
+
151
+ ├── Level 3: WIRED
152
+ │ └── Is it connected and functional?
153
+
154
+ └── Anti-pattern scan
155
+ └── TODO/FIXME/HACK markers, empty catches
156
+ ```
157
+
158
+ ---
159
+
160
+ ## Command Reference
161
+
162
+ ### Workflows (run via generated skills or adapters)
163
+
164
+ | Workflow | Purpose | When to Use |
165
+ |----------|---------|-------------|
166
+ | `gsdd-new-project` | Full project init: questioning, brownfield audit when needed, research, spec, roadmap | Greenfield, fuzzy brownfield scope, or full lifecycle setup |
167
+ | `gsdd-map-codebase` | Map existing codebase for reusable brownfield context | When the repo is unfamiliar, risky, or you want a deeper baseline before choosing `quick` vs `new-project` |
168
+ | `gsdd-plan` | Research + plan + adversarial check for current phase; writes planning artifacts only | Before executing a phase |
169
+ | `gsdd-execute` | Execute phase plans in parallel waves | After planning is complete |
170
+ | `gsdd-verify` | 3-level verification gate + anti-pattern scan | After execution completes |
171
+ | `gsdd-verify-work` | Conversational UAT validation with structured gap tracking | When user-facing behavior needs explicit validation beyond repo artifacts |
172
+ | `gsdd-audit-milestone` | Cross-phase integration, requirements coverage, E2E flows | When all phases are done |
173
+ | `gsdd-complete-milestone` | Archive a shipped milestone, evolve `SPEC.md`, collapse `ROADMAP.md` | When the audited milestone is ready to ship |
174
+ | `gsdd-new-milestone` | Start the next milestone with goals, requirements, and roadmap phases | After closing a milestone and starting the next one |
175
+ | `gsdd-plan-milestone-gaps` | Turn milestone audit findings into gap-closure phases | When audit findings need planned follow-up before shipment |
176
+ | `gsdd-quick` | Plan and execute sub-hour work outside the phase cycle | Bug fixes, small features, config changes when the bounded change is already concrete |
177
+ | `gsdd-pause` | Save session context to checkpoint | Stopping mid-phase |
178
+ | `gsdd-resume` | Restore context from checkpoint and route to next action | Starting a new session |
179
+ | `gsdd-progress` | Show project status and route to next action | "Where am I?" |
180
+
181
+ ### CLI Commands
182
+
183
+ | Command | Purpose |
184
+ |---------|---------|
185
+ | `gsdd init [--tools <platform>]` | Set up `.planning/`, generate adapters |
186
+ | `gsdd update [--tools <platform>]` | Regenerate adapters from latest sources |
187
+ | `gsdd update --templates` | Refresh role contracts and delegates (warns about user modifications) |
188
+ | `gsdd find-phase [N]` | Show phase info as JSON (for agent consumption) |
189
+ | `gsdd verify <N>` | Run artifact checks for phase N |
190
+ | `gsdd scaffold phase <N> [name]` | Create a new phase plan file |
191
+ | `gsdd models show` | Display effective model state across all runtimes |
192
+ | `gsdd models profile <tier>` | Set global model profile (`quality`/`balanced`/`budget`) |
193
+ | `gsdd models agent-profile --agent <id> --profile <tier>` | Per-agent semantic override |
194
+ | `gsdd models set --runtime <rt> --agent <id> --model <id>` | Exact runtime model override |
195
+ | `gsdd models clear --runtime <rt> --agent <id>` | Remove runtime override |
196
+ | `gsdd help` | Show all commands |
197
+
198
+ Workflow-embedded helper commands use `node .planning/bin/gsdd.mjs ...`, so lifecycle preflight, file-op, and phase-status mechanics do not depend on a global `gsdd` binary after init.
199
+
200
+ ### Platform flags for `--tools`
201
+
202
+ | Flag | What's generated |
203
+ |------|-----------------|
204
+ | `claude` | `.claude/skills/`, `.claude/commands/`, `.claude/agents/` |
205
+ | `opencode` | `.opencode/commands/`, `.opencode/agents/` |
206
+ | `codex` | `.codex/agents/gsdd-plan-checker.toml` (portable skill is always generated; `$gsdd-plan` stays plan-only until explicit `$gsdd-execute`) |
207
+ | `agents` | Bounded fallback block in root `AGENTS.md` |
208
+ | `all` | All of the above |
209
+ | *(none)* | Auto-detect installed tools |
210
+
211
+ ---
212
+
213
+ ## Configuration Reference
214
+
215
+ `gsdd init` creates `.planning/config.json` interactively (or with defaults via `--auto`).
216
+
217
+ ### Full config.json Schema
218
+
219
+ ```json
220
+ {
221
+ "researchDepth": "balanced",
222
+ "parallelization": true,
223
+ "commitDocs": true,
224
+ "modelProfile": "balanced",
225
+ "workflow": {
226
+ "research": true,
227
+ "planCheck": true,
228
+ "verifier": true
229
+ },
230
+ "gitProtocol": {
231
+ "branch": "Follow existing repo conventions",
232
+ "commit": "Logical grouping, no phase/task IDs",
233
+ "pr": "Follow existing review workflow"
234
+ }
235
+ }
236
+ ```
237
+
238
+ ### Core Settings
239
+
240
+ | Setting | Options | Default | What it Controls |
241
+ |---------|---------|---------|------------------|
242
+ | `researchDepth` | `fast`, `balanced`, `deep` | `balanced` | Research thoroughness per phase |
243
+ | `parallelization` | `true`, `false` | `true` | Run independent agents simultaneously |
244
+ | `commitDocs` | `true`, `false` | `true` | Track `.planning/` in git |
245
+ | `modelProfile` | `balanced`, `quality`, `budget` | `balanced` | Portable semantic model tier |
246
+
247
+ ### Workflow Toggles
248
+
249
+ Each adds quality but costs tokens and time:
250
+
251
+ | Setting | Default | What it Controls |
252
+ |---------|---------|------------------|
253
+ | `workflow.research` | `true` | Research domain before planning each phase |
254
+ | `workflow.planCheck` | `true` | Fresh-context adversarial plan checking (max-3 cycle loop) |
255
+ | `workflow.verifier` | `true` | 3-level verification gate after execution |
256
+
257
+ Disable these to speed up phases in familiar domains or when conserving tokens. Disabling `planCheck` engages reduced-assurance mode — the planner self-checks but without the independent reviewer.
258
+
259
+ ### Model Control
260
+
261
+ Optional keys for fine-grained model selection:
262
+
263
+ | Setting | What it Controls |
264
+ |---------|------------------|
265
+ | `agentModelProfiles.<agent>` | Per-agent semantic override (currently: `plan-checker`) |
266
+ | `runtimeModelOverrides.<runtime>.<agent>` | Exact runtime-native model override |
267
+
268
+ Supported runtimes: `claude`, `opencode`, `codex`.
269
+
270
+ Runtime behavior:
271
+ - **Claude** translates semantic tiers to native aliases (`opus`/`sonnet`/`haiku`) for the checker agent
272
+ - **OpenCode** inherits its runtime model by default; Workspine only injects a model when you set an explicit runtime override
273
+ - **Codex** inherits its session model by default; Workspine only injects a model in the TOML when you set an explicit runtime override
274
+
275
+ ### Git Protocol
276
+
277
+ Advisory defaults — repository and team conventions take precedence:
278
+
279
+ | Setting | Default |
280
+ |---------|---------|
281
+ | `gitProtocol.branch` | Follow existing repo conventions |
282
+ | `gitProtocol.commit` | Logical grouping, no framework-imposed format |
283
+ | `gitProtocol.pr` | Follow existing review workflow |
284
+
285
+ Workspine does not impose commit formats, branch naming, or one-commit-per-task rules.
286
+
287
+ ---
288
+
289
+ ## Usage Examples
290
+
291
+ ### New Project (Full Cycle)
292
+
293
+ `npx gsdd-cli init`
294
+
295
+ Cursor, Copilot, and Gemini use the same core workflow through installed `.agents/skills/` surfaces. The difference is runtime proof and ergonomics, not workflow shape.
296
+
297
+ - `Claude/OpenCode`: `/gsdd-new-project -> /gsdd-plan -> /gsdd-execute -> /gsdd-verify -> /gsdd-audit-milestone`
298
+ - `Codex`: `$gsdd-new-project -> $gsdd-plan -> $gsdd-execute -> $gsdd-verify -> $gsdd-audit-milestone` (`$gsdd-plan` ends at plan creation; `$gsdd-execute` is a separate explicit unlock)
299
+ - `Cursor / Copilot / Gemini`: `/gsdd-new-project -> /gsdd-plan -> /gsdd-execute -> /gsdd-verify -> /gsdd-audit-milestone` from the slash command menu once the skill is installed
300
+
301
+ ### Milestone Continuation
302
+
303
+ - `Claude/OpenCode`: `/gsdd-plan-milestone-gaps` when audit findings need closure work, or `/gsdd-complete-milestone -> /gsdd-new-milestone` when the milestone is ready to ship
304
+ - `Codex`: `$gsdd-plan-milestone-gaps` when audit findings need closure work, or `$gsdd-complete-milestone -> $gsdd-new-milestone` when the milestone is ready to ship
305
+ - `Cursor / Copilot / Gemini`: use the matching slash commands once the skills are installed, with the same routing as above
306
+
307
+ ### Existing Codebase
308
+
309
+ `npx gsdd-cli init`
310
+
311
+ - `Claude/OpenCode`: `/gsdd-quick` for a concrete bounded change, `/gsdd-new-project` for fuzzy or milestone-shaped work, or `/gsdd-map-codebase` first when the repo needs a deeper brownfield baseline
312
+ - `Codex`: `$gsdd-quick` for a concrete bounded change, `$gsdd-new-project` for fuzzy or milestone-shaped work, or `$gsdd-map-codebase` first when the repo needs a deeper brownfield baseline
313
+ - `Cursor / Copilot / Gemini`: `/gsdd-quick`, `/gsdd-new-project`, or `/gsdd-map-codebase` from the slash command menu once the skills are installed, using the same routing rules above
314
+
315
+ ### Quick Bug Fix
316
+
317
+ - `Claude/OpenCode`: `/gsdd-quick`
318
+ - `Codex`: `$gsdd-quick`
319
+ - `Cursor / Copilot / Gemini`: `/gsdd-quick` from the slash command menu once the skill is installed
320
+
321
+ ### Resuming After a Break
322
+
323
+ - `Claude/OpenCode`: `/gsdd-progress` or `/gsdd-resume`
324
+ - `Codex`: `$gsdd-progress` or `$gsdd-resume`
325
+ - `Cursor / Copilot / Gemini`: use the matching skill from the slash command menu once installed
326
+
327
+ ### Pausing Mid-Work
328
+
329
+ - `Claude/OpenCode`: `/gsdd-pause`
330
+ - `Codex`: `$gsdd-pause`
331
+ - `Cursor / Copilot / Gemini`: `/gsdd-pause` from the slash command menu once the skill is installed
332
+
333
+ ### Speed vs Quality Presets
334
+
335
+ | Scenario | Research Depth | Model Profile | Research | Plan Check | Verifier |
336
+ |----------|---------------|---------------|----------|------------|----------|
337
+ | Prototyping | `fast` | `budget` | off | off | off |
338
+ | Normal dev | `balanced` | `balanced` | on | on | on |
339
+ | Production | `deep` | `quality` | on | on | on |
340
+
341
+ ### Headless Init (CI / Automation)
342
+
343
+ ```bash
344
+ npx gsdd-cli init --auto --tools claude # Non-interactive, default config
345
+ npx gsdd-cli init --auto --tools claude --brief path/to/PRD.md # Seed from existing document
346
+ ```
347
+
348
+ ---
349
+
350
+ ## Troubleshooting
351
+
352
+ ### Context Degradation During Long Sessions
353
+
354
+ Clear your context window between major workflows. Workspine is designed around fresh contexts — every delegate gets a clean context window. If quality drops in the main session, clear and use `gsdd-resume` or `gsdd-progress` to restore state.
355
+
356
+ ### Plans Seem Wrong or Misaligned
357
+
358
+ Check that research ran before planning (`workflow.research: true`). Most plan quality issues come from the planner making assumptions that domain research would have prevented. If plan-checking is enabled, the checker should catch alignment issues — but it cannot fix missing domain context.
359
+
360
+ ### Execution Produces Stubs
361
+
362
+ Plans should have 2-5 tasks maximum. If tasks are too large, they exceed what a single context window can produce reliably. Re-plan with smaller scope.
363
+
364
+ ### Lost Track of Where You Are
365
+
366
+ Run `gsdd-progress`. It reads all artifacts and tells you where you are and what to do next.
367
+
368
+ ### Need to Change Something After Execution
369
+
370
+ Do not re-run `gsdd-execute`. Use `gsdd-quick` for targeted fixes, or `gsdd-verify` to systematically identify issues.
371
+
372
+ ### Template Refresh After Update
373
+
374
+ ```bash
375
+ npx gsdd-cli update --templates # Refreshes role contracts and delegates
376
+ ```
377
+
378
+ If you've modified any templates, the generation manifest detects this and warns you before overwriting. The SHA-256 hash of each generated file is tracked in `.planning/generation-manifest.json`.
379
+
380
+ ### Model Costs Too High
381
+
382
+ Switch to budget profile: `gsdd models profile budget`. Disable research and plan-check via config if the domain is familiar.
383
+
384
+ ---
385
+
386
+ ## Recovery Quick Reference
387
+
388
+ | Problem | Solution |
389
+ |---------|----------|
390
+ | Lost context / new session | `gsdd-resume` or `gsdd-progress` |
391
+ | Phase went wrong | `git revert` the phase commits, then re-plan |
392
+ | Quick targeted fix | `gsdd-quick` |
393
+ | Something broke | Use the debugger role for systematic debugging |
394
+ | Costs running high | `gsdd models profile budget`, disable workflow toggles |
395
+ | Templates out of date | `npx gsdd-cli update --templates` |
396
+ | Adapters out of date | `npx gsdd-cli update` |
397
+
398
+ ---
399
+
400
+ ## Project File Structure
401
+
402
+ ```
403
+ .planning/
404
+ SPEC.md # Living specification (goals, constraints, decisions)
405
+ ROADMAP.md # Phased delivery plan with inline status
406
+ config.json # Project configuration
407
+ bin/
408
+ gsdd.mjs # Local workflow-helper launcher for embedded CLI mechanics
409
+ generation-manifest.json # SHA-256 hashes for template versioning
410
+ .continue-here.md # Session checkpoint (created by pause, consumed by resume)
411
+ research/ # Domain research outputs
412
+ codebase/ # Codebase maps (4 files: STACK, ARCHITECTURE, CONVENTIONS, CONCERNS)
413
+ phases/
414
+ XX-phase-name/
415
+ PLAN.md # Atomic execution plans with XML task structure
416
+ SUMMARY.md # Execution outcomes
417
+ VERIFICATION.md # Post-execution verification results
418
+ quick/
419
+ NNN-slug/
420
+ PLAN.md # Quick task plan
421
+ SUMMARY.md # Quick task outcome
422
+ templates/
423
+ delegates/ # 11 delegate instruction files
424
+ LOG.md # Quick task log
425
+
426
+ agents/ # 10 canonical role contracts
427
+ .agents/skills/gsdd-*/ # Portable workflow entrypoints (open standard)
428
+ ```
429
+
430
+ Platform-specific adapters (generated by `gsdd init`):
431
+
432
+ ```
433
+ .claude/skills/ # Claude Code skill files
434
+ .claude/commands/ # Claude Code command aliases
435
+ .claude/agents/ # Claude Code native agents
436
+
437
+ .opencode/commands/ # OpenCode command files
438
+ .opencode/agents/ # OpenCode native agents
439
+
440
+ .codex/agents/ # Codex CLI agent TOML files
441
+
442
+ AGENTS.md # Governance fallback block (useful for agents that consume AGENTS.md)
443
+ ```
@@ -0,0 +1,59 @@
1
+ # Verification Discipline
2
+
3
+ Workspine is not just a set of prompts. Its core delivery claim depends on explicit checking and verification loops that survive across runtimes.
4
+
5
+ ## The delivery contract
6
+
7
+ The durable loop is:
8
+
9
+ `init -> plan -> execute -> verify`
10
+
11
+ Within that loop, the framework preserves two important review seams.
12
+
13
+ ### 1. Plan checking
14
+
15
+ `gsdd-plan` does not stop at "write a plan."
16
+
17
+ It includes a review loop where the plan is checked against concrete dimensions such as:
18
+
19
+ - requirement coverage
20
+ - task completeness
21
+ - dependency correctness
22
+ - scope sanity
23
+ - context compliance
24
+
25
+ On runtimes with stronger native support, that can be a fresh-context checker path. On weaker surfaces, the framework stays honest about reduced assurance instead of pretending the same check happened.
26
+
27
+ ### 2. Verification after execution
28
+
29
+ `gsdd-verify` uses a three-level gate:
30
+
31
+ - **Exists** — the expected artifacts are present
32
+ - **Substantive** — the output is real, not empty or stubbed
33
+ - **Wired** — the behavior is connected and actually works
34
+
35
+ This is paired with anti-pattern checks so "files exist" does not get mistaken for "the work is done."
36
+
37
+ ## Anti-false-closure in practice
38
+
39
+ The exported brownfield proof pack demonstrates the intended behavior:
40
+
41
+ - the first implementation missed a real requirement
42
+ - verification caught it
43
+ - the repo then recorded the fix and the successful re-verification
44
+
45
+ See `docs/BROWNFIELD-PROOF.md` for the reader-facing narrative and `docs/proof/consumer-node-cli/README.md` for the tracked artifact chain.
46
+
47
+ ## What this note does and does not claim
48
+
49
+ This note explains the release-floor discipline that Workspine can prove publicly today.
50
+
51
+ It does **not** claim:
52
+
53
+ - perfect parity of checker mechanics on every runtime
54
+ - autonomous orchestration platform behavior
55
+ - proof of every possible brownfield workflow shape
56
+
57
+ It claims something narrower and more defensible:
58
+
59
+ Workspine keeps a repo-native delivery contract with explicit review and verification seams, and that contract is already strong enough to catch and recover from real misses.
@@ -0,0 +1,98 @@
1
+ > **Claude Code only.** This feature uses Claude Code's `statusLine` and `PostToolUse` hook APIs. Other platforms do not support this hook mechanism.
2
+
3
+ # Context Window Monitor
4
+
5
+ A PostToolUse hook that warns the agent when context window usage is high.
6
+
7
+ ## Problem
8
+
9
+ The statusline shows context usage to the **user**, but the **agent** has no awareness of context limits. When context runs low, the agent continues working until it hits the wall — potentially mid-task with no state saved.
10
+
11
+ ## How It Works
12
+
13
+ 1. The statusline hook writes context metrics to `/tmp/claude-ctx-{session_id}.json`
14
+ 2. After each tool use, the context monitor reads these metrics
15
+ 3. When remaining context drops below thresholds, it injects a warning as `additionalContext`
16
+ 4. The agent receives the warning in its conversation and can act accordingly
17
+
18
+ ## Thresholds
19
+
20
+ | Level | Remaining | Agent Behavior |
21
+ |-------|-----------|----------------|
22
+ | Normal | > 35% | No warning |
23
+ | WARNING | <= 35% | Wrap up current task, avoid starting new complex work |
24
+ | CRITICAL | <= 25% | Stop immediately, save state (`gsdd-pause`) |
25
+
26
+ ## Debounce
27
+
28
+ To avoid spamming the agent with repeated warnings:
29
+ - First warning always fires immediately
30
+ - Subsequent warnings require 5 tool uses between them
31
+ - Severity escalation (WARNING -> CRITICAL) bypasses debounce
32
+
33
+ ## Architecture
34
+
35
+ ```
36
+ Statusline Hook (gsd-statusline.js)
37
+ | writes
38
+ v
39
+ /tmp/claude-ctx-{session_id}.json
40
+ ^ reads
41
+ |
42
+ Context Monitor (gsd-context-monitor.js, PostToolUse)
43
+ | injects
44
+ v
45
+ additionalContext -> Agent sees warning
46
+ ```
47
+
48
+ The bridge file is a simple JSON object:
49
+
50
+ ```json
51
+ {
52
+ "session_id": "abc123",
53
+ "remaining_percentage": 28.5,
54
+ "used_pct": 71,
55
+ "timestamp": 1708200000
56
+ }
57
+ ```
58
+
59
+ ## Integration with GSDD
60
+
61
+ GSDD's `gsdd-pause` workflow saves execution state to `.planning/.continue-here.md`. The WARNING message suggests using it. The CRITICAL message instructs immediate state save.
62
+
63
+ ## Setup
64
+
65
+ Register both hooks manually in your Claude Code settings:
66
+
67
+ - **Statusline** (writes bridge file): Registered as `statusLine` in settings.json
68
+ - **Context Monitor** (reads bridge file): Registered as `PostToolUse` hook in settings.json
69
+
70
+ Manual registration in `~/.claude/settings.json`:
71
+
72
+ ```json
73
+ {
74
+ "statusLine": {
75
+ "type": "command",
76
+ "command": "node ~/.claude/hooks/gsd-statusline.js"
77
+ },
78
+ "hooks": {
79
+ "PostToolUse": [
80
+ {
81
+ "hooks": [
82
+ {
83
+ "type": "command",
84
+ "command": "node ~/.claude/hooks/gsd-context-monitor.js"
85
+ }
86
+ ]
87
+ }
88
+ ]
89
+ }
90
+ }
91
+ ```
92
+
93
+ ## Safety
94
+
95
+ - The hook wraps everything in try/catch and exits silently on error
96
+ - It never blocks tool execution — a broken monitor should not break the agent's workflow
97
+ - Stale metrics (older than 60s) are ignored
98
+ - Missing bridge files are handled gracefully (subagents, fresh sessions)
@@ -0,0 +1,37 @@
1
+ # Consumer Node CLI Proof Pack
2
+
3
+ This tracked proof pack is the public export of the Phase 22 release-floor brownfield run. It preserves the smallest artifact chain a reader needs to inspect the real consumer story without opening local-only planning state.
4
+
5
+ ## What is in this pack
6
+
7
+ - `brief.md` — the original project brief
8
+ - `SPEC.md` — the consumer spec created from that brief
9
+ - `ROADMAP.md` — the single-phase roadmap used for the proof run
10
+ - `phases/01-foundation/01-01-PLAN.md` — the execution plan
11
+ - `phases/01-foundation/01-01-SUMMARY.md` — the execution summary
12
+ - `phases/01-foundation/01-VERIFICATION.md` — the verification record that captured the miss and the fix
13
+
14
+ ## Release-floor story
15
+
16
+ The proof pack shows one full release-floor loop:
17
+
18
+ 1. `gsdd init` created a real consumer workspace with portable skills and Codex checker support.
19
+ 2. The brief required both the default greeting and the `--name Ada` greeting path.
20
+ 3. The first implementation shipped `Hello, world!` for both commands, so verification failed for the named greeting.
21
+ 4. The implementation and tests were corrected, then verification passed with `Hello, Ada!`.
22
+
23
+ ## Key proof strings
24
+
25
+ - `node index.js` -> `Hello, world!`
26
+ - `node index.js --name Ada` -> `Hello, Ada!`
27
+ - `--name Ada` appears in both the brief and the phase artifacts
28
+
29
+ ## Provenance and scope
30
+
31
+ - Exported from the Phase 22 launch-proof consumer run.
32
+ - This is the tracked reader-facing release-floor proof surface.
33
+ - The local `.planning/live-proof/consumer-node-cli` tree remains evidence-only source material and is intentionally not the public entry surface.
34
+
35
+ ## Why this pack exists
36
+
37
+ Public proof should be inspectable from tracked docs. This pack keeps the concrete brownfield evidence in-repo while letting the local live-proof workspace stay an implementation input instead of the public citation target.
@@ -0,0 +1,14 @@
1
+ # Roadmap
2
+
3
+ - [x] **Phase 1: Foundation** - ship a runnable greeting CLI with one fast test command
4
+
5
+ ### Phase 1: Foundation
6
+ **Goal:** Create a runnable `hello-proof` CLI that supports the default greeting, a `--name` override, and one immediate automated test command.
7
+ **Success Criteria:**
8
+ - `node index.js` prints `Hello, world!`
9
+ - `node index.js --name Ada` prints `Hello, Ada!`
10
+ - `npm test` passes in a fresh clone
11
+
12
+ ### Current Phase
13
+
14
+ Phase 1 is the active launch-proof phase.
@@ -0,0 +1,17 @@
1
+ # Hello Proof Spec
2
+
3
+ ## Product
4
+
5
+ `hello-proof` is a tiny framework-free Node CLI used to prove Workspine's launch flow in a fresh consumer repo.
6
+
7
+ ## Must-Have Requirements
8
+
9
+ - `HP-01`: Running `node index.js` prints `Hello, world!`
10
+ - `HP-02`: Running `node index.js --name Ada` prints `Hello, Ada!`
11
+ - `HP-03`: A stranger can run one automated test command immediately after setup
12
+
13
+ ## Constraints
14
+
15
+ - Keep the project intentionally small
16
+ - Use plain Node.js without a framework
17
+ - Document the run and test commands in `README.md`
@@ -0,0 +1,9 @@
1
+ # Hello Proof
2
+
3
+ Build a tiny Node CLI called `hello-proof`.
4
+
5
+ Requirements:
6
+ - Running `node index.js` prints `Hello, world!`
7
+ - Running `node index.js --name Ada` prints `Hello, Ada!`
8
+ - Include one automated test command that a stranger can run immediately
9
+ - Keep the project intentionally small and framework-free