gsdd-cli 0.3.1 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +131 -67
- package/agents/DISTILLATION.md +15 -13
- package/agents/README.md +1 -1
- package/agents/planner.md +2 -0
- package/bin/adapters/agents.mjs +1 -0
- package/bin/adapters/claude.mjs +20 -4
- package/bin/adapters/codex.mjs +9 -1
- package/bin/adapters/opencode.mjs +20 -5
- package/bin/gsdd.mjs +24 -7
- package/bin/lib/cli-utils.mjs +1 -1
- package/bin/lib/evidence-contract.mjs +112 -0
- package/bin/lib/file-ops.mjs +161 -0
- package/bin/lib/health-truth.mjs +186 -0
- package/bin/lib/health.mjs +72 -67
- package/bin/lib/init-flow.mjs +50 -3
- package/bin/lib/init-prompts.mjs +22 -83
- package/bin/lib/init-runtime.mjs +47 -25
- package/bin/lib/init.mjs +3 -3
- package/bin/lib/lifecycle-preflight.mjs +333 -0
- package/bin/lib/lifecycle-state.mjs +293 -0
- package/bin/lib/models.mjs +19 -4
- package/bin/lib/phase.mjs +159 -18
- package/bin/lib/plan-constants.mjs +30 -0
- package/bin/lib/provenance.mjs +165 -0
- package/bin/lib/rendering.mjs +8 -0
- package/bin/lib/runtime-freshness.mjs +239 -0
- package/bin/lib/session-fingerprint.mjs +106 -0
- package/bin/lib/templates.mjs +17 -0
- package/distilled/DESIGN.md +733 -49
- package/distilled/EVIDENCE-INDEX.md +402 -0
- package/distilled/README.md +73 -33
- package/distilled/SKILL.md +89 -85
- package/distilled/templates/agents.block.md +13 -84
- package/distilled/templates/agents.md +0 -7
- package/distilled/templates/delegates/plan-checker.md +6 -3
- package/distilled/workflows/audit-milestone.md +56 -6
- package/distilled/workflows/complete-milestone.md +333 -0
- package/distilled/workflows/execute.md +201 -19
- package/distilled/workflows/map-codebase.md +17 -4
- package/distilled/workflows/new-milestone.md +262 -0
- package/distilled/workflows/new-project.md +7 -6
- package/distilled/workflows/pause.md +40 -6
- package/distilled/workflows/plan-milestone-gaps.md +183 -0
- package/distilled/workflows/plan.md +77 -11
- package/distilled/workflows/progress.md +107 -29
- package/distilled/workflows/quick.md +23 -12
- package/distilled/workflows/resume.md +135 -12
- package/distilled/workflows/verify-work.md +260 -0
- package/distilled/workflows/verify.md +159 -33
- package/docs/BROWNFIELD-PROOF.md +95 -0
- package/docs/RUNTIME-SUPPORT.md +77 -0
- package/docs/USER-GUIDE.md +439 -0
- package/docs/VERIFICATION-DISCIPLINE.md +59 -0
- package/docs/claude/context-monitor.md +98 -0
- package/docs/proof/consumer-node-cli/README.md +37 -0
- package/docs/proof/consumer-node-cli/ROADMAP.md +14 -0
- package/docs/proof/consumer-node-cli/SPEC.md +17 -0
- package/docs/proof/consumer-node-cli/brief.md +9 -0
- package/docs/proof/consumer-node-cli/phases/01-foundation/01-01-PLAN.md +34 -0
- package/docs/proof/consumer-node-cli/phases/01-foundation/01-01-SUMMARY.md +10 -0
- package/docs/proof/consumer-node-cli/phases/01-foundation/01-VERIFICATION.md +30 -0
- package/package.json +38 -29
package/distilled/DESIGN.md
CHANGED
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
> Rationale for every structural choice GSDD makes relative to GSD.
|
|
4
4
|
> Each decision cites GSD source files, GSDD implementation, and external research.
|
|
5
5
|
> Updated as decisions are revised or new ones land.
|
|
6
|
+
>
|
|
7
|
+
> **Evidence index:** `distilled/EVIDENCE-INDEX.md` — one-line-per-source mapping for all decisions.
|
|
8
|
+
> **Open gaps:** `.internal-research/gaps.md` — live blockers, contradictions, and deferred decisions.
|
|
6
9
|
|
|
7
10
|
---
|
|
8
11
|
|
|
@@ -45,6 +48,21 @@
|
|
|
45
48
|
35. [Skills-Native Runtimes vs Governance Adapters](#35-skills-native-runtimes-vs-governance-adapters)
|
|
46
49
|
36. [Interactive Init Wizard](#36-interactive-init-wizard)
|
|
47
50
|
37. [Mutability-Driven Workflow Classification](#37-mutability-driven-workflow-classification)
|
|
51
|
+
38. [Retroactive Artifact Enforcement](#38-retroactive-artifact-enforcement)
|
|
52
|
+
39. [Brownfield Entry Wiring](#39-brownfield-entry-wiring)
|
|
53
|
+
40. [Three-Layer Continuity Boundary](#d40---three-layer-continuity-boundary)
|
|
54
|
+
41. [Compressed Judgment Persistence Surface](#d41---compressed-judgment-persistence-surface)
|
|
55
|
+
42. [Session-Boundary Safety](#d42---session-boundary-safety)
|
|
56
|
+
43. [Resume Provenance Truth Split](#d43---resume-provenance-truth-split)
|
|
57
|
+
44. [Warning-First Transition Safety And Fail-Closed Terminal Writes](#d44---warning-first-transition-safety-and-fail-closed-terminal-writes)
|
|
58
|
+
45. [Fork-Honest Launch Posture Before Identity Migration](#d45---fork-honest-launch-posture-before-identity-migration)
|
|
59
|
+
46. [Archived Milestone Routing With Retained ROADMAP](#d46---archived-milestone-routing-with-retained-roadmap)
|
|
60
|
+
47. [Brownfield Quick-Win Repair](#d47---brownfield-quick-win-repair)
|
|
61
|
+
48. [Shared Lifecycle Evaluator And Dual-Canonical Runtime Boundary](#d48---shared-lifecycle-evaluator-and-dual-canonical-runtime-boundary)
|
|
62
|
+
49. [Deterministic Lifecycle Preflight Gates](#d49---deterministic-lifecycle-preflight-gates)
|
|
63
|
+
50. [Evidence-Gated Closure Matrix](#d50---evidence-gated-closure-matrix)
|
|
64
|
+
51. [Deterministic Runtime Surface Freshness](#d51---deterministic-runtime-surface-freshness)
|
|
65
|
+
52. [Generic Checkpoint Routing Ownership](#d52---generic-checkpoint-routing-ownership)
|
|
48
66
|
|
|
49
67
|
---
|
|
50
68
|
|
|
@@ -68,8 +86,8 @@
|
|
|
68
86
|
|
|
69
87
|
- GSD source: `agents/_archive/gsd-codebase-mapper.md` lines 72-79 (original 7-file model)
|
|
70
88
|
- GSDD implementation: `agents/mapper.md` input/output contracts (4 files only)
|
|
71
|
-
- External: LeanSpec "Context Economy" principle; Aider tree-sitter dynamic repomaps (2026 SOTA)
|
|
72
89
|
- `.planning/SPEC.md` "Lean Context Decision" section
|
|
90
|
+
- External: Liu et al. "Lost in the Middle: How Language Models Use Long Contexts" (NeurIPS 2023) — position in context significantly affects recall; middle content is underweighted, supporting minimal stable file sets; Levy et al. "Same Task, More Tokens: Impact of Input Length on the Reasoning Performance of LLMs" (EMNLP 2024) — longer inputs degrade reasoning performance; Aider tree-sitter dynamic repo maps (aider.chat) — on-demand structural mapping as an alternative to static context files
|
|
73
91
|
|
|
74
92
|
---
|
|
75
93
|
|
|
@@ -159,6 +177,7 @@ This hardening pass also clarified a reusable architectural rule: strict portabl
|
|
|
159
177
|
- GSD originals preserved in `agents/_archive/` (11 files, git history intact via `git mv`)
|
|
160
178
|
- GSDD canonicals in `agents/` (9 files + README.md)
|
|
161
179
|
- `agents/README.md` lifecycle table maps each canonical role to its GSD sources
|
|
180
|
+
- External: CrewAI role-based team patterns, Microsoft AutoGen hierarchical agents, LangGraph multi-agent subgraphs — all validate role specialization over monolithic agents; specific count of 10 is engineering judgment shaped by GSD source lineage, not an externally prescribed number
|
|
162
181
|
|
|
163
182
|
---
|
|
164
183
|
|
|
@@ -205,6 +224,7 @@ This hardening pass also clarified a reusable architectural rule: strict portabl
|
|
|
205
224
|
- `bin/gsdd.mjs` lines 84-102 (role copy step with existsSync guard)
|
|
206
225
|
- `tests/gsdd.init.test.cjs` (validates role file existence and delegate-role references)
|
|
207
226
|
- All 10 delegate files (each starts with a role contract reference on line 1)
|
|
227
|
+
- External: Principal-agent theory (Jensen & Meckling, Journal of Financial Economics 1976) — the foundational model of delegation contracts where principals define behavioral constraints and agents execute within them; GoF Strategy Pattern (Gamma et al. "Design Patterns" 1994) — separating algorithm definition (role) from its usage context (delegate); LangGraph multi-agent subgraphs and Microsoft AutoGen hierarchical agent patterns validate role/orchestration separation in production AI systems
|
|
208
228
|
|
|
209
229
|
---
|
|
210
230
|
|
|
@@ -245,6 +265,7 @@ This hardening pass also clarified a reusable architectural rule: strict portabl
|
|
|
245
265
|
- PR 2 intermediate state (one-hop via SKILL.md cross-reference)
|
|
246
266
|
- PR 4 final state (zero-hop, role contains all rules)
|
|
247
267
|
- `package.json` `files` array includes `agents/` (npm distribution fix)
|
|
268
|
+
- External: OWASP Top 10 for LLM Applications v2.0 (2025) — LLM01 (Prompt Injection) and LLM07 (System Prompt Leakage) directly support embedding security rules at the role contract level; Greshake et al. "Not What You've Signed Up For: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injection" (IEEE S&P 2023) — validates defense-in-depth at the agent-contract layer; Saltzer & Schroeder "The Protection of Information in Computer Systems" (1975) — complete mediation principle: every access must be checked against the access control policy
|
|
248
269
|
|
|
249
270
|
---
|
|
250
271
|
|
|
@@ -268,6 +289,7 @@ This hardening pass also clarified a reusable architectural rule: strict portabl
|
|
|
268
289
|
- GSDD: `distilled/templates/delegates/researcher-synthesizer.md` (active delegate, references `synthesizer.md`)
|
|
269
290
|
- `agents/synthesizer.md` canonical contract (cross-reference algorithm)
|
|
270
291
|
- Config contract: `.planning/config.json` `researchDepth` field
|
|
292
|
+
- External: LangGraph conditional edges — adaptive agent invocation based on workflow state is a core LangGraph pattern; Asai et al. "Self-RAG: Learning to Retrieve, Generate, and Critique through Self-Reflection" (ICLR 2024) — validates conditional retrieval/synthesis based on whether additional context is needed; Anthropic "Building effective agents" (Dec 2024) — routing workflows match task complexity to agent selection
|
|
271
293
|
|
|
272
294
|
---
|
|
273
295
|
|
|
@@ -279,7 +301,7 @@ This hardening pass also clarified a reusable architectural rule: strict portabl
|
|
|
279
301
|
|
|
280
302
|
1. **On first brownfield init:** `new-project.md` detects source files, offers codebase mapping. If accepted, invokes `map-codebase` via the portable skill surface (`.agents/skills/gsdd-map-codebase/SKILL.md`).
|
|
281
303
|
|
|
282
|
-
2. **On subsequent runs:** If `.planning/codebase/` already exists, mappers are skipped during init. User runs `/gsdd
|
|
304
|
+
2. **On subsequent runs:** If `.planning/codebase/` already exists, mappers are skipped during init. User runs `/gsdd-map-codebase` directly to trigger the Refresh/Update/Skip flow.
|
|
283
305
|
|
|
284
306
|
**Why standalone:** Codebase maps become stale after major refactors. Users need to refresh maps independently of project initialization. Embedding mapping inside init would force a full re-init to refresh maps.
|
|
285
307
|
|
|
@@ -297,6 +319,7 @@ This hardening pass also clarified a reusable architectural rule: strict portabl
|
|
|
297
319
|
- GSD source: `get-shit-done/workflows/new-project.md` lines 61-80 (brownfield offer delegates to map-codebase)
|
|
298
320
|
- GSDD: `distilled/workflows/map-codebase.md` (standalone, re-runnable)
|
|
299
321
|
- GSDD: `distilled/workflows/new-project.md` (auto-invoke for brownfield via skill reference)
|
|
322
|
+
- External: Aider (aider.chat) uses dynamic tree-sitter-based repo maps generated on-demand rather than persistent cached indices — validates the freshness-over-cache approach; Cursor uses continuous background indexing (cached approach) showing both on-demand and cached are production-valid; on-demand is one defensible point on the freshness-vs-staleness-cost spectrum
|
|
300
323
|
|
|
301
324
|
---
|
|
302
325
|
|
|
@@ -326,6 +349,7 @@ This hardening pass also clarified a reusable architectural rule: strict portabl
|
|
|
326
349
|
- GSD source: `get-shit-done/workflows/new-milestone.md` lines 101-173 (milestone-aware researchers), line 269 (phase numbering continuation)
|
|
327
350
|
- GSDD: `distilled/README.md` lifecycle diagram
|
|
328
351
|
- `.planning/SPEC.md` "Long-Term Lifecycle" section
|
|
352
|
+
- External: Hierarchical Task Network (HTN) planning (Erol, Hendler & Nau 1994; Nau et al. JAIR 2003) — foundational AI planning literature establishing milestone→phase→task decomposition as the standard approach for complex goal hierarchies; PMI PMBOK Work Breakdown Structure (WBS) standard — industry-standard phase/task hierarchy for project planning; Khot et al. "Decomposed Prompting: A Modular Approach for Solving Complex Tasks" (ICLR 2023) — task decomposition improves LLM performance on multi-step work by reducing scope per subproblem
|
|
329
353
|
|
|
330
354
|
---
|
|
331
355
|
|
|
@@ -355,6 +379,7 @@ This hardening pass also clarified a reusable architectural rule: strict portabl
|
|
|
355
379
|
- GSD source: `agents/_archive/gsd-executor.md` (mandatory commit in algorithm, TDD flow)
|
|
356
380
|
- GSDD: `agents/executor.md` lines 57-64 (Git Guidance -- repo-native, advisory)
|
|
357
381
|
- PR 5 (merged as PR #7): removed rigid git naming from workflows, adapters, generated governance
|
|
382
|
+
- External: Industry consensus — Aider, GitHub Copilot, Cursor, Codex CLI, and OpenCode all treat git operations as user-controlled or advisory, not as enforced framework requirements; no major AI coding tool mandates a specific commit-per-task or branch-naming convention
|
|
358
383
|
|
|
359
384
|
---
|
|
360
385
|
|
|
@@ -470,6 +495,7 @@ Codex is skills-first because the Codex CLI already supports repository skills d
|
|
|
470
495
|
- D7 (milestone hierarchy): STATE.md replaced by ROADMAP.md inline status
|
|
471
496
|
- D8 (advisory git): repo conventions over framework defaults
|
|
472
497
|
- D10 (context isolation): summaries up, documents to disk
|
|
498
|
+
- External: Crystal Clear (Cockburn 2004) — ceremony scales with team size and criticality; lightweight methods are prescribed for small, co-located, low-criticality work; Kanban class-of-service (Anderson 2010) — routing tasks by size/urgency to appropriate workflow lanes; Anthropic "Building effective agents" (Dec 2024) — match workflow complexity to actual task complexity rather than applying uniform ceremony
|
|
473
499
|
|
|
474
500
|
---
|
|
475
501
|
|
|
@@ -790,13 +816,16 @@ dispatch in a single file.
|
|
|
790
816
|
|
|
791
817
|
Implementation lives under `bin/lib/`:
|
|
792
818
|
- `cli-utils.mjs` owns flag parsing and JSON output helpers
|
|
819
|
+
- `file-ops.mjs` owns workspace-confined deterministic file copy, delete, and regex-sub mechanics
|
|
793
820
|
- `models.mjs` owns config/model schema and `cmdModels`
|
|
794
|
-
- `phase.mjs` owns phase discovery, verify, and
|
|
821
|
+
- `phase.mjs` owns phase discovery, verify, scaffold, and the status-aware ROADMAP phase helper
|
|
795
822
|
- `templates.mjs` owns template/role install and refresh flows
|
|
796
823
|
- `init.mjs` owns `createCmdInit(ctx)`, `createCmdUpdate(ctx)`, help text, and bootstrap/update helper logic
|
|
797
824
|
|
|
798
825
|
**Boundary rules:**
|
|
799
826
|
- keep `bin/gsdd.mjs` as composition root, not a second implementation module
|
|
827
|
+
- route deterministic copy/delete/text-mutation mechanics through CLI helpers instead of leaving manual file edits in workflow prose
|
|
828
|
+
- keep ROADMAP phase checkbox transitions in a status-aware helper; broader roadmap rewrites stay outside this helper boundary
|
|
800
829
|
- keep config-schema ownership in `models.mjs`; do not duplicate or relocate `buildDefaultConfig` into `init.mjs`
|
|
801
830
|
just to satisfy an old task list
|
|
802
831
|
- let `init` use the same template-sync module that `update --templates` uses, instead of maintaining separate
|
|
@@ -812,9 +841,10 @@ Implementation lives under `bin/lib/`:
|
|
|
812
841
|
|
|
813
842
|
**Evidence:**
|
|
814
843
|
- GSD source: `get-shit-done/install.js` (monolithic install/conversion surface)
|
|
815
|
-
- GSDD implementation: `bin/gsdd.mjs`, `bin/lib/init.mjs`, `bin/lib/templates.mjs`, `bin/lib/models.mjs`
|
|
844
|
+
- GSDD implementation: `bin/gsdd.mjs`, `bin/lib/init.mjs`, `bin/lib/templates.mjs`, `bin/lib/models.mjs`, `bin/lib/file-ops.mjs`, `bin/lib/phase.mjs`
|
|
816
845
|
- GSDD tests: `tests/gsdd.init.test.cjs`, `tests/gsdd.models.test.cjs`, `tests/gsdd.manifest.test.cjs`,
|
|
817
|
-
`tests/gsdd.guards.test.cjs`
|
|
846
|
+
`tests/gsdd.guards.test.cjs`, `tests/phase.test.cjs`, `tests/gsdd.invariants.test.cjs`, `tests/gsdd.scenarios.test.cjs`
|
|
847
|
+
- External: Seemann "Dependency Injection in .NET" (Manning 2011) — coined "Composition Root" as the named pattern for the single location where the entire application is assembled; Martin "Clean Architecture" (2017) — the main component as the outermost, dirtiest layer that owns all wiring; standard practice in oclif, Commander.js, yargs, and Cobra CLI frameworks
|
|
818
848
|
|
|
819
849
|
---
|
|
820
850
|
|
|
@@ -824,7 +854,7 @@ Implementation lives under `bin/lib/`:
|
|
|
824
854
|
|
|
825
855
|
**GSDD (before this decision):** Codex CLI was a skills-first runtime at ~40% parity. It consumed the portable `.agents/skills/gsdd-*/SKILL.md` surface but had no native plan-checker, no orchestration loop, no model control, and no dedicated adapter module. `--tools codex` was deprecated and silently stripped. Every Codex plan ran in silent `reduced_assurance` mode.
|
|
826
856
|
|
|
827
|
-
**GSDD (after this decision):** Codex CLI is promoted to `native_capable` — same tier as Claude Code and OpenCode. A dedicated `bin/adapters/codex.mjs` generates `.codex/agents/gsdd-plan-checker.toml` (read-only TOML agent with the plan-checker delegate). Codex's entry surface is the portable skill at `.agents/skills/gsdd-plan/SKILL.md` — Codex auto-discovers it via its `.agents/skills/` skill scanning ([developers.openai.com/codex/skills](https://developers.openai.com/codex/skills)). The portable skill now contains vendor-neutral checker invocation instructions (JSON schema, max-3 cycle loop, escalation), so when Codex follows it, it spawns the native `gsdd-plan-checker` agent for fresh-context review. `--tools codex` is reinstated as an active adapter flag.
|
|
857
|
+
**GSDD (after this decision):** Codex CLI is promoted to `native_capable` — same tier as Claude Code and OpenCode. A dedicated `bin/adapters/codex.mjs` generates `.codex/agents/gsdd-plan-checker.toml` (read-only TOML agent with the plan-checker delegate). Codex's entry surface is the portable skill at `.agents/skills/gsdd-plan/SKILL.md` — Codex auto-discovers it via its `.agents/skills/` skill scanning ([developers.openai.com/codex/skills](https://developers.openai.com/codex/skills)). The portable skill now contains vendor-neutral checker invocation instructions (JSON schema, max-3 cycle loop, escalation) plus an explicit plan-only completion lock, so when Codex follows it, it spawns the native `gsdd-plan-checker` agent for fresh-context review and still requires a separate `$gsdd-execute` transition before implementation. `--tools codex` is reinstated as an active adapter flag.
|
|
828
858
|
|
|
829
859
|
**Why:** Codex CLI v0.115.0 (2026-03-16) stabilized its multi-agent system with `.codex/agents/*.toml` definitions, `spawn_agent` fresh-context invocation, per-agent `model` and `model_reasoning_effort` fields, and `sandbox_mode` access control. This provides structural parity with Claude's `.claude/agents/` and OpenCode's `.opencode/agents/`.
|
|
830
860
|
|
|
@@ -846,6 +876,7 @@ Implementation lives under `bin/lib/`:
|
|
|
846
876
|
- No deterministic spawn API — spawning is model-interpreted via natural language, not a programmatic `Task()` call
|
|
847
877
|
- GitHub issues #14719 (re-spawn failure) and #14841 (spawn loops with weaker models) are documented risks; GSDD's simple spawn-wait-pattern minimizes exposure, and the max-3 loop has escalation
|
|
848
878
|
- JSON schema duplication — the checker JSON schema is embedded in Claude, OpenCode orchestration prompts and the portable skill; tests guard drift across all surfaces
|
|
879
|
+
- Execution authorization must stay explicit — Codex and other runtimes must not infer implementation permission from generic imperative handoff text after `gsdd-plan`
|
|
849
880
|
- No Codex CLI in CI — future regressions still require disposable-fixture validation even though local live validation now exists
|
|
850
881
|
- Entry surface is shared — Codex uses the portable `.agents/skills/gsdd-plan/SKILL.md` as its entry surface (no vendor-specific skill path exists in Codex). The portable skill's checker invocation is vendor-neutral, but routing depends on Codex's implicit skill selection matching the task description
|
|
851
882
|
|
|
@@ -901,7 +932,7 @@ Implementation lives under `bin/lib/`:
|
|
|
901
932
|
|
|
902
933
|
**GSD:** `health.md` (157 lines) — calls `gsd-tools.cjs validate health [--repair]`, parses JSON with error codes E001-E005/W001-W007, supports `--repair` flag for createConfig/resetConfig/regenerateState repair actions.
|
|
903
934
|
|
|
904
|
-
**GSDD:** `gsdd health` CLI command (
|
|
935
|
+
**GSDD:** `gsdd health` CLI command (`bin/lib/health.mjs` + `bin/lib/health-truth.mjs`). Factory function `createCmdHealth(ctx)` returning an async command. No `--repair` flag — fixes are documented as actionable instructions, not automated mutations. GSDD already has `gsdd init` and `gsdd update --templates` as the repair paths; a separate repair mode would duplicate those commands.
|
|
905
936
|
|
|
906
937
|
**Check categories:**
|
|
907
938
|
|
|
@@ -912,12 +943,21 @@ Implementation lives under `bin/lib/`:
|
|
|
912
943
|
| E3 | ERROR | `.planning/templates/` missing |
|
|
913
944
|
| E4 | ERROR | `.planning/templates/roles/` missing or empty |
|
|
914
945
|
| E5 | ERROR | `.planning/templates/delegates/` missing or empty |
|
|
946
|
+
| E6 | ERROR | `.planning/templates/research/` missing or empty |
|
|
947
|
+
| E7 | ERROR | `.planning/templates/codebase/` missing or empty |
|
|
948
|
+
| E8 | ERROR | `.planning/templates/` missing critical root files (`spec.md`, `roadmap.md`, `auth-matrix.md`) |
|
|
915
949
|
| W1 | WARN | `generation-manifest.json` missing |
|
|
916
950
|
| W2 | WARN | Template files modified locally (hash mismatch vs manifest) |
|
|
917
951
|
| W3 | WARN | Template/role files missing from disk but listed in manifest |
|
|
918
|
-
| W4 | WARN |
|
|
952
|
+
| W4 | WARN | Active non-archived phases marked in progress/done are missing from `.planning/phases/` |
|
|
919
953
|
| W5 | WARN | Phase artifact set has PLAN but no matching SUMMARY (stale in-progress) |
|
|
920
954
|
| W6 | WARN | No adapter surfaces detected |
|
|
955
|
+
| W7 | WARN | `distilled/DESIGN.md` health check table differs from implemented check IDs |
|
|
956
|
+
| W8 | WARN | `distilled/README.md` workflow inventory differs from `distilled/workflows/` |
|
|
957
|
+
| W9 | WARN | `.internal-research/gaps.md` references missing repo-local paths |
|
|
958
|
+
| W10 | WARN | ROADMAP/SPEC requirement status drift |
|
|
959
|
+
| W11 | WARN | Installed generated runtime surfaces drift from current render output |
|
|
960
|
+
| W12 | WARN | Planning state drifted since last recorded session (fingerprint mismatch) |
|
|
921
961
|
| I1 | INFO | Generation manifest `frameworkVersion` differs from current `FRAMEWORK_VERSION` |
|
|
922
962
|
| I2 | INFO | Phase completion count from ROADMAP |
|
|
923
963
|
| I3 | INFO | Which adapters are installed |
|
|
@@ -939,11 +979,15 @@ Implementation lives under `bin/lib/`:
|
|
|
939
979
|
|
|
940
980
|
3. **Pre-init guard.** If `.planning/config.json` doesn't exist, output a one-line message and exit 1. No partial checks — the workspace is simply not initialized.
|
|
941
981
|
|
|
942
|
-
4. **
|
|
982
|
+
4. **Split structural vs truth checks.** `bin/lib/health.mjs` keeps the structural workspace checks. `bin/lib/health-truth.mjs` holds the always-on cross-file truth checks (W7-W10) so the health surface can grow without turning the main command into one monolith.
|
|
983
|
+
|
|
984
|
+
5. **Reuses existing modules.** `readManifest()` and `detectModifications()` from `manifest.mjs` handle W1-W3. `isProjectInitialized()` pattern from `models.mjs` handles the pre-init guard. Truth checks stay read-only and operate on repo-local artifacts only when those framework files exist.
|
|
985
|
+
|
|
986
|
+
6. **Framework-source mode skips installed-project template checks.** Inside the GSDD framework repo itself, `distilled/templates/` is the source of truth and `.planning/templates/` is intentionally absent. `gsdd health` therefore skips the installed-project template/manifest checks (E3-E8, W1-W3) in framework-source mode instead of producing false positives during self-health runs.
|
|
943
987
|
|
|
944
988
|
**What was removed vs GSD:**
|
|
945
989
|
- `--repair` flag and associated repair actions
|
|
946
|
-
- Error codes E001-E005/W001-W007 (replaced with simpler E1-
|
|
990
|
+
- Error codes E001-E005/W001-W007 (replaced with simpler E1-E8/W1-W12/I1-I3)
|
|
947
991
|
- STATE.md checks (GSDD has no STATE.md per D7)
|
|
948
992
|
- PROJECT.md checks (GSDD uses SPEC.md, not checked by health — it's workflow-authored)
|
|
949
993
|
- Phase directory naming format checks (GSDD uses flat numbered files, not NN-name directories)
|
|
@@ -956,7 +1000,7 @@ Implementation lives under `bin/lib/`:
|
|
|
956
1000
|
- External audit (2026-03-13): recommendation #3 "Add just enough: status/resume/progress/health"
|
|
957
1001
|
- External audit (2026-03-17): "You probably do need a minimal health surface, but not GSD's full style"
|
|
958
1002
|
- PR #32: pre-init guard bug proved workspace integrity issues are real, not theoretical
|
|
959
|
-
- GSDD implementation: `bin/lib/health.mjs`, `bin/gsdd.mjs`, `tests/gsdd.health.test.cjs`, `tests/gsdd.guards.test.cjs` (G14)
|
|
1003
|
+
- GSDD implementation: `bin/lib/health.mjs`, `bin/lib/health-truth.mjs`, `bin/gsdd.mjs`, `tests/gsdd.health.test.cjs`, `tests/gsdd.guards.test.cjs` (G14)
|
|
960
1004
|
|
|
961
1005
|
---
|
|
962
1006
|
|
|
@@ -1123,41 +1167,39 @@ This is acceptable because:
|
|
|
1123
1167
|
|
|
1124
1168
|
## 24. Consumer Governance Completeness
|
|
1125
1169
|
|
|
1126
|
-
**Problem:** Consumer governance surfaces
|
|
1170
|
+
**Problem:** Consumer governance surfaces were oscillating between two failure modes. The earlier block was too thin and hid core lifecycle entry points. The later block over-corrected into a long wall that tried to enumerate every delivered workflow, which made first-run `AGENTS.md` too heavy for a stranger to scan quickly.
|
|
1127
1171
|
|
|
1128
|
-
**GSDD decision:** Consumer
|
|
1172
|
+
**GSDD decision:** Consumer-generated `AGENTS.md` must be complete for the primary lifecycle, not exhaustive for the whole framework. The generated governance surface is a routing map for the core path (`new-project -> plan -> execute -> verify -> progress`) plus the durable location of the portable skills. Secondary workflows remain discoverable through `.agents/skills/gsdd-*/SKILL.md`, but they do not all need to be listed inline in the short generated file.
|
|
1129
1173
|
|
|
1130
1174
|
**What changed:**
|
|
1131
1175
|
|
|
1132
|
-
- `agents.block.md` now
|
|
1133
|
-
-
|
|
1134
|
-
-
|
|
1135
|
-
-
|
|
1176
|
+
- `agents.block.md` now names the five core lifecycle skills explicitly instead of trying to inline all workflow inventory
|
|
1177
|
+
- The lifecycle line still anchors the full flow through `audit-milestone`, but the generated block stays routing-first and compact
|
|
1178
|
+
- The block tells agents where the full portable workflow set lives: `.agents/skills/gsdd-*/SKILL.md`
|
|
1179
|
+
- Guard coverage now enforces the compact contract instead of exhaustive inventory in the generated file
|
|
1136
1180
|
|
|
1137
|
-
**Why this is high-leverage:**
|
|
1181
|
+
**Why this is high-leverage:** Consumer `AGENTS.md` is read at the exact moment a stranger is deciding whether the framework is legible. The file has to preserve load-bearing routing while staying short enough to scan. Exhaustive workflow inventory belongs in the durable skills directory and public docs, not in the first-run governance block.
|
|
1138
1182
|
|
|
1139
1183
|
**Evidence:**
|
|
1140
1184
|
|
|
1141
|
-
-
|
|
1142
|
-
-
|
|
1143
|
-
-
|
|
1144
|
-
-
|
|
1145
|
-
- External audits (2026-03-13, 2026-03-17): both independently flagged documentation accuracy as the top remaining blocker for consumer adoption
|
|
1146
|
-
- GSDD implementation: `distilled/templates/agents.block.md`, `CHANGELOG.md`, `README.md`, `tests/gsdd.guards.test.cjs` (G18)
|
|
1185
|
+
- HumanLayer, "Skill Issue" (2026): AGENTS.md works best as a short routing map, not a full product manual
|
|
1186
|
+
- OpenAI, "Harness Engineering" (2026): the harness should surface the critical path clearly at the moment of action
|
|
1187
|
+
- Phase 17 repo proof: `tests/gsdd.consumer-ceremony.test.cjs` now asserts the generated consumer file stays within 15-25 lines while preserving core routing hints and portable-skill discovery
|
|
1188
|
+
- GSDD implementation: `distilled/templates/agents.block.md`, `distilled/templates/agents.md`, `tests/gsdd.consumer-ceremony.test.cjs`, `tests/gsdd.guards.test.cjs`
|
|
1147
1189
|
|
|
1148
1190
|
---
|
|
1149
1191
|
|
|
1150
1192
|
## 25. Consumer First-Run Experience
|
|
1151
1193
|
|
|
1152
|
-
**Problem:** GSDD's internal architecture
|
|
1194
|
+
**Problem:** GSDD's internal architecture was stronger than its first-run UX. The framework had the right runtime surfaces and workflow depth, but consumer onboarding still felt like an internal tool: too many init questions, too much generated governance text, and not enough immediate clarity about the next step.
|
|
1153
1195
|
|
|
1154
|
-
**Decision:**
|
|
1196
|
+
**Decision:** Keep launch-proof posture in public docs and install/help surfaces, while making the actual first-run experience intentionally lightweight: a guided init wizard with only load-bearing choices, explicit post-init summary output, and a compact generated governance block focused on the core path.
|
|
1155
1197
|
|
|
1156
1198
|
**Key changes:**
|
|
1157
|
-
-
|
|
1158
|
-
-
|
|
1159
|
-
- AGENTS.md governance
|
|
1160
|
-
- Quickstart
|
|
1199
|
+
- Interactive init now asks only five visible questions: runtimes, AGENTS governance, rigor, cost, and whether to track `.planning/` in git
|
|
1200
|
+
- Init prints a short summary showing the selected rigor/cost defaults and the core workflow route
|
|
1201
|
+
- AGENTS.md governance stays focused on invocation guidance, the governance-vs-discovery boundary, and the core lifecycle rather than launch-proof copy or exhaustive inventory
|
|
1202
|
+
- Quickstart and public docs still carry the broader platform and proof story
|
|
1161
1203
|
|
|
1162
1204
|
**Evidence:**
|
|
1163
1205
|
1. **Anthropic harness engineering** (2025-2026): "honest constraints over vague prompting" — harnesses should clearly communicate what they can and cannot enforce
|
|
@@ -1166,7 +1208,7 @@ This is acceptable because:
|
|
|
1166
1208
|
4. **Martin Fowler on context engineering**: Emphasizes that "the right information at the right time" applies to human consumers as much as to AI agents
|
|
1167
1209
|
5. **Both GSDD external audits** (March 13 + 17, 2026): Independently concluded the same gap — "architecture is solid, presentation lags implementation"
|
|
1168
1210
|
|
|
1169
|
-
**GSDD implementation:** `README.md` (quickstart, honest platform tiers), `distilled/templates/agents.block.md` (
|
|
1211
|
+
**GSDD implementation:** `README.md` (quickstart, honest platform tiers), `distilled/templates/agents.block.md` (compact governance plus governance/discovery boundary), `bin/lib/init-flow.mjs` (post-init summary), `bin/lib/init-prompts.mjs` (5-prompt guided flow), `tests/gsdd.consumer-ceremony.test.cjs`, `tests/gsdd.guards.test.cjs`
|
|
1170
1212
|
|
|
1171
1213
|
---
|
|
1172
1214
|
|
|
@@ -1217,9 +1259,9 @@ D12 established the session persistence design. D26 mechanically enforces the ro
|
|
|
1217
1259
|
|
|
1218
1260
|
## 28. Workflow Completion Routing
|
|
1219
1261
|
|
|
1220
|
-
**Problem:** Consumer testing (2026-03-21) revealed that AI agents completing a GSDD workflow go silent — the user must manually figure out which `/gsdd
|
|
1262
|
+
**Problem:** Consumer testing (2026-03-21) revealed that AI agents completing a GSDD workflow go silent — the user must manually figure out which `/gsdd-*` command to run next. The lifecycle contract (`new-project → plan → execute → verify → [next phase]`) was correct in design but invisible in practice at each step boundary. GSD original solved this with explicit "Next Up" sections at the end of every workflow; GSDD lost this pattern during distillation.
|
|
1221
1263
|
|
|
1222
|
-
**Decision:** Add `<completion>` sections after `<success_criteria>` in all 9 terminal workflows. Add positional discipline gates (STOP instructions at exact deviation points) and mandatory persistence enforcement for critical artifacts.
|
|
1264
|
+
**Decision:** Add `<completion>` sections after `<success_criteria>` in all 9 terminal workflows. Add positional discipline gates (STOP instructions at exact deviation points) and mandatory persistence enforcement for critical artifacts. Preserve lifecycle order, but for `plan` make the boundary explicit: completion may name `/gsdd-execute` as the next workflow, while the current `gsdd-plan` run remains plan-only and does not authorize implementation.
|
|
1223
1265
|
|
|
1224
1266
|
**Changes:**
|
|
1225
1267
|
|
|
@@ -1239,10 +1281,10 @@ Report to the user what was accomplished, then present the next step:
|
|
|
1239
1281
|
---
|
|
1240
1282
|
**Completed:** [what finished]
|
|
1241
1283
|
|
|
1242
|
-
**Next step:** `/gsdd
|
|
1284
|
+
**Next step:** `/gsdd-[command]` — [description]
|
|
1243
1285
|
|
|
1244
1286
|
Also available:
|
|
1245
|
-
- `/gsdd
|
|
1287
|
+
- `/gsdd-[alt]` — [description]
|
|
1246
1288
|
|
|
1247
1289
|
Consider clearing context before starting the next workflow for best results.
|
|
1248
1290
|
---
|
|
@@ -1250,15 +1292,15 @@ Consider clearing context before starting the next workflow for best results.
|
|
|
1250
1292
|
```
|
|
1251
1293
|
|
|
1252
1294
|
**Routing map (acyclic, complete):**
|
|
1253
|
-
- `new-project` → `/gsdd
|
|
1254
|
-
- `plan` → `/gsdd
|
|
1255
|
-
- `execute` → `/gsdd
|
|
1256
|
-
- `verify` → `/gsdd
|
|
1257
|
-
- `audit-milestone` → `/gsdd
|
|
1258
|
-
- `quick` → `/gsdd
|
|
1259
|
-
- `pause` → `/gsdd
|
|
1295
|
+
- `new-project` → `/gsdd-plan`
|
|
1296
|
+
- `plan` → separate `/gsdd-execute` run (routing only; no same-run execution authorization)
|
|
1297
|
+
- `execute` → `/gsdd-verify` (if verifier enabled) or `/gsdd-progress`
|
|
1298
|
+
- `verify` → `/gsdd-progress` (passed), `/gsdd-plan` (gaps), `/gsdd-verify` (human_needed)
|
|
1299
|
+
- `audit-milestone` → `/gsdd-complete-milestone` (passed), `/gsdd-plan` (gaps/debt)
|
|
1300
|
+
- `quick` → `/gsdd-progress`
|
|
1301
|
+
- `pause` → `/gsdd-resume` (next session)
|
|
1260
1302
|
- `resume` → dispatches to selected workflow
|
|
1261
|
-
- `map-codebase` → `/gsdd
|
|
1303
|
+
- `map-codebase` → `/gsdd-new-project`
|
|
1262
1304
|
|
|
1263
1305
|
**GSD comparison:**
|
|
1264
1306
|
|
|
@@ -1426,7 +1468,7 @@ GSD's approach was a `--full` flag that added plan-checking + verification to qu
|
|
|
1426
1468
|
|
|
1427
1469
|
1. **Plan Preview Gate (mandatory, default-yes):** After the planner returns and the STOP gate verifies the plan exists, present a structured summary (task count, files to touch, 1-sentence approach) and wait for the user. Default-yes: pressing Enter proceeds. Options include edit, abort, and (when scope signal fires) switch to full ceremony. This is the core fix — the user sees agent intent before code changes happen.
|
|
1428
1470
|
|
|
1429
|
-
2. **Scope Signal with Escalation (advisory, always-on):** Inline orchestrator evaluation checks the plan against quick-scope boundaries: >8 files modified, architecture keywords in description (`refactor`, `migration`, `security`, `auth`, `API design`, `schema`, `database`), new public APIs. If any signal fires, the advisory appears in the plan preview with a recommendation to use `/gsdd
|
|
1471
|
+
2. **Scope Signal with Escalation (advisory, always-on):** Inline orchestrator evaluation checks the plan against quick-scope boundaries: >8 files modified, architecture keywords in description (`refactor`, `migration`, `security`, `auth`, `API design`, `schema`, `database`), new public APIs. If any signal fires, the advisory appears in the plan preview with a recommendation to use `/gsdd-plan` for approach exploration. Advisory only — the user decides. Keyword heuristics have false positives; blocking would train users to ignore the signal.
|
|
1430
1472
|
|
|
1431
1473
|
3. **Config-Gated Independent Plan Check (optional):** When `workflow.planCheck: true` in config.json, the existing plan-checker delegate runs against the quick task plan with 5 of 9 dimensions: `requirement_coverage`, `task_completeness`, `dependency_correctness`, `scope_sanity`, `must_have_quality`. Maximum 1 revision cycle (not 3 — diminishing returns for 1-3 task plans). If blockers remain, they surface in the plan preview for user decision. No new delegate or config key — reuses existing infrastructure.
|
|
1432
1474
|
|
|
@@ -1471,7 +1513,7 @@ The step has a **dual gate** — even with `workflow.discuss: true`, it evaluate
|
|
|
1471
1513
|
| Vague scope | Contains: `improve`, `fix`, `update`, `refactor`, `clean up`, `optimize` without specifying target | "improve error handling" |
|
|
1472
1514
|
| Trade-off present | Implies competing goals | "make it faster" (algorithmic? caching? denormalization?) |
|
|
1473
1515
|
|
|
1474
|
-
If no signals fire, the step skips silently — no questions asked, even with toggle on. When signals fire, the orchestrator identifies 1-2 grey areas and asks targeted questions in **recommendation-first format**: "I'd approach this with X because Y. Want me to proceed, or do you prefer Z?" Maximum 2 questions — if a task has 3+ grey areas, the scope signal (D32) should already be recommending `/gsdd
|
|
1516
|
+
If no signals fire, the step skips silently — no questions asked, even with toggle on. When signals fire, the orchestrator identifies 1-2 grey areas and asks targeted questions in **recommendation-first format**: "I'd approach this with X because Y. Want me to proceed, or do you prefer Z?" Maximum 2 questions — if a task has 3+ grey areas, the scope signal (D32) should already be recommending `/gsdd-plan`.
|
|
1475
1517
|
|
|
1476
1518
|
Output is inline `$APPROACH_CONTEXT` (e.g., "User confirmed: use in-memory LRU cache, not Redis") passed to the planner as locked constraints. No APPROACH.md file — file artifacts add overhead with no return for sub-hour work.
|
|
1477
1519
|
|
|
@@ -1574,11 +1616,11 @@ That conflation was survivable while Cursor and Copilot were incorrectly treated
|
|
|
1574
1616
|
|
|
1575
1617
|
**Problem:** `gsdd init` had two mismatched onboarding models at once. The public story was moving toward skills-native runtimes and optional governance, but the actual CLI still made users memorize `--tools ...` values as the primary install experience. The only interactive part was the config questionnaire, which started after filesystem writes and did not help the user decide which runtime surfaces or governance overlays to install.
|
|
1576
1618
|
|
|
1577
|
-
**Decision:** Make `gsdd init` a guided install wizard in TTY environments, while preserving `--tools` and `--auto` as the manual/headless contract.
|
|
1619
|
+
**Decision:** Make `gsdd init` a guided install wizard in TTY environments, while preserving `--tools` and `--auto` as the manual/headless contract. The guided path must stay intentionally compact: runtime choice, governance opt-in, and a small set of bundled planning defaults rather than a long per-setting questionnaire.
|
|
1578
1620
|
|
|
1579
1621
|
- Step 1: choose runtimes/vendors with a simple checkbox-style selector (space toggles, enter confirms).
|
|
1580
1622
|
- Step 2: ask separately whether to install repo-wide `AGENTS.md` governance, with explicit explanation of why it helps and why it may feel invasive.
|
|
1581
|
-
- Step 3: collect the
|
|
1623
|
+
- Step 3: collect the planning defaults through two orthogonal bundled choices (`Rigor` and `Cost`) plus the separate `.planning` tracking choice, instead of a long per-setting questionnaire.
|
|
1582
1624
|
- Portable `.agents/skills/gsdd-*` skills remain the always-generated baseline.
|
|
1583
1625
|
- Legacy values such as `--tools cursor`, `--tools copilot`, and `--tools gemini` remain valid for backward compatibility.
|
|
1584
1626
|
|
|
@@ -1588,18 +1630,25 @@ That conflation was survivable while Cursor and Copilot were incorrectly treated
|
|
|
1588
1630
|
- Root `AGENTS.md` is generated only when the user explicitly opts into governance (wizard) or explicitly requests a governance-writing flag path (`--tools agents`, `--tools all`, or legacy runtime aliases).
|
|
1589
1631
|
- This keeps D35's capability split honest instead of re-conflating skills-native runtime choice with governance-file generation.
|
|
1590
1632
|
|
|
1633
|
+
**Phase 17 refinement:**
|
|
1634
|
+
|
|
1635
|
+
- The guided config path was reduced from 13 visible prompts to 5.
|
|
1636
|
+
- `Rigor` controls `researchDepth` and workflow strictness (`research`, `discuss`, `planCheck`) while keeping `workflow.verifier` always on.
|
|
1637
|
+
- `Cost` controls `modelProfile` and `parallelization` independently, so combinations such as `thorough + budget` remain reachable.
|
|
1638
|
+
- `gitProtocol` remains in `config.json` with defaults but is intentionally out of the wizard until a dedicated UX pass decides the right shape.
|
|
1639
|
+
|
|
1591
1640
|
**Why this fits the codebase:** The adapter registry and `init.mjs` already own the right boundary. The high-leverage change was to add a decision layer in front of writes, not to invent a new adapter model or a new config schema. This keeps the CLI lightweight, preserves backward compatibility, and makes the default install path match the product story.
|
|
1592
1641
|
|
|
1593
1642
|
**Evidence:**
|
|
1594
1643
|
|
|
1595
1644
|
1. Existing repo truth: `gsdd init` always generates `.agents/skills/` and already has a central adapter-selection seam in `bin/lib/init.mjs`.
|
|
1596
1645
|
2. Local research on the adjacent `prompty` repo: portable skills are the primary install surface, while native command surfaces are optional additions.
|
|
1597
|
-
3.
|
|
1646
|
+
3. External: npm init (Node.js), Vite `create-vite`, Next.js `create-next-app`, Angular CLI `ng new`, and Astro `create astro` all implement the same pattern — TTY-interactive wizard by default, `--yes`/`--defaults` for headless; this is the de facto standard for modern project scaffolding tools.
|
|
1598
1647
|
4. Repo lesson LL-INSTALL-DX-BEFORE-ALIAS-CLEANUP already recorded that install ergonomics should be fixed before alias-policy cleanup.
|
|
1599
1648
|
|
|
1600
1649
|
**GSD comparison:** GSD's install surface is more operator-heavy and framework-specific. GSDD keeps the deterministic bootstrap principle but shifts the user-facing choice surface into a lightweight guided CLI instead of requiring users to know adapter values in advance.
|
|
1601
1650
|
|
|
1602
|
-
**GSDD implementation:** `bin/lib/init.mjs`, `bin/gsdd.mjs`, `README.md`, `distilled/README.md`, `SPEC.md`, `.internal-research/TODO.md`, `.internal-research/gaps.md`, `.internal-research/lessons-learned.md`, `tests/gsdd.init.test.cjs`, `tests/gsdd.guards.test.cjs`
|
|
1651
|
+
**GSDD implementation:** `bin/lib/init.mjs`, `bin/lib/init-flow.mjs`, `bin/lib/init-prompts.mjs`, `bin/lib/models.mjs`, `bin/gsdd.mjs`, `README.md`, `distilled/README.md`, `SPEC.md`, `.internal-research/TODO.md`, `.internal-research/gaps.md`, `.internal-research/lessons-learned.md`, `tests/gsdd.init.test.cjs`, `tests/gsdd.consumer-ceremony.test.cjs`, `tests/gsdd.guards.test.cjs`
|
|
1603
1652
|
|
|
1604
1653
|
---
|
|
1605
1654
|
|
|
@@ -1627,6 +1676,7 @@ That conflation was survivable while Cursor and Copilot were incorrectly treated
|
|
|
1627
1676
|
1. `distilled/workflows/verify.md`, `new-project.md`, `audit-milestone.md`, `pause.md`, and `resume.md` all require artifact writes or deletions as part of completion.
|
|
1628
1677
|
2. `distilled/workflows/progress.md` is the only workflow that explicitly declares itself read-only.
|
|
1629
1678
|
3. Consumer audit evidence already showed verification reports being lost when persistence was skipped; this decision closes the registry seam that could recreate the same class of failure.
|
|
1679
|
+
4. External: Meyer's Command-Query Separation (CQS, "Object-Oriented Software Construction" 1988) — the foundational principle that operations should be classified by whether they modify state, not by what they conceptually represent; Greg Young's CQRS (2010) — CQS applied at the architectural level; Unix rwx permission model and AWS IAM/Kubernetes RBAC all classify operations by mutation semantics rather than by semantic category name
|
|
1630
1680
|
|
|
1631
1681
|
**GSD comparison:** GSD's leverage also depends on persisted workflow artifacts. GSDD's portable/runtime split adds a new failure mode GSD did not have in the same form: a generated adapter can misclassify a mutating workflow even when the markdown contract is correct. This decision makes the adapter/runtime layer honor the artifact contract instead of undermining it.
|
|
1632
1682
|
|
|
@@ -1634,6 +1684,640 @@ That conflation was survivable while Cursor and Copilot were incorrectly treated
|
|
|
1634
1684
|
|
|
1635
1685
|
---
|
|
1636
1686
|
|
|
1687
|
+
## 38. Retroactive Artifact Enforcement
|
|
1688
|
+
|
|
1689
|
+
**Problem:** ROADMAP.md phase `[x]` can be marked complete without the required artifacts (PLAN.md, SUMMARY.md, VERIFICATION.md) existing on disk. No mechanical gate prevents phase advancement without artifacts. This gap (I27) recurred twice in the v1 milestone:
|
|
1690
|
+
|
|
1691
|
+
- Sub-gap (a): early session termination drops final bookkeeping — ROADMAP marked `[x]` with no VERIFICATION.md.
|
|
1692
|
+
- Sub-gap (b): `verify.md` structural omission — even on full lifecycle success, ROADMAP stayed stale because only `execute.md` updated it.
|
|
1693
|
+
|
|
1694
|
+
Sub-gap (b) was closed by D28's `<persistence>` mandate and guarded by G30. Sub-gap (a) requires either a preventive CLI gate or an explicit accept-by-design decision.
|
|
1695
|
+
|
|
1696
|
+
**Decision:** Accept milestone-audit as the retroactive enforcement layer for sub-gap (a). Do not add a preventive CLI gate.
|
|
1697
|
+
|
|
1698
|
+
**Rationale:**
|
|
1699
|
+
|
|
1700
|
+
1. **Artifact mandates already exist.** D28 added `<persistence>` sections with MANDATORY language to `execute.md` and `verify.md`. D30 propagated them to `quick.md`, `map-codebase.md`, `audit-milestone.md`, and `pause.md`. The specification-level enforcement is in place across all artifact-producing workflows.
|
|
1701
|
+
|
|
1702
|
+
2. **Kernel simplicity.** Adding a preventive gate (e.g., `gsdd verify` checking artifact existence before allowing ROADMAP updates) would require every workflow to call a CLI guard before its state update. This creates a new coupling between the CLI layer and the workflow layer — complexity the kernel explicitly avoids. See `.internal-research/strategy.md` section on policy depth vs kernel purity.
|
|
1703
|
+
|
|
1704
|
+
3. **Retroactive audit is sufficient.** The milestone audit (`audit-milestone.md`, `agents/integration-checker.md`) checks artifact completeness across all phases as its first step. Violations surface as structured gaps, not silent passes. The audit cost is bounded and predictable.
|
|
1705
|
+
|
|
1706
|
+
4. **Gap already has guard coverage.** G30 mechanically enforces that `verify.md` closes ROADMAP on passed status. The sub-gap (b) failure mode is now guarded. Sub-gap (a) (session interruption) is a behavioral failure by the agent, not a structural gap in the spec — no guard can prevent a session from crashing mid-workflow.
|
|
1707
|
+
|
|
1708
|
+
5. **GSD comparison.** GSD has no preventive artifact gate either. GSD's enforcement relies on its mandatory commit steps and `gsd-tools.cjs` CLI calls. GSDD's design choice strips mandatory commits (D8) and CLI-gated workflow steps (D9), trading off some enforcement depth for portability. Milestone audit is the equivalent retroactive layer.
|
|
1709
|
+
|
|
1710
|
+
**What this decision closes:** I27 sub-gap (a) is accepted by design. The full I27 gap is now CLOSED: sub-gap (b) by D28/G30, sub-gap (a) by this decision.
|
|
1711
|
+
|
|
1712
|
+
**Evidence:**
|
|
1713
|
+
|
|
1714
|
+
- `.internal-research/gaps.md` I27 entry (two occurrences, root-cause analysis, close conditions)
|
|
1715
|
+
- D28 mandate language in `distilled/workflows/execute.md` and `distilled/workflows/verify.md`
|
|
1716
|
+
- D30 propagation to all artifact-producing workflows
|
|
1717
|
+
- G30 guard in `tests/gsdd.guards.test.cjs` (verify.md ROADMAP closure)
|
|
1718
|
+
- `.internal-research/strategy.md` (kernel simplicity vs policy depth trade-off)
|
|
1719
|
+
- `distilled/workflows/audit-milestone.md` (retroactive artifact completeness check)
|
|
1720
|
+
- External: NIST SP 800-53 Rev. 5 (2020) — distinguishes detective controls (post-event detection) from preventive controls (pre-event blocking) as equally valid risk-management strategies; ISO 27001 risk treatment options — the choice of detective vs preventive control depends on cost/complexity tradeoff, not on which is inherently superior; Reason's Swiss Cheese model (1990) — layered defense-in-depth where retroactive audit layers catch what preventive layers miss; session interruption is a distributed systems failure mode (analogous to the Two Generals problem) that cannot be fully eliminated by local gates
|
|
1721
|
+
|
|
1722
|
+
**GSD comparison:** GSD's `gsd-tools.cjs` CLI enforces workflow progression gates directly. GSDD replaces those with specification-level MANDATORY language (D9). This is a deliberate portability trade-off, not an oversight.
|
|
1723
|
+
|
|
1724
|
+
**GSDD implementation:** `distilled/workflows/execute.md` (SUMMARY.md persistence gate), `distilled/workflows/verify.md` (VERIFICATION.md persistence gate + ROADMAP closure), `distilled/workflows/audit-milestone.md` (retroactive artifact check), `tests/gsdd.guards.test.cjs` (G30), `distilled/EVIDENCE-INDEX.md` (D38 entry)
|
|
1725
|
+
|
|
1726
|
+
---
|
|
1727
|
+
|
|
1728
|
+
## 39. Brownfield Entry Wiring
|
|
1729
|
+
|
|
1730
|
+
**Problem:** The brownfield path was structurally incomplete. `map-codebase` generated useful orientation artifacts, but it routed users only toward full project initialization. `quick` remained blind to those same codebase maps, so brownfield users who wanted disciplined feature work without full roadmap ceremony had no first-class lane.
|
|
1731
|
+
|
|
1732
|
+
**Decision:** Wire the existing secondary brownfield lane instead of adding a new workflow.
|
|
1733
|
+
|
|
1734
|
+
- `map-codebase` completion now offers two explicit next steps: `/gsdd-new-project` for full lifecycle setup and `/gsdd-quick` for bounded brownfield feature work.
|
|
1735
|
+
- `map-codebase` completion now synthesizes an explicit brownfield routing summary from the existing 4 docs: safest next change lane, highest-risk zones, must-know traps, and the recommended workflow with rationale.
|
|
1736
|
+
- `quick` now reads `.planning/codebase/ARCHITECTURE.md`, `.planning/codebase/STACK.md`, `.planning/codebase/CONVENTIONS.md`, and `.planning/codebase/CONCERNS.md` when they exist and passes a summarized `$CODEBASE_CONTEXT` into the planner delegate.
|
|
1737
|
+
- `quick` stays structurally pure: it gains safer brownfield routing/context, not spec, roadmap, or research-lite behavior.
|
|
1738
|
+
|
|
1739
|
+
**Why this shape:** The missing leverage was routing and context reuse, not another onboarding surface. Reusing the existing codebase map artifacts preserves the current workflow set, keeps quick mode lightweight, and gives brownfield users immediate architecture, convention, and risk awareness without forcing full milestone ceremony.
|
|
1740
|
+
|
|
1741
|
+
**Tradeoff:** This gives `quick` orientation, not full brownfield inference. It deliberately avoids turning quick mode into a lite `new-project`; the planner receives only a bounded summary from the codebase maps, not a new research phase and not a fifth persistent artifact. If the user cannot yet name the bounded change, the workflow should steer back to `new-project`.
|
|
1742
|
+
|
|
1743
|
+
**GSD comparison:** GSD's brownfield posture is centered on the full project-initialization flow after mapping. GSDD keeps the full path available, but adds an explicit lighter-weight secondary branch for feature-by-feature brownfield work.
|
|
1744
|
+
|
|
1745
|
+
**GSDD implementation:** `distilled/workflows/quick.md` (Step 2 codebase context, planner context, bounded-lane hardening), `distilled/workflows/map-codebase.md` (completion routing + brownfield routing summary), `tests/gsdd.guards.test.cjs`, `tests/gsdd.scenarios.test.cjs`
|
|
1746
|
+
|
|
1747
|
+
**Evidence:**
|
|
1748
|
+
|
|
1749
|
+
- User brownfield audit finding (2026-03-20): mapping was useful, but the lighter-weight feature-work lane was not explicit
|
|
1750
|
+
- D32-D34 quick-workflow hardening: alignment and scope controls already existed, so the remaining gap was routing plus codebase-context reuse
|
|
1751
|
+
- `distilled/workflows/quick.md` (Step 2 codebase-context read, planner delegate context)
|
|
1752
|
+
- `distilled/workflows/map-codebase.md` (completion offers `/gsdd-quick` as the brownfield lane)
|
|
1753
|
+
- `tests/gsdd.guards.test.cjs`, `tests/gsdd.scenarios.test.cjs`
|
|
1754
|
+
|
|
1755
|
+
---
|
|
1756
|
+
|
|
1757
|
+
## D40 - Three-Layer Continuity Boundary
|
|
1758
|
+
|
|
1759
|
+
**Decision (2026-03-30):** GSDD adopts an explicit three-layer continuity boundary so cold-start recovery, resume behavior, and future continuity work do not blur durable truth, live workflow state, and the still-missing compressed judgment layer.
|
|
1760
|
+
|
|
1761
|
+
**Context:**
|
|
1762
|
+
- Gap S6 showed that cold-start continuity was stronger on artifact and state recovery than on decision-quality recovery. The repo could reconstruct what was built, but not always the smallest why/why-not layer needed for equally strong planning after a restart.
|
|
1763
|
+
- Phase 7 requirement JUDGE-01 required the continuity model to be named and adopted explicitly instead of being inferred from scattered docs.
|
|
1764
|
+
- Lesson `LL-ARTIFACT-PERSISTENCE-IS-NOT-ENOUGH` already established the core failure mode: artifacts preserve what was built, but not the minimum judgment layer needed to continue with the same decision posture.
|
|
1765
|
+
|
|
1766
|
+
**Decision text:**
|
|
1767
|
+
- **Durable Truth**: files that survive across milestones and cold starts and define product or framework truth. This layer includes `SPEC.md`, `distilled/DESIGN.md`, `MILESTONES.md`, milestone archives, `config.json`, codebase maps, research artifacts, role contracts, and workflow definitions.
|
|
1768
|
+
- **Live Workflow State**: files that describe current progress, active execution position, or resumable session state. This layer includes `ROADMAP.md`, phase `PLAN`/`APPROACH`/`SUMMARY`/`VERIFICATION` artifacts, `.continue-here.md`, quick task logs, and `generation-manifest.json`.
|
|
1769
|
+
- **Compressed Judgment**: the smallest persistence surface for active constraints, unresolved uncertainty, decision posture, and anti-regression rules. This layer is recognized as necessary but not yet fully designed; its persistence surface is deferred to Phase 8.
|
|
1770
|
+
- Workflow changes must classify artifacts against this boundary. Readers must not infer durable truth from live-state artifacts alone, and writers must not collapse multiple layers into a new catch-all state file.
|
|
1771
|
+
|
|
1772
|
+
**Evidence:**
|
|
1773
|
+
- Phase 7 exploration reviewed all 14 current workflow files and mapped which artifacts they read, write, or treat as primary truth. The review found durable artifacts and live-state artifacts in use, but no explicit three-layer model naming compressed judgment as its own continuity concern.
|
|
1774
|
+
- D12 established the "artifact-derived state, no `STATE.md`" direction, which kept GSDD repo-native and file-backed, but did not define a distinct compressed judgment layer.
|
|
1775
|
+
- D26 hardened routing and session continuity contracts, but likewise operated on artifacts and checkpoints without naming the broader continuity boundary.
|
|
1776
|
+
- The three-layer boundary therefore emerged from Phase 7 as a missing architectural definition rather than a reversal of prior decisions.
|
|
1777
|
+
|
|
1778
|
+
**Consequences:**
|
|
1779
|
+
- Phase 8 must define the compressed-judgment persistence surface and workflow-consumption rules needed to satisfy JUDGE-02 and JUDGE-03.
|
|
1780
|
+
- Future workflow and artifact changes should explicitly classify any touched file as durable truth, live workflow state, or compressed judgment before changing its contract.
|
|
1781
|
+
- `distilled/workflows/resume.md` is the first workflow to adopt this boundary directly by validating live checkpoint state against durable roadmap truth without inventing a new project-scoped state file.
|
|
1782
|
+
|
|
1783
|
+
**GSDD implementation:** `.planning/SPEC.md` (Continuity Layers constraint, Key Decisions row), `distilled/DESIGN.md` (this decision), `distilled/workflows/resume.md` (first workflow adoption)
|
|
1784
|
+
|
|
1785
|
+
---
|
|
1786
|
+
|
|
1787
|
+
## D41 - Compressed Judgment Persistence Surface
|
|
1788
|
+
|
|
1789
|
+
**Decision (2026-03-30):** GSDD persists compressed judgment as a bounded `<judgment>` XML block with four sections in two existing surfaces: the checkpoint for mid-phase cold restarts and the phase SUMMARY for phase-to-phase handoffs.
|
|
1790
|
+
|
|
1791
|
+
**Context:**
|
|
1792
|
+
- Phase 7 defined the three-layer continuity boundary in D40, but explicitly left the compressed judgment persistence surface undefined as a Phase 8 target.
|
|
1793
|
+
- JUDGE-02 requires the judgment layer to use existing primary or checkpoint artifacts rather than inventing a new project-scoped state file.
|
|
1794
|
+
- JUDGE-03 requires planning, execution, verification, and resume to recover judgment at entry without relying on chat memory.
|
|
1795
|
+
- Gap S6 showed that artifact persistence alone preserves what was built, not the smallest why/why-not layer needed to continue with the same decision posture.
|
|
1796
|
+
- Lesson `LL-ARTIFACT-PERSISTENCE-IS-NOT-ENOUGH` established that the continuity problem is not solved by durable artifacts alone.
|
|
1797
|
+
|
|
1798
|
+
**Decision text:**
|
|
1799
|
+
- Persist compressed judgment as a bounded `<judgment>` XML block with four sections: `<active_constraints>`, `<unresolved_uncertainty>`, `<decision_posture>`, and `<anti_regression>`.
|
|
1800
|
+
- Embed the exact same shape in two existing surfaces:
|
|
1801
|
+
- the checkpoint (`.continue-here.md`), written by `pause.md` at session pause and read by `resume.md` for mid-phase cold restarts
|
|
1802
|
+
- the phase `SUMMARY.md`, written by `execute.md` at phase completion and read by `plan.md`, `execute.md`, and `verify.md` for phase-to-phase handoffs
|
|
1803
|
+
- The shape must remain identical in both locations so the judgment layer is consistent across lifecycle entry points.
|
|
1804
|
+
- No new project-scoped state file is introduced.
|
|
1805
|
+
|
|
1806
|
+
**Evidence:**
|
|
1807
|
+
- Phase 8 reviewed the four workflow entry points that need judgment recovery: `plan.md`, `execute.md`, `verify.md`, and `resume.md`.
|
|
1808
|
+
- The review mapped each workflow's current `<load_context>` or artifact read path and confirmed that checkpoint and SUMMARY are already in the natural read/write flow of these workflows.
|
|
1809
|
+
- `SUMMARY.md` already carries "Notes for Next Work", but that section is unstructured prose and is not consumed by any workflow's `<load_context>`.
|
|
1810
|
+
- The checkpoint already stores session-local state and decisions, but it does not capture a cumulative, bounded judgment layer with the four facets needed for continuity.
|
|
1811
|
+
- The dual-surface approach covers both required handoff scenarios without inventing a new persistence path: checkpoint for mid-phase restart, SUMMARY for phase-to-phase continuation.
|
|
1812
|
+
|
|
1813
|
+
**Consequences:**
|
|
1814
|
+
- Future workflow changes must maintain judgment read/write integration at these designated points rather than creating ad hoc persistence surfaces.
|
|
1815
|
+
- The judgment shape is intentionally bounded to four sections and must not expand into an unbounded session log.
|
|
1816
|
+
- Phase 9 remains responsible for runtime metadata and portability concerns (ADAPT-02); judgment portability across runtimes is not broadened here.
|
|
1817
|
+
|
|
1818
|
+
**GSDD implementation:** `.planning/SPEC.md` (Key Decisions row), `distilled/workflows/pause.md` (checkpoint write), `distilled/workflows/execute.md` (SUMMARY write and prior-summary read), `distilled/workflows/plan.md` (prior-summary read), `distilled/workflows/verify.md` (summary judgment verification input), `distilled/workflows/resume.md` (checkpoint read and surfacing)
|
|
1819
|
+
|
|
1820
|
+
---
|
|
1821
|
+
|
|
1822
|
+
## D42 - Session-Boundary Safety
|
|
1823
|
+
|
|
1824
|
+
**Decision (2026-04-04):** `.continue-here.bak` survives `resume.md` dispatch so downstream workflows can read it as a fallback judgment source when no prior SUMMARY.md `<judgment>` section is available. The downstream workflow auto-cleans `.bak` after absorbing the judgment.
|
|
1825
|
+
|
|
1826
|
+
**Context:**
|
|
1827
|
+
- D41 established two judgment persistence surfaces: checkpoint (`.continue-here.md`) and phase SUMMARY.md.
|
|
1828
|
+
- `resume.md` copies `.continue-here.md` to `.continue-here.bak` during `<cleanup_checkpoint>` (crash safety), then previously deleted `.bak` in `<completion>` before dispatching.
|
|
1829
|
+
- When a user clears context between resume and the dispatched workflow, session-specific judgment is permanently lost: `.continue-here.md` already deleted, `.bak` already deleted, and the prior SUMMARY.md only carries the *prior completed phase's* judgment — not the interrupted session's `<active_constraints>`, `<decision_posture>`, or `<anti_regression>` rules.
|
|
1830
|
+
- `pause.md` line 53 already deletes stale `.bak` files from prior crashed resumes — this crash-cleanup path remains unchanged.
|
|
1831
|
+
|
|
1832
|
+
**Decision:**
|
|
1833
|
+
- `resume.md` `<completion>` no longer deletes `.planning/.continue-here.bak`.
|
|
1834
|
+
- `plan.md`, `execute.md`, `verify.md`, and `quick.md` read `.planning/.continue-here.bak` as a fallback judgment source if no prior SUMMARY.md `<judgment>` section is available, then auto-clean it.
|
|
1835
|
+
- `pause.md` `.bak` cleanup (crash-recovery path, line 53) remains unchanged.
|
|
1836
|
+
|
|
1837
|
+
**Transition safety table:**
|
|
1838
|
+
|
|
1839
|
+
| Transition | Judgment source | `.bak` state after | Risk |
|
|
1840
|
+
|---|---|---|---|
|
|
1841
|
+
| pause → resume (same session) | `.continue-here.md` live in context | `.bak` created by `<cleanup_checkpoint>` | None: judgment in context |
|
|
1842
|
+
| resume → workflow (same session, no context clear) | Judgment in context from resume | `.bak` on disk, ignored | None: judgment in context |
|
|
1843
|
+
| resume → [context clear] → workflow | `.bak` fallback read | Deleted by workflow after read (auto-clean) | **Solved by this change** |
|
|
1844
|
+
| resume → [context clear] → workflow (SUMMARY.md judgment exists) | Prior SUMMARY.md `<judgment>` | `.bak` on disk, not read | `.bak` orphaned; cleaned by next `pause.md` run (line 53) |
|
|
1845
|
+
| Crash during resume (before dispatch) | `.continue-here.md` still exists | `.bak` may exist | Next resume reads `.md`; stale `.bak` cleaned by next `pause.md` |
|
|
1846
|
+
|
|
1847
|
+
**Evidence:**
|
|
1848
|
+
- Gap identified by tracing judgment lifecycle through pause → resume → [context clear] → downstream workflow.
|
|
1849
|
+
- `pause.md` line 53 already handles crash-orphaned `.bak` files — no new general cleanup path needed.
|
|
1850
|
+
- The conditional read (only when no SUMMARY.md judgment exists) prevents double-sourcing judgment from both `.bak` and SUMMARY.md.
|
|
1851
|
+
|
|
1852
|
+
**Consequences:**
|
|
1853
|
+
- `.bak` now has a defined lifecycle: created by `resume.md` `<cleanup_checkpoint>`, consumed-and-deleted by the next downstream workflow, or cleaned by the next `pause.md` run.
|
|
1854
|
+
- Future workflows added as resume dispatch targets must include the `.bak` fallback read pattern if they consume judgment.
|
|
1855
|
+
- The judgment shape remains bounded to four sections (D41 constraint). `.bak` is a fallback read path, not a new persistence surface.
|
|
1856
|
+
- `quick.md` reads `.bak` unconditionally (no SUMMARY.md check) because quick tasks have no phase lifecycle and no prior SUMMARY.md to consult. The other three workflows (`plan.md`, `execute.md`, `verify.md`) read `.bak` conditionally — only when no prior SUMMARY.md `<judgment>` section exists.
|
|
1857
|
+
|
|
1858
|
+
**GSDD implementation:** `distilled/workflows/resume.md` (`.bak` deletion removed from `<completion>`), `distilled/workflows/plan.md` (fallback read item 8), `distilled/workflows/execute.md` (fallback read item 7), `distilled/workflows/verify.md` (fallback read item 7), `distilled/workflows/quick.md` (fallback read in Step 2), `distilled/DESIGN.md` (this decision), `tests/gsdd.guards.test.cjs` (negative and positive invariant tests)
|
|
1859
|
+
|
|
1860
|
+
---
|
|
1861
|
+
|
|
1862
|
+
## D43 - Resume Provenance Truth Split
|
|
1863
|
+
|
|
1864
|
+
**Decision (2026-04-13):** `resume.md` must reconcile three truth surfaces explicitly instead of treating a structurally valid checkpoint as sufficient truth on its own.
|
|
1865
|
+
|
|
1866
|
+
**Context:**
|
|
1867
|
+
- The 2026-04-12 failure chain showed that a generic checkpoint can be structurally valid while materially understating the live branch/worktree scope.
|
|
1868
|
+
- The continuity boundary from D40/D41/D42 solved judgment persistence, but it did not yet distinguish checkpoint narrative truth from live git/worktree truth when the checked-out branch is stale, mixed-scope, or otherwise not the intended execution surface.
|
|
1869
|
+
- Phase 19 required resume UX hardening for `LAUNCH-09` and provenance/trust separation for `LAUNCH-10`.
|
|
1870
|
+
|
|
1871
|
+
**Decision:**
|
|
1872
|
+
- `resume.md` must surface and reconcile three truth buckets:
|
|
1873
|
+
- **checkpoint narrative truth**
|
|
1874
|
+
- **planning/artifact truth**
|
|
1875
|
+
- **git/worktree truth**
|
|
1876
|
+
- `pause.md` must build a checkpoint draft from artifact truth first, then ask only bounded correction questions rather than asking the user to reconstruct obvious repo state from scratch.
|
|
1877
|
+
- Material mismatch between checkpoint narrative truth and git/worktree truth must become a first-class warning with explicit acknowledgement before continuing.
|
|
1878
|
+
- Ordinary git risk remains warning-level by default. The stronger acknowledgement gate is reserved for material mismatch, not generic dirtiness.
|
|
1879
|
+
|
|
1880
|
+
**Why this fits the codebase:**
|
|
1881
|
+
- GSDD already treats repo truth as authoritative when docs and repo disagree. This decision extends that hierarchy to session continuity by preventing `.continue-here.md` from silently outranking the live integration surface.
|
|
1882
|
+
- The change keeps the product file-based and workflow-driven. It does not add a new public command or a new project-scoped state file.
|
|
1883
|
+
- The shared helper stays internal because the user-facing behavior belongs in workflows, while the classification logic belongs in reusable library code.
|
|
1884
|
+
|
|
1885
|
+
**Evidence:**
|
|
1886
|
+
- `.internal-research/gaps.md` items `I29` and `I30`
|
|
1887
|
+
- `.internal-research/TODO.md` notes on stale checkpoints, worktree drift, and parallel worktree rules
|
|
1888
|
+
- `.internal-research/consumer-audits/worktree-provenance-and-checkpoint-drift-2026-04-12.md`
|
|
1889
|
+
- `distilled/workflows/pause.md` (draft-first checkpointing, 3-question cap, evidence-only language)
|
|
1890
|
+
- `distilled/workflows/resume.md` (`<provenance_reconciliation>`, explicit mismatch acknowledgement)
|
|
1891
|
+
- `bin/lib/provenance.mjs`
|
|
1892
|
+
- `tests/phase.test.cjs`, `tests/gsdd.guards.test.cjs`, `tests/gsdd.invariants.test.cjs`
|
|
1893
|
+
- External: GitHub Docs on checking branch divergence and working tree state; OpenAI/Anthropic guidance on grounding agent actions in current tool-observed state rather than conversational assumptions
|
|
1894
|
+
|
|
1895
|
+
**Consequences:**
|
|
1896
|
+
- Resume is now conservative by design when a checkpoint narrative is stale relative to the live branch/worktree.
|
|
1897
|
+
- Future workflows that route from checkpoint state must preserve the same truth separation instead of flattening narrative, planning, and git state into one status line.
|
|
1898
|
+
- Phase 22 must replay the 2026-04-12 incident and prove this separation holds end-to-end.
|
|
1899
|
+
|
|
1900
|
+
**GSD comparison:** GSD's flow relies more heavily on the operator and commit discipline to keep resume context aligned with branch truth. GSDD keeps the lighter-weight continuity surface, but compensates by making the truth split explicit inside the resume workflow.
|
|
1901
|
+
|
|
1902
|
+
**GSDD implementation:** `distilled/workflows/pause.md`, `distilled/workflows/resume.md`, `bin/lib/provenance.mjs`, `.planning/SPEC.md`, `.planning/ROADMAP.md`, `.internal-research/TODO.md`, `tests/phase.test.cjs`, `tests/gsdd.guards.test.cjs`, `tests/gsdd.invariants.test.cjs`
|
|
1903
|
+
|
|
1904
|
+
---
|
|
1905
|
+
|
|
1906
|
+
## D44 - Warning-First Transition Safety And Fail-Closed Terminal Writes
|
|
1907
|
+
|
|
1908
|
+
**Decision (2026-04-13):** GSDD uses one warning-first provenance pattern across transition-sensitive workflows, while terminal artifact gates fail closed when the required durable output does not exist on disk.
|
|
1909
|
+
|
|
1910
|
+
**Context:**
|
|
1911
|
+
- Phase 20 needed a single transition-safety posture for `pause`, `resume`, `plan`, `execute`, `new-milestone`, `quick`, and `complete-milestone` instead of each workflow inventing its own git-risk language.
|
|
1912
|
+
- The same failure chain also exposed a different class of problem: terminal workflows could present closure-like outcomes even when the required durable artifact was missing.
|
|
1913
|
+
- D38 previously accepted retroactive artifact enforcement for an older closure gap. The new failure mode is narrower and higher leverage: terminal verification and milestone audit must not present durable completion outcomes without their mandatory artifacts.
|
|
1914
|
+
|
|
1915
|
+
**Decision:**
|
|
1916
|
+
- Transition-sensitive workflows share one warning pattern for:
|
|
1917
|
+
- staged, unstaged, and untracked work
|
|
1918
|
+
- unpushed commits
|
|
1919
|
+
- PR-less integration surfaces
|
|
1920
|
+
- stale/spent branches relative to `main`
|
|
1921
|
+
- mixed-scope working trees
|
|
1922
|
+
- These conditions are warning-first by default. They should inform routing and user acknowledgement, not become blanket hard blockers.
|
|
1923
|
+
- Two terminal write gates fail closed under `LAUNCH-13`:
|
|
1924
|
+
- `verify.md` must not advance ROADMAP closure on a passed result unless the required `SUMMARY.md` still exists on disk
|
|
1925
|
+
- `audit-milestone.md` must not present a durable audit result unless `MILESTONE-AUDIT.md` was written successfully
|
|
1926
|
+
- This slice does not introduce managed worktree orchestration or a new public provenance command.
|
|
1927
|
+
|
|
1928
|
+
**Why this fits the codebase:**
|
|
1929
|
+
- Warning-first delivery preserves GSDD's portable, advisory git stance instead of turning the kernel into an intrusive branch manager.
|
|
1930
|
+
- Fail-closed write gates are justified here because verification and milestone audit are terminal state transitions. If their durable artifact is missing, the claimed state transition is not trustworthy.
|
|
1931
|
+
- Keeping the gate narrow avoids reopening D38 into a broad CLI policy layer.
|
|
1932
|
+
|
|
1933
|
+
**Evidence:**
|
|
1934
|
+
- `.planning/SPEC.md` `LAUNCH-12` and `LAUNCH-13`
|
|
1935
|
+
- `.planning/ROADMAP.md` Phase 20 and Phase 22 scope notes
|
|
1936
|
+
- `distilled/workflows/plan.md`, `execute.md`, `quick.md`, `new-milestone.md`, `complete-milestone.md`
|
|
1937
|
+
- `distilled/workflows/verify.md`, `distilled/workflows/audit-milestone.md`
|
|
1938
|
+
- `bin/lib/provenance.mjs`
|
|
1939
|
+
- `tests/gsdd.guards.test.cjs`, `tests/gsdd.invariants.test.cjs`, `tests/gsdd.scenarios.test.cjs`
|
|
1940
|
+
- External: NIST detective vs preventive control framing; GitHub guidance on protected branches and review signals as advisory integration metadata rather than direct truth
|
|
1941
|
+
|
|
1942
|
+
**Consequences:**
|
|
1943
|
+
- Workflow routing can warn consistently about risky integration surfaces without forcing managed branch behavior before launch.
|
|
1944
|
+
- Terminal audit/verification claims now depend on durable write success, not just conversational success.
|
|
1945
|
+
- Phase 22 proof scope expands to cover both provenance warnings and fail-closed terminal writes.
|
|
1946
|
+
|
|
1947
|
+
**GSD comparison:** GSD relies more on explicit commit and CLI discipline for transition safety. GSDD continues to strip that rigidity from the portable core, but adds explicit warning reuse and narrow fail-closed gates where launch trust depends on artifact presence.
|
|
1948
|
+
|
|
1949
|
+
**GSDD implementation:** `distilled/workflows/plan.md`, `distilled/workflows/execute.md`, `distilled/workflows/quick.md`, `distilled/workflows/new-milestone.md`, `distilled/workflows/complete-milestone.md`, `distilled/workflows/verify.md`, `distilled/workflows/audit-milestone.md`, `bin/lib/provenance.mjs`, `.planning/SPEC.md`, `.planning/ROADMAP.md`, `tests/gsdd.guards.test.cjs`, `tests/gsdd.invariants.test.cjs`, `tests/gsdd.scenarios.test.cjs`
|
|
1950
|
+
|
|
1951
|
+
---
|
|
1952
|
+
|
|
1953
|
+
## D45 - Fork-Honest Launch Posture Before Identity Migration
|
|
1954
|
+
|
|
1955
|
+
**Decision (2026-04-15):** GSDD keeps a fork-honest launch posture until package, workspace, help, proof, and release surfaces are migrated together. `Workspine` is the active public-name target in planning truth, but do not present an independent product identity as already complete while the operative contracts remain `gsdd-cli`, `gsdd`, `gsdd-*`, and `.planning/`.
|
|
1956
|
+
|
|
1957
|
+
**Context:**
|
|
1958
|
+
- The v1.1 launch jury split repo truth into two layers: the core delivery kernel is real, but the public release surface still over-relied on internal and gitignored proof.
|
|
1959
|
+
- The next-milestone challenge pass found that `.planning/` is not a cheap cosmetic constant. It is a deep runtime, workflow, template, and test contract across the framework repo.
|
|
1960
|
+
- The same pass also found that a split public-name story layered on top of `gsdd-cli` / `gsdd` / `.planning` made the product look more independent than the install, workspace, and proof surfaces could honestly support.
|
|
1961
|
+
|
|
1962
|
+
**Decision:**
|
|
1963
|
+
- v1.2.0 is scoped as **fork-honest launch hardening**, not as an independent rename milestone.
|
|
1964
|
+
- `Workspine` is the primary public product name in planning truth for v1.2.0, but it is not yet a full package/workspace/help contract migration.
|
|
1965
|
+
- Keep `.planning`, `gsdd-cli`, `gsdd`, and `gsdd-*` intentionally in the active launch contract.
|
|
1966
|
+
- Remove or demote independent-brand assumptions from planning and public-surface truth until a dedicated migration milestone proves the full blast radius is handled.
|
|
1967
|
+
- Treat identity migration as real engineering work across code, docs, help text, generated surfaces, tests, and release packaging — not as copy cleanup.
|
|
1968
|
+
- Keep the release-floor packaging story repo-tracked and inspectable: package metadata, tarball audit, `SECURITY.md`, and repo-owned release automation must align without relying on unpublished release artifacts or broader runtime-parity claims.
|
|
1969
|
+
|
|
1970
|
+
**Why this fits the codebase:**
|
|
1971
|
+
- It preserves the already-shipped repo-native kernel and avoids turning a launch-hardening milestone into a hidden workspace/package migration.
|
|
1972
|
+
- It keeps product truth aligned with what the repo can actually prove today.
|
|
1973
|
+
- It narrows the next milestone to the highest-leverage launch debt: public identity coherence, public proof export, packaging truth, and post-archive routing integrity.
|
|
1974
|
+
|
|
1975
|
+
**Evidence:**
|
|
1976
|
+
- `.planning/SPEC.md` v1.2.0 active requirements and current-state posture
|
|
1977
|
+
- `.planning/ROADMAP.md` v1.2.0 Phase 23-27 ownership
|
|
1978
|
+
- `.internal-research/TODO.md` active milestone notes
|
|
1979
|
+
- `.internal-research/gaps.md` `I39`
|
|
1980
|
+
- `.internal-research/release-jury-verdict-2026-04-15.md`
|
|
1981
|
+
- `.internal-research/release-jury-public-truth-drift-2026-04-15.md`
|
|
1982
|
+
- `.internal-research/public-release-two-layer-brief-2026-04-15.md`
|
|
1983
|
+
- `get-shit-done/workflows/progress.md` (GSD's archived-state heuristic still assumes ROADMAP removal, which is one reason GSDD must be explicit when it diverges)
|
|
1984
|
+
|
|
1985
|
+
**Consequences:**
|
|
1986
|
+
- Public launch work must make proof inspectable from tracked/public artifacts instead of citing `.planning/` or `.internal-research/`.
|
|
1987
|
+
- `Northline` is retired as the default launch-facing brand direction; `Workspine` is the only active public-name target in planning truth until later phases prove the tracked public surface can support it honestly.
|
|
1988
|
+
- If a future session wants independent identity, it should open a dedicated migration milestone rather than sneaking the blast radius into generic launch cleanup.
|
|
1989
|
+
- Release packaging and repo-owner surfaces must stay aligned to current repo truth. If a package/help/release workflow change would reintroduce stale owner residue or parity overstatement, treat that as fork-honest launch drift rather than as harmless metadata cleanup.
|
|
1990
|
+
|
|
1991
|
+
**GSD comparison:** GSD keeps identity and workflow contracts coupled; its archived-state routing still assumes the active roadmap disappears. GSDD is diverging on archive-state persistence, so it must also stay explicit and conservative about identity/proof claims rather than layering a cosmetic product rename on top of unresolved contract differences.
|
|
1992
|
+
|
|
1993
|
+
**GSDD implementation:** `.planning/SPEC.md`, `.planning/ROADMAP.md`, `.internal-research/TODO.md`, `.internal-research/gaps.md`, `.internal-research/lessons-learned.md`
|
|
1994
|
+
|
|
1995
|
+
---
|
|
1996
|
+
|
|
1997
|
+
## D46 - Archived Milestone Routing With Retained ROADMAP
|
|
1998
|
+
|
|
1999
|
+
**Decision (2026-04-15):** `gsdd-progress` must treat a retained `ROADMAP.md` as historical archive state when the current roadmap milestone/version has both a shipped ledger entry in `.planning/MILESTONES.md` and the matching archived milestone audit artifact. In that state, the workflow routes to `/gsdd-new-milestone` rather than back to `/gsdd-audit-milestone`.
|
|
2000
|
+
|
|
2001
|
+
**Context:**
|
|
2002
|
+
- GSDD now retains `ROADMAP.md` after milestone completion as a historical shipped-summary surface instead of deleting it at archive time.
|
|
2003
|
+
- The older `progress.md` logic still treated "between milestones" as equivalent to "SPEC exists while ROADMAP is absent", which matched the stricter GSD archive model but no longer matched current repo truth.
|
|
2004
|
+
- That created I39: the same archived milestone could satisfy "all phases complete" and get routed back into audit even though `.planning/SPEC.md` and `.internal-research/TODO.md` already treated the milestone as archived.
|
|
2005
|
+
|
|
2006
|
+
**Decision:**
|
|
2007
|
+
- Keep the audit-ready branch for milestones whose phases are all complete but which do not yet have archive evidence.
|
|
2008
|
+
- Detect the archived-with-`ROADMAP.md` state from the current roadmap milestone/version plus:
|
|
2009
|
+
- a shipped ledger entry for that same milestone in `.planning/MILESTONES.md`
|
|
2010
|
+
- the matching archived milestone audit artifact for that same milestone/version
|
|
2011
|
+
- Only when both pieces of archive evidence exist does `progress.md` route to `/gsdd-new-milestone`.
|
|
2012
|
+
- Earlier archived milestones in the ledger must not satisfy the route for the current roadmap milestone/version.
|
|
2013
|
+
|
|
2014
|
+
**Why this fits the codebase:**
|
|
2015
|
+
- It preserves the retained `ROADMAP.md` design without pretending that "all phases complete" always means "run audit again".
|
|
2016
|
+
- It keeps the routing decision grounded in durable truth surfaces that already exist, rather than inventing a new milestone-state file.
|
|
2017
|
+
- It narrows the change to the high-frequency handoff seam and leaves milestone audit behavior intact for not-yet-archived milestones.
|
|
2018
|
+
|
|
2019
|
+
**Evidence:**
|
|
2020
|
+
- `.internal-research/gaps.md` `I39`
|
|
2021
|
+
- `.planning/MILESTONES.md`
|
|
2022
|
+
- `.planning/v1.1-MILESTONE-AUDIT.md`
|
|
2023
|
+
- `distilled/workflows/progress.md`
|
|
2024
|
+
- `tests/gsdd.guards.test.cjs`
|
|
2025
|
+
- `tests/gsdd.scenarios.test.cjs`
|
|
2026
|
+
- `tests/gsdd.health.test.cjs`
|
|
2027
|
+
- GSD comparison source: `get-shit-done/workflows/progress.md` (between-milestones routing still tied to ROADMAP absence)
|
|
2028
|
+
|
|
2029
|
+
**Consequences:**
|
|
2030
|
+
- Post-archive progress routing now depends on explicit archive evidence, not on `ROADMAP.md` deletion.
|
|
2031
|
+
- Health truth can stay strict: W9/W10 clear because repo truth is aligned, not because the checker semantics were weakened.
|
|
2032
|
+
- Future milestone-lifecycle changes that retain or restore historical roadmap files must preserve the current-milestone archive-evidence check.
|
|
2033
|
+
|
|
2034
|
+
**GSDD implementation:** `distilled/workflows/progress.md`, `.planning/MILESTONES.md`, `.planning/v1.1-MILESTONE-AUDIT.md`, `.internal-research/gaps.md`, `tests/gsdd.guards.test.cjs`, `tests/gsdd.scenarios.test.cjs`, `tests/gsdd.health.test.cjs`
|
|
2035
|
+
|
|
2036
|
+
---
|
|
2037
|
+
|
|
2038
|
+
## D47 - Brownfield Quick-Win Repair
|
|
2039
|
+
|
|
2040
|
+
**Decision (2026-04-16):** Keep the existing workflow set, but repair the brownfield contract end to end so the same story holds in docs, workflow routing, and progress reporting.
|
|
2041
|
+
|
|
2042
|
+
**Context:**
|
|
2043
|
+
- The earlier brownfield fix (D39) made `map-codebase -> quick` explicit, but the full user journey still had three contradictions:
|
|
2044
|
+
- public docs still over-taught `new-project` or implied users must always start brownfield work with `map-codebase`
|
|
2045
|
+
- `quick.md` depended on codebase maps when present but had no documented just-enough fallback when maps were absent
|
|
2046
|
+
- `progress.md` still treated codebase-only or quick-only repos as "no artifacts", so `map-codebase -> quick -> progress` was not a coherent lane
|
|
2047
|
+
- The user explicitly chose a quick win over a heavier product redesign: repair the existing lane now, and record the larger enterprise middle-lane question as follow-on work.
|
|
2048
|
+
|
|
2049
|
+
**Decision:**
|
|
2050
|
+
- `gsdd-new-project` remains the full initializer for greenfield work, fuzzy brownfield scope, or milestone-shaped work. It owns brownfield codebase mapping internally when the deeper baseline is needed.
|
|
2051
|
+
- `gsdd-quick` is now the documented bounded brownfield lane. It reuses `.planning/codebase/*` when present and otherwise builds a just-enough inline brownfield baseline from stable repo-root surfaces before planning.
|
|
2052
|
+
- `gsdd-map-codebase` remains the deeper orientation pass for unfamiliar or higher-risk brownfield repos. It is optional before `quick`, not a mandatory first step for every existing repo.
|
|
2053
|
+
- `gsdd-progress` keeps the same six route branches, but Branch F is broadened into a general non-phase state branch that covers:
|
|
2054
|
+
- between milestones
|
|
2055
|
+
- codebase-only brownfield state
|
|
2056
|
+
- quick-lane-only brownfield state
|
|
2057
|
+
- The heavier "durable enterprise middle lane" problem is explicitly deferred rather than being smuggled into `quick`.
|
|
2058
|
+
|
|
2059
|
+
**Why this shape:** The highest-leverage failure was contract drift, not missing workflow count. Repairing the existing lane preserves the current architecture, minimizes new surface area, and removes the onboarding contradiction without prematurely inventing a durable change-management workflow.
|
|
2060
|
+
|
|
2061
|
+
**Tradeoff:** This is intentionally not the full middle-lane redesign. `quick` is stronger and clearer now, but it still stays optimized for bounded work. Long-lived ticket/PBI continuity remains an explicit deferred product decision instead of silent scope creep inside `quick`.
|
|
2062
|
+
|
|
2063
|
+
**Evidence:**
|
|
2064
|
+
- `.planning/SPEC.md` `DX-03` and `BROWNFIELD-01`
|
|
2065
|
+
- `distilled/workflows/quick.md`
|
|
2066
|
+
- `distilled/workflows/progress.md`
|
|
2067
|
+
- `distilled/workflows/new-project.md`
|
|
2068
|
+
- `distilled/workflows/map-codebase.md`
|
|
2069
|
+
- `README.md`
|
|
2070
|
+
- `docs/USER-GUIDE.md`
|
|
2071
|
+
- `distilled/README.md`
|
|
2072
|
+
- `tests/gsdd.guards.test.cjs`
|
|
2073
|
+
- `tests/gsdd.scenarios.test.cjs`
|
|
2074
|
+
- `.internal-research/gaps.md` (`I43`)
|
|
2075
|
+
|
|
2076
|
+
**Consequences:**
|
|
2077
|
+
- New consumers no longer need to be told "always start with new-project, then maybe map-codebase, then maybe quick" for bounded brownfield work.
|
|
2078
|
+
- Brownfield onboarding, workflow routing, and status reporting now move together as one contract.
|
|
2079
|
+
- Any future change to brownfield entry must update the docs, workflow contracts, and status routing together instead of treating them as separate concerns.
|
|
2080
|
+
|
|
2081
|
+
**GSD comparison:** GSD keeps brownfield posture closer to the full initialization flow after mapping. GSDD now preserves that full path, but also treats bounded-change brownfield work as a first-class documented lane without adding a new workflow surface.
|
|
2082
|
+
|
|
2083
|
+
**GSDD implementation:** `distilled/workflows/quick.md`, `distilled/workflows/progress.md`, `distilled/workflows/new-project.md`, `distilled/workflows/map-codebase.md`, `README.md`, `docs/USER-GUIDE.md`, `distilled/README.md`, `tests/gsdd.guards.test.cjs`, `tests/gsdd.scenarios.test.cjs`, `.planning/SPEC.md`, `.internal-research/TODO.md`, `.internal-research/gaps.md`, `.internal-research/lessons-learned.md`
|
|
2084
|
+
|
|
2085
|
+
---
|
|
2086
|
+
|
|
2087
|
+
## D48 - Shared Lifecycle Evaluator And Dual-Canonical Runtime Boundary
|
|
2088
|
+
|
|
2089
|
+
**Decision (2026-04-16):** Phase and milestone posture should be derived through one shared evaluator over existing repo artifacts, while runtime-surface truth should use a dual-canonical contract that explicitly separates authored workflow source from the generated Codex-consumed surface until deterministic freshness checks exist.
|
|
2090
|
+
|
|
2091
|
+
**Context:**
|
|
2092
|
+
- v1.3.0 Phase 29 audited two different claim seams that had been conflated in planning truth:
|
|
2093
|
+
- lifecycle-state derivation from `SPEC.md`, `ROADMAP.md`, `MILESTONES.md`, phase artifacts, audit artifacts, and provenance
|
|
2094
|
+
- Codex/runtime-surface truth across `distilled/workflows/*` and generated `.agents/skills/*`
|
|
2095
|
+
- `bin/lib/health.mjs` and `bin/lib/health-truth.mjs` both carried overlapping lifecycle parsing logic, which made ENGINE-02 weaker than the docs suggested.
|
|
2096
|
+
- At the same time, the repo could not honestly keep saying there was one tracked canonical Codex/runtime surface, because `.agents/` is still ignored and the consumed runtime boundary can drift from the authored source boundary.
|
|
2097
|
+
|
|
2098
|
+
**Decision:**
|
|
2099
|
+
- Introduce one shared lifecycle evaluator seam for phase and milestone posture and make downstream health/reporting code consume it instead of maintaining competing parsers.
|
|
2100
|
+
- Keep lifecycle evaluation repo-truth-only: it reads existing planning artifacts plus provenance inputs and does not introduce a new project-scoped state file.
|
|
2101
|
+
- Narrow the runtime story to a **dual-canonical** contract:
|
|
2102
|
+
- `distilled/workflows/*` is the authored source contract
|
|
2103
|
+
- generated `.agents/skills/*` is the consumed Codex runtime surface
|
|
2104
|
+
- Treat deterministic freshness enforcement across authored and generated surfaces as later work, not as something Phase 29 can imply without proof.
|
|
2105
|
+
|
|
2106
|
+
**Why this fits the codebase:**
|
|
2107
|
+
- It matches the repo's existing architecture bias toward file-backed truth and shared helper enforcement instead of workflow-local prose.
|
|
2108
|
+
- It separates two different hardening seams cleanly: state derivation and runtime freshness.
|
|
2109
|
+
- It preserves the portable-core model without pretending generated runtime surfaces are already tracked or freshness-enforced when repo truth cannot prove that yet.
|
|
2110
|
+
|
|
2111
|
+
**Evidence:**
|
|
2112
|
+
- `.planning/SPEC.md` `ENGINE-01`, `ENGINE-02`, and `ENGINE-05`
|
|
2113
|
+
- `.planning/ROADMAP.md` Phases 29 and 32
|
|
2114
|
+
- `.internal-research/TODO.md`
|
|
2115
|
+
- `.internal-research/gaps.md` `I42`
|
|
2116
|
+
- `bin/lib/lifecycle-state.mjs`
|
|
2117
|
+
- `bin/lib/health.mjs`
|
|
2118
|
+
- `bin/lib/health-truth.mjs`
|
|
2119
|
+
- `tests/phase.test.cjs`
|
|
2120
|
+
- `tests/gsdd.health.test.cjs`
|
|
2121
|
+
- `tests/gsdd.guards.test.cjs`
|
|
2122
|
+
- GSD comparison source: `get-shit-done/workflows/progress.md` still assumes workflow-local routing logic rather than a shared lifecycle evaluator seam, so this is an intentional GSDD tightening.
|
|
2123
|
+
|
|
2124
|
+
**Consequences:**
|
|
2125
|
+
- Phase/milestone posture is now an engine seam with one evaluator, which later lifecycle gates can reuse directly.
|
|
2126
|
+
- Runtime-surface claims are more conservative immediately: the repo no longer needs to pretend one tracked canonical Codex surface exists before deterministic freshness enforcement is real.
|
|
2127
|
+
- Phase 32 now owns authored/generated freshness enforcement explicitly instead of inheriting that work as vague follow-through from Phase 29.
|
|
2128
|
+
|
|
2129
|
+
**GSDD implementation:** `bin/lib/lifecycle-state.mjs`, `bin/lib/health.mjs`, `bin/lib/health-truth.mjs`, `.planning/SPEC.md`, `.planning/ROADMAP.md`, `.internal-research/TODO.md`, `.internal-research/gaps.md`, `tests/phase.test.cjs`, `tests/gsdd.health.test.cjs`, `tests/gsdd.guards.test.cjs`
|
|
2130
|
+
|
|
2131
|
+
---
|
|
2132
|
+
|
|
2133
|
+
## D49 - Deterministic Lifecycle Preflight Gates
|
|
2134
|
+
|
|
2135
|
+
**Decision (2026-04-16):** Transition-sensitive lifecycle surfaces must derive eligibility from one deterministic preflight seam layered over the shared lifecycle evaluator, while `gsdd phase-status` remains the only explicit ROADMAP mutator and `progress` remains read-only.
|
|
2136
|
+
|
|
2137
|
+
**Context:**
|
|
2138
|
+
- Phase 29 centralized lifecycle posture into `bin/lib/lifecycle-state.mjs`, but the transition-sensitive workflows still described eligibility in workflow-local prose.
|
|
2139
|
+
- That left three risks open:
|
|
2140
|
+
- command entrypoints could grow a second lifecycle parser
|
|
2141
|
+
- transition-sensitive workflows could silently drift into inconsistent blockers or mutation rules
|
|
2142
|
+
- the read-only / owned-write / explicit-lifecycle-mutation split could blur again in docs or helpers
|
|
2143
|
+
- Phase 30 was explicitly scoped to turn the shared evaluator seam into deterministic preflight enforcement without widening into Phase 31 evidence typing or Phase 32 freshness enforcement.
|
|
2144
|
+
|
|
2145
|
+
**Decision:**
|
|
2146
|
+
- Add `bin/lib/lifecycle-preflight.mjs` as the single deterministic gate for lifecycle-sensitive workflow entry surfaces.
|
|
2147
|
+
- Keep the preflight seam descriptive and repo-truth-based:
|
|
2148
|
+
- it consumes the shared lifecycle evaluator
|
|
2149
|
+
- it reports blockers, owned writes, mutation expectations, and lifecycle posture
|
|
2150
|
+
- it does not mutate ROADMAP or milestone state itself
|
|
2151
|
+
- Keep `gsdd phase-status` as the only explicit ROADMAP mutator for phase-state transitions.
|
|
2152
|
+
- Require transition-sensitive workflow contracts to call the shared preflight seam instead of narrating their own lifecycle inference.
|
|
2153
|
+
- Preserve `progress` as read-only and make it explicitly defer any recommended transition back to the downstream workflow's own preflight gate.
|
|
2154
|
+
|
|
2155
|
+
**Why this fits the codebase:**
|
|
2156
|
+
- It extends the existing file-backed engine model rather than adding a new state artifact or hidden control plane.
|
|
2157
|
+
- It reuses the shared evaluator introduced in D48 instead of tolerating another lifecycle interpretation seam.
|
|
2158
|
+
- It keeps mutation boundaries honest: descriptive evaluation, owned artifact writes, and explicit lifecycle mutation remain separate responsibilities.
|
|
2159
|
+
|
|
2160
|
+
**Evidence:**
|
|
2161
|
+
- `.planning/SPEC.md` (`ENGINE-01`, `ENGINE-02`, `ENGINE-03`)
|
|
2162
|
+
- `.planning/ROADMAP.md` (Phase 30 success criteria)
|
|
2163
|
+
- `bin/lib/lifecycle-preflight.mjs`
|
|
2164
|
+
- `bin/lib/lifecycle-state.mjs`
|
|
2165
|
+
- `bin/gsdd.mjs`
|
|
2166
|
+
- `distilled/workflows/execute.md`
|
|
2167
|
+
- `distilled/workflows/verify.md`
|
|
2168
|
+
- `distilled/workflows/audit-milestone.md`
|
|
2169
|
+
- `distilled/workflows/complete-milestone.md`
|
|
2170
|
+
- `distilled/workflows/new-milestone.md`
|
|
2171
|
+
- `distilled/workflows/resume.md`
|
|
2172
|
+
- `distilled/workflows/progress.md`
|
|
2173
|
+
- `tests/phase.test.cjs`
|
|
2174
|
+
- `tests/gsdd.guards.test.cjs`
|
|
2175
|
+
- `tests/gsdd.scenarios.test.cjs`
|
|
2176
|
+
- GSD comparison source: `get-shit-done/workflows/progress.md` still keeps lifecycle routing inside the workflow surface rather than through a shared helper seam, so this is an intentional GSDD tightening.
|
|
2177
|
+
|
|
2178
|
+
**Consequences:**
|
|
2179
|
+
- Illegal transitions and missing prerequisite artifacts can now fail closed from one helper seam instead of from drifting prompt-local logic.
|
|
2180
|
+
- `progress` can continue reporting lifecycle posture without inheriting write authority or becoming a hidden transition surface.
|
|
2181
|
+
- Phase 31 can build evidence-gated closure on top of a stable deterministic preflight contract instead of competing lifecycle entry logic.
|
|
2182
|
+
|
|
2183
|
+
**GSDD implementation:** `bin/lib/lifecycle-preflight.mjs`, `bin/lib/lifecycle-state.mjs`, `bin/gsdd.mjs`, `bin/lib/init.mjs`, `distilled/workflows/execute.md`, `distilled/workflows/verify.md`, `distilled/workflows/audit-milestone.md`, `distilled/workflows/complete-milestone.md`, `distilled/workflows/new-milestone.md`, `distilled/workflows/resume.md`, `distilled/workflows/progress.md`, `tests/phase.test.cjs`, `tests/gsdd.guards.test.cjs`, `tests/gsdd.scenarios.test.cjs`
|
|
2184
|
+
|
|
2185
|
+
---
|
|
2186
|
+
|
|
2187
|
+
## D50 - Evidence-Gated Closure Matrix
|
|
2188
|
+
|
|
2189
|
+
**Decision (2026-04-17):** Closure-sensitive lifecycle surfaces must share one compact evidence matrix keyed by workflow surface and delivery posture, using the fixed evidence kinds `code`, `test`, `runtime`, `delivery`, and `human`.
|
|
2190
|
+
|
|
2191
|
+
**Context:**
|
|
2192
|
+
- Phase 30 hardened lifecycle eligibility, but the closure surfaces still described proof in mismatched ways:
|
|
2193
|
+
- `verify.md` still used the older four-proof vocabulary
|
|
2194
|
+
- `audit-milestone.md` aggregated phase outcomes but did not record a shared closure posture
|
|
2195
|
+
- `complete-milestone.md` trusted a passed audit without checking whether the audit had actually proven the right kind of evidence for repo-only versus delivery-sensitive closeout
|
|
2196
|
+
- That created two opposite failure modes:
|
|
2197
|
+
- repo-only work could feel pressured to fabricate runtime or delivery proof just to satisfy prose
|
|
2198
|
+
- delivery-sensitive closure could pass on code inspection, tests, or human commentary alone even when the claim required runtime and delivery proof
|
|
2199
|
+
|
|
2200
|
+
**Decision:**
|
|
2201
|
+
- Add `bin/lib/evidence-contract.mjs` as the shared internal closure-evidence seam.
|
|
2202
|
+
- Fix the stable evidence kinds to `code`, `test`, `runtime`, `delivery`, and `human`.
|
|
2203
|
+
- Key the matrix by both:
|
|
2204
|
+
- closure surface (`verify`, `audit-milestone`, `complete-milestone`)
|
|
2205
|
+
- delivery posture (`repo_only`, `delivery_sensitive`)
|
|
2206
|
+
- Make `verify` record the selected delivery posture plus required, observed, and missing evidence kinds in its report contract.
|
|
2207
|
+
- Make `audit-milestone` aggregate the same evidence posture and fail closed when required kinds remain missing.
|
|
2208
|
+
- Make `complete-milestone` consume the audit's evidence contract instead of silently trusting a passed audit that lacks the required closure evidence.
|
|
2209
|
+
|
|
2210
|
+
**Why this fits the codebase:**
|
|
2211
|
+
- It follows the repo's existing pattern of small shared helpers plus file-backed workflow contracts instead of adding another freeform prompt convention.
|
|
2212
|
+
- It keeps repo-only work honest without pretending every closure needs runtime or delivery proof.
|
|
2213
|
+
- It raises the bar only where the claim itself is stronger: shipped or externally consumed outcomes now pay the stronger evidence cost explicitly.
|
|
2214
|
+
- It keeps the matrix internal and compact rather than inventing a second public mini-language for closure semantics.
|
|
2215
|
+
|
|
2216
|
+
**Evidence:**
|
|
2217
|
+
- `.planning/SPEC.md` (`ENGINE-04`, `VERIFY-01`)
|
|
2218
|
+
- `.planning/ROADMAP.md` (Phase 31 success criteria)
|
|
2219
|
+
- `bin/lib/evidence-contract.mjs`
|
|
2220
|
+
- `bin/lib/lifecycle-preflight.mjs`
|
|
2221
|
+
- `distilled/workflows/verify.md`
|
|
2222
|
+
- `distilled/workflows/audit-milestone.md`
|
|
2223
|
+
- `distilled/workflows/complete-milestone.md`
|
|
2224
|
+
- `tests/phase.test.cjs`
|
|
2225
|
+
- `tests/gsdd.guards.test.cjs`
|
|
2226
|
+
- `tests/gsdd.scenarios.test.cjs`
|
|
2227
|
+
- GSD comparison sources: `agents/_archive/gsd-verifier.md` and `agents/_archive/gsd-integration-checker.md` preserve outcome verification and integration audit, but they do not expose one typed closure matrix shared across phase verification, milestone audit, and milestone completion.
|
|
2228
|
+
|
|
2229
|
+
**Consequences:**
|
|
2230
|
+
- Closure-sensitive workflows now share one stable evidence vocabulary instead of drifting between proof synonyms.
|
|
2231
|
+
- Repo-only closures can stay repo-only without invented runtime theatrics.
|
|
2232
|
+
- Delivery-sensitive closure now has an explicit fail-closed bar: missing `runtime` or `delivery` evidence cannot be papered over by prose, code-only review, or human confirmation alone.
|
|
2233
|
+
- Milestone completion inherits the same evidence posture proven by audit, which reduces false-positive closure on technically incomplete release claims.
|
|
2234
|
+
|
|
2235
|
+
**GSDD implementation:** `bin/lib/evidence-contract.mjs`, `bin/lib/lifecycle-preflight.mjs`, `distilled/workflows/verify.md`, `distilled/workflows/audit-milestone.md`, `distilled/workflows/complete-milestone.md`, `.planning/SPEC.md`, `tests/phase.test.cjs`, `tests/gsdd.guards.test.cjs`, `tests/gsdd.scenarios.test.cjs`
|
|
2236
|
+
|
|
2237
|
+
---
|
|
2238
|
+
|
|
2239
|
+
## D51 - Deterministic Runtime Surface Freshness
|
|
2240
|
+
**Decision (2026-04-17):** Installed generated runtime-facing surfaces are trustworthy only through deterministic rendering from the authored workflow and delegate sources. When .agents/skills/, .claude/, .opencode/, or .codex/ exist locally, gsdd health must compare those generated files against current render output and route any drift back through gsdd update.
|
|
2241
|
+
**Context:**
|
|
2242
|
+
- Phase 29 narrowed the runtime story to a dual-canonical boundary: distilled/workflows/* is the authored source contract and generated runtime-facing files are the consumed local surfaces.
|
|
2243
|
+
- That narrowing was honest but still left I42 open because the repo could not yet prove that installed generated files stayed aligned with the current authored source without reviewer memory.
|
|
2244
|
+
- The framework repo also cannot fail closed on missing generated surfaces, because those directories are intentionally gitignored and may be absent even when the authored source is healthy.
|
|
2245
|
+
**Decision:**
|
|
2246
|
+
- Add one shared renderer-backed helper for runtime-surface freshness rather than per-test or per-runtime drift logic.
|
|
2247
|
+
- Compare only installed runtime surfaces; absent generated roots stay non-issues until the runtime surface actually exists locally.
|
|
2248
|
+
- Route drift through deterministic repair (gsdd update or a targeted gsdd update --tools <runtime>) instead of treating the fix as a manual review exercise.
|
|
2249
|
+
- Keep the public/runtime-facing wording brief: the authored source stays canonical, generated files are trusted because they are rendered and checked, and parity language remains narrow where live validation still does not exist.
|
|
2250
|
+
**Why this fits the codebase:**
|
|
2251
|
+
- It extends the existing render/update/health pattern instead of inventing a new state file or hidden synchronization layer.
|
|
2252
|
+
- It keeps the dual-canonical runtime contract honest: authored source and consumed generated files are distinct surfaces, but the boundary is now mechanically checked where the generated surface is actually installed.
|
|
2253
|
+
- It preserves framework-source honesty by warning only on installed drift, not on intentionally absent generated directories.
|
|
2254
|
+
**Evidence:**
|
|
2255
|
+
- .planning/SPEC.md (ENGINE-05)
|
|
2256
|
+
- .planning/ROADMAP.md (Phase 32)
|
|
2257
|
+
- .internal-research/gaps.md (I42 closure)
|
|
2258
|
+
- in/lib/runtime-freshness.mjs
|
|
2259
|
+
- in/lib/health.mjs
|
|
2260
|
+
- in/lib/health-truth.mjs
|
|
2261
|
+
- in/lib/rendering.mjs
|
|
2262
|
+
- in/adapters/claude.mjs, in/adapters/opencode.mjs, in/adapters/codex.mjs
|
|
2263
|
+
- README.md, docs/RUNTIME-SUPPORT.md, distilled/README.md
|
|
2264
|
+
- ests/phase.test.cjs, ests/gsdd.health.test.cjs, ests/gsdd.plan.adapters.test.cjs, ests/gsdd.guards.test.cjs, ests/gsdd.scenarios.test.cjs
|
|
2265
|
+
**Consequences:**
|
|
2266
|
+
- gsdd health can now surface installed generated-surface drift as deterministic workspace truth instead of relying on review discipline.
|
|
2267
|
+
- gsdd update becomes the explicit repair path for authored/generated runtime-surface drift.
|
|
2268
|
+
- Public support wording can stay compact without implying that generated files are trustworthy merely because they were generated once.
|
|
2269
|
+
- Claude Code and Codex CLI remain the mandatory live/native validation floor for the hardened runtime boundary, while other runtimes stay honest about their proof level.
|
|
2270
|
+
**GSD comparison:** GSD keeps runtime-facing workflow surfaces closer to the Claude-authored source and does not have to model a generated multi-runtime freshness boundary explicitly. GSDD does, because authored workflow source and consumed runtime surfaces are intentionally separated.
|
|
2271
|
+
**GSDD implementation:** in/lib/runtime-freshness.mjs, in/lib/health.mjs, in/lib/health-truth.mjs, in/lib/rendering.mjs, in/adapters/claude.mjs, in/adapters/opencode.mjs, in/adapters/codex.mjs, README.md, docs/RUNTIME-SUPPORT.md, distilled/README.md, .planning/SPEC.md, .internal-research/TODO.md, .internal-research/gaps.md, ests/phase.test.cjs, ests/gsdd.health.test.cjs, ests/gsdd.plan.adapters.test.cjs, ests/gsdd.guards.test.cjs, ests/gsdd.scenarios.test.cjs
|
|
2272
|
+
|
|
2273
|
+
---
|
|
2274
|
+
|
|
2275
|
+
## D52 - Generic Checkpoint Routing Ownership
|
|
2276
|
+
|
|
2277
|
+
**Decision (2026-04-17):** Generic checkpoints remain visible continuity artifacts, but they do not block read-only `progress` routing. `resume` owns checkpoint cleanup only when the user explicitly resumes from the checkpoint, while `progress` treats a surviving generic checkpoint as informational context and continues routing toward the real next lifecycle action.
|
|
2278
|
+
|
|
2279
|
+
**Context:**
|
|
2280
|
+
- Phase 19 intentionally allowed `resume` to preserve a generic checkpoint when the user chose a different path, because generic checkpoints can carry real context without pretending to be an active phase or quick-task execution surface.
|
|
2281
|
+
- That same flexibility exposed a later contradiction: `progress` still treated any `.continue-here.md` as a Branch A reroute back to `/gsdd-resume`, so a generic checkpoint could create a `resume -> progress -> resume` loop even after `resume` had already surfaced the checkpoint and routed the user onward.
|
|
2282
|
+
- Phase 33 was scoped narrowly to repair that control-plane seam without inventing a new checkpoint artifact, a broader checkpoint-consumption protocol, or a heavier brownfield/middle-lane redesign.
|
|
2283
|
+
|
|
2284
|
+
**Decision:**
|
|
2285
|
+
- Add one shared checkpoint-routing classification seam in `bin/lib/provenance.mjs`:
|
|
2286
|
+
- `phase` and `quick` checkpoints are routing blockers
|
|
2287
|
+
- `generic` checkpoints are informational for read-only `progress` routing
|
|
2288
|
+
- checkpoint cleanup remains resume-owned when the user explicitly resumes from the checkpoint
|
|
2289
|
+
- Keep `resume` behavior unchanged in one important respect: generic checkpoints still surface their `next_action` and let the user decide whether to resume from them.
|
|
2290
|
+
- Change `progress` behavior explicitly:
|
|
2291
|
+
- show a generic checkpoint in the status block
|
|
2292
|
+
- surface its `next_action`
|
|
2293
|
+
- continue evaluating Branch B-F for the primary recommendation instead of routing back through Branch A
|
|
2294
|
+
- Regenerate the consumed skill surfaces from the authored workflow source so the portable contract and local runtime surface stay aligned.
|
|
2295
|
+
|
|
2296
|
+
**Why this fits the codebase:**
|
|
2297
|
+
- It preserves the existing checkpoint artifact model and the three-layer continuity boundary instead of inventing another state file or destructive auto-cleanup step.
|
|
2298
|
+
- It keeps `progress` read-only and avoids pushing reporting semantics into lifecycle preflight, which would blur the distinction between routing/reporting and mutation authorization.
|
|
2299
|
+
- It moves the ownership split into one small shared seam plus tests, so the rule is no longer dependent on remembering two different workflow wordings.
|
|
2300
|
+
|
|
2301
|
+
**Evidence:**
|
|
2302
|
+
- `.planning/SPEC.md` (`ENGINE-01`, `ENGINE-03`)
|
|
2303
|
+
- `.internal-research/gaps.md` (`I45`)
|
|
2304
|
+
- `bin/lib/provenance.mjs`
|
|
2305
|
+
- `distilled/workflows/resume.md`
|
|
2306
|
+
- `distilled/workflows/progress.md`
|
|
2307
|
+
- `.agents/skills/gsdd-resume/SKILL.md`
|
|
2308
|
+
- `.agents/skills/gsdd-progress/SKILL.md`
|
|
2309
|
+
- `tests/phase.test.cjs`
|
|
2310
|
+
- `tests/gsdd.guards.test.cjs`
|
|
2311
|
+
- `tests/gsdd.scenarios.test.cjs`
|
|
2312
|
+
- GSD comparison source: GSD session-routing surfaces assume the checkpoint itself is the dominant continuity signal. GSDD now keeps that behavior only for real execution checkpoints (`phase`, `quick`) and treats generic checkpoints as context once the user has already been routed onward.
|
|
2313
|
+
|
|
2314
|
+
**Consequences:**
|
|
2315
|
+
- A surviving generic checkpoint can coexist with milestone-close or next-phase guidance without forcing the user back into `/gsdd-resume`.
|
|
2316
|
+
- `resume` still owns the destructive checkpoint-cleanup step, which keeps cleanup tied to an explicit user choice rather than to a read-only reporter.
|
|
2317
|
+
- Future checkpoint lifecycle edits must update the shared provenance helper, the authored workflow contracts, the regenerated skill surfaces, and the regression suites together or the repo truth will drift immediately.
|
|
2318
|
+
|
|
2319
|
+
**GSDD implementation:** `bin/lib/provenance.mjs`, `distilled/workflows/resume.md`, `distilled/workflows/progress.md`, `.agents/skills/gsdd-resume/SKILL.md`, `.agents/skills/gsdd-progress/SKILL.md`, `.planning/SPEC.md`, `.internal-research/TODO.md`, `.internal-research/gaps.md`, `tests/phase.test.cjs`, `tests/gsdd.guards.test.cjs`, `tests/gsdd.scenarios.test.cjs`
|
|
2320
|
+
|
|
1637
2321
|
## Maintenance
|
|
1638
2322
|
|
|
1639
2323
|
This document is updated when:
|