yarramate 0.5.0 → 0.7.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.
Files changed (48) hide show
  1. package/README.md +39 -10
  2. package/catalogues/core-enrichment.yaml +700 -0
  3. package/dist/adapters/likec4-cli.js +179 -55
  4. package/dist/adapters/likec4-export.d.ts +1 -1
  5. package/dist/adapters/likec4-prepare.d.ts +6 -0
  6. package/dist/adapters/likec4-prepare.js +40 -2
  7. package/dist/adapters/mcp-cli.js +55 -49
  8. package/dist/apply-command.d.ts +2 -0
  9. package/dist/apply-command.js +199 -0
  10. package/dist/{new-command.d.ts → ask-command.d.ts} +1 -1
  11. package/dist/ask-command.js +729 -0
  12. package/dist/brief.d.ts +3 -0
  13. package/dist/brief.js +235 -0
  14. package/dist/check-command.js +70 -4
  15. package/dist/cli-support.d.ts +4 -1
  16. package/dist/cli-support.js +3 -2
  17. package/dist/cli.js +22 -586
  18. package/dist/compiler.js +45 -7
  19. package/dist/core-contract.d.ts +1 -1
  20. package/dist/{status-command.d.ts → design-command.d.ts} +1 -1
  21. package/dist/design-command.js +218 -0
  22. package/dist/export-command.d.ts +2 -0
  23. package/dist/export-command.js +228 -0
  24. package/dist/interrogate-command.d.ts +104 -0
  25. package/dist/interrogate-command.js +268 -0
  26. package/dist/next-command.d.ts +22 -0
  27. package/dist/next-command.js +167 -0
  28. package/dist/reconciliation.d.ts +2 -0
  29. package/dist/reconciliation.js +38 -0
  30. package/docs/CONSUMING-YARRAMATE.md +28 -21
  31. package/package.json +13 -10
  32. package/schema/yarramate-apply-result.schema.json +32 -0
  33. package/schema/yarramate-ask-result.schema.json +391 -0
  34. package/schema/yarramate-check-result.schema.json +12 -0
  35. package/schema/yarramate-core-contract.schema.json +5 -10
  36. package/schema/yarramate-design-step.schema.json +152 -0
  37. package/schema/yarramate-document.schema.json +76 -9
  38. package/schema/yarramate-interrogation-report.schema.json +89 -0
  39. package/schema/yarramate-likec4-generated-project-v2.schema.json +6 -0
  40. package/schema/yarramate-likec4-generated-project.schema.json +6 -0
  41. package/schema/yarramate-operations.schema.json +303 -0
  42. package/schema/yarramate-question-catalogue.schema.json +431 -0
  43. package/schema/yarramate-reconciliation-report.schema.json +8 -2
  44. package/skills/yarramate-architecture/SKILL.md +42 -17
  45. package/skills/yarramate-architecture/references/native-authoring.md +73 -17
  46. package/dist/new-command.js +0 -111
  47. package/dist/status-command.js +0 -171
  48. package/schema/yarramate-status-result.schema.json +0 -273
