yarramate 0.23.0 → 1.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.
Files changed (159) hide show
  1. package/README.md +13 -4
  2. package/catalogues/core-enrichment.yaml +79 -55
  3. package/dist/adapter-mapping.js +6 -1
  4. package/dist/adapters/likec4-cli.js +36 -7
  5. package/dist/adapters/visual/client.d.ts +2 -2
  6. package/dist/adapters/visual/client.js +79 -10
  7. package/dist/adapters/visual/protocol-contract.d.ts +124 -10
  8. package/dist/adapters/visual/protocol-contract.js +12 -1
  9. package/dist/adapters/visual/protocol.d.ts +63 -0
  10. package/dist/adapters/visual/protocol.js +96 -5
  11. package/dist/adapters/visual/session-server.d.ts +1 -6
  12. package/dist/adapters/visual/session-server.js +243 -143
  13. package/dist/adapters/visual/session-store.d.ts +9 -0
  14. package/dist/adapters/visual/session-store.js +14 -5
  15. package/dist/adapters/visual/view-identity.d.ts +135 -0
  16. package/dist/adapters/visual/view-identity.js +200 -0
  17. package/dist/adapters/visual/wire.d.ts +19 -4
  18. package/dist/adapters/visual/workspace-model.d.ts +116 -0
  19. package/dist/adapters/visual/workspace-model.js +212 -0
  20. package/dist/adapters/visual-cli.d.ts +1 -1
  21. package/dist/adapters/visual-cli.js +30 -21
  22. package/dist/apply-cli.d.ts +2 -0
  23. package/dist/apply-cli.js +83 -0
  24. package/dist/apply-command.d.ts +84 -3
  25. package/dist/apply-command.js +218 -109
  26. package/dist/archimate-relationships.generated.d.ts +22 -0
  27. package/dist/archimate-relationships.generated.js +156 -0
  28. package/dist/ask-command.js +18 -6
  29. package/dist/attestation-staleness.js +2 -2
  30. package/dist/changed.js +1 -1
  31. package/dist/check-command.js +13 -5
  32. package/dist/cli-support.d.ts +1 -1
  33. package/dist/cli-support.js +1 -1
  34. package/dist/cli.js +1 -1
  35. package/dist/compiler.d.ts +31 -3
  36. package/dist/compiler.js +321 -81
  37. package/dist/concept-drafting.d.ts +27 -0
  38. package/dist/concept-drafting.js +75 -0
  39. package/dist/core-contract.js +6 -1
  40. package/dist/deletion-drafting.d.ts +52 -0
  41. package/dist/deletion-drafting.js +100 -0
  42. package/dist/evidence.js +6 -1
  43. package/dist/graph-projection.d.ts +14 -0
  44. package/dist/graph-projection.js +4 -0
  45. package/dist/index.d.ts +8 -1
  46. package/dist/index.js +8 -1
  47. package/dist/interrogate-command.js +63 -17
  48. package/dist/kind-label.d.ts +4 -3
  49. package/dist/kind-label.js +4 -3
  50. package/dist/nesting.d.ts +15 -0
  51. package/dist/nesting.js +2 -0
  52. package/dist/notation/archimate.d.ts +1 -1
  53. package/dist/notation/archimate.js +108 -9
  54. package/dist/profile.d.ts +9 -12
  55. package/dist/profile.js +17 -26
  56. package/dist/projection.d.ts +62 -3
  57. package/dist/projection.js +127 -43
  58. package/dist/relationship-drafting.d.ts +51 -0
  59. package/dist/relationship-drafting.js +92 -0
  60. package/dist/relationship-matrix.d.ts +14 -0
  61. package/dist/relationship-matrix.js +74 -0
  62. package/dist/shipped-profile.d.ts +1 -1
  63. package/dist/shipped-profile.js +19 -5
  64. package/dist/source-store.d.ts +95 -0
  65. package/dist/source-store.js +170 -0
  66. package/dist/subject-references.js +1 -1
  67. package/dist/visual-app/assets/index-BLcpI8WN.js +394 -0
  68. package/dist/visual-app/assets/index-DLutIWES.css +1 -0
  69. package/dist/visual-app/index.html +2 -2
  70. package/dist/visual-app-lib/editor.d.ts +1 -0
  71. package/dist/visual-app-lib/editor.js +90968 -0
  72. package/dist/visual-app-lib/styles.css +2 -0
  73. package/dist/visual-app-lib/types/adapter-mapping.d.ts +40 -0
  74. package/dist/visual-app-lib/types/adapters/visual/protocol-contract.d.ts +455 -0
  75. package/dist/visual-app-lib/types/adapters/visual/view-identity.d.ts +135 -0
  76. package/dist/visual-app-lib/types/adapters/visual/wire.d.ts +141 -0
  77. package/dist/visual-app-lib/types/adapters/visual/workspace-model.d.ts +116 -0
  78. package/dist/visual-app-lib/types/apply-command.d.ts +93 -0
  79. package/dist/visual-app-lib/types/archimate-relationships.generated.d.ts +22 -0
  80. package/dist/visual-app-lib/types/brief.d.ts +5 -0
  81. package/dist/visual-app-lib/types/compiler.d.ts +155 -0
  82. package/dist/visual-app-lib/types/concept-drafting.d.ts +27 -0
  83. package/dist/visual-app-lib/types/deletion-drafting.d.ts +52 -0
  84. package/dist/visual-app-lib/types/evidence.d.ts +62 -0
  85. package/dist/visual-app-lib/types/graph-claims.d.ts +18 -0
  86. package/dist/visual-app-lib/types/graph-projection.d.ts +77 -0
  87. package/dist/visual-app-lib/types/kind-label.d.ts +9 -0
  88. package/dist/visual-app-lib/types/nesting.d.ts +15 -0
  89. package/dist/visual-app-lib/types/notation/archimate.d.ts +71 -0
  90. package/dist/visual-app-lib/types/operations.d.ts +157 -0
  91. package/dist/visual-app-lib/types/profile.d.ts +47 -0
  92. package/dist/visual-app-lib/types/projection.d.ts +113 -0
  93. package/dist/visual-app-lib/types/relationship-drafting.d.ts +51 -0
  94. package/dist/visual-app-lib/types/relationship-matrix.d.ts +14 -0
  95. package/dist/visual-app-lib/types/shipped-profile.d.ts +2 -0
  96. package/dist/visual-app-lib/types/source-document.d.ts +36 -0
  97. package/dist/visual-app-lib/types/source-store.d.ts +95 -0
  98. package/dist/visual-app-lib/types/subject-references.d.ts +92 -0
  99. package/dist/visual-app-lib/types/visual-app/App.d.ts +15 -0
  100. package/dist/visual-app-lib/types/visual-app/badges.d.ts +7 -0
  101. package/dist/visual-app-lib/types/visual-app/changeset-tray.d.ts +106 -0
  102. package/dist/visual-app-lib/types/visual-app/confirm-dialog.d.ts +14 -0
  103. package/dist/visual-app-lib/types/visual-app/connection-panel.d.ts +23 -0
  104. package/dist/visual-app-lib/types/visual-app/context-menu-model.d.ts +187 -0
  105. package/dist/visual-app-lib/types/visual-app/context-menu.d.ts +24 -0
  106. package/dist/visual-app-lib/types/visual-app/describe-query.d.ts +9 -0
  107. package/dist/visual-app-lib/types/visual-app/editor-host.d.ts +70 -0
  108. package/dist/visual-app-lib/types/visual-app/faults.d.ts +26 -0
  109. package/dist/visual-app-lib/types/visual-app/graph-canvas.d.ts +73 -0
  110. package/dist/visual-app-lib/types/visual-app/kind-icons.d.ts +3 -0
  111. package/dist/visual-app-lib/types/visual-app/local-host.d.ts +38 -0
  112. package/dist/visual-app-lib/types/visual-app/mount.d.ts +56 -0
  113. package/dist/visual-app-lib/types/visual-app/prompt-dialog.d.ts +24 -0
  114. package/dist/visual-app-lib/types/visual-app/query-fields.d.ts +69 -0
  115. package/dist/visual-app-lib/types/visual-app/query-panel.d.ts +142 -0
  116. package/dist/visual-app-lib/types/visual-app/quick-filter.d.ts +11 -0
  117. package/dist/visual-app-lib/types/visual-app/relationship-kind-options.d.ts +50 -0
  118. package/dist/visual-app-lib/types/visual-app/save-view.d.ts +86 -0
  119. package/dist/visual-app-lib/types/visual-app/section-stack.d.ts +59 -0
  120. package/dist/visual-app-lib/types/visual-app/session-client.d.ts +38 -0
  121. package/dist/visual-app-lib/types/visual-app/state.d.ts +328 -0
  122. package/dist/visual-app-lib/types/visual-app/subject-draft-panel.d.ts +22 -0
  123. package/dist/visual-app-lib/types/visual-app/subject-form.d.ts +42 -0
  124. package/dist/visual-app-lib/types/visual-app/view-tree-model.d.ts +122 -0
  125. package/dist/visual-app-lib/types/visual-app/view-tree.d.ts +32 -0
  126. package/dist/visual-app-lib/types/visual-app/workspace-state.d.ts +268 -0
  127. package/dist/visual-app-lib/types/workspace.d.ts +29 -0
  128. package/dist/workspace.js +7 -1
  129. package/docs/CONSUMING-YARRAMATE.md +51 -2
  130. package/package.json +9 -2
  131. package/schema/yarramate-adapter-mapping.schema.json +1 -1
  132. package/schema/yarramate-ask-result.schema.json +24 -3
  133. package/schema/yarramate-check-result.schema.json +9 -0
  134. package/schema/yarramate-diagnostic-result.schema.json +9 -0
  135. package/schema/yarramate-document.schema.json +6 -0
  136. package/schema/yarramate-evidence-report.schema.json +1 -1
  137. package/schema/yarramate-evidence.schema.json +1 -1
  138. package/schema/yarramate-graph-v2.schema.json +34 -9
  139. package/schema/yarramate-likec4-generated-project-v2.schema.json +1 -1
  140. package/schema/yarramate-likec4-generated-project.schema.json +1 -1
  141. package/schema/yarramate-likec4-project.schema.json +1 -1
  142. package/schema/yarramate-projection-result.schema.json +3 -7
  143. package/schema/yarramate-projection.schema.json +16 -16
  144. package/schema/yarramate-reconciliation-report.schema.json +2 -2
  145. package/schema/yarramate-rtm.schema.json +1 -1
  146. package/schema/yarramate-state-comparison.schema.json +1 -1
  147. package/schema/yarramate-visual-diagnostic-result.schema.json +9 -0
  148. package/schema/yarramate-visual-event.schema.json +40 -41
  149. package/schema/yarramate-visual-graph.schema.json +8 -0
  150. package/schema/yarramate-visual-handoff.schema.json +3 -3
  151. package/schema/yarramate-visual-session-descriptor.schema.json +6 -6
  152. package/schema/yarramate-visual-session-started.schema.json +10 -9
  153. package/schema/yarramate-visual-status.schema.json +3 -3
  154. package/skills/yarramate-architecture/SKILL.md +3 -3
  155. package/skills/yarramate-architecture/references/modelling-patterns.md +23 -44
  156. package/skills/yarramate-architecture/references/native-authoring.md +32 -49
  157. package/skills/yarramate-architecture/references/visual-conversations.md +13 -10
  158. package/dist/visual-app/assets/index-CRd1Khma.js +0 -354
  159. package/dist/visual-app/assets/index-tZSHlU-a.css +0 -1
