@sdd-method/sdd-cli 1.46.0 → 2.0.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 +3 -0
- 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/build.d.ts.map +1 -1
- package/dist/lib/catalogue/build.js +13 -0
- package/dist/lib/catalogue/build.js.map +1 -1
- package/dist/lib/catalogue/builders/capabilities.d.ts.map +1 -1
- package/dist/lib/catalogue/builders/capabilities.js +4 -1
- package/dist/lib/catalogue/builders/capabilities.js.map +1 -1
- package/dist/lib/catalogue/builders/product-edges.d.ts.map +1 -1
- package/dist/lib/catalogue/builders/product-edges.js +3 -1
- package/dist/lib/catalogue/builders/product-edges.js.map +1 -1
- package/dist/lib/catalogue/builders/product-platform-dependencies.d.ts.map +1 -1
- package/dist/lib/catalogue/builders/product-platform-dependencies.js +16 -1
- package/dist/lib/catalogue/builders/product-platform-dependencies.js.map +1 -1
- package/dist/lib/catalogue/builders/requirements.d.ts +25 -0
- package/dist/lib/catalogue/builders/requirements.d.ts.map +1 -0
- package/dist/lib/catalogue/builders/requirements.js +240 -0
- package/dist/lib/catalogue/builders/requirements.js.map +1 -0
- package/dist/lib/catalogue/canonical-schema.yaml +160 -7
- package/dist/lib/catalogue/rubric-coverage-map.yaml +36 -0
- package/dist/lib/catalogue/schema-compat.d.ts +1 -1
- package/dist/lib/catalogue/schema-compat.js +1 -1
- package/dist/lib/init/app.js +2 -2
- package/dist/lib/sdd-index/repo-config.d.ts.map +1 -1
- package/dist/lib/sdd-index/repo-config.js +7 -2
- package/dist/lib/sdd-index/repo-config.js.map +1 -1
- package/dist/lib/sdd-index/types.d.ts +1 -1
- package/dist/lib/vocabulary/migrate.d.ts +23 -0
- package/dist/lib/vocabulary/migrate.d.ts.map +1 -0
- package/dist/lib/vocabulary/migrate.js +237 -0
- package/dist/lib/vocabulary/migrate.js.map +1 -0
- package/dist/lib/vocabulary/renames.d.ts +20 -0
- package/dist/lib/vocabulary/renames.d.ts.map +1 -0
- package/dist/lib/vocabulary/renames.js +40 -0
- package/dist/lib/vocabulary/renames.js.map +1 -0
- package/dist/lib/vocabulary/vocabulary-renames.yaml +76 -0
- package/dist/maintain-version.json +2 -2
- package/dist/verbs/migrate.d.ts +9 -0
- package/dist/verbs/migrate.d.ts.map +1 -0
- package/dist/verbs/migrate.js +32 -0
- package/dist/verbs/migrate.js.map +1 -0
- package/dist/verify-version.json +2 -2
- package/package.json +1 -1
- package/scripts/author-acceptance.mjs +3 -1
- package/scripts/author-version.json +2 -2
- package/scripts/maintain-version.json +2 -2
- package/scripts/sync-vendored-script.sh +4 -1
- package/scripts/validate-app-dependencies.sh +29 -21
- package/scripts/verify-version.json +2 -2
|
@@ -139,6 +139,8 @@ for (const repo of REPOS) {
|
|
|
139
139
|
check(`contracts attest @${name}`, repo, () => ["contracts", "attest", "--target-repo", ".", "--refresh"]);
|
|
140
140
|
check(`conformance @${name}`, repo, (_c, ws) => ["conformance", "--target-repo", ".", "--emit-finding", join(ws, "findings")]);
|
|
141
141
|
check(`api-surface @${name}`, repo, (_c, ws) => ["api-surface", "--source", ".", "--out", join(ws, "surface.yaml")]);
|
|
142
|
+
// Rewrites the SDD's own files to the current vocabulary: must never touch a maintain-only path (the lock, managed payload).
|
|
143
|
+
check(`migrate vocabulary @${name}`, repo, () => ["migrate", "vocabulary", "--sdd-path", "."]);
|
|
142
144
|
const screens = join(repo, "screens");
|
|
143
145
|
if (existsSync(screens)) {
|
|
144
146
|
const spec = readdirSync(screens).find((f) => f.endsWith(".md"));
|
|
@@ -161,7 +163,7 @@ for (const repo of REPOS) {
|
|
|
161
163
|
void kind;
|
|
162
164
|
}
|
|
163
165
|
|
|
164
|
-
const SURFACE = ["catalogue check", "generate-briefing", "scaffold domain", "plan", "contracts attest", "conformance", "api-surface", "render screen", "context pull",
|
|
166
|
+
const SURFACE = ["catalogue check", "generate-briefing", "scaffold domain", "plan", "contracts attest", "conformance", "api-surface", "render screen", "context pull", "migrate vocabulary",
|
|
165
167
|
"snapshot fold", "snapshot land", "snapshot verify", "snapshot diff", "snapshot targets", "snapshot advance"];
|
|
166
168
|
const missing = SURFACE.filter((v) => !exercised.has(v));
|
|
167
169
|
process.stdout.write(`COVERAGE exercised: ${[...exercised].join(", ")}\n`);
|
|
@@ -44,6 +44,9 @@ VENDORED=(
|
|
|
44
44
|
"validate-app-docs.sh:scripts"
|
|
45
45
|
"validate-app-dependencies.sh:scripts"
|
|
46
46
|
"validate-integration-docs.sh:scripts"
|
|
47
|
+
# A path with a slash is relative to the sdd-method root rather than its scripts directory.
|
|
48
|
+
# The vocabulary renames are data the TypeScript readers load (M-ADR 0222 §4.1).
|
|
49
|
+
"docs/method/foundations/vocabulary-renames.yaml:src/lib/vocabulary"
|
|
47
50
|
)
|
|
48
51
|
|
|
49
52
|
if [[ ! -d "$SRC_DIR" ]]; then
|
|
@@ -56,7 +59,7 @@ changed=0
|
|
|
56
59
|
for entry in "${VENDORED[@]}"; do
|
|
57
60
|
name="${entry%%:*}"
|
|
58
61
|
dest_dir="${entry#*:}"
|
|
59
|
-
src="$SRC_DIR/$name"
|
|
62
|
+
if [[ "$name" == */* ]]; then src="$SDD_METHOD_PATH/$name"; name="$(basename "$name")"; else src="$SRC_DIR/$name"; fi
|
|
60
63
|
dest="$HERE/../$dest_dir/$name"
|
|
61
64
|
|
|
62
65
|
if [[ ! -f "$src" ]]; then
|
|
@@ -11,23 +11,23 @@
|
|
|
11
11
|
#
|
|
12
12
|
# Checks (for each entry in app-platform-dependencies.yaml), split by whether they
|
|
13
13
|
# need a platform surface at all — LOCAL checks run wherever the app repo is:
|
|
14
|
-
# 1. (local) required_stability is a valid value (provisional |
|
|
14
|
+
# 1. (local) required_stability is a valid value (provisional | stable | unknown)
|
|
15
15
|
# 2a. (local) service_id is declared and non-empty
|
|
16
16
|
# 2b. (platform) service_id resolves against the platform source of truth:
|
|
17
17
|
# catalogues/services.csv (exact id match) when the catalogue exists,
|
|
18
18
|
# else docs/platform/service-architecture.md (word-anchored match)
|
|
19
|
-
# 3a. (local) a `
|
|
19
|
+
# 3a. (local) a `stable` dependency declares a contract_path at all
|
|
20
20
|
# 3b. (platform) that contract_path resolves to a file under the platform root
|
|
21
21
|
#
|
|
22
22
|
# Outputs a dependency status table.
|
|
23
|
-
# Used as the Stage
|
|
23
|
+
# Used as the Stage 9 agreement gate in the App Exploration Workflow.
|
|
24
24
|
#
|
|
25
25
|
# THE STABILITY VOCABULARY, AND WHY IT IS WHAT IT IS
|
|
26
26
|
# `required_stability` states the CONSUMING app's expectation of contract
|
|
27
27
|
# stability. Three values express that:
|
|
28
28
|
#
|
|
29
29
|
# provisional the contract may still change; the app tolerates it
|
|
30
|
-
#
|
|
30
|
+
# stable the contract is fixed; a contract_path must exist (check 3)
|
|
31
31
|
# unknown the expectation is not determined
|
|
32
32
|
#
|
|
33
33
|
# `unknown` is accepted because the canonical schema's
|
|
@@ -158,7 +158,7 @@ APP_DEPS_FILE="$APP_ROOT/app-platform-dependencies.yaml"
|
|
|
158
158
|
# This gate read only the forward file, so an entire equal-status source went
|
|
159
159
|
# ungated. Measured in one reverse estate: 15 evidence files declaring 65
|
|
160
160
|
# further dependencies, 38 of them `locked` — precisely the population
|
|
161
|
-
# a Stage
|
|
161
|
+
# a Stage 9 agreement gate exists to check — none of which this gate could see.
|
|
162
162
|
#
|
|
163
163
|
# A source that the catalogue reads and the gate does not is a coverage gap by
|
|
164
164
|
# construction, so the gate now reads both.
|
|
@@ -180,7 +180,7 @@ PLATFORM_SERVICES_CSV="$PLATFORM_ROOT/catalogues/services.csv"
|
|
|
180
180
|
# offer (instances app-dependency-stability-vocabulary-forward and -reverse).
|
|
181
181
|
VALID_STABILITY_VALUES=(
|
|
182
182
|
"provisional" # contract may still change; the app tolerates it
|
|
183
|
-
"
|
|
183
|
+
"stable" # contract is fixed; check 3 requires a resolvable contract_path
|
|
184
184
|
"unknown" # expectation not determined; no contract_path required
|
|
185
185
|
)
|
|
186
186
|
|
|
@@ -353,6 +353,13 @@ validate_dependency() {
|
|
|
353
353
|
service_id="$(yq e ".platform_dependencies[$index].service_id // \"\"" "$source_file")"
|
|
354
354
|
contract_type="$(yq e ".platform_dependencies[$index].contract_type // \"\"" "$source_file")"
|
|
355
355
|
required_stability="$(yq e ".platform_dependencies[$index].required_stability // \"\"" "$source_file")"
|
|
356
|
+
# vocabulary-alias: locked -> stable
|
|
357
|
+
# The fixed-contract stability class was `locked` (M-ADR 0222 §4.1; docs/method/foundations/vocabulary-renames.yaml).
|
|
358
|
+
# Read as `stable` for one major release and reported; from sdd-cli 3.0.0 it is invalid.
|
|
359
|
+
if [[ "$required_stability" == "locked" ]]; then
|
|
360
|
+
log_warn "$source_file: platform_dependencies[$index] uses the former required_stability 'locked', read as 'stable' (M-ADR 0222 §4.1). Run 'sdd-cli migrate vocabulary'; from sdd-cli 3.0.0 the former value is invalid."
|
|
361
|
+
required_stability="stable"
|
|
362
|
+
fi
|
|
356
363
|
contract_path="$(yq e ".platform_dependencies[$index].contract_path // \"\"" "$source_file")"
|
|
357
364
|
|
|
358
365
|
local dep_label="${service_id:-dep[$index]}"
|
|
@@ -403,7 +410,7 @@ validate_dependency() {
|
|
|
403
410
|
done
|
|
404
411
|
|
|
405
412
|
if [[ "$stability_deprecated" -eq 1 ]]; then
|
|
406
|
-
log_fail "$dep_label: required_stability '$required_stability' is not a stability value (M-ADR 0204 §4.4). Declare target_locus: '$required_stability' on the entry and give required_stability a real value (${VALID_STABILITY_VALUES[*]}) — a third-party contract can be
|
|
413
|
+
log_fail "$dep_label: required_stability '$required_stability' is not a stability value (M-ADR 0204 §4.4). Declare target_locus: '$required_stability' on the entry and give required_stability a real value (${VALID_STABILITY_VALUES[*]}) — a third-party contract can be stable."
|
|
407
414
|
((dep_errors++))
|
|
408
415
|
else
|
|
409
416
|
log_fail "$dep_label: invalid required_stability '$required_stability' (allowed: ${VALID_STABILITY_VALUES[*]})"
|
|
@@ -490,26 +497,26 @@ validate_dependency() {
|
|
|
490
497
|
((WARNINGS++))
|
|
491
498
|
fi
|
|
492
499
|
|
|
493
|
-
# Check 3: a
|
|
494
|
-
# resolves to a file (3b, needs the platform). Same split, same reason: "
|
|
500
|
+
# Check 3: a stable dependency declares a contract_path (3a, local) and that path
|
|
501
|
+
# resolves to a file (3b, needs the platform). Same split, same reason: "stable
|
|
495
502
|
# with no path at all" is an app-repo defect that needs nothing external to catch.
|
|
496
|
-
if [[ "$required_stability" == "
|
|
503
|
+
if [[ "$required_stability" == "stable" ]]; then
|
|
497
504
|
if [[ -z "$contract_path" || "$contract_path" == "null" ]]; then
|
|
498
|
-
log_fail "$dep_label: required_stability is '
|
|
505
|
+
log_fail "$dep_label: required_stability is 'stable' but contract_path is empty"
|
|
499
506
|
((dep_errors++))
|
|
500
507
|
elif [[ "$PLATFORM_AVAILABLE" -eq 0 ]]; then
|
|
501
508
|
((UNRESOLVED_CONTRACT_PATHS++))
|
|
502
509
|
else
|
|
503
510
|
local full_contract_path="$PLATFORM_ROOT/$contract_path"
|
|
504
511
|
if [[ ! -f "$full_contract_path" ]]; then
|
|
505
|
-
log_fail "$dep_label:
|
|
512
|
+
log_fail "$dep_label: stable contract_path '$contract_path' does not exist in platform repo"
|
|
506
513
|
((dep_errors++))
|
|
507
514
|
fi
|
|
508
515
|
fi
|
|
509
516
|
elif [[ "$required_stability" == "provisional" || "$required_stability" == "unknown" ]]; then
|
|
510
517
|
# Neither requires a contract_path. If one is declared it is still worth
|
|
511
518
|
# reporting when it does not resolve — silently accepting a path that
|
|
512
|
-
# points at nothing is how a
|
|
519
|
+
# points at nothing is how a stable dependency later inherits a dead path.
|
|
513
520
|
if [[ -n "$contract_path" && "$contract_path" != "null" && "$PLATFORM_AVAILABLE" -eq 1 ]]; then
|
|
514
521
|
local full_contract_path="$PLATFORM_ROOT/$contract_path"
|
|
515
522
|
if [[ ! -f "$full_contract_path" ]]; then
|
|
@@ -552,21 +559,22 @@ print_status_table() {
|
|
|
552
559
|
local service_id required_stability contract_type contract_path dep_status
|
|
553
560
|
service_id="$(yq e ".platform_dependencies[$i].service_id // \"(missing)\"" "$source_file")"
|
|
554
561
|
required_stability="$(yq e ".platform_dependencies[$i].required_stability // \"(missing)\"" "$source_file")"
|
|
562
|
+
if [[ "$required_stability" == "locked" ]]; then required_stability="stable"; fi # the former name, reported above
|
|
555
563
|
contract_type="$(yq e ".platform_dependencies[$i].contract_type // \"(missing)\"" "$source_file")"
|
|
556
564
|
contract_path="$(yq e ".platform_dependencies[$i].contract_path // \"\"" "$source_file")"
|
|
557
565
|
|
|
558
566
|
# Determine display status
|
|
559
|
-
if [[ "$required_stability" == "
|
|
567
|
+
if [[ "$required_stability" == "stable" ]]; then
|
|
560
568
|
if [[ -z "$contract_path" || "$contract_path" == "null" ]]; then
|
|
561
|
-
dep_status="${RED}
|
|
569
|
+
dep_status="${RED}STABLE UNMET${NC}"
|
|
562
570
|
elif [[ "$PLATFORM_AVAILABLE" -eq 0 ]]; then
|
|
563
571
|
# A declared path that was never resolved is not "OK" and not "UNMET".
|
|
564
572
|
# Reporting either would be a claim the run cannot support.
|
|
565
|
-
dep_status="${YELLOW}
|
|
573
|
+
dep_status="${YELLOW}STABLE UNRESOLVED${NC}"
|
|
566
574
|
elif [[ -f "$PLATFORM_ROOT/$contract_path" ]]; then
|
|
567
|
-
dep_status="${GREEN}
|
|
575
|
+
dep_status="${GREEN}STABLE OK${NC}"
|
|
568
576
|
else
|
|
569
|
-
dep_status="${RED}
|
|
577
|
+
dep_status="${RED}STABLE UNMET${NC}"
|
|
570
578
|
fi
|
|
571
579
|
elif [[ "$required_stability" == "provisional" ]]; then
|
|
572
580
|
dep_status="${YELLOW}PROVISIONAL${NC}"
|
|
@@ -637,7 +645,7 @@ main() {
|
|
|
637
645
|
fi
|
|
638
646
|
|
|
639
647
|
if [[ "$FAILURES" -gt 0 ]]; then
|
|
640
|
-
log_fail "$FAILURES dependency check(s) failed. Stage
|
|
648
|
+
log_fail "$FAILURES dependency check(s) failed. Stage 9 agreement gate NOT met."
|
|
641
649
|
exit 1
|
|
642
650
|
fi
|
|
643
651
|
|
|
@@ -648,7 +656,7 @@ main() {
|
|
|
648
656
|
# while never executing (M-ADR 0200 §4.3).
|
|
649
657
|
if [[ "$PLATFORM_AVAILABLE" -eq 0 ]]; then
|
|
650
658
|
log_warn "Ran check 1 (stability vocabulary) and the local halves of checks 2-3 over $TOTAL_DEPS dependency(ies): $FAILURES failure(s), $WARNINGS warning(s)."
|
|
651
|
-
log_warn "NOT RUN, for want of --platform-root: $UNRESOLVED_SERVICE_IDS service_id resolution(s) and $UNRESOLVED_CONTRACT_PATHS
|
|
659
|
+
log_warn "NOT RUN, for want of --platform-root: $UNRESOLVED_SERVICE_IDS service_id resolution(s) and $UNRESOLVED_CONTRACT_PATHS stable contract_path resolution(s)."
|
|
652
660
|
log_info "This is a partial run, not a met gate — pass --platform-root to complete it."
|
|
653
661
|
exit 0
|
|
654
662
|
fi
|
|
@@ -656,7 +664,7 @@ main() {
|
|
|
656
664
|
if [[ "$WARNINGS" -gt 0 ]]; then
|
|
657
665
|
log_warn "All required checks passed with $WARNINGS warning(s)."
|
|
658
666
|
else
|
|
659
|
-
log_pass "All dependency checks passed. Stage
|
|
667
|
+
log_pass "All dependency checks passed. Stage 9 agreement gate met."
|
|
660
668
|
fi
|
|
661
669
|
exit 0
|
|
662
670
|
}
|