@warpgogol/forge 2.9.1 → 2.9.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/README.md +14 -8
  2. package/README.uk.md +14 -0
  3. package/dist/os/adr/handlers/implement-stamp.d.ts.map +1 -1
  4. package/dist/os/adr/handlers/implement-stamp.js +6 -0
  5. package/dist/os/adr/handlers/implement-stamp.js.map +1 -1
  6. package/dist/os/adr/handlers/validate.d.ts.map +1 -1
  7. package/dist/os/adr/handlers/validate.js +8 -0
  8. package/dist/os/adr/handlers/validate.js.map +1 -1
  9. package/dist/os/compass/handlers/compass-audit-handler.d.ts.map +1 -1
  10. package/dist/os/compass/handlers/compass-audit-handler.js +22 -0
  11. package/dist/os/compass/handlers/compass-audit-handler.js.map +1 -1
  12. package/dist/os/compass/handlers/compass-change-summary-handler.d.ts.map +1 -1
  13. package/dist/os/compass/handlers/compass-change-summary-handler.js +6 -0
  14. package/dist/os/compass/handlers/compass-change-summary-handler.js.map +1 -1
  15. package/dist/os/compass/handlers/compass-inventory-handler.d.ts.map +1 -1
  16. package/dist/os/compass/handlers/compass-inventory-handler.js +83 -0
  17. package/dist/os/compass/handlers/compass-inventory-handler.js.map +1 -1
  18. package/dist/os/compass/handlers/compass-inventory.d.ts.map +1 -1
  19. package/dist/os/compass/handlers/compass-inventory.js +1 -0
  20. package/dist/os/compass/handlers/compass-inventory.js.map +1 -1
  21. package/dist/os/exploration/handlers/archive.d.ts.map +1 -1
  22. package/dist/os/exploration/handlers/archive.js +6 -0
  23. package/dist/os/exploration/handlers/archive.js.map +1 -1
  24. package/dist/os/exploration/handlers/list.d.ts.map +1 -1
  25. package/dist/os/exploration/handlers/list.js +8 -0
  26. package/dist/os/exploration/handlers/list.js.map +1 -1
  27. package/dist/os/exploration/handlers/show.d.ts.map +1 -1
  28. package/dist/os/exploration/handlers/show.js +6 -0
  29. package/dist/os/exploration/handlers/show.js.map +1 -1
  30. package/dist/os/program/handlers/complete.d.ts.map +1 -1
  31. package/dist/os/program/handlers/complete.js +18 -0
  32. package/dist/os/program/handlers/complete.js.map +1 -1
  33. package/dist/os/program/handlers/lease.js +6 -0
  34. package/dist/os/program/handlers/lease.js.map +1 -1
  35. package/dist/os/program/handlers/seal.d.ts.map +1 -1
  36. package/dist/os/program/handlers/seal.js +12 -0
  37. package/dist/os/program/handlers/seal.js.map +1 -1
  38. package/dist/os/program/handlers/validate.js +6 -0
  39. package/dist/os/program/handlers/validate.js.map +1 -1
  40. package/dist/os/rfc/acceptance.d.ts.map +1 -1
  41. package/dist/os/rfc/acceptance.js +8 -0
  42. package/dist/os/rfc/acceptance.js.map +1 -1
  43. package/dist/os/rfc/handlers/check.d.ts.map +1 -1
  44. package/dist/os/rfc/handlers/check.js +8 -0
  45. package/dist/os/rfc/handlers/check.js.map +1 -1
  46. package/dist/os/rfc/handlers/implement-stamp.d.ts.map +1 -1
  47. package/dist/os/rfc/handlers/implement-stamp.js +6 -0
  48. package/dist/os/rfc/handlers/implement-stamp.js.map +1 -1
  49. package/dist/os/rfc/handlers/list-create.d.ts.map +1 -1
  50. package/dist/os/rfc/handlers/list-create.js +20 -0
  51. package/dist/os/rfc/handlers/list-create.js.map +1 -1
  52. package/dist/os/rfc/handlers/validate.d.ts.map +1 -1
  53. package/dist/os/rfc/handlers/validate.js +8 -0
  54. package/dist/os/rfc/handlers/validate.js.map +1 -1
  55. package/dist/os/session/handlers/validate.d.ts.map +1 -1
  56. package/dist/os/session/handlers/validate.js +8 -0
  57. package/dist/os/session/handlers/validate.js.map +1 -1
  58. package/dist/os/spec/live-spec-list.d.ts.map +1 -1
  59. package/dist/os/spec/live-spec-list.js +8 -0
  60. package/dist/os/spec/live-spec-list.js.map +1 -1
  61. package/dist/os/spec/live-spec-merge.js +2 -2
  62. package/dist/os/spec/live-spec-merge.js.map +1 -1
  63. package/dist/os/spec/live-spec-show.d.ts.map +1 -1
  64. package/dist/os/spec/live-spec-show.js +6 -0
  65. package/dist/os/spec/live-spec-show.js.map +1 -1
  66. package/dist/os/spec/spec-materialize.d.ts.map +1 -1
  67. package/dist/os/spec/spec-materialize.js +6 -0
  68. package/dist/os/spec/spec-materialize.js.map +1 -1
  69. package/dist/os/spec/spec-status.d.ts.map +1 -1
  70. package/dist/os/spec/spec-status.js +6 -0
  71. package/dist/os/spec/spec-status.js.map +1 -1
  72. package/dist/os/werkstatt/handlers/werkstatt-lock-recover.d.ts.map +1 -1
  73. package/dist/os/werkstatt/handlers/werkstatt-lock-recover.js +8 -0
  74. package/dist/os/werkstatt/handlers/werkstatt-lock-recover.js.map +1 -1
  75. package/dist/os/werkstatt/handlers/werkstatt-lock-status.d.ts.map +1 -1
  76. package/dist/os/werkstatt/handlers/werkstatt-lock-status.js +8 -0
  77. package/dist/os/werkstatt/handlers/werkstatt-lock-status.js.map +1 -1
  78. package/dist/os/workflow/handlers.d.ts.map +1 -1
  79. package/dist/os/workflow/handlers.js +8 -0
  80. package/dist/os/workflow/handlers.js.map +1 -1
  81. package/os/adr/handlers/implement-stamp.ts +6 -0
  82. package/os/adr/handlers/validate.ts +8 -0
  83. package/os/compass/handlers/compass-audit-handler.ts +24 -0
  84. package/os/compass/handlers/compass-change-summary-handler.ts +6 -0
  85. package/os/compass/handlers/compass-game-extensions.test.ts +154 -0
  86. package/os/compass/handlers/compass-inventory-handler.ts +84 -0
  87. package/os/compass/handlers/compass-inventory.ts +1 -0
  88. package/os/exploration/handlers/archive.ts +6 -0
  89. package/os/exploration/handlers/list.ts +9 -0
  90. package/os/exploration/handlers/show.ts +6 -0
  91. package/os/program/handlers/complete.ts +18 -0
  92. package/os/program/handlers/lease.ts +6 -0
  93. package/os/program/handlers/seal.ts +12 -0
  94. package/os/program/handlers/validate.ts +6 -0
  95. package/os/rfc/acceptance.ts +9 -0
  96. package/os/rfc/handlers/check.ts +8 -0
  97. package/os/rfc/handlers/implement-stamp.ts +6 -0
  98. package/os/rfc/handlers/list-create.ts +21 -0
  99. package/os/rfc/handlers/validate.ts +8 -0
  100. package/os/session/handlers/validate.ts +8 -0
  101. package/os/spec/live-spec-list.ts +8 -0
  102. package/os/spec/live-spec-merge.ts +2 -2
  103. package/os/spec/live-spec-show.ts +6 -0
  104. package/os/spec/spec-materialize.ts +6 -0
  105. package/os/spec/spec-status.ts +6 -0
  106. package/os/werkstatt/handlers/werkstatt-lock-recover.ts +9 -0
  107. package/os/werkstatt/handlers/werkstatt-lock-status.ts +9 -0
  108. package/os/workflow/handlers.ts +9 -0
  109. package/package.json +1 -1
  110. package/profiles/godot-csharp.yaml +3 -0
  111. package/profiles/phaser-turborepo.yaml +3 -0
  112. package/skills/_shared/fo-pipeline-conventions.md +39 -0
  113. package/skills/_shared/fo-prerequisites.md +81 -0
  114. package/skills/fo/fo-idea-audit/AUDIT-AXES.md +66 -0
  115. package/skills/fo/fo-idea-audit/SKILL.md +2 -2
  116. package/skills/fo/fo-idea-enhance/SKILL.md +2 -2
  117. package/skills/fo/fo-idea-implement/ADR-FLOW.md +179 -0
  118. package/skills/fo/fo-idea-plan/SKILL.md +2 -0
  119. package/skills/fo/fo-review/AXES.md +70 -0
  120. package/skills/fo/fo-session-retro/learned-principles.md +15 -0
  121. package/skills/shared/windows-ai-tooling/.gitattributes.template +49 -0
  122. package/skills/shared/windows-ai-tooling/AGENTS_WINDOWS.md.template +42 -0
  123. package/skills/shared/writing-great-skills/GLOSSARY.md +201 -0
  124. package/src/tests/create.test.ts +30 -0
  125. package/src/tests/package-files.test.ts +5 -2
  126. package/src/tests/stack-profile.test.ts +4 -0
