@sdd-method/sdd-cli 0.36.0 → 0.38.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/lib/catalogue/archetype/maps/android.yaml +66 -0
- package/dist/lib/catalogue/archetype/maps/swiftui.yaml +58 -0
- package/dist/lib/catalogue/archetype/maps/uikit.yaml +48 -0
- package/dist/lib/catalogue/archetype/maps/web-generic.yaml +86 -0
- package/dist/lib/catalogue/archetype/openui-archetype-vocabulary.yaml +46 -0
- package/dist/lib/catalogue/archetype/resolver.d.ts +27 -0
- package/dist/lib/catalogue/archetype/resolver.d.ts.map +1 -0
- package/dist/lib/catalogue/archetype/resolver.js +87 -0
- package/dist/lib/catalogue/archetype/resolver.js.map +1 -0
- package/dist/lib/catalogue/build.d.ts.map +1 -1
- package/dist/lib/catalogue/build.js +26 -2
- package/dist/lib/catalogue/build.js.map +1 -1
- package/dist/lib/catalogue/builders/index.d.ts +2 -0
- package/dist/lib/catalogue/builders/index.d.ts.map +1 -1
- package/dist/lib/catalogue/builders/index.js +1 -0
- package/dist/lib/catalogue/builders/index.js.map +1 -1
- package/dist/lib/catalogue/builders/screen-tree.d.ts +27 -0
- package/dist/lib/catalogue/builders/screen-tree.d.ts.map +1 -0
- package/dist/lib/catalogue/builders/screen-tree.js +126 -0
- package/dist/lib/catalogue/builders/screen-tree.js.map +1 -0
- package/dist/lib/catalogue/builders/screens.d.ts +31 -0
- package/dist/lib/catalogue/builders/screens.d.ts.map +1 -0
- package/dist/lib/catalogue/builders/screens.js +267 -0
- package/dist/lib/catalogue/builders/screens.js.map +1 -0
- package/dist/lib/catalogue/canonical-schema.yaml +83 -1
- package/dist/lib/catalogue/findings.d.ts +12 -2
- package/dist/lib/catalogue/findings.d.ts.map +1 -1
- package/dist/lib/catalogue/findings.js +10 -4
- package/dist/lib/catalogue/findings.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d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;AAC1E,YAAY,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAC5E,OAAO,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AACtE,YAAY,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,EACL,sBAAsB,EACtB,mBAAmB,GACpB,MAAM,wBAAwB,CAAC;AAChC,YAAY,EACV,uBAAuB,EACvB,oBAAoB,GACrB,MAAM,wBAAwB,CAAC"}
|
|
@@ -29,6 +29,7 @@ export { buildC4Systems } from "./c4-systems.js";
|
|
|
29
29
|
export { buildC4Containers } from "./c4-containers.js";
|
|
30
30
|
export { buildC4Components } from "./c4-components.js";
|
|
31
31
|
export { buildPersonas } from "./personas.js";
|
|
32
|
+
export { buildScreens } from "./screens.js";
|
|
32
33
|
export { buildUserJourneys } from "./user-journeys.js";
|
|
33
34
|
export { buildPersonaJourney, buildPersonaFeature, buildJourneyFeature, } from "./persona-journey-edges.js";
|
|
34
35
|
export { buildProductEdges } from "./product-edges.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/catalogue/builders/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAMtD,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAKzD,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAK9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAEzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAK/D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,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAE7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAE1E,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,OAAO,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAC;AAEtF,OAAO,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAC;AAEtF,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAKlE,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAEhF,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAE7D,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAEnE,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AAKjE,OAAO,EAAE,4BAA4B,EAAE,MAAM,4BAA4B,CAAC;AAE1E,OAAO,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AAEtE,OAAO,EACL,sBAAsB,EACtB,mBAAmB,GACpB,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export interface CompositionMetrics {
|
|
2
|
+
/** Longest root-to-leaf path; root = 0. */
|
|
3
|
+
readonly maxDepth: number;
|
|
4
|
+
/** Largest child-count of any node. */
|
|
5
|
+
readonly maxBreadth: number;
|
|
6
|
+
/** Children directly under root. */
|
|
7
|
+
readonly rootChildCount: number;
|
|
8
|
+
/** Distinct Capitalised call heads in the block. */
|
|
9
|
+
readonly componentCount: number;
|
|
10
|
+
/** Call head of the root statement ("" if the block has no statements). */
|
|
11
|
+
readonly rootComponent: string;
|
|
12
|
+
/** Components that appear with children anywhere in the block (ADR 0168 §4.1 isContainer). */
|
|
13
|
+
readonly containers: ReadonlySet<string>;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Strip openui-lang inline comments: from the first *unquoted* `#` to
|
|
17
|
+
* end-of-line, per line (ADR 0168 §4.4, defect g). A `Capitalised(` token inside
|
|
18
|
+
* a comment must not be lexed as a component. `#` inside a string literal is
|
|
19
|
+
* preserved.
|
|
20
|
+
*/
|
|
21
|
+
export declare function stripBlockComments(block: string): string;
|
|
22
|
+
/**
|
|
23
|
+
* Parse a (comment-stripped) openui-lang block into a composition tree and
|
|
24
|
+
* compute its structural metrics. Cycle-safe.
|
|
25
|
+
*/
|
|
26
|
+
export declare function analyzeComposition(cleanBlock: string): CompositionMetrics;
|
|
27
|
+
//# sourceMappingURL=screen-tree.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"screen-tree.d.ts","sourceRoot":"","sources":["../../../../src/lib/catalogue/builders/screen-tree.ts"],"names":[],"mappings":"AA4BA,MAAM,WAAW,kBAAkB;IACjC,2CAA2C;IAC3C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,uCAAuC;IACvC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,oCAAoC;IACpC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,oDAAoD;IACpD,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,2EAA2E;IAC3E,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,8FAA8F;IAC9F,QAAQ,CAAC,UAAU,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CAC1C;AASD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAKxD;AAiBD;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,GAAG,kBAAkB,CAiEzE"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
// Screen composition-tree analysis for openui-lang blocks (per ADR 0168).
|
|
2
|
+
//
|
|
3
|
+
// The screens builder (screens.ts) lowers a ```openui-lang block into catalogue
|
|
4
|
+
// rows by flat token-scanning. ADR 0168 adds a *fidelity floor*: the block must
|
|
5
|
+
// be a faithful tree, not a flat / empty / mis-rooted "widget bag". That needs
|
|
6
|
+
// the structural shape the flat scan throws away — so this module parses the
|
|
7
|
+
// block into a tree and computes the metrics the depth findings reason about.
|
|
8
|
+
//
|
|
9
|
+
// Pure functions, no I/O. The metrics reason about TREE SHAPE only — never about
|
|
10
|
+
// any component vocabulary (adopter-agnostic by construction, ADR 0168 §4.5).
|
|
11
|
+
//
|
|
12
|
+
// Grammar recap (ADR 0166 / openui-lang-grammar-reference.md): one
|
|
13
|
+
// `identifier = Expression` statement per line; the first statement is `root`;
|
|
14
|
+
// composition is by identifier reference inside list literals. A component is a
|
|
15
|
+
// Capitalised call head (`Name(`); local references are lowercase ids that are
|
|
16
|
+
// themselves defined as statements.
|
|
17
|
+
/** First Capitalised call head in an expression (the component invoked). */
|
|
18
|
+
const CALL_HEAD_RE = /\b([A-Z][A-Za-z0-9]*)\s*\(/;
|
|
19
|
+
/** All Capitalised call heads (for componentCount). */
|
|
20
|
+
const CALL_HEAD_RE_G = /\b([A-Z][A-Za-z0-9]*)\s*\(/g;
|
|
21
|
+
/** `identifier = Expression`, one per line. */
|
|
22
|
+
const STATEMENT_RE = /^\s*([A-Za-z_][\w-]*)\s*=\s*(.+?)\s*$/;
|
|
23
|
+
/** Quoted string literals (single or double) — stripped before ref detection. */
|
|
24
|
+
const STRING_RE = /"[^"]*"|'[^']*'/g;
|
|
25
|
+
/** Any identifier token. */
|
|
26
|
+
const IDENT_RE = /\b([A-Za-z_][\w-]*)\b/g;
|
|
27
|
+
/**
|
|
28
|
+
* Strip openui-lang inline comments: from the first *unquoted* `#` to
|
|
29
|
+
* end-of-line, per line (ADR 0168 §4.4, defect g). A `Capitalised(` token inside
|
|
30
|
+
* a comment must not be lexed as a component. `#` inside a string literal is
|
|
31
|
+
* preserved.
|
|
32
|
+
*/
|
|
33
|
+
export function stripBlockComments(block) {
|
|
34
|
+
return block
|
|
35
|
+
.split(/\r?\n/)
|
|
36
|
+
.map(stripLineComment)
|
|
37
|
+
.join("\n");
|
|
38
|
+
}
|
|
39
|
+
function stripLineComment(line) {
|
|
40
|
+
let quote = null;
|
|
41
|
+
for (let i = 0; i < line.length; i++) {
|
|
42
|
+
const c = line[i];
|
|
43
|
+
if (quote) {
|
|
44
|
+
if (c === quote)
|
|
45
|
+
quote = null;
|
|
46
|
+
}
|
|
47
|
+
else if (c === '"' || c === "'") {
|
|
48
|
+
quote = c;
|
|
49
|
+
}
|
|
50
|
+
else if (c === "#") {
|
|
51
|
+
return line.slice(0, i);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return line;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Parse a (comment-stripped) openui-lang block into a composition tree and
|
|
58
|
+
* compute its structural metrics. Cycle-safe.
|
|
59
|
+
*/
|
|
60
|
+
export function analyzeComposition(cleanBlock) {
|
|
61
|
+
const statements = new Map();
|
|
62
|
+
const order = [];
|
|
63
|
+
for (const raw of cleanBlock.split(/\r?\n/)) {
|
|
64
|
+
const m = STATEMENT_RE.exec(raw);
|
|
65
|
+
if (!m)
|
|
66
|
+
continue;
|
|
67
|
+
const id = m[1];
|
|
68
|
+
const rhs = m[2];
|
|
69
|
+
if (!statements.has(id))
|
|
70
|
+
order.push(id);
|
|
71
|
+
// Last assignment wins (re-declaration is unusual; keep it deterministic).
|
|
72
|
+
statements.set(id, { id, rhs, head: CALL_HEAD_RE.exec(rhs)?.[1] ?? "", childIds: [] });
|
|
73
|
+
}
|
|
74
|
+
const definedIds = new Set(statements.keys());
|
|
75
|
+
const containers = new Set();
|
|
76
|
+
// Resolve child references: a defined id (other than self) appearing in the
|
|
77
|
+
// expression, after stripping string literals so quoted text can't match.
|
|
78
|
+
for (const st of statements.values()) {
|
|
79
|
+
const noStrings = st.rhs.replace(STRING_RE, "");
|
|
80
|
+
const refs = new Set();
|
|
81
|
+
for (const tok of noStrings.matchAll(IDENT_RE)) {
|
|
82
|
+
const name = tok[1];
|
|
83
|
+
if (name !== st.id && definedIds.has(name))
|
|
84
|
+
refs.add(name);
|
|
85
|
+
}
|
|
86
|
+
st.childIds = [...refs];
|
|
87
|
+
if (st.head && st.childIds.length > 0)
|
|
88
|
+
containers.add(st.head);
|
|
89
|
+
}
|
|
90
|
+
// componentCount: distinct Capitalised call heads across the block (strings
|
|
91
|
+
// stripped so a `"Foo("` inside a literal is not counted).
|
|
92
|
+
const heads = new Set();
|
|
93
|
+
for (const tok of cleanBlock.replace(STRING_RE, "").matchAll(CALL_HEAD_RE_G)) {
|
|
94
|
+
heads.add(tok[1]);
|
|
95
|
+
}
|
|
96
|
+
const componentCount = heads.size;
|
|
97
|
+
const rootId = order[0];
|
|
98
|
+
if (rootId === undefined) {
|
|
99
|
+
return { maxDepth: 0, maxBreadth: 0, rootChildCount: 0, componentCount, rootComponent: "", containers };
|
|
100
|
+
}
|
|
101
|
+
const rootStmt = statements.get(rootId);
|
|
102
|
+
let maxDepth = 0;
|
|
103
|
+
let maxBreadth = 0;
|
|
104
|
+
const walk = (id, depth, seen) => {
|
|
105
|
+
const st = statements.get(id);
|
|
106
|
+
maxDepth = Math.max(maxDepth, depth);
|
|
107
|
+
if (st === undefined)
|
|
108
|
+
return; // reference to an undefined id → leaf
|
|
109
|
+
maxBreadth = Math.max(maxBreadth, st.childIds.length);
|
|
110
|
+
if (seen.has(id))
|
|
111
|
+
return; // cycle guard
|
|
112
|
+
const next = new Set(seen).add(id);
|
|
113
|
+
for (const child of st.childIds)
|
|
114
|
+
walk(child, depth + 1, next);
|
|
115
|
+
};
|
|
116
|
+
walk(rootId, 0, new Set());
|
|
117
|
+
return {
|
|
118
|
+
maxDepth,
|
|
119
|
+
maxBreadth,
|
|
120
|
+
rootChildCount: rootStmt.childIds.length,
|
|
121
|
+
componentCount,
|
|
122
|
+
rootComponent: rootStmt.head,
|
|
123
|
+
containers,
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
//# sourceMappingURL=screen-tree.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"screen-tree.js","sourceRoot":"","sources":["../../../../src/lib/catalogue/builders/screen-tree.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,EAAE;AACF,gFAAgF;AAChF,gFAAgF;AAChF,+EAA+E;AAC/E,6EAA6E;AAC7E,8EAA8E;AAC9E,EAAE;AACF,iFAAiF;AACjF,8EAA8E;AAC9E,EAAE;AACF,mEAAmE;AACnE,+EAA+E;AAC/E,gFAAgF;AAChF,+EAA+E;AAC/E,oCAAoC;AAEpC,4EAA4E;AAC5E,MAAM,YAAY,GAAG,4BAA4B,CAAC;AAClD,uDAAuD;AACvD,MAAM,cAAc,GAAG,6BAA6B,CAAC;AACrD,+CAA+C;AAC/C,MAAM,YAAY,GAAG,uCAAuC,CAAC;AAC7D,iFAAiF;AACjF,MAAM,SAAS,GAAG,kBAAkB,CAAC;AACrC,4BAA4B;AAC5B,MAAM,QAAQ,GAAG,wBAAwB,CAAC;AAwB1C;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAAa;IAC9C,OAAO,KAAK;SACT,KAAK,CAAC,OAAO,CAAC;SACd,GAAG,CAAC,gBAAgB,CAAC;SACrB,IAAI,CAAC,IAAI,CAAC,CAAC;AAChB,CAAC;AAED,SAAS,gBAAgB,CAAC,IAAY;IACpC,IAAI,KAAK,GAAkB,IAAI,CAAC;IAChC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACrC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,IAAI,KAAK,EAAE,CAAC;YACV,IAAI,CAAC,KAAK,KAAK;gBAAE,KAAK,GAAG,IAAI,CAAC;QAChC,CAAC;a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C1G,CAAC;IACD,MAAM,QAAQ,GAAG,UAAU,CAAC,GAAG,CAAC,MAAM,CAAc,CAAC;IAErD,IAAI,QAAQ,GAAG,CAAC,CAAC;IACjB,IAAI,UAAU,GAAG,CAAC,CAAC;IACnB,MAAM,IAAI,GAAG,CAAC,EAAU,EAAE,KAAa,EAAE,IAAyB,EAAQ,EAAE;QAC1E,MAAM,EAAE,GAAG,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAC9B,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;QACrC,IAAI,EAAE,KAAK,SAAS;YAAE,OAAO,CAAC,sCAAsC;QACpE,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QACtD,IAAI,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;YAAE,OAAO,CAAC,cAAc;QACxC,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACnC,KAAK,MAAM,KAAK,IAAI,EAAE,CAAC,QAAQ;YAAE,IAAI,CAAC,KAAK,EAAE,KAAK,GAAG,CAAC,EAAE,IAAI,CAAC,CAAC;IAChE,CAAC,CAAC;IACF,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,IAAI,GAAG,EAAE,CAAC,CAAC;IAE3B,OAAO;QACL,QAAQ;QACR,UAAU;QACV,cAAc,EAAE,QAAQ,CAAC,QAAQ,CAAC,MAAM;QACxC,cAAc;QACd,aAAa,EAAE,QAAQ,CAAC,IAAI;QAC5B,UAAU;KACX,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { CatalogueRow } from "../csv-writer.js";
|
|
2
|
+
import type { FindingsLog } from "../findings.js";
|
|
3
|
+
import type { Profile } from "../manifest-loader.js";
|
|
4
|
+
export interface ScreensBuildInputs {
|
|
5
|
+
readonly sddPath: string;
|
|
6
|
+
readonly findings: FindingsLog;
|
|
7
|
+
readonly profile: Profile;
|
|
8
|
+
readonly productId: string;
|
|
9
|
+
/** Feature id resolution for `realises:` -> screen_feature. */
|
|
10
|
+
readonly featureIdBySlug: ReadonlyMap<string, string>;
|
|
11
|
+
readonly featureIdByPath: ReadonlyMap<string, string>;
|
|
12
|
+
/** Persona id resolution for `persona_access:` -> persona_screen. */
|
|
13
|
+
readonly personaIdBySlug: ReadonlyMap<string, string>;
|
|
14
|
+
readonly personaIdByName: ReadonlyMap<string, string>;
|
|
15
|
+
/**
|
|
16
|
+
* Flat-composition threshold N (ADR 0168 §4.2): a composition is "flat" when
|
|
17
|
+
* `maxDepth <= 1` and `rootChildCount >= N`. Adopter-tunable with a method
|
|
18
|
+
* default; defaults to 6 when unset.
|
|
19
|
+
*/
|
|
20
|
+
readonly flatThreshold?: number;
|
|
21
|
+
}
|
|
22
|
+
export interface ScreensBuildResult {
|
|
23
|
+
readonly screens: CatalogueRow[];
|
|
24
|
+
readonly uiComponents: CatalogueRow[];
|
|
25
|
+
readonly screenComponent: CatalogueRow[];
|
|
26
|
+
readonly screenFeature: CatalogueRow[];
|
|
27
|
+
readonly personaScreen: CatalogueRow[];
|
|
28
|
+
readonly screenAction: CatalogueRow[];
|
|
29
|
+
}
|
|
30
|
+
export declare function buildScreens(inputs: ScreensBuildInputs): Promise<ScreensBuildResult>;
|
|
31
|
+
//# sourceMappingURL=screens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"screens.d.ts","sourceRoot":"","sources":["../../../../src/lib/catalogue/builders/screens.ts"],"names":[],"mappings":"AAsCA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAIrD,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC;IAC/B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,+DAA+D;IAC/D,QAAQ,CAAC,eAAe,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtD,QAAQ,CAAC,eAAe,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtD,qEAAqE;IACrE,QAAQ,CAAC,eAAe,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtD,QAAQ,CAAC,eAAe,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtD;;;;OAIG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CACjC;AAOD,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,OAAO,EAAE,YAAY,EAAE,CAAC;IACjC,QAAQ,CAAC,YAAY,EAAE,YAAY,EAAE,CAAC;IACtC,QAAQ,CAAC,eAAe,EAAE,YAAY,EAAE,CAAC;IACzC,QAAQ,CAAC,aAAa,EAAE,YAAY,EAAE,CAAC;IACvC,QAAQ,CAAC,aAAa,EAAE,YAAY,EAAE,CAAC;IACvC,QAAQ,CAAC,YAAY,EAAE,YAAY,EAAE,CAAC;CACvC;AAOD,wBAAsB,YAAY,CAChC,MAAM,EAAE,kBAAkB,GACzB,OAAO,CAAC,kBAAkB,CAAC,CA2H7B"}
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
// Screens builder — emits the UI screens catalogue family (per ADR 0166):
|
|
2
|
+
// screens, ui_components, screen_component, screen_feature,
|
|
3
|
+
// persona_screen, screen_action.
|
|
4
|
+
//
|
|
5
|
+
// Source convention (per docs/method/methods/templates/screen-spec-template.md):
|
|
6
|
+
// screens/<slug>.md
|
|
7
|
+
// ---
|
|
8
|
+
// screen: <slug> # optional; defaults to filename stem
|
|
9
|
+
// route: /path # optional
|
|
10
|
+
// status: working # optional (ADR 0165 maturity vocabulary)
|
|
11
|
+
// persona_access: [<persona-slug>, ...] # -> persona_screen
|
|
12
|
+
// realises: [<feature-slug>, ...] # -> screen_feature
|
|
13
|
+
// ---
|
|
14
|
+
// # Screen: {Name}
|
|
15
|
+
// ```openui-lang
|
|
16
|
+
// root = Stack([header, refresh])
|
|
17
|
+
// header = TextContent("Q4 Dashboard", "large-heavy")
|
|
18
|
+
// refresh = Button("Refresh", action="refresh-dashboard")
|
|
19
|
+
// ```
|
|
20
|
+
//
|
|
21
|
+
// The fenced ```openui-lang block is the normative structural core: component
|
|
22
|
+
// invocations (Capitalised call heads) -> ui_components + screen_component;
|
|
23
|
+
// `action="..."` declarations -> screen_action. The frontmatter supplies the
|
|
24
|
+
// catalogue keys + FK lists. This is the forward / authored path; the reverse
|
|
25
|
+
// toolkit projects an app's router + component tree into the same shape (the
|
|
26
|
+
// upstream step that produces these artefacts — see
|
|
27
|
+
// research/adr-0166-prototypes/ for the Phase Pre validation).
|
|
28
|
+
//
|
|
29
|
+
// Per ADR 0135 the rows are identical regardless of authoring direction; only
|
|
30
|
+
// the `source` discriminator differs (screen-spec vs screen-extraction).
|
|
31
|
+
//
|
|
32
|
+
// Application-product profile. Like personas, the walker reads `screens/` at
|
|
33
|
+
// the SDD root regardless of profile and emits empty when the directory is
|
|
34
|
+
// absent (non-app profiles simply have none).
|
|
35
|
+
import { readdir, readFile } from "node:fs/promises";
|
|
36
|
+
import { basename, join } from "node:path";
|
|
37
|
+
import { parse as parseYaml } from "yaml";
|
|
38
|
+
import { analyzeComposition, stripBlockComments } from "./screen-tree.js";
|
|
39
|
+
import { isContainerArchetype } from "../archetype/resolver.js";
|
|
40
|
+
/** Method default for the flat-composition threshold (ADR 0168 §4.2). */
|
|
41
|
+
const DEFAULT_FLAT_THRESHOLD = 6;
|
|
42
|
+
/** The only maturity value that asserts a faithful, complete composition (ADR 0168 §4.3). */
|
|
43
|
+
const COMPLETENESS_STATUS = "working";
|
|
44
|
+
const SCREENS_DIR_REL = "screens";
|
|
45
|
+
// Recognised standard maturity vocabulary (ADR 0165); other values pass through.
|
|
46
|
+
const STANDARD_MATURITY = new Set(["working", "provisional", "unknown", "absent"]);
|
|
47
|
+
export async function buildScreens(inputs) {
|
|
48
|
+
const screens = [];
|
|
49
|
+
const uiById = new Map();
|
|
50
|
+
const screenComponent = new Map();
|
|
51
|
+
const screenFeature = new Map();
|
|
52
|
+
const personaScreen = new Map();
|
|
53
|
+
const screenAction = new Map();
|
|
54
|
+
const flatThreshold = inputs.flatThreshold ?? DEFAULT_FLAT_THRESHOLD;
|
|
55
|
+
const dir = join(inputs.sddPath, SCREENS_DIR_REL);
|
|
56
|
+
let entries;
|
|
57
|
+
try {
|
|
58
|
+
entries = await readdir(dir, { withFileTypes: true });
|
|
59
|
+
}
|
|
60
|
+
catch (err) {
|
|
61
|
+
if (err.code !== "ENOENT")
|
|
62
|
+
throw err;
|
|
63
|
+
inputs.findings.add("coverage", `${SCREENS_DIR_REL}/ not found — emitting empty screens family`);
|
|
64
|
+
return emptyResult();
|
|
65
|
+
}
|
|
66
|
+
const files = entries
|
|
67
|
+
.filter((e) => e.isFile() && e.name.endsWith(".md") && !isTemplate(e.name))
|
|
68
|
+
.map((e) => e.name)
|
|
69
|
+
.sort();
|
|
70
|
+
for (const filename of files) {
|
|
71
|
+
const stem = basename(filename).replace(/\.md$/i, "");
|
|
72
|
+
const text = await readFile(join(dir, filename), "utf-8");
|
|
73
|
+
const fm = parseFrontmatter(text, inputs.findings, filename);
|
|
74
|
+
const slug = screenSlug(typeof fm.screen === "string" ? fm.screen : stem);
|
|
75
|
+
const screenId = `${inputs.productId}-${slug}`;
|
|
76
|
+
if (screens.some((s) => s["id"] === screenId)) {
|
|
77
|
+
inputs.findings.add("divergence", `screens: duplicate screen id ${screenId} (${filename}) — keeping first`);
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
const name = extractH1(text) || (typeof fm.name === "string" ? fm.name : stem);
|
|
81
|
+
const status = typeof fm.status === "string" && fm.status !== "" ? maturity(fm.status, inputs.findings, screenId) : "";
|
|
82
|
+
screens.push({
|
|
83
|
+
id: screenId,
|
|
84
|
+
name,
|
|
85
|
+
product_id: inputs.productId,
|
|
86
|
+
route: typeof fm.route === "string" ? fm.route : "",
|
|
87
|
+
status,
|
|
88
|
+
source: "screen-spec",
|
|
89
|
+
source_sdd_id: "",
|
|
90
|
+
});
|
|
91
|
+
const block = extractOpenUiLangBlock(text);
|
|
92
|
+
if (!block) {
|
|
93
|
+
inputs.findings.add("coverage", `screens: ${filename} has no \`\`\`openui-lang block — screen emitted, no components`);
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
// Strip inline `#` comments before any scan so a `Capitalised(` token in a
|
|
97
|
+
// comment can't emit a phantom component (ADR 0168 §4.4, defect g).
|
|
98
|
+
const clean = stripBlockComments(block);
|
|
99
|
+
// Component invocations: Capitalised call heads (e.g. Stack(, StatCard().
|
|
100
|
+
// Local id references (lowercase, no parens) and list literals are skipped.
|
|
101
|
+
for (const comp of new Set(matchAll(clean, /\b([A-Z][A-Za-z0-9]*)\s*\(/g))) {
|
|
102
|
+
const cid = `${inputs.productId}-${screenSlug(comp)}`;
|
|
103
|
+
if (!uiById.has(cid)) {
|
|
104
|
+
uiById.set(cid, {
|
|
105
|
+
id: cid, name: comp, product_id: inputs.productId,
|
|
106
|
+
kind: "", source: "screen-spec", source_sdd_id: "",
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
const scKey = `${screenId}__${cid}`;
|
|
110
|
+
if (!screenComponent.has(scKey)) {
|
|
111
|
+
screenComponent.set(scKey, { id: scKey, screen_id: screenId, component_id: cid, source_sdd_id: "" });
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
// Action declarations: action="..." (single or double quoted).
|
|
115
|
+
for (const action of new Set(matchAll(clean, /\baction\s*=\s*["']([^"']+)["']/g))) {
|
|
116
|
+
const aKey = `${screenId}__${screenSlug(action)}`;
|
|
117
|
+
if (!screenAction.has(aKey)) {
|
|
118
|
+
// event_id left empty: external-capable, resolved against the event
|
|
119
|
+
// catalogue when an explicit mapping exists (best-effort per ADR 0166).
|
|
120
|
+
screenAction.set(aKey, { id: aKey, screen_id: screenId, action, event_id: "", source_sdd_id: "" });
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
// Composition-depth validation (ADR 0168): structural fidelity floor +
|
|
124
|
+
// status gate + the archetype-aware root check (ADR 0169). The vocabulary-
|
|
125
|
+
// free checks reason about tree shape + status only; root-is-leaf consults
|
|
126
|
+
// the archetype map when the screen declares a `platform:`.
|
|
127
|
+
const platform = typeof fm.platform === "string" ? fm.platform : undefined;
|
|
128
|
+
emitDepthFindings(inputs.findings, screenId, status, analyzeComposition(clean), flatThreshold, platform);
|
|
129
|
+
}
|
|
130
|
+
// realises: -> screen_feature
|
|
131
|
+
for (const fref of toList(fm.realises)) {
|
|
132
|
+
const fid = inputs.featureIdBySlug.get(screenSlug(fref)) ?? inputs.featureIdByPath.get(fref);
|
|
133
|
+
if (!fid) {
|
|
134
|
+
inputs.findings.add("orphan", `screen_feature: ${screenId} realises "${fref}" — no matching feature`);
|
|
135
|
+
continue;
|
|
136
|
+
}
|
|
137
|
+
const key = `${screenId}__${fid}`;
|
|
138
|
+
if (!screenFeature.has(key))
|
|
139
|
+
screenFeature.set(key, { id: key, screen_id: screenId, feature_id: fid, source_sdd_id: "" });
|
|
140
|
+
}
|
|
141
|
+
// persona_access: -> persona_screen
|
|
142
|
+
for (const pref of toList(fm.persona_access)) {
|
|
143
|
+
const pid = inputs.personaIdBySlug.get(screenSlug(pref)) ?? inputs.personaIdByName.get(normalise(pref));
|
|
144
|
+
if (!pid) {
|
|
145
|
+
inputs.findings.add("orphan", `persona_screen: ${screenId} persona_access "${pref}" — no matching persona`);
|
|
146
|
+
continue;
|
|
147
|
+
}
|
|
148
|
+
const key = `${pid}__${screenId}`;
|
|
149
|
+
if (!personaScreen.has(key))
|
|
150
|
+
personaScreen.set(key, { id: key, persona_id: pid, screen_id: screenId, source_sdd_id: "" });
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
return {
|
|
154
|
+
screens,
|
|
155
|
+
uiComponents: [...uiById.values()],
|
|
156
|
+
screenComponent: [...screenComponent.values()],
|
|
157
|
+
screenFeature: [...screenFeature.values()],
|
|
158
|
+
personaScreen: [...personaScreen.values()],
|
|
159
|
+
screenAction: [...screenAction.values()],
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
// Composition-depth findings (ADR 0168 §4.2/§4.3). All vocabulary-free — they
|
|
163
|
+
// reason about tree shape + status only. `screen-empty-composition` and
|
|
164
|
+
// `screen-flat-composition` are advisory warnings; `screen-status-exceeds-depth`
|
|
165
|
+
// is an error (fails the build by default, like an FK failure) because a screen
|
|
166
|
+
// must not claim `working` maturity over an empty or flat composition.
|
|
167
|
+
function emitDepthFindings(findings, screenId, status, m, flatThreshold, platform) {
|
|
168
|
+
const empty = m.componentCount <= 1;
|
|
169
|
+
const flat = !empty && m.maxDepth <= 1 && m.rootChildCount >= flatThreshold;
|
|
170
|
+
if (empty) {
|
|
171
|
+
findings.add("coverage", `screen ${screenId}: composition is empty — root has no children (screen-empty-composition)`);
|
|
172
|
+
}
|
|
173
|
+
else if (flat) {
|
|
174
|
+
findings.add("coverage", `screen ${screenId}: composition is flat — root has ${m.rootChildCount} children at depth ${m.maxDepth} (screen-flat-composition)`);
|
|
175
|
+
}
|
|
176
|
+
// Status gate (keystone): `working` is the only maturity that asserts a
|
|
177
|
+
// faithful, complete composition (ADR 0168 §4.3). provisional/unknown/absent
|
|
178
|
+
// make no completeness claim and are not gated.
|
|
179
|
+
if (status === COMPLETENESS_STATUS && (empty || flat)) {
|
|
180
|
+
findings.add("convention", `screen ${screenId}: status "${COMPLETENESS_STATUS}" exceeds composition depth — block is ${empty ? "empty" : "flat"} (screen-status-exceeds-depth)`, "error");
|
|
181
|
+
}
|
|
182
|
+
// Mis-rooted (ADR 0168 §4.2 screen-root-is-leaf, archetype-aware per ADR 0169):
|
|
183
|
+
// root is a leaf/control rather than a screen container. isContainer combines
|
|
184
|
+
// the appears-with-children heuristic (containers) with the archetype map.
|
|
185
|
+
// Only fires when the screen declares a known `platform:` — without a map the
|
|
186
|
+
// heuristic alone can't distinguish an empty container root (Stack([])) from a
|
|
187
|
+
// genuine leaf root (Button([])), so the check no-ops (ADR 0168 §4.5).
|
|
188
|
+
if (m.rootComponent !== "" && m.rootChildCount === 0) {
|
|
189
|
+
const byMap = isContainerArchetype(m.rootComponent, platform);
|
|
190
|
+
if (byMap === false && !m.containers.has(m.rootComponent)) {
|
|
191
|
+
findings.add("convention", `screen ${screenId}: root component "${m.rootComponent}" is a leaf, not a container (screen-root-is-leaf)`, "error");
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
function emptyResult() {
|
|
196
|
+
return { screens: [], uiComponents: [], screenComponent: [], screenFeature: [], personaScreen: [], screenAction: [] };
|
|
197
|
+
}
|
|
198
|
+
function isTemplate(name) {
|
|
199
|
+
return /[{}]/.test(name) || name.toLowerCase().endsWith("-template.md");
|
|
200
|
+
}
|
|
201
|
+
// entity-style slug: ALLCAPS-then-Pascal split so naming variation across
|
|
202
|
+
// `MyEcoDrive` / `map_tracking_container` / `TE_driver` resolves stably
|
|
203
|
+
// (per the Phase Pre real-menu finding; mirrors entitySlug).
|
|
204
|
+
function screenSlug(s) {
|
|
205
|
+
return s
|
|
206
|
+
.replace(/([A-Z]+)([A-Z][a-z])/g, "$1-$2")
|
|
207
|
+
.replace(/([a-z0-9])([A-Z])/g, "$1-$2")
|
|
208
|
+
.toLowerCase()
|
|
209
|
+
.replace(/[^a-z0-9]+/g, "-")
|
|
210
|
+
.replace(/^-+|-+$/g, "");
|
|
211
|
+
}
|
|
212
|
+
function normalise(s) {
|
|
213
|
+
return s.trim().toLowerCase().replace(/\s+/g, " ");
|
|
214
|
+
}
|
|
215
|
+
function maturity(value, findings, screenId) {
|
|
216
|
+
const v = value.trim();
|
|
217
|
+
if (!STANDARD_MATURITY.has(v.toLowerCase())) {
|
|
218
|
+
findings.add("convention", `screens: ${screenId} status "${v}" outside standard maturity set — passed through`);
|
|
219
|
+
}
|
|
220
|
+
return v;
|
|
221
|
+
}
|
|
222
|
+
function parseFrontmatter(text, findings, filename) {
|
|
223
|
+
const m = /^---\r?\n([\s\S]*?)\r?\n---/.exec(text);
|
|
224
|
+
if (!m)
|
|
225
|
+
return {};
|
|
226
|
+
try {
|
|
227
|
+
const parsed = parseYaml(m[1] ?? "");
|
|
228
|
+
return parsed && typeof parsed === "object" ? parsed : {};
|
|
229
|
+
}
|
|
230
|
+
catch {
|
|
231
|
+
findings.add("convention", `screens: ${filename} has an unparseable frontmatter block — ignored`);
|
|
232
|
+
return {};
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
function extractH1(text) {
|
|
236
|
+
for (const raw of text.replace(/^---\r?\n[\s\S]*?\r?\n---/, "").split(/\r?\n/)) {
|
|
237
|
+
const line = raw.trim();
|
|
238
|
+
if (line === "")
|
|
239
|
+
continue;
|
|
240
|
+
const m = /^#\s+(.+)$/.exec(line);
|
|
241
|
+
if (!m)
|
|
242
|
+
return "";
|
|
243
|
+
const stripped = (m[1] ?? "").trim();
|
|
244
|
+
const prefix = /^Screen:\s*(.+)$/i.exec(stripped);
|
|
245
|
+
return prefix ? (prefix[1] ?? "").trim() : stripped;
|
|
246
|
+
}
|
|
247
|
+
return "";
|
|
248
|
+
}
|
|
249
|
+
function extractOpenUiLangBlock(text) {
|
|
250
|
+
const m = /```openui-lang\r?\n([\s\S]*?)```/.exec(text);
|
|
251
|
+
return m ? (m[1] ?? "") : null;
|
|
252
|
+
}
|
|
253
|
+
function matchAll(text, re) {
|
|
254
|
+
const out = [];
|
|
255
|
+
for (const m of text.matchAll(re))
|
|
256
|
+
if (m[1])
|
|
257
|
+
out.push(m[1]);
|
|
258
|
+
return out;
|
|
259
|
+
}
|
|
260
|
+
function toList(v) {
|
|
261
|
+
if (Array.isArray(v))
|
|
262
|
+
return v.map((x) => String(x).trim()).filter(Boolean);
|
|
263
|
+
if (typeof v === "string")
|
|
264
|
+
return v.split(",").map((x) => x.trim()).filter(Boolean);
|
|
265
|
+
return [];
|
|
266
|
+
}
|
|
267
|
+
//# sourceMappingURL=screens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"screens.js","sourceRoot":"","sources":["../../../../src/lib/catalogue/builders/screens.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,8DAA8D;AAC9D,mCAAmC;AACnC,EAAE;AACF,iFAAiF;AACjF,sBAAsB;AACtB,QAAQ;AACR,oEAAoE;AACpE,yCAAyC;AACzC,wEAAwE;AACxE,gEAAgE;AAChE,gEAAgE;AAChE,QAAQ;AACR,qBAAqB;AACrB,mBAAmB;AACnB,uCAAuC;AACvC,yDAAyD;AACzD,4DAA4D;AAC5D,QAAQ;AACR,EAAE;AACF,8EAA8E;AAC9E,4EAA4E;AAC5E,6EAA6E;AAC7E,8EAA8E;AAC9E,6EAA6E;AAC7E,oDAAoD;AACpD,+DAA+D;AAC/D,EAAE;AACF,8EAA8E;AAC9E,yEAAyE;AACzE,EAAE;AACF,6EAA6E;AAC7E,2EAA2E;AAC3E,8CAA8C;AAE9C,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,MAAM,CAAC;AAI1C,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC1E,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAqBhE,yEAAyE;AACzE,MAAM,sBAAsB,GAAG,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AAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAC5E,IAAI,OAAO,CAAC,KAAK,QAAQ;QAAE,OAAO,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IACpF,OAAO,EAAE,CAAC;AACZ,CAAC"}
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
# Builder contract: see docs/method/methods/catalogue-builder-specification.md.
|
|
46
46
|
# Category taxonomy: see docs/method/methods/product-category-taxonomy.md.
|
|
47
47
|
|
|
48
|
-
schema_version: "2.
|
|
48
|
+
schema_version: "2.16.0"
|
|
49
49
|
schema_owner: "sdd-method"
|
|
50
50
|
schema_status: "canonical"
|
|
51
51
|
# Bump rationale (2.15.0 — additive minor, per ADR 0161): adds a new edge
|
|
@@ -913,3 +913,85 @@ catalogues:
|
|
|
913
913
|
- { name: platform_sdd_id, type: string, nullable: false, description: "SDD slug of the platform side that owns the resolved capability." }
|
|
914
914
|
- { name: platform_capability_id, type: string, nullable: false, description: "Capability in the platform SDD whose capability_service includes the resolved service." }
|
|
915
915
|
- { name: service_id, type: string, nullable: false, description: "Service identifier the consuming SDD references and the platform SDD owns. The join key." }
|
|
916
|
+
|
|
917
|
+
# ---- UI screens family (schema 2.16.0, per ADR 0166) ----
|
|
918
|
+
# Application-product profile. Builder reads authored screen-spec artefacts
|
|
919
|
+
# (`screens/*.md`: frontmatter + a normative ```openui-lang fenced block).
|
|
920
|
+
# Forward: agent-authored. Reverse: the extraction toolkit projects an app's
|
|
921
|
+
# router + component tree into the same shape (the upstream step that produces
|
|
922
|
+
# these artefacts; see research/adr-0166-prototypes/ for the Phase Pre validation).
|
|
923
|
+
screens:
|
|
924
|
+
primary_key: id
|
|
925
|
+
description: "UI screen specified in the OpenUI Lang grammar (per ADR 0166). One row per screen / coherent screen group. Application-product profile (other profiles emit headers-only). Source: authored `screens/*.md` (frontmatter + ```openui-lang block); the reverse toolkit produces these from a router + component-tree projection."
|
|
926
|
+
foreign_keys:
|
|
927
|
+
- { column: product_id, references: products.id, nullable: false }
|
|
928
|
+
columns:
|
|
929
|
+
- { name: id, type: string, nullable: false, description: "Slugged PK: {product_id}-{screen-slug}." }
|
|
930
|
+
- { name: name, type: string, nullable: false, description: "Screen slug / display name." }
|
|
931
|
+
- { name: product_id, type: string, nullable: false, description: "Owning application-product." }
|
|
932
|
+
- { name: route, type: string, nullable: true, description: "Route path the screen is mounted at, when applicable." }
|
|
933
|
+
- { name: status, type: string, nullable: true, description: "Maturity marker; uses the standard working | provisional | unknown | absent vocabulary (per ADR 0165) where applicable." }
|
|
934
|
+
- { name: source, type: string, nullable: false, description: "screen-spec (forward) | screen-extraction (reverse)." }
|
|
935
|
+
- { name: source_sdd_id, type: string, nullable: true, description: "Originating SDD slug. Populated by the aggregator per ADR 0134." }
|
|
936
|
+
|
|
937
|
+
ui_components:
|
|
938
|
+
primary_key: id
|
|
939
|
+
description: "An entry in the adopter-owned component registry that screens compose against (per ADR 0166) — the UI-structure contract. A screen composes registry components but never defines one. Application-product profile. Source: components referenced across the SDD's screen-spec ```openui-lang blocks (registry projection); the reverse toolkit discovers the authoritative registry from the design-system import surface."
|
|
940
|
+
foreign_keys:
|
|
941
|
+
- { column: product_id, references: products.id, nullable: false }
|
|
942
|
+
columns:
|
|
943
|
+
- { name: id, type: string, nullable: false, description: "Slugged PK: {product_id}-{component-slug}." }
|
|
944
|
+
- { name: name, type: string, nullable: false, description: "Component identifier as used in the grammar." }
|
|
945
|
+
- { name: product_id, type: string, nullable: false, description: "Owning application-product." }
|
|
946
|
+
- { name: kind, type: string, nullable: true, description: "Optional classification: layout | display | input | chart | element | composite | remote | remote-iframe | remote-webcomponent. A `remote*` kind marks a micro-frontend federation seam (ADR 0166 §4.7)." }
|
|
947
|
+
- { name: source, type: string, nullable: false, description: "screen-spec (forward) | design-system-import (reverse)." }
|
|
948
|
+
- { name: source_sdd_id, type: string, nullable: true, description: "Originating SDD slug. Populated by the aggregator per ADR 0134." }
|
|
949
|
+
|
|
950
|
+
screen_component:
|
|
951
|
+
primary_key: id
|
|
952
|
+
description: "Edge: screen composes a UI component. Parsed from the screen-spec ```openui-lang block's component references (per ADR 0166)."
|
|
953
|
+
foreign_keys:
|
|
954
|
+
- { column: screen_id, references: screens.id, nullable: false }
|
|
955
|
+
- { column: component_id, references: ui_components.id, nullable: false }
|
|
956
|
+
columns:
|
|
957
|
+
- { name: id, type: string, nullable: false, description: "Composite PK: {screen_id}__{component_id}." }
|
|
958
|
+
- { name: screen_id, type: string, nullable: false }
|
|
959
|
+
- { name: component_id, type: string, nullable: false }
|
|
960
|
+
- { name: source_sdd_id, type: string, nullable: true, description: "Originating SDD slug. Populated by the aggregator per ADR 0134." }
|
|
961
|
+
|
|
962
|
+
screen_feature:
|
|
963
|
+
primary_key: id
|
|
964
|
+
description: "Edge: screen realises a feature (traceability). Forward: `realises:` frontmatter on the screen-spec. Reverse: route → feature mapping. Per ADR 0166."
|
|
965
|
+
foreign_keys:
|
|
966
|
+
- { column: screen_id, references: screens.id, nullable: false }
|
|
967
|
+
- { column: feature_id, references: features.id, nullable: false }
|
|
968
|
+
columns:
|
|
969
|
+
- { name: id, type: string, nullable: false, description: "Composite PK: {screen_id}__{feature_id}." }
|
|
970
|
+
- { name: screen_id, type: string, nullable: false }
|
|
971
|
+
- { name: feature_id, type: string, nullable: false }
|
|
972
|
+
- { name: source_sdd_id, type: string, nullable: true, description: "Originating SDD slug. Populated by the aggregator per ADR 0134." }
|
|
973
|
+
|
|
974
|
+
persona_screen:
|
|
975
|
+
primary_key: id
|
|
976
|
+
description: "Edge: persona can access a screen. Forward: `persona_access:` frontmatter. Reverse: route persona-access guards, permission/feature-flag config, or a host shell's per-persona menu (where the backend pre-filters visible screens). Per ADR 0166."
|
|
977
|
+
foreign_keys:
|
|
978
|
+
- { column: persona_id, references: personas.id, nullable: false }
|
|
979
|
+
- { column: screen_id, references: screens.id, nullable: false }
|
|
980
|
+
columns:
|
|
981
|
+
- { name: id, type: string, nullable: false, description: "Composite PK: {persona_id}__{screen_id}." }
|
|
982
|
+
- { name: persona_id, type: string, nullable: false }
|
|
983
|
+
- { name: screen_id, type: string, nullable: false }
|
|
984
|
+
- { name: source_sdd_id, type: string, nullable: true, description: "Originating SDD slug. Populated by the aggregator per ADR 0134." }
|
|
985
|
+
|
|
986
|
+
screen_action:
|
|
987
|
+
primary_key: id
|
|
988
|
+
description: "Edge: screen emits an action, optionally resolved to a catalogued event. The behavioural MFE seam — inter-bundle communication as a catalogued contract, not an ad-hoc string. Forward: `action=` declarations in the ```openui-lang block. Reverse: emitted custom-event / event-bus wiring. event_id is external-capable (the event may live in the platform SDD). Per ADR 0166 + ADR 0156."
|
|
989
|
+
foreign_keys:
|
|
990
|
+
- { column: screen_id, references: screens.id, nullable: false }
|
|
991
|
+
- { column: event_id, references: events.id, nullable: true, external: true }
|
|
992
|
+
columns:
|
|
993
|
+
- { name: id, type: string, nullable: false, description: "Composite PK: {screen_id}__{action-slug}." }
|
|
994
|
+
- { name: screen_id, type: string, nullable: false }
|
|
995
|
+
- { name: action, type: string, nullable: false, description: "Declared action label emitted by the screen." }
|
|
996
|
+
- { name: event_id, type: string, nullable: true, description: "Catalogued event the action maps to (per ADR 0156). External-capable; empty when the action does not resolve to a domain event." }
|
|
997
|
+
- { name: source_sdd_id, type: string, nullable: true, description: "Originating SDD slug. Populated by the aggregator per ADR 0134." }
|