@@ -0,0 +1,32 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://yarrasys.dev/schema/yarramate-apply-result.schema.json",
4
+ "title": "YarraMate apply result",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["format", "workspace", "applied", "documents"],
8
+ "properties": {
9
+ "format": { "const": "yarramate/apply-result/v1" },
10
+ "workspace": { "type": "string", "minLength": 1 },
11
+ "applied": {
12
+ "type": "object",
13
+ "additionalProperties": false,
14
+ "required": [
15
+ "addedConcepts",
16
+ "addedRelationships",
17
+ "updatedConcepts",
18
+ "updatedRelationships"
19
+ ],
20
+ "properties": {
21
+ "addedConcepts": { "type": "integer", "minimum": 0 },
22
+ "addedRelationships": { "type": "integer", "minimum": 0 },
23
+ "updatedConcepts": { "type": "integer", "minimum": 0 },
24
+ "updatedRelationships": { "type": "integer", "minimum": 0 }
25
+ }
26
+ },
27
+ "documents": {
28
+ "type": "array",
29
+ "items": { "type": "string", "minLength": 1 }
30
+ }
31
+ }
32
+ }
@@ -0,0 +1,391 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://yarrasys.dev/schema/yarramate-ask-result.schema.json",
4
+ "title": "YarraMate ask result",
5
+ "description": "One envelope for every consumed-now read: orientation, roster, slice, advice, next, open questions, and state comparison, discriminated by mode.",
6
+ "type": "object",
7
+ "required": ["format", "workspace", "mode"],
8
+ "properties": {
9
+ "format": {
10
+ "const": "yarramate/ask-result/v1"
11
+ },
12
+ "workspace": {
13
+ "type": "string",
14
+ "minLength": 1
15
+ },
16
+ "mode": {
17
+ "enum": [
18
+ "orientation",
19
+ "roster",
20
+ "slice",
21
+ "advice",
22
+ "next",
23
+ "open",
24
+ "compare",
25
+ "kinds"
26
+ ]
27
+ }
28
+ },
29
+ "oneOf": [
30
+ {
31
+ "type": "object",
32
+ "required": ["mode", "ok", "check", "backlog"],
33
+ "properties": {
34
+ "format": true,
35
+ "workspace": true,
36
+ "mode": { "const": "orientation" },
37
+ "ok": { "type": "boolean" },
38
+ "check": {
39
+ "type": "object",
40
+ "required": ["ok", "diagnostics"],
41
+ "properties": {
42
+ "ok": { "type": "boolean" },
43
+ "diagnostics": { "type": "array" },
44
+ "counted": {
45
+ "type": "object",
46
+ "required": [
47
+ "documents",
48
+ "concepts",
49
+ "relationships",
50
+ "states"
51
+ ],
52
+ "properties": {
53
+ "documents": { "type": "integer" },
54
+ "concepts": { "type": "integer" },
55
+ "relationships": { "type": "integer" },
56
+ "states": { "type": "integer" }
57
+ },
58
+ "additionalProperties": false
59
+ }
60
+ },
61
+ "additionalProperties": false
62
+ },
63
+ "reconciliation": {
64
+ "$ref": "#/$defs/reconciliationSummary"
65
+ },
66
+ "design": {
67
+ "type": "object",
68
+ "required": ["catalogue", "open"],
69
+ "properties": {
70
+ "catalogue": { "type": "string", "minLength": 1 },
71
+ "open": { "type": "integer", "minimum": 0 }
72
+ },
73
+ "additionalProperties": false
74
+ },
75
+ "backlog": {
76
+ "type": "object",
77
+ "required": ["planned", "current", "retired"],
78
+ "properties": {
79
+ "planned": {
80
+ "type": "array",
81
+ "items": { "$ref": "#/$defs/nextSubject" }
82
+ },
83
+ "current": {
84
+ "type": "array",
85
+ "items": { "$ref": "#/$defs/conceptEntry" }
86
+ },
87
+ "retired": {
88
+ "type": "array",
89
+ "items": { "$ref": "#/$defs/conceptEntry" }
90
+ }
91
+ },
92
+ "additionalProperties": false
93
+ }
94
+ },
95
+ "additionalProperties": false
96
+ },
97
+ {
98
+ "type": "object",
99
+ "required": ["mode", "total", "subjects"],
100
+ "properties": {
101
+ "format": true,
102
+ "workspace": true,
103
+ "mode": { "const": "roster" },
104
+ "total": { "type": "integer", "minimum": 0 },
105
+ "subjects": {
106
+ "type": "array",
107
+ "items": { "$ref": "#/$defs/conceptEntry" }
108
+ }
109
+ },
110
+ "additionalProperties": false
111
+ },
112
+ {
113
+ "type": "object",
114
+ "required": ["mode", "addressing", "result"],
115
+ "properties": {
116
+ "format": true,
117
+ "workspace": true,
118
+ "mode": { "const": "slice" },
119
+ "addressing": {
120
+ "enum": ["free-text", "subjects", "projection"]
121
+ },
122
+ "topic": { "type": "string", "minLength": 1 },
123
+ "seeds": {
124
+ "type": "array",
125
+ "items": { "type": "string", "minLength": 1 }
126
+ },
127
+ "matched": { "type": "integer", "minimum": 0 },
128
+ "result": { "$ref": "#/$defs/projectionResult" }
129
+ },
130
+ "additionalProperties": false
131
+ },
132
+ {
133
+ "type": "object",
134
+ "required": [
135
+ "mode",
136
+ "topic",
137
+ "seeds",
138
+ "matched",
139
+ "slice",
140
+ "openQuestions"
141
+ ],
142
+ "properties": {
143
+ "format": true,
144
+ "workspace": true,
145
+ "mode": { "const": "advice" },
146
+ "topic": { "type": "string", "minLength": 1 },
147
+ "seeds": {
148
+ "type": "array",
149
+ "items": { "type": "string", "minLength": 1 }
150
+ },
151
+ "matched": { "type": "integer", "minimum": 0 },
152
+ "slice": { "type": "string", "minLength": 1 },
153
+ "openQuestions": {
154
+ "type": "array",
155
+ "items": {
156
+ "type": "object",
157
+ "required": ["wave", "id", "authority", "question", "materiality"],
158
+ "properties": {
159
+ "wave": { "type": "string", "minLength": 1 },
160
+ "id": { "type": "string", "minLength": 1 },
161
+ "authority": { "enum": ["human", "agent", "either"] },
162
+ "question": { "type": "string", "minLength": 1 },
163
+ "materiality": { "type": "string", "minLength": 1 },
164
+ "subject": { "type": "string", "minLength": 1 }
165
+ },
166
+ "additionalProperties": false
167
+ }
168
+ },
169
+ "reconciliation": {
170
+ "type": "object",
171
+ "required": ["summary", "findings"],
172
+ "properties": {
173
+ "summary": { "$ref": "#/$defs/reconciliationSummary" },
174
+ "findings": { "type": "array" }
175
+ },
176
+ "additionalProperties": false
177
+ }
178
+ },
179
+ "additionalProperties": false
180
+ },
181
+ {
182
+ "type": "object",
183
+ "required": ["mode", "subjects"],
184
+ "properties": {
185
+ "format": true,
186
+ "workspace": true,
187
+ "mode": { "const": "next" },
188
+ "subjects": {
189
+ "type": "array",
190
+ "items": { "$ref": "#/$defs/nextSubject" }
191
+ }
192
+ },
193
+ "additionalProperties": false
194
+ },
195
+ {
196
+ "type": "object",
197
+ "required": ["mode", "report"],
198
+ "properties": {
199
+ "format": true,
200
+ "workspace": true,
201
+ "mode": { "const": "open" },
202
+ "report": {
203
+ "type": "object",
204
+ "required": ["format", "workspace", "catalogue", "summary", "waves"],
205
+ "properties": {
206
+ "format": { "const": "yarramate/interrogation-report/v1" },
207
+ "workspace": { "type": "string" },
208
+ "catalogue": { "type": "string" },
209
+ "summary": { "type": "object" },
210
+ "waves": { "type": "array" }
211
+ },
212
+ "additionalProperties": false
213
+ }
214
+ },
215
+ "additionalProperties": false
216
+ },
217
+ {
218
+ "type": "object",
219
+ "required": ["mode", "conceptKinds", "relationshipKinds", "extensions"],
220
+ "properties": {
221
+ "format": true,
222
+ "workspace": true,
223
+ "mode": { "const": "kinds" },
224
+ "conceptKinds": {
225
+ "type": "array",
226
+ "items": {
227
+ "type": "object",
228
+ "required": ["id", "name", "layer", "aspect"],
229
+ "properties": {
230
+ "id": { "type": "string", "minLength": 1 },
231
+ "name": { "type": "string", "minLength": 1 },
232
+ "layer": { "type": "string", "minLength": 1 },
233
+ "aspect": { "type": "string", "minLength": 1 },
234
+ "inspiredBy": { "type": "string" }
235
+ },
236
+ "additionalProperties": false
237
+ }
238
+ },
239
+ "relationshipKinds": {
240
+ "type": "array",
241
+ "items": {
242
+ "type": "object",
243
+ "required": ["id", "intent"],
244
+ "properties": {
245
+ "id": { "type": "string", "minLength": 1 },
246
+ "intent": { "type": "string", "minLength": 1 },
247
+ "sourceAspects": {
248
+ "type": "array",
249
+ "items": { "type": "string" }
250
+ },
251
+ "targetAspects": {
252
+ "type": "array",
253
+ "items": { "type": "string" }
254
+ },
255
+ "repair": { "type": "string" }
256
+ },
257
+ "additionalProperties": false
258
+ }
259
+ },
260
+ "extensions": {
261
+ "type": "array",
262
+ "items": {
263
+ "type": "object",
264
+ "required": ["id", "type", "lineage"],
265
+ "properties": {
266
+ "id": { "type": "string", "minLength": 1 },
267
+ "type": { "enum": ["concept", "relationship"] },
268
+ "lineage": {
269
+ "type": "array",
270
+ "items": { "type": "string" }
271
+ }
272
+ },
273
+ "additionalProperties": false
274
+ }
275
+ }
276
+ },
277
+ "additionalProperties": false
278
+ },
279
+ {
280
+ "type": "object",
281
+ "required": ["mode", "comparison"],
282
+ "properties": {
283
+ "format": true,
284
+ "workspace": true,
285
+ "mode": { "const": "compare" },
286
+ "comparison": {
287
+ "type": "object",
288
+ "required": ["format", "from", "to", "added", "removed", "retained"],
289
+ "properties": {
290
+ "format": { "const": "yarramate/state-comparison/v1" },
291
+ "from": { "type": "string" },
292
+ "to": { "type": "string" },
293
+ "added": { "type": "array" },
294
+ "removed": { "type": "array" },
295
+ "retained": { "type": "array" }
296
+ },
297
+ "additionalProperties": false
298
+ }
299
+ },
300
+ "additionalProperties": false
301
+ }
302
+ ],
303
+ "$defs": {
304
+ "conceptEntry": {
305
+ "type": "object",
306
+ "required": ["id", "kind"],
307
+ "properties": {
308
+ "id": { "type": "string", "minLength": 1 },
309
+ "kind": { "type": "string", "minLength": 1 },
310
+ "name": { "type": "string" },
311
+ "status": { "enum": ["planned", "current", "retired"] },
312
+ "description": { "type": "string" }
313
+ },
314
+ "additionalProperties": false
315
+ },
316
+ "nextSubject": {
317
+ "type": "object",
318
+ "required": ["id", "kind", "dependsOn", "requiredBy", "evidence"],
319
+ "properties": {
320
+ "id": { "type": "string", "minLength": 1 },
321
+ "kind": { "type": "string", "minLength": 1 },
322
+ "name": { "type": "string" },
323
+ "dependsOn": {
324
+ "type": "array",
325
+ "items": { "type": "string" }
326
+ },
327
+ "requiredBy": {
328
+ "type": "array",
329
+ "items": { "type": "string" }
330
+ },
331
+ "evidence": {
332
+ "type": "object",
333
+ "required": [
334
+ "observations",
335
+ "confirmed",
336
+ "contradicted",
337
+ "unknown",
338
+ "notObserved"
339
+ ],
340
+ "properties": {
341
+ "observations": { "type": "integer" },
342
+ "confirmed": { "type": "integer" },
343
+ "contradicted": { "type": "integer" },
344
+ "unknown": { "type": "integer" },
345
+ "notObserved": { "type": "integer" }
346
+ },
347
+ "additionalProperties": false
348
+ },
349
+ "cycle": { "const": true }
350
+ },
351
+ "additionalProperties": false
352
+ },
353
+ "projectionResult": {
354
+ "type": "object",
355
+ "required": ["format", "projection", "documents", "subjects", "claims"],
356
+ "properties": {
357
+ "format": { "const": "yarramate/projection-result/v1" },
358
+ "projection": { "type": "string" },
359
+ "presentation": { "type": "object" },
360
+ "documents": { "type": "array" },
361
+ "subjects": { "type": "array" },
362
+ "claims": { "type": "array" }
363
+ },
364
+ "additionalProperties": false
365
+ },
366
+ "reconciliationSummary": {
367
+ "type": "object",
368
+ "required": [
369
+ "evidenceDocuments",
370
+ "observations",
371
+ "confirmed",
372
+ "findings",
373
+ "contradicted",
374
+ "unknown",
375
+ "notObserved",
376
+ "subjectsWithoutEvidence"
377
+ ],
378
+ "properties": {
379
+ "evidenceDocuments": { "type": "integer" },
380
+ "observations": { "type": "integer" },
381
+ "confirmed": { "type": "integer" },
382
+ "findings": { "type": "integer" },
383
+ "contradicted": { "type": "integer" },
384
+ "unknown": { "type": "integer" },
385
+ "notObserved": { "type": "integer" },
386
+ "subjectsWithoutEvidence": { "type": "integer" }
387
+ },
388
+ "additionalProperties": false
389
+ }
390
+ }
391
+ }
@@ -20,6 +20,9 @@
20
20
  },