@@ -0,0 +1,156 @@
1
+ // GENERATED by scripts/generate-archimate-relationships.mjs from
2
+ // vendor/archi/relationships.xml. Do not edit; run `pnpm generate:archimate`.
3
+ //
4
+ // The ArchiMate 3.2 relationship table (specification Appendix B, including
5
+ // derived relationships) as Archi encodes it, re-keyed by yarramate core kind
6
+ // id. One row per source kind: a space-separated letter group per target kind
7
+ // in CORE_CONCEPT_KIND_ORDER, each letter a permitted relationship kind. This
8
+ // module deliberately imports nothing so it can load anywhere the compiler
9
+ // loads (ADR 0097).
10
+ export const ARCHIMATE_RELATIONSHIPS_VERSION = '3.2';
11
+ export const ARCHIMATE_RELATIONSHIPS_SOURCE_SHA256 = '65ad5b5c8044fc62c61836a702d0bd2e0427a87216d7f5e397666c74508d57c5';
12
+ export const RELATIONSHIP_LETTERS = {
13
+ a: 'access',
14
+ c: 'composition',
15
+ f: 'flow',
16
+ g: 'aggregation',
17
+ i: 'assignment',
18
+ n: 'influence',
19
+ o: 'association',
20
+ r: 'realization',
21
+ s: 'specialization',
22
+ t: 'triggering',
23
+ v: 'serving',
24
+ };
25
+ export const CORE_CONCEPT_KIND_ORDER = [
26
+ 'applicationCollaboration',
27
+ 'applicationComponent',
28
+ 'applicationEvent',
29
+ 'applicationFunction',
30
+ 'applicationInteraction',
31
+ 'applicationInterface',
32
+ 'applicationProcess',
33
+ 'applicationService',
34
+ 'artifact',
35
+ 'assessment',
36
+ 'businessActor',
37
+ 'businessCollaboration',
38
+ 'businessEvent',
39
+ 'businessFunction',
40
+ 'businessInteraction',
41
+ 'businessInterface',
42
+ 'businessObject',
43
+ 'businessProcess',
44
+ 'businessRole',
45
+ 'businessService',
46
+ 'capability',
47
+ 'communicationNetwork',
48
+ 'constraint',
49
+ 'contract',
50
+ 'courseOfAction',
51
+ 'dataObject',
52
+ 'deliverable',
53
+ 'device',
54
+ 'distributionNetwork',
55
+ 'driver',
56
+ 'equipment',
57
+ 'facility',
58
+ 'gap',
59
+ 'goal',
60
+ 'grouping',
61
+ 'implementationEvent',
62
+ 'andJunction',
63
+ 'orJunction',
64
+ 'location',
65
+ 'material',
66
+ 'meaning',
67
+ 'node',
68
+ 'outcome',
69
+ 'path',
70
+ 'plateau',
71
+ 'principle',
72
+ 'product',
73
+ 'representation',
74
+ 'requirement',
75
+ 'resource',
76
+ 'stakeholder',
77
+ 'systemSoftware',
78
+ 'technologyCollaboration',
79
+ 'technologyEvent',
80
+ 'technologyFunction',
81
+ 'technologyInteraction',
82
+ 'technologyInterface',
83
+ 'technologyProcess',
84
+ 'technologyService',
85
+ 'value',
86
+ 'valueStream',
87
+ 'workPackage',
88
+ ];
89
+ /**
90
+ * Permitted relationship letters per ordered (source, target) kind pair.
91
+ * Index the space-separated groups by CORE_CONCEPT_KIND_ORDER.
92
+ */
93
+ export const PERMITTED_RELATIONSHIP_LETTERS = {
94
+ applicationCollaboration: 'cfgostv fgortv fiortv fiortv fiortv cfgortv fiortv fiortv ao no fotv fotv fortv fortv fortv fortv ao fortv fotv fortv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfginorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor or no fotv fotv fotv fotv fotv fotv fotv fotv no or o',
95
+ applicationComponent: 'fotv cfgorstv fiortv fiortv fiortv cfgortv fiortv fiortv ao no fotv fotv fortv fortv fortv fortv ao fortv fotv fortv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfginorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor or no fotv fotv fotv fotv fotv fotv fotv fotv no or o',
96
+ applicationEvent: 'fotv fotv cfgostv fotv fotv fotv fotv fotv ao no fotv fotv fortv fotv fotv fotv ao fotv fotv fotv o fotv nor ao o ao o fotv fotv no fotv fotv o nor acfgnorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor o no fotv fotv fotv fotv fotv fotv fotv fotv no o o',
97
+ applicationFunction: 'fotv fotv fotv cfgostv cfgotv fotv cfgotv fortv ao no fotv fotv fotv fortv fortv fotv ao fortv fotv fortv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfgnorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor o no fotv fotv fotv fotv fotv fotv fotv fotv no or o',
98
+ applicationInteraction: 'fotv fotv fotv cfgotv cfgostv fotv cfgotv fortv ao no fotv fotv fotv fortv fortv fotv ao fortv fotv fortv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfgnorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor o no fotv fotv fotv fotv fotv fotv fotv fotv no or o',
99
+ applicationInterface: 'fotv fotv fotv fotv fotv cfgostv fotv fiotv ao no fotv fotv fotv fotv fotv fortv ao fotv fotv fortv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfginorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor or no fotv fotv fotv fotv fotv fotv fotv fotv no or o',
100
+ applicationProcess: 'fotv fotv fotv cfgotv cfgotv fotv cfgostv fortv ao no fotv fotv fotv fortv fortv fotv ao fortv fotv fortv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfgnorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor o no fotv fotv fotv fotv fotv fotv fotv fotv no or o',
101
+ applicationService: 'fotv fotv fotv fotv fotv fotv fotv cfgostv ao no fotv fotv fotv fotv fotv fotv ao fotv fotv fortv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfgnorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor o no fotv fotv fotv fotv fotv fotv fotv fotv no or o',
102
+ artifact: 'or or or or or or or or cgors no o o or or or or or or o or or o nor or or or o o o no o o o nor cgnors o acfginorstv acfginorstv o o no o nor o o nor o o nor or no or o or or or or or or no or o',
103
+ assessment: 'o o o o o o o o o cgnos o o o o o o o o o o o o no o o o o o o no o o o no cgnos o acfginorstv acfginorstv o o no o no o o no o o no o no o o o o o o o o no o o',
104
+ businessActor: 'fotv fotv fotv fotv fotv fotv fotv fotv ao no cfgostv fotv fiotv fiotv fiotv cfgiotv ao fiotv fiotv fiortv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfginorstv io acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor or ino fotv fotv fotv fotv fotv fotv fotv fotv no or io',
105
+ businessCollaboration: 'fotv fotv fotv fotv fotv fotv fotv fotv ao no fgotv cfgostv fiotv fiotv fiotv cfgiotv ao fiotv fgiotv fiortv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfginorstv io acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor or ino fotv fotv fotv fotv fotv fotv fotv fotv no or io',
106
+ businessEvent: 'fotv fotv fotv fotv fotv fotv fotv fotv ao no fotv fotv cfgostv fotv fotv fotv ao fotv fotv fotv o fotv nor ao o ao o fotv fotv no fotv fotv o nor acfgnorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor o no fotv fotv fotv fotv fotv fotv fotv fotv no o o',
107
+ businessFunction: 'fotv fotv fotv fotv fotv fotv fotv fotv ao no fotv fotv fotv cfgostv cfgotv fotv ao cfgotv fotv fortv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfgnorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor o no fotv fotv fotv fotv fotv fotv fotv fotv no or o',
108
+ businessInteraction: 'fotv fotv fotv fotv fotv fotv fotv fotv ao no fotv fotv fotv cfgotv cfgostv fotv ao cfgotv fotv fortv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfgnorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor o no fotv fotv fotv fotv fotv fotv fotv fotv no or o',
109
+ businessInterface: 'fotv fotv fotv fotv fotv fotv fotv fotv ao no fotv fotv fotv fotv fotv cfgostv ao fotv fotv fiotv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfginorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor or no fotv fotv fotv fotv fotv fotv fotv fotv no or o',
110
+ businessObject: 'o o o o o o o o o no o o o o o o cgos o o o or o nor cgos or o o o o no o o o nor cgnors o acfginorstv acfginorstv o o no o nor o o nor o o nor or no o o o o o o o o no or o',
111
+ businessProcess: 'fotv fotv fotv fotv fotv fotv fotv fotv ao no fotv fotv fotv cfgotv cfgotv fotv ao cfgostv fotv fortv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfgnorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor o no fotv fotv fotv fotv fotv fotv fotv fotv no or o',
112
+ businessRole: 'fotv fotv fotv fotv fotv fotv fotv fotv ao no fotv fotv fiotv fiotv fiotv cfgotv ao fiotv cfgostv fiortv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfginorstv io acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor or ino fotv fotv fotv fotv fotv fotv fotv fotv no or io',
113
+ businessService: 'fotv fotv fotv fotv fotv fotv fotv fotv ao no fotv fotv fotv fotv fotv fotv ao fotv fotv cfgostv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfgnorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor o no fotv fotv fotv fotv fotv fotv fotv fotv no or o',
114
+ capability: 'o o o o o o o o o no o o o o o o o o o o cfgostv o nor o fortv o o o o no o o o nor cfgnorstv o acfginorstv acfginorstv o o no o nor o o nor o o nor fotv no o o o o o o o o no fotv o',
115
+ communicationNetwork: 'fortv fortv fortv fortv fortv fortv fortv fortv aio no fortv fortv fortv fortv fortv fortv ao fortv fortv fortv or cfgostv nor ao or ao o fgortv fotv no fortv fortv o nor acfginorstv o acfginorstv acfginorstv fotv ao no fortv nor fortv o nor fotv ao nor or nor fgiortv fortv fiortv fiortv fiortv fgiortv fiortv fiortv no or o',
116
+ constraint: 'o o o o o o o o o no o o o o o o o o o o o o cgnos o o o o o o no o o o nor cgnors o acfginorstv acfginorstv o o no o nor o o nor o o cgnos o no o o o o o o o o no o o',
117
+ contract: 'o o o o o o o o o no o o o o o o cgos o o o or o nor cgos or o o o o no o o o nor cgnors o acfginorstv acfginorstv o o no o nor o o nor o o nor or no o o o o o o o o no or o',
118
+ courseOfAction: 'o o o o o o o o o no o o o o o o o o o o fotv o nor o cfgostv o o o o no o o o nor cfgnorstv o acfginorstv acfginorstv o o no o nor o o nor o o nor fotv no o o o o o o o o no fotv o',
119
+ dataObject: 'o o o o o o o o o no o o o o o o or o o o or o nor or or cgos o o o no o o o nor cgnors o acfginorstv acfginorstv o o no o nor o o nor o o nor or no o o o o o o o o no or o',
120
+ deliverable: 'or or or or or or or or or no or or or or or or or or or or or or nor or or or cgos or or no or or o nor cgnors o acfginorstv acfginorstv or or no or nor or or nor or or nor or nor or or or or or or or or no or o',
121
+ device: 'fortv fortv fortv fortv fortv fortv fortv fortv aio no fotv fotv fortv fortv fortv fortv ao fortv fotv fortv or fotv nor ao or ao o cfgostv fotv no fotv fotv o nor acfginorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor or no cfgiortv fotv fiortv fiortv fiortv cfgiortv fiortv fiortv no or o',
122
+ distributionNetwork: 'fortv fortv fortv fortv fortv fortv fortv fortv aio no fiortv fiortv fiortv fiortv fiortv fiortv ao fiortv fiortv fiortv or fotv nor ao or ao o fgiortv cfgostv no fgiortv fgiortv o nor acfginorstv io acfginorstv acfginorstv fotv aio no fgiortv nor fortv o nor fotv ao nor or inor fgiortv fortv fiortv fiortv fiortv fgiortv fiortv fiortv no or io',
123
+ driver: 'o o o o o o o o o no o o o o o o o o o o o o no o o o o o o cgnos o o o no cgnos o acfginorstv acfginorstv o o no o no o o no o o no o no o o o o o o o o no o o',
124
+ equipment: 'fortv fortv fortv fortv fortv fortv fortv fortv aio no fotv fotv fortv fortv fortv fortv ao fortv fotv fortv or fotv nor ao or ao o cfgortv fotv no cfgorstv fotv o nor acfginorstv o acfginorstv acfginorstv fotv aio no fotv nor fotv o nor fotv ao nor or no cfgiortv fotv fiortv fiortv fiortv cfgiortv fiortv fiortv no or o',
125
+ facility: 'fortv fortv fortv fortv fortv fortv fortv fortv aio no fiotv fiotv fiortv fiortv fiortv fiortv ao fiortv fiotv fiortv or fotv nor ao or ao o cfgiortv fotv no cfgiortv cfgiostv o nor acfginorstv io acfginorstv acfginorstv fotv aio no cfgiotv nor fotv o nor fotv ao nor or ino cfgiortv fotv fiortv fiortv fiortv cfgiortv fiortv fiortv no or io',
126
+ gap: 'o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o cgos o cgos o acfginorstv acfginorstv o o o o o o o o o o o o o o o o o o o o o o o o',
127
+ goal: 'o o o o o o o o o no o o o o o o o o o o o o no o o o o o o no o o o cgnos cgnos o acfginorstv acfginorstv o o no o no o o no o o no o no o o o o o o o o no o o',
128
+ grouping: 'cfgorstv cfgorstv cfgiorstv cfgiorstv cfgiorstv cfgorstv cfgiorstv cfgiorstv acgiors cgnos cfgiorstv cfgiorstv cfgiorstv cfgiorstv cfgiorstv cfgiorstv acgors cfgiorstv cfgiorstv cfgiorstv cfgiorstv cfgorstv cgnors acgors cfgorstv acgors acgors cfgiorstv cfgorstv cgnos cfgiorstv cfgiorstv cgos cgnors acfginorstv cfgiost acfginorstv acfginorstv cfgorstv acgiors cgnos cfgiorstv cgnors cfgorstv cfgorst cgnors cfgorstv acgors cgnors cfgorstv cginors cfgiorstv cfgorstv cfgiorstv cfgiorstv cfgiorstv cfgiorstv cfgiorstv cfgiorstv cgnos cfgiorstv cfgiost',
129
+ implementationEvent: 'o o o o o o o o o no o o o o o o o o o o o o no o o o ao o o no o o o no acfgnost cfgost acfginorstv acfginorstv o o no o no o fot no o o no o no o o o o o o o o no o fot',
130
+ andJunction: 'fortv fortv fiortv fiortv fiortv fortv fiortv fiortv aior no fiortv fiortv fiortv fiortv fiortv fiortv aor fiortv fiortv fiortv fiortv fortv nor aor fortv aor aor fiortv fortv no fiortv fiortv o nor afinortv fiot acfginorstv acfginorstv fortv aior no fiortv nor fortv fort nor fortv aor nor fortv inor fiortv fortv fiortv fiortv fiortv fiortv fiortv fiortv no fiortv fiot',
131
+ orJunction: 'fortv fortv fiortv fiortv fiortv fortv fiortv fiortv aior no fiortv fiortv fiortv fiortv fiortv fiortv aor fiortv fiortv fiortv fiortv fortv nor aor fortv aor aor fiortv fortv no fiortv fiortv o nor afinortv fiot acfginorstv acfginorstv fortv aior no fiortv nor fortv fort nor fortv aor nor fortv inor fiortv fortv fiortv fiortv fiortv fiortv fiortv fiortv no fiortv fiot',
132
+ location: 'cfgortv cfgortv cfgiortv cfgiortv cfgiortv cfgortv cfgiortv cfgiortv acgio cgno cfgiortv cfgiortv cfgiortv cfgiortv cfgiortv cfgiortv acgo cfgiortv cfgiortv cfgiortv cgor cfgotv cgnor acgo cgor acgo cgo cfgiortv cfgotv cgno cfgiortv cfgiortv cgo cgnor acfginorstv cgio acfginorstv acfginorstv cfgostv acgio cgno cfgiortv cgnor cfgortv cgo cgnor cfgotv acgo cgnor cgor cginor cfgiortv cfgortv cfgiortv cfgiortv cfgiortv cfgiortv cfgiortv cfgiortv cgno cgor cgio',
133
+ material: 'or or or or or or or or or no o o or or or or or or o or or o nor or or or o or o no or o o nor cgnors o acfginorstv acfginorstv o cgors no o nor o o nor o o nor or no or o or or or or or or no or o',
134
+ meaning: 'o o o o o o o o o no o o o o o o o o o o o o no o o o o o o no o o o no cgnos o acfginorstv acfginorstv o o cgnos o no o o no o o no o no o o o o o o o o no o o',
135
+ node: 'fortv fortv fortv fortv fortv fortv fortv fortv aio no fiotv fiotv fiortv fiortv fiortv fiortv ao fiortv fiotv fiortv or fotv nor ao or ao o cfgiortv fotv no cfgiortv cfgiotv o nor acfginorstv io acfginorstv acfginorstv fotv aio no cfgiostv nor fotv o nor fotv ao nor or ino cfgiortv fotv fiortv fiortv fiortv cfgiortv fiortv fiortv no or io',
136
+ outcome: 'o o o o o o o o o no o o o o o o o o o o o o no o o o o o o no o o o nor cgnors o acfginorstv acfginorstv o o no o cgnos o o no o o no o no o o o o o o o o no o o',
137
+ path: 'fortv fortv fortv fortv fortv fortv fortv fortv aio no fiotv fiotv fiortv fiortv fiortv fiortv ao fiortv fiotv fiortv or fotv nor ao or ao o fgiortv fotv no fgiortv fgiotv o nor acfginorstv io acfginorstv acfginorstv fotv aio no fgiotv nor cfgostv o nor fotv ao nor or ino fgiortv fgotv fiortv fiortv fiortv fgiortv fiortv fiortv no or io',
138
+ plateau: 'cgor cgor cgor cgor cgor cgor cgor cgor cgor no cgor cgor cgor cgor cgor cgor cgor cgor cgor cgor cgor cgor cgnor cgor cgor cgor ao cgor cgor no cgor cgor o cgnor acfginorst fot acfginorstv acfginorstv cgor cgor no cgor cgnor cgor cfgost nor cgor cgor cgnor cgor inor cgor cgor cgor cgor cgor cgor cgor cgor no cgor fot',
139
+ principle: 'o o o o o o o o o no o o o o o o o o o o o o no o o o o o o no o o o nor cgnors o acfginorstv acfginorstv o o no o nor o o cgnos o o no o no o o o o o o o o no o o',
140
+ product: 'fortv fortv fortv fortv fortv fortv fortv cfgortv acgo no fotv fotv fortv fortv fortv fortv acgo fortv fotv cfgortv or fotv nor acgo or acgo o fortv fotv no fortv fotv o nor acfgnorstv o acfginorstv acfginorstv fotv acgo no fotv nor fotv o nor cfgostv acgo nor or no fortv fotv fortv fortv fortv fortv fortv cfgortv no or o',
141
+ representation: 'o o o o o o o o o no o o o o o o or o o o or o nor or or o o o o no o o o nor cgnors o acfginorstv acfginorstv o o no o nor o o nor o cgos nor or no o o o o o o o o no or o',
142
+ requirement: 'o o o o o o o o o no o o o o o o o o o o o o cgnos o o o o o o no o o o nor cgnors o acfginorstv acfginorstv o o no o nor o o nor o o cgnos o no o o o o o o o o no o o',
143
+ resource: 'o o o o o o o o o no o o o o o o o o o o fiotv o nor o fortv o o o o no o o o nor cfginorstv o acfginorstv acfginorstv o o no o nor o o nor o o nor cfgostv no o o o o o o o o no fiotv o',
144
+ stakeholder: 'o o o o o o o o o no o o o o o o o o o o o o no o o o o o o no o o o no cgnos o acfginorstv acfginorstv o o no o no o o no o o no o cgnos o o o o o o o o no o o',
145
+ systemSoftware: 'fortv fortv fortv fortv fortv fortv fortv fortv aio no fotv fotv fortv fortv fortv fortv ao fortv fotv fortv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfginorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor or no cfgiorstv fotv fiortv fiortv fiortv cfgiortv fiortv fiortv no or o',
146
+ technologyCollaboration: 'fortv fortv fortv fortv fortv fortv fortv fortv aio no fiotv fiotv fiortv fiortv fiortv fiortv ao fiortv fiotv fiortv or fotv nor ao or ao o fgiortv fotv no fgiortv fgiotv o nor acfginorstv io acfginorstv acfginorstv fotv aio no fgiotv nor fotv o nor fotv ao nor or ino fgiortv cfgostv fiortv fiortv fiortv cfgiortv fiortv fiortv no or io',
147
+ technologyEvent: 'fotv fotv fortv fotv fotv fotv fotv fotv ao no fotv fotv fortv fotv fotv fotv ao fotv fotv fotv o fotv nor ao o ao o fotv fotv no fotv fotv o nor acfgnorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor o no fotv fotv cfgostv fotv fotv fotv fotv fotv no o o',
148
+ technologyFunction: 'fotv fotv fotv fortv fortv fotv fortv fortv ao no fotv fotv fotv fortv fortv fotv ao fortv fotv fortv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfgnorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor o no fotv fotv fotv cfgostv cfgotv fotv cfgotv fortv no or o',
149
+ technologyInteraction: 'fotv fotv fotv fortv fortv fotv fortv fortv ao no fotv fotv fotv fortv fortv fotv ao fortv fotv fortv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfgnorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor o no fotv fotv fotv cfgotv cfgostv fotv cfgotv fortv no or o',
150
+ technologyInterface: 'fotv fotv fotv fotv fotv fortv fotv fortv ao no fotv fotv fotv fotv fotv fortv ao fotv fotv fortv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfginorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor or no fotv fotv fotv fotv fotv cfgostv fotv fiotv no or o',
151
+ technologyProcess: 'fotv fotv fotv fortv fortv fotv fortv fortv ao no fotv fotv fotv fortv fortv fotv ao fortv fotv fortv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfgnorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor o no fotv fotv fotv cfgotv cfgotv fotv cfgostv fortv no or o',
152
+ technologyService: 'fotv fotv fotv fotv fotv fotv fotv fortv ao no fotv fotv fotv fotv fotv fotv ao fotv fotv fortv or fotv nor ao or ao o fotv fotv no fotv fotv o nor acfgnorstv o acfginorstv acfginorstv fotv ao no fotv nor fotv o nor fotv ao nor o no fotv fotv fotv fotv fotv fotv fotv cfgostv no or o',
153
+ value: 'o o o o o o o o o no o o o o o o o o o o o o no o o o o o o no o o o no cgnos o acfginorstv acfginorstv o o no o no o o no o o no o no o o o o o o o o cgnos o o',
154
+ valueStream: 'o o o o o o o o o no o o o o o o o o o o fotv o nor o fortv o o o o no o o o nor cfgnorstv o acfginorstv acfginorstv o o no o nor o o nor o o nor fotv no o o o o o o o o no cfgostv o',
155
+ workPackage: 'or or or or or or or or or no or or or or or or or or or or or or nor or or or aor or or no or or o nor acfgnorst fot acfginorstv acfginorstv or or no or nor or fort nor or or nor or nor or or or or or or or or no or cfgost',
156
+ };
@@ -12,6 +12,8 @@ import { evaluateEvidenceWorkspace, loadEvidence, } from './evidence.js';
12
12
  import { evaluateCatalogue, loadQuestionCatalogue, renderInterrogationReport, } from './interrogate-command.js';