@@ -485,6 +485,12 @@ export async function runRfcImplementStamp(
485
485
  },
486
486
  exitCode: 0,
487
487
  summary: `rfc.implement.stamp: ${targetId} stamped as implemented`,
488
+ nextSteps: [
489
+ {
490
+ action: `Commit the stamp: pnpm exec forge run ecosystem.commit`,
491
+ kind: "optional",
492
+ },
493
+ ],
488
494
  };
489
495
  } finally {
490
496
  await releaseRfcLock(lockPath);
@@ -131,6 +131,15 @@ export async function runRfcList(
131
131
  entries,
132
132
  },
133
133
  summary: `${entries.length} RFC(s) found`,
134
+ nextSteps:
135
+ entries.length === 0
136
+ ? [
137
+ {
138
+ action: `Create a new RFC: pnpm exec forge run rfc.create --title "..."`,
139
+ kind: "optional",
140
+ },
141
+ ]
142
+ : undefined,
134
143
  };
135
144
  }
136
145
 
@@ -253,6 +262,12 @@ export async function runRfcCreate(
253
262
  consultedDecisions,
254
263
  },
255
264
  summary: `Created ${nextId}: ${title}`,
265
+ nextSteps: [
266
+ {
267
+ action: `Validate the RFC: pnpm exec forge run rfc.validate --file ${relativeFile}`,
268
+ kind: "optional",
269
+ },
270
+ ],
256
271
  };
257
272
  }
258
273
 
@@ -292,5 +307,11 @@ export async function runRfcNextId(
292
307
  scannedFiles: files.length,
293
308
  },
294
309
  summary: `Next RFC number: ${nextId}`,
310
+ nextSteps: [
311
+ {
312
+ action: `Create the RFC: pnpm exec forge run rfc.create --title "..."`,
313
+ kind: "optional",
314
+ },
315
+ ],
295
316
  };
296
317
  }
@@ -162,5 +162,13 @@ export async function runRfcValidate(
162
162
  summary: hasErrors
163
163
  ? `${violations.filter((v) => v.severity === "error").length} error(s) found`
164
164
  : `All ${filesToValidate.length} RFC(s) passed validation`,
165
+ nextSteps: hasErrors
166
+ ? [
167
+ {
168
+ action: `Fix the ${violations.filter((v) => v.severity === "error").length} error(s) above, then re-run: pnpm exec forge run rfc.validate`,
169
+ kind: "required",
170
+ },
171
+ ]
172
+ : undefined,
165
173
  };
