yarramate 0.4.0 → 0.6.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/README.md +3 -1
- package/dist/adapters/graphify-cli.js +4 -1
- package/dist/adapters/likec4-cli.js +210 -51
- package/dist/adapters/likec4-export.d.ts +1 -1
- package/dist/adapters/likec4-prepare.d.ts +6 -0
- package/dist/adapters/likec4-prepare.js +40 -2
- package/dist/adapters/mcp-cli.js +29 -22
- package/dist/check-command.js +70 -4
- package/dist/cli-support.d.ts +6 -1
- package/dist/cli-support.js +12 -2
- package/dist/cli.js +39 -22
- package/dist/compiler.js +33 -7
- package/dist/index.d.ts +1 -1
- package/dist/next-command.d.ts +25 -0
- package/dist/next-command.js +272 -0
- package/dist/profile.d.ts +5 -0
- package/dist/profile.js +4 -0
- package/dist/reconciliation.d.ts +11 -1
- package/dist/reconciliation.js +73 -4
- package/dist/status-command.js +4 -1
- package/package.json +6 -5
- package/schema/yarramate-check-result.schema.json +12 -0
- package/schema/yarramate-core-contract.schema.json +1 -0
- package/schema/yarramate-likec4-generated-project-v2.schema.json +6 -0
- package/schema/yarramate-likec4-generated-project.schema.json +6 -0
- package/schema/yarramate-likec4-project.schema.json +1 -1
- package/schema/yarramate-next-result.schema.json +85 -0
- package/schema/yarramate-reconciliation-report.schema.json +24 -2
- package/schema/yarramate-status-result.schema.json +6 -1
- package/skills/yarramate-architecture/SKILL.md +9 -9
- package/skills/yarramate-architecture/references/native-authoring.md +74 -6
|
@@ -18,7 +18,8 @@
|
|
|
18
18
|
"findings",
|
|
19
19
|
"contradicted",
|
|
20
20
|
"unknown",
|
|
21
|
-
"notObserved"
|
|
21
|
+
"notObserved",
|
|
22
|
+
"subjectsWithoutEvidence"
|
|
22
23
|
],
|
|
23
24
|
"properties": {
|
|
24
25
|
"evidenceDocuments": { "type": "integer", "minimum": 0 },
|
|
@@ -27,12 +28,17 @@
|
|
|
27
28
|
"findings": { "type": "integer", "minimum": 0 },
|
|
28
29
|
"contradicted": { "type": "integer", "minimum": 0 },
|
|
29
30
|
"unknown": { "type": "integer", "minimum": 0 },
|
|
30
|
-
"notObserved": { "type": "integer", "minimum": 0 }
|
|
31
|
+
"notObserved": { "type": "integer", "minimum": 0 },
|
|
32
|
+
"subjectsWithoutEvidence": { "type": "integer", "minimum": 0 }
|
|
31
33
|
}
|
|
32
34
|
},
|
|
33
35
|
"findings": {
|
|
34
36
|
"type": "array",
|
|
35
37
|
"items": { "$ref": "#/$defs/finding" }
|
|
38
|
+
},
|
|
39
|
+
"unobservedSubjects": {
|
|
40
|
+
"type": "array",
|
|
41
|
+
"items": { "$ref": "#/$defs/subjectIdentity" }
|
|
36
42
|
}
|
|
37
43
|
},
|
|
38
44
|
"$defs": {
|
|
@@ -66,6 +72,21 @@
|
|
|
66
72
|
"message": { "type": "string", "minLength": 1 }
|
|
67
73
|
}
|
|
68
74
|
},
|
|
75
|
+
"subjectIdentity": {
|
|
76
|
+
"type": "string",
|
|
77
|
+
"pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*#[a-z][a-z0-9]*(?:-[a-z0-9]+)*$"
|
|
78
|
+
},
|
|
79
|
+
"assertedRelationship": {
|
|
80
|
+
"type": "object",
|
|
81
|
+
"additionalProperties": false,
|
|
82
|
+
"required": ["from", "to", "kind"],
|
|
83
|
+
"properties": {
|
|
84
|
+
"from": { "$ref": "#/$defs/subjectIdentity" },
|
|
85
|
+
"to": { "$ref": "#/$defs/subjectIdentity" },
|
|
86
|
+
"kind": { "type": "string", "pattern": "^\\S+$" },
|
|
87
|
+
"name": { "type": "string", "minLength": 1 }
|
|
88
|
+
}
|
|
89
|
+
},
|
|
69
90
|
"finding": {
|
|
70
91
|
"type": "object",
|
|
71
92
|
"additionalProperties": false,
|
|
@@ -78,6 +99,7 @@
|
|
|
78
99
|
],
|
|
79
100
|
"properties": {
|
|
80
101
|
"target": { "$ref": "#/$defs/target" },
|
|
102
|
+
"asserted": { "$ref": "#/$defs/assertedRelationship" },
|
|
81
103
|
"result": {
|
|
82
104
|
"enum": ["contradicted", "unknown", "not-observed"]
|
|
83
105
|
},
|
|
@@ -79,7 +79,8 @@
|
|
|
79
79
|
"findings",
|
|
80
80
|
"contradicted",
|
|
81
81
|
"unknown",
|
|
82
|
-
"notObserved"
|
|
82
|
+
"notObserved",
|
|
83
|
+
"subjectsWithoutEvidence"
|
|
83
84
|
],
|
|
84
85
|
"properties": {
|
|
85
86
|
"evidenceDocuments": {
|
|
@@ -109,6 +110,10 @@
|
|
|
109
110
|
"notObserved": {
|
|
110
111
|
"type": "integer",
|
|
111
112
|
"minimum": 0
|
|
113
|
+
},
|
|
114
|
+
"subjectsWithoutEvidence": {
|
|
115
|
+
"type": "integer",
|
|
116
|
+
"minimum": 0
|
|
112
117
|
}
|
|
113
118
|
}
|
|
114
119
|
},
|
|
@@ -67,7 +67,7 @@ document, projection, evidence, or architecture-state syntax is needed.
|
|
|
67
67
|
7. Add the focused projections needed to answer the
|
|
68
68
|
repository-orientation question. Add a separate projection for every
|
|
69
69
|
ordered flow that needs a dynamic view, then include each intended view in
|
|
70
|
-
`.yarramate/
|
|
70
|
+
`.yarramate/likec4-project.yaml`.
|
|
71
71
|
8. Unless the user requested semantic-only output, create the optional LikeC4
|
|
72
72
|
mapping and project described in the authoring reference. Synchronize the
|
|
73
73
|
project mapping before every export, then run:
|
|
@@ -79,9 +79,9 @@ yarramate evidence .yarramate/evidence/<evidence>.yaml .yarramate/workspace.yaml
|
|
|
79
79
|
yarramate reconcile .yarramate/workspace.yaml
|
|
80
80
|
yarramate context .yarramate/projections/<projection>.yaml .yarramate/workspace.yaml
|
|
81
81
|
yarramate view .yarramate/projections/<projection>.yaml .yarramate/workspace.yaml
|
|
82
|
-
yarramate-likec4 check .yarramate/
|
|
82
|
+
yarramate-likec4 check .yarramate/likec4-project.yaml --json .yarramate/workspace.yaml
|
|
83
83
|
yarramate-likec4 map --sync .yarramate/integrations/likec4/subject-mapping.yaml .yarramate/workspace.yaml
|
|
84
|
-
yarramate-likec4 export-project .yarramate/
|
|
84
|
+
yarramate-likec4 export-project .yarramate/likec4-project.yaml .yarramate-out/likec4 .yarramate/workspace.yaml
|
|
85
85
|
```
|
|
86
86
|
|
|
87
87
|
9. Audit rendering coverage before handoff. Answer these as reporting
|
|
@@ -114,7 +114,7 @@ yarramate-likec4 export-project .yarramate/integrations/likec4/project.yaml .yar
|
|
|
114
114
|
- a bounded target projection for implementation agents.
|
|
115
115
|
- one focused projection per ordered flow that needs a dynamic view.
|
|
116
116
|
Include every intended view in
|
|
117
|
-
`.yarramate/
|
|
117
|
+
`.yarramate/likec4-project.yaml`.
|
|
118
118
|
6. Synchronize the project mapping before every export, then run:
|
|
119
119
|
|
|
120
120
|
```sh
|
|
@@ -125,9 +125,9 @@ yarramate context .yarramate/projections/<target>.yaml .yarramate/workspace.yaml
|
|
|
125
125
|
yarramate view .yarramate/projections/<target>.yaml .yarramate/workspace.yaml
|
|
126
126
|
yarramate view .yarramate/projections/<flow>.yaml .yarramate/workspace.yaml
|
|
127
127
|
yarramate compare <document-id>#<baseline-state> <document-id>#<target-state> .yarramate/workspace.yaml
|
|
128
|
-
yarramate-likec4 check .yarramate/
|
|
128
|
+
yarramate-likec4 check .yarramate/likec4-project.yaml --json .yarramate/workspace.yaml
|
|
129
129
|
yarramate-likec4 map --sync .yarramate/integrations/likec4/subject-mapping.yaml .yarramate/workspace.yaml
|
|
130
|
-
yarramate-likec4 export-project .yarramate/
|
|
130
|
+
yarramate-likec4 export-project .yarramate/likec4-project.yaml .yarramate-out/likec4 .yarramate/workspace.yaml
|
|
131
131
|
```
|
|
132
132
|
|
|
133
133
|
Skip the two adapter commands only when the user requested semantic-only
|
|
@@ -169,7 +169,7 @@ retired concept.
|
|
|
169
169
|
|
|
170
170
|
```sh
|
|
171
171
|
yarramate check .yarramate/workspace.yaml --json
|
|
172
|
-
yarramate-likec4 check .yarramate/
|
|
172
|
+
yarramate-likec4 check .yarramate/likec4-project.yaml --json .yarramate/workspace.yaml
|
|
173
173
|
```
|
|
174
174
|
|
|
175
175
|
6. If the adapter check reports intended mapping drift, repair it locally,
|
|
@@ -181,8 +181,8 @@ yarramate-likec4 check .yarramate/integrations/likec4/project.yaml --json .yarra
|
|
|
181
181
|
yarramate-likec4 map --sync --prune .yarramate/integrations/likec4/subject-mapping.yaml .yarramate/workspace.yaml
|
|
182
182
|
git diff -- .yarramate
|
|
183
183
|
yarramate check .yarramate/workspace.yaml --json
|
|
184
|
-
yarramate-likec4 check .yarramate/
|
|
185
|
-
yarramate-likec4 export-project .yarramate/
|
|
184
|
+
yarramate-likec4 check .yarramate/likec4-project.yaml --json .yarramate/workspace.yaml
|
|
185
|
+
yarramate-likec4 export-project .yarramate/likec4-project.yaml .yarramate-out/likec4 .yarramate/workspace.yaml
|
|
186
186
|
```
|
|
187
187
|
|
|
188
188
|
7. Require both configured read-only checks to exit successfully after the
|
|
@@ -67,6 +67,71 @@ Use `mode: read|write|read-write|unspecified` only with `access`. Use
|
|
|
67
67
|
`content` only with `flow`. Prefer a precise relationship over `association`;
|
|
68
68
|
use association when no stronger semantic meaning is justified.
|
|
69
69
|
|
|
70
|
+
Every concept kind carries an aspect: `motivation`, `active-structure`
|
|
71
|
+
(actors, roles, components, nodes, interfaces), `behavior` (processes,
|
|
72
|
+
functions, interactions, services, events), `passive-structure` (objects,
|
|
73
|
+
data, artifacts, material), or `composite`. Four relationship kinds constrain
|
|
74
|
+
endpoint aspects, and the compiler rejects violations as `YM404`:
|
|
75
|
+
|
|
76
|
+
```text
|
|
77
|
+
assignment source must be active-structure
|
|
78
|
+
access target must be passive-structure
|
|
79
|
+
influence target must be motivation
|
|
80
|
+
triggering source and target must be behavior
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
The other kinds accept endpoints of any aspect.
|
|
84
|
+
|
|
85
|
+
## Invocation chains
|
|
86
|
+
|
|
87
|
+
"User invokes command" and "component invokes component" fail `YM404` when
|
|
88
|
+
written as `triggering` between active-structure elements. Name the invoked
|
|
89
|
+
behavior, assign the performers, and trigger between behaviors:
|
|
90
|
+
|
|
91
|
+
```yaml
|
|
92
|
+
concepts:
|
|
93
|
+
- id: user
|
|
94
|
+
kind: businessActor
|
|
95
|
+
name: User
|
|
96
|
+
- id: cli
|
|
97
|
+
kind: applicationComponent
|
|
98
|
+
name: CLI
|
|
99
|
+
- id: run-check
|
|
100
|
+
kind: applicationProcess
|
|
101
|
+
name: Run check
|
|
102
|
+
relationships:
|
|
103
|
+
- id: user-starts-run-check
|
|
104
|
+
kind: assignment
|
|
105
|
+
from: user
|
|
106
|
+
to: run-check
|
|
107
|
+
name: User invokes the check command
|
|
108
|
+
- id: cli-performs-run-check
|
|
109
|
+
kind: assignment
|
|
110
|
+
from: cli
|
|
111
|
+
to: run-check
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Chain steps with `triggering` only between behavior concepts, for example
|
|
115
|
+
`run-check` triggering a downstream process owned by another component.
|
|
116
|
+
|
|
117
|
+
## Degrading a blocked kind
|
|
118
|
+
|
|
119
|
+
When aspect policy blocks the kind you want—`triggering` between two
|
|
120
|
+
components is the common case—keep the edge legal with `kind: flow` and carry
|
|
121
|
+
the invocation semantics on the edge's `name` and `description`:
|
|
122
|
+
|
|
123
|
+
```sh
|
|
124
|
+
yarramate connect .yarramate/architecture/main.yaml \
|
|
125
|
+
--id cli-invokes-engine --kind flow \
|
|
126
|
+
--from cli --to engine \
|
|
127
|
+
--name "invokes" \
|
|
128
|
+
--description "The CLI invokes the engine once per check run"
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Both fields compile to claims, so evidence can later confirm or contradict
|
|
132
|
+
the recorded invocation semantics; the degradation loses no reviewable
|
|
133
|
+
information.
|
|
134
|
+
|
|
70
135
|
## Ownership and constraints
|
|
71
136
|
|
|
72
137
|
```yaml
|
|
@@ -176,18 +241,21 @@ evidence result.
|
|
|
176
241
|
|
|
177
242
|
## LikeC4 project
|
|
178
243
|
|
|
179
|
-
Keep visualization configuration outside native documents
|
|
244
|
+
Keep visualization configuration outside native documents. Project `mapping`,
|
|
245
|
+
`kindMapping`, and `views[].projection` paths resolve from the
|
|
246
|
+
project-definition document's directory, so place the definition at or above
|
|
247
|
+
everything it references — `.yarramate/likec4-project.yaml` in this layout:
|
|
180
248
|
|
|
181
249
|
```yaml
|
|
182
250
|
format: yarramate/likec4-project/v1
|
|
183
251
|
id: delivery
|
|
184
252
|
version: "1.0"
|
|
185
253
|
title: Delivery architecture
|
|
186
|
-
mapping:
|
|
254
|
+
mapping: integrations/likec4/subject-mapping.yaml
|
|
187
255
|
views:
|
|
188
|
-
- projection:
|
|
256
|
+
- projection: projections/delivery-target.yaml
|
|
189
257
|
- id: submit-order
|
|
190
|
-
projection:
|
|
258
|
+
projection: projections/submit-order.yaml
|
|
191
259
|
dynamic:
|
|
192
260
|
steps:
|
|
193
261
|
- relationship: delivery#customer-triggers-submit
|
|
@@ -237,14 +305,14 @@ yarramate compare <from-state> <to-state> .yarramate/workspace.yaml
|
|
|
237
305
|
yarramate evidence <evidence.yaml> .yarramate/workspace.yaml
|
|
238
306
|
yarramate reconcile .yarramate/workspace.yaml
|
|
239
307
|
yarramate-likec4 check \
|
|
240
|
-
.yarramate/
|
|
308
|
+
.yarramate/likec4-project.yaml \
|
|
241
309
|
--json \
|
|
242
310
|
.yarramate/workspace.yaml
|
|
243
311
|
yarramate-likec4 map --sync \
|
|
244
312
|
.yarramate/integrations/likec4/subject-mapping.yaml \
|
|
245
313
|
.yarramate/workspace.yaml
|
|
246
314
|
yarramate-likec4 export-project \
|
|
247
|
-
.yarramate/
|
|
315
|
+
.yarramate/likec4-project.yaml \
|
|
248
316
|
.yarramate-out/likec4 \
|
|
249
317
|
.yarramate/workspace.yaml
|
|
250
318
|
```
|