13
13
  import { buildNextSubjects, coverageClause, } from './next-command.js';
14
14
  import { conceptKinds, relationshipPolicies, } from './profile.js';
15
+ import { ARCHIMATE_RELATIONSHIPS_VERSION, CORE_CONCEPT_KIND_ORDER, PERMITTED_RELATIONSHIP_LETTERS, RELATIONSHIP_LETTERS, } from './archimate-relationships.generated.js';
16
+ import { matrixEndpointAspects } from './relationship-matrix.js';
15
17
  import { evaluateProjection, loadProjection, renderBudgetedContext, } from './projection.js';
16
18
  import { reconcileEvidenceReports, } from './reconciliation.js';
17
19
  import { loadWorkspaceManifest } from './workspace.js';
@@ -572,7 +574,18 @@ export function runAskCommand(options, cwd) {
572
574
  workspace: workspace.id,
573
575
  mode: 'kinds',
574
576
  conceptKinds,
575
- relationshipKinds: relationshipPolicies,
577
+ relationshipKinds: relationshipPolicies.map((policy) => ({
578
+ id: policy.id,
579
+ intent: policy.intent,
580
+ sourceAspects: [...matrixEndpointAspects(policy.id, 'source')],
581
+ targetAspects: [...matrixEndpointAspects(policy.id, 'target')],
582
+ })),
583
+ relationshipMatrix: {
584
+ standard: `ArchiMate ${ARCHIMATE_RELATIONSHIPS_VERSION}`,
585
+ letters: RELATIONSHIP_LETTERS,
586
+ kinds: CORE_CONCEPT_KIND_ORDER,
587
+ rows: PERMITTED_RELATIONSHIP_LETTERS,
588
+ },
576
589
  extensions,
577
590
  };
