@warpgogol/forge 5.3.4 → 6.2.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/CHANGELOG.md +8 -0
- package/bin/cli.ts +7 -2
- package/dist/bin/cli.js +7 -2
- 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 +2 -0
- package/dist/os/adr/adr.module.js.map +1 -1
- package/dist/os/audit/audit.module.d.ts.map +1 -1
- package/dist/os/audit/audit.module.js +2 -0
- package/dist/os/audit/audit.module.js.map +1 -1
- package/dist/os/compass/compass.module.d.ts.map +1 -1
- package/dist/os/compass/compass.module.js +47 -15
- package/dist/os/compass/compass.module.js.map +1 -1
- package/dist/os/compass/handlers/compass-audit-handler.d.ts +2 -0
- package/dist/os/compass/handlers/compass-audit-handler.d.ts.map +1 -1
- package/dist/os/compass/handlers/compass-audit-handler.js +40 -10
- package/dist/os/compass/handlers/compass-audit-handler.js.map +1 -1
- package/dist/os/compass/handlers/compass-docs-validate.d.ts +13 -0
- package/dist/os/compass/handlers/compass-docs-validate.d.ts.map +1 -0
- package/dist/os/compass/handlers/compass-docs-validate.js +328 -0
- package/dist/os/compass/handlers/compass-docs-validate.js.map +1 -0
- package/dist/os/compass/handlers/summary-record.d.ts +11 -2
- package/dist/os/compass/handlers/summary-record.d.ts.map +1 -1
- package/dist/os/compass/handlers/summary-record.js +95 -15
- package/dist/os/compass/handlers/summary-record.js.map +1 -1
- package/dist/os/core/core.module.d.ts.map +1 -1
- package/dist/os/core/core.module.js +124 -73
- package/dist/os/core/core.module.js.map +1 -1
- package/dist/os/core/handlers/file-size-lint.d.ts.map +1 -1
- package/dist/os/core/handlers/file-size-lint.js +2 -0
- package/dist/os/core/handlers/file-size-lint.js.map +1 -1
- package/dist/os/exploration/exploration.module.d.ts.map +1 -1
- package/dist/os/exploration/exploration.module.js +3 -0
- package/dist/os/exploration/exploration.module.js.map +1 -1
- package/dist/os/naming/naming-convention.d.ts.map +1 -1
- package/dist/os/naming/naming-convention.js +11 -1
- package/dist/os/naming/naming-convention.js.map +1 -1
- package/dist/os/naming/naming.module.d.ts.map +1 -1
- package/dist/os/naming/naming.module.js +9 -2
- package/dist/os/naming/naming.module.js.map +1 -1
- package/dist/os/notes/notes.module.d.ts.map +1 -1
- package/dist/os/notes/notes.module.js +17 -6
- package/dist/os/notes/notes.module.js.map +1 -1
- package/dist/os/plan/plan.module.d.ts.map +1 -1
- package/dist/os/plan/plan.module.js +2 -0
- package/dist/os/plan/plan.module.js.map +1 -1
- package/dist/os/plugin/plugin.module.d.ts.map +1 -1
- package/dist/os/plugin/plugin.module.js +9 -2
- package/dist/os/plugin/plugin.module.js.map +1 -1
- package/dist/os/program/program.module.d.ts.map +1 -1
- package/dist/os/program/program.module.js +19 -4
- package/dist/os/program/program.module.js.map +1 -1
- package/dist/os/queue/handlers/queue-validate.d.ts.map +1 -1
- package/dist/os/queue/handlers/queue-validate.js +154 -7
- package/dist/os/queue/handlers/queue-validate.js.map +1 -1
- package/dist/os/queue/manifest.d.ts +17 -1
- package/dist/os/queue/manifest.d.ts.map +1 -1
- package/dist/os/queue/manifest.js +127 -6
- package/dist/os/queue/manifest.js.map +1 -1
- package/dist/os/queue/queue.module.d.ts.map +1 -1
- package/dist/os/queue/queue.module.js +32 -4
- package/dist/os/queue/queue.module.js.map +1 -1
- package/dist/os/queue/types.d.ts +100 -1
- package/dist/os/queue/types.d.ts.map +1 -1
- package/dist/os/queue/types.js +44 -0
- package/dist/os/queue/types.js.map +1 -1
- package/dist/os/rfc/handlers/implement-stamp.d.ts.map +1 -1
- package/dist/os/rfc/handlers/implement-stamp.js +30 -8
- package/dist/os/rfc/handlers/implement-stamp.js.map +1 -1
- package/dist/os/rfc/rfc.module.d.ts.map +1 -1
- package/dist/os/rfc/rfc.module.js +25 -6
- package/dist/os/rfc/rfc.module.js.map +1 -1
- package/dist/os/rfc/types.d.ts +12 -2
- package/dist/os/rfc/types.d.ts.map +1 -1
- package/dist/os/rfc/types.js +2 -2
- package/dist/os/rfc/types.js.map +1 -1
- package/dist/os/rfc/verification-evidence.d.ts +21 -0
- package/dist/os/rfc/verification-evidence.d.ts.map +1 -1
- package/dist/os/rfc/verification-evidence.js +134 -23
- package/dist/os/rfc/verification-evidence.js.map +1 -1
- package/dist/os/rfc/verification-refresh.d.ts.map +1 -1
- package/dist/os/rfc/verification-refresh.js +66 -37
- package/dist/os/rfc/verification-refresh.js.map +1 -1
- package/dist/os/session/handlers/save.d.ts.map +1 -1
- package/dist/os/session/handlers/save.js +42 -5
- package/dist/os/session/handlers/save.js.map +1 -1
- package/dist/os/session/session.module.d.ts.map +1 -1
- package/dist/os/session/session.module.js +5 -0
- package/dist/os/session/session.module.js.map +1 -1
- package/dist/os/spec/live-spec-merge.d.ts.map +1 -1
- package/dist/os/spec/live-spec-merge.js +55 -134
- package/dist/os/spec/live-spec-merge.js.map +1 -1
- package/dist/os/spec/live-spec-rebuild.d.ts +32 -0
- package/dist/os/spec/live-spec-rebuild.d.ts.map +1 -0
- package/dist/os/spec/live-spec-rebuild.js +272 -0
- package/dist/os/spec/live-spec-rebuild.js.map +1 -0
- package/dist/os/spec/live-spec-shared.d.ts +62 -0
- package/dist/os/spec/live-spec-shared.d.ts.map +1 -0
- package/dist/os/spec/live-spec-shared.js +315 -0
- package/dist/os/spec/live-spec-shared.js.map +1 -0
- package/dist/os/spec/live-spec-types.d.ts +17 -1
- package/dist/os/spec/live-spec-types.d.ts.map +1 -1
- package/dist/os/spec/live-spec-types.js +3 -0
- package/dist/os/spec/live-spec-types.js.map +1 -1
- package/dist/os/spec/live-spec-validate.d.ts.map +1 -1
- package/dist/os/spec/live-spec-validate.js +105 -2
- package/dist/os/spec/live-spec-validate.js.map +1 -1
- package/dist/os/spec/spec-materialize.d.ts +2 -0
- package/dist/os/spec/spec-materialize.d.ts.map +1 -1
- package/dist/os/spec/spec-materialize.js +45 -5
- package/dist/os/spec/spec-materialize.js.map +1 -1
- package/dist/os/spec/spec-schema.d.ts +19 -0
- package/dist/os/spec/spec-schema.d.ts.map +1 -1
- package/dist/os/spec/spec-schema.js +30 -0
- package/dist/os/spec/spec-schema.js.map +1 -1
- package/dist/os/spec/spec-status.d.ts +4 -0
- package/dist/os/spec/spec-status.d.ts.map +1 -1
- package/dist/os/spec/spec-status.js +19 -1
- package/dist/os/spec/spec-status.js.map +1 -1
- package/dist/os/spec/spec-validate.d.ts.map +1 -1
- package/dist/os/spec/spec-validate.js +55 -8
- package/dist/os/spec/spec-validate.js.map +1 -1
- package/dist/os/spec/spec.module.d.ts.map +1 -1
- package/dist/os/spec/spec.module.js +84 -8
- package/dist/os/spec/spec.module.js.map +1 -1
- package/dist/os/werkstatt/handlers/werkstatt-operation-validate.d.ts.map +1 -1
- package/dist/os/werkstatt/handlers/werkstatt-operation-validate.js +10 -4
- package/dist/os/werkstatt/handlers/werkstatt-operation-validate.js.map +1 -1
- package/dist/os/werkstatt/werkstatt.module.d.ts.map +1 -1
- package/dist/os/werkstatt/werkstatt.module.js +13 -4
- package/dist/os/werkstatt/werkstatt.module.js.map +1 -1
- package/dist/os/workflow/workflow.module.d.ts.map +1 -1
- package/dist/os/workflow/workflow.module.js +13 -5
- package/dist/os/workflow/workflow.module.js.map +1 -1
- package/dist/src/cli-flags.d.ts.map +1 -1
- package/dist/src/cli-flags.js +25 -5
- package/dist/src/cli-flags.js.map +1 -1
- package/dist/src/config/forge-config.d.ts +3 -0
- package/dist/src/config/forge-config.d.ts.map +1 -1
- package/dist/src/config/forge-config.js +2 -0
- package/dist/src/config/forge-config.js.map +1 -1
- package/dist/src/onboarding/doctor.d.ts.map +1 -1
- package/dist/src/onboarding/doctor.js +2 -3
- 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 +8 -3
- package/dist/src/onboarding/init.js.map +1 -1
- package/dist/src/pipeline-status.d.ts +14 -1
- package/dist/src/pipeline-status.d.ts.map +1 -1
- package/dist/src/pipeline-status.js +28 -8
- package/dist/src/pipeline-status.js.map +1 -1
- package/dist/src/types.d.ts +7 -1
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js +6 -0
- package/dist/src/types.js.map +1 -1
- package/dist/src/utils/generated-marker.d.ts +8 -0
- package/dist/src/utils/generated-marker.d.ts.map +1 -1
- package/dist/src/utils/generated-marker.js +25 -0
- package/dist/src/utils/generated-marker.js.map +1 -1
- package/dist/src/validators/skill-validate.d.ts.map +1 -1
- package/dist/src/validators/skill-validate.js +2 -4
- package/dist/src/validators/skill-validate.js.map +1 -1
- package/os/adr/adr.module.ts +2 -0
- package/os/audit/audit.module.ts +2 -0
- package/os/compass/compass.module.ts +49 -15
- package/os/compass/handlers/compass-audit-handler.ts +51 -10
- package/os/compass/handlers/compass-docs-validate.ts +361 -0
- package/os/compass/handlers/summary-record.ts +106 -15
- package/os/compass/handlers/tests/compass-audit-record.test.ts +2 -1
- package/os/compass/handlers/tests/compass-audit-validate.test.ts +92 -3
- package/os/compass/handlers/tests/compass-docs-validate.test.ts +203 -0
- package/os/compass/handlers/tests/compass-ledger-scope.test.ts +2 -1
- package/os/compass/handlers/tests/compass-policy.test.ts +7 -1
- package/os/compass/handlers/tests/summary-record.test.ts +127 -0
- package/os/core/core.module.ts +147 -75
- package/os/core/docs-archive.test.ts +136 -0
- package/os/core/handlers/file-size-lint.ts +2 -0
- package/os/exploration/exploration.module.ts +3 -0
- package/os/naming/naming-convention.ts +11 -1
- package/os/naming/naming.module.ts +9 -2
- package/os/notes/notes.module.ts +17 -6
- package/os/plan/plan-0000-template.md +150 -0
- package/os/plan/plan.module.ts +2 -0
- package/os/plugin/plugin.module.ts +9 -2
- package/os/program/program.module.ts +19 -4
- package/os/queue/decision-ledger.test.ts +163 -0
- package/os/queue/handlers/queue-validate.ts +190 -8
- package/os/queue/manifest.ts +201 -7
- package/os/queue/queue-validate.test.ts +303 -0
- package/os/queue/queue.module.ts +32 -4
- package/os/queue/types.ts +56 -1
- package/os/rfc/handlers/implement-stamp.ts +37 -8
- package/os/rfc/rfc-read-only-no-side-effects.test.ts +1 -0
- package/os/rfc/rfc.module.ts +27 -6
- package/os/rfc/types.ts +18 -3
- package/os/rfc/verification-emit.test.ts +305 -0
- package/os/rfc/verification-evidence.ts +149 -24
- package/os/rfc/verification-refresh.test.ts +222 -1
- package/os/rfc/verification-refresh.ts +74 -38
- package/os/session/handlers/save.ts +37 -5
- package/os/session/session.module.ts +5 -0
- package/os/spec/live-spec-idempotency.pbt.test.ts +222 -0
- package/os/spec/live-spec-list-show-validate.test.ts +10 -6
- package/os/spec/live-spec-merge.test.ts +187 -7
- package/os/spec/live-spec-merge.ts +71 -155
- package/os/spec/live-spec-rebuild.test.ts +317 -0
- package/os/spec/live-spec-rebuild.ts +356 -0
- package/os/spec/live-spec-shared.ts +378 -0
- package/os/spec/live-spec-types.ts +21 -1
- package/os/spec/live-spec-validate.test.ts +317 -0
- package/os/spec/live-spec-validate.ts +106 -2
- package/os/spec/spec-materialize.test.ts +192 -0
- package/os/spec/spec-materialize.ts +48 -4
- package/os/spec/spec-schema.ts +49 -0
- package/os/spec/spec-status.ts +24 -0
- package/os/spec/spec-validate.test.ts +66 -0
- package/os/spec/spec-validate.ts +62 -8
- package/os/spec/spec.module.ts +85 -8
- package/os/werkstatt/handlers/werkstatt-operation-validate.ts +10 -4
- package/os/werkstatt/werkstatt.module.ts +13 -4
- package/os/workflow/workflow.module.ts +13 -5
- package/package.json +1 -1
- package/skills/_shared/fo-pipeline-conventions.md +126 -1
- package/skills/fo/fo-doc-audit/SKILL.md +4 -4
- package/skills/fo/fo-explore/SKILL.md +2 -1
- package/skills/fo/fo-fix/SKILL.md +11 -3
- package/skills/fo/fo-handoff/SKILL.md +4 -6
- package/skills/fo/fo-idea-create-rfc/SKILL.md +2 -1
- package/skills/fo/fo-idea-enhance/SKILL.md +23 -4
- package/skills/fo/fo-idea-i-just-want-to-see-the-result/SKILL.md +86 -22
- package/skills/fo/fo-idea-implement/SKILL.md +53 -10
- package/skills/fo/fo-idea-plan/SKILL.md +28 -6
- package/skills/fo/fo-review/SKILL.md +69 -8
- package/skills/fo/fo-session-retro/SKILL.md +3 -2
- package/skills/fo/fo-step-commit/SKILL.md +2 -0
- package/skills/shared/grilling/SKILL.md +12 -0
- package/skills/shared/writing-great-skills/GLOSSARY.md +2 -0
- package/skills/shared/writing-great-skills/SKILL.md +2 -1
- package/src/cli-flags.ts +23 -5
- package/src/config/forge-config.ts +4 -0
- package/src/onboarding/doctor.ts +2 -3
- package/src/onboarding/init.ts +8 -3
- package/src/pipeline-status.ts +32 -8
- package/src/tests/cli-flags.test.ts +20 -0
- package/src/tests/cli-output.test.ts +13 -7
- package/src/tests/fixtures/agents-generate-business-before.txt +7 -7
- package/src/tests/implement-stamp.test.ts +38 -0
- package/src/tests/session-handlers.test.ts +33 -0
- package/src/types.ts +13 -1
- package/src/utils/generated-marker.ts +28 -0
- package/src/validators/skill-validate.ts +2 -4
- package/skills/fo/fo-idea-implement/ADR-FLOW.md +0 -179
- package/skills/fo/fo-review/AXES.md +0 -70
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/*
|
|
2
|
+
<MODULE_CONTRACT>
|
|
3
|
+
<purpose>Unit tests for the docs.archive this-run live-merge selection —
|
|
4
|
+
collectLiveMergeTargets derives merge candidates purely from the rfc.archive
|
|
5
|
+
moved[] result (into-archive + implemented), keeping a second docs.archive run
|
|
6
|
+
at zero merge operations (RFC-1230, AC-3).</purpose>
|
|
7
|
+
<non-goals>
|
|
8
|
+
<item>Do not invoke the docs.archive execute closure — the selection helper is the test seam.</item>
|
|
9
|
+
</non-goals>
|
|
10
|
+
</MODULE_CONTRACT>
|
|
11
|
+
<CHANGE_SUMMARY>
|
|
12
|
+
<item>RFC-1230: initial tests for collectLiveMergeTargets.</item>
|
|
13
|
+
<item>RFC-1230: review findings — scoped droppedSections to namespaced headings, warn on unreadable spec, fail-fast merge on corrupt frontmatter, CHANGE_SUMMARY dedupe</item>
|
|
14
|
+
<item>RFC-1235: failed-merge accounting tests — classifyLiveMergeOutcome, liveMergeFailureEntry, formatLiveMergeFailure, buildLiveMergeBlock (AC-1..4).</item>
|
|
15
|
+
</CHANGE_SUMMARY>
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import { describe, it, expect } from "vitest";
|
|
19
|
+
import {
|
|
20
|
+
collectLiveMergeTargets,
|
|
21
|
+
classifyLiveMergeOutcome,
|
|
22
|
+
liveMergeFailureEntry,
|
|
23
|
+
formatLiveMergeFailure,
|
|
24
|
+
buildLiveMergeBlock,
|
|
25
|
+
} from "../spec/live-spec-shared.ts";
|
|
26
|
+
|
|
27
|
+
function move(
|
|
28
|
+
id: string,
|
|
29
|
+
status: string,
|
|
30
|
+
direction: "into-archive" | "out-of-archive" = "into-archive",
|
|
31
|
+
) {
|
|
32
|
+
return { id, status, direction, file: `docs/rfcs/${id}.md`, from: "", to: "" };
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
describe("docs.archive collectLiveMergeTargets (AC-3)", () => {
|
|
36
|
+
it("selects only RFCs moved into archive/implemented/ this run", () => {
|
|
37
|
+
const selection = collectLiveMergeTargets([
|
|
38
|
+
move("RFC-1001", "implemented"),
|
|
39
|
+
move("RFC-1002", "rejected"),
|
|
40
|
+
move("RFC-1003", "implemented", "out-of-archive"),
|
|
41
|
+
move("RFC-1004", "superseded"),
|
|
42
|
+
]);
|
|
43
|
+
|
|
44
|
+
expect(selection.candidates).toEqual(["RFC-1001"]);
|
|
45
|
+
expect(selection.rejected).toEqual(["RFC-1002"]);
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
it("returns an empty selection when nothing moved — second docs.archive run", () => {
|
|
49
|
+
const selection = collectLiveMergeTargets([]);
|
|
50
|
+
expect(selection.candidates).toEqual([]);
|
|
51
|
+
expect(selection.rejected).toEqual([]);
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
it("ignores out-of-archive moves entirely", () => {
|
|
55
|
+
const selection = collectLiveMergeTargets([move("RFC-1001", "implemented", "out-of-archive")]);
|
|
56
|
+
expect(selection.candidates).toEqual([]);
|
|
57
|
+
expect(selection.rejected).toEqual([]);
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
describe("docs.archive failed-merge accounting (RFC-1235)", () => {
|
|
62
|
+
it("AC-1: exit-nonzero merge with populated data lands in failed[], not merged[]", () => {
|
|
63
|
+
// RFC-1230 fail-fast shape: exit 1 with a full data object.
|
|
64
|
+
const outcome = classifyLiveMergeOutcome("RFC-1299", {
|
|
65
|
+
exitCode: 1,
|
|
66
|
+
data: {
|
|
67
|
+
command: "spec.live.merge",
|
|
68
|
+
domain: "forge",
|
|
69
|
+
operation: "modified",
|
|
70
|
+
deltas: [],
|
|
71
|
+
conflicts: [],
|
|
72
|
+
dryRun: false,
|
|
73
|
+
},
|
|
74
|
+
summary:
|
|
75
|
+
"spec.live.merge: forge.md exists but has no valid frontmatter — inspect or repair via spec.live.rebuild",
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
expect(outcome.kind).toBe("failed");
|
|
79
|
+
if (outcome.kind === "failed") {
|
|
80
|
+
expect(outcome.entry.id).toBe("RFC-1299");
|
|
81
|
+
expect(outcome.entry.exitCode).toBe(1);
|
|
82
|
+
expect(outcome.entry.error).toContain("no valid frontmatter");
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
it("AC-2: thrown merge produces a failed[] entry carrying the error and a printable line", () => {
|
|
87
|
+
const failure = liveMergeFailureEntry("RFC-1299", new Error("boom: disk full"));
|
|
88
|
+
expect(failure.id).toBe("RFC-1299");
|
|
89
|
+
expect(failure.exitCode).toBeUndefined();
|
|
90
|
+
expect(failure.error).toBe("boom: disk full");
|
|
91
|
+
|
|
92
|
+
// The pretty path prints formatLiveMergeFailure(entry) via logger.error —
|
|
93
|
+
// asserting the formatted line proves the printed message carries id + error.
|
|
94
|
+
const line = formatLiveMergeFailure(failure);
|
|
95
|
+
expect(line).toContain("RFC-1299");
|
|
96
|
+
expect(line).toContain("boom: disk full");
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
it("AC-3: exit-0 merge keeps the merged[] shape and failed[] stays empty", () => {
|
|
100
|
+
const outcome = classifyLiveMergeOutcome("RFC-1230", {
|
|
101
|
+
exitCode: 0,
|
|
102
|
+
data: { domain: "forge", operation: "modified", conflicts: [] },
|
|
103
|
+
});
|
|
104
|
+
expect(outcome).toEqual({
|
|
105
|
+
kind: "merged",
|
|
106
|
+
entry: { id: "RFC-1230", domain: "forge", operation: "modified", conflicts: 0 },
|
|
107
|
+
});
|
|
108
|
+
expect(outcome.kind).toBe("merged");
|
|
109
|
+
const entry =
|
|
110
|
+
outcome.kind === "merged"
|
|
111
|
+
? outcome.entry
|
|
112
|
+
: liveMergeFailureEntry("RFC-1230", new Error("unreachable"));
|
|
113
|
+
|
|
114
|
+
const block = buildLiveMergeBlock([entry], [], 0, false);
|
|
115
|
+
expect(block).toEqual({
|
|
116
|
+
merged: [{ id: "RFC-1230", domain: "forge", operation: "modified", conflicts: 0 }],
|
|
117
|
+
failed: [],
|
|
118
|
+
skipped: 0,
|
|
119
|
+
dryRun: false,
|
|
120
|
+
});
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
it("AC-4: all-failed and all-empty runs produce data, never a throw — archive stays non-fatal", () => {
|
|
124
|
+
const failure = liveMergeFailureEntry("RFC-1299", new Error("corrupt"));
|
|
125
|
+
const block = buildLiveMergeBlock([], [failure], 0, false);
|
|
126
|
+
// All-failed still emits the block — otherwise the failures stay invisible.
|
|
127
|
+
expect(block).toEqual({
|
|
128
|
+
merged: [],
|
|
129
|
+
failed: [{ id: "RFC-1299", error: "corrupt" }],
|
|
130
|
+
skipped: 0,
|
|
131
|
+
dryRun: false,
|
|
132
|
+
});
|
|
133
|
+
// Nothing attempted → no block at all (unchanged pre-RFC-1235 silence).
|
|
134
|
+
expect(buildLiveMergeBlock([], [], 0, false)).toBeUndefined();
|
|
135
|
+
});
|
|
136
|
+
});
|
|
@@ -14,6 +14,7 @@ collectFiles and diagnosticsResult. Ratcheted baseline at workspace root.
|
|
|
14
14
|
</MODULE_CONTRACT>
|
|
15
15
|
<CHANGE_SUMMARY>
|
|
16
16
|
<item>RFC-1088: initial implementation — ported from packages/werkstatt-site/src/checks/file-size-lint.ts to forge for autonomy.</item>
|
|
17
|
+
<item>RFC-1249: wire werkstatt.commands.validate into packages.check + retire CMD-OUTPUT debt</item>
|
|
17
18
|
</CHANGE_SUMMARY>
|
|
18
19
|
*/
|
|
19
20
|
|
|
@@ -53,6 +54,7 @@ export function countLines(source: string): number {
|
|
|
53
54
|
async function collectSourceFiles(root: string): Promise<string[]> {
|
|
54
55
|
const results: string[] = [];
|
|
55
56
|
|
|
57
|
+
// fs.walk.lint: allow — walks via WorkspaceIO abstraction (io.readdir), not node fs — collectFiles has no io contract
|
|
56
58
|
async function walk(dir: string): Promise<void> {
|
|
57
59
|
let entries;
|
|
58
60
|
try {
|
|
@@ -27,6 +27,7 @@ export async function createForgeExplorationModule(): Promise<ForgeModule> {
|
|
|
27
27
|
commands: [
|
|
28
28
|
{
|
|
29
29
|
name: "exploration.list",
|
|
30
|
+
coverage: "operator" as const,
|
|
30
31
|
description:
|
|
31
32
|
"List all exploration notes in docs/explorations/. Returns id, title, status, and createdAt for each note. " +
|
|
32
33
|
"Use --status <status> to filter by status (open, explored, archived). " +
|
|
@@ -46,6 +47,7 @@ export async function createForgeExplorationModule(): Promise<ForgeModule> {
|
|
|
46
47
|
},
|
|
47
48
|
{
|
|
48
49
|
name: "exploration.show",
|
|
50
|
+
coverage: "operator" as const,
|
|
49
51
|
description:
|
|
50
52
|
"Show the full content of a single exploration note. Use --id <slug> to specify the note slug " +
|
|
51
53
|
"(kebab-case, lowercase, latin-only). Returns the note's frontmatter and body. " +
|
|
@@ -66,6 +68,7 @@ export async function createForgeExplorationModule(): Promise<ForgeModule> {
|
|
|
66
68
|
},
|
|
67
69
|
{
|
|
68
70
|
name: "exploration.archive",
|
|
71
|
+
coverage: "operator" as const,
|
|
69
72
|
description:
|
|
70
73
|
"Archive an exploration note by setting its status to 'archived'. Use --id <slug> to specify the note. " +
|
|
71
74
|
"Use --rfc <RFC-XXXX> to add an RFC id to the note's 'related' field. " +
|
|
@@ -9,6 +9,7 @@ uses kebab-case (lowercase letters, digits, hyphens only), with documented exemp
|
|
|
9
9
|
<CHANGE_SUMMARY>
|
|
10
10
|
<item>RFC-0303: split out of structure.ts (Phase 3 file-size split).</item>
|
|
11
11
|
<item>RFC-0360: extend scan roots from apps/ and packages/ to the whole repo.</item>
|
|
12
|
+
<item>RFC-1249: wire werkstatt.commands.validate into packages.check + retire CMD-OUTPUT debt</item>
|
|
12
13
|
</CHANGE_SUMMARY>
|
|
13
14
|
*/
|
|
14
15
|
|
|
@@ -76,6 +77,9 @@ const NAMING_CONVENTION_IGNORED_TOP_LEVEL = new Set([
|
|
|
76
77
|
"storage",
|
|
77
78
|
".check-warpgogol",
|
|
78
79
|
".coverage-report-html",
|
|
80
|
+
// Local-only operator dirs (gitignored): Ed25519 signing keys (RFC-0966) and scratch output.
|
|
81
|
+
".keys",
|
|
82
|
+
".scratch",
|
|
79
83
|
]);
|
|
80
84
|
|
|
81
85
|
// Tool-mandated filenames exempt from kebab-case (Docker, Caddy use these exact names).
|
|
@@ -101,7 +105,13 @@ const NAMING_CONVENTION_IGNORED_DIRS = new Set([
|
|
|
101
105
|
// RFC-0186) — the numeric-underscore prefix is required for ordering and is not authored prose.
|
|
102
106
|
"migrations",
|
|
103
107
|
]);
|
|
104
|
-
const NAMING_CONVENTION_EXEMPT_KEYWORDS = [
|
|
108
|
+
const NAMING_CONVENTION_EXEMPT_KEYWORDS = [
|
|
109
|
+
"config",
|
|
110
|
+
"module",
|
|
111
|
+
// xrepo-<from>-to-<to>-<increment> handoff artifacts carry externally-referenced
|
|
112
|
+
// contract version pins (V01/V04/V05) — the uppercase token is the version id, not prose.
|
|
113
|
+
"xrepo",
|
|
114
|
+
] as const;
|
|
105
115
|
|
|
106
116
|
// Set of directory paths that are exempt from naming convention (generated files)
|
|
107
117
|
const NAMING_CONVENTION_EXEMPT_DIRS = new Set([
|
|
@@ -8,6 +8,13 @@
|
|
|
8
8
|
<CHANGE_SUMMARY>
|
|
9
9
|
<item>RFC-0374: initial forgeNamingModule registering naming.convention.lint.</item>
|
|
10
10
|
<item>RFC-1173: declare mutatesState on all kernel commands — collectDeclarationDiagnostics emits error-severity MUTATES-STATE-DECLARED, command.manifest.validate is the blocking consumer in packages.check, sweep declares the flag on every command definition (factories hardcode false for read-only check specs)</item>
|
|
11
|
+
<item>RFC-1231: step 1 — rename supportsAllSites to acceptsAllFlag
|
|
12
|
+
|
|
13
|
+
Mechanical sweep: the field only ever gated --all argv acceptance; fan-out
|
|
14
|
+
follows the parsed selector. Guard renamed assertAllSitesAllowed ->
|
|
15
|
+
assertAllFlagAccepted, message updated. 417 declaration sites + type
|
|
16
|
+
surfaces (KernelCommandMetadata, ForgeCommandMetadata) in one atomic pass.</item>
|
|
17
|
+
<item>RFC-1248: VITE-CLIENT-DEP-02 lazy-import gate + SCAN-02 validator reads-root existence check (RFC-1248)</item>
|
|
11
18
|
</CHANGE_SUMMARY>
|
|
12
19
|
*/
|
|
13
20
|
|
|
@@ -29,14 +36,14 @@ export async function createForgeNamingModule(): Promise<ForgeModule> {
|
|
|
29
36
|
description:
|
|
30
37
|
"Validate all filenames use kebab-case (no underscores) across registered workspace roots.",
|
|
31
38
|
scope: "workspace",
|
|
32
|
-
|
|
39
|
+
acceptsAllFlag: true,
|
|
33
40
|
flags: {
|
|
34
41
|
"include-ignored": {
|
|
35
42
|
kind: "boolean",
|
|
36
43
|
description: "Also scan files ignored by .gitignore or .windsurfignore.",
|
|
37
44
|
},
|
|
38
45
|
},
|
|
39
|
-
reads: ["packages/**/*.{ts,tsx}", "apps/**/*.{ts,tsx}", "services/**/*.{ts,tsx}"],
|
|
46
|
+
reads: ["packages/**/*.{ts,tsx}", "apps/**/*.{ts,tsx}", "services/**/*.{ts,tsx}"], // scan-coverage: consumer-workshop root — apps/ exists in consumer workshops, not this monorepo
|
|
40
47
|
execute: runNamingConventionLint,
|
|
41
48
|
},
|
|
42
49
|
],
|
package/os/notes/notes.module.ts
CHANGED
|
@@ -8,6 +8,13 @@
|
|
|
8
8
|
<CHANGE_SUMMARY>
|
|
9
9
|
<item>RFC-0808: initial forgeNotesModule registering 3 note validation commands.</item>
|
|
10
10
|
<item>RFC-1173: declare mutatesState on all kernel commands — collectDeclarationDiagnostics emits error-severity MUTATES-STATE-DECLARED, command.manifest.validate is the blocking consumer in packages.check, sweep declares the flag on every command definition (factories hardcode false for read-only check specs)</item>
|
|
11
|
+
<item>RFC-1231: step 1 — rename supportsAllSites to acceptsAllFlag
|
|
12
|
+
|
|
13
|
+
Mechanical sweep: the field only ever gated --all argv acceptance; fan-out
|
|
14
|
+
follows the parsed selector. Guard renamed assertAllSitesAllowed ->
|
|
15
|
+
assertAllFlagAccepted, message updated. 417 declaration sites + type
|
|
16
|
+
surfaces (KernelCommandMetadata, ForgeCommandMetadata) in one atomic pass.</item>
|
|
17
|
+
<item>RFC-1248: VITE-CLIENT-DEP-02 lazy-import gate + SCAN-02 validator reads-root existence check (RFC-1248)</item>
|
|
11
18
|
</CHANGE_SUMMARY>
|
|
12
19
|
*/
|
|
13
20
|
|
|
@@ -58,7 +65,7 @@ export async function createForgeNotesModule(): Promise<ForgeModule> {
|
|
|
58
65
|
description:
|
|
59
66
|
"Validate wikilink integrity across a markdown note vault. Scans [[wikilinks]] and resolves each against the note graph.",
|
|
60
67
|
scope: "workspace",
|
|
61
|
-
|
|
68
|
+
acceptsAllFlag: false,
|
|
62
69
|
flags: {
|
|
63
70
|
"vault-dir": {
|
|
64
71
|
kind: "string",
|
|
@@ -69,19 +76,21 @@ export async function createForgeNotesModule(): Promise<ForgeModule> {
|
|
|
69
76
|
description: "Subdirectory within the vault to scope the scan to.",
|
|
70
77
|
},
|
|
71
78
|
},
|
|
72
|
-
reads: ["vault/**/*.md"],
|
|
79
|
+
reads: ["vault/**/*.md"], // scan-coverage: consumer-vault root — vault/ exists in knowledge-profile workshops
|
|
73
80
|
cacheable: false,
|
|
74
81
|
execute: noteLinkValidateWrapper,
|
|
75
82
|
},
|
|
76
83
|
{
|
|
77
84
|
name: "note.frontmatter.validate",
|
|
85
|
+
coverage: "operator",
|
|
86
|
+
coverageNote: "notes vault frontmatter hygiene (vault workshops)",
|
|
78
87
|
mutatesState: false,
|
|
79
88
|
contract: "note",
|
|
80
89
|
rules: [],
|
|
81
90
|
description:
|
|
82
91
|
"Validate frontmatter consistency across a markdown note vault. Checks for required fields in YAML frontmatter.",
|
|
83
92
|
scope: "workspace",
|
|
84
|
-
|
|
93
|
+
acceptsAllFlag: false,
|
|
85
94
|
flags: {
|
|
86
95
|
"vault-dir": {
|
|
87
96
|
kind: "string",
|
|
@@ -92,24 +101,26 @@ export async function createForgeNotesModule(): Promise<ForgeModule> {
|
|
|
92
101
|
description: "Comma-separated list of required fields (default: title).",
|
|
93
102
|
},
|
|
94
103
|
},
|
|
95
|
-
reads: ["vault/**/*.md"],
|
|
104
|
+
reads: ["vault/**/*.md"], // scan-coverage: consumer-vault root — vault/ exists in knowledge-profile workshops
|
|
96
105
|
cacheable: false,
|
|
97
106
|
execute: noteFrontmatterValidateWrapper,
|
|
98
107
|
},
|
|
99
108
|
{
|
|
100
109
|
name: "note.orphan.detect",
|
|
110
|
+
coverage: "operator",
|
|
111
|
+
coverageNote: "notes vault orphan detection (vault workshops)",
|
|
101
112
|
mutatesState: false,
|
|
102
113
|
description:
|
|
103
114
|
"Detect orphan notes in a markdown note vault — notes with zero inbound wikilinks. Always exits zero (warnings, not errors).",
|
|
104
115
|
scope: "workspace",
|
|
105
|
-
|
|
116
|
+
acceptsAllFlag: false,
|
|
106
117
|
flags: {
|
|
107
118
|
"vault-dir": {
|
|
108
119
|
kind: "string",
|
|
109
120
|
description: "Vault directory relative to workspace root (default: vault).",
|
|
110
121
|
},
|
|
111
122
|
},
|
|
112
|
-
reads: ["vault/**/*.md"],
|
|
123
|
+
reads: ["vault/**/*.md"], // scan-coverage: consumer-vault root — vault/ exists in knowledge-profile workshops
|
|
113
124
|
cacheable: false,
|
|
114
125
|
execute: noteOrphanDetectWrapper,
|
|
115
126
|
},
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
---
|
|
2
|
+
rfcId: RFC-0000
|
|
3
|
+
planId: PLAN-RFC-0000-01
|
|
4
|
+
status: draft
|
|
5
|
+
owner: architecture
|
|
6
|
+
createdAt: YYYY-MM-DD
|
|
7
|
+
updatedAt:
|
|
8
|
+
scope:
|
|
9
|
+
apps: []
|
|
10
|
+
packages: []
|
|
11
|
+
services: []
|
|
12
|
+
docs: []
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# Implementation Plan: RFC-0000
|
|
16
|
+
|
|
17
|
+
## 1. Objectives
|
|
18
|
+
|
|
19
|
+
<!-- 3-7 concrete objectives tied to RFC acceptance criteria.
|
|
20
|
+
Each objective should map to one or more acceptance-criteria
|
|
21
|
+
checkboxes in the RFC. -->
|
|
22
|
+
|
|
23
|
+
- [ ] Objective 1 — maps to acceptance criterion [...]
|
|
24
|
+
- [ ] Objective 2 — maps to acceptance criterion [...]
|
|
25
|
+
|
|
26
|
+
## 2. Affected artifacts
|
|
27
|
+
|
|
28
|
+
### 2.1 Code and commands
|
|
29
|
+
|
|
30
|
+
<!-- packages/*, services/*, apps/* files.
|
|
31
|
+
Site OS commands (pnpm exec werkstatt run ...).
|
|
32
|
+
Registry entries, module registrations, pipeline wiring. -->
|
|
33
|
+
|
|
34
|
+
### 2.2 Configuration and data
|
|
35
|
+
|
|
36
|
+
<!-- YAML/JSON/NDJSON, system.md, manifests, biome files,
|
|
37
|
+
ontology catalogs (StarCatalog, PlanetCatalog, MoonCatalog),
|
|
38
|
+
content schemas, blueprints. -->
|
|
39
|
+
|
|
40
|
+
### 2.3 Documentation and specs
|
|
41
|
+
|
|
42
|
+
<!-- RFC file (read-only reference).
|
|
43
|
+
AGENTS.md (root, apps/, packages/, services/).
|
|
44
|
+
docs/*.xml Compass files (requirements, technology,
|
|
45
|
+
development-plan, knowledge-graph, verification-plan,
|
|
46
|
+
source-markup, styling).
|
|
47
|
+
docs/architecture-dna.md (if new DNA invariant). -->
|
|
48
|
+
|
|
49
|
+
### 2.4 Validation and pipelines
|
|
50
|
+
|
|
51
|
+
<!-- build.check, build.prepare, apps-check, apps-check-postbuild.
|
|
52
|
+
CI workflows (.github/workflows/).
|
|
53
|
+
New or changed validate commands. -->
|
|
54
|
+
|
|
55
|
+
## 3. Step sequence
|
|
56
|
+
|
|
57
|
+
### Step 1. [Step title]
|
|
58
|
+
|
|
59
|
+
**Goal:** [what this step achieves]
|
|
60
|
+
|
|
61
|
+
**Agent actions:**
|
|
62
|
+
|
|
63
|
+
- [concrete action]
|
|
64
|
+
- [concrete action]
|
|
65
|
+
|
|
66
|
+
**Validation:**
|
|
67
|
+
|
|
68
|
+
- [command or check that confirms completion]
|
|
69
|
+
|
|
70
|
+
**Completion criterion:** [checkable condition]
|
|
71
|
+
|
|
72
|
+
**Human review:** [yes/no — if yes, what needs approval and from whom]
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
### Step 2. [Step title]
|
|
77
|
+
|
|
78
|
+
<!-- Repeat for each step. Follow the contract-first ordering:
|
|
79
|
+
contracts → commands → documentation → tests → validation → evidence. -->
|
|
80
|
+
|
|
81
|
+
### Final Step. Documentation sync, review, fix, and acceptance criteria verification
|
|
82
|
+
|
|
83
|
+
**Goal:** Synchronize all documentation artifacts, run code review and fix, verify acceptance criteria, and stamp the RFC as implemented.
|
|
84
|
+
|
|
85
|
+
**Agent actions:**
|
|
86
|
+
|
|
87
|
+
- Update affected `AGENTS.md` files (root, apps/, packages/, services/) with new modules, commands, or ownership changes.
|
|
88
|
+
- Update affected `docs/*.xml` Compass files (requirements, technology, development-plan, knowledge-graph, verification-plan, source-markup, styling) when repository-wide semantics changed.
|
|
89
|
+
- Update `docs/architecture-dna.md` if a new DNA invariant was introduced.
|
|
90
|
+
- **Verify every file listed in `scope.docs` is updated** — check each path against `git diff`; if a scope doc was not modified, document why.
|
|
91
|
+
- Run `pnpm exec werkstatt run ecosystem.manifest.generate` if command surfaces or pipeline topology changed (do not hand-edit `docs/ecosystem.generated.yaml`).
|
|
92
|
+
- **Run code review:** invoke `fo-review` via the `skill` tool on all session code changes (`git diff <merge-base-of-session>...HEAD`). Wait for the review report in `docs/reviews/code/`.
|
|
93
|
+
- **Run fix if needed:** if `fo-review` reported findings, invoke `fo-fix` via the `skill` tool. Re-run `fo-review` to confirm all findings are resolved. Maximum 3 iterations.
|
|
94
|
+
- **Check off acceptance criteria:** verify each criterion in the RFC against the implemented code. Mark `[x]` for verified criteria. For unchecked `[ ]` criteria, document why (e.g. "requires runtime command blocked by environment").
|
|
95
|
+
- **Stamp the RFC as implemented:** run `pnpm exec werkstatt run rfc.implement.stamp --id RFC-XXXX --implementation-commit <sha>` to atomically transition `accepted → implemented` (RFC-0476). The command validates all preconditions (status, criteria, clean tree, commit reachability). Do NOT hand-edit `status`, `implementedAt`, or `closedAt` fields — use the command.
|
|
96
|
+
|
|
97
|
+
**Validation:**
|
|
98
|
+
|
|
99
|
+
- `git status` — no uncommitted changes from the current session.
|
|
100
|
+
- `pnpm exec werkstatt run rfc.validate --id RFC-XXXX`
|
|
101
|
+
- Every file in `scope.docs` is either updated or documented as not-applicable.
|
|
102
|
+
- Review report exists in `docs/reviews/code/` for this session.
|
|
103
|
+
|
|
104
|
+
**Completion criterion:** All documentation artifacts in scope are updated; code review passed (findings fixed if any); all acceptance criteria are checked off with inline `(evidence: ...)` annotations; RFC is stamped as `implemented` via `rfc.implement.stamp`.
|
|
105
|
+
|
|
106
|
+
**Human review:** no — the `accepted → implemented` transition is automated via `rfc.implement.stamp` (RFC-0476), which validates all preconditions atomically. Code review is automated via `fo-review`.
|
|
107
|
+
|
|
108
|
+
## 4. Validation suite
|
|
109
|
+
|
|
110
|
+
### 4.1 Required checks
|
|
111
|
+
|
|
112
|
+
<!-- Commands that must pass before stamping implemented (RFC-0224). -->
|
|
113
|
+
|
|
114
|
+
- `pnpm exec werkstatt run rfc.validate --id RFC-XXXX`
|
|
115
|
+
- `pnpm --filter <package> run build:check`
|
|
116
|
+
- `pnpm exec werkstatt run rfc.acceptance.run --id RFC-XXXX` (if acceptance probes declared)
|
|
117
|
+
- `pnpm exec werkstatt run rfc.verification.emit --id RFC-XXXX` (RFC-0330, for probe-bearing RFCs created on or after 2026-07-07)
|
|
118
|
+
|
|
119
|
+
### 4.2 Evidence artifacts
|
|
120
|
+
|
|
121
|
+
<!-- What to commit alongside the implemented status. -->
|
|
122
|
+
|
|
123
|
+
- `docs/rfcs/verification/rfc-xxxx.generated.json` — verification evidence (RFC-0330)
|
|
124
|
+
- Commit messages referencing `RFC-XXXX` in the subject line (RFC-0265 commit hygiene)
|
|
125
|
+
|
|
126
|
+
## 5. Risks and mitigation
|
|
127
|
+
|
|
128
|
+
<!-- Map each risk from the RFC's Risks section to specific plan
|
|
129
|
+
steps that control it. -->
|
|
130
|
+
|
|
131
|
+
| Risk (from RFC) | Mitigation (plan step) |
|
|
132
|
+
| --------------- | ------------------------ |
|
|
133
|
+
| [risk text] | [how step N controls it] |
|
|
134
|
+
|
|
135
|
+
## 6. Escalation triggers
|
|
136
|
+
|
|
137
|
+
<!-- Conditions that should trigger rfc.supersede.propose (RFC-0334)
|
|
138
|
+
instead of working around an invariant conflict. -->
|
|
139
|
+
|
|
140
|
+
- If implementation reveals an invariant conflict with DNA-N, run `pnpm exec werkstatt run rfc.supersede.propose --id RFC-XXXX --reason "..." --invariant "DNA-N"` instead of working around it.
|
|
141
|
+
|
|
142
|
+
## Falsified routes
|
|
143
|
+
|
|
144
|
+
<!-- Negative-knowledge ledger — append a row whenever an approach is
|
|
145
|
+
abandoned after a real attempt. Consult before proposing alternatives;
|
|
146
|
+
"yes" rows reject matching proposals without a stated new fact.
|
|
147
|
+
Rows are never deleted — superseded rows get a revivedAt annotation. -->
|
|
148
|
+
|
|
149
|
+
| Route | Root cause | Falsified at | Forbidden retry |
|
|
150
|
+
| ----- | ---------- | ------------ | --------------- |
|
package/os/plan/plan.module.ts
CHANGED
|
@@ -22,6 +22,8 @@ export async function createForgePlanModule(): Promise<ForgeModule> {
|
|
|
22
22
|
commands: [
|
|
23
23
|
{
|
|
24
24
|
name: "plan.archive",
|
|
25
|
+
coverage: "delegated",
|
|
26
|
+
coverageNote: "dispatched by docs.archive as a function call",
|
|
25
27
|
description:
|
|
26
28
|
"Move plan files whose parent RFC has terminal status " +
|
|
27
29
|
"(implemented, rejected, superseded) into docs/plans/archive/<status>/ " +
|
|
@@ -9,6 +9,12 @@
|
|
|
9
9
|
<CHANGE_SUMMARY>
|
|
10
10
|
<item>RFC-0941: initial forgePluginModule with forge.plugin.validate and forge.plugin.discover commands.</item>
|
|
11
11
|
<item>RFC-1173: declare mutatesState on all kernel commands — collectDeclarationDiagnostics emits error-severity MUTATES-STATE-DECLARED, command.manifest.validate is the blocking consumer in packages.check, sweep declares the flag on every command definition (factories hardcode false for read-only check specs)</item>
|
|
12
|
+
<item>RFC-1231: step 1 — rename supportsAllSites to acceptsAllFlag
|
|
13
|
+
|
|
14
|
+
Mechanical sweep: the field only ever gated --all argv acceptance; fan-out
|
|
15
|
+
follows the parsed selector. Guard renamed assertAllSitesAllowed ->
|
|
16
|
+
assertAllFlagAccepted, message updated. 417 declaration sites + type
|
|
17
|
+
surfaces (KernelCommandMetadata, ForgeCommandMetadata) in one atomic pass.</item>
|
|
12
18
|
</CHANGE_SUMMARY>
|
|
13
19
|
*/
|
|
14
20
|
|
|
@@ -244,7 +250,7 @@ export const forgePluginModule: ForgeModule = {
|
|
|
244
250
|
description:
|
|
245
251
|
"Validate forge.plugin.yaml manifests for all declared skill packs (RFC-0941). Checks manifest schema (id: kebab-case, version: semver) and reports missing or invalid manifests.",
|
|
246
252
|
scope: "workspace",
|
|
247
|
-
|
|
253
|
+
acceptsAllFlag: false,
|
|
248
254
|
flags: {},
|
|
249
255
|
reads: ["forge.yaml", "**/forge.plugin.yaml"],
|
|
250
256
|
cacheable: false,
|
|
@@ -252,11 +258,12 @@ export const forgePluginModule: ForgeModule = {
|
|
|
252
258
|
},
|
|
253
259
|
{
|
|
254
260
|
name: "forge.plugin.discover",
|
|
261
|
+
coverage: "operator" as const,
|
|
255
262
|
mutatesState: false,
|
|
256
263
|
description:
|
|
257
264
|
"Enumerate all project-declared skill packs with valid forge.plugin.yaml manifests (RFC-0941). Returns pack id, version, prefix, and directory.",
|
|
258
265
|
scope: "workspace",
|
|
259
|
-
|
|
266
|
+
acceptsAllFlag: false,
|
|
260
267
|
flags: {},
|
|
261
268
|
reads: ["forge.yaml", "**/forge.plugin.yaml"],
|
|
262
269
|
cacheable: false,
|
|
@@ -9,6 +9,12 @@ kernel registry (RFC-0856).</purpose>
|
|
|
9
9
|
<CHANGE_SUMMARY>
|
|
10
10
|
<item>RFC-0856: initial program module registration.</item>
|
|
11
11
|
<item>RFC-1173: declare mutatesState on all kernel commands — collectDeclarationDiagnostics emits error-severity MUTATES-STATE-DECLARED, command.manifest.validate is the blocking consumer in packages.check, sweep declares the flag on every command definition (factories hardcode false for read-only check specs)</item>
|
|
12
|
+
<item>RFC-1231: step 1 — rename supportsAllSites to acceptsAllFlag
|
|
13
|
+
|
|
14
|
+
Mechanical sweep: the field only ever gated --all argv acceptance; fan-out
|
|
15
|
+
follows the parsed selector. Guard renamed assertAllSitesAllowed ->
|
|
16
|
+
assertAllFlagAccepted, message updated. 417 declaration sites + type
|
|
17
|
+
surfaces (KernelCommandMetadata, ForgeCommandMetadata) in one atomic pass.</item>
|
|
12
18
|
</CHANGE_SUMMARY>
|
|
13
19
|
*/
|
|
14
20
|
|
|
@@ -28,6 +34,8 @@ export async function createForgeProgramModule(): Promise<ForgeModule> {
|
|
|
28
34
|
commands: [
|
|
29
35
|
{
|
|
30
36
|
name: "program.packet.validate",
|
|
37
|
+
coverage: "operator" as const,
|
|
38
|
+
coverageNote: "requires --program",
|
|
31
39
|
mutatesState: false,
|
|
32
40
|
execOnReadOnly: true,
|
|
33
41
|
contract: "program",
|
|
@@ -37,7 +45,7 @@ export async function createForgeProgramModule(): Promise<ForgeModule> {
|
|
|
37
45
|
"and state machine rules. Read-only. " +
|
|
38
46
|
"Usage: program.packet.validate --program=RFC-XXXX --packet=NNN-foo --phase=draft --json",
|
|
39
47
|
scope: "workspace",
|
|
40
|
-
|
|
48
|
+
acceptsAllFlag: false,
|
|
41
49
|
flags: {
|
|
42
50
|
program: {
|
|
43
51
|
kind: "string",
|
|
@@ -64,6 +72,7 @@ export async function createForgeProgramModule(): Promise<ForgeModule> {
|
|
|
64
72
|
},
|
|
65
73
|
{
|
|
66
74
|
name: "program.packet.seal",
|
|
75
|
+
coverage: "operator" as const,
|
|
67
76
|
description:
|
|
68
77
|
"Steward finalizes a packet against the predecessor's completion commit, " +
|
|
69
78
|
"updates packet state from draft to sealed, and records the seal in the " +
|
|
@@ -71,7 +80,7 @@ export async function createForgeProgramModule(): Promise<ForgeModule> {
|
|
|
71
80
|
"Usage: program.packet.seal --program=RFC-XXXX --packet=NNN-foo " +
|
|
72
81
|
"--steward=human:id --idempotency-key=<key> --json",
|
|
73
82
|
scope: "workspace",
|
|
74
|
-
|
|
83
|
+
acceptsAllFlag: false,
|
|
75
84
|
mutatesState: true,
|
|
76
85
|
flags: {
|
|
77
86
|
program: {
|
|
@@ -106,6 +115,7 @@ export async function createForgeProgramModule(): Promise<ForgeModule> {
|
|
|
106
115
|
},
|
|
107
116
|
{
|
|
108
117
|
name: "program.packet.lease",
|
|
118
|
+
coverage: "operator" as const,
|
|
109
119
|
mutatesState: true,
|
|
110
120
|
description:
|
|
111
121
|
"Manage the exclusive local executor lease for a sealed packet. " +
|
|
@@ -114,7 +124,7 @@ export async function createForgeProgramModule(): Promise<ForgeModule> {
|
|
|
114
124
|
"Usage: program.packet.lease --program=RFC-XXXX --packet=NNN-foo " +
|
|
115
125
|
"--action=start --executor=agent:id --json",
|
|
116
126
|
scope: "workspace",
|
|
117
|
-
|
|
127
|
+
acceptsAllFlag: false,
|
|
118
128
|
flags: {
|
|
119
129
|
program: {
|
|
120
130
|
kind: "string",
|
|
@@ -135,6 +145,10 @@ export async function createForgeProgramModule(): Promise<ForgeModule> {
|
|
|
135
145
|
kind: "string",
|
|
136
146
|
description: "Executor actor id (required for --action=start).",
|
|
137
147
|
},
|
|
148
|
+
phase: {
|
|
149
|
+
kind: "string",
|
|
150
|
+
description: "Lease phase: preparation or execution (default: execution).",
|
|
151
|
+
},
|
|
138
152
|
steward: {
|
|
139
153
|
kind: "string",
|
|
140
154
|
description: "Steward actor id (required for --action=recover).",
|
|
@@ -160,6 +174,7 @@ export async function createForgeProgramModule(): Promise<ForgeModule> {
|
|
|
160
174
|
},
|
|
161
175
|
{
|
|
162
176
|
name: "program.packet.complete",
|
|
177
|
+
coverage: "operator" as const,
|
|
163
178
|
description:
|
|
164
179
|
"Steward validates the implementation range, writes the completion report, " +
|
|
165
180
|
"and updates the program manifest. Supports --bootstrap for packet 000. " +
|
|
@@ -167,7 +182,7 @@ export async function createForgeProgramModule(): Promise<ForgeModule> {
|
|
|
167
182
|
"Usage: program.packet.complete --program=RFC-XXXX --packet=NNN-foo " +
|
|
168
183
|
"--steward=human:id --lease-token=<token> --implementation-head=<sha> --json",
|
|
169
184
|
scope: "workspace",
|
|
170
|
-
|
|
185
|
+
acceptsAllFlag: false,
|
|
171
186
|
mutatesState: true,
|
|
172
187
|
flags: {
|
|
173
188
|
program: {
|