166
174
  }
@@ -246,5 +246,13 @@ export async function runSessionValidate(
246
246
  summary: hasErrors
247
247
  ? `${violations.filter((v) => v.severity === "error").length} error(s) found`
248
248
  : `All ${filesToValidate.length} session file(s) passed validation`,
249
+ nextSteps: hasErrors
250
+ ? [
251
+ {
252
+ action: `Fix the ${violations.filter((v) => v.severity === "error").length} error(s) above, then re-run: pnpm exec forge run session.validate`,
253
+ kind: "required",
254
+ },
255
+ ]
256
+ : undefined,
249
257
  };
250
258
  }
@@ -74,5 +74,13 @@ export async function runSpecLiveList(
74
74
  data: result,
75
75
  exitCode: 0,
76
76
  summary: `spec.live.list: ${entries.length} living spec(s)`,
77
+ nextSteps: entries.length > 0
78
+ ? [
79
+ {
80
+ action: `Validate living specs: pnpm exec forge run spec.live.validate`,
81
+ kind: "optional",
82
+ },
83
+ ]
84
+ : undefined,
77
85
  };
78
86
  }
@@ -323,7 +323,7 @@ export async function runSpecLiveMerge(
323
323
  );
324
324
  }
325
325
 
326
- return { data: result, exitCode: 0, summary: `spec.live.merge: created ${domain} from ${rfcId}` };
326
+ return { data: result, exitCode: 0, summary: `spec.live.merge: created ${domain} from ${rfcId}`, nextSteps: [{ action: `Validate the living spec: pnpm exec forge run spec.live.validate`, kind: "optional" }] };
327
327
  }
328
328
 
329
329
  for (const heading of rfcHeadings) {
@@ -409,5 +409,5 @@ export async function runSpecLiveMerge(
409
409
  );
410
410
  }
411
411
 
412
- return { data: result, exitCode: 0, summary: `spec.live.merge: modified ${domain} from ${rfcId}` };
412
+ return { data: result, exitCode: 0, summary: `spec.live.merge: modified ${domain} from ${rfcId}`, nextSteps: [{ action: `Validate the living spec: pnpm exec forge run spec.live.validate`, kind: "optional" }] };
413
413
  }
@@ -113,5 +113,11 @@ export async function runSpecLiveShow(
113
113
  data: result,
114
114
  exitCode: 0,
115
115
  summary: `spec.live.show: ${domain}`,
116
+ nextSteps: [
117
+ {
118
+ action: `Validate the living spec: pnpm exec forge run spec.live.validate`,
119
+ kind: "optional",
120
+ },
121
+ ],
116
122
  };
117
123
  }
@@ -386,5 +386,11 @@ export async function runSpecMaterialize(
386
386
  },
387
387
  exitCode: 0,
388
388
  summary: `spec.materialize: created ${created.length} RFC(s) from spec '${specId}'`,
389
+ nextSteps: [
390
+ {
391
+ action: `Validate the created RFCs: pnpm exec forge run rfc.validate`,
392
+ kind: "optional",
393
+ },
394
+ ],
389
395
  };
390
396
  }
@@ -280,5 +280,11 @@ export async function runSpecStatus(
280
280
  },
281
281
  exitCode: 0,
282
282
  summary: `spec.status: ${results.length} spec(s)`,
283
+ nextSteps: [
284
+ {
285
+ action: `Validate specs: pnpm exec forge run spec.validate`,
286
+ kind: "optional",
287
+ },
288
+ ],
283
289
  };
284
290
  }
@@ -168,6 +168,15 @@ export async function runWerkstattLockRecover(
168
168
  return {
169
169
  data: { recovered, failed },
170
170
  summary: `[werkstatt.lock.recover] ${recovered.length} artifact${recovered.length === 1 ? "" : "s"} recovered, ${failed.length} failure${failed.length === 1 ? "" : "s"}`,
171
+ nextSteps:
172
+ failed.length > 0
173
+ ? [
174
+ {
175
+ action: `Investigate the ${failed.length} failed recovery item(s) above and retry manually`,
176
+ kind: "required",
177
+ },
178
+ ]
179
+ : undefined,
171
180
  };
172
181
  } finally {
173
182
  await releaseLock(workspaceRoot, "werkstatt-recovery");
@@ -69,5 +69,14 @@ export async function runWerkstattLockStatus(
69
69
  staleCount,
70
70
  },
71
71
  summary: `[werkstatt.lock.status] ${locks.length} lock${locks.length === 1 ? "" : "s"}, ${staleCount} stale`,
72
+ nextSteps:
73
+ staleCount > 0
74
+ ? [
75
+ {
76
+ action: `Recover stale locks: pnpm exec forge run werkstatt.lock.recover`,
77
+ kind: "optional",
78
+ },
79
+ ]
80
+ : undefined,
72
81
  };
73
82
  }
@@ -203,6 +203,15 @@ export async function runWorkflowList(
203
203
  data: { command: "workflow.list", workflows: entries },
204
204
  exitCode: 0,
205
205
  summary: `workflow.list: ${entries.length} workflow file(s) found`,
206
+ nextSteps:
207
+ entries.length === 0
208
+ ? [
209
+ {
210
+ action: `Create a workflow file in .devin/workflows/ or .windsurf/workflows/`,
211
+ kind: "optional",
212
+ },
213
+ ]
214
+ : undefined,
206
215
  };
207
216
  }
208
217
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@warpgogol/forge",
3
- "version": "2.9.1",
3
+ "version": "2.9.4",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -690,6 +690,9 @@ workspace:
690
690
  #!/bin/sh
691
691
  # Platform-scope pre-commit guard
692
692
  # Runs werkstatt autonomy and plugin validation before commits
