@warpgogol/forge 0.22.0 → 0.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/AGENTS.md +33 -3
  2. package/dist/bin/cli.js +1 -0
  3. package/dist/bin/cli.js.map +1 -1
  4. package/dist/os/adr/handlers/validate.d.ts.map +1 -1
  5. package/dist/os/adr/handlers/validate.js +11 -1
  6. package/dist/os/adr/handlers/validate.js.map +1 -1
  7. package/dist/os/core/core.module.d.ts.map +1 -1
  8. package/dist/os/core/core.module.js +66 -0
  9. package/dist/os/core/core.module.js.map +1 -1
  10. package/dist/os/core/handlers/release-publish.js +4 -4
  11. package/dist/os/core/handlers/release-publish.js.map +1 -1
  12. package/dist/os/exploration/exploration.module.d.ts +3 -0
  13. package/dist/os/exploration/exploration.module.d.ts.map +1 -0
  14. package/dist/os/exploration/exploration.module.js +82 -0
  15. package/dist/os/exploration/exploration.module.js.map +1 -0
  16. package/dist/os/exploration/frontmatter-io.d.ts +13 -0
  17. package/dist/os/exploration/frontmatter-io.d.ts.map +1 -0
  18. package/dist/os/exploration/frontmatter-io.js +63 -0
  19. package/dist/os/exploration/frontmatter-io.js.map +1 -0
  20. package/dist/os/exploration/handlers/archive.d.ts +4 -0
  21. package/dist/os/exploration/handlers/archive.d.ts.map +1 -0
  22. package/dist/os/exploration/handlers/archive.js +135 -0
  23. package/dist/os/exploration/handlers/archive.js.map +1 -0
  24. package/dist/os/exploration/handlers/list.d.ts +4 -0
  25. package/dist/os/exploration/handlers/list.d.ts.map +1 -0
  26. package/dist/os/exploration/handlers/list.js +56 -0
  27. package/dist/os/exploration/handlers/list.js.map +1 -0
  28. package/dist/os/exploration/handlers/show.d.ts +4 -0
  29. package/dist/os/exploration/handlers/show.d.ts.map +1 -0
  30. package/dist/os/exploration/handlers/show.js +91 -0
  31. package/dist/os/exploration/handlers/show.js.map +1 -0
  32. package/dist/os/exploration/index.d.ts +7 -0
  33. package/dist/os/exploration/index.d.ts.map +1 -0
  34. package/dist/os/exploration/index.js +17 -0
  35. package/dist/os/exploration/index.js.map +1 -0
  36. package/dist/os/exploration/types.d.ts +38 -0
  37. package/dist/os/exploration/types.d.ts.map +1 -0
  38. package/dist/os/exploration/types.js +23 -0
  39. package/dist/os/exploration/types.js.map +1 -0
  40. package/dist/os/rfc/handlers/validate-rules.d.ts +5 -4
  41. package/dist/os/rfc/handlers/validate-rules.d.ts.map +1 -1
  42. package/dist/os/rfc/handlers/validate-rules.js +52 -7
  43. package/dist/os/rfc/handlers/validate-rules.js.map +1 -1
  44. package/dist/os/rfc/handlers/validate.d.ts.map +1 -1
  45. package/dist/os/rfc/handlers/validate.js +5 -2
  46. package/dist/os/rfc/handlers/validate.js.map +1 -1
  47. package/dist/os/rfc/index.d.ts +2 -2
  48. package/dist/os/rfc/index.d.ts.map +1 -1
  49. package/dist/os/rfc/index.js +1 -1
  50. package/dist/os/rfc/index.js.map +1 -1
  51. package/dist/os/rfc/types.d.ts +13 -0
  52. package/dist/os/rfc/types.d.ts.map +1 -1
  53. package/dist/os/rfc/types.js +1 -0
  54. package/dist/os/rfc/types.js.map +1 -1
  55. package/dist/os/spec/live-spec-list.d.ts +4 -0
  56. package/dist/os/spec/live-spec-list.d.ts.map +1 -0
  57. package/dist/os/spec/live-spec-list.js +64 -0
  58. package/dist/os/spec/live-spec-list.js.map +1 -0
  59. package/dist/os/spec/live-spec-merge.d.ts +4 -0
  60. package/dist/os/spec/live-spec-merge.d.ts.map +1 -0
  61. package/dist/os/spec/live-spec-merge.js +345 -0
  62. package/dist/os/spec/live-spec-merge.js.map +1 -0
  63. package/dist/os/spec/live-spec-show.d.ts +4 -0
  64. package/dist/os/spec/live-spec-show.d.ts.map +1 -0
  65. package/dist/os/spec/live-spec-show.js +99 -0
  66. package/dist/os/spec/live-spec-show.js.map +1 -0
  67. package/dist/os/spec/live-spec-types.d.ts +71 -0
  68. package/dist/os/spec/live-spec-types.d.ts.map +1 -0
  69. package/dist/os/spec/live-spec-types.js +14 -0
  70. package/dist/os/spec/live-spec-types.js.map +1 -0
  71. package/dist/os/spec/live-spec-validate.d.ts +4 -0
  72. package/dist/os/spec/live-spec-validate.d.ts.map +1 -0
  73. package/dist/os/spec/live-spec-validate.js +140 -0
  74. package/dist/os/spec/live-spec-validate.js.map +1 -0
  75. package/dist/os/spec/spec.module.d.ts.map +1 -1
  76. package/dist/os/spec/spec.module.js +54 -2
  77. package/dist/os/spec/spec.module.js.map +1 -1
  78. package/dist/src/index.d.ts +1 -0
  79. package/dist/src/index.d.ts.map +1 -1
  80. package/dist/src/index.js +1 -0
  81. package/dist/src/index.js.map +1 -1
  82. package/os/rfc/rfc-0000-template.md +5 -0
  83. package/package.json +9 -1
  84. package/skills/_shared/fo-pipeline-conventions.md +24 -0
  85. package/skills/_shared/fo-session-summary.md +6 -0
  86. package/skills/fo/fo-design-summit/SKILL.md +240 -0
  87. package/skills/fo/fo-explore/SKILL.md +145 -0
  88. package/skills/fo/fo-idea/SKILL.md +44 -20
  89. package/skills/fo/fo-idea-audit/SKILL.md +1 -0
  90. package/skills/fo/fo-idea-create-rfc/SKILL.md +3 -0
  91. package/skills/fo/fo-idea-enhance/SKILL.md +3 -2
  92. package/skills/fo/fo-idea-implement/SKILL.md +9 -4
  93. package/skills/fo/fo-idea-plan/SKILL.md +10 -0
  94. package/skills/fo/fo-review/SKILL.md +5 -0
  95. package/skills/fo/fo-session-retro/SKILL.md +15 -8