21
21
  "counted": {
22
22
  "$ref": "#/$defs/counted"
23
+ },
24
+ "strict": {
25
+ "$ref": "#/$defs/strict"
23
26
  }
24
27
  },
25
28
  "allOf": [
@@ -50,6 +53,15 @@
50
53
  }
51
54
  ],
52
55
  "$defs": {
56
+ "strict": {
57
+ "type": "object",
58
+ "additionalProperties": false,
59
+ "required": ["observations", "contradicted"],
60
+ "properties": {
61
+ "observations": { "type": "integer", "minimum": 0 },
62
+ "contradicted": { "type": "integer", "minimum": 0 }
63
+ }
64
+ },
53
65
  "counted": {
54
66
  "type": "object",
55
67
  "additionalProperties": false,
@@ -67,17 +67,12 @@
67
67
  "name": {
68
68
  "enum": [
69
69
  "init",
70
- "add",
71
- "connect",
72
- "new",
70
+ "design",
71
+ "apply",
72
+ "ask",
73
73
  "check",
74
- "status",
75
- "compile",
76
- "view",
77
- "context",
78
- "compare",
79
- "evidence",
80
- "reconcile"
74
+ "reconcile",
75
+ "export"
81
76
  ]
82
77
  },
83
78
  "binary": {
@@ -0,0 +1,152 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://yarrasys.dev/schema/yarramate-design-step.schema.json",
4
+ "title": "YarraMate design step",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "format",
9
+ "workspace",
10
+ "catalogue",
11
+ "progress",
12
+ "step"
13
+ ],
14
+ "properties": {
15
+ "format": {
16
+ "const": "yarramate/design-step/v1"
17
+ },
18
+ "workspace": {
19
+ "type": "string",
20
+ "minLength": 1
21
+ },
22
+ "catalogue": {
23
+ "type": "string",
24
+ "minLength": 1
25
+ },
26
+ "progress": {
27
+ "type": "object",
28
+ "additionalProperties": false,
29
+ "required": [
30
+ "questions",
31
+ "openQuestions",
32
+ "open",
33
+ "waves"
34
+ ],
35
+ "properties": {
36
+ "questions": {
37
+ "type": "integer",
38
+ "minimum": 0
39
+ },
40
+ "openQuestions": {
41
+ "type": "integer",
42
+ "minimum": 0
43
+ },
44
+ "open": {
45
+ "type": "integer",
46
+ "minimum": 0
47
+ },
48
+ "waves": {
49
+ "type": "array",
50
+ "items": {
51
+ "type": "object",
52
+ "additionalProperties": false,
53
+ "required": [
54
+ "id",
55
+ "open"
56
+ ],
57
+ "properties": {
58
+ "id": {
59
+ "type": "string",
60
+ "minLength": 1
61
+ },
62
+ "open": {
63
+ "type": "integer",
64
+ "minimum": 0
65
+ }
66
+ }
67
+ }
68
+ }
69
+ }
70
+ },
71
+ "step": {
72
+ "oneOf": [
73
+ {
74
+ "type": "null"
75
+ },
76
+ {
77
+ "type": "object",
78
+ "additionalProperties": false,
79
+ "required": [
80
+ "questionId",
81
+ "wave",
82
+ "scope",
83
+ "authority",
84
+ "question",
85
+ "materiality",
86
+ "resolution"
87
+ ],
88
+ "properties": {
89
+ "questionId": {
90
+ "type": "string",
91
+ "minLength": 1
92
+ },
93
+ "wave": {
94
+ "type": "string",
95
+ "minLength": 1
96
+ },
97
+ "scope": {
98
+ "enum": [
99
+ "workspace",
100
+ "subject"
101
+ ]
102
+ },
103
+ "authority": {
104
+ "enum": [
105
+ "human",
106
+ "agent",
107
+ "either"
108
+ ]
109
+ },
110
+ "question": {
111
+ "type": "string",
112
+ "minLength": 1
113
+ },
114
+ "materiality": {
115
+ "type": "string",
116
+ "minLength": 1
117
+ },
118
+ "resolution": {
119
+ "type": "string",
120
+ "minLength": 1
121
+ },
122
+ "subject": {
123
+ "type": "object",
124
+ "additionalProperties": false,
125
+ "required": [
126
+ "id"
127
+ ],
128
+ "properties": {
129
+ "id": {
130
+ "type": "string",
131
+ "minLength": 1
132
+ },
133
+ "name": {
134
+ "type": "string",
135
+ "minLength": 1
136
+ }
137
+ }
138
+ },
139
+ "remainingSubjects": {
140
+ "type": "integer",
141
+ "minimum": 1
142
+ }
143
+ }
144
+ }
145
+ ]
146
+ },
147
+ "slice": {
148
+ "type": "string",
149
+ "minLength": 1
150
+ }
151
+ }
152
+ }