578
591
  const lines = [
@@ -587,12 +600,11 @@ export function runAskCommand(options, cwd) {
587
600
  }
588
601
  lines.push('', 'Relationship kinds:');
589
602
  for (const policy of relationshipPolicies) {
590
- const constraint = policy.sourceAspects !== undefined ||
591
- policy.targetAspects !== undefined
592
- ? ` [${policy.sourceAspects?.join('|') ?? 'any'} -> ${policy.targetAspects?.join('|') ?? 'any'}]`
593
- : '';
594
- lines.push(` ${policy.id} — ${policy.intent}${constraint}`);
603
+ const source = [...matrixEndpointAspects(policy.id, 'source')].join('|');
604
+ const target = [...matrixEndpointAspects(policy.id, 'target')].join('|');
605
+ lines.push(` ${policy.id} — ${policy.intent} [${source} -> ${target}]`);
595
606
  }
607
+ lines.push('', `Relationship admissibility: ArchiMate ${ARCHIMATE_RELATIONSHIPS_VERSION} kind-to-kind table (${CORE_CONCEPT_KIND_ORDER.length} kinds; see relationshipMatrix in --json)`);
596
608
  if (extensions.length > 0) {
597
609
  lines.push('', 'Profile extensions in this workspace:');
598
610
  for (const extension of extensions) {
@@ -54,7 +54,7 @@ const attestedConcepts = (source, documentId) => {
54
54
  // staleness finding, a reconcile finding, and the RTM.
55
55
  attestations.push({
56
56
  topic,
57
- by: by.includes('#') ? by : `${documentId}#${by}`,
57
+ by,
58
58
  on,
59
59
  });
60
60
  }
@@ -81,7 +81,7 @@ const attestedConcepts = (source, documentId) => {
81
81
  if (spans.length === 0)
82
82
  continue;
83
83
  concepts.push({
84
- qualifiedId: `${documentId}#${id}`,
84
+ qualifiedId: id,
85
85
  spans,
86
86
  attestations,
87
87
  });
package/dist/changed.js CHANGED
@@ -101,7 +101,7 @@ export function deriveChangedSubjects(cwd, range, documents) {
101
101
  const touched = ranges.touched.some(([from, to]) => from <= span.endLine && to >= span.startLine);
102
102
  if (!touched)
103
103
  continue;
104
- const qualified = `${document.documentId}#${span.id}`;
104
+ const qualified = span.id;
105
105
  if (span.collection === 'concepts')
106
106
  concepts.add(qualified);
107
107
  else
@@ -4,12 +4,17 @@ import Ajv2020Module from 'ajv/dist/2020.js';
4
4
  import { parseDocument } from 'yaml';
5
5
  import { loadAdapterMapping, validateAdapterMappings, } from './adapter-mapping.js';
6
6
  import { checkResultJson, humanDiagnostics, resolveCliWorkspaceSources, sortDiagnostics, usage, } from './cli-support.js';
7
- import { compileWorkspace } from './compiler.js';
7
+ import { compileWorkspace, withDiagnosticSubjects } from './compiler.js';
8
8
  import { checkCoreContract, loadCoreContract, } from './core-contract.js';
9
9
  import { evaluateEvidenceWorkspace, loadEvidence, } from './evidence.js';
10
10
  import { loadProjection } from './projection.js';
11
11
  import { reconcileEvidenceReports, } from './reconciliation.js';
12
- const Ajv2020 = Ajv2020Module.default;
12
+ // `.default ?? module`, not a bare `.default`: NodeNext sees the raw CJS
13
+ // `module.exports` and a bundler the unwrapped class. One shape for all of
14
+ // them, so which modules a browser happens to reach is not a thing anyone has
15
+ // to keep track of (#252).
16
+ const ajv2020Module = Ajv2020Module;
17
+ const Ajv2020 = ajv2020Module.default ?? ajv2020Module;
13
18
  const strictFindingMessage = (finding) => {
14
19
  const observed = finding.evidence.message === undefined
15
20
  ? finding.evidence.uri
@@ -190,9 +195,12 @@ export function runCheckCommand(options, cwd) {
190
195
  ...evidenceDiagnostics,
191
196
  ]);
192
197
  const ok = result.ok && optionalDiagnostics.length === 0;
193
- const diagnostics = result.ok
194
- ? optionalDiagnostics
195
- : result.diagnostics;
198
+ // Published results name the subject a diagnostic is about wherever its
199
+ // pointer identifies one, so a consumer that draws the model can put the
200
+ // refusal on the element rather than on a byte offset. Derived here, at
201
+ // the boundary that publishes the document, so the compiler's own
202
+ // diagnostics stay a pure function of the model.
203
+ const diagnostics = withDiagnosticSubjects(result.ok ? optionalDiagnostics : result.diagnostics, sources);
196
204
  // Strict only tightens a passing check: base diagnostics already fail
197
205
  // the gate, so contradictions are folded in only once everything else
198
206
  // holds, and each one is anchored at the claim the model declares.
@@ -7,7 +7,7 @@ export interface CliResult {
7
7
  export declare const isMainModule: (moduleUrl: string, entrypoint: string | undefined) => boolean;
8
8
  export declare const packageVersion: string;
9
9
  export declare const versionResult: (binary: string) => CliResult;
10
- export declare const usage = "Usage:\n yarramate init <directory> [--no-pointer]\n yarramate design <workspace.yaml> [--subject <document-id>#<local-id>] [--catalogue <catalogue.yaml>] [--facilitate] [--json]\n yarramate apply <operations.yaml> <workspace.yaml> [--json]\n yarramate ask <workspace.yaml> [--json]\n yarramate ask <workspace.yaml> \"<free text>\" | <document-id>#<local-id> ... | <projection.yaml> [--budget <tokens>] [--neighbours <n>] [--json]\n yarramate ask <workspace.yaml> --subjects [--kind <term>] [--status <status>] [--json]\n yarramate ask <workspace.yaml> --kinds [--json]\n yarramate ask <workspace.yaml> --advise \"<topic>\" [--budget <tokens>] [--neighbours <n>] [--catalogue <catalogue.yaml>] [--json]\n yarramate ask <workspace.yaml> --where \"<free text>\" | <document-id>#<local-id> ... [--json]\n yarramate ask <workspace.yaml> --next [--json]\n yarramate ask <workspace.yaml> --open [--catalogue <catalogue.yaml>] [--json]\n yarramate ask <workspace.yaml> --compare <from-state> <to-state> [--json]\n yarramate ask <workspace.yaml> --changed <git-range> [--budget <tokens>] [--neighbours <n>] [--json]\n yarramate check <source.yaml> [source.yaml ...] [--json] [--strict]\n yarramate reconcile <workspace.yaml>\n yarramate export graph <workspace.yaml> [--out <file>]\n yarramate export markdown <projection.yaml> <workspace.yaml> [--out <file>]\n yarramate export markdown --changed <git-range> <workspace.yaml> [--out <file>]\n yarramate export briefs <projection.yaml> <workspace.yaml> --out <directory> [--budget <tokens>]\n yarramate export briefs --changed <git-range> <workspace.yaml> --out <directory> [--budget <tokens>]\n yarramate export rtm <workspace.yaml> --out <directory>\n yarramate export likec4 <likec4-project.yaml> <output-dir> <workspace.yaml> [--changed <git-range>]\n";
10
+ export declare const usage = "Usage:\n yarramate init <directory> [--no-pointer]\n yarramate design <workspace.yaml> [--subject <subject-id>] [--catalogue <catalogue.yaml>] [--facilitate] [--json]\n yarramate apply <operations.yaml> <workspace.yaml> [--json]\n yarramate ask <workspace.yaml> [--json]\n yarramate ask <workspace.yaml> \"<free text>\" | <subject-id> ... | <projection.yaml> [--budget <tokens>] [--neighbours <n>] [--json]\n yarramate ask <workspace.yaml> --subjects [--kind <term>] [--status <status>] [--json]\n yarramate ask <workspace.yaml> --kinds [--json]\n yarramate ask <workspace.yaml> --advise \"<topic>\" [--budget <tokens>] [--neighbours <n>] [--catalogue <catalogue.yaml>] [--json]\n yarramate ask <workspace.yaml> --where \"<free text>\" | <subject-id> ... [--json]\n yarramate ask <workspace.yaml> --next [--json]\n yarramate ask <workspace.yaml> --open [--catalogue <catalogue.yaml>] [--json]\n yarramate ask <workspace.yaml> --compare <from-state> <to-state> [--json]\n yarramate ask <workspace.yaml> --changed <git-range> [--budget <tokens>] [--neighbours <n>] [--json]\n yarramate check <source.yaml> [source.yaml ...] [--json] [--strict]\n yarramate reconcile <workspace.yaml>\n yarramate export graph <workspace.yaml> [--out <file>]\n yarramate export markdown <projection.yaml> <workspace.yaml> [--out <file>]\n yarramate export markdown --changed <git-range> <workspace.yaml> [--out <file>]\n yarramate export briefs <projection.yaml> <workspace.yaml> --out <directory> [--budget <tokens>]\n yarramate export briefs --changed <git-range> <workspace.yaml> --out <directory> [--budget <tokens>]\n yarramate export rtm <workspace.yaml> --out <directory>\n yarramate export likec4 <likec4-project.yaml> <output-dir> <workspace.yaml> [--changed <git-range>]\n";
11
11
  export declare const diagnosticJson: (diagnostics: unknown) => string;
12
12
  export declare const checkResultJson: (ok: boolean, diagnostics: unknown, counted?: {
13
13
  readonly documents: number;
@@ -22,7 +22,7 @@ export const versionResult = (binary) => ({
22
22
  stdout: `${binary} ${packageVersion}\n`,
23
23
  stderr: '',
24
24
  });
25
- export const usage = 'Usage:\n yarramate init <directory> [--no-pointer]\n yarramate design <workspace.yaml> [--subject <document-id>#<local-id>] [--catalogue <catalogue.yaml>] [--facilitate] [--json]\n yarramate apply <operations.yaml> <workspace.yaml> [--json]\n yarramate ask <workspace.yaml> [--json]\n yarramate ask <workspace.yaml> "<free text>" | <document-id>#<local-id> ... | <projection.yaml> [--budget <tokens>] [--neighbours <n>] [--json]\n yarramate ask <workspace.yaml> --subjects [--kind <term>] [--status <status>] [--json]\n yarramate ask <workspace.yaml> --kinds [--json]\n yarramate ask <workspace.yaml> --advise "<topic>" [--budget <tokens>] [--neighbours <n>] [--catalogue <catalogue.yaml>] [--json]\n yarramate ask <workspace.yaml> --where "<free text>" | <document-id>#<local-id> ... [--json]\n yarramate ask <workspace.yaml> --next [--json]\n yarramate ask <workspace.yaml> --open [--catalogue <catalogue.yaml>] [--json]\n yarramate ask <workspace.yaml> --compare <from-state> <to-state> [--json]\n yarramate ask <workspace.yaml> --changed <git-range> [--budget <tokens>] [--neighbours <n>] [--json]\n yarramate check <source.yaml> [source.yaml ...] [--json] [--strict]\n yarramate reconcile <workspace.yaml>\n yarramate export graph <workspace.yaml> [--out <file>]\n yarramate export markdown <projection.yaml> <workspace.yaml> [--out <file>]\n yarramate export markdown --changed <git-range> <workspace.yaml> [--out <file>]\n yarramate export briefs <projection.yaml> <workspace.yaml> --out <directory> [--budget <tokens>]\n yarramate export briefs --changed <git-range> <workspace.yaml> --out <directory> [--budget <tokens>]\n yarramate export rtm <workspace.yaml> --out <directory>\n yarramate export likec4 <likec4-project.yaml> <output-dir> <workspace.yaml> [--changed <git-range>]\n';
25
+ export const usage = 'Usage:\n yarramate init <directory> [--no-pointer]\n yarramate design <workspace.yaml> [--subject <subject-id>] [--catalogue <catalogue.yaml>] [--facilitate] [--json]\n yarramate apply <operations.yaml> <workspace.yaml> [--json]\n yarramate ask <workspace.yaml> [--json]\n yarramate ask <workspace.yaml> "<free text>" | <subject-id> ... | <projection.yaml> [--budget <tokens>] [--neighbours <n>] [--json]\n yarramate ask <workspace.yaml> --subjects [--kind <term>] [--status <status>] [--json]\n yarramate ask <workspace.yaml> --kinds [--json]\n yarramate ask <workspace.yaml> --advise "<topic>" [--budget <tokens>] [--neighbours <n>] [--catalogue <catalogue.yaml>] [--json]\n yarramate ask <workspace.yaml> --where "<free text>" | <subject-id> ... [--json]\n yarramate ask <workspace.yaml> --next [--json]\n yarramate ask <workspace.yaml> --open [--catalogue <catalogue.yaml>] [--json]\n yarramate ask <workspace.yaml> --compare <from-state> <to-state> [--json]\n yarramate ask <workspace.yaml> --changed <git-range> [--budget <tokens>] [--neighbours <n>] [--json]\n yarramate check <source.yaml> [source.yaml ...] [--json] [--strict]\n yarramate reconcile <workspace.yaml>\n yarramate export graph <workspace.yaml> [--out <file>]\n yarramate export markdown <projection.yaml> <workspace.yaml> [--out <file>]\n yarramate export markdown --changed <git-range> <workspace.yaml> [--out <file>]\n yarramate export briefs <projection.yaml> <workspace.yaml> --out <directory> [--budget <tokens>]\n yarramate export briefs --changed <git-range> <workspace.yaml> --out <directory> [--budget <tokens>]\n yarramate export rtm <workspace.yaml> --out <directory>\n yarramate export likec4 <likec4-project.yaml> <output-dir> <workspace.yaml> [--changed <git-range>]\n';
26
26
  export const diagnosticJson = (diagnostics) => `${JSON.stringify({
27
27
  format: 'yarramate/diagnostic-result/v1',
28
28
  diagnostics,
package/dist/cli.js CHANGED
@@ -6,7 +6,7 @@ import { diagnosticJson, isMainModule, usage, versionResult, } from './cli-suppo
6
6
  import { runAskCommand } from './ask-command.js';
7
7
  import { runCheckCommand } from './check-command.js';
8
8
  import { runExportCommand } from './export-command.js';
9
- import { runApplyCommand } from './apply-command.js';
9
+ import { runApplyCommand } from './apply-cli.js';
10
10
  import { runDesignCommand } from './design-command.js';
11
11
  import { evaluateEvidenceWorkspace, loadEvidence, } from './evidence.js';
12
12
  import { deriveAttestationStaleness } from './attestation-staleness.js';
@@ -1,4 +1,5 @@
1
- import { type Aspect } from './profile.js';
1
+ import { type Aspect, type RelationshipKind } from './profile.js';
2
+ import { type CoreConceptKindId } from './relationship-matrix.js';
2
3
  export interface WorkspaceSource {
3
4
  readonly path: string;
4
5
  readonly source: string;
@@ -11,6 +12,22 @@ export interface Diagnostic {
11
12
  readonly pointer: string;
12
13
  readonly line: number;
13
14
  readonly column: number;
15
+ /**
16
+ * The subjects this diagnostic is about, most relevant first, when its
17
+ * pointer names one. A consumer that draws the model - a canvas badging the
18
+ * element a rule refused - needs the subject, not the byte offset, and the
19
+ * rules already knew it: YM404 interpolates both endpoint ids into its own
20
+ * message.
21
+ *
22
+ * Absence is meaningful and is not the same as "not yet populated". These
23
+ * are derived in one place from the pointer, so every diagnostic that names
24
+ * a concept or a relationship carries them, and the ones that stay empty are
25
+ * exactly the ones that belong to no subject: a YAML parse failure, a
26
+ * whole-document schema violation, a projection's own definition, a
27
+ * manifest. A consumer can therefore treat an empty list as "this belongs
28
+ * somewhere other than the canvas" rather than as missing data.
29
+ */
30
+ readonly subjects?: readonly string[];
14
31
  }
15
32
  export interface GraphSource {
16
33
  readonly document: string;
@@ -45,8 +62,8 @@ export interface SemanticGraph {
45
62
  readonly claims: readonly GraphClaim[];
46
63
  }
47
64
  export interface RelationshipEndpointAspects {
48
- readonly source?: readonly Aspect[];
49
- readonly target?: readonly Aspect[];
65
+ readonly source: readonly Aspect[];
66
+ readonly target: readonly Aspect[];
50
67
  }
51
68
  export interface ResolvedProfileContext {
52
69
  readonly conceptKindLineages: ReadonlyMap<string, readonly string[]>;
@@ -54,6 +71,16 @@ export interface ResolvedProfileContext {
54
71
  readonly conceptKindLayers: ReadonlyMap<string, string>;
55
72
  readonly conceptKindAspects: ReadonlyMap<string, string>;
56
73
  readonly relationshipKindEndpointAspects: ReadonlyMap<string, RelationshipEndpointAspects>;
74
+ /** Kind identity -> the core kind it resolves to through lineage. */
75
+ readonly conceptKindCoreAncestors: ReadonlyMap<string, CoreConceptKindId>;
76
+ readonly relationshipKindCoreAncestors: ReadonlyMap<string, RelationshipKind>;
77
+ /**
78
+ * The core relationship kinds the ArchiMate table permits between two
79
+ * concept kind identities, resolved through lineage; undefined when either
80
+ * identity is unknown. An extension relationship kind's own narrowing is
81
+ * not applied here: read `relationshipKindEndpointAspects` for that.
82
+ */
83
+ readonly permittedRelationshipKinds: (fromKindIdentity: string, toKindIdentity: string) => ReadonlySet<RelationshipKind> | undefined;
57
84
  }
58
85
  export type CompilationResult = {
59
86
  readonly ok: true;
@@ -113,6 +140,7 @@ interface ResolvedPosition {
113
140
  readonly line: number;
114
141
  readonly col: number;
115
142
  }
143
+ export declare const withDiagnosticSubjects: (diagnostics: readonly Diagnostic[], sources: readonly WorkspaceSource[]) => readonly Diagnostic[];
116
144
  export declare function compileWorkspace(sources: readonly WorkspaceSource[]): CompilationResult;
117
145
  export declare const compileWorkspaceWithProfileContext: (sources: readonly WorkspaceSource[]) => ContextualCompilationResult;
118
146
  /**