You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -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
-
1,381 tests across 13 test files 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.
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>
@@ -542,7 +542,7 @@ Key choices:
542
542
543
543
## Testing
544
544
545
-
The framework has 1,381 tests across 13 test files — named 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
+
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.
546
546
547
547
### Invariant Suites (I-series)
548
548
@@ -561,7 +561,7 @@ Structural contracts that prevent drift between roles, delegates, workflows, and
@@ -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: Mandatory initial read
11
+
CRITICAL: Tiered context intake
12
12
13
-
- If the prompt contains a `<files_to_read>` block, read every file listed there before performing any other actions. That is your primary context.
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 message with task count, any relevant git actions, and duration
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.
a. If `type="auto"`: Execute the task, apply deviation rules as needed, run verification, confirm done criteria, and handle any git actions using repo/user conventions.
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
-
3.**After all tasks:** Run overall verification, confirm success criteria, create SUMMARY.md.
47
-
4.**Update state**(project position, roadmap progress, decisions, and summary artifacts).
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. Implement the task action.
163
-
3. Run the task's verify steps.
164
-
4. Handle any git actions using repo or user conventions.
165
-
5. Record task completion in your working notes and final SUMMARY.md.
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.Grep before you change.
189
-
Update every relevant reference. Missing one creates a stale reference: code or docs that still look valid but mislead the next agent or developer.
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
-
```markdown
237
-
# Phase {N}: {Name} - Plan {NN} Summary
244
+
Typed frontmatter must include runtime, assurance, deviations, decisions, and key files:
238
245
239
-
**Completed**: {date}
240
-
**Tasks**: {count}
241
-
**Git Actions**: {relevant commits, if any}
242
-
**Deviations**: {list deviations and why}
243
-
**Decisions Made**: {new decisions, if any}
244
-
**Notes for Verification**: {anything the verifier should know}
245
-
**Notes for Next Work**: {anything the next planner should know}
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
-
### Typed Frontmatter Example
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]
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
-
If the phase is partially complete and more plans remain, use `[-]` instead of `[x]`.
Copy file name to clipboardExpand all lines: distilled/DESIGN.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -153,13 +153,13 @@ The same over-distillation pattern had also flattened `roadmapper.md`, `synthesi
153
153
154
154
**Executor leverage audit (2026-03-13):**
155
155
156
-
The executor was the last un-audited core lifecycle role. At 89 lines it was the most under-structured role contract in the system — no XML section boundaries, no mandatory initial read, no scope boundary, no typed output example, no auth-gate protocol, no completion checklist. The audit applied the same S12 hardening pattern.
156
+
The executor was the last un-audited core lifecycle role. At 89 lines it was the most under-structured role contract in the system — no XML section boundaries, no explicit context-intake tiers, no scope boundary, no typed output example, no auth-gate protocol, no completion checklist. The audit applied the same S12 hardening pattern.
157
157
158
-
-**Executor kept from GSD:** mandatory initial-read discipline, explicit deviation-rule examples (null pointers, missing auth, missing dependency, new DB tables), auth-gate protocol (401/403 recognition, checkpoint return with exact auth steps), substantive summary quality gate, TDD RED/GREEN/REFACTOR steps with infrastructure detection, self-check discipline, and completion checklist.
158
+
-**Executor kept from GSD:** mandatory context-intake discipline, explicit deviation-rule examples (null pointers, missing auth, missing dependency, new DB tables), auth-gate protocol (401/403 recognition, checkpoint return with exact auth steps), substantive summary quality gate, TDD RED/GREEN/REFACTOR steps with infrastructure detection, self-check discipline, and completion checklist.
-**Executor gained in GSDD:** XML-bounded section structure, explicit scope boundary (plan-scoped, does not own planning/verification/milestone audit), typed SUMMARY.md output example with YAML frontmatter, portable auth-gate protocol (checkpoint:user with exact steps, not vendor-specific checkpoint return format), and execution-loop alignment with the current GSDD plan schema (`checkpoint:user`, `checkpoint:review`, change-impact discipline).
161
161
162
-
The accompanying workflow alignment pass on `distilled/workflows/execute.md` added four targeted changes: mandatory read enforcement upgrade, auth-gate routing in the checkpoint protocol, concrete deviation-rule examples matching the role contract, and a substantive summary quality gate.
162
+
The accompanying workflow alignment pass on `distilled/workflows/execute.md` added four targeted changes: tiered context-intake enforcement, auth-gate routing in the checkpoint protocol, concrete deviation-rule examples matching the role contract, and a substantive summary quality gate.
163
163
164
164
This hardening pass also clarified a reusable architectural rule: strict portable workflows are not enough if the canonical role contracts underneath them are flattened into prose. Role strictness and workflow strictness both matter.
165
165
@@ -583,7 +583,7 @@ Design principle unchanged: derive state from primary artifacts (ROADMAP.md, SPE
583
583
584
584
**GSD:** No structural invariant tests. Framework correctness relies on manual review and ad-hoc checking.
585
585
586
-
**GSDD:**6 invariant suites (G1-G7, G2 reserved) with ~106 assertions enforce structural properties across all 29 framework markdown files. Every assertion message includes a `FIX:` instruction so CI agents can self-remediate.
586
+
**GSDD:**The guard and invariant suites enforce structural properties across framework markdown files. Every assertion message includes a `FIX:` instruction so CI agents can self-remediate.
587
587
588
588
**Suite inventory:**
589
589
@@ -602,7 +602,7 @@ Design principle unchanged: derive state from primary artifacts (ROADMAP.md, SPE
0 commit comments