@@ -0,0 +1,145 @@
1
+ ---
2
+ name: fo-explore
3
+ description: Explore an idea in the codebase without creating an RFC or ADR. Produces a markdown exploration note in docs/explorations/. Use when weighing options before committing to a specification.
4
+ invocation: user
5
+ category: fo
6
+ concerns: document-only
7
+ dependsOn: ['my-preferences']
8
+ languagePolicy: ref(PREFERENCES.md)
9
+ bindings:
10
+ requires: [paths.invariantsFile]
11
+ optional: []
12
+ triggers: ["explore this idea", "let me think about this", "what are the options for", "what if we"]
13
+ ---
14
+
15
+ # Explore an idea before specification
16
+
17
+ Before starting, read `PREFERENCES.md` at the repository root. If the file is missing or `aiLanguage` is unset, ask the operator once and create the file using the `my-preferences` skill semantics.
18
+
19
+ > **This is a document-only skill.** It produces exploration notes in `docs/explorations/` — nothing else. It must never modify, create, or delete source code files. It must not run build commands, tests, or validation suites. Exploration notes are not governance documents — they have no status transitions, no validation, and no acceptance step. They are informational artifacts that may precede an RFC or ADR.
20
+
21
+ ## Process
22
+
23
+ ### 1. Read the idea
24
+
25
+ The operator describes what they want to explore. Identify:
26
+
27
+ - **What is being explored** — the core question or idea.
28
+ - **Why exploration is needed** — is the operator unsure about approach, feasibility, or scope?
29
+ - **What constraints are known** — packages, DNA invariants, existing RFCs, timeline.
30
+
31
+ ### 2. Explore the codebase
32
+
33
+ Search for relevant code, existing patterns, constraints, and dependencies. This is interactive — ask clarifying questions if the idea is vague. Use `code_search`, `grep_search`, and `read_file` to understand the current state of the codebase.
34
+
35
+ If the codebase is empty or inaccessible, document the constraint and focus on option analysis without codebase findings.
36
+
37
+ ### 3. Weigh options
38
+
39
+ Present 2–5 options with trade-offs. For each option:
40
+
41
+ - **Approach** — a brief description of how the idea would be implemented.
42
+ - **Trade-offs** — pros and cons.
43
+ - **DNA alignment** — which invariants from `ref(forge.yaml bindings.paths.invariantsFile)` are relevant.
44
+ - **Blockers** — what needs to be resolved first (missing schema, missing command, conflicting RFC).
45
+ - **Estimated effort** — small / medium / large.
46
+
47
+ ### 4. Assess feasibility
48
+
49
+ For each option, identify:
50
+
51
+ - **Blockers** — missing infrastructure, conflicting decisions, missing RFCs.
52
+ - **Required RFCs** — does this option need a new RFC or ADR before implementation?
53
+ - **Estimated effort** — small / medium / large.
54
+
55
+ ### 5. Persist the exploration note
56
+
57
+ Write `docs/explorations/<slug>.md` using the exploration note format below. The slug must be kebab-case, lowercase, latin-only (matching the project naming convention).
58
+
59
+ If the file already exists, append a new exploration section with a timestamp header instead of overwriting.
60
+
61
+ After persisting, transition the note's `status` from `open` to `explored` by editing the frontmatter directly. This skill is `concern: document-only` and may edit `.md` files — no separate command is needed for this transition.
62
+
63
+ ### 6. Suggest next steps
64
+
65
+ Recommend whether to:
66
+
67
+ - **Create an RFC** — the exploration identified a cross-workspace change that needs governance.
68
+ - **Create an ADR** — the exploration identified a local decision that needs recording.
69
+ - **Shelve the idea** — the exploration revealed blockers or insufficient value.
70
+ - **Explore further** — the exploration raised more questions than it answered.
71
+
72
+ ## Exploration note format
73
+
74
+ ```markdown
75
+ ---
76
+ id: <slug>
77
+ title: "<exploration title>"
78
+ createdAt: YYYY-MM-DD
79
+ status: open
80
+ related: []
81
+ ---
82
+
83
+ # Exploration: <title>
84
+
85
+ ## Idea
86
+
87
+ <operator's description>
88
+
89
+ ## Codebase findings
90
+
91
+ <what the agent found in the codebase — relevant files, existing patterns, constraints>
92
+
93
+ ## Options
94
+
95
+ ### Option 1: <name>
96
+ - **Approach:** <description>
97
+ - **Trade-offs:** <pros/cons>
98
+ - **DNA alignment:** <which invariants are relevant>
99
+ - **Blockers:** <what needs to be resolved first>
100
+ - **Estimated effort:** <small/medium/large>
101
+
102
+ ### Option 2: <name>
103
+ ...
104
+
105
+ ## Recommendation
106
+
107
+ <agent's recommendation with rationale>
108
+
109
+ ## Open questions
110
+
111
+ - <unresolved questions for the operator>
112
+ ```
113
+
114
+ ## Frontmatter fields
115
+
116
+ | Field | Type | Description |
117
+ | --- | --- | --- |
118
+ | `id` | string | Kebab-case slug, matches filename |
119
+ | `title` | string | Human-readable title |
120
+ | `createdAt` | date | Creation date |
121
+ | `status` | enum | `open` (exploration in progress), `explored` (exploration complete, awaiting decision), `archived` (superseded by RFC or shelved) |
122
+ | `related` | string[] | RFC/ADR ids that materialized from this exploration |
123
+
124
+ ## File system responsibilities
125
+
126
+ | Path | Role |
127
+ | ----------------------------- | ---------------------------------------- |
128
+ | `docs/explorations/<slug>.md` | Exploration note (created by this skill) |
129
+ | `docs/explorations/` | Directory for all exploration notes |
130
+
131
+ ## Failure modes
132
+
133
+ - **Exploration note already exists:** Append a new exploration section with a timestamp header instead of overwriting.
134
+ - **Invalid slug:** Slugs must be kebab-case, lowercase, latin-only. Invalid slugs are rejected by `exploration.archive` — exit code 1.
135
+ - **No codebase access:** Document the constraint and focus on option analysis without codebase findings.
136
+ - **Slug not found:** `exploration.show` and `exploration.archive` return exit code 1 if the slug does not exist.
137
+ - **Already archived:** `exploration.archive` is idempotent — if the note is already `archived`, it returns exit code 0 with `previousStatus: "archived"` (no-op).
138
+ - **Empty directory:** `exploration.list` returns `{ explorations: [] }` with exit code 0 when `docs/explorations/` is empty or does not exist.
139
+
140
+ ## Constraints
141
+
142
+ - **No source code changes.** This skill is `concern: document-only`. It may only create and edit `.md` files in `docs/explorations/`.
143
+ - **No governance authority.** Exploration notes are not RFCs or ADRs. They do not define contracts, policies, or decisions. They are informational artifacts.
144
+ - **No pipeline integration.** Exploration notes are not part of any build or validation pipeline. They are discoverable via `exploration.list` and by browsing `docs/explorations/`.
145
+ - **Bindings compliance.** Use `ref(forge.yaml bindings.*)` references for paths and commands — no hardcoded project literals in skill instruction lines.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: fo-idea
3
- description: Analyze a user's idea, decompose if too large, and route to fo-idea-create-rfc or fo-idea-create-adr. Use when the user describes a change and is unsure if it needs an RFC or ADR.
3
+ description: Analyze a user's idea, decompose if too large, and route to fo-idea-create-rfc, fo-idea-create-adr, or direct implementation. Use when the user describes a change and is unsure if it needs an RFC, ADR, or no document.
4
4
  invocation: user
