@warpgogol/forge 0.3.1 → 0.5.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.
- package/AGENTS.md +152 -5
- package/dist/bin/cli.js +4 -5
- package/dist/bin/cli.js.map +1 -1
- package/dist/os/adr/adr.module.d.ts.map +1 -1
- package/dist/os/adr/adr.module.js +4 -2
- package/dist/os/adr/adr.module.js.map +1 -1
- package/dist/os/adr/handlers/validate.d.ts.map +1 -1
- package/dist/os/adr/handlers/validate.js +32 -4
- package/dist/os/adr/handlers/validate.js.map +1 -1
- package/dist/os/compass/compass.module.d.ts.map +1 -1
- package/dist/os/compass/compass.module.js +4 -0
- package/dist/os/compass/compass.module.js.map +1 -1
- package/dist/os/compass/handlers/resolve-scan-root.d.ts.map +1 -1
- package/dist/os/compass/handlers/resolve-scan-root.js +16 -0
- package/dist/os/compass/handlers/resolve-scan-root.js.map +1 -1
- package/dist/os/core/core.module.d.ts.map +1 -1
- package/dist/os/core/core.module.js +82 -3
- package/dist/os/core/core.module.js.map +1 -1
- package/dist/os/core/handlers/knowledge-compact.d.ts +4 -0
- package/dist/os/core/handlers/knowledge-compact.d.ts.map +1 -0
- package/dist/os/core/handlers/knowledge-compact.js +198 -0
- package/dist/os/core/handlers/knowledge-compact.js.map +1 -0
- package/dist/os/rfc/handlers/implement-stamp.d.ts.map +1 -1
- package/dist/os/rfc/handlers/implement-stamp.js +10 -6
- package/dist/os/rfc/handlers/implement-stamp.js.map +1 -1
- package/dist/os/rfc/handlers/index-graph.js +2 -2
- package/dist/os/rfc/handlers/index-graph.js.map +1 -1
- package/dist/os/rfc/handlers/lifecycle.d.ts.map +1 -1
- package/dist/os/rfc/handlers/lifecycle.js +4 -5
- package/dist/os/rfc/handlers/lifecycle.js.map +1 -1
- package/dist/os/rfc/handlers/pipeline-status.js +1 -1
- package/dist/os/rfc/handlers/pipeline-status.js.map +1 -1
- package/dist/os/rfc/handlers/validate-rules.d.ts.map +1 -1
- package/dist/os/rfc/handlers/validate-rules.js +41 -3
- package/dist/os/rfc/handlers/validate-rules.js.map +1 -1
- package/dist/os/rfc/handlers/validate.js +1 -1
- package/dist/os/rfc/handlers/validate.js.map +1 -1
- package/dist/os/rfc/rfc.module.d.ts.map +1 -1
- package/dist/os/rfc/rfc.module.js +15 -10
- package/dist/os/rfc/rfc.module.js.map +1 -1
- package/dist/os/session/handlers/validate.js +1 -1
- package/dist/os/session/handlers/validate.js.map +1 -1
- package/dist/os/session/session.module.d.ts.map +1 -1
- package/dist/os/session/session.module.js +4 -2
- package/dist/os/session/session.module.js.map +1 -1
- package/dist/os/spec/spec-schema.d.ts +1 -1
- package/dist/os/werkstatt/handlers/lock.d.ts.map +1 -1
- package/dist/os/werkstatt/handlers/lock.js +27 -1
- package/dist/os/werkstatt/handlers/lock.js.map +1 -1
- package/dist/os/werkstatt/handlers/schema.d.ts +1 -0
- package/dist/os/werkstatt/handlers/schema.d.ts.map +1 -1
- package/dist/os/werkstatt/handlers/schema.js +1 -0
- package/dist/os/werkstatt/handlers/schema.js.map +1 -1
- package/dist/src/config/forge-config.d.ts +70 -3
- package/dist/src/config/forge-config.d.ts.map +1 -1
- package/dist/src/config/forge-config.js +91 -4
- package/dist/src/config/forge-config.js.map +1 -1
- package/dist/src/index.d.ts +3 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +6 -2
- package/dist/src/index.js.map +1 -1
- package/dist/src/knowledge/budgets.d.ts +38 -0
- package/dist/src/knowledge/budgets.d.ts.map +1 -0
- package/dist/src/knowledge/budgets.js +157 -0
- package/dist/src/knowledge/budgets.js.map +1 -0
- package/dist/src/knowledge/compact.d.ts +47 -0
- package/dist/src/knowledge/compact.d.ts.map +1 -0
- package/dist/src/knowledge/compact.js +322 -0
- package/dist/src/knowledge/compact.js.map +1 -0
- package/dist/src/knowledge/index.d.ts +7 -0
- package/dist/src/knowledge/index.d.ts.map +1 -0
- package/dist/src/knowledge/index.js +19 -0
- package/dist/src/knowledge/index.js.map +1 -0
- package/dist/src/knowledge/parse.d.ts +3 -0
- package/dist/src/knowledge/parse.d.ts.map +1 -0
- package/dist/src/knowledge/parse.js +205 -0
- package/dist/src/knowledge/parse.js.map +1 -0
- package/dist/src/knowledge/promote.d.ts +37 -0
- package/dist/src/knowledge/promote.d.ts.map +1 -0
- package/dist/src/knowledge/promote.js +120 -0
- package/dist/src/knowledge/promote.js.map +1 -0
- package/dist/src/knowledge/schema.d.ts +61 -0
- package/dist/src/knowledge/schema.d.ts.map +1 -0
- package/dist/src/knowledge/schema.js +64 -0
- package/dist/src/knowledge/schema.js.map +1 -0
- package/dist/src/knowledge/serialize.d.ts +3 -0
- package/dist/src/knowledge/serialize.d.ts.map +1 -0
- package/dist/src/knowledge/serialize.js +67 -0
- package/dist/src/knowledge/serialize.js.map +1 -0
- package/dist/src/onboarding/agents-generate.d.ts +19 -0
- package/dist/src/onboarding/agents-generate.d.ts.map +1 -1
- package/dist/src/onboarding/agents-generate.js +156 -66
- package/dist/src/onboarding/agents-generate.js.map +1 -1
- package/dist/src/onboarding/create.d.ts.map +1 -1
- package/dist/src/onboarding/create.js +66 -10
- package/dist/src/onboarding/create.js.map +1 -1
- package/dist/src/onboarding/doctor.d.ts +13 -1
- package/dist/src/onboarding/doctor.d.ts.map +1 -1
- package/dist/src/onboarding/doctor.js +613 -7
- package/dist/src/onboarding/doctor.js.map +1 -1
- package/dist/src/onboarding/init.d.ts +8 -1
- package/dist/src/onboarding/init.d.ts.map +1 -1
- package/dist/src/onboarding/init.js +33 -2
- package/dist/src/onboarding/init.js.map +1 -1
- package/dist/src/onboarding/memory-scaffold.d.ts +18 -0
- package/dist/src/onboarding/memory-scaffold.d.ts.map +1 -0
- package/dist/src/onboarding/memory-scaffold.js +151 -0
- package/dist/src/onboarding/memory-scaffold.js.map +1 -0
- package/dist/src/onboarding/nested-agents-generate.d.ts +16 -0
- package/dist/src/onboarding/nested-agents-generate.d.ts.map +1 -0
- package/dist/src/onboarding/nested-agents-generate.js +69 -0
- package/dist/src/onboarding/nested-agents-generate.js.map +1 -0
- package/dist/src/onboarding/nested-agents-templates.d.ts +26 -0
- package/dist/src/onboarding/nested-agents-templates.d.ts.map +1 -0
- package/dist/src/onboarding/nested-agents-templates.js +178 -0
- package/dist/src/onboarding/nested-agents-templates.js.map +1 -0
- package/dist/src/onboarding/profile-validate.d.ts +13 -0
- package/dist/src/onboarding/profile-validate.d.ts.map +1 -0
- package/dist/src/onboarding/profile-validate.js +109 -0
- package/dist/src/onboarding/profile-validate.js.map +1 -0
- package/dist/src/onboarding/upgrade.d.ts +6 -0
- package/dist/src/onboarding/upgrade.d.ts.map +1 -1
- package/dist/src/onboarding/upgrade.js +45 -1
- package/dist/src/onboarding/upgrade.js.map +1 -1
- package/dist/src/onboarding/workspace-discovery.d.ts +11 -0
- package/dist/src/onboarding/workspace-discovery.d.ts.map +1 -0
- package/dist/src/onboarding/workspace-discovery.js +138 -0
- package/dist/src/onboarding/workspace-discovery.js.map +1 -0
- package/dist/src/profiles/profile-schema.d.ts +116 -0
- package/dist/src/profiles/profile-schema.d.ts.map +1 -0
- package/dist/src/profiles/profile-schema.js +94 -0
- package/dist/src/profiles/profile-schema.js.map +1 -0
- package/dist/src/profiles/stack-profile.d.ts +41 -1
- package/dist/src/profiles/stack-profile.d.ts.map +1 -1
- package/dist/src/profiles/stack-profile.js +9 -0
- package/dist/src/profiles/stack-profile.js.map +1 -1
- package/dist/src/profiles/terminology-utils.d.ts +8 -0
- package/dist/src/profiles/terminology-utils.d.ts.map +1 -0
- package/dist/src/profiles/terminology-utils.js +31 -0
- package/dist/src/profiles/terminology-utils.js.map +1 -0
- package/dist/src/types.d.ts +0 -1
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/fs-idempotent.d.ts +1 -1
- package/dist/src/utils/fs-idempotent.d.ts.map +1 -1
- package/dist/src/utils/fs-idempotent.js +12 -3
- package/dist/src/utils/fs-idempotent.js.map +1 -1
- package/dist/src/validators/skill-validate.d.ts +15 -0
- package/dist/src/validators/skill-validate.d.ts.map +1 -1
- package/dist/src/validators/skill-validate.js +204 -2
- package/dist/src/validators/skill-validate.js.map +1 -1
- package/package.json +2 -2
- package/profiles/astro-typescript-turborepo.yaml +87 -0
- package/profiles/editframe-html-templates/composition-agents.md +34 -0
- package/profiles/editframe-html-templates/composition.html +32 -0
- package/profiles/editframe-html.yaml +283 -0
- package/profiles/forge-shell.yaml +77 -0
- package/profiles/phaser-turborepo.yaml +87 -0
- package/skills/fo/fo-doc-audit/SKILL.md +6 -6
- package/skills/fo/fo-fix/SKILL.md +11 -0
- package/skills/fo/fo-handoff/SKILL.md +2 -1
- package/skills/fo/fo-idea-implement/SKILL.md +44 -2
- package/skills/fo/fo-idea-plan/SKILL.md +1 -0
- package/skills/fo/fo-knowledge-distill/SKILL.md +170 -0
- package/skills/fo/fo-memory-sync/SKILL.md +6 -3
- package/skills/fo/fo-memory-sync/fix-patterns.md +38 -4
- package/skills/fo/fo-review/SKILL.md +2 -2
- package/skills/fo/fo-session-retro/SKILL.md +21 -11
- package/skills/fo/fo-session-save/SKILL.md +3 -4
- package/skills/fo/fo-session-save/fix-patterns.md +53 -29
- package/skills/fo/fo-session-save/learned-principles.md +59 -8
- package/skills/fo/fo-step-commit/SKILL.md +55 -0
- package/skills/meta/forge-bootstrap/SKILL.md +28 -4
- package/skills/meta/forge-bootstrap/operator-profile-template.md +1 -0
- package/skills/meta/skill-create/SKILL.md +1 -1
- package/skills/shared/grilling/SKILL.md +1 -1
- package/skills/shared/grilling/learned-principles.md +14 -0
- package/skills/shared/grilling/qa-log.md +105 -6
- package/skills/shared/knowledge/learned-principles.md +5 -0
- package/skills/shared/windows-ai-tooling/SKILL.md +154 -1
- package/skills/shared/writing-great-skills/SKILL.md +74 -1
|
@@ -39,6 +39,7 @@ Interactive skill for configuring a freshly created forge project. Runs after `f
|
|
|
39
39
|
- The skill never collects personal data as a separate interview before the first creation moment — personal data emerges naturally from the creative dialogue.
|
|
40
40
|
- `operator-profile.md` is local and private — it is in `.gitignore` and is not committed to the repository. The operator can delete it at any time.
|
|
41
41
|
- Gender is optional — the operator may decline to provide it. If declined, the skill uses gender-neutral addressing and notes the absence in `operator-profile.md`.
|
|
42
|
+
- Form of address defaults to formal if the operator skips the question.
|
|
42
43
|
- The skill never informs the operator about migration, version numbers, or upgrade mechanics — the silent version check in step 0 is invisible to the operator.
|
|
43
44
|
- The skill never asks the operator for permission to migrate — if versions differ, migration runs automatically.
|
|
44
45
|
|
|
@@ -83,7 +84,7 @@ Accept the operator's choice and store it:
|
|
|
83
84
|
|
|
84
85
|
The register controls whether the extended behavioral layer is included in `AGENTS.md`. Both registers receive the full core behavioral layer. The operator can change the register at any time via live operator feedback.
|
|
85
86
|
|
|
86
|
-
### 3. Operator name and
|
|
87
|
+
### 3. Operator name, gender, and form of address (new)
|
|
87
88
|
|
|
88
89
|
Ask the operator:
|
|
89
90
|
|
|
@@ -95,7 +96,18 @@ Then ask:
|
|
|
95
96
|
|
|
96
97
|
If the operator declines to provide gender, use gender-neutral addressing and note the absence in `operator-profile.md` under `## Personal`.
|
|
97
98
|
|
|
98
|
-
|
|
99
|
+
Then ask about the form of address:
|
|
100
|
+
|
|
101
|
+
> Do you prefer informal or formal address? In some languages this means saying "you" in a familiar way (e.g. "ty" in Russian/Ukrainian, "du" in German) versus a more formal way (e.g. "vy" in Russian/Ukrainian, "Sie" in German). If you're not sure, formal is the safe default.
|
|
102
|
+
|
|
103
|
+
Accept the operator's choice and store it:
|
|
104
|
+
|
|
105
|
+
- In `PREFERENCES.md` as `formOfAddress: formal` or `formOfAddress: informal`.
|
|
106
|
+
- In `operator-profile.md` under `## Register`.
|
|
107
|
+
|
|
108
|
+
If the operator skips the question, default to `formOfAddress: formal`. The preference applies to all agent-generated text: chat messages, reports, suggestions, and skill output. The operator can change it at any time by editing `PREFERENCES.md`.
|
|
109
|
+
|
|
110
|
+
Store the operator's name, gender (or absence), and form of address in `operator-profile.md` under `## Personal` and `## Register`. These are the only personal data collected before the first creation moment.
|
|
99
111
|
|
|
100
112
|
### 4. Verify forge project
|
|
101
113
|
|
|
@@ -161,7 +173,7 @@ The transplant mode performs real code migration via a migration-adapter registr
|
|
|
161
173
|
|
|
162
174
|
6.7. **Build verification and error repair** — after post-setup, verify the transplanted project builds successfully:
|
|
163
175
|
|
|
164
|
-
1. Resolve the build command via `ref(forge.yaml bindings.commands.
|
|
176
|
+
1. Resolve the build command via `ref(forge.yaml bindings.commands.produce)`. If the binding is null (the migration adapter could not derive a build command from the source project), skip build verification with a note in the welcoming report and continue to the next step.
|
|
165
177
|
2. Run the resolved build command and capture stdout/stderr. Set a timeout of 300 seconds (configurable); if the build does not complete in time, report the timeout in human language and continue.
|
|
166
178
|
3. Parse build output for:
|
|
167
179
|
- Missing modules (TS2307: Cannot find module 'X')
|
|
@@ -225,6 +237,18 @@ The operator can choose to start one immediately or defer.
|
|
|
225
237
|
|
|
226
238
|
If project analysis finds nothing recommendable (transplant of an empty or minimal project), the skill skips recommendations and proceeds to the first creation moment with a direct invitation to start creating.
|
|
227
239
|
|
|
240
|
+
### 9.1. Hand-written AGENTS.md improvement proposals (transplant only)
|
|
241
|
+
|
|
242
|
+
After project analysis, the skill checks existing hand-written `AGENTS.md` files in workspace directories (directories with a `package.json`). For each hand-written `AGENTS.md` (one without a generated marker), the skill checks for common forge conventions:
|
|
243
|
+
|
|
244
|
+
- Does the file reference the root `AGENTS.md` for project-wide rules?
|
|
245
|
+
- Does the file include workspace-type-appropriate guidance (app, package, service)?
|
|
246
|
+
- Does the file contain a generated marker (it should not for hand-written files)?
|
|
247
|
+
|
|
248
|
+
If improvement opportunities are found, the skill proposes them to the operator in creator-facing language (in `aiLanguage`). The operator confirms before any file is modified. Proposals are opt-in — the operator can decline all or select specific improvements.
|
|
249
|
+
|
|
250
|
+
If no hand-written `AGENTS.md` files exist, or no improvement opportunities are found, this step is skipped silently.
|
|
251
|
+
|
|
228
252
|
### 10. First creation moment (new)
|
|
229
253
|
|
|
230
254
|
After the welcoming report, the skill helps the operator create something real immediately — not a placeholder, not a test, but a first piece of their actual project.
|
|
@@ -327,7 +351,7 @@ The skill declares the following knowledge files in its `knowledge` frontmatter
|
|
|
327
351
|
|
|
328
352
|
### 14. Privacy
|
|
329
353
|
|
|
330
|
-
`operator-profile.md` contains personal data: operator name, gender, project story, deep purpose, creative influences, target audience, writing voice. Gender is special category data under GDPR Article 9. To prevent accidental exposure:
|
|
354
|
+
`operator-profile.md` contains personal data: operator name, gender, form of address, project story, deep purpose, creative influences, target audience, writing voice. Gender is special category data under GDPR Article 9. To prevent accidental exposure:
|
|
331
355
|
|
|
332
356
|
- `operator-profile.md` is in `.gitignore` (added by scaffold profiles).
|
|
333
357
|
- The skill informs the operator that `operator-profile.md` is local and private — it is not committed to the repository.
|
|
@@ -15,6 +15,7 @@ This file is private and local to your project. It is not committed to the repos
|
|
|
15
15
|
## Register
|
|
16
16
|
|
|
17
17
|
- **Communication register:** (business | creative — how you prefer the system to work with you)
|
|
18
|
+
- **Form of address:** (formal | informal — how the system should address you in languages with a formal/informal distinction)
|
|
18
19
|
|
|
19
20
|
## Communication style
|
|
20
21
|
|
|
@@ -46,7 +46,7 @@ Before creating knowledge files, the agent analyzes the skill's knowledge domain
|
|
|
46
46
|
|
|
47
47
|
3. **Which layers are needed?** Not every skill needs all three. `grilling` uses L0+L2 only. A site-scanning skill with all three layers is a good example. A skill with purely reactive error resolution may use L1+L2 only (no Q&A log).
|
|
48
48
|
|
|
49
|
-
Present the analysis to the operator. If they confirm, create the knowledge files with header comments matching the chosen structure and add `knowledge:` to the frontmatter. See `writing-great-skills` § Cumulative knowledge pattern for the three-layer reference pattern and mutation contract.
|
|
49
|
+
Present the analysis to the operator. If they confirm, create the knowledge files with header comments matching the chosen structure and add `knowledge:` to the frontmatter. See `writing-great-skills` § Cumulative knowledge pattern for the three-layer reference pattern, entry format, and mutation contract.
|
|
50
50
|
|
|
51
51
|
### 2. Scaffold
|
|
52
52
|
|
|
@@ -13,7 +13,7 @@ knowledge:
|
|
|
13
13
|
|
|
14
14
|
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.
|
|
15
15
|
|
|
16
|
-
Read `learned-principles.md` (L2) at the start of each session to improve recommended answers. Principles with `confirmations >= 3` may be applied autonomously — but re-evaluate if context changes.
|
|
16
|
+
Read `learned-principles.md` (L2) at the start of each session to improve recommended answers. Apply only entries with `status: active`; skip entries with `status: stale`, `superseded`, or `archived`. Principles with `confirmations >= 3` may be applied autonomously — but re-evaluate if context changes.
|
|
17
17
|
|
|
18
18
|
Interview me relentlessly about every aspect of this plan until we reach a shared understanding. Walk down each branch of the design tree, resolving dependencies between decisions one-by-one. For each question, provide your recommended answer.
|
|
19
19
|
|
|
@@ -10,3 +10,17 @@ Concrete principles distilled from past grilling sessions. Each principle has a
|
|
|
10
10
|
- **confirmations:** <N>
|
|
11
11
|
- **Added:** <date>
|
|
12
12
|
-->
|
|
13
|
+
|
|
14
|
+
### K-0001: Extend infrastructure before feature logic
|
|
15
|
+
|
|
16
|
+
```knowledge-entry
|
|
17
|
+
id: K-0001
|
|
18
|
+
layer: L2
|
|
19
|
+
created: 2026-08-03
|
|
20
|
+
lastConfirmedAt: 2026-08-03
|
|
21
|
+
confirmations: 1
|
|
22
|
+
status: active
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
- **Condition:** Plan grilling reveals that a feature depends on a schema field, serializer entry, or validation path that doesn't exist in the underlying module yet.
|
|
26
|
+
- **Recommended answer:** Add a separate plan step to extend the infrastructure (schema, serializer, validator) before any step that creates or reads the new field/path. Zod safeParse silently strips unknown fields; fixed-order serializers skip unknown fields. Without the extension step, data is silently lost.
|
|
@@ -1,10 +1,109 @@
|
|
|
1
|
+
<!-- knowledge-layer: L0 -->
|
|
2
|
+
|
|
1
3
|
# Q&A Log (L0)
|
|
2
4
|
|
|
3
5
|
Append-only log of questions asked and answers given during grilling sessions. Used for meta-analysis to distill recurring decision patterns.
|
|
4
6
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
### K-0001: Entry format for L0/L1/L2 knowledge records
|
|
8
|
+
|
|
9
|
+
```knowledge-entry
|
|
10
|
+
id: K-0001
|
|
11
|
+
layer: L0
|
|
12
|
+
created: 2026-08-03
|
|
13
|
+
status: active
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
- **Context:** 2026-08-03 — forge knowledge lifecycle RFC series (RFC-1..5)
|
|
17
|
+
- **Question:** Entry format for L0/L1/L2 knowledge records?
|
|
18
|
+
- **Answer:** Markdown files with per-entry YAML metadata blocks (human-readable, grep-able, parseable); soft migration for existing freeform entries.
|
|
19
|
+
|
|
20
|
+
### K-0002: How to define and enforce layer token budgets
|
|
21
|
+
|
|
22
|
+
```knowledge-entry
|
|
23
|
+
id: K-0002
|
|
24
|
+
layer: L0
|
|
25
|
+
created: 2026-08-03
|
|
26
|
+
status: active
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
- **Context:** 2026-08-03 — forge knowledge lifecycle RFC series (RFC-1..5)
|
|
30
|
+
- **Question:** How to define and enforce layer token budgets?
|
|
31
|
+
- **Answer:** Hard defaults in forge (L2 hot ~4KB, L1 warm ~8KB, L0 cold unbudgeted), optional override in forge.yaml bindings; warning on exceed, not error.
|
|
32
|
+
|
|
33
|
+
### K-0003: Where does AI distillation L0→L1/L2 live
|
|
34
|
+
|
|
35
|
+
```knowledge-entry
|
|
36
|
+
id: K-0003
|
|
37
|
+
layer: L0
|
|
38
|
+
created: 2026-08-03
|
|
39
|
+
status: active
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
- **Context:** 2026-08-03 — forge knowledge lifecycle RFC series (RFC-1..5)
|
|
43
|
+
- **Question:** Where does AI distillation L0→L1/L2 live?
|
|
44
|
+
- **Answer:** New skill fo-knowledge-distill alongside deterministic forge.skill.knowledge.compact command; code mutates metadata, agent distills meaning.
|
|
45
|
+
|
|
46
|
+
### K-0004: Should .agents/memory/ be versioned in git
|
|
47
|
+
|
|
48
|
+
```knowledge-entry
|
|
49
|
+
id: K-0004
|
|
50
|
+
layer: L0
|
|
51
|
+
created: 2026-08-03
|
|
52
|
+
status: active
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
- **Context:** 2026-08-03 — forge knowledge lifecycle RFC series (RFC-1..5)
|
|
56
|
+
- **Question:** Should .agents/memory/ be versioned in git?
|
|
57
|
+
- **Answer:** Hybrid — MEMORY.md (curated) versioned, daily logs git-ignored.
|
|
58
|
+
|
|
59
|
+
### K-0005: Schema extension before logic that depends on new fields
|
|
60
|
+
|
|
61
|
+
```knowledge-entry
|
|
62
|
+
id: K-0005
|
|
63
|
+
layer: L0
|
|
64
|
+
created: 2026-08-03
|
|
65
|
+
status: active
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
- **Context:** 2026-08-03 — grilling RFC-0663 plan (cross-skill knowledge promotion)
|
|
69
|
+
- **Question:** RFC proposes a new metadata field (promotedFrom) but the underlying schema (RFC-0660) doesn't define it. Where should schema extension live in the plan?
|
|
70
|
+
- **Answer:** Schema extension must be a separate step before any logic that creates or reads the field. Zod safeParse silently strips unknown fields; the serializer uses a fixed FIELD_ORDER array. Without extending both, the field is lost on parse and never written on serialize.
|
|
71
|
+
|
|
72
|
+
### K-0006: Doctor check status for informational warnings
|
|
73
|
+
|
|
74
|
+
```knowledge-entry
|
|
75
|
+
id: K-0006
|
|
76
|
+
layer: L0
|
|
77
|
+
created: 2026-08-03
|
|
78
|
+
status: active
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
- **Context:** 2026-08-03 — grilling RFC-0663 plan (knowledge-duplicate doctor check)
|
|
82
|
+
- **Question:** RFC says "informational warnings, never affects exit status." Should the doctor check use status "pass" or "warn"?
|
|
83
|
+
- **Answer:** Use "warn" when duplicates found, "pass" when none. Only "fail" affects exit status. "warn" makes duplicates visible in doctor summary (N warn(s)) and --json output, consistent with RFC-0661 SKILL-21 budget warnings. "pass" always would hide duplicates in the summary.
|
|
84
|
+
|
|
85
|
+
### K-0007: Validating non-skill knowledge files in doctor
|
|
86
|
+
|
|
87
|
+
```knowledge-entry
|
|
88
|
+
id: K-0007
|
|
89
|
+
layer: L0
|
|
90
|
+
created: 2026-08-03
|
|
91
|
+
status: active
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
- **Context:** 2026-08-03 — grilling RFC-0663 plan (shared knowledge layer validation)
|
|
95
|
+
- **Question:** The shared knowledge layer file is not inside a skill directory (no SKILL.md). Existing checks (checkLegacyKnowledgeSections, checkKnowledgeBudgets) and forge.skill.validate (SKILL-19/SKILL-20) discover knowledge files only through the skill registry. How to validate it?
|
|
96
|
+
- **Answer:** Add a dedicated checkSharedKnowledgeFile() in doctor.ts that parses the shared file via parseKnowledgeFile and checks SKILL-19 (schema validity) and SKILL-20 (id uniqueness) directly. A skill-wrapper would misrepresent the shared layer as a skill; skipping validation leaves schema violations undetected.
|
|
97
|
+
|
|
98
|
+
### K-0008: Dogfood criterion when no real duplicates exist
|
|
99
|
+
|
|
100
|
+
```knowledge-entry
|
|
101
|
+
id: K-0008
|
|
102
|
+
layer: L0
|
|
103
|
+
created: 2026-08-03
|
|
104
|
+
status: active
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
- **Context:** 2026-08-03 — grilling RFC-0663 plan (dogfood acceptance criterion)
|
|
108
|
+
- **Question:** RFC requires "at least one real duplicate pair promoted end-to-end" but the current monorepo has very few L2 entries across skills. Real duplicates are unlikely. How to handle the dogfood criterion?
|
|
109
|
+
- **Answer:** Conditional dogfood: run detection on the monorepo. If duplicates found, promote with operator approval. If none found, the detection pipeline running end-to-end (detection → doctor report → zero duplicates) serves as evidence. Promotion mechanics are verified by unit tests. Creating artificial test duplicates is not natural and would not test the real promotion path.
|
|
@@ -3,7 +3,7 @@ name: windows-ai-tooling
|
|
|
3
3
|
description: Bootstrap a Windows project for AI agents. Installs verified tools, generates .gitattributes, and emits a command allow-list for agent prompts. Run when starting a new project or when agents fail.
|
|
4
4
|
invocation: user
|
|
5
5
|
category: shared
|
|
6
|
-
concerns:
|
|
6
|
+
concerns: code-mutation
|
|
7
7
|
dependsOn: []
|
|
8
8
|
languagePolicy: ref(PREFERENCES.md)
|
|
9
9
|
---
|
|
@@ -189,6 +189,159 @@ Report:
|
|
|
189
189
|
- A copyable block with the agent prompt snippet.
|
|
190
190
|
- A reminder that re-running this skill is useful when adding a new tool or onboarding a new machine.
|
|
191
191
|
|
|
192
|
+
### 8. GitHub Actions CI (optional)
|
|
193
|
+
|
|
194
|
+
If the project uses GitHub Actions, generate or update `.github/workflows/ci.yml` with the following Windows-specific guidance:
|
|
195
|
+
|
|
196
|
+
#### Action versions
|
|
197
|
+
|
|
198
|
+
Use the latest official actions with Node 24 runtime:
|
|
199
|
+
|
|
200
|
+
- `actions/checkout@v5`
|
|
201
|
+
- `actions/setup-node@v5`
|
|
202
|
+
|
|
203
|
+
These versions use the Node 24 runtime that GitHub Actions now recommends. Older versions (`@v4` and below) run on the deprecated Node 20 runtime.
|
|
204
|
+
|
|
205
|
+
#### Windows runner images
|
|
206
|
+
|
|
207
|
+
Do not pin to `windows-latest` blindly — the image composition changes over time and a toolchain that worked yesterday may break today. If native compilation is critical, pin to a specific Windows image version (e.g. `windows-2022`) and verify the actual compiler version in CI output.
|
|
208
|
+
|
|
209
|
+
Do not hardcode the path to Visual Studio and do not let tooling auto-select the newest installed version. Some `node-gyp` versions do not yet recognize Visual Studio 2026. For those, install Visual Studio Build Tools 2022 and constrain the toolset search to the `[17.0,18.0)` range:
|
|
210
|
+
|
|
211
|
+
```yaml
|
|
212
|
+
- name: Set up Build Tools 2022
|
|
213
|
+
run: |
|
|
214
|
+
$vsPath = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" `
|
|
215
|
+
-latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 `
|
|
216
|
+
-property installationPath -version "[17.0,18.0)"
|
|
217
|
+
echo "VS_PATH=$vsPath" >> $env:GITHUB_ENV
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
Before installing dependencies, activate the Developer Command Prompt for the discovered Visual Studio in the same step so that `cl.exe` and the MSVC toolchain are on `PATH`:
|
|
221
|
+
|
|
222
|
+
```yaml
|
|
223
|
+
- name: Activate Developer Command Prompt
|
|
224
|
+
shell: cmd
|
|
225
|
+
run: |
|
|
226
|
+
call "%VS_PATH%\Common7\Tools\VsDevCmd.bat" -arch=x64 -host_arch=x64
|
|
227
|
+
pnpm install --frozen-lockfile
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
#### Native dependencies
|
|
231
|
+
|
|
232
|
+
Native dependencies (SQLite drivers, `better-sqlite3`, `sharp`, `node-sass`, etc.) need CI testing on each target OS. A prebuilt binary may not exist for every Node version + OS + architecture combination — when it is missing, `node-gyp` falls back to source compilation and requires a working C++ compiler.
|
|
233
|
+
|
|
234
|
+
Verify in CI that `pnpm install` succeeds without manual intervention on every OS in the matrix. If it fails, either:
|
|
235
|
+
|
|
236
|
+
- Add `node-gyp` build prerequisites to the CI step (Build Tools + Developer Command Prompt), or
|
|
237
|
+
- Pin to a Node version that has prebuilt binaries for all target platforms.
|
|
238
|
+
|
|
239
|
+
#### Diagnostic step on Windows failure
|
|
240
|
+
|
|
241
|
+
When a Windows CI job fails — especially during `pnpm install` or native compilation — add a diagnostic step that prints the toolchain versions. This is critical while the Windows image transitions to Visual Studio 2026 and `node-gyp` versions may not yet recognize it:
|
|
242
|
+
|
|
243
|
+
```yaml
|
|
244
|
+
- name: Diagnostics (on failure)
|
|
245
|
+
if: failure()
|
|
246
|
+
shell: pwsh
|
|
247
|
+
run: |
|
|
248
|
+
Write-Host "=== Node ==="
|
|
249
|
+
node --version
|
|
250
|
+
Write-Host "=== npm ==="
|
|
251
|
+
npm --version
|
|
252
|
+
Write-Host "=== pnpm ==="
|
|
253
|
+
pnpm --version
|
|
254
|
+
Write-Host "=== node-gyp ==="
|
|
255
|
+
npx node-gyp --version
|
|
256
|
+
Write-Host "=== MSVC ==="
|
|
257
|
+
& "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" `
|
|
258
|
+
-latest -products * -property displayName -version "[17.0,18.0)"
|
|
259
|
+
Write-Host "=== cl.exe ==="
|
|
260
|
+
where.exe cl 2>$null || Write-Host "cl.exe not found on PATH"
|
|
261
|
+
Write-Host "=== Python ==="
|
|
262
|
+
python --version 2>$null || Write-Host "Python not found"
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
The `if: failure()` condition ensures the step only runs when a previous step failed — it does not slow down successful runs. The output helps identify whether the failure is due to a missing compiler, wrong Visual Studio version, or a `node-gyp` incompatibility.
|
|
266
|
+
|
|
267
|
+
#### Windows long paths
|
|
268
|
+
|
|
269
|
+
If Windows is in the CI matrix, set `core.longpaths` **before** the checkout step via job-level env:
|
|
270
|
+
|
|
271
|
+
```yaml
|
|
272
|
+
jobs:
|
|
273
|
+
windows-ci:
|
|
274
|
+
runs-on: windows-2022
|
|
275
|
+
env:
|
|
276
|
+
GIT_CONFIG_COUNT: 1
|
|
277
|
+
GIT_CONFIG_KEY_0: core.longpaths
|
|
278
|
+
GIT_CONFIG_VALUE_0: "true"
|
|
279
|
+
steps:
|
|
280
|
+
- name: Checkout
|
|
281
|
+
uses: actions/checkout@v5
|
|
282
|
+
# ...
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
Without this, `git clone` fails on repositories with file paths longer than 260 characters (common in monorepos with deeply nested `node_modules` or generated content trees).
|
|
286
|
+
|
|
287
|
+
#### When to include Windows
|
|
288
|
+
|
|
289
|
+
Windows CI catches important platform-specific issues (path lengths, native builds, line endings), but it requires separate configuration of native dependencies, compiler toolchain, and shell differences (PowerShell vs bash). Only add Windows to the CI matrix where the product genuinely supports or ships Windows artifacts — not "just in case".
|
|
290
|
+
|
|
291
|
+
#### CI reliability patterns (all platforms)
|
|
292
|
+
|
|
293
|
+
Apply these to every workflow, not just Windows:
|
|
294
|
+
|
|
295
|
+
**Concurrency cancellation** — cancel superseded runs on PRs to save CI minutes and avoid cache thrashing:
|
|
296
|
+
|
|
297
|
+
```yaml
|
|
298
|
+
concurrency:
|
|
299
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
300
|
+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
**Minimal permissions** — default GitHub Actions grants `contents: write`. Restrict to read-only at the workflow level; escalate per-job only where needed (e.g. changelog commit):
|
|
304
|
+
|
|
305
|
+
```yaml
|
|
306
|
+
permissions:
|
|
307
|
+
contents: read
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
**Job timeouts** — the default 6-hour timeout can exhaust CI limits on a hung install or test. Set `timeout-minutes` per job: 10–15 for lint/validate, 20–30 for build/test.
|
|
311
|
+
|
|
312
|
+
**Deterministic timezone** — tests using `new Date()` produce different results depending on the runner's timezone. Set `TZ: UTC` at the job level to make timestamps deterministic across runs:
|
|
313
|
+
|
|
314
|
+
```yaml
|
|
315
|
+
jobs:
|
|
316
|
+
ci:
|
|
317
|
+
runs-on: ubuntu-latest
|
|
318
|
+
timeout-minutes: 15
|
|
319
|
+
env:
|
|
320
|
+
TZ: UTC
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
**Explicit shell** — on Windows the default shell is PowerShell, which breaks bash syntax. Steps using bash must declare `shell: bash`; Windows-specific steps should declare `shell: cmd` or `shell: pwsh`:
|
|
324
|
+
|
|
325
|
+
```yaml
|
|
326
|
+
- name: Run bash script
|
|
327
|
+
shell: bash
|
|
328
|
+
run: ./scripts/build.sh
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
#### Package-scoped commands
|
|
332
|
+
|
|
333
|
+
Do not run package-level tools (test runners, linters, build commands) from the monorepo root. Run them via the package's own script or workspace context:
|
|
334
|
+
|
|
335
|
+
```yaml
|
|
336
|
+
# Good — scoped to the package
|
|
337
|
+
- run: pnpm --filter <package-name> test
|
|
338
|
+
|
|
339
|
+
# Bad — runs from root, may pick up wrong config
|
|
340
|
+
- run: pnpm test
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
Ask: **"Настроить GitHub Actions CI для Windows? (Y/m/s)"**. Default **Y** if the project already has `.github/workflows/`; otherwise **s** (skip — the scaffolded CI template already includes Ubuntu-only CI).
|
|
344
|
+
|
|
192
345
|
## Constraints
|
|
193
346
|
|
|
194
347
|
- Default to automatic execution (`Y`) for every step. Offer `m` (manual) and `s` (skip) only as explicit opt-outs.
|
|
@@ -90,7 +90,7 @@ Use these to diagnose issues the user may be having with the skill.
|
|
|
90
90
|
|
|
91
91
|
## Cumulative knowledge pattern
|
|
92
92
|
|
|
93
|
-
Skills that run repeatedly accumulate knowledge across sessions. The cumulative knowledge convention provides an opt-in three-layer reference pattern for this.
|
|
93
|
+
Skills that run repeatedly accumulate knowledge across sessions. The cumulative knowledge convention provides an opt-in three-layer reference pattern (plus one shared cross-skill layer) for this.
|
|
94
94
|
|
|
95
95
|
### Knowledge frontmatter
|
|
96
96
|
|
|
@@ -116,6 +116,78 @@ Skills adopt 0, 1, 2, or 3 layers as needed — the pattern is adaptive, not man
|
|
|
116
116
|
|
|
117
117
|
Not every skill needs all three. `grilling` uses L0 and L2 only (no fix patterns). A site-scanning skill may use all three.
|
|
118
118
|
|
|
119
|
+
### Shared layer (L2, cross-skill)
|
|
120
|
+
|
|
121
|
+
In addition to the three skill-local layers, there is a fourth tier: the **shared knowledge layer** at `packages/forge/skills/shared/knowledge/learned-principles.md`. This file holds promoted cross-skill principles with `shared/K-NNNN` identifiers.
|
|
122
|
+
|
|
123
|
+
- **Detection**: `forge.doctor` reports cross-skill duplicate L2 entries via normalized-title matching (exact and bounded containment).
|
|
124
|
+
- **Promotion**: `fo-knowledge-distill` executes promotions under operator grilling — the principle moves to the shared layer with summed confirmations and `promotedFrom` provenance; each skill-local copy is rewritten to a pointer entry (`promotedTo: shared/K-NNNN`, `status: superseded`).
|
|
125
|
+
- **Consumption**: knowledge-adopting skills read the shared layer at run start and cite shared principles as `shared/K-NNNN`.
|
|
126
|
+
- **Validation**: `forge.doctor` validates the shared layer file for schema validity and id uniqueness (it is not inside a skill directory, so `forge.skill.validate` does not reach it).
|
|
127
|
+
- **npm portability**: the shared layer ships as an empty template — accumulated promotions are project-specific.
|
|
128
|
+
|
|
129
|
+
### Entry format
|
|
130
|
+
|
|
131
|
+
Each knowledge entry is a `### K-NNNN: title` heading followed by a `knowledge-entry` YAML metadata block and a markdown body:
|
|
132
|
+
|
|
133
|
+
````markdown
|
|
134
|
+
### K-0001: Skip non-project sessions
|
|
135
|
+
|
|
136
|
+
```knowledge-entry
|
|
137
|
+
id: K-0001
|
|
138
|
+
layer: L1
|
|
139
|
+
created: 2026-08-03
|
|
140
|
+
status: active
|
|
141
|
+
````
|
|
142
|
+
|
|
143
|
+
**Situation:** ...
|
|
144
|
+
|
|
145
|
+
**Action:** ...
|
|
146
|
+
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
#### Metadata schema
|
|
150
|
+
|
|
151
|
+
| Field | Type | Required | Layers | Meaning |
|
|
152
|
+
| --- | --- | --- | --- | --- |
|
|
153
|
+
| `id` | `K-NNNN` | all | all | Unique 4-digit identifier within the file |
|
|
154
|
+
| `layer` | `L0` \| `L1` \| `L2` | all | all | Knowledge layer |
|
|
155
|
+
| `created` | `YYYY-MM-DD` | all | all | Date the entry was first written |
|
|
156
|
+
| `lastConfirmedAt` | `YYYY-MM-DD` \| `null` | L2 only | L2 | Date of last operator confirmation |
|
|
157
|
+
| `confirmations` | integer ≥ 0 | L2 only | L2 | Confirmation counter for autonomous application |
|
|
158
|
+
| `expiresAt` | `YYYY-MM-DD` \| `null` | optional | all | Date after which the entry is stale |
|
|
159
|
+
| `supersedes` | `K-NNNN[]` | optional | all | Entries this one replaces (must resolve in same file) |
|
|
160
|
+
| `promotedTo` | `shared/K-NNNN` \| `null` | optional | all | Cross-file promotion target |
|
|
161
|
+
| `promotedFrom` | `<skill>/K-NNNN[]` | optional | shared | Provenance — which skill-local entries were promoted into this shared entry |
|
|
162
|
+
| `status` | `active` \| `stale` \| `superseded` \| `archived` | all | all | Lifecycle state |
|
|
163
|
+
|
|
164
|
+
#### Layer-specific rules
|
|
165
|
+
|
|
166
|
+
- **L0** (`qa-log.md`): `confirmations` and `lastConfirmedAt` are forbidden.
|
|
167
|
+
- **L1** (`fix-patterns.md`): `confirmations` and `lastConfirmedAt` are forbidden.
|
|
168
|
+
- **L2** (`learned-principles.md`): `confirmations` and `lastConfirmedAt` are required.
|
|
169
|
+
|
|
170
|
+
#### Knowledge-adjacent files
|
|
171
|
+
|
|
172
|
+
Files declared in `knowledge:` frontmatter that do not use `### K-NNNN:` headings and have no `<!-- knowledge-layer: ... -->` preamble are **knowledge-adjacent** — they are exempt from SKILL-19/SKILL-20. Examples: `forge-about.md`, `operator-profile-template.md`, `project-narrative-template.md`.
|
|
173
|
+
|
|
174
|
+
#### Validation
|
|
175
|
+
|
|
176
|
+
`forge.skill.validate` enforces:
|
|
177
|
+
- **SKILL-19**: entry metadata schema validity (errors) and legacy section warnings (migration window).
|
|
178
|
+
- **SKILL-20**: identifier uniqueness (`K-NNNN` format, no duplicates, `supersedes` references resolve, `promotedTo` format).
|
|
179
|
+
- **SKILL-21**: hot (L2) and warm (L1) layer character budget warnings — warnings only, never build gates. Defaults: hot=4096, warm=8192. Override in `forge.yaml` under `bindings.knowledge.budgets`.
|
|
180
|
+
|
|
181
|
+
`forge.doctor` reports legacy section counts and knowledge budget summaries as informational warnings.
|
|
182
|
+
|
|
183
|
+
### Reading discipline
|
|
184
|
+
|
|
185
|
+
When a skill declares `knowledge:` files, the skill body MUST include a one-line instruction telling the agent how to read them. Add this line to the skill's process section:
|
|
186
|
+
|
|
187
|
+
> Read declared knowledge files at the start of each run, in declaration order. Apply only entries with `status: active`. Skip entries with `status: stale`, `superseded`, or `archived`.
|
|
188
|
+
|
|
189
|
+
This ensures the agent knows to load and filter knowledge entries by lifecycle status, rather than blindly applying all entries including stale ones.
|
|
190
|
+
|
|
119
191
|
### Confidence progression
|
|
120
192
|
|
|
121
193
|
L2 entries carry a `confirmations: N` counter. When confirmations reach threshold 3, the skill may apply the principle autonomously without asking the operator. Rejecting a recommended answer resets confirmations to 0. Autonomous application is context-dependent — the skill should re-evaluate if context changes.
|
|
@@ -130,3 +202,4 @@ L2 entries carry a `confirmations: N` counter. When confirmations reach threshol
|
|
|
130
202
|
### npm portability
|
|
131
203
|
|
|
132
204
|
`@warpgogol/forge` is published to npm with `skills/` in the `files` array. Knowledge files ship as empty templates (header comments only). Forge's accumulated Q&A and learned principles are project-specific and should not leak to npm consumers. Each project accumulates its own knowledge locally after running `forge.create`.
|
|
205
|
+
```
|