693
+ # Note: compass.validate reads all source files and may add a few seconds
694
+ # to commit time for large projects. Remove the line below if this is
695
+ # too slow during iterative development.
693
696
  echo "Pre-commit: running platform checks..."
694
697
  pnpm exec werkstatt run werkstatt.autonomy.validate || exit 1
695
698
  pnpm exec werkstatt run werkstatt.plugin.validate || exit 1
@@ -293,6 +293,9 @@ workspace:
293
293
  #!/bin/sh
294
294
  # Platform-scope pre-commit guard
295
295
  # Runs werkstatt autonomy and plugin validation before commits
296
+ # Note: compass.validate reads all source files and may add a few seconds
297
+ # to commit time for large projects. Remove the line below if this is
298
+ # too slow during iterative development.
296
299
  echo "Pre-commit: running platform checks..."
297
300
  pnpm exec werkstatt run werkstatt.autonomy.validate || exit 1
298
301
  pnpm exec werkstatt run werkstatt.plugin.validate || exit 1
@@ -276,6 +276,45 @@ When a pipeline step fails and cannot be auto-fixed within 2 attempts (per §Com
276
276
 
277
277
  The error checkpoint doubles as a resume marker: when resuming an interrupted session, scan for the last error checkpoint. If found, resume from the failed step using the partialState and resumePoint fields.
278
278
 
279
+ ## Pipeline continuation
280
+
281
+ When a pipeline step completes (audit, enhance, plan), the agent MUST proactively suggest the next step and offer to proceed. This is NOT automatic chaining — the agent asks the operator first. This applies when the operator is manually driving the pipeline step by step.
282
+
283
+ ### After audit completes
284
+
285
+ The audit report is persisted and committed. The agent MUST:
286
+
287
+ 1. Present the audit summary.
288
+ 2. State: "The next pipeline step is `fo-idea-enhance` — it applies the audit findings to the RFC."
289
+ 3. Ask: "Proceed to enhance?" using `ask_user_question` with "Yes, enhance" as the recommended option.
290
+ 4. If the operator says yes, invoke `fo-idea-enhance` via the `skill` tool.
291
+
292
+ ### After enhance completes
293
+
294
+ The enhanced RFC is committed. The agent MUST:
295
+
296
+ 1. Present the enhancement summary.
297
+ 2. State: "The next pipeline step is `fo-idea-plan` — it transitions the RFC to accepted and creates the implementation plan."
298
+ 3. Ask: "Proceed to plan?" using `ask_user_question` with "Yes, plan" as the recommended option.
299
+ 4. If the operator says yes, invoke `fo-idea-plan` via the `skill` tool.
300
+
301
+ ### After plan completes
302
+
303
+ The plan is committed. The agent MUST:
304
+
305
+ 1. Present the plan summary.
306
+ 2. State: "The next pipeline step is `fo-idea-implement` — it executes the plan and stamps the RFC as implemented."
307
+ 3. Ask: "Proceed to implement?" using `ask_user_question` with "Yes, implement" as the recommended option.
308
+ 4. If the operator says yes, invoke `fo-idea-implement` via the `skill` tool.
309
+
310
+ ### Exception: orchestrator skills
311
+
312
+ When the pipeline is driven by `fo-idea-i-just-want-to-see-the-result` or `fo-idea-i-just-want-to-see-the-plan`, the orchestrator handles chaining automatically. The continuation suggestion is NOT emitted — the orchestrator's "no pauses between pipeline steps" rule applies.
313
+
314
+ ### Exception: operator declines
315
+
316
+ If the operator declines the continuation suggestion, the agent stops. The operator can invoke the next step manually later. Do not re-ask.
317
+
279
318
  ## Batch plan preview
280
319
 
281
320
  When the orchestrator skill processes multiple documents (>=2), emit a batch plan preview before starting the first document. The preview is a table showing: processing order, document id, type, complexity estimate, dependencies, and notes.
@@ -0,0 +1,81 @@
1
+ # WG Pipeline Prerequisites & Batch Processing
2
+
3
+ Reference for `fo-idea-audit`, `fo-idea-enhance`, `fo-idea-plan`, `fo-idea-implement`. These skills share identical input parsing, prerequisite checks, and batch loop behavior.
4
+
5
+ ## Input parsing
6
+
7
+ The operator may provide:
8
+
9
+ - **A single id**: `RFC-0362`, `ADR-0003`, a filename, or a path.
10
+ - **A comma-separated list**: `RFC-0355, RFC-0356, RFC-0357` — process each in order.
11
+ - **A range**: `RFC-0355..RFC-0360` or `от RFC-0355 до RFC-0360` — discover all files in `docs/rfcs/` whose numeric id falls within the inclusive range, sort ascending, and process each in order. Ranges are only valid within a single document type (RFC or ADR).
12
+ - **Nothing**: if a document file is open in the IDE, use it. Otherwise, ask.
13
+
14
+ ## Common prerequisite checks
15
+
16
+ Run these **in order** for each document. If any check fails, record the document as **skipped** in the batch summary with the reason, and immediately proceed to the next document. Do not stop the entire batch — skip and report.
17
+
18
+ 1. **Prefix check** — if the id starts with `ADR-` and this skill handles RFCs only, skip with: `ADR-XXXX is an ADR, not an RFC. ADRs do not have <this step>. The ADR pipeline is: create → implement (includes review → fix). Run /fo-idea-implement ADR-XXXX to implement.`
19
+
20
+ If the id starts with `RFC-` and this skill handles ADRs only, skip with: `RFC-XXXX is an RFC, not an ADR. Use the RFC pipeline: create → audit → enhance → plan → implement (includes review → fix).`
21
+
22
+ 2. **File exists** — look for `docs/rfcs/rfc-XXXX-*.md` (or `docs/adrs/adr-XXXX-*.md` for ADRs). If no file is found, skip with: `RFC-XXXX not found in docs/rfcs/. Run /fo-idea-create-rfc first.`
23
+
24
+ 3. **Terminal status check** — read the document's `status` frontmatter. If the status is `implemented`, skip with: `RFC-XXXX is already implemented. Nothing to do.` If the status is `rejected` or `superseded`, skip with: `RFC-XXXX is <status> (terminal). Terminal RFCs cannot be <this action>. To change this decision, create a new RFC with supersedes: [RFC-XXXX] via /fo-idea-create-rfc.`
25
+
26
+ ## Skill-specific prerequisite checks
27
+
28
+ After the common checks, each skill adds its own:
29
+
30
+ ### fo-idea-audit
31
+
32
+ No additional checks.
33
+
34
+ ### fo-idea-enhance
35
+
36
+ 4. **Accepted status check** — if the status is `accepted`, skip with: `RFC-XXXX is accepted. Accepted RFCs cannot be edited in place. Run /fo-idea-create-rfc with amends: [RFC-XXXX] to create an amending RFC, or supersedes: [RFC-XXXX] to create a superseding RFC.`
37
+
38
+ ### fo-idea-plan
39
+
40
+ 4. **Audit check** — look for `docs/audits/audit-rfc-XXXX-*.md`. If no audit file exists, skip with: `No audit report found for RFC-XXXX in docs/audits/. Run /fo-idea-audit RFC-XXXX first. The pipeline is: create → audit → enhance → plan → implement (includes review → fix).`
41
+
42
+ 5. **Enhance check** — read the RFC's frontmatter and look for the `enhancedAt` field. If `enhancedAt` is absent, skip with: `RFC-XXXX has not been enhanced (no enhancedAt in frontmatter). Run /fo-idea-enhance RFC-XXXX first. The pipeline is: create → audit → enhance → plan → implement (includes review → fix).`
43
+
44
+ 6. **Accepted status check** — if the status is `accepted` and both audit and enhance are done, prerequisites are met. If the status is `draft` or `reviewing` and has `enhancedAt`, the user's instruction to plan IS the architecture acceptance — proceed to the draft→accepted transition.
45
+
46
+ ### fo-idea-implement
47
+
48
+ 4. **Audit check** — look for `docs/audits/audit-rfc-XXXX-*.md`. If no audit file exists, skip with: `No audit report found for RFC-XXXX in docs/audits/. Run /fo-idea-audit RFC-XXXX first. The pipeline is: create → audit → enhance → plan → implement (includes review → fix).`
49
+
50
+ 5. **Enhance check** — read the RFC's frontmatter and look for the `enhancedAt` field. If `enhancedAt` is absent, skip with: `RFC-XXXX has not been enhanced (no enhancedAt in frontmatter). Run /fo-idea-enhance RFC-XXXX first. The pipeline is: create → audit → enhance → plan → implement (includes review → fix).`
51
+
52
+ 6. **Accepted status check** — if the status is not `accepted` (e.g. `draft` or `reviewing`), skip with: `RFC-XXXX is <status>, not accepted. Run /fo-idea-plan RFC-XXXX first — it will transition the RFC to accepted and create the plan. The pipeline is: create → audit → enhance → plan → implement (includes review → fix).`
53
+
54
+ 7. **Plan check** — look for `docs/plans/plan-rfc-XXXX-*.md`. If no plan file exists, skip with: `No plan file found for RFC-XXXX in docs/plans/. Run /fo-idea-plan RFC-XXXX first. The pipeline is: create → audit → enhance → plan → implement (includes review → fix).`
55
+
56
+ ## Batch processing
57
+
58
+ When multiple documents are identified, **loop through each one** and run the full skill process for each sequentially **without pauses between documents**. Do not stop, present a summary, or ask the user between documents — once the work for one document is committed (or it is skipped), immediately proceed to the next document. **Do not emit transition messages such as "Moving to RFC-XXXX next" or per-document status reports during the loop.** Internal status is fine, but nothing is shown to the user until the very end. Only after all documents are processed, print a single final batch summary.
59
+
60
+ **Exception:** Interactive steps within a skill (grilling, resolving open questions) are inherently interactive — they may require user responses. This is not a "pause between documents" but a required step within one document's processing. Resolve all interactions for the current document before proceeding to the next.
61
+
62
+ ## Batch summary format
63
+
64
+ After all documents are processed, present a single batch summary:
65
+
66
+ ```
67
+ ## Batch <Action> Summary
68
+
69
+ ### Documents requested: <N>
70
+ ### Documents processed: <N>
71
+ ### Documents skipped: <list with reason>
72
+
73
+ | ID | Type | Status | <action-specific columns> |
74
+ |---|---|---|---|
75
+ | RFC-0355 | RFC | <result> | ... |
76
+ | ADR-0003 | ADR | <result> | ... |
77
+
78
+ ### Total commits: <count>
79
+ ```
80
+
81
+ Do not output per-document summaries or "Moving to XXXX next" messages during the loop; they belong here, at the very end.
@@ -0,0 +1,66 @@
1
+ # Audit Axes
2
+
3
+ Load this file when running step 4 of `fo-idea-audit`. For each axis, check every item. An item either **passes**, **fails** (specific finding with evidence), or is **not applicable** (state why). Skip N/A items silently — do not pad the report.
4
+
5
+ ## Axis A — Structural completeness
6
+
7
+ Beyond V-13 (required sections exist) and V-14 (≥3 acceptance items), check that each section contains real content, not template placeholders or empty HTML comments:
8
+
9
+ - **Decision** is a single decision in present tense ("The kernel gains…"), not a wishlist or "we should".
10
+ - **CLI surface** shows exact `pnpm exec werkstatt run …` invocations with flags and scope.
11
+ - **TypeScript contracts** are minimal type signatures, not full implementations.
12
+ - **File system responsibilities** table names concrete paths the RFC touches.
13
+ - **Output format** documents the `--json` shape.
14
+ - **Failure modes** specifies exit codes and warn-vs-fail behavior.
15
+ - **Rollout** describes default behavior, adoption path for existing apps, and new-app compliance.
16
+ - **Alternatives considered** is honest — at least one real alternative with a rejection reason.
17
+ - **Risks** includes agent misinterpretation risk and false-positive rate for validators.
18
+ - **Acceptance criteria** items are checkable (can an agent or human verify each one?) and sufficient (do they cover the decision's full scope?).
19
+ - **Implementation notes for agents** are explicit behavioral rules, not vague guidance.
20
+
21
+ ## Axis B — DNA alignment
22
+
23
+ - Each entry in `satisfies[]` is a real DNA invariant in `docs/architecture-dna.md`, and the RFC body explains **how** it enforces, protects, or extends that invariant — not just that it's "related".
24
+ - If the RFC establishes a new DNA invariant (body says "DNA-N established by this RFC"), the audit confirms `docs/architecture-dna.md` will need a new `## DNA-N` entry and the RFC's `satisfies[]` includes it.
25
+ - The RFC does not silently conflict with any existing DNA invariant. If it changes a DNA invariant, it must `supersede` the establishing RFC — not amend it.
26
+ - `related[]` DNA references are relevant and not decorative.
27
+
28
+ ## Axis C — Ecosystem fit
29
+
30
+ - **Package boundaries**: imports flow `apps/* → packages/*` and `services/* → packages/*`, never `apps/* → apps/*` or `apps/* → services/*` (DNA-1). If the RFC proposes a new package, it belongs in `packages/*`.
31
+ - **Pipeline placement**: the RFC names the correct pipeline for each new check — `build.prepare`, `build.check`, `sites-check`, `sites-check-postbuild` — and the choice is justified (blocking vs. advisory).
32
+ - **Compass sync**: if the RFC changes repository-wide requirements, shared package contracts, or app-package relationships, it identifies which `docs/*.xml` files need synchronization (root AGENTS.md Compass document duties).
33
+ - **AGENTS.md updates**: the RFC identifies which `AGENTS.md` files need rule updates (root, `apps/`, `packages/`, `services/`, or site-specific).
34
+ - **Cosmic naming**: if the RFC touches manifests or component/section/page contracts, it addresses the three-way alignment (manifest `cosmicName` ↔ `PLANET_IMPORT_PATHS`/`MOON_IMPORT_PATHS` ↔ `system.md` pins).
35
+ - **Command lifecycle**: `commands.proposed/added/changed/removed` buckets are internally consistent — proposed commands that the RFC introduces will land in `added` upon implementation; changed commands are existing registered commands; removed commands are explicitly deprecated.
36
+
37
+ ## Axis D — Forward-only compliance
38
+
39
+ This ecosystem is forward-only — no backward compatibility layers, no expand-then-contract migrations. Check:
40
+
41
+ - The RFC does not propose a compatibility shim, bridge, or dual-path that keeps legacy behavior alive alongside the new one.
42
+ - Deprecation means removal in the same RFC wave, not an indefinite grace period.
43
+ - If the RFC amends another RFC, it changes the amended RFC's contract directly — it does not add a parallel interpretation.
44
+ - Legacy code paths are deleted, not maintained behind a flag.
45
+
46
+ ## Axis E — Agent-facing policy
47
+
48
+ - **Status gate**: the RFC does not contain self-authorizing language ("may proceed while draft", "implementation can start before acceptance"). Draft RFCs cannot grant implementation permission.
49
+ - **Implementation notes** reference the correct governance rules: RFC-0224 (accepted→implemented transition), RFC-0230 (if touching agent surface), RFC-0334 (supersede escalation on invariant conflict), RFC-0330 (verification evidence for probe-bearing RFCs).
50
+ - **Anti-fabrication**: if the RFC's acceptance criteria include content authoring (prose, business records, claims), the criteria distinguish between code changes an agent can make and content that requires human authoring. The RFC must not claim content will be "auto-generated" when it requires human authoring.
51
+ - **Storage policy**: if the RFC touches persistence, it does not introduce cookies (`document.cookie`, `Set-Cookie`). Client-side persistence is `localStorage` only; server-side is `unstorage`.
52
+
53
+ ## Axis F — Pragmatism
54
+
55
+ - **Minimal command surface**: each proposed command earns its existence — no command that could be a flag on an existing command, no command that duplicates an existing command's scope.
56
+ - **Lean contracts**: TypeScript types are the minimum needed to understand the shape — no speculative generality, no unused optional fields, no abstraction for needs the RFC doesn't have.
57
+ - **Existing patterns**: the RFC checks whether an existing command, schema, or pattern can be extended before proposing a new one. If a new one is proposed, the alternatives section explains why extension was insufficient.
58
+ - **Scope discipline**: `appsImpacted` and `packagesImpacted` list only what's actually impacted. `nonGoals` are explicit and meaningful, not boilerplate.
59
+
60
+ ## Axis G — Blind spots
61
+
62
+ - **Performance**: build-time commands specify their cost (file scan count, regex complexity, I/O patterns). A command that scans all `apps/**` on every `build.check` is a bottleneck.
63
+ - **False positives**: validators estimate their false-positive rate and describe how to suppress noise during migration.
64
+ - **Edge cases**: the RFC considers empty states (new app with no content, package with no manifests), concurrent execution (two builds, two agents), and interrupted operations (crash mid-write).
65
+ - **Migration path**: existing apps' path to compliance is documented — do they pass without changes, or is there a documented migration window?
66
+ - **Security/privacy**: if the RFC touches user data, PII, or external services, it addresses GDPR/privacy implications and secret management (no hardcoded keys, env vars documented in `.env.example` per DNA-40).
@@ -236,9 +236,9 @@ Semantic audit of RFC-XXXX (<title>). Verdict: <approved | needs-revision | reje
236
236
 
237
237
  Stage only the audit file — do not stage unrelated changes. Another agent may be working in a different session; `git add -A` or `git add .` is forbidden.
238
238
 
239
- ### 8. Stop
239
+ ### 8. Stop and suggest next step
240
240
 
241
- Do not modify the RFC or any other file. Do not run `/fo-idea-plan` or `/fo-idea-implement` those are separate skills with different purposes. Present the report and stop. If the user asks to fix the findings, suggest running `/fo-idea-enhance` it reads the persisted audit and applies the fixes. The full pipeline is: create → audit → enhance → plan → implement.
241
+ Do not modify the RFC or any other file. Present the report. Then follow the pipeline continuation protocol per `_shared/fo-pipeline-conventions.md` §Pipeline continuation proactively suggest the next step (`fo-idea-enhance`) and offer to proceed via `ask_user_question`. Do not automatically run the next skill ask the operator first. The full pipeline is: create → audit → enhance → plan → implement.
242
242
 
243
243
  ## Constraints
244
244
 
@@ -204,9 +204,9 @@ Integrate audit findings into RFC-XXXX (<title>). <count> direct fixes,
204
204
 
205
205
  Stage only the RFC files and audit files touched by this enhancement — do not stage unrelated changes.
206
206
 
207
- ### 11. Stop
207
+ ### 11. Stop and suggest next step
208
208
 
209
- Do not run `/fo-idea-plan` that is a separate skill for accepted RFCs. If the user asks to plan implementation, suggest running `/fo-idea-plan` after the RFC is accepted. If the user asks to implement, suggest running `/fo-idea-implement` it requires a plan file and will stop if one is missing. The full pipeline is: create → audit → enhance → plan → implement.
209
+ Follow the pipeline continuation protocol per `_shared/fo-pipeline-conventions.md` §Pipeline continuation proactively suggest the next step (`fo-idea-plan`) and offer to proceed via `ask_user_question`. Do not automatically run the next skill ask the operator first. The full pipeline is: create → audit → enhance → plan → implement.
210
210
 
211
211
  ## Constraints
212
212
 
@@ -0,0 +1,179 @@
1
+ # ADR Implementation Flow
2
+
3
+ Execute this flow when the document is an ADR (prefix `ADR-`, or file in `docs/adrs/`).
4
+
5
+ ## 4.1. Read the ADR
6
+
7
+ Read the ADR file. Extract:
8
+
9
+ - **Status** — must be `accepted`, `reviewing`, or `proposed`. If `superseded` or `rejected` (terminal), stop with message: `ADR-XXXX is <status> (terminal). Terminal ADRs cannot be implemented. To change this decision, create a new ADR or RFC that supersedes ADR-XXXX.` If `implemented`, stop with message: `ADR-XXXX is already implemented. Nothing to do.`
10
+ - **Decision** — the core decision from the `## Decision` section.
11
+ - **Context** — the local situation and constraints from `## Context`.
12
+ - **Consequences** — what the decision implies for the codebase.
13
+ - **Related** — any RFCs, ADRs, or DNA invariants referenced.
14
+
15
+ ## 4.2. Transition to accepted (if needed)
16
+
17
+ If the ADR is `proposed` or `reviewing`, transition it to `accepted`:
18
+
19
+ 1. Set `status: accepted` in the frontmatter.
20
+ 2. Set `updatedAt: <today's date>`.
21
+ 3. If `reviewers` is empty, read the default reviewer(s) from the `reviewers` field comment in `docs/adrs/adr-0000-template.md` (currently `human:andrii-syrokomskyi`). Set all listed default reviewers.
22
+ 4. Commit:
23
+
24
+ ```txt
25
+ adr: accept ADR-XXXX <short title>
26
+
27
+ Transition ADR-XXXX to accepted status for implementation.
28
+ ```
29
+
30
+ Stage only the ADR file.
31
+
32
+ If the ADR is already `accepted`, proceed directly.
33
+
34
+ ## 4.3. Implement the decision
35
+
36
+ Read the `## Decision` section and implement it in code. Follow the same principles as RFC implementation:
37
+
38
+ - Make autonomous, ecosystem-aligned decisions.
39
+ - Use `edit`/`multi_edit` for changes to existing files, `write_to_file` for new files.
40
+ - Commit each logical phase of work:
41
+
42
+ ```txt
43
+ implement: ADR-XXXX — <phase description>
44
+
45
+ <one-line description of what was done in this phase>.
46
+ ```
47
+
48
+ Stage only the files touched by this phase — see `_shared/fo-pipeline-conventions.md` §Commit discipline.
49
+
50
+ - Recoverable errors: see `_shared/fo-pipeline-conventions.md` §Recoverable errors.
51
+
52
+ ## 4.4. Run scoped build checks
53
+
54
+ After implementation is complete, run heavy checks for the impacted workspaces only:
55
+
56
+ 1. ADR validation:
57
+
58
+ ```sh
59
+ pnpm exec werkstatt run adr.validate <adr-id> --json
60
+ ```
61
+
62
+ 2. Determine impacted packages/apps from the ADR's `scope` and the files touched during implementation. Build only those workspaces:
63
+
64
+ ```sh
65
+ pnpm --filter @gogol/<package> run build:check
66
+ ```
67
+
68
+ Or for apps:
69
+
70
+ ```sh
71
+ pnpm --filter <app-name> run build:check
72
+ ```
73
+
74
+ See `_shared/fo-pipeline-conventions.md` §Build verification discipline.
75
+
76
+ ## 4.5. Fix errors
77
+
78
+ If any check fails, fix every error:
79
+
80
+ 1. Read the error output.
81
+ 2. Identify the root cause.
82
+ 3. Fix it.
83
+ 4. Re-run the failing check to confirm the fix.
84
+ 5. Commit each fix:
85
+
86
+ ```txt
87
+ fix: ADR-XXXX — <error description>
88
+
89
+ <one-line description of the root cause and fix>.
90
+ ```
91
+
92
+ Continue until all impacted checks pass.
93
+
94
+ ## 4.6. Documentation audit (fo-doc-audit)
95
+
96
+ After implementation is complete and all checks pass, invoke `fo-doc-audit` via the `skill` tool. It analyzes the session's changes, checks all documentation surfaces, applies needed updates, and commits them separately. Wait for it to complete.
97
+
98
+ If `fo-doc-audit` reports that no updates are needed, proceed to the next step.
99
+
100
+ ## 4.7. ADR code-trace
101
+
102
+ Before stamping `implemented`, verify that the ADR is mentioned in the codebase — this leaves a trace linking code back to the decision record, just as RFCs leave traces.
103
+
104
+ 1. **Search for the ADR id** — use `grep_search` to scan `apps/`, `packages/`, and `services/` for the ADR id string (e.g. `ADR-0003`). Check:
105
+ - **COMPASS block comments** — `MODULE_CONTRACT`, `CHANGE_SUMMARY`, or other Compass scaffolding comments that reference the ADR id.
106
+ - **Inline code mentions** — comments, docstrings, or annotations in source files that reference the ADR id.
107
+
108
+ 2. **If mentions are found** — the trace exists. Proceed to step 4.8.
109
+
110
+ 3. **If no mentions are found** — attempt to find the most relevant file(s) where the decision was implemented. If the file(s) can be identified:
111
+ - Add a Compass block comment referencing the ADR id to the file's `MODULE_CONTRACT` or `CHANGE_SUMMARY` section. For example: `<item>ADR-0003: <brief note on what this ADR decided for this module.</item>`
112
+ - If the file has no Compass scaffolding, add a brief inline comment at the top of the file: `// Implements ADR-XXXX: <one-line decision summary>`
113
+ - Commit the trace:
114
+
115
+ ```txt
116
+ trace: ADR-XXXX — add code mention
117
+
118
+ Add ADR-XXXX reference to <file> to link the decision to the code.
119
+ ```
120
+
121
+ - Proceed to step 4.8.
122
+
123
+ 4. **If the relevant file(s) cannot be identified** — ask the operator: `ADR-XXXX was implemented but no code mention was found. Please point to the file(s) where this ADR's decision was applied so I can add a trace reference.` After the operator provides the file(s), add the trace as described in step 3, commit, and proceed.
124
+
125
+ **For already-implemented ADRs** (if this step is reached for an ADR that was already `implemented`): this check is informational — attempt to find the trace and add it if missing, but do not block on it.
126
+
127
+ ## 4.8. Stamp implemented
128
+
129
+ After all checks pass and documentation is updated, transition the ADR to `implemented`:
130
+
131
+ 1. Set `status: implemented` in the frontmatter.
132
+ 2. Set `implementedAt: <today's date>`.
133
+ 3. Set `updatedAt: <today's date>`.
134
+ 4. Commit:
135
+
136
+ ```txt
137
+ adr: implement ADR-XXXX <short title>
138
+
139
+ Transition ADR-XXXX to implemented status. Decision is live in code,
140
+ scoped build passes.
141
+ ```
142
+
143
+ Stage only the ADR file.
144
+
145
+ ## 4.9. Review (fo-review) — MANDATORY GATE
146
+
147
+ **This step is unconditional.** It MUST be executed after every implementation run — regardless of whether build checks passed, failed, or were fixed. No exceptions. The ADR report (step 4.11) MUST NOT be emitted until this step is complete.
148
+
149
+ 1. **Determine the diff scope** — identify the git fixed point at the start of this implementation session (the commit before the first `implement:` or `adr:` commit). Capture the diff via `git diff <fixed-point>...HEAD`.
150
+ 2. **Invoke `fo-review`** — run the review skill inline via the `skill` tool, passing the diff scope. Wait for it to complete (mechanical floor, seven axes, spec compliance, persist report + commit). If the `skill` tool call fails, retry once. If it fails again, proceed to step 4.11 and note the failure in the report.
151
+ 3. **Read the review report** — extract the verdict and all findings.
152
+
153
+ If the review verdict is **Approved** with zero findings, skip step 4.10 and proceed directly to step 4.11 (Report).
154
+
155
+ ## 4.10. Fix findings (fo-fix) — MANDATORY if findings exist
156
+
157
+ If the review has ANY findings — this step MUST be executed — it is not optional. "Findings" means any issue noted under any review axis (A–G), regardless of severity label ("minor", "cosmetic", "advisory") or the review's overall verdict. An **approved** verdict with minor findings **still requires** `fo-fix` — do not skip because the verdict is "approved" or findings are "minor". The only case where this step is skipped is a review with **zero findings** (every axis says "No issues."):
158
+
159
+ 1. **Re-verify findings** — before fixing, quickly check whether each finding is still relevant: the flagged code may have been changed by a subsequent step. Discard stale findings.
160
+ 2. **Invoke `fo-fix`** — run the fix skill inline via the `skill` tool. It reads the persisted review report, applies fixes in priority order, runs scoped typecheck verification, commits, and delegates doc updates to `fo-doc-audit`. Wait for it to complete. If the `skill` tool call fails, retry once. If it fails again, proceed to step 4.11 and note the failure in the report.
161
+ 3. **Re-run scoped build checks** if `fo-fix` made code changes — repeat step 4.4 for any workspaces touched by the fixes.
162
+
163
+ If the review verdict is **Approved** with zero findings, skip this step — no fix is needed.
164
+
165
+ ## 4.11. Report
166
+
167
+ After implementation, review, and fix are complete, report:
168
+
169
+ ```
170
+ ## ADR-XXXX Implementation Summary
171
+
172
+ ### Decision: <one-line summary>
173
+ ### Phases implemented: <count>
174
+ ### Commits: <count>
175
+ ### Scoped build: <Pass | Fail — fixed>
176
+ ### Review: <verdict> — <N> findings
177
+ ### Fix: <done, <N> findings fixed | skipped, no findings>
178
+ ### Status: implemented (<date>)
179
+ ```