5
5
  category: fo
6
6
  concerns: document-only
@@ -9,10 +9,10 @@ languagePolicy: ref(PREFERENCES.md)
9
9
  bindings:
10
10
  requires: []
11
11
  optional: [paths.invariantsFile]
12
- triggers: ["I have an idea for a change", "analyze this idea and route it", "decompose this feature idea"]
12
+ triggers: ["I have an idea for a change", "analyze this idea and route it", "decompose this feature idea", "does this need an RFC", "should I write an ADR for this"]
13
13
  ---
14
14
 
15
- # Idea → RFC or ADR
15
+ # Idea → RFC, ADR, or direct implementation
16
16
 
17
17
  Before starting, read `PREFERENCES.md` at the repository root. If the file is missing or `aiLanguage` is unset, ask the operator once and create the file using the `my-preferences` skill semantics.
18
18
 
@@ -39,6 +39,16 @@ Read the operator's description and identify:
39
39
 
40
40
  Default to document creation. Only route to implementation if the operator explicitly says "implement" or "don't create a document, just do it".
41
41
 
42
+ ### 1b. Explore suggestion
43
+
44
+ If the operator's description is ambiguous, exploratory, or contains phrases like "what are the options", "let me think about", "explore", or "what if we", suggest using `fo-explore` before creating an RFC. Use `ask_user_question`:
45
+
46
+ > "This sounds like an exploration rather than a settled decision. Should I explore the codebase first, or create an RFC/ADR draft directly?"
47
+ >
48
+ > Recommended option: "Explore first" — because exploration is low-commitment and the results inform a better RFC.
49
+
50
+ If the operator chooses "Explore first", invoke `/fo-explore` inline. Do not proceed to classification or document creation in this invocation — `fo-explore` will produce an exploration note and suggest next steps, which may include creating an RFC or ADR in a separate invocation.
51
+
42
52
  ### 1a. Accepted-decision fast path
