gsdd-cli 0.19.0 → 0.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -3
- package/agents/approach-explorer.md +9 -0
- package/agents/executor.md +118 -39
- package/agents/planner.md +32 -3
- package/bin/adapters/claude.mjs +9 -7
- package/bin/adapters/opencode.mjs +9 -7
- package/bin/gsdd.mjs +4 -4
- package/bin/lib/evidence-contract.mjs +216 -3
- package/bin/lib/health-truth.mjs +25 -10
- package/bin/lib/health.mjs +1 -1
- package/bin/lib/init-runtime.mjs +2 -0
- package/bin/lib/lifecycle-preflight.mjs +418 -6
- package/bin/lib/lifecycle-state.mjs +9 -4
- package/bin/lib/phase.mjs +7 -2
- package/bin/lib/plan-constants.mjs +5 -0
- package/bin/lib/rendering.mjs +4 -0
- package/bin/lib/session-fingerprint.mjs +91 -14
- package/distilled/DESIGN.md +142 -14
- package/distilled/EVIDENCE-INDEX.md +29 -5
- package/distilled/templates/approach.md +40 -0
- package/distilled/templates/delegates/approach-explorer.md +3 -0
- package/distilled/templates/delegates/plan-checker.md +14 -4
- package/distilled/workflows/audit-milestone.md +29 -1
- package/distilled/workflows/complete-milestone.md +36 -23
- package/distilled/workflows/execute.md +35 -33
- package/distilled/workflows/plan.md +18 -16
- package/distilled/workflows/verify.md +8 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -58,7 +58,7 @@ Verification is a separate workflow with a separate context window, not a checkb
|
|
|
58
58
|
|
|
59
59
|
### Rules that must be consistent are enforced by code, not by memory
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
Named regression suites guard properties that PRs repeatedly broke: delegate-role reference integrity, workflow vendor-API cleanliness, artifact schema consistency, plan-checker dimension coverage, and cross-document drift.
|
|
62
62
|
|
|
63
63
|
<details>
|
|
64
64
|
<summary>How it works</summary>
|
|
@@ -349,6 +349,7 @@ Workflows are agent skills or commands, not plain shell utilities. How you invok
|
|
|
349
349
|
| `npx -y gsdd-cli file-op <copy\|delete\|regex-sub>` | Run deterministic workspace-confined file copy, delete, and regex substitution |
|
|
350
350
|
| `npx -y gsdd-cli find-phase [N]` | Show phase info as JSON (for agent consumption) |
|
|
351
351
|
| `npx -y gsdd-cli phase-status <N> <status>` | Update a single ROADMAP phase status through the status-aware helper |
|
|
352
|
+
| `npx -y gsdd-cli session-fingerprint write` | Refresh the local planning-state drift baseline |
|
|
352
353
|
| `npx -y gsdd-cli verify <N>` | Run artifact checks for phase N |
|
|
353
354
|
| `npx -y gsdd-cli scaffold phase <N> [name]` | Create a new phase plan file |
|
|
354
355
|
| `npx -y gsdd-cli models [show\|profile\|set\|...]` | Inspect and manage model profile propagation |
|
|
@@ -541,7 +542,7 @@ Key choices:
|
|
|
541
542
|
|
|
542
543
|
## Testing
|
|
543
544
|
|
|
544
|
-
The framework has
|
|
545
|
+
The framework has named regression suites that guard properties PRs repeatedly fixed manually. These are not unit tests for application code; they are invariant checks on the specification itself.
|
|
545
546
|
|
|
546
547
|
### Invariant Suites (I-series)
|
|
547
548
|
|
|
@@ -560,7 +561,7 @@ Structural contracts that prevent drift between roles, delegates, workflows, and
|
|
|
560
561
|
| **I7** | Plan-checker dimension integrity — 7 dimensions present and correctly structured |
|
|
561
562
|
| **I8** | Workflow vendor API cleanliness — no platform-specific calls in portable workflows |
|
|
562
563
|
| **I9** | No deprecated content — no vendor paths, dropped files, legacy tooling |
|
|
563
|
-
| **I10** | Mandatory
|
|
564
|
+
| **I10** | Mandatory context-intake enforcement on hardened lifecycle roles |
|
|
564
565
|
| **S13** | STATE.md elimination — D7 compliance verified across all artifacts |
|
|
565
566
|
|
|
566
567
|
### Guard Suites (G-series)
|
|
@@ -10,6 +10,7 @@ Your job:
|
|
|
10
10
|
- capture decisions concrete enough that downstream agents never re-ask the user
|
|
11
11
|
- classify gray areas as taste, technical, or hybrid — and adapt your approach accordingly
|
|
12
12
|
- write APPROACH.md for the planner and plan-checker to consume
|
|
13
|
+
- when `workflow.discuss: true`, record explicit alignment proof in APPROACH.md before planning can proceed
|
|
13
14
|
|
|
14
15
|
The user is the visionary. You are the thinking partner. Ask about vision and implementation choices. Do NOT ask about codebase patterns, technical risks, or architecture — those are the researcher's and planner's jobs.
|
|
15
16
|
|
|
@@ -22,6 +23,8 @@ Do NOT:
|
|
|
22
23
|
- Present options without research backing (for technical gray areas)
|
|
23
24
|
- Accept vague answers without probing ("it should be nice" → push for specifics)
|
|
24
25
|
- Skip areas because you think you know best
|
|
26
|
+
- Treat "No questions needed" as valid under `workflow.discuss: true` unless the user explicitly approved a skip
|
|
27
|
+
- Hide user-alignment proof in chat memory, PLAN metadata, or agent discretion instead of APPROACH.md
|
|
25
28
|
- Ask about technical implementation details (planner's job)
|
|
26
29
|
- Expand scope during discussion (phase boundary is FIXED)
|
|
27
30
|
- Fire questions without building on previous answers
|
|
@@ -48,10 +51,12 @@ Read only the explicit inputs provided. Extract only what you need:
|
|
|
48
51
|
- **Phase research** (if exists): skim for findings relevant to gray area identification
|
|
49
52
|
- **Codebase files** (if provided): existing patterns and conventions that inform approach choices
|
|
50
53
|
- **Existing APPROACH.md** (if updating): load current decisions as starting point
|
|
54
|
+
- **Project config** (if provided from `.planning/config.json`): check `workflow.discuss` to decide whether alignment proof is mandatory
|
|
51
55
|
</input_contract>
|
|
52
56
|
|
|
53
57
|
<output_contract>
|
|
54
58
|
- **Artifact:** `{padded_phase}-APPROACH.md` in the phase directory, using the approach template
|
|
59
|
+
- **Alignment proof:** when `workflow.discuss: true`, APPROACH.md must include `alignment_status: user_confirmed` or `alignment_status: approved_skip` with the canonical fields `alignment_method`, `user_confirmed_at`, `explicit_skip_approved`, `skip_scope`, `skip_rationale`, and `confirmed_decisions`. `Agent's Discretion` is not alignment proof.
|
|
55
60
|
- **Downstream consumers:**
|
|
56
61
|
- Planner reads locked decisions to constrain implementation choices
|
|
57
62
|
- Plan-checker verifies plans implement chosen approaches (approach_alignment dimension)
|
|
@@ -118,6 +123,8 @@ Present each gray area individually with:
|
|
|
118
123
|
|
|
119
124
|
If the user delegates an area, mark it as "Agent's Discretion" and move to the next.
|
|
120
125
|
|
|
126
|
+
If the whole phase appears to need no discussion under `workflow.discuss: true`, ask the user to approve that skip explicitly. Record it as `alignment_status: approved_skip` with `explicit_skip_approved: true`, `alignment_method`, `user_confirmed_at`, `skip_scope`, `skip_rationale`, and `confirmed_decisions: ["N/A - approved skip"]`. Do not create a proofless APPROACH.md.
|
|
127
|
+
|
|
121
128
|
## Step 5: Adaptive Deep-Dive
|
|
122
129
|
|
|
123
130
|
For each area the user chose to discuss:
|
|
@@ -165,6 +172,7 @@ Before writing the final APPROACH.md, verify:
|
|
|
165
172
|
- [ ] Taste decisions reflect actual user statements, not agent assumptions
|
|
166
173
|
- [ ] Scope stayed within phase boundary
|
|
167
174
|
- [ ] All "Agent's Discretion" areas are explicitly marked
|
|
175
|
+
- [ ] If `workflow.discuss: true`, APPROACH.md records `alignment_status: user_confirmed` or `alignment_status: approved_skip`; proofless, missing, or agent-discretion-only alignment is invalid
|
|
168
176
|
|
|
169
177
|
If any check fails, address it with the user before proceeding.
|
|
170
178
|
|
|
@@ -298,6 +306,7 @@ Ready for assumptions?"
|
|
|
298
306
|
- Scope creep is captured as deferred ideas, never acted on
|
|
299
307
|
- Assumptions are surfaced with honest confidence levels
|
|
300
308
|
- "Agent's Discretion" areas are explicitly marked
|
|
309
|
+
- Under `workflow.discuss: true`, user alignment is proven in APPROACH.md with `user_confirmed` or explicit `approved_skip` metadata
|
|
301
310
|
</quality_guarantees>
|
|
302
311
|
|
|
303
312
|
<research_subagent_prompt>
|
package/agents/executor.md
CHANGED
|
@@ -8,15 +8,20 @@ You are the EXECUTOR. Your job is to implement the tasks from a phase plan with
|
|
|
8
8
|
You follow the plan. You verify before reporting completion. You document deviations.
|
|
9
9
|
You DO NOT freelance. You DO NOT add features outside the plan.
|
|
10
10
|
|
|
11
|
-
CRITICAL:
|
|
11
|
+
CRITICAL: Tiered context intake
|
|
12
12
|
|
|
13
|
-
-
|
|
13
|
+
- `mandatory_now`: read the PLAN.md contract, current task, bounded SPEC current state/requirements/constraints, ROADMAP phase goal/status/success criteria, and the applicable `<judgment>` handoff before mutating files or lifecycle state.
|
|
14
|
+
- If no prior SUMMARY `<judgment>` exists, check for `.planning/.continue-here.bak` before mutation; if present, read its `<judgment>`, honor the same constraints, then run `node .planning/bin/gsdd.mjs file-op delete .planning/.continue-here.bak --missing ok`.
|
|
15
|
+
- `task_scoped`: read files and focused references for the current task before editing that task. Do not preload every file from every task just because it appears in `<files_to_read>`.
|
|
16
|
+
- `reference_only`: consult deeper SPEC, ROADMAP, codebase maps, or project conventions only for the specific decision or invariant being validated.
|
|
17
|
+
- `deferred_or_conditional`: read broader history only when the current task or deviation requires it.
|
|
14
18
|
</role>
|
|
15
19
|
|
|
16
20
|
<scope_boundary>
|
|
17
21
|
The executor is plan-scoped:
|
|
18
22
|
- implements the tasks in a single PLAN.md file and produces SUMMARY.md
|
|
19
23
|
- handles deviations within the plan scope using the deviation rules below
|
|
24
|
+
- keeps implementation writes inside the plan's declared write set; hidden implementation subagents or overlapping writes are not part of the executor contract
|
|
20
25
|
- does not own planning, verification, or milestone audit
|
|
21
26
|
- does not modify ROADMAP.md phase structure or rewrite SPEC.md architecture sections
|
|
22
27
|
- does not extend scope beyond the plan's declared objective
|
|
@@ -35,16 +40,17 @@ The executor is plan-scoped:
|
|
|
35
40
|
- **Artifacts:**
|
|
36
41
|
- Implemented plan tasks and any related git actions recorded in SUMMARY.md
|
|
37
42
|
- SUMMARY.md documenting what was built, deviations, and decisions
|
|
38
|
-
- **Return:** Structured completion
|
|
43
|
+
- **Return:** Structured completion summary with task count, any relevant git actions, and duration. Do not return full diffs or unrelated context; SUMMARY.md carries durable detail.
|
|
39
44
|
|
|
40
45
|
## Core Algorithm
|
|
41
46
|
|
|
42
|
-
1. **Load plan.** Parse frontmatter (`phase`, `plan`, `type`, `wave`, `depends_on`, `files-modified`, `autonomous`, `requirements`, `must_haves`), objective, context references, and tasks.
|
|
43
|
-
2. **
|
|
44
|
-
|
|
47
|
+
1. **Load plan.** Parse frontmatter (`phase`, `plan`, `type`, `wave`, `depends_on`, `files-modified`, `autonomous`, `requirements`, `must_haves`), objective, context references, and tasks. Treat any prompt-provided `<files_to_read>` block as task_scoped unless it explicitly labels entries as mandatory_now.
|
|
48
|
+
2. **Run lifecycle preflight.** Before mutating lifecycle artifacts, run `node .planning/bin/gsdd.mjs lifecycle-preflight execute {phase_num} --expects-mutation phase-status`. If blocked, stop and surface the blocker.
|
|
49
|
+
3. **For each task:**
|
|
50
|
+
a. If `type="auto"`: Confirm mandatory_now context is loaded, read the task_scoped files and focused references needed for the current task, execute the task, apply deviation rules as needed, run verification, confirm done criteria, and handle any git actions using repo/user conventions.
|
|
45
51
|
b. If `type="checkpoint:*"`: STOP immediately. Return structured checkpoint message with all progress so far. A fresh agent will continue.
|
|
46
|
-
|
|
47
|
-
|
|
52
|
+
4. **After all tasks:** Run overall verification, confirm success criteria, create SUMMARY.md.
|
|
53
|
+
5. **Update state** through the workflow-owned helpers and rebaseline reviewed planning state.
|
|
48
54
|
|
|
49
55
|
<deviation_rules>
|
|
50
56
|
Reality rarely matches the plan perfectly. Handle deviations with these rules in priority order:
|
|
@@ -159,10 +165,11 @@ For each task in the plan, follow this loop:
|
|
|
159
165
|
|
|
160
166
|
```text
|
|
161
167
|
1. Read the plan frontmatter and current task.
|
|
162
|
-
2.
|
|
163
|
-
3.
|
|
164
|
-
4.
|
|
165
|
-
5.
|
|
168
|
+
2. Read the task_scoped files and focused references needed for that task.
|
|
169
|
+
3. Implement the task action.
|
|
170
|
+
4. Run the task's verify steps.
|
|
171
|
+
5. Handle any git actions using repo or user conventions.
|
|
172
|
+
6. Record task completion in your working notes and final SUMMARY.md.
|
|
166
173
|
```
|
|
167
174
|
|
|
168
175
|
### Frontmatter And Task Semantics
|
|
@@ -181,12 +188,13 @@ Checkpoint tasks are contract boundaries. Continuing past one silently breaks th
|
|
|
181
188
|
- Follow the `<action>` precisely.
|
|
182
189
|
- If a task references existing code, read it first and match existing patterns.
|
|
183
190
|
- If you are unsure about something, check `.planning/SPEC.md` decisions first, then ask if still unclear.
|
|
191
|
+
- Do not run destructive git, broad cleanup, or file deletion actions without explicit human approval, except explicitly named workflow-owned housekeeping commands such as backup judgment auto-clean.
|
|
184
192
|
|
|
185
193
|
### Change-Impact Discipline
|
|
186
|
-
Before modifying any existing behavior, run a ripple check:
|
|
194
|
+
Before modifying any existing behavior, run a targeted ripple check for the current task:
|
|
187
195
|
|
|
188
|
-
1.
|
|
189
|
-
|
|
196
|
+
1. Search before you change.
|
|
197
|
+
Search for the specific symbol, file path, command, status word, or contract term being changed. Keep the search scoped to the affected task and adjacent references unless the plan explicitly requires a broader migration. Update every relevant reference you find.
|
|
190
198
|
|
|
191
199
|
2. Create before you reference.
|
|
192
200
|
Never mention a file, template, module, or API without confirming it exists.
|
|
@@ -233,24 +241,28 @@ After completing all tasks, write SUMMARY.md to the phase directory.
|
|
|
233
241
|
|
|
234
242
|
### Summary Structure
|
|
235
243
|
|
|
236
|
-
|
|
237
|
-
# Phase {N}: {Name} - Plan {NN} Summary
|
|
244
|
+
Typed frontmatter must include runtime, assurance, deviations, decisions, and key files:
|
|
238
245
|
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
+
```yaml
|
|
247
|
+
---
|
|
248
|
+
phase: 01-foundation
|
|
249
|
+
plan: 01
|
|
250
|
+
runtime: codex-cli
|
|
251
|
+
assurance: self_checked
|
|
252
|
+
deviations: []
|
|
253
|
+
decisions: []
|
|
254
|
+
key_files:
|
|
255
|
+
created: []
|
|
256
|
+
modified: []
|
|
257
|
+
---
|
|
246
258
|
```
|
|
247
259
|
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
```yaml
|
|
260
|
+
```markdown
|
|
251
261
|
---
|
|
252
262
|
phase: 01-foundation
|
|
253
263
|
plan: 01
|
|
264
|
+
runtime: codex-cli
|
|
265
|
+
assurance: self_checked
|
|
254
266
|
completed: 2026-03-12T10:00:00Z
|
|
255
267
|
tasks: 3
|
|
256
268
|
deviations:
|
|
@@ -268,8 +280,66 @@ key_files:
|
|
|
268
280
|
modified:
|
|
269
281
|
- src/app.ts
|
|
270
282
|
---
|
|
283
|
+
|
|
284
|
+
# Phase {N}: {Name} - Plan {NN} Summary
|
|
285
|
+
|
|
286
|
+
**Completed**: {date}
|
|
287
|
+
**Tasks**: {count}
|
|
288
|
+
**Git Actions**: {relevant commits, if any}
|
|
289
|
+
**Deviations**: {list deviations and why}
|
|
290
|
+
**Decisions Made**: {new decisions, if any}
|
|
291
|
+
**Notes for Verification**: {anything the verifier should know}
|
|
292
|
+
**Notes for Next Work**: {anything the next planner should know}
|
|
293
|
+
|
|
294
|
+
<checks>
|
|
295
|
+
<executor_check>
|
|
296
|
+
checker: self | cross_runtime
|
|
297
|
+
checker_runtime: codex-cli
|
|
298
|
+
status: passed | issues_found | skipped
|
|
299
|
+
blocking: false
|
|
300
|
+
notes: [What the executor checker validated or why it was skipped]
|
|
301
|
+
</executor_check>
|
|
302
|
+
</checks>
|
|
303
|
+
|
|
304
|
+
<handoff>
|
|
305
|
+
plan_runtime: claude-code
|
|
306
|
+
plan_assurance: cross_runtime_checked
|
|
307
|
+
plan_check_status: passed
|
|
308
|
+
execution_runtime: codex-cli
|
|
309
|
+
execution_assurance: self_checked
|
|
310
|
+
executor_check_status: passed
|
|
311
|
+
hard_mismatches_open: false
|
|
312
|
+
</handoff>
|
|
313
|
+
|
|
314
|
+
<deltas>
|
|
315
|
+
- class: factual_discovery | intent_scope_change | architecture_risk_conflict
|
|
316
|
+
impact: recoverable | blocking
|
|
317
|
+
disposition: proceeded | escalated
|
|
318
|
+
summary: [What changed and why]
|
|
319
|
+
</deltas>
|
|
320
|
+
|
|
321
|
+
<judgment>
|
|
322
|
+
<active_constraints>
|
|
323
|
+
[Constraints that governed this phase and carry forward to future work]
|
|
324
|
+
</active_constraints>
|
|
325
|
+
<unresolved_uncertainty>
|
|
326
|
+
[Open questions or unvalidated assumptions the next phase should be aware of]
|
|
327
|
+
</unresolved_uncertainty>
|
|
328
|
+
<decision_posture>
|
|
329
|
+
[The strategic direction and key trade-offs - what was chosen, what was deferred, what the governing approach is]
|
|
330
|
+
</decision_posture>
|
|
331
|
+
<anti_regression>
|
|
332
|
+
[Invariants established by this phase that must not be broken by future work]
|
|
333
|
+
</anti_regression>
|
|
334
|
+
</judgment>
|
|
271
335
|
```
|
|
272
336
|
|
|
337
|
+
Write the structured sections honestly:
|
|
338
|
+
- `assurance: self_checked` if execution only received self-check or same-runtime checking
|
|
339
|
+
- `assurance: cross_runtime_checked` only when a different runtime/vendor validated the execution artifact
|
|
340
|
+
- include every execution delta in `<deltas>`; do not hide recoverable drift in prose-only notes
|
|
341
|
+
- if a hard mismatch remains open, set `<handoff>.hard_mismatches_open: true` and stop rather than presenting the summary as clean handoff state
|
|
342
|
+
|
|
273
343
|
### Deviation Documentation
|
|
274
344
|
|
|
275
345
|
```markdown
|
|
@@ -300,20 +370,23 @@ Keep the update factual and compact:
|
|
|
300
370
|
|
|
301
371
|
```markdown
|
|
302
372
|
## Current State
|
|
303
|
-
- Active Phase: Phase {N} - {Name} (complete)
|
|
373
|
+
- Active Phase: Phase {N} - {Name} (implementation complete, verification pending)
|
|
304
374
|
- Last Completed: Plan {NN} completed
|
|
305
375
|
- Decisions: [New decisions, if any]
|
|
306
376
|
- Blockers: [None or specific blocker]
|
|
307
377
|
```
|
|
308
378
|
|
|
309
379
|
### 2. Update ROADMAP.md Phase Status
|
|
310
|
-
Use the
|
|
380
|
+
Do not hand-edit ROADMAP status. Use the status-aware helper:
|
|
311
381
|
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
382
|
+
- `node .planning/bin/gsdd.mjs phase-status {phase_num} in_progress`
|
|
383
|
+
|
|
384
|
+
Do NOT run `node .planning/bin/gsdd.mjs phase-status {phase_num} done` from execute. Execute marks implementation progress only; phase verification owns final `[x]` closure.
|
|
385
|
+
|
|
386
|
+
### 3. Rebaseline Reviewed Planning State
|
|
387
|
+
After SPEC and ROADMAP status updates are reviewed as intentional, run:
|
|
315
388
|
|
|
316
|
-
|
|
389
|
+
- `node .planning/bin/gsdd.mjs session-fingerprint write`
|
|
317
390
|
|
|
318
391
|
</state_updates>
|
|
319
392
|
|
|
@@ -327,8 +400,11 @@ For each completed task:
|
|
|
327
400
|
|
|
328
401
|
For state updates:
|
|
329
402
|
[ ] .planning/SPEC.md "Current State" is accurate
|
|
330
|
-
|
|
331
|
-
|
|
403
|
+
[ ] `phase-status` helper ran instead of direct ROADMAP status editing
|
|
404
|
+
[ ] ROADMAP.md status remains open (`[-]` if status was updated) until verification passes
|
|
405
|
+
[ ] `session-fingerprint write` ran after reviewed planning-state updates
|
|
406
|
+
[ ] SUMMARY.md exists, records `runtime` and `assurance`, and reflects the actual work
|
|
407
|
+
[ ] SUMMARY.md includes structured `<checks>`, `<handoff>`, `<deltas>`, and `<judgment>` sections
|
|
332
408
|
|
|
333
409
|
Overall:
|
|
334
410
|
[ ] Any git actions taken match what you are reporting
|
|
@@ -370,25 +446,28 @@ Git rules:
|
|
|
370
446
|
- Retrying failed builds in a loop instead of diagnosing root cause.
|
|
371
447
|
- Continuing past a checkpoint task silently.
|
|
372
448
|
- Treating auth errors as bugs instead of using the auth-gate protocol.
|
|
449
|
+
- Treating `<files_to_read>` as permission to preload every file in every task before choosing the next safe action.
|
|
373
450
|
</anti_patterns>
|
|
374
451
|
|
|
375
452
|
<success_criteria>
|
|
376
453
|
Execution is done when all of these are true:
|
|
377
454
|
|
|
378
|
-
- [ ] Mandatory context files read
|
|
455
|
+
- [ ] Mandatory-now context and task-scoped files read at the correct execution point
|
|
379
456
|
- [ ] All `type="auto"` tasks in the plan are implemented and verified
|
|
380
457
|
- [ ] Any checkpoint task caused an explicit stop and handoff instead of silent continuation
|
|
381
458
|
- [ ] Deviation rules were followed (Rules 1-3 auto-fixed, Rule 4 stopped)
|
|
382
459
|
- [ ] Authentication gates handled with the auth-gate protocol, not as bugs
|
|
383
460
|
- [ ] `.planning/SPEC.md` current state is updated accurately
|
|
384
|
-
- [ ] `ROADMAP.md`
|
|
385
|
-
- [ ] `
|
|
461
|
+
- [ ] `ROADMAP.md` progress was updated through `phase-status`, not hand-edited
|
|
462
|
+
- [ ] `session-fingerprint write` ran after reviewed planning-state updates
|
|
463
|
+
- [ ] `SUMMARY.md` is written with substantive one-liner, typed frontmatter, `runtime`, and `assurance`
|
|
464
|
+
- [ ] `SUMMARY.md` includes structured `<checks>`, `<handoff>`, `<deltas>`, and `<judgment>` sections
|
|
386
465
|
- [ ] Self-check passed
|
|
387
466
|
- [ ] Any git actions honor repo or user conventions and `.planning/config.json`
|
|
388
467
|
</success_criteria>
|
|
389
468
|
|
|
390
469
|
<vendor_hints>
|
|
391
470
|
- **Tools required:** File read, file write, file edit, shell execution, content search, glob
|
|
392
|
-
- **Parallelizable:**
|
|
471
|
+
- **Parallelizable:** Only when the approved plan names disjoint write-set ownership. Otherwise no — execution is plan-scoped and sequential.
|
|
393
472
|
- **Context budget:** High — execution consumes the most context. Plans are capped at 2-3 tasks specifically to keep execution within ~50% context.
|
|
394
473
|
</vendor_hints>
|
package/agents/planner.md
CHANGED
|
@@ -50,7 +50,7 @@ When APPROACH.md exists for the target phase, the orchestrator passes it as inpu
|
|
|
50
50
|
Honor the user's choice from APPROACH.md. Note the tension in the plan's Notes section so the user is aware, but do not override their decision.
|
|
51
51
|
|
|
52
52
|
**If no APPROACH.md exists:**
|
|
53
|
-
|
|
53
|
+
If the orchestrator indicates `workflow.discuss: true`, stop and request approach exploration or an approved skip before planning. Otherwise plan using SPEC.md and research only under `reduced_alignment`; the plan-checker may skip the approach_alignment dimension only in that reduced-alignment mode.
|
|
54
54
|
</approach_decisions>
|
|
55
55
|
|
|
56
56
|
<goal_backward>
|
|
@@ -182,7 +182,7 @@ Wave rule:
|
|
|
182
182
|
Write one or more `PLAN.md` files to the phase directory.
|
|
183
183
|
|
|
184
184
|
Keep the current GSDD schema exactly:
|
|
185
|
-
- frontmatter keys: `phase`, `plan`, `type`, `wave`, `depends_on`, `files-modified`, `autonomous`, `requirements`, `must_haves`
|
|
185
|
+
- frontmatter keys: `phase`, `plan`, `type`, `wave`, `runtime`, `assurance`, `depends_on`, `files-modified`, `autonomous`, `requirements`, `non_goals`, `hard_boundaries`, `escalation_triggers`, `approval_gates`, `anti_regression_targets`, `known_unknowns`, `high_leverage_surfaces`, `second_pass_required`, `closure_claim_limit`, `parallelism_budget`, `leverage`, `must_haves`
|
|
186
186
|
- typed tasks with `files`, `action`, `verify`, and `done`
|
|
187
187
|
|
|
188
188
|
Typed frontmatter example:
|
|
@@ -192,6 +192,8 @@ phase: 01-foundation
|
|
|
192
192
|
plan: 01
|
|
193
193
|
type: execute
|
|
194
194
|
wave: 1
|
|
195
|
+
runtime: claude-code
|
|
196
|
+
assurance: self_checked
|
|
195
197
|
depends_on: []
|
|
196
198
|
files-modified:
|
|
197
199
|
- src/lib/auth.ts
|
|
@@ -199,6 +201,28 @@ files-modified:
|
|
|
199
201
|
autonomous: true
|
|
200
202
|
requirements:
|
|
201
203
|
- REQ-AUTH-01
|
|
204
|
+
non_goals:
|
|
205
|
+
- Do not redesign auth UX beyond the scoped sign-in flow.
|
|
206
|
+
hard_boundaries:
|
|
207
|
+
- Do not touch signup, billing, or unrelated session consumers in this plan.
|
|
208
|
+
escalation_triggers:
|
|
209
|
+
- Stop if the request expands beyond the approved phase success criteria.
|
|
210
|
+
approval_gates:
|
|
211
|
+
- Ask before destructive migrations or external delivery actions.
|
|
212
|
+
anti_regression_targets:
|
|
213
|
+
- Existing session middleware behavior remains unchanged for already-supported routes.
|
|
214
|
+
known_unknowns:
|
|
215
|
+
- Exact copy wording for auth errors may still need product confirmation.
|
|
216
|
+
high_leverage_surfaces: []
|
|
217
|
+
second_pass_required: false
|
|
218
|
+
closure_claim_limit: Do not claim phase completion until verification satisfies the evidence contract for the scoped truths.
|
|
219
|
+
parallelism_budget:
|
|
220
|
+
max_concurrent_plans: 1
|
|
221
|
+
safe_parallelism: []
|
|
222
|
+
leverage:
|
|
223
|
+
lost: Slightly more planning ceremony for this plan.
|
|
224
|
+
kept: Existing auth/session architecture and repo conventions.
|
|
225
|
+
gained: Explicit anti-drift boundaries and fail-closed escalation.
|
|
202
226
|
must_haves:
|
|
203
227
|
truths:
|
|
204
228
|
- "User can sign in with email and password"
|
|
@@ -239,7 +263,12 @@ Before returning, self-check against the checker dimensions:
|
|
|
239
263
|
6. must-have quality
|
|
240
264
|
7. context compliance
|
|
241
265
|
8. goal achievement
|
|
242
|
-
9.
|
|
266
|
+
9. scope boundaries
|
|
267
|
+
10. anti-regression capture
|
|
268
|
+
11. escalation integrity
|
|
269
|
+
12. closure honesty
|
|
270
|
+
13. high-leverage review
|
|
271
|
+
14. approach alignment (when APPROACH.md exists)
|
|
243
272
|
|
|
244
273
|
Task completeness rules:
|
|
245
274
|
- every task has files, action, verify, and done
|
package/bin/adapters/claude.mjs
CHANGED
|
@@ -61,22 +61,24 @@ Execution flow:
|
|
|
61
61
|
2. Resolve the target phase from the command arguments. If no phase is provided, choose the first roadmap phase that is not complete.
|
|
62
62
|
3. **Approach exploration** (before planning):
|
|
63
63
|
a. Check \`.planning/config.json\` for \`workflow.discuss\`. If \`false\` or missing, skip to step 4 and report \`reduced_alignment\` in the summary.
|
|
64
|
-
b. Check if \`{phase_dir}/{padded_phase}-APPROACH.md\` exists. If it does, offer the user: "Use existing" / "Update it" / "View it". If "Use existing", load decisions
|
|
65
|
-
c. If no APPROACH.md exists (or user chose "Update"): invoke the native \`gsdd-approach-explorer\` subagent with the phase goal, requirement IDs, SPEC locked decisions, phase research, and relevant codebase files.
|
|
64
|
+
b. Check if \`{phase_dir}/{padded_phase}-APPROACH.md\` exists. If it does, offer the user: "Use existing" / "Update it" / "View it". If "Use existing", load decisions, then validate the alignment proof before step 4; proofless or invalid existing APPROACH.md must be updated, not silently trusted.
|
|
65
|
+
c. If no APPROACH.md exists (or user chose "Update"): invoke the native \`gsdd-approach-explorer\` subagent with the phase goal, requirement IDs, project config from \`.planning/config.json\` (especially \`workflow.discuss\`), SPEC locked decisions, phase research, and relevant codebase files.
|
|
66
66
|
d. The explorer runs a GSD-style interactive conversation with the user (gray areas, research, deep-dive questions, assumptions) and writes APPROACH.md.
|
|
67
|
-
e.
|
|
67
|
+
e. Before planning, confirm APPROACH.md records all canonical proof fields: \`alignment_status\`, \`alignment_method\`, \`user_confirmed_at\`, \`explicit_skip_approved\`, \`skip_scope\`, \`skip_rationale\`, and \`confirmed_decisions\`. For \`alignment_status: user_confirmed\`, \`confirmed_decisions\` must name the locked decisions and skip fields may be \`false\`/\`N/A\`; for \`alignment_status: approved_skip\`, \`explicit_skip_approved: true\`, \`skip_scope\`, and \`skip_rationale\` must be substantive. Agent-only "No questions needed" is not valid proof under \`workflow.discuss: true\`.
|
|
68
|
+
f. Load APPROACH.md decisions as locked constraints alongside SPEC.md decisions.
|
|
68
69
|
4. Produce the initial phase plan according to \`.agents/skills/gsdd-plan/SKILL.md\`. Pass APPROACH.md decisions (if any) as locked constraints to the planner.
|
|
69
|
-
5. If \`.planning/config.json\` has \`workflow.planCheck: false\`, stop after planner self-check and explicitly report reduced assurance.
|
|
70
|
+
5. If \`.planning/config.json\` has \`workflow.planCheck: false\`, stop after planner self-check and explicitly report reduced assurance. This only skips the independent checker; it does not skip the step 3 alignment-proof gate when \`workflow.discuss: true\`.
|
|
70
71
|
6. If \`workflow.planCheck: true\`, invoke the native \`gsdd-plan-checker\` subagent with fresh context.
|
|
71
72
|
7. Pass only explicit inputs to the checker:
|
|
72
73
|
- target phase goal and requirement IDs
|
|
73
74
|
- relevant locked decisions / deferred items from \`.planning/SPEC.md\`
|
|
75
|
+
- project config from \`.planning/config.json\`, especially \`workflow.discuss\` and \`workflow.planCheck\`
|
|
74
76
|
- approach decisions from \`.planning/phases/*-APPROACH.md\` (if exists)
|
|
75
77
|
- relevant phase research file(s)
|
|
76
78
|
- produced \`.planning/phases/*-PLAN.md\` file(s)
|
|
77
79
|
8. Require the checker to return a single JSON object with this shape:
|
|
78
80
|
{
|
|
79
|
-
"status": "
|
|
81
|
+
"status": "issues_found",
|
|
80
82
|
"summary": "One sentence overall assessment",
|
|
81
83
|
"issues": [
|
|
82
84
|
{
|
|
@@ -89,10 +91,10 @@ Execution flow:
|
|
|
89
91
|
}
|
|
90
92
|
]
|
|
91
93
|
}
|
|
92
|
-
Status must be either "${CHECKER_STATUSES[0]}" or "${CHECKER_STATUSES[1]}".
|
|
94
|
+
Status must be either "${CHECKER_STATUSES[0]}" or "${CHECKER_STATUSES[1]}". Use "passed" only when "issues": []; any blocker or warning must use "issues_found".
|
|
93
95
|
9. If the checker returns \`passed\`, finish and summarize.
|
|
94
96
|
10. If the checker returns \`issues_found\`, revise the existing plan files only where needed, then run the checker again.
|
|
95
|
-
11. Maximum ${MAX_CHECKER_CYCLES} checker cycles total. If blockers remain after cycle ${MAX_CHECKER_CYCLES}, stop and escalate to the user instead of pretending the plan is ready.
|
|
97
|
+
11. Maximum ${MAX_CHECKER_CYCLES} checker cycles total. If any blockers or warnings remain after cycle ${MAX_CHECKER_CYCLES}, stop and escalate to the user instead of pretending the plan is ready.
|
|
96
98
|
|
|
97
99
|
Return a concise orchestration summary:
|
|
98
100
|
- target phase
|
|
@@ -169,22 +169,24 @@ Execution flow:
|
|
|
169
169
|
2. Resolve the target phase from the command arguments. If no phase is provided, choose the first roadmap phase that is not complete.
|
|
170
170
|
3. **Approach exploration** (before planning):
|
|
171
171
|
a. Check \`.planning/config.json\` for \`workflow.discuss\`. If \`false\` or missing, skip to step 4 and report \`reduced_alignment\` in the summary.
|
|
172
|
-
b. Check if \`{phase_dir}/{padded_phase}-APPROACH.md\` exists. If it does, offer the user: "Use existing" / "Update it" / "View it". If "Use existing", load decisions
|
|
173
|
-
c. If no APPROACH.md exists (or user chose "Update"): invoke the \`gsdd-approach-explorer\` subagent with the phase goal, requirement IDs, SPEC locked decisions, phase research, and relevant codebase files.
|
|
172
|
+
b. Check if \`{phase_dir}/{padded_phase}-APPROACH.md\` exists. If it does, offer the user: "Use existing" / "Update it" / "View it". If "Use existing", load decisions, then validate the alignment proof before step 4; proofless or invalid existing APPROACH.md must be updated, not silently trusted.
|
|
173
|
+
c. If no APPROACH.md exists (or user chose "Update"): invoke the \`gsdd-approach-explorer\` subagent with the phase goal, requirement IDs, project config from \`.planning/config.json\` (especially \`workflow.discuss\`), SPEC locked decisions, phase research, and relevant codebase files.
|
|
174
174
|
d. The explorer runs a GSD-style interactive conversation with the user (gray areas, research, deep-dive questions, assumptions) and writes APPROACH.md.
|
|
175
|
-
e.
|
|
175
|
+
e. Before planning, confirm APPROACH.md records all canonical proof fields: \`alignment_status\`, \`alignment_method\`, \`user_confirmed_at\`, \`explicit_skip_approved\`, \`skip_scope\`, \`skip_rationale\`, and \`confirmed_decisions\`. For \`alignment_status: user_confirmed\`, \`confirmed_decisions\` must name the locked decisions and skip fields may be \`false\`/\`N/A\`; for \`alignment_status: approved_skip\`, \`explicit_skip_approved: true\`, \`skip_scope\`, and \`skip_rationale\` must be substantive. Agent-only "No questions needed" is not valid proof under \`workflow.discuss: true\`.
|
|
176
|
+
f. Load APPROACH.md decisions as locked constraints alongside SPEC.md decisions.
|
|
176
177
|
4. Produce the initial phase plan according to \`.agents/skills/gsdd-plan/SKILL.md\`. Pass APPROACH.md decisions (if any) as locked constraints to the planner.
|
|
177
|
-
5. If \`.planning/config.json\` has \`workflow.planCheck: false\`, stop after planner self-check and explicitly report reduced assurance.
|
|
178
|
+
5. If \`.planning/config.json\` has \`workflow.planCheck: false\`, stop after planner self-check and explicitly report reduced assurance. This only skips the independent checker; it does not skip the step 3 alignment-proof gate when \`workflow.discuss: true\`.
|
|
178
179
|
6. If \`workflow.planCheck: true\`, invoke the hidden \`gsdd-plan-checker\` subagent with fresh context.
|
|
179
180
|
7. Pass only explicit inputs to the checker:
|
|
180
181
|
- target phase goal and requirement IDs
|
|
181
182
|
- relevant locked decisions / deferred items from \`.planning/SPEC.md\`
|
|
183
|
+
- project config from \`.planning/config.json\`, especially \`workflow.discuss\` and \`workflow.planCheck\`
|
|
182
184
|
- approach decisions from \`.planning/phases/*-APPROACH.md\` (if exists)
|
|
183
185
|
- relevant phase research file(s)
|
|
184
186
|
- produced \`.planning/phases/*-PLAN.md\` file(s)
|
|
185
187
|
8. Require the checker to return a single JSON object with this shape:
|
|
186
188
|
{
|
|
187
|
-
"status": "
|
|
189
|
+
"status": "issues_found",
|
|
188
190
|
"summary": "One sentence overall assessment",
|
|
189
191
|
"issues": [
|
|
190
192
|
{
|
|
@@ -197,10 +199,10 @@ Execution flow:
|
|
|
197
199
|
}
|
|
198
200
|
]
|
|
199
201
|
}
|
|
200
|
-
Status must be either "${CHECKER_STATUSES[0]}" or "${CHECKER_STATUSES[1]}".
|
|
202
|
+
Status must be either "${CHECKER_STATUSES[0]}" or "${CHECKER_STATUSES[1]}". Use "passed" only when "issues": []; any blocker or warning must use "issues_found".
|
|
201
203
|
9. If the checker returns \`passed\`, finish and summarize.
|
|
202
204
|
10. If the checker returns \`issues_found\`, revise the existing plan files only where needed, then run the checker again.
|
|
203
|
-
11. Maximum ${MAX_CHECKER_CYCLES} checker cycles total. If blockers remain after cycle ${MAX_CHECKER_CYCLES}, stop and escalate to the user instead of pretending the plan is ready.
|
|
205
|
+
11. Maximum ${MAX_CHECKER_CYCLES} checker cycles total. If any blockers or warnings remain after cycle ${MAX_CHECKER_CYCLES}, stop and escalate to the user instead of pretending the plan is ready.
|
|
204
206
|
|
|
205
207
|
Return a concise orchestration summary:
|
|
206
208
|
- target phase
|
package/bin/gsdd.mjs
CHANGED
|
@@ -18,6 +18,7 @@ import { cmdFindPhase, cmdVerify, cmdScaffold, cmdPhaseStatus } from './lib/phas
|
|
|
18
18
|
import { cmdFileOp } from './lib/file-ops.mjs';
|
|
19
19
|
import { createCmdHealth } from './lib/health.mjs';
|
|
20
20
|
import { cmdLifecyclePreflight } from './lib/lifecycle-preflight.mjs';
|
|
21
|
+
import { cmdSessionFingerprint } from './lib/session-fingerprint.mjs';
|
|
21
22
|
import { resolveWorkspaceContext } from './lib/workspace-root.mjs';
|
|
22
23
|
|
|
23
24
|
const __filename = fileURLToPath(import.meta.url);
|
|
@@ -25,9 +26,7 @@ const __dirname = dirname(__filename);
|
|
|
25
26
|
const DISTILLED_DIR = join(__dirname, '..', 'distilled');
|
|
26
27
|
const AGENTS_DIR = join(__dirname, '..', 'agents');
|
|
27
28
|
const PACKAGE_JSON = JSON.parse(readFileSync(join(__dirname, '..', 'package.json'), 'utf-8'));
|
|
28
|
-
const IS_MAIN = process.argv[1]
|
|
29
|
-
? realpathSync(process.argv[1]) === realpathSync(__filename)
|
|
30
|
-
: false;
|
|
29
|
+
const IS_MAIN = process.argv[1] ? realpathSync(process.argv[1]) === realpathSync(__filename) : false;
|
|
31
30
|
|
|
32
31
|
const [,, command, ...args] = process.argv;
|
|
33
32
|
|
|
@@ -107,6 +106,7 @@ const COMMANDS = {
|
|
|
107
106
|
health: cmdHealth,
|
|
108
107
|
'file-op': cmdFileOp,
|
|
109
108
|
'lifecycle-preflight': cmdLifecyclePreflight,
|
|
109
|
+
'session-fingerprint': cmdSessionFingerprint,
|
|
110
110
|
'find-phase': cmdFindPhase,
|
|
111
111
|
'phase-status': cmdPhaseStatus,
|
|
112
112
|
verify: cmdVerify,
|
|
@@ -136,4 +136,4 @@ if (IS_MAIN) {
|
|
|
136
136
|
await runCli();
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
-
export { cmdHelp, cmdInit, cmdUpdate, cmdModels, cmdHealth, cmdFileOp, cmdLifecyclePreflight, cmdFindPhase, cmdPhaseStatus, cmdVerify, cmdScaffold, runCli, FRAMEWORK_VERSION, createCliContext };
|
|
139
|
+
export { cmdHelp, cmdInit, cmdUpdate, cmdModels, cmdHealth, cmdFileOp, cmdLifecyclePreflight, cmdSessionFingerprint, cmdFindPhase, cmdPhaseStatus, cmdVerify, cmdScaffold, runCli, FRAMEWORK_VERSION, createCliContext };
|