@warpgogol/forge 2.9.2 → 2.9.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -8
- package/README.uk.md +14 -0
- package/dist/bin/cli.js +0 -0
- package/dist/os/adr/handlers/implement-stamp.d.ts.map +1 -1
- package/dist/os/adr/handlers/implement-stamp.js +7 -1
- package/dist/os/adr/handlers/implement-stamp.js.map +1 -1
- package/dist/os/adr/handlers/list-create.d.ts.map +1 -1
- package/dist/os/adr/handlers/list-create.js +40 -4
- package/dist/os/adr/handlers/list-create.js.map +1 -1
- package/dist/os/adr/handlers/validate.d.ts.map +1 -1
- package/dist/os/adr/handlers/validate.js +17 -3
- package/dist/os/adr/handlers/validate.js.map +1 -1
- package/dist/os/adr/types.d.ts +1 -0
- package/dist/os/adr/types.d.ts.map +1 -1
- package/dist/os/adr/types.js +1 -0
- package/dist/os/adr/types.js.map +1 -1
- package/dist/os/compass/handlers/compass-audit-handler.d.ts.map +1 -1
- package/dist/os/compass/handlers/compass-audit-handler.js +22 -0
- package/dist/os/compass/handlers/compass-audit-handler.js.map +1 -1
- package/dist/os/compass/handlers/compass-change-summary-handler.d.ts.map +1 -1
- package/dist/os/compass/handlers/compass-change-summary-handler.js +6 -0
- package/dist/os/compass/handlers/compass-change-summary-handler.js.map +1 -1
- package/dist/os/compass/handlers/compass-inventory-handler.d.ts.map +1 -1
- package/dist/os/compass/handlers/compass-inventory-handler.js +19 -0
- package/dist/os/compass/handlers/compass-inventory-handler.js.map +1 -1
- package/dist/os/core/handlers/package-health.d.ts.map +1 -1
- package/dist/os/core/handlers/package-health.js +8 -4
- package/dist/os/core/handlers/package-health.js.map +1 -1
- package/dist/os/core/handlers/pinned-validate.d.ts.map +1 -1
- package/dist/os/core/handlers/pinned-validate.js +2 -2
- package/dist/os/core/handlers/pinned-validate.js.map +1 -1
- package/dist/os/exploration/handlers/archive.d.ts.map +1 -1
- package/dist/os/exploration/handlers/archive.js +6 -0
- package/dist/os/exploration/handlers/archive.js.map +1 -1
- package/dist/os/exploration/handlers/list.d.ts.map +1 -1
- package/dist/os/exploration/handlers/list.js +8 -0
- package/dist/os/exploration/handlers/list.js.map +1 -1
- package/dist/os/exploration/handlers/show.d.ts.map +1 -1
- package/dist/os/exploration/handlers/show.js +6 -0
- package/dist/os/exploration/handlers/show.js.map +1 -1
- package/dist/os/program/handlers/complete.d.ts.map +1 -1
- package/dist/os/program/handlers/complete.js +19 -1
- package/dist/os/program/handlers/complete.js.map +1 -1
- package/dist/os/program/handlers/lease.js +7 -1
- package/dist/os/program/handlers/lease.js.map +1 -1
- package/dist/os/program/handlers/seal.d.ts.map +1 -1
- package/dist/os/program/handlers/seal.js +13 -1
- package/dist/os/program/handlers/seal.js.map +1 -1
- package/dist/os/program/handlers/validate.js +8 -2
- package/dist/os/program/handlers/validate.js.map +1 -1
- package/dist/os/rfc/acceptance.d.ts.map +1 -1
- package/dist/os/rfc/acceptance.js +8 -0
- package/dist/os/rfc/acceptance.js.map +1 -1
- package/dist/os/rfc/dna-trace.js +1 -1
- package/dist/os/rfc/dna-trace.js.map +1 -1
- package/dist/os/rfc/handlers/check.d.ts.map +1 -1
- package/dist/os/rfc/handlers/check.js +10 -2
- package/dist/os/rfc/handlers/check.js.map +1 -1
- package/dist/os/rfc/handlers/implement-stamp.d.ts.map +1 -1
- package/dist/os/rfc/handlers/implement-stamp.js +7 -1
- package/dist/os/rfc/handlers/implement-stamp.js.map +1 -1
- package/dist/os/rfc/handlers/index-graph.js +4 -4
- package/dist/os/rfc/handlers/index-graph.js.map +1 -1
- package/dist/os/rfc/handlers/lifecycle.js +1 -1
- package/dist/os/rfc/handlers/lifecycle.js.map +1 -1
- package/dist/os/rfc/handlers/list-create.d.ts.map +1 -1
- package/dist/os/rfc/handlers/list-create.js +20 -0
- package/dist/os/rfc/handlers/list-create.js.map +1 -1
- package/dist/os/rfc/handlers/validate.d.ts.map +1 -1
- package/dist/os/rfc/handlers/validate.js +17 -3
- package/dist/os/rfc/handlers/validate.js.map +1 -1
- package/dist/os/session/handlers/validate.d.ts.map +1 -1
- package/dist/os/session/handlers/validate.js +17 -3
- package/dist/os/session/handlers/validate.js.map +1 -1
- package/dist/os/spec/live-spec-list.d.ts.map +1 -1
- package/dist/os/spec/live-spec-list.js +8 -0
- package/dist/os/spec/live-spec-list.js.map +1 -1
- package/dist/os/spec/live-spec-merge.js +2 -2
- package/dist/os/spec/live-spec-merge.js.map +1 -1
- package/dist/os/spec/live-spec-show.d.ts.map +1 -1
- package/dist/os/spec/live-spec-show.js +6 -0
- package/dist/os/spec/live-spec-show.js.map +1 -1
- package/dist/os/spec/live-spec-validate.js +2 -2
- package/dist/os/spec/live-spec-validate.js.map +1 -1
- package/dist/os/spec/spec-materialize.d.ts.map +1 -1
- package/dist/os/spec/spec-materialize.js +6 -0
- package/dist/os/spec/spec-materialize.js.map +1 -1
- package/dist/os/spec/spec-status.d.ts.map +1 -1
- package/dist/os/spec/spec-status.js +6 -0
- package/dist/os/spec/spec-status.js.map +1 -1
- package/dist/os/spec/spec-validate.js +1 -1
- package/dist/os/spec/spec-validate.js.map +1 -1
- package/dist/os/werkstatt/handlers/werkstatt-lock-recover.d.ts.map +1 -1
- package/dist/os/werkstatt/handlers/werkstatt-lock-recover.js +8 -0
- package/dist/os/werkstatt/handlers/werkstatt-lock-recover.js.map +1 -1
- package/dist/os/werkstatt/handlers/werkstatt-lock-status.d.ts.map +1 -1
- package/dist/os/werkstatt/handlers/werkstatt-lock-status.js +8 -0
- package/dist/os/werkstatt/handlers/werkstatt-lock-status.js.map +1 -1
- package/dist/os/workflow/handlers.d.ts.map +1 -1
- package/dist/os/workflow/handlers.js +9 -1
- package/dist/os/workflow/handlers.js.map +1 -1
- package/dist/src/onboarding/create.js +1 -1
- package/dist/src/onboarding/create.js.map +1 -1
- package/dist/src/onboarding/doctor.js +1 -1
- package/dist/src/onboarding/doctor.js.map +1 -1
- package/dist/src/onboarding/init.d.ts.map +1 -1
- package/dist/src/onboarding/init.js +31 -1
- package/dist/src/onboarding/init.js.map +1 -1
- package/dist/src/onboarding/profile-validate.js +1 -1
- package/dist/src/onboarding/profile-validate.js.map +1 -1
- package/dist/src/utils/fs-trash.d.ts.map +1 -1
- package/dist/src/utils/fs-trash.js +1 -1
- package/dist/src/utils/fs-trash.js.map +1 -1
- package/dist/src/validators/note-frontmatter-validate.js +1 -1
- package/dist/src/validators/note-frontmatter-validate.js.map +1 -1
- package/dist/src/validators/note-link-validate.js +1 -1
- package/dist/src/validators/note-link-validate.js.map +1 -1
- package/os/adr/adr-0000-template.md +46 -0
- package/os/adr/handlers/implement-stamp.ts +7 -1
- package/os/adr/handlers/list-create.ts +48 -4
- package/os/adr/handlers/validate.ts +15 -3
- package/os/adr/types.ts +1 -0
- package/os/compass/handlers/compass-audit-handler.ts +24 -0
- package/os/compass/handlers/compass-change-summary-handler.ts +6 -0
- package/os/compass/handlers/compass-inventory-handler.ts +19 -0
- package/os/core/handlers/package-health.ts +9 -5
- package/os/core/handlers/pinned-validate.ts +4 -2
- package/os/exploration/handlers/archive.ts +6 -0
- package/os/exploration/handlers/list.ts +9 -0
- package/os/exploration/handlers/show.ts +6 -0
- package/os/program/handlers/complete.ts +19 -1
- package/os/program/handlers/lease.ts +7 -1
- package/os/program/handlers/seal.ts +13 -1
- package/os/program/handlers/validate.ts +8 -2
- package/os/rfc/acceptance.ts +9 -0
- package/os/rfc/dna-trace.ts +1 -1
- package/os/rfc/handlers/check.ts +10 -2
- package/os/rfc/handlers/implement-stamp.ts +7 -1
- package/os/rfc/handlers/index-graph.ts +4 -4
- package/os/rfc/handlers/lifecycle.ts +1 -1
- package/os/rfc/handlers/list-create.ts +21 -0
- package/os/rfc/handlers/validate.ts +15 -3
- package/os/rfc/rfc-0000-template.md +16 -20
- package/os/session/handlers/validate.ts +15 -3
- package/os/spec/live-spec-list.ts +8 -0
- package/os/spec/live-spec-merge.ts +2 -2
- package/os/spec/live-spec-show.ts +6 -0
- package/os/spec/live-spec-validate.ts +2 -2
- package/os/spec/spec-materialize.ts +6 -0
- package/os/spec/spec-status.ts +6 -0
- package/os/spec/spec-validate.ts +1 -1
- package/os/werkstatt/handlers/werkstatt-lock-recover.ts +9 -0
- package/os/werkstatt/handlers/werkstatt-lock-status.ts +9 -0
- package/os/workflow/handlers.ts +10 -1
- package/package.json +73 -195
- package/skills/_shared/fo-pipeline-conventions.md +44 -5
- package/skills/_shared/fo-prerequisites.md +81 -0
- package/skills/fo/fo-extract-dna/SKILL.md +1 -1
- package/skills/fo/fo-idea-audit/AUDIT-AXES.md +66 -0
- package/skills/fo/fo-idea-audit/SKILL.md +2 -2
- package/skills/fo/fo-idea-create-adr/SKILL.md +1 -1
- package/skills/fo/fo-idea-create-rfc/SKILL.md +3 -3
- package/skills/fo/fo-idea-enhance/SKILL.md +2 -2
- package/skills/fo/fo-idea-implement/ADR-FLOW.md +179 -0
- package/skills/fo/fo-idea-implement/SKILL.md +1 -1
- package/skills/fo/fo-idea-plan/SKILL.md +4 -2
- package/skills/fo/fo-review/AXES.md +70 -0
- package/skills/fo/fo-session-retro/learned-principles.md +15 -0
- package/skills/fo/fo-step-commit/SKILL.md +2 -2
- package/skills/shared/windows-ai-tooling/.gitattributes.template +49 -0
- package/skills/shared/windows-ai-tooling/AGENTS_WINDOWS.md.template +42 -0
- package/skills/shared/writing-great-skills/GLOSSARY.md +201 -0
- package/src/onboarding/create.ts +1 -1
- package/src/onboarding/doctor.ts +1 -1
- package/src/onboarding/init.ts +30 -1
- package/src/onboarding/profile-validate.ts +1 -1
- package/src/tests/package-files.test.ts +5 -2
- package/src/tests/stack-profile.test.ts +4 -0
- package/src/utils/fs-trash.ts +1 -1
- package/src/validators/note-frontmatter-validate.ts +1 -1
- package/src/validators/note-link-validate.ts +1 -1
|
@@ -52,7 +52,7 @@ Ask the user for, or infer from context:
|
|
|
52
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.
|
|
53
53
|
- **satisfies** — for `architecture` or `contract` RFCs, at least one `DNA-NN` invariant from `ref(forge.yaml bindings.paths.invariantsFile)`.
|
|
54
54
|
- **related** — relevant RFCs, DNA ids, anti-patterns, specs.
|
|
55
|
-
- **reviewer** — if the caller specifies a reviewer identity, use it. If not, default
|
|
55
|
+
- **reviewer** — if the caller specifies a reviewer identity, use it. If not, read the default reviewer(s) from the `reviewers` field comment in `docs/rfcs/rfc-0000-template.md` **only when the skill is also responsible for moving the RFC out of draft**. For a pure draft scaffold, leave `reviewers: []`.
|
|
56
56
|
|
|
57
57
|
### 3. Grill the concept
|
|
58
58
|
|
|
@@ -78,7 +78,7 @@ ref(forge.yaml bindings.commands.validateRfc) --create --title="<title>" --kind=
|
|
|
78
78
|
|
|
79
79
|
### 5. Fill every section
|
|
80
80
|
|
|
81
|
-
Read the generated file and the full template (`
|
|
81
|
+
Read the generated file and the full template (`docs/rfcs/rfc-0000-template.md`) as a guide. Replace placeholder text in every required section:
|
|
82
82
|
|
|
83
83
|
- **Context** — the concrete situation, not a generic preamble.
|
|
84
84
|
- **Problem** — the exact risk or gap this RFC closes.
|
|
@@ -129,7 +129,7 @@ Stage only the RFC file — do not stage unrelated changes. Another agent may be
|
|
|
129
129
|
- Use the **full** RFC template for every RFC. Lightweight local decisions now use ADRs instead.
|
|
130
130
|
- Do not change `status` past `draft`.
|
|
131
131
|
- Do not add self-authorizing language such as "implementation may start before acceptance."
|
|
132
|
-
- Do not default `reviewers` on drafts unless the skill is explicitly performing a status transition and the caller has not supplied a reviewer — in that case
|
|
132
|
+
- Do not default `reviewers` on drafts unless the skill is explicitly performing a status transition and the caller has not supplied a reviewer — in that case read the default reviewer(s) from the `reviewers` field comment in `docs/rfcs/rfc-0000-template.md`.
|
|
133
133
|
- Keep `rfc.validate` clean before presenting the draft.
|
|
134
134
|
- **Commit the RFC draft.** The RFC file must be committed after creation and validation — never left in the working tree.
|
|
135
135
|
- **Never manually determine the RFC number.** Always use `rfc.create` (step 4) to assign the number. The RFC number space includes archived RFCs under `docs/rfcs/archive/` — a top-level-only scan of `docs/rfcs/` misses them and produces duplicate IDs. `rfc.create` scans the full tree recursively and picks the correct next number.
|
|
@@ -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
|
-
|
|
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`. 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
|
+
ref(forge.yaml bindings.commands.validateAdr)
|
|
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
|
+
```
|
|
@@ -308,7 +308,7 @@ If the ADR is `proposed` or `reviewing`, transition it to `accepted`:
|
|
|
308
308
|
|
|
309
309
|
1. Set `status: accepted` in the frontmatter.
|
|
310
310
|
2. Set `updatedAt: <today's date>`.
|
|
311
|
-
3. If `reviewers` is empty, read the default reviewer(s) from the `reviewers` field comment in `docs/adrs/adr-0000-template.md
|
|
311
|
+
3. If `reviewers` is empty, read the default reviewer(s) from the `reviewers` field comment in `docs/adrs/adr-0000-template.md`. Set all listed default reviewers.
|
|
312
312
|
4. Commit:
|
|
313
313
|
|
|
314
314
|
```txt
|
|
@@ -60,7 +60,7 @@ If all checks pass, proceed to step 0.3.
|
|
|
60
60
|
If the RFC is `draft` or `reviewing` and has `enhancedAt` — the user's instruction to plan IS the architecture acceptance. Transition the RFC to `accepted`:
|
|
61
61
|
|
|
62
62
|
1. Set `status: accepted`.
|
|
63
|
-
2. Set `reviewers` — if the operator specified a reviewer at invocation, use that. Otherwise, read the default reviewer(s) from the `reviewers` field comment in `
|
|
63
|
+
2. Set `reviewers` — if the operator specified a reviewer at invocation, use that. Otherwise, read the default reviewer(s) from the `reviewers` field comment in `docs/rfcs/rfc-0000-template.md`. Set all listed default reviewers.
|
|
64
64
|
3. Set `updatedAt` to today's date.
|
|
65
65
|
4. Commit:
|
|
66
66
|
|
|
@@ -230,6 +230,8 @@ If multiple RFCs were processed, present a single batch summary in `aiLanguage`.
|
|
|
230
230
|
|
|
231
231
|
Do not output per-RFC summaries or "Moving to RFC-XXXX next" messages during the loop; they belong here, at the very end.
|
|
232
232
|
|
|
233
|
+
After presenting the summary, follow the pipeline continuation protocol per `_shared/fo-pipeline-conventions.md` §Pipeline continuation — proactively suggest the next step (`fo-idea-implement`) and offer to proceed via `ask_user_question`. Do not automatically run the next skill — ask the operator first.
|
|
234
|
+
|
|
233
235
|
## Session affinity (advisory)
|
|
234
236
|
|
|
235
237
|
When an RFC was planned in this session, prefer implementing it in this session too. The session context contains edge cases and mental models not fully captured in the plan text. If starting a new session, re-read the plan file and the RFC body before implementing. This is a recommendation, not a machine-enforced constraint — sessions have no forge-internal identity.
|
|
@@ -243,5 +245,5 @@ When an RFC was planned in this session, prefer implementing it in this session
|
|
|
243
245
|
- The plan MUST NOT propose changing DNA invariants without a new superseding RFC.
|
|
244
246
|
- The plan MUST respect RFC-XXXX: only `accepted → implemented` is agent-permitted; all other status transitions are human-only. The `draft → accepted` transition in step 0.3 is an exception authorized by the user's explicit instruction to plan the RFC.
|
|
245
247
|
- The plan MUST reference the RFC's acceptance criteria as the source of truth for completion.
|
|
246
|
-
- **Default reviewer source.** When transitioning `draft → accepted` and the operator has not specified a reviewer, read the default reviewer(s) from the `reviewers` field comment in `
|
|
248
|
+
- **Default reviewer source.** When transitioning `draft → accepted` and the operator has not specified a reviewer, read the default reviewer(s) from the `reviewers` field comment in `docs/rfcs/rfc-0000-template.md`. Set all listed default reviewers.
|
|
247
249
|
- **No pauses for recoverable tool errors.** If a tool call fails with a recoverable error — e.g. `write_to_file` content too long, JSON truncation, line count/character limit exceeded, or similar — do not stop and ask the user. Recover autonomously: split the content into smaller writes, use `edit`/`multi_edit`, decompose oversized files, and retry immediately. The operator's default answer to "Shall I proceed?" is always "yes".
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Review Axes
|
|
2
|
+
|
|
3
|
+
Load this file when running step 4 of `fo-review`. 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 correctness
|
|
6
|
+
|
|
7
|
+
Beyond what the mechanical floor catches:
|
|
8
|
+
|
|
9
|
+
- **Strict typing** — flag `any`, implicit casts, missing interfaces, untyped parameters, non-exhaustive switch/if chains.
|
|
10
|
+
- **No magic numbers or untyped data** — flag literal constants that should be named, enums, or config; flag strings standing in for domain concepts.
|
|
11
|
+
- **Minimalism** — flag over-engineered abstractions, speculative generality, duplicated logic, or middle-man modules that can be simplified.
|
|
12
|
+
- **Dead code** — flag unreachable branches, unused exports, commented-out code blocks.
|
|
13
|
+
- **Error handling** — flag swallowed errors, bare `catch` blocks without context, missing error types.
|
|
14
|
+
|
|
15
|
+
## Axis B — DNA alignment
|
|
16
|
+
|
|
17
|
+
Check the diff against every DNA invariant it touches. The list below is the minimum scan set — if the diff touches a DNA invariant not listed here, check it too.
|
|
18
|
+
|
|
19
|
+
- **DNA-1** (monorepo boundary) — no `apps/* → apps/*` or `apps/* → services/*` imports.
|
|
20
|
+
- **DNA-4** (canonical content) — no hardcoded copy strings or configuration in routes/components that belongs in `src/content/`.
|
|
21
|
+
- **DNA-5 / DNA-17** (mirror quintet) — every new `.astro` component/section has colocated `manifest.yaml`, content schema, `.css`, and content `.md`.
|
|
22
|
+
- **DNA-6** (kebab-case) — all new filenames use kebab-case.
|
|
23
|
+
- **DNA-7** (thin routes) — route files are orchestrators only; no inline `<style>`, hardcoded body copy, or layout logic.
|
|
24
|
+
- **DNA-8** (page → section → component → content) — visitor-facing page bodies are composed as ordered section components.
|
|
25
|
+
- **DNA-10** (no hardcoded tokens) — CSS uses `--ds-*` custom properties only; no raw `rgba()` or `#hex`.
|
|
26
|
+
- **DNA-23** (cosmic naming) — new manifests carry `cosmicName` from the correct closed catalog; three-way alignment (manifest ↔ `PLANET_IMPORT_PATHS` / `MOON_IMPORT_PATHS` ↔ `system.md`).
|
|
27
|
+
- **DNA-24** (block-declarative pages) — page entries are frontmatter-only; no markdown bodies.
|
|
28
|
+
- **DNA-25** (single buildPage) — routes call `buildPage`; no hand-assembled block composition.
|
|
29
|
+
- **DNA-40** (env-example) — new env vars are documented in `.env.example`.
|
|
30
|
+
- **DNA-42** (Compass markup) — new authored source files carry `MODULE_CONTRACT` and `CHANGE_SUMMARY`.
|
|
31
|
+
- **DNA-51** (Werkstatt primitives) — mutating Werkstatt commands use shared lock/idempotency/atomic-write helpers.
|
|
32
|
+
|
|
33
|
+
## Axis C — Ecosystem fit
|
|
34
|
+
|
|
35
|
+
- **Package boundaries**: imports flow `apps/* → packages/*` and `services/* → packages/*`, never `apps/* → apps/*` or `apps/* → services/*`.
|
|
36
|
+
- **Pipeline placement**: new checks are placed in the correct pipeline (`build.prepare`, `build.check`, `sites-check`, `sites-check-postbuild`) with justified blocking vs. advisory choice.
|
|
37
|
+
- **Compass sync**: if the diff changes repository-wide requirements, shared package contracts, or app-package relationships, the relevant `docs/*.xml` files are updated.
|
|
38
|
+
- **AGENTS.md updates**: if the diff introduces new rules or patterns, the relevant `AGENTS.md` files are updated.
|
|
39
|
+
- **Cosmic naming**: if the diff touches manifests or component/section/page contracts, the three-way alignment is maintained.
|
|
40
|
+
- **Command lifecycle**: new commands are registered in the correct module; changed commands update their metadata; removed commands are explicitly deprecated.
|
|
41
|
+
|
|
42
|
+
## Axis D — Forward-only compliance
|
|
43
|
+
|
|
44
|
+
- No compatibility shims, bridges, or dual-paths that keep legacy behavior alive.
|
|
45
|
+
- Deprecation means removal in the same change, not an indefinite grace period.
|
|
46
|
+
- Legacy code paths are deleted, not maintained behind a flag.
|
|
47
|
+
- If the diff amends an existing contract, it changes the contract directly — no parallel interpretation.
|
|
48
|
+
|
|
49
|
+
## Axis E — Agent-facing clarity
|
|
50
|
+
|
|
51
|
+
- **Compass scaffolding**: new non-trivial source files carry `MODULE_CONTRACT` and `CHANGE_SUMMARY`; high-risk files carry `@ai-invariant` lines.
|
|
52
|
+
- **No ungrounded assertions**: code comments and docstrings reference real functions, types, and files — no invented APIs or phantom parameters.
|
|
53
|
+
- **Readable by another agent**: variable names reveal what they hold; function names reveal what they do; no mysterious names.
|
|
54
|
+
- **Log-driven development**: logs carry enough context for debugging; no bare `console.log` without context or structure. Prefer the repo's shared logging contracts when they exist.
|
|
55
|
+
- **Anti-fabrication**: if the diff includes content claims (prose, business records), the code distinguishes between generated content and human-authored content.
|
|
56
|
+
|
|
57
|
+
## Axis F — Pragmatism
|
|
58
|
+
|
|
59
|
+
- **Minimal command surface**: each new command earns its existence — no command that could be a flag on an existing command.
|
|
60
|
+
- **Lean contracts**: TypeScript types are the minimum needed — no speculative generality, no unused optional fields.
|
|
61
|
+
- **Existing patterns**: the diff checks whether an existing command, schema, or pattern can be extended before introducing a new one.
|
|
62
|
+
- **Scope discipline**: the diff touches only what's necessary; no scope creep into unrelated areas.
|
|
63
|
+
|
|
64
|
+
## Axis G — Blind spots
|
|
65
|
+
|
|
66
|
+
- **Performance**: new build-time commands specify their cost (file scan count, regex complexity, I/O patterns).
|
|
67
|
+
- **False positives**: new validators estimate their false-positive rate and describe suppression during migration.
|
|
68
|
+
- **Edge cases**: the diff considers empty states (new app with no content), concurrent execution, and interrupted operations.
|
|
69
|
+
- **Migration path**: existing apps' path to compliance is documented.
|
|
70
|
+
- **Security / privacy**: if the diff touches user data, PII, or external services, it addresses GDPR/privacy and secret management. No cookies (`document.cookie`, `Set-Cookie`). Client-side persistence is `localStorage` only; server-side is `unstorage`.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Learned Principles
|
|
2
|
+
|
|
3
|
+
Principles learned across sessions by the `fo-session-retro` skill. These are accumulated observations about insight triage quality, categorization accuracy, and routing decisions.
|
|
4
|
+
|
|
5
|
+
## Format
|
|
6
|
+
|
|
7
|
+
Each principle: a concise statement, optionally with a rationale.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
1. **Filter out transient issues.** Pre-existing TypeScript errors, broken builds, or CI failures that are unrelated to the session's work and will be fixed quickly by other agents are NOT useful insights. Do not route them to any destination. Only capture knowledge that remains useful weeks or months later.
|
|
12
|
+
|
|
13
|
+
2. **Check whether a "rule" is already enforced by a command before routing it to AGENTS.md.** If an automated check already catches the problem (e.g. error code conflicts caught by a validator), the insight is context, not a rule. Rules are for conventions that no command enforces yet.
|
|
14
|
+
|
|
15
|
+
3. **Filter out one-off completed actions.** Insights that describe a finished migration step, a one-time rename, or any action that won't recur are NOT useful — they describe history, not future-relevant knowledge. Only capture insights that describe patterns, traps, or conventions another agent will encounter again. Test: "Will this situation arise in a future session?" If no, drop.
|
|
@@ -34,8 +34,8 @@ After every standalone operator request that produces file changes, perform the
|
|
|
34
34
|
2. **Verify diff before staging.** Run `git diff` (not just `git diff --cached`) on every file the agent touched in this request, in each dirty tree. Confirm the changes are the agent's own work and not foreign changes from another session. If foreign changes are found, exclude them from staging.
|
|
35
35
|
3. **Stage only agent-changed files.** Stage only the files the agent modified in this request. Never use `git add -A` or `git add .` — another agent or session may have unrelated changes in the working tree. Stage files by explicit path: `git add <path1> <path2> ...`.
|
|
36
36
|
4. **Form commit message.** Write a conventional commit message (`fix:`, `feat:`, `refactor:`, `docs:`, `chore:`) based on the work performed in this request. The agent determines the type and description from the context of the request.
|
|
37
|
-
5. **Commit in monorepo.** Use `pnpm exec werkstatt run ecosystem.commit --message
|
|
38
|
-
6. **Commit in mission workpiece (if applicable).** If the agent changed files in the active mission workpiece, commit there via `
|
|
37
|
+
5. **Commit in monorepo.** Use `pnpm exec werkstatt run ecosystem.commit --message "<message>"` to commit in the werkstatt monorepo. This handles platform-scope version bumps and X-Platform-Bump trailers automatically. Stage files with `git add <paths>` first (the pre-commit hook blocks raw `git commit` for platform-scope files). For non-platform-only changes (docs/**), `ecosystem.commit` delegates to a plain `git commit` without version bump.
|
|
38
|
+
6. **Commit in mission workpiece (if applicable).** If the agent changed files in the active mission workpiece, commit there via `git commit` in the workpiece directory.
|
|
39
39
|
7. **Verify clean trees.** After all commits, run `bash scripts/check-clean-trees.sh` again. If any tree is still dirty, report to the operator.
|
|
40
40
|
|
|
41
41
|
## What this skill does NOT do
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Auto detect text files and perform LF normalization
|
|
2
|
+
* text=auto eol=lf
|
|
3
|
+
|
|
4
|
+
# Source code
|
|
5
|
+
*.ts text eol=lf
|
|
6
|
+
*.tsx text eol=lf
|
|
7
|
+
*.astro text eol=lf
|
|
8
|
+
*.css text eol=lf
|
|
9
|
+
*.scss text eol=lf
|
|
10
|
+
*.json text eol=lf
|
|
11
|
+
*.jsonc text eol=lf
|
|
12
|
+
*.md text eol=lf
|
|
13
|
+
*.yml text eol=lf
|
|
14
|
+
*.yaml text eol=lf
|
|
15
|
+
*.mjs text eol=lf
|
|
16
|
+
*.cjs text eol=lf
|
|
17
|
+
*.js text eol=lf
|
|
18
|
+
*.jsx text eol=lf
|
|
19
|
+
*.sh text eol=lf
|
|
20
|
+
*.ps1 text eol=lf
|
|
21
|
+
|
|
22
|
+
# Add project-specific source extensions here:
|
|
23
|
+
# *.go text eol=lf
|
|
24
|
+
# *.rs text eol=lf
|
|
25
|
+
# *.java text eol=lf
|
|
26
|
+
# *.kt text eol=lf
|
|
27
|
+
# *.cs text eol=lf
|
|
28
|
+
# *.py text eol=lf
|
|
29
|
+
# *.rb text eol=lf
|
|
30
|
+
# *.php text eol=lf
|
|
31
|
+
|
|
32
|
+
# Ensure Windows batch files still have CRLF (if any)
|
|
33
|
+
*.cmd text eol=crlf
|
|
34
|
+
*.bat text eol=crlf
|
|
35
|
+
|
|
36
|
+
# Binary files (do not modify)
|
|
37
|
+
*.png binary
|
|
38
|
+
*.jpg binary
|
|
39
|
+
*.jpeg binary
|
|
40
|
+
*.gif binary
|
|
41
|
+
*.ico binary
|
|
42
|
+
*.svg binary
|
|
43
|
+
*.woff binary
|
|
44
|
+
*.woff2 binary
|
|
45
|
+
*.ttf binary
|
|
46
|
+
*.eot binary
|
|
47
|
+
*.mp4 binary
|
|
48
|
+
*.webm binary
|
|
49
|
+
*.webp binary
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
## Windows agent tooling
|
|
2
|
+
|
|
3
|
+
This project is developed on Windows 10/11. AI agents editing this project must follow the command allow-list below instead of assuming a POSIX environment.
|
|
4
|
+
|
|
5
|
+
### Tooling tiers
|
|
6
|
+
|
|
7
|
+
| Tier | Delivery | Examples | How agents use them |
|
|
8
|
+
| --- | --- | --- | --- |
|
|
9
|
+
| **Native Windows** | winget or built-in | `git`, `node`, `npm`, `pnpm`, `python`, `pip`, `jq`, `curl`, `docker`, `wsl` | Directly in PowerShell/CMD. |
|
|
10
|
+
| **Git Bash POSIX coreutils** | Shipped with `Git.Git` | `bash`, `grep`, `sed`, `awk`, `find`, `tar`, `ls`, `xargs` | Through `bash -c "..."`. Paths remain Windows-style. |
|
|
11
|
+
| **WSL2 Ubuntu** | `wsl --install -d Ubuntu` | GNU coreutils, `apt` packages | Via `wsl <command>` or `wsl bash -c "..."`. Convert Windows paths with `wslpath` first. |
|
|
12
|
+
|
|
13
|
+
### Verified installation commands
|
|
14
|
+
|
|
15
|
+
```powershell
|
|
16
|
+
winget install -e --id Git.Git
|
|
17
|
+
winget install -e --id OpenJS.NodeJS.LTS
|
|
18
|
+
winget install -e --id Python.Python.3
|
|
19
|
+
winget install -e --id jqlang.jq
|
|
20
|
+
winget install -e --id cURL.cURL
|
|
21
|
+
winget install -e --id Docker.DockerDesktop
|
|
22
|
+
wsl --install -d Ubuntu
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Agent command rules
|
|
26
|
+
|
|
27
|
+
- **MAY** use `wsl <command>` when the tool is listed as WSL-only.
|
|
28
|
+
- **MAY** use `bash -c "..."` when running inside Git Bash.
|
|
29
|
+
- **MUST** convert Windows paths to WSL paths with `wslpath` before passing them to `wsl` commands.
|
|
30
|
+
- **MUST NOT** assume `grep`, `find`, `sed`, `awk`, `jq`, `curl` exist in PowerShell unless installed natively and verified with `Get-Command`.
|
|
31
|
+
- **MUST NOT** modify `.gitattributes` without explicit approval; the line-ending contract is load-bearing.
|
|
32
|
+
- **SHOULD** prefer exact winget IDs (`-e --id`) when installing tools on Windows.
|
|
33
|
+
|
|
34
|
+
### Path translation
|
|
35
|
+
|
|
36
|
+
```powershell
|
|
37
|
+
# PowerShell → WSL
|
|
38
|
+
wsl bash -c "cat $(wslpath 'C:\Users\user\file.txt')"
|
|
39
|
+
|
|
40
|
+
# PowerShell → Git Bash (paths stay Windows-style)
|
|
41
|
+
bash -c "grep pattern C:/Users/user/file.txt"
|
|
42
|
+
```
|