43
53
 
44
54
  When the operator signals that a decision is **already made** and provides justification, the skill must take a fast path. Recognition signals include:
@@ -79,22 +89,28 @@ If the task needs a series, proceed to step 4 (decompose).
79
89
 
80
90
  ### 3. Single document: classify and create
81
91
 
82
- #### 3a. Classify: RFC or ADR
92
+ #### 3a. Classify: RFC, ADR, or direct implementation
83
93
 
84
94
  Use the following decision table:
85
95
 
86
- | Criterion | RFC | ADR | Examples |
87
- | --- | --- | --- | --- |
88
- | Adds, removes, or changes a Site OS command | yes | no | New `fonts.selfhost.validate` command; changing `content.surface.validate` behavior |
89
- | Modifies a DNA invariant or AGENTS.md rule | yes | no | Changing the cosmic naming contract; adding a new storage policy to AGENTS.md |
90
- | Establishes a cross-workspace package boundary or contract | yes | no | New shared package exported schema; new package interface; inter-package type contract |
91
- | Changes a currently accepted or implemented RFC | yes | no | Amending RFC-XXXX content surface; superseding RFC-XXXX |
92
- | Introduces a new policy or governance process | yes | no | RFC lifecycle process; feature visibility policy; verification evidence pipeline |
93
- | A convention, standard, or tooling choice applied across apps | no | yes | "Use Fontsource for all fonts"; "Self-host Playfair Display"; CSS methodology; lint rule choices |
94
- | Local to one package, one app, or one narrow convention | no | yes | Changing a biome's typography tokens; adding a font family to the self-host registry |
95
- | Does not touch commands, DNA, AGENTS.md, or cross-workspace contracts | no | yes | Choosing a library; picking a CSS token naming scheme; selecting an image format strategy |
96
-
97
- **If any RFC criterion is met RFC.** Only if all ADR criteria are met and no RFC criterion applies ADR.
96
+ | Criterion | RFC | ADR | Direct | Examples |
97
+ | --- | --- | --- | --- | --- |
98
+ | Adds, removes, or changes a Site OS command | yes | no | no | New `fonts.selfhost.validate` command; changing `content.surface.validate` behavior |
99
+ | Modifies a DNA invariant or AGENTS.md rule | yes | no | no | Changing the cosmic naming contract; adding a new storage policy to AGENTS.md |
100
+ | Establishes a cross-workspace package boundary or contract | yes | no | no | New shared package exported schema; new package interface; inter-package type contract |
101
+ | Changes a currently accepted or implemented RFC | yes | no | no | Amending RFC-XXXX content surface; superseding RFC-XXXX |
102
+ | Introduces a new policy or governance process | yes | no | no | RFC lifecycle process; feature visibility policy; verification evidence pipeline |
103
+ | Introduces new information architecture (new page sections, new content blocks, new UI structures visible to users) | yes | no | no | Adding a new section to the homepage; introducing a new block type on a page; projecting new fields into content before the backing implementation exists |
104
+ | A convention, standard, or tooling choice applied across apps | no | yes | no | "Use Fontsource for all fonts"; "Self-host Playfair Display"; CSS methodology; lint rule choices |
105
+ | Local to one package, one app, or one narrow convention | no | yes | no | Changing a biome's typography tokens; adding a font family to the self-host registry |
106
+ | Does not touch commands, DNA, AGENTS.md, or cross-workspace contracts | no | yes | no | Choosing a library; picking a CSS token naming scheme; selecting an image format strategy |
107
+ | Bug fix restoring intended behavior within existing contracts | no | no | yes | Fixing a broken import path; correcting a typo in a label; restoring a pipeline step that was accidentally bypassed |
108
+ | Content data correction (fixing a fact, updating a status field, correcting a hash) | no | no | yes | Fixing a SHA-256 hash to match the real file; updating a consent status from `not_requested` to `requested` |
109
+ | Cosmetic or formatting change with no semantic or structural impact | no | no | yes | Fixing indentation; reordering imports; renaming a local variable for readability |
110
+
111
+ **If any RFC criterion is met → RFC.** If no RFC criterion applies and any ADR criterion is met → ADR. If no RFC or ADR criterion applies and a Direct criterion is met → direct implementation (no document needed).
112
+
113
+ **Key insight:** Adding new user-visible structures to a site (new page sections, new content blocks, new homepage blocks, projecting not-yet-implemented fields into content) is an architectural change to the site's information architecture, not a data fix. It requires an RFC even when the change is "only content files". The test is: does this change what the site communicates or how it is structured? If yes → RFC. If it only corrects existing data within existing structures → direct.
98
114
 
99
115
  #### Common misclassification traps
100
116
 
@@ -110,15 +126,23 @@ These patterns **look like ADRs but are RFCs**:
110
126
  - **"Just adding one field to a schema"** — if the schema is a cross-workspace contract (e.g. a shared package exported types), changing it is an RFC even if the diff is small.
111
127
  - **"It's only a convention"** — if the convention is enforced by a new Site OS command or validator, it needs an RFC to define the command.
