@sdd-method/sdd-cli 5.0.0 → 5.1.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/dist/author-program.d.ts.map +1 -1
- package/dist/author-program.js +10 -2
- package/dist/author-program.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/catalogue/aggregate.d.ts.map +1 -1
- package/dist/lib/catalogue/aggregate.js +45 -8
- package/dist/lib/catalogue/aggregate.js.map +1 -1
- package/dist/lib/catalogue/build.d.ts.map +1 -1
- package/dist/lib/catalogue/build.js +58 -12
- package/dist/lib/catalogue/build.js.map +1 -1
- package/dist/lib/catalogue/builders/adr-governs.js +1 -1
- package/dist/lib/catalogue/builders/adr-governs.js.map +1 -1
- package/dist/lib/catalogue/builders/adrs.js +2 -2
- package/dist/lib/catalogue/builders/adrs.js.map +1 -1
- package/dist/lib/catalogue/builders/contract-revisions.d.ts +13 -0
- package/dist/lib/catalogue/builders/contract-revisions.d.ts.map +1 -1
- package/dist/lib/catalogue/builders/contract-revisions.js +45 -7
- package/dist/lib/catalogue/builders/contract-revisions.js.map +1 -1
- package/dist/lib/catalogue/builders/data-model.js +1 -1
- package/dist/lib/catalogue/builders/data-model.js.map +1 -1
- package/dist/lib/catalogue/builders/entity-archetype.d.ts +24 -0
- package/dist/lib/catalogue/builders/entity-archetype.d.ts.map +1 -0
- package/dist/lib/catalogue/builders/entity-archetype.js +121 -0
- package/dist/lib/catalogue/builders/entity-archetype.js.map +1 -0
- package/dist/lib/catalogue/builders/quality-scores.js +1 -1
- package/dist/lib/catalogue/builders/requirements.js +1 -1
- package/dist/lib/catalogue/builders/requirements.js.map +1 -1
- package/dist/lib/catalogue/canonical-schema.yaml +41 -21
- package/dist/lib/catalogue/retired-catalogues.js +1 -1
- package/dist/lib/catalogue/retired-catalogues.js.map +1 -1
- package/dist/lib/catalogue/rubric-coverage-map.yaml +7 -3
- package/dist/lib/catalogue/schema-loader.d.ts +3 -3
- package/dist/lib/catalogue/schema-loader.d.ts.map +1 -1
- package/dist/lib/catalogue/staleness-verdicts.js +3 -3
- package/dist/lib/catalogue/staleness-verdicts.js.map +1 -1
- package/dist/lib/metamodel/roundtrip-gate.js +1 -1
- package/dist/lib/metamodel/roundtrip-gate.js.map +1 -1
- package/dist/lib/metamodel/schema-projection.d.ts +3 -3
- package/dist/lib/metamodel/schema-projection.d.ts.map +1 -1
- package/dist/lib/metamodel/schema-projection.js +2 -2
- package/dist/lib/metamodel/schema-projection.js.map +1 -1
- package/dist/lib/structure/apply.js +2 -2
- package/dist/lib/structure/apply.js.map +1 -1
- package/dist/lib/structure/archive.d.ts.map +1 -1
- package/dist/lib/structure/archive.js +19 -7
- package/dist/lib/structure/archive.js.map +1 -1
- package/dist/lib/structure/catalogue.d.ts +7 -2
- package/dist/lib/structure/catalogue.d.ts.map +1 -1
- package/dist/lib/structure/catalogue.js +31 -10
- package/dist/lib/structure/catalogue.js.map +1 -1
- package/dist/lib/structure/compose.js +1 -1
- package/dist/lib/structure/compose.js.map +1 -1
- package/dist/lib/structure/effects.js +1 -1
- package/dist/lib/structure/effects.js.map +1 -1
- package/dist/lib/structure/extract.js +3 -3
- package/dist/lib/structure/extract.js.map +1 -1
- package/dist/lib/structure/intended.d.ts +66 -0
- package/dist/lib/structure/intended.d.ts.map +1 -0
- package/dist/lib/structure/intended.js +194 -0
- package/dist/lib/structure/intended.js.map +1 -0
- package/dist/lib/structure/model.js +1 -1
- package/dist/lib/structure/model.js.map +1 -1
- package/dist/lib/structure/render.js +1 -1
- package/dist/lib/structure/render.js.map +1 -1
- package/dist/lib/structure/view.d.ts +3 -1
- package/dist/lib/structure/view.d.ts.map +1 -1
- package/dist/lib/structure/view.js +8 -3
- package/dist/lib/structure/view.js.map +1 -1
- package/dist/lib/validate/agreement-evidence.d.ts +1 -1
- package/dist/lib/validate/agreement-evidence.js +2 -2
- package/dist/lib/validate/agreement-evidence.js.map +1 -1
- package/dist/lib/validate/behaviour-store.d.ts +1 -1
- package/dist/lib/validate/behaviour-store.d.ts.map +1 -1
- package/dist/lib/validate/behaviour-store.js +49 -12
- package/dist/lib/validate/behaviour-store.js.map +1 -1
- package/dist/lib/validate/dispatch.js +1 -1
- package/dist/lib/validate/dispatch.js.map +1 -1
- package/dist/lib/validate/structural-model.d.ts +2 -2
- package/dist/lib/validate/structural-model.d.ts.map +1 -1
- package/dist/lib/validate/structural-model.js +48 -35
- package/dist/lib/validate/structural-model.js.map +1 -1
- package/dist/maintain-program.d.ts.map +1 -1
- package/dist/maintain-program.js +7 -1
- package/dist/maintain-program.js.map +1 -1
- package/dist/maintain-version.json +2 -2
- package/dist/verbs/change.js +2 -2
- package/dist/verbs/change.js.map +1 -1
- package/dist/verbs/migrate-structure.d.ts +6 -0
- package/dist/verbs/migrate-structure.d.ts.map +1 -0
- package/dist/verbs/migrate-structure.js +36 -0
- package/dist/verbs/migrate-structure.js.map +1 -0
- package/dist/verbs/structure.d.ts +0 -3
- package/dist/verbs/structure.d.ts.map +1 -1
- package/dist/verbs/structure.js +5 -34
- package/dist/verbs/structure.js.map +1 -1
- package/dist/verify-version.json +2 -2
- package/package.json +1 -1
- package/scripts/author-acceptance.mjs +5 -1
- package/scripts/author-version.json +2 -2
- package/scripts/build-persona-package.mjs +11 -7
- package/scripts/maintain-acceptance.mjs +8 -1
- package/scripts/maintain-version.json +2 -2
- package/scripts/verify-version.json +2 -2
package/dist/maintain-program.js
CHANGED
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
// (M-ADR 0218 §4.2–4.3): the method payload, lock, CI block and briefing (`sync`,
|
|
8
8
|
// `generate-briefing`), the derived model (`catalogue build | aggregate | graph | diff`), an
|
|
9
9
|
// output the caller names (`pack build`, `render screen`), and a code repository's briefing
|
|
10
|
-
// (`context pull`)
|
|
10
|
+
// (`context pull`), and the structural model's generated views (`structure render`, with `structure show` beside
|
|
11
|
+
// them). Plus the whole verify surface, because the personas nest.
|
|
11
12
|
//
|
|
12
13
|
// ⚠ As with sdd-verify, the boundary is ABSENCE, not a menu: the package ships only the import
|
|
13
14
|
// closure of maintain-bin.js, so authoring verbs (init, scaffold, plan, conformance,
|
|
@@ -23,6 +24,7 @@ import { registerContext } from "./verbs/context.js";
|
|
|
23
24
|
import { registerGenerateBriefing } from "./verbs/generate-briefing.js";
|
|
24
25
|
import { registerPackBuild } from "./verbs/pack-build.js";
|
|
25
26
|
import { registerRender } from "./verbs/render.js";
|
|
27
|
+
import { registerStructure } from "./verbs/structure.js";
|
|
26
28
|
import { registerSync } from "./verbs/sync.js";
|
|
27
29
|
const SPEC_URL = "docs/method/cli/sdd-cli-specification.md (in the method distribution)";
|
|
28
30
|
/** The verbs maintain adds to verify, as `<verb>` or `<verb> <subcommand>`. Asserted by test. */
|
|
@@ -37,6 +39,8 @@ export const MAINTAIN_ONLY_SURFACE = [
|
|
|
37
39
|
"catalogue diff",
|
|
38
40
|
"pack build",
|
|
39
41
|
"render screen",
|
|
42
|
+
"structure show",
|
|
43
|
+
"structure render",
|
|
40
44
|
];
|
|
41
45
|
/** The full surface: verify's, plus maintain's own. */
|
|
42
46
|
export const MAINTAIN_SURFACE = [...VERIFY_SURFACE, ...MAINTAIN_ONLY_SURFACE];
|
|
@@ -79,6 +83,8 @@ export function buildMaintainProgram() {
|
|
|
79
83
|
registerGenerateBriefing(program);
|
|
80
84
|
registerContext(program);
|
|
81
85
|
registerRender(program);
|
|
86
|
+
// The structural model's generated views are derived (M-ADR 0230 §4.3); show is the read beside them.
|
|
87
|
+
registerStructure(program);
|
|
82
88
|
const catalogue = program.commands.find((c) => c.name() === "catalogue");
|
|
83
89
|
catalogue.description("Build, aggregate, validate and query per-SDD catalogues (M-ADR 0134) — the derived model");
|
|
84
90
|
registerCatalogueBuild(catalogue);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"maintain-program.js","sourceRoot":"","sources":["../src/maintain-program.ts"],"names":[],"mappings":"AAAA,w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
|
import { archiveChange } from "../lib/structure/archive.js";
|
|
2
|
-
// `change archive <change>`: the method's archive operation (M-ADR 0230 §4.6
|
|
2
|
+
// `change archive <change>`: the method's archive operation (M-ADR 0230 §4.6). Behaviour and structure are
|
|
3
3
|
// prepared in a scratch worktree, validated as a whole, and published as one commit only if the store has not moved.
|
|
4
4
|
// Run it again after an interruption: it verifies an archive that already landed, and recovers a raw `openspec archive`.
|
|
5
5
|
export function registerChange(program) {
|
|
6
6
|
const change = program.command("change").description("Operate on a change in the behaviour store (M-ADR 0223, M-ADR 0230)");
|
|
7
7
|
change
|
|
8
8
|
.command("archive <change>")
|
|
9
|
-
.description("Archive a judged change: its behaviour and structure published as one guarded commit (M-ADR 0230 §4.6
|
|
9
|
+
.description("Archive a judged change: its behaviour and structure published as one guarded commit (M-ADR 0230 §4.6)")
|
|
10
10
|
.option("--sdd-path <path>", "the SDD whose openspec/ is the store (default: the current directory)", ".")
|
|
11
11
|
.action(async (name, opts) => {
|
|
12
12
|
process.exitCode = await archiveChange({ sddPath: opts.sddPath, change: name, write: (s) => process.stdout.write(s) });
|
package/dist/verbs/change.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"change.js","sourceRoot":"","sources":["../../src/verbs/change.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D,
|
|
1
|
+
{"version":3,"file":"change.js","sourceRoot":"","sources":["../../src/verbs/change.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D,2GAA2G;AAC3G,qHAAqH;AACrH,yHAAyH;AACzH,MAAM,UAAU,cAAc,CAAC,OAAgB;IAC7C,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,WAAW,CAAC,qEAAqE,CAAC,CAAC;IAC5H,MAAM;SACH,OAAO,CAAC,kBAAkB,CAAC;SAC3B,WAAW,CAAC,wGAAwG,CAAC;SACrH,MAAM,CAAC,mBAAmB,EAAE,uEAAuE,EAAE,GAAG,CAAC;SACzG,MAAM,CAAC,KAAK,EAAE,IAAY,EAAE,IAAyB,EAAE,EAAE;QACxD,OAAO,CAAC,QAAQ,GAAG,MAAM,aAAa,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IACzH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Command } from "commander";
|
|
2
|
+
export declare function runMigrateStructure(sddPath: string, options: {
|
|
3
|
+
dryRun: boolean;
|
|
4
|
+
}, write: (s: string) => void): Promise<number>;
|
|
5
|
+
export declare function registerMigrateStructure(program: Command): void;
|
|
6
|
+
//# sourceMappingURL=migrate-structure.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migrate-structure.d.ts","sourceRoot":"","sources":["../../src/verbs/migrate-structure.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKzC,wBAAsB,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE;IAAE,MAAM,EAAE,OAAO,CAAA;CAAE,EAAE,KAAK,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAepI;AAID,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAW/D"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { extractStructure, writeExtraction } from "../lib/structure/extract.js";
|
|
2
|
+
// `migrate structure [--dry-run]`: extract an SDD's first structural model from its sources, with its report
|
|
3
|
+
// (M-ADR 0230 §6 step 1). Refuses an SDD that has a model; writes no source file.
|
|
4
|
+
export async function runMigrateStructure(sddPath, options, write) {
|
|
5
|
+
const x = await extractStructure(sddPath);
|
|
6
|
+
if (x.refused !== null) {
|
|
7
|
+
write(`[FAIL] migrate structure: ${x.refused}\n`);
|
|
8
|
+
return 1;
|
|
9
|
+
}
|
|
10
|
+
const total = [...x.counts.values()].reduce((a, b) => a + b, 0);
|
|
11
|
+
write(`${options.dryRun ? "would extract" : "extracted"} ${total} element(s) in ${x.counts.size} catalogue(s), ${x.files.size} partition(s); ${x.loss.length + x.extraction.length} fact(s) the model could not carry\n`);
|
|
12
|
+
if (options.dryRun) {
|
|
13
|
+
write(x.report);
|
|
14
|
+
return 0;
|
|
15
|
+
}
|
|
16
|
+
for (const p of await writeExtraction(sddPath, x))
|
|
17
|
+
write(`wrote ${p}\n`);
|
|
18
|
+
write("[INFO] migrate structure: the model is now the record of structure, and the catalogue is built from it. Keep the original sources until it is reviewed against the code; removing openspec/structure/ withdraws it\n");
|
|
19
|
+
return 0;
|
|
20
|
+
}
|
|
21
|
+
// Authored content, so the author's and sdd-cli's (M-ADR 0230 §6, at its acceptance). Attaches to the
|
|
22
|
+
// `migrate` command its program already registers.
|
|
23
|
+
export function registerMigrateStructure(program) {
|
|
24
|
+
const migrate = program.commands.find((c) => c.name() === "migrate");
|
|
25
|
+
if (!migrate)
|
|
26
|
+
throw new Error("registerMigrateStructure: register `migrate` first");
|
|
27
|
+
migrate
|
|
28
|
+
.command("structure")
|
|
29
|
+
.description("Extract the SDD's first structural model from its sources into openspec/structure/, with an extraction report; source files are untouched (M-ADR 0230)")
|
|
30
|
+
.option("--sdd-path <path>", "the SDD (default: the current directory)", ".")
|
|
31
|
+
.option("--dry-run", "write nothing; print the report", false)
|
|
32
|
+
.action(async (opts) => {
|
|
33
|
+
process.exitCode = await runMigrateStructure(opts.sddPath, { dryRun: opts.dryRun }, (s) => process.stdout.write(s));
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=migrate-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CAAC,CAAC;IAC9N,OAAO,CAAC,CAAC;AACX,CAAC;AAED,sGAAsG;AACtG,mDAAmD;AACnD,MAAM,UAAU,wBAAwB,CAAC,OAAgB;IACvD,MAAM,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,SAAS,CAAC,CAAC;IACrE,IAAI,CAAC,OAAO;QAAE,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;IACpF,OAAO;SACJ,OAAO,CAAC,WAAW,CAAC;SACpB,WAAW,CAAC,wJAAwJ,CAAC;SACrK,MAAM,CAAC,mBAAmB,EAAE,0CAA0C,EAAE,GAAG,CAAC;SAC5E,MAAM,CAAC,WAAW,EAAE,iCAAiC,EAAE,KAAK,CAAC;SAC7D,MAAM,CAAC,KAAK,EAAE,IAA0C,EAAE,EAAE;QAC3D,OAAO,CAAC,QAAQ,GAAG,MAAM,mBAAmB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACtH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -3,8 +3,5 @@ export declare function runStructureShow(sddPath: string, ref: string, write: (s
|
|
|
3
3
|
export declare function runStructureRender(sddPath: string, options: {
|
|
4
4
|
check: boolean;
|
|
5
5
|
}, write: (s: string) => void): Promise<number>;
|
|
6
|
-
export declare function runMigrateStructure(sddPath: string, options: {
|
|
7
|
-
dryRun: boolean;
|
|
8
|
-
}, write: (s: string) => void): Promise<number>;
|
|
9
6
|
export declare function registerStructure(program: Command): void;
|
|
10
7
|
//# sourceMappingURL=structure.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"structure.d.ts","sourceRoot":"","sources":["../../src/verbs/structure.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"structure.d.ts","sourceRoot":"","sources":["../../src/verbs/structure.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAQzC,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,MAAM,EACf,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,GACzB,OAAO,CAAC,MAAM,CAAC,CAwBjB;AAID,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE;IAAE,KAAK,EAAE,OAAO,CAAA;CAAE,EAC3B,KAAK,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,GACzB,OAAO,CAAC,MAAM,CAAC,CAkCjB;AAID,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAiBxD"}
|
package/dist/verbs/structure.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
2
2
|
import { dirname, join } from "node:path";
|
|
3
3
|
import { stringify } from "yaml";
|
|
4
|
-
import { extractStructure, writeExtraction } from "../lib/structure/extract.js";
|
|
5
4
|
import { elementKey, loadModel, STRUCTURE_DIR } from "../lib/structure/model.js";
|
|
6
5
|
import { describeState, renderViews, viewState } from "../lib/structure/render.js";
|
|
7
6
|
import { revisionOf, viewOf } from "../lib/structure/view.js";
|
|
8
7
|
// `structure show <catalogue>/<id>`: one element of the structural model and its revision, the value a change's
|
|
9
|
-
// `base:` records for it (M-ADR 0230 §4.4
|
|
8
|
+
// `base:` records for it (M-ADR 0230 §4.4). Read only.
|
|
10
9
|
export async function runStructureShow(sddPath, ref, write) {
|
|
11
10
|
const slash = ref.indexOf("/");
|
|
12
11
|
if (slash <= 0 || slash === ref.length - 1) {
|
|
@@ -33,7 +32,7 @@ export async function runStructureShow(sddPath, ref, write) {
|
|
|
33
32
|
write(stringify({ id: e.id, ...e.columns }));
|
|
34
33
|
return 0;
|
|
35
34
|
}
|
|
36
|
-
// `structure render [--check]`: write the generated views of the current view (M-ADR 0230 §4.3
|
|
35
|
+
// `structure render [--check]`: write the generated views of the current view (M-ADR 0230 §4.3), or, with
|
|
37
36
|
// --check, write nothing and report each view that is missing, stale or edited by hand (exit 1 if any is).
|
|
38
37
|
export async function runStructureRender(sddPath, options, write) {
|
|
39
38
|
const problems = [];
|
|
@@ -73,38 +72,10 @@ export async function runStructureRender(sddPath, options, write) {
|
|
|
73
72
|
write(off === 0 ? "[PASS] structure render --check: every view is current\n" : `[FAIL] structure render --check: ${off} view(s) not current\n`);
|
|
74
73
|
return options.check && off > 0 ? 1 : 0;
|
|
75
74
|
}
|
|
76
|
-
//
|
|
77
|
-
//
|
|
78
|
-
export async function runMigrateStructure(sddPath, options, write) {
|
|
79
|
-
const x = await extractStructure(sddPath);
|
|
80
|
-
if (x.refused !== null) {
|
|
81
|
-
write(`[FAIL] migrate structure: ${x.refused}\n`);
|
|
82
|
-
return 1;
|
|
83
|
-
}
|
|
84
|
-
const total = [...x.counts.values()].reduce((a, b) => a + b, 0);
|
|
85
|
-
write(`${options.dryRun ? "would extract" : "extracted"} ${total} element(s) in ${x.counts.size} catalogue(s), ${x.files.size} partition(s); ${x.loss.length + x.extraction.length} fact(s) the model could not carry\n`);
|
|
86
|
-
if (options.dryRun) {
|
|
87
|
-
write(x.report);
|
|
88
|
-
return 0;
|
|
89
|
-
}
|
|
90
|
-
for (const p of await writeExtraction(sddPath, x))
|
|
91
|
-
write(`wrote ${p}\n`);
|
|
92
|
-
write("[INFO] migrate structure: the model is now the record of structure, and the catalogue is built from it. Keep the original sources until it is reviewed against the code; removing openspec/structure/ withdraws it\n");
|
|
93
|
-
return 0;
|
|
94
|
-
}
|
|
75
|
+
// Read the model and write its generated views: maintain's and sdd-cli's (M-ADR 0230 §4.3, at its acceptance).
|
|
76
|
+
// Extraction is the author's (migrate-structure.ts), registered apart so this module's closure carries no extractor.
|
|
95
77
|
export function registerStructure(program) {
|
|
96
|
-
const
|
|
97
|
-
if (migrate) {
|
|
98
|
-
migrate
|
|
99
|
-
.command("structure")
|
|
100
|
-
.description("Extract the SDD's first structural model from its sources into openspec/structure/, with an extraction report; source files are untouched (M-ADR 0230, Proposed)")
|
|
101
|
-
.option("--sdd-path <path>", "the SDD (default: the current directory)", ".")
|
|
102
|
-
.option("--dry-run", "write nothing; print the report", false)
|
|
103
|
-
.action(async (opts) => {
|
|
104
|
-
process.exitCode = await runMigrateStructure(opts.sddPath, { dryRun: opts.dryRun }, (s) => process.stdout.write(s));
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
const structure = program.command("structure").description("Read the structural model, and write its generated views (M-ADR 0230, Proposed)");
|
|
78
|
+
const structure = program.command("structure").description("Read the structural model, and write its generated views (M-ADR 0230)");
|
|
108
79
|
structure
|
|
109
80
|
.command("show <element>")
|
|
110
81
|
.description("Print one element of the structural model, <catalogue>/<id>, with its revision")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"structure.js","sourceRoot":"","sources":["../../src/verbs/structure.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AACjC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"structure.js","sourceRoot":"","sources":["../../src/verbs/structure.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EAAE,S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0",
|
|
4
4
|
"description": "The full SDD method CLI (sdd-cli): init, sync, validate, catalogue build and aggregate, scaffold, plan, pack build and every other method verb for spec-driven-development repositories. The verify-only, author and maintain personas ship as @sdd-method/verify-cli, @sdd-method/author-cli and @sdd-method/maintain-cli.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"sdd-method",
|
|
@@ -44,6 +44,7 @@ const MAINTAIN_ONLY = [
|
|
|
44
44
|
/^\.claude\/settings\.json$/, /^\.github\/hooks\//, // item 5
|
|
45
45
|
/^catalogues\//, /^catalogues-aggregated\//, /^catalogues(-aggregated)?-graph\.jsonl$/, // item 7
|
|
46
46
|
/^\.sdd\/bundle-cache\//,
|
|
47
|
+
/^docs\/structure\//, // the structural model's generated views (M-ADR 0230 §4.3)
|
|
47
48
|
];
|
|
48
49
|
function lockManaged(repo) {
|
|
49
50
|
const p = join(repo, "method-baseline.lock");
|
|
@@ -141,6 +142,8 @@ for (const repo of REPOS) {
|
|
|
141
142
|
check(`api-surface @${name}`, repo, (_c, ws) => ["api-surface", "--source", ".", "--out", join(ws, "surface.yaml")]);
|
|
142
143
|
// Rewrites the SDD's own files to the current vocabulary: must never touch a maintain-only path (the lock, managed payload).
|
|
143
144
|
check(`migrate vocabulary @${name}`, repo, () => ["migrate", "vocabulary", "--sdd-path", "."]);
|
|
145
|
+
// Writes the first structural model, or refuses an SDD that has one (M-ADR 0230 §6): authored content, never a view.
|
|
146
|
+
check(`migrate structure @${name}`, repo, () => ["migrate", "structure", "--sdd-path", "."]);
|
|
144
147
|
const screens = join(repo, "screens");
|
|
145
148
|
if (existsSync(screens)) {
|
|
146
149
|
const spec = readdirSync(screens).find((f) => f.endsWith(".md"));
|
|
@@ -163,7 +166,8 @@ for (const repo of REPOS) {
|
|
|
163
166
|
void kind;
|
|
164
167
|
}
|
|
165
168
|
|
|
166
|
-
|
|
169
|
+
// change archive needs a judged change and a publishable store, which no workspace here has: listed, never passed.
|
|
170
|
+
const SURFACE = ["catalogue check", "generate-briefing", "scaffold domain", "plan", "contracts attest", "conformance", "api-surface", "render screen", "context pull", "migrate vocabulary", "migrate structure", "change archive",
|
|
167
171
|
"snapshot fold", "snapshot land", "snapshot verify", "snapshot diff", "snapshot targets", "snapshot advance"];
|
|
168
172
|
const missing = SURFACE.filter((v) => !exercised.has(v));
|
|
169
173
|
process.stdout.write(`COVERAGE exercised: ${[...exercised].join(", ")}\n`);
|
|
@@ -44,11 +44,6 @@ const ADMIN_CANARIES = [
|
|
|
44
44
|
"verbs/metamodel.js",
|
|
45
45
|
"verbs/catalogue.js",
|
|
46
46
|
"lib/catalogue/migration-map.js",
|
|
47
|
-
// The archive operation and extraction (M-ADR 0230 §4.6, §6, Proposed) are sdd-cli's while the record is Proposed: no persona carries them.
|
|
48
|
-
"verbs/change.js",
|
|
49
|
-
"lib/structure/archive.js",
|
|
50
|
-
"lib/structure/apply.js",
|
|
51
|
-
"lib/structure/extract.js",
|
|
52
47
|
];
|
|
53
48
|
const AUTHOR_ONLY_MODULES = [
|
|
54
49
|
"verbs/conformance.js",
|
|
@@ -58,6 +53,12 @@ const AUTHOR_ONLY_MODULES = [
|
|
|
58
53
|
"verbs/api-surface.js",
|
|
59
54
|
"verbs/snapshot.js",
|
|
60
55
|
"lib/snapshot/land.js",
|
|
56
|
+
// The structural model's authoring: its extraction and the archive operation (M-ADR 0230 §4.6, §6, at its acceptance).
|
|
57
|
+
"verbs/change.js",
|
|
58
|
+
"verbs/migrate-structure.js",
|
|
59
|
+
"lib/structure/archive.js",
|
|
60
|
+
"lib/structure/apply.js",
|
|
61
|
+
"lib/structure/extract.js",
|
|
61
62
|
];
|
|
62
63
|
const MAINTAIN_WRITERS = [
|
|
63
64
|
"verbs/sync.js",
|
|
@@ -69,6 +70,8 @@ const MAINTAIN_WRITERS = [
|
|
|
69
70
|
"lib/catalogue/graph-run.js",
|
|
70
71
|
"lib/snapshot/catalogue-diff.js",
|
|
71
72
|
"lib/pack/builder.js",
|
|
73
|
+
// The generated views' writer (M-ADR 0230 §4.3); render.js itself is read by the structural-model validator.
|
|
74
|
+
"verbs/structure.js",
|
|
72
75
|
];
|
|
73
76
|
const AUTHOR_CANARIES = [...ADMIN_CANARIES, ...AUTHOR_ONLY_MODULES];
|
|
74
77
|
const PERSONAS = {
|
|
@@ -84,6 +87,7 @@ const PERSONAS = {
|
|
|
84
87
|
"verbs/sync.js",
|
|
85
88
|
"verbs/pack.js",
|
|
86
89
|
"verbs/render.js",
|
|
90
|
+
"verbs/structure.js",
|
|
87
91
|
"lib/sync/index.js",
|
|
88
92
|
"lib/catalogue/build.js",
|
|
89
93
|
"lib/catalogue/aggregate.js",
|
|
@@ -115,7 +119,7 @@ const PERSONAS = {
|
|
|
115
119
|
`# @sdd-method/author-cli\n\n` +
|
|
116
120
|
`\`sdd-author\` is for the people and agents who own one SDD's content. It re-authors that content and **cannot move the baseline or rebuild the model** (M-ADR 0220).\n\n` +
|
|
117
121
|
`Verbs: everything in \`@sdd-method/verify-cli\`, plus \`scaffold domain\`, \`plan\`, \`contracts attest\`, \`conformance\`, \`api-surface\`, ` +
|
|
118
|
-
`the \`snapshot\` verbs, \`render screen\`, \`generate-briefing\`, \`context pull\` and \`
|
|
122
|
+
`the \`snapshot\` verbs, \`render screen\`, \`generate-briefing\`, \`context pull\`, \`catalogue check\`, and the structural model's \`migrate structure\` and \`change archive\`.\n\n` +
|
|
119
123
|
`\`catalogue check\` reports whether the committed catalogues are what the committed specifications build to, and writes nothing. ` +
|
|
120
124
|
`Rebuilding them (\`catalogue build\`), \`sync\` and \`pack build\` are in \`@sdd-method/maintain-cli\`; \`init\` and the administrator's verbs are in \`@sdd-method/sdd-cli\`. ` +
|
|
121
125
|
`They are not present in this package, and invoking one fails with exit 1.\n`,
|
|
@@ -134,7 +138,7 @@ const PERSONAS = {
|
|
|
134
138
|
`# @sdd-method/maintain-cli\n\n` +
|
|
135
139
|
`\`sdd-maintain\` brings an SDD repository current and rebuilds its derived model, and **cannot author specification content** (M-ADR 0218).\n\n` +
|
|
136
140
|
`Verbs: everything in \`@sdd-method/verify-cli\`, plus \`sync\`, \`generate-briefing\`, \`context pull\`, ` +
|
|
137
|
-
`\`catalogue build\`, \`catalogue aggregate\`, \`catalogue graph\`, \`catalogue diff\`, \`pack build\`, \`render screen\`.\n\n` +
|
|
141
|
+
`\`catalogue build\`, \`catalogue aggregate\`, \`catalogue graph\`, \`catalogue diff\`, \`pack build\`, \`render screen\`, \`structure show\`, \`structure render\`.\n\n` +
|
|
138
142
|
`Each writes only derived or method-managed content, and two runs on the same commit write the same bytes. ` +
|
|
139
143
|
`Authoring verbs — \`init\`, \`scaffold\`, \`plan\`, \`conformance\` and the rest — are not present in it, ` +
|
|
140
144
|
`and are in \`@sdd-method/sdd-cli\`. Invoking one fails with exit 1.\n`,
|
|
@@ -49,6 +49,7 @@ const FIXED = [
|
|
|
49
49
|
/^catalogues\//, /^catalogues-aggregated\//, /^catalogues(-aggregated)?-graph\.jsonl$/, // item 7
|
|
50
50
|
/^\.sdd\/bundle-cache\//, // sync's cache of the last-applied bundle (managed by sync itself)
|
|
51
51
|
/^MCP_SETUP\.md$/, // item 9 (code repo)
|
|
52
|
+
/^docs\/structure\//, // the structural model's generated views (M-ADR 0230 §4.3)
|
|
52
53
|
];
|
|
53
54
|
function lockManaged(repo) {
|
|
54
55
|
const p = join(repo, "method-baseline.lock");
|
|
@@ -217,6 +218,12 @@ for (const repo of REPOS) {
|
|
|
217
218
|
const spec = readdirSync(screens).find((f) => f.endsWith(".md"));
|
|
218
219
|
if (spec) twice(`render screen @${name}`, clone, ["render", "screen", join("screens", spec), "--out", join(ws, "screen.svg")], managed);
|
|
219
220
|
}
|
|
221
|
+
// structure render and show: an SDD with a structural model (M-ADR 0230 §4.3). show reads one domain the model holds.
|
|
222
|
+
if (existsSync(join(clone, "openspec", "structure"))) {
|
|
223
|
+
twice(`structure render @${name}`, clone, ["structure", "render", "--sdd-path", "."], managed);
|
|
224
|
+
const domain = readdirSync(join(clone, "openspec", "structure")).find((f) => f.endsWith(".yaml") && f !== "platform.yaml");
|
|
225
|
+
if (domain) twice(`structure show @${name}`, clone, ["structure", "show", `domains/${domain.slice(0, -5)}`, "--sdd-path", "."], managed, { allowNonZero: true });
|
|
226
|
+
}
|
|
220
227
|
// context pull: a scratch code repo, named for a repository this SDD catalogues, in its own directory: an
|
|
221
228
|
// SDD often catalogues a repository with its own name, and beside the clone that path IS the clone.
|
|
222
229
|
const repoCsv = join(clone, "catalogues", "repositories.csv");
|
|
@@ -233,7 +240,7 @@ for (const repo of REPOS) {
|
|
|
233
240
|
}
|
|
234
241
|
}
|
|
235
242
|
|
|
236
|
-
const SURFACE = ["sync", "generate-briefing", "catalogue build", "catalogue graph", "catalogue aggregate", "context pull", "catalogue diff", "pack build", "render screen"];
|
|
243
|
+
const SURFACE = ["sync", "generate-briefing", "catalogue build", "catalogue graph", "catalogue aggregate", "context pull", "catalogue diff", "pack build", "render screen", "structure render", "structure show"];
|
|
237
244
|
const missing = SURFACE.filter((v) => !exercised.has(v));
|
|
238
245
|
process.stdout.write(`COVERAGE exercised: ${[...exercised].join(", ")}\n`);
|
|
239
246
|
if (missing.length) process.stdout.write(`COVERAGE NOT exercised here (needs inputs this run lacks): ${missing.join(", ")}\n`);
|