@sdd-method/author-cli 0.15.1 → 0.16.1
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/lib/behaviour-store/archive.js +52 -5
- package/dist/lib/behaviour-store/schema.js +24 -12
- package/dist/lib/catalogue/aggregation-manifest-loader.js +173 -0
- package/dist/lib/catalogue/build.js +3 -0
- package/dist/lib/catalogue/builders/adrs.js +1 -1
- package/dist/lib/catalogue/builders/contracts.js +5 -0
- package/dist/lib/catalogue/builders/features.js +34 -4
- package/dist/lib/catalogue/builders/repositories.js +5 -3
- package/dist/lib/catalogue/builders/requirements.js +1 -1
- package/dist/lib/catalogue/canonical-schema.yaml +3 -2
- package/dist/lib/catalogue/contract-id.js +1 -1
- package/dist/lib/catalogue/impact-run.js +6 -1
- package/dist/lib/catalogue/traceability-loader.js +3 -0
- package/dist/lib/contracts-availability/index.js +4 -1
- package/dist/lib/plan/read-sdd.js +2 -1
- package/dist/lib/scaffold/behaviour-store.js +5 -3
- package/dist/lib/sdd-index/repo-config.js +1 -0
- package/dist/lib/snapshot/advance.js +13 -5
- package/dist/lib/snapshot/fold.js +3 -3
- package/dist/lib/snapshot/manifest.js +18 -2
- package/dist/lib/structure/model.js +6 -1
- package/dist/lib/structure/removals.js +121 -0
- package/dist/lib/validate/behaviour-store.js +228 -38
- package/dist/lib/validate/feature-spec-pointers.js +7 -0
- package/dist/lib/validate/structural-model.js +7 -1
- package/dist/maintain-version.json +2 -2
- package/dist/verify-version.json +2 -2
- package/package.json +2 -2
- package/scripts/validate-app-docs.sh +18 -2
|
@@ -20,6 +20,9 @@
|
|
|
20
20
|
// element another open change adds names that change in depends_on
|
|
21
21
|
// no-op contradicted by a behaviour delta for a feature the model does not hold; a structural delta
|
|
22
22
|
// must add that feature
|
|
23
|
+
// removals each id a delta removes, against the rows outside the model that still name it: this SDD's catalogues
|
|
24
|
+
// built from its records and its members' catalogues (lib/structure/removals.ts). Reported as [WARN],
|
|
25
|
+
// not counted as a finding: a removal may be meant, and the warning names what it owes before the push
|
|
23
26
|
// Composition (§4.5; lib/structure/compose.ts), with a change agreed when its agreement record says so:
|
|
24
27
|
// overlap two agreed changes writing one element or adding one id; a change overlapping an agreed one
|
|
25
28
|
// composed each change's view (with its dependency closure) and the intended view (every agreed change)
|
|
@@ -44,6 +47,7 @@ import { agreedOrder, attribute, checkDependencies, checkOverlap, closure, inten
|
|
|
44
47
|
import { describeState, renderViews, VIEW_PATHS, viewState } from "../structure/render.js";
|
|
45
48
|
import { Additions, CONTRACTS, readAgreement } from "../structure/intended.js";
|
|
46
49
|
import { validateDeltas, validateView, viewOf } from "../structure/view.js";
|
|
50
|
+
import { checkRemovals } from "../structure/removals.js";
|
|
47
51
|
const VIEW_COUNT = Object.keys(VIEW_PATHS).length;
|
|
48
52
|
/** Findings FAIL (from M-ADR 0230's acceptance); false reports them only, as while M-ADR 0230 was Proposed. Also binds a change's structural deltas as agreed content in the behaviour-store check. */
|
|
49
53
|
export const ENFORCED = true;
|
|
@@ -222,6 +226,8 @@ export async function checkStructuralModel(repo, options = {}) {
|
|
|
222
226
|
}
|
|
223
227
|
}
|
|
224
228
|
lines.push(`changes: ${changes.length} open, ${withDeltas} with structural deltas, ${noOps} claiming none, ${without} without the artifact`);
|
|
229
|
+
const removals = await checkRemovals(repo, schema, structures);
|
|
230
|
+
lines.push(...removals.lines);
|
|
225
231
|
// Composition (M-ADR 0230 §4.5): the three views and the three checks.
|
|
226
232
|
const archived = await archivedNames(repo);
|
|
227
233
|
checkOverlap(open, problems);
|
|
@@ -268,7 +274,7 @@ export async function checkStructuralModel(repo, options = {}) {
|
|
|
268
274
|
if (raw > 0)
|
|
269
275
|
lines.push(`archived changes whose structure is not applied: ${raw}`);
|
|
270
276
|
lines.push(`views: current; at each of ${[...open.values()].filter((o) => o.structure.deltas.length > 0).length} change(s) with deltas; intended from ${agreed.length} agreed change(s)`);
|
|
271
|
-
const body = lines.map((l) => `${l}\n`).join("");
|
|
277
|
+
const body = lines.map((l) => `${l}\n`).join("") + removals.findings.map((w) => `[WARN] ${w}\n`).join("");
|
|
272
278
|
if (problems.length === 0)
|
|
273
279
|
return { exitCode: 0, stdout: `structural-model:\n${body}[PASS] structural-model: ok\n` };
|
|
274
280
|
const tag = enforced ? "FAIL" : "WARN";
|
package/dist/verify-version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sdd-method/author-cli",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"sddCliVersion": "5.
|
|
3
|
+
"version": "0.16.1",
|
|
4
|
+
"sddCliVersion": "5.3.1",
|
|
5
5
|
"description": "Re-author one SDD's content — scaffold, plan, contracts, conformance, api-surface, snapshots, briefings, catalogue check — plus every read-only verify verb. Ships only the code those verbs reach; it cannot sync the baseline or rebuild the catalogues. Maintenance is in @sdd-method/maintain-cli, administration in @sdd-method/sdd-cli.",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"type": "module",
|
|
@@ -8,10 +8,16 @@
|
|
|
8
8
|
# 1. service-architecture.md is present
|
|
9
9
|
# 2. feature-tree.md is present (may be at docs/ or repo root)
|
|
10
10
|
# 3. app-platform-dependencies.yaml is present
|
|
11
|
-
# 4. Feature spec files under features
|
|
11
|
+
# 4. Feature spec files under features/ have required sections:
|
|
12
12
|
# - ## Overview
|
|
13
|
-
# - ## Acceptance Criteria
|
|
13
|
+
# - ## Acceptance Criteria (a prefix: the template's heading is
|
|
14
|
+
# "## Acceptance Criteria Summary"; once the feature ships it holds the
|
|
15
|
+
# pointer to its living spec, M-ADR 0221 §4.3)
|
|
14
16
|
# - ## Platform Contract Dependencies
|
|
17
|
+
# 5. Feature specs sit at features/<feature>/<feature>.md, one directory per
|
|
18
|
+
# feature with its story files beside it (the app-feature-spec skill's
|
|
19
|
+
# path). A spec stored flat at features/<name>.md is reported as [WARN],
|
|
20
|
+
# advisory: it does not fail the run.
|
|
15
21
|
#
|
|
16
22
|
# Does NOT check:
|
|
17
23
|
# - Glossary alignment (no domain glossary in app repos)
|
|
@@ -142,6 +148,7 @@ check_feature_specs() {
|
|
|
142
148
|
local specs_found=0
|
|
143
149
|
local specs_failed=0
|
|
144
150
|
local specs_passed=0
|
|
151
|
+
local specs_flat=0
|
|
145
152
|
|
|
146
153
|
# Discover feature specs under features/*/
|
|
147
154
|
local feature_spec
|
|
@@ -157,6 +164,12 @@ check_feature_specs() {
|
|
|
157
164
|
fi
|
|
158
165
|
done
|
|
159
166
|
|
|
167
|
+
if [[ "$(dirname "$feature_spec")" == "$APP_ROOT/features" ]]; then
|
|
168
|
+
local name; name="$(basename "$feature_spec" .md)"
|
|
169
|
+
log_warn "$rel: stored flat under features/; a feature spec's path is features/${name}/${name}.md, one directory per feature with its story files beside it (app-feature-spec skill). Advisory: reported, not failed"
|
|
170
|
+
specs_flat=$((specs_flat + 1))
|
|
171
|
+
fi
|
|
172
|
+
|
|
160
173
|
if [[ "$file_failures" -eq 0 ]]; then
|
|
161
174
|
log_pass "$rel: all required sections present"
|
|
162
175
|
specs_passed=$((specs_passed + 1))
|
|
@@ -172,6 +185,9 @@ check_feature_specs() {
|
|
|
172
185
|
fi
|
|
173
186
|
|
|
174
187
|
log_info "Group 2: $specs_passed/$specs_found feature specs passed, $specs_failed failed"
|
|
188
|
+
if [[ "$specs_flat" -gt 0 ]]; then
|
|
189
|
+
log_warn "Group 2: $specs_flat of $specs_found feature spec(s) stored flat under features/ (advisory)"
|
|
190
|
+
fi
|
|
175
191
|
}
|
|
176
192
|
|
|
177
193
|
# ──────────────────────────────────────────────────────────────────────────────
|