112
128
  - **"It's local to one package"** — if that package's change breaks an accepted RFC or changes a DNA invariant, it needs an RFC.
129
+ - **"It's only content files, not code"** — adding new page sections, new content blocks, or projecting not-yet-implemented fields into content is an information-architecture change, not a data fix. It requires an RFC even when no `.ts` or `.astro` file is touched. The test is whether the change introduces new user-visible structures or semantics, not whether it touches code files.
130
+
131
+ These patterns **look like they need a document but are direct implementation**:
132
+
133
+ - **"Fixing content data"** — correcting a hash, updating a status field, or fixing a factual error in existing content is a data correction within existing structures, not an architectural change. Direct implementation.
134
+ - **"Restoring broken behavior"** — a bug fix that restores the intended behavior within existing contracts is direct implementation, not an RFC. (See ADR-0008 for the precedent: "this is a bug fix restoring the intended behavior, not an architectural change.")
135
+ - **"Cosmetic cleanup"** — formatting, indentation, import ordering, or local variable renaming with no semantic impact is direct implementation.
113
136
 
114
137
  If the classification is ambiguous (e.g. the operator's description is too vague), ask a clarifying question using `ask_user_question` with the recommended classification first.
115
138
 
116
- #### 3b. Invoke the creation skill inline
139
+ #### 3b. Route to the appropriate action
117
140
 
118
- Once classified, invoke the matching skill **inline** — execute it fully without stopping or returning control to the user:
141
+ Once classified, take the matching action **inline** — execute it fully without stopping or returning control to the user:
119
142
 
120
143
  - **RFC** → invoke `/fo-idea-create-rfc`. It will collect metadata, grill the concept, create the file, fill it, validate, and report.
121
144
  - **ADR** → invoke `/fo-idea-create-adr`. It will collect metadata, grill the concept, create the file, fill it, validate, and report. **On the accepted-decision fast path (step 1a)**, tell `fo-idea-create-adr` to skip grilling and use the operator's justification text directly.
145
+ - **Direct implementation** → tell the operator that no RFC or ADR is needed for this change, explain why (which Direct criterion applies), then **climb the minimality ladder** (see `_shared/fo-pipeline-conventions.md` §Minimality ladder) to determine the minimum implementation approach before writing any code. Present the ladder rung you landed on and proceed to implement. Do not create a governance document. The operator may still request an ADR for traceability if they prefer — respect that choice.
122
146
 
123
147
  Do not duplicate the creation skill's work — just route to it and let it run.
124
148
 
@@ -127,7 +151,7 @@ Do not duplicate the creation skill's work — just route to it and let it run.
127
151
  After the creation skill completes, present its final report to the user in `aiLanguage`. Add a one-line prefix indicating which path was taken — translate the label to `aiLanguage`:
128
152
 
129
153
  ```
130
- <Classified as in aiLanguage>: RFC (cross-workspace command addition) / ADR (local package convention)
154
+ <Classified as in aiLanguage>: RFC (cross-workspace command addition) / ADR (local package convention) / Direct implementation (data fix or bug restore within existing contracts)
131
155
  ```
132
156
 
133
157
  Followed by the creation skill's own report.
@@ -231,7 +255,7 @@ After all documents are created, present a single batch report in `aiLanguage`.
231
255
  ## Constraints
232
256
 
233
257
  - **Document-only. This skill must never modify, create, or delete source code files.** It must not touch files in `apps/`, `packages/`, `services/`, `tools/`, `scripts/`, or any other source directory. It must not run `pnpm`-based builds, `pnpm test`, `astro check`, or any build/validation command other than `rfc.validate` / `adr.validate` (which run inside the delegated creation skills). The only files this skill may produce are RFC files in `docs/rfcs/` and ADR files in `docs/adrs/` — and even those are created by the delegated `fo-idea-create-rfc` / `fo-idea-create-adr` skills, not by this skill directly. If you feel the urge to "quickly fix something in the code while I'm here" — stop. That is not this skill's job.
234
- - **Classify before invoking.** Do not invoke both skills for one document pick one based on the decision table.
258
+ - **Classify before acting.** Do not invoke a creation skill or start implementation until the classification is determined using the decision table in step 3a. Pick one path (RFC, ADR, or direct) based on the table.
235
259
  - **When genuinely ambiguous, ask — do not default to RFC.** Conventions, tooling choices, library selections, and standards applied across apps are ADRs even when they touch shared packages. Defaulting to RFC for every cross-app decision clogs the RFC pipeline and wastes architecture review time on local technical choices. If the table and examples do not resolve the classification, ask the operator with `ask_user_question` presenting both options. Reserve RFC for decisions that genuinely change commands, DNA, AGENTS.md rules, cross-workspace contracts, or governance process.
236
260
  - **Do not skip the creation skill's grilling step — except on the accepted-decision fast path (step 1a).** When the operator has signaled an already-made decision with justification and the classification is ADR, grilling is skipped because the operator has already decided. In all other cases, grilling happens inside the invoked skill — this skill only routes.
237
261
  - **Do not create files directly.** This skill never writes RFC or ADR files — it delegates to `fo-idea-create-rfc` or `fo-idea-create-adr`.
@@ -125,6 +125,7 @@ This ecosystem is forward-only — no backward compatibility layers, no expand-t
125
125
  - **Implementation notes** reference the correct governance rules: RFC-XXXX (accepted→implemented transition), RFC-XXXX (if touching agent surface), RFC-XXXX (supersede escalation on invariant conflict), RFC-XXXX (verification evidence for probe-bearing RFCs).
126
126
  - **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.
127
127
  - **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`.
128
+ - **NEEDS CLARIFICATION markers**: List all unresolved `NEEDS CLARIFICATION` markers with line numbers. If none are found, state "No unresolved markers." Markers in `draft` status are informational; markers in `reviewing`+ status are a blocking finding.
128
129
 
129
130
  #### Axis F — Pragmatism
130
131
 
@@ -49,6 +49,7 @@ Ask the user for, or infer from context:
49
49
  - **owners** — default `architecture`; confirm before using a different owner.
50
50
  - **commands.proposed / changed / removed** — any new, modified, or removed Site OS commands.
51
51
  - **packagesImpacted / appsImpacted** — concrete workspace names.
52
+ - **liveSpec** — for feature-level RFCs (not governance/policy), suggest `liveSpec: true` to auto-derive a living spec domain from `packagesImpacted[0]`, or `liveSpec: <domain>` for an explicit domain. This enables automatic delta-merge into `docs/specs/live/<domain>.md` when the RFC is implemented.
52
53
  - **satisfies** — for `architecture` or `contract` RFCs, at least one `DNA-NN` invariant from `ref(forge.yaml bindings.paths.invariantsFile)`.
53
54
  - **related** — relevant RFCs, DNA ids, anti-patterns, specs.
54
55
  - **reviewer** — if the caller specifies a reviewer identity, use it. If not, default to `human:andrii-syrokomskyi` (matching the default in `os/rfc/rfc-0000-template.md` inside `@warpgogol/forge`) **only when the skill is also responsible for moving the RFC out of draft**. For a pure draft scaffold, leave `reviewers: []`.
@@ -90,6 +91,8 @@ Read the generated file and the full template (`os/rfc/rfc-0000-template.md` ins
90
91
  - **Acceptance criteria** — ≥3 checkable checkboxes mapped to implementation artifacts.
91
92
  - **Implementation notes for agents** — explicit MAY/MUST NOT rules, status-gate reminders, escalation triggers.
92
93
 
94
+ When a section cannot be filled with confidence, insert `> NEEDS CLARIFICATION: <question>` instead of guessing. Do not leave sections empty or fill them with speculative content. Markers are resolved during the enhance step.
95
+
93
96
  ### 6. Validate and report
94
97
 
95
98
  Run:
@@ -73,9 +73,9 @@ Read the RFC's `status` frontmatter:
73
73
  rfc: revert RFC-XXXX to draft for enhancement
74
74
 
75
75
  Transition RFC-XXXX from reviewing to draft before enhance.
76
- ```
76
+ ```
77
77
 
78
- Stage only the RFC file. Then proceed with enhancement.
78
+ Stage only the RFC file. Then proceed with enhancement.
79
79
 
80
80
  **No RFC may begin enhancement in any status other than `draft`.** The transition to `draft` is mandatory and must be committed before proceeding to step 4. (Terminal and accepted statuses are already filtered out in step 1.5.)
81
81
 
@@ -86,6 +86,7 @@ Read every finding from the audit report. For each, classify it as one of:
86
86
  - **Direct fix** — the RFC text can be edited to address it: fill a placeholder section, add a missing edge case, fix a DNA reference, tighten a contract, add a failure mode, etc.
87
87
  - **New RFC** — the finding reveals a topic that is too large or too distinct for this RFC. Examples: a new package, a new DNA invariant, a new governance policy, a new external contract. Splitting it out keeps the RFC focused and follows the ecosystem's one-decision-per-RFC principle.
88
88
  - **Out of scope** — the finding is valid but belongs to a different RFC or a future effort. Add it to this RFC's `nonGoals` with a brief explanation and, if applicable, a `related` reference to where it will be addressed.
89
+ - **NC (Needs Clarification)** — Unresolved `NEEDS CLARIFICATION` markers in the RFC body. Resolution: ask the operator the question, replace the marker line with the operator's answer in the RFC body. If the operator defers, the marker remains and the RFC cannot transition to `reviewing`.
89
90
 
90
91
  Record the classification for every finding — the summary in step 8 reports it.
91
92
 
@@ -79,9 +79,9 @@ Execute the plan's step sequence in order. For each step:
79
79
  implement: RFC-XXXX step N — <step title>
80
80
 
81
81
  <one-line description of what was done in this step>.
82
- ```
82
+ ```
83
83
 
84
- Stage only the files touched by this step. Do not stage unrelated changes — another agent may be working in a different session.
84
+ Stage only the files touched by this step. Do not stage unrelated changes — another agent may be working in a different session.
85
85
 
86
86
  **Implementation principles:**
87
87
 
@@ -151,6 +151,7 @@ Read the RFC's `## Acceptance criteria` section. For each checkbox:
151
151
  3. **If a criterion is not met**, implement the missing work, commit it, and re-verify.
152
152
  4. **Annotate every `[x]` with inline evidence** — add `(evidence: <file-path:line>, <test-or-command>)` to each checked criterion. This is enforced by V-27.
153
153
  5. **If a criterion cannot be met** (e.g., requires an external dependency not yet available, requires a pilot that is not registered), do NOT mark it `[x]` and do NOT stamp `implemented`. Instead, split the deferred work into a follow-up RFC via `rfc.supersede.propose`. An RFC with unchecked `[ ]` criteria cannot transition to `implemented` — this is enforced by V-26.
154
+ 6. **Ensure `reviewers` is non-empty** — `rfc.validate` enforces V-25: implemented RFCs with an empty `reviewers` field fail validation. Add at least one reviewer (e.g. `human:<name>`) before stamping `implemented`.
154
155
 
155
156
  Do not proceed to step 3.7 until every acceptance criterion checkbox is checked with evidence.
156
157
 
@@ -168,6 +169,8 @@ If the RFC was created on or after 2026-07-07 and has acceptance probes:
168
169
  ref(forge.yaml bindings.commands.validateRfc) --verification.emit --id RFC-XXXX
169
170
  ```
170
171
 
172
+ **Note:** If acceptance probes are commented out (`# acceptance:`) in the RFC frontmatter, `rfc.verification.emit` silently skips creating an evidence file (`filesModified: []`, zero errors). This is expected behavior — RFCs with commented-out probes get no evidence file, and `rfc.implement.stamp` still works without it.
173
+
171
174
  Commit the evidence file:
172
175
 
173
176
  ```txt
@@ -183,7 +186,7 @@ Stage `docs/rfcs/verification/rfc-xxxx.generated.json`.
183
186
  Transition the RFC to `implemented` using the `rfc.implement.stamp` command. Direct edits to `status`, `implementedAt`, and `updatedAt` are prohibited for all actors.
184
187
 
185
188
  1. Ensure the working tree is clean (all implementation changes committed).
186
- 2. Identify the implementation commit SHA — the commit that contains the core implementation work and references the RFC id in its message or changed files.
189
+ 2. Identify the implementation commit SHA — use the **first** `implement:` commit (the commit where implementation began), not the latest fix or documentation commit. Find it via `git log --oneline` and locate the first commit with an `implement:` prefix after the `plan:` or `rfc: accept` commit.
187
190
  3. Run the stamp command:
188
191
 
189
192
  ```sh
@@ -192,6 +195,8 @@ Transition the RFC to `implemented` using the `rfc.implement.stamp` command. Dir
192
195
 
193
196
  The command atomically validates all preconditions (accepted status, checked+evidenced criteria, clean tree, reachable RFC-referencing commit, passing probe evidence) and sets `status: implemented`, `implementedAt`, and `updatedAt` in one atomic write.
194
197
 
198
+ **Troubleshooting:** If the stamp fails with `Could not parse target RFC` (RFC-IMP-01), the RFC frontmatter has a YAML syntax error — not a missing file. Check for unquoted backtick values in `successSignals`, `nonGoals`, or other list items. YAML plain scalars starting with a backtick must be double-quoted.
199
+
195
200
  4. Commit the stamped RFC file:
196
201
 
197
202
  ```txt
@@ -314,7 +319,7 @@ If the ADR is already `accepted`, proceed directly.
314
319
 
315
320
  #### 4.3. Implement the decision
316
321
 
317
- Read the `## Decision` section and implement it in code. Follow the same principles as RFC implementation:
322
+ Read the `## Decision` section and implement it in code. **For each decision point, verify whether the code already exists** — ADRs may declare fields or extensions that related RFCs did not fully implement. Do not assume associated RFCs covered everything; check each decision against the actual codebase and implement any gaps. Follow the same principles as RFC implementation:
318
323
 
319
324
  - Make autonomous, ecosystem-aligned decisions.
320
325
  - Use `edit`/`multi_edit` for changes to existing files, `write_to_file` for new files.
@@ -168,6 +168,16 @@ The grilling checks:
168
168
 
169
169
  Address every concern the grilling raises by revising the draft. Do not persist until the grilling is satisfied.
170
170
 
171
+ ### 5b. Summit suggestion
172
+
173
+ If the RFC meets summit criteria (any of: `kind: architecture` AND `scope: workspace`, `satisfies[]` includes 2+ DNA invariants, introduces a new package/command/lifecycle, supersedes an implemented RFC), suggest using `fo-design-summit` before acceptance. Use `ask_user_question`:
174
+
175
+ > "This RFC is complex (architecture, workspace scope, 2+ DNA invariants). Should I run a multi-persona design summit before acceptance?"
176
+
177
+ Recommended option: "Run summit" — because complex RFCs benefit from multi-perspective review.
178
+
179
+ If the operator declines, proceed to step 6. If the operator accepts, invoke `fo-design-summit` via the `skill` tool, wait for it to complete, then proceed to step 6.
180
+
171
181
  ### 6. Persist the plan
172
182
 
173
183
  Name the plan file by mirroring the RFC filename with a `plan-` prefix:
@@ -144,6 +144,11 @@ If the invariants file is absent or the optional binding is unresolvable, state
144
144
 
145
145
  #### Axis F — Pragmatism
146
146
 
147
+ - **Minimality ladder**: the author climbed the minimality ladder (see `_shared/fo-pipeline-conventions.md` §Minimality ladder) before writing code. Flag cases where a lower rung was available but skipped:
148
+ - A new dependency was added for something stdlib or native platform features already provide (e.g. installing a date picker library when `<input type="date">` suffices).
149
+ - New code duplicates an existing utility, pattern, or function already in the codebase.
150
+ - A multi-line abstraction was written where a single line or existing API call would work.
151
+ - The code exists at all when the task didn't require it (YAGNI).
147
152
  - **Minimal command surface**: each new command earns its existence — no command that could be a flag on an existing command.
148
153
  - **Lean contracts**: TypeScript types are the minimum needed — no speculative generality, no unused optional fields.
149
154
  - **Existing patterns**: the diff checks whether an existing command, schema, or pattern can be extended before introducing a new one.
@@ -25,9 +25,9 @@ Review the current session for discoveries that other agents would benefit from
25
25
  - **After exploring a new area** — when conventions or patterns were learned that are not yet documented.
26
26
  - **Inline by other skills** — `fo-doc-audit` or session-end workflows may delegate here for the "what did you learn?" step.
27
27
 
28
- ### Session-end trigger phrases
28
+ ### Session-end trigger phrases (BLOCKED GATE — NON-NEGOTIABLE)
29
29
 
30
- When the operator says any of the following, invoke this skill via the `skill` tool BEFORE producing a closing summary:
30
+ When the operator says any of the following, the agent's response is **BLOCKED** — no closing summary, no ad-hoc "session complete" message, no closing block is permitted until this skill is invoked via the `skill` tool and completes:
31
31
 
32
32
  - "Завершаем эту сессию"
33
33
  - "Завершаем сессию"
@@ -38,7 +38,9 @@ When the operator says any of the following, invoke this skill via the `skill` t
38
38
  - "Session end"
39
39
  - "/session-end"
40
40
 
41
- Do NOT produce a closing summary first this skill IS the closing protocol. The skill's report is the session-end output. Do not add a separate "session complete" message.
41
+ **The agent MUST NOT produce any session-end output (summary, closing block, "session complete" message) before this skill is invoked and its report is presented. Producing a closing summary without running this skill is a CONTRACT VIOLATION.**
42
+
43
+ This skill IS the session-end protocol — it runs transcript save, temp cleanup, docs.archive, clean tree check, RFC verification, insight triage, and produces the closing block. Do not substitute it with a manual summary. The closing block comes from this skill's report, not from the agent directly.
42
44
 
43
45
  ## Step 0: Save session transcript (NON-NEGOTIABLE when saveSessions is true)
44
46
 
@@ -126,12 +128,14 @@ rtk git status --porcelain
126
128
  for d in missions/*/workpiece; do [ -d "$d/.git" ] && echo "=== $d ===" && rtk git -C "$d" status --porcelain; done
127
129
  ```
128
130
 
129
- **3b. Classify each dirty file as "ours" or "theirs":**
131
+ **3b. Classify each dirty file as "ours" or "unattributed":**
130
132
 
131
- - A file is "ours" if EITHER:
133
+ - A file is "ours" if ANY of:
132
134
  - You directly modified it via `edit`, `write_to_file`, `multi_edit`, or `edit_notebook` tools.
133
135
  - You indirectly modified it by running a command (`run_command`) that generates or updates it (e.g. codegen pipelines, build commands, etc.).
134
- - A file is "theirs" if it appears dirty but you have no record of touching it in this session. This means another parallel agent modified it. Do NOT commit, stash, or revert these files.
136
+ - It was produced by a session-end pipeline step in THIS session: session transcripts (`docs/sessions/*.md`), review reports (`docs/reviews/**/*.md`), or `docs.archive` moves.
137
+ - It was created by a skill you invoked in this session (e.g. `fo-review` creating a review report, `fo-doc-audit` editing AGENTS.md, `fo-idea-create-adr` creating an ADR).
138
+ - A file is "unattributed" if it appears dirty but you have no record of touching it in this session. Do NOT assume it belongs to a parallel agent — it may be an orphan from a previous session that was not committed. The previous session-end protocol should have caught it, but if it didn't, this session must not propagate the problem further.
135
139
 
136
140
  **3c. Commit our changes:**
137
141
 
@@ -139,9 +143,12 @@ for d in missions/*/workpiece; do [ -d "$d/.git" ] && echo "=== $d ===" && rtk g
139
143
  - If there are "our" dirty files in a workpiece: `git -C missions/<missionId>/workpiece add <files>` and `git -C missions/<missionId>/workpiece commit -m "<descriptive message>"`.
140
144
  - Use descriptive commit messages that explain what the changes are, not just "session cleanup".
141
145
 
142
- **3d. Report remaining dirty files:**
146
+ **3d. Handle unattributed dirty files (NON-NEGOTIABLE):**
143
147
 
144
- - If any dirty files remain after committing ours, report them to the operator: "The following files were modified by another agent and left untouched: <list>". Then proceed.
148
+ - If any unattributed dirty files remain after committing ours, present them to the operator via `ask_user_question` (in `aiLanguage`) and ask whether to commit or leave each one untouched. Do NOT silently proceed — unattributed files are often orphans from previous sessions that must be resolved, not propagated.
149
+ - For each unattributed file, the operator can choose:
150
+ - **Commit** — the agent stages and commits the file with a descriptive message.
151
+ - **Leave untouched** — the operator explicitly acknowledges the file should remain dirty (e.g. it belongs to a parallel agent still running).
145
152
  - If the tree is now clean (or was clean from the start), proceed silently.
146
153
 
147
154
  ### Step 4: RFC implementation verification (NON-NEGOTIABLE)