-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
102 lines (90 loc) · 2.67 KB
/
Copy pathtypes.ts
File metadata and controls
102 lines (90 loc) · 2.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
// Shared domain types. The model values themselves live in config/ (one file per concern),
// mirroring the canonical docs/03-blueprint/model-data-sheet.md.
export type Lang = 'en' | 'id';
export interface Bilingual {
en: string;
id: string;
}
/** The 12 quality attributes, in canonical qaFit-vector order (Model Data Sheet Section 1). */
export type QaId =
| 'performance'
| 'scalability'
| 'availability'
| 'security'
| 'maintainability'
| 'deployability'
| 'testability'
| 'observability'
| 'dataConsistency'
| 'interoperability'
| 'costEfficiency'
| 'timeToMarket';
/** The 14 project factors (Model Data Sheet Section 2). */
export type FactorId =
| 'team'
| 'distribution'
| 'ttm'
| 'budget'
| 'lifespan'
| 'scale'
| 'dataVolume'
| 'async'
| 'realtime'
| 'domain'
| 'consistency'
| 'security'
| 'legacy'
| 'devops';
export type DimensionId = 'D1' | 'D2' | 'D3' | 'D4' | 'D5';
/** Factor levels chosen by the user: 0, 1, or 2. Missing entries default to 0. */
export type Levels = Partial<Record<FactorId, number>>;
/** Normalized QA weights summing to 100. */
export type Weights = Record<QaId, number>;
export interface QualityAttribute {
id: QaId;
name: Bilingual;
/** Plain-language label shown in guided mode (the prototype's friendly voice). */
plain: Bilingual;
/** One-line plain explanation shown under the label in guided mode. */
gloss: Bilingual;
isoMapping: string;
/** true for concerns OUTSIDE the ISO 25010 product model (economic/delivery goals). */
economicFlag: boolean;
}
export interface Factor {
id: FactorId;
label: Bilingual;
/** Friendly question shown in guided mode (the prototype's voice). */
question: Bilingual;
/** One-line plain hint shown under the question in guided mode. */
gloss: Bilingual;
/** Exactly three level labels, for indices 0/1/2. */
levels: [Bilingual, Bilingual, Bilingual];
help: Bilingual;
group: Bilingual;
/** Shown by default (the prototype surfaces 3); the rest sit behind "show other factors". */
primary?: boolean;
/** budget is inverted: level 0 (Tight) is the strongest cost-efficiency signal. */
inverted?: boolean;
}
export interface ArchOption {
id: string;
name: string;
/** qaFit vector of integers 1..5, in canonical QA order. */
qaFit: number[];
}
export interface Dimension {
id: DimensionId;
name: Bilingual;
/** Short guided-mode label (Build Spec Section 6). */
guidedLabel: Bilingual;
options: ArchOption[];
}
export interface RankedOption {
name: string;
id: string;
/** Raw composite score in [1, 5]. */
score: number;
/** Canonical config index, used for deterministic tie-breaking. */
index: number;
}