@documentation-robotics/cli 0.1.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 (169) hide show
  1. package/PYTHON_CLI_PARITY.md +265 -0
  2. package/PYTHON_CLI_STRUCTURE_UPDATE.md +246 -0
  3. package/README.md +926 -0
  4. package/biome.json +42 -0
  5. package/bunfig.toml +3 -0
  6. package/dist/ai/claude-client.js +71 -0
  7. package/dist/ai/claude-client.js.map +7 -0
  8. package/dist/ai/context-provider.js +129 -0
  9. package/dist/ai/context-provider.js.map +7 -0
  10. package/dist/ai/tools.js +231 -0
  11. package/dist/ai/tools.js.map +7 -0
  12. package/dist/cli.js +224 -0
  13. package/dist/cli.js.map +7 -0
  14. package/dist/commands/add.js +51 -0
  15. package/dist/commands/add.js.map +7 -0
  16. package/dist/commands/changeset.js +174 -0
  17. package/dist/commands/changeset.js.map +7 -0
  18. package/dist/commands/chat.js +111 -0
  19. package/dist/commands/chat.js.map +7 -0
  20. package/dist/commands/conformance.js +132 -0
  21. package/dist/commands/conformance.js.map +7 -0
  22. package/dist/commands/delete.js +31 -0
  23. package/dist/commands/delete.js.map +7 -0
  24. package/dist/commands/element.js +28 -0
  25. package/dist/commands/element.js.map +7 -0
  26. package/dist/commands/export.js +65 -0
  27. package/dist/commands/export.js.map +7 -0
  28. package/dist/commands/info.js +40 -0
  29. package/dist/commands/info.js.map +7 -0
  30. package/dist/commands/init.js +45 -0
  31. package/dist/commands/init.js.map +7 -0
  32. package/dist/commands/list.js +32 -0
  33. package/dist/commands/list.js.map +7 -0
  34. package/dist/commands/migrate.js +36 -0
  35. package/dist/commands/migrate.js.map +7 -0
  36. package/dist/commands/project.js +74 -0
  37. package/dist/commands/project.js.map +7 -0
  38. package/dist/commands/relationship.js +118 -0
  39. package/dist/commands/relationship.js.map +7 -0
  40. package/dist/commands/search.js +48 -0
  41. package/dist/commands/search.js.map +7 -0
  42. package/dist/commands/show.js +38 -0
  43. package/dist/commands/show.js.map +7 -0
  44. package/dist/commands/trace.js +60 -0
  45. package/dist/commands/trace.js.map +7 -0
  46. package/dist/commands/update.js +37 -0
  47. package/dist/commands/update.js.map +7 -0
  48. package/dist/commands/upgrade.js +152 -0
  49. package/dist/commands/upgrade.js.map +7 -0
  50. package/dist/commands/validate.js +71 -0
  51. package/dist/commands/validate.js.map +7 -0
  52. package/dist/commands/version.js +20 -0
  53. package/dist/commands/version.js.map +7 -0
  54. package/dist/commands/visualize.js +51 -0
  55. package/dist/commands/visualize.js.map +7 -0
  56. package/dist/core/active-changeset.js +52 -0
  57. package/dist/core/active-changeset.js.map +7 -0
  58. package/dist/core/changeset.js +244 -0
  59. package/dist/core/changeset.js.map +7 -0
  60. package/dist/core/dependency-tracker.js +322 -0
  61. package/dist/core/dependency-tracker.js.map +7 -0
  62. package/dist/core/element.js +65 -0
  63. package/dist/core/element.js.map +7 -0
  64. package/dist/core/layer.js +75 -0
  65. package/dist/core/layer.js.map +7 -0
  66. package/dist/core/manifest.js +57 -0
  67. package/dist/core/manifest.js.map +7 -0
  68. package/dist/core/migration-registry.js +131 -0
  69. package/dist/core/migration-registry.js.map +7 -0
  70. package/dist/core/model.js +455 -0
  71. package/dist/core/model.js.map +7 -0
  72. package/dist/core/projection-engine.js +288 -0
  73. package/dist/core/projection-engine.js.map +7 -0
  74. package/dist/core/reference-registry.js +188 -0
  75. package/dist/core/reference-registry.js.map +7 -0
  76. package/dist/core/relationship-registry.js +114 -0
  77. package/dist/core/relationship-registry.js.map +7 -0
  78. package/dist/core/relationships.js +78 -0
  79. package/dist/core/relationships.js.map +7 -0
  80. package/dist/export/archimate-exporter.js +111 -0
  81. package/dist/export/archimate-exporter.js.map +7 -0
  82. package/dist/export/export-manager.js +63 -0
  83. package/dist/export/export-manager.js.map +7 -0
  84. package/dist/export/graphml-exporter.js +39 -0
  85. package/dist/export/graphml-exporter.js.map +7 -0
  86. package/dist/export/index.js +17 -0
  87. package/dist/export/index.js.map +7 -0
  88. package/dist/export/json-schema-exporter.js +60 -0
  89. package/dist/export/json-schema-exporter.js.map +7 -0
  90. package/dist/export/markdown-exporter.js +99 -0
  91. package/dist/export/markdown-exporter.js.map +7 -0
  92. package/dist/export/openapi-exporter.js +85 -0
  93. package/dist/export/openapi-exporter.js.map +7 -0
  94. package/dist/export/plantuml-exporter.js +60 -0
  95. package/dist/export/plantuml-exporter.js.map +7 -0
  96. package/dist/export/types.js +36 -0
  97. package/dist/export/types.js.map +7 -0
  98. package/dist/schemas/bundled/01-motivation-layer.schema.json +942 -0
  99. package/dist/schemas/bundled/02-business-layer.schema.json +1293 -0
  100. package/dist/schemas/bundled/03-security-layer.schema.json +2177 -0
  101. package/dist/schemas/bundled/04-application-layer.schema.json +1328 -0
  102. package/dist/schemas/bundled/05-technology-layer.schema.json +1465 -0
  103. package/dist/schemas/bundled/06-api-layer.schema.json +1743 -0
  104. package/dist/schemas/bundled/07-data-model-layer.schema.json +1253 -0
  105. package/dist/schemas/bundled/08-datastore-layer.schema.json +892 -0
  106. package/dist/schemas/bundled/09-ux-layer.schema.json +1506 -0
  107. package/dist/schemas/bundled/10-navigation-layer.schema.json +843 -0
  108. package/dist/schemas/bundled/11-apm-observability-layer.schema.json +1430 -0
  109. package/dist/schemas/bundled/12-testing-layer.schema.json +1091 -0
  110. package/dist/schemas/bundled/common/layer-extensions.schema.json +266 -0
  111. package/dist/schemas/bundled/common/predicates.schema.json +493 -0
  112. package/dist/schemas/bundled/common/relationships.schema.json +791 -0
  113. package/dist/schemas/bundled/common/source-references.schema.json +71 -0
  114. package/dist/schemas/bundled/link-registry.json +1839 -0
  115. package/dist/schemas/bundled/link-registry.schema.json +339 -0
  116. package/dist/schemas/bundled/relationship-catalog.json +1302 -0
  117. package/dist/schemas/bundled/relationship-type.schema.json +221 -0
  118. package/dist/server/server.js +1207 -0
  119. package/dist/server/server.js.map +7 -0
  120. package/dist/server/telemetry-middleware.js +24 -0
  121. package/dist/server/telemetry-middleware.js.map +7 -0
  122. package/dist/telemetry/console-interceptor.js +34 -0
  123. package/dist/telemetry/console-interceptor.js.map +7 -0
  124. package/dist/telemetry/index.js +54 -0
  125. package/dist/telemetry/index.js.map +7 -0
  126. package/dist/telemetry/resilient-exporter.js +41 -0
  127. package/dist/telemetry/resilient-exporter.js.map +7 -0
  128. package/dist/telemetry/resilient-log-exporter.js +41 -0
  129. package/dist/telemetry/resilient-log-exporter.js.map +7 -0
  130. package/dist/telemetry/test-instrumentation.js +32 -0
  131. package/dist/telemetry/test-instrumentation.js.map +7 -0
  132. package/dist/types/index.js +1 -0
  133. package/dist/types/index.js.map +7 -0
  134. package/dist/utils/element-utils.js +11 -0
  135. package/dist/utils/element-utils.js.map +7 -0
  136. package/dist/utils/errors.js +105 -0
  137. package/dist/utils/errors.js.map +7 -0
  138. package/dist/utils/file-io.js +69 -0
  139. package/dist/utils/file-io.js.map +7 -0
  140. package/dist/utils/globals.js +28 -0
  141. package/dist/utils/globals.js.map +7 -0
  142. package/dist/utils/model-path.js +22 -0
  143. package/dist/utils/model-path.js.map +7 -0
  144. package/dist/utils/project-paths.js +45 -0
  145. package/dist/utils/project-paths.js.map +7 -0
  146. package/dist/utils/spec-installer.js +85 -0
  147. package/dist/utils/spec-installer.js.map +7 -0
  148. package/dist/utils/spec-version.js +33 -0
  149. package/dist/utils/spec-version.js.map +7 -0
  150. package/dist/validators/index.js +15 -0
  151. package/dist/validators/index.js.map +7 -0
  152. package/dist/validators/naming-validator.js +82 -0
  153. package/dist/validators/naming-validator.js.map +7 -0
  154. package/dist/validators/reference-validator.js +106 -0
  155. package/dist/validators/reference-validator.js.map +7 -0
  156. package/dist/validators/schema-validator.js +148 -0
  157. package/dist/validators/schema-validator.js.map +7 -0
  158. package/dist/validators/semantic-validator.js +80 -0
  159. package/dist/validators/semantic-validator.js.map +7 -0
  160. package/dist/validators/types.js +48 -0
  161. package/dist/validators/types.js.map +7 -0
  162. package/dist/validators/validator.js +67 -0
  163. package/dist/validators/validator.js.map +7 -0
  164. package/docs/TEST-INSTRUMENTATION.md +405 -0
  165. package/docs/telemetry.md +427 -0
  166. package/package.json +70 -0
  167. package/test-debug.js +33 -0
  168. package/test-special.mjs +46 -0
  169. package/test_runner.ts +7 -0
@@ -0,0 +1,339 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://documentation-robotics.org/schemas/link-registry.schema.json",
4
+ "title": "Link Registry Schema (DEPRECATED)",
5
+ "description": "JSON Schema for validating the link-registry.json structure. DEPRECATED as of v0.7.0 - cross-layer relationships are now defined in layer schemas.",
6
+ "version": "2.0.0",
7
+ "deprecated": true,
8
+ "deprecationNotice": {
9
+ "since": "0.7.0",
10
+ "reason": "Cross-layer relationships are now defined in layer schemas using the crossLayerRelationships section",
11
+ "removeIn": "0.8.0",
12
+ "migration": "See layer schema crossLayerRelationships sections for relationship definitions"
13
+ },
14
+
15
+ "definitions": {
16
+ "linkType": {
17
+ "type": "object",
18
+ "description": "Definition of a cross-layer link type",
19
+ "properties": {
20
+ "id": {
21
+ "type": "string",
22
+ "pattern": "^[a-z][a-z0-9-]*$",
23
+ "description": "Unique identifier for the link type (kebab-case)"
24
+ },
25
+ "name": {
26
+ "type": "string",
27
+ "minLength": 3,
28
+ "description": "Human-readable name for the link type"
29
+ },
30
+ "category": {
31
+ "type": "string",
32
+ "enum": [
33
+ "motivation",
34
+ "business",
35
+ "security",
36
+ "archimate",
37
+ "api",
38
+ "data",
39
+ "datastore",
40
+ "ux",
41
+ "navigation",
42
+ "apm"
43
+ ],
44
+ "description": "Category this link belongs to"
45
+ },
46
+ "sourceLayers": {
47
+ "type": "array",
48
+ "items": {
49
+ "type": "string",
50
+ "pattern": "^\\d{2}-[a-z-]+$"
51
+ },
52
+ "minItems": 1,
53
+ "description": "Layers where this link can originate (e.g., '02-business')"
54
+ },
55
+ "targetLayer": {
56
+ "type": "string",
57
+ "pattern": "^\\d{2}-[a-z-]+$",
58
+ "description": "Layer this link points to (e.g., '01-motivation')"
59
+ },
60
+ "targetElementTypes": {
61
+ "type": "array",
62
+ "items": {
63
+ "type": "string"
64
+ },
65
+ "minItems": 1,
66
+ "description": "Element types in target layer this link can point to"
67
+ },
68
+ "fieldPaths": {
69
+ "type": "array",
70
+ "items": {
71
+ "type": "string",
72
+ "pattern": "^([a-z][a-zA-Z0-9]*\\.[a-z][a-z0-9-]*|x-[a-z][a-z0-9-]*)$"
73
+ },
74
+ "minItems": 1,
75
+ "description": "Property paths that encode this link (e.g., 'motivation.supports-goals')"
76
+ },
77
+ "cardinality": {
78
+ "type": "string",
79
+ "enum": ["single", "array"],
80
+ "description": "Whether this link expects a single value or an array"
81
+ },
82
+ "format": {
83
+ "type": "string",
84
+ "enum": ["uuid", "id", "string", "duration", "percentage", "path", "enum"],
85
+ "description": "Expected format of the link value"
86
+ },
87
+ "description": {
88
+ "type": "string",
89
+ "minLength": 1,
90
+ "description": "Clear description of what this link represents"
91
+ },
92
+ "examples": {
93
+ "type": "array",
94
+ "items": {
95
+ "type": "object",
96
+ "properties": {
97
+ "source": {
98
+ "type": "object",
99
+ "properties": {
100
+ "layer": {
101
+ "type": "string",
102
+ "pattern": "^\\d{2}-[a-z-]+$"
103
+ },
104
+ "type": {
105
+ "type": "string"
106
+ },
107
+ "id": {
108
+ "type": "string"
109
+ }
110
+ },
111
+ "required": ["layer", "type", "id"]
112
+ },
113
+ "target": {
114
+ "type": "object",
115
+ "properties": {
116
+ "layer": {
117
+ "type": "string",
118
+ "pattern": "^\\d{2}-[a-z-]+$"
119
+ },
120
+ "type": {
121
+ "type": "string"
122
+ },
123
+ "id": {
124
+ "type": "string"
125
+ }
126
+ },
127
+ "required": ["layer", "type", "id"]
128
+ },
129
+ "value": {
130
+ "oneOf": [{ "type": "string" }, { "type": "array", "items": { "type": "string" } }]
131
+ },
132
+ "description": {
133
+ "type": "string"
134
+ }
135
+ },
136
+ "required": ["source", "target", "value", "description"]
137
+ },
138
+ "description": "Example usages of this link type"
139
+ },
140
+ "validationRules": {
141
+ "type": "object",
142
+ "properties": {
143
+ "targetExists": {
144
+ "type": "boolean",
145
+ "description": "Whether to validate that target element exists"
146
+ },
147
+ "targetType": {
148
+ "type": "string",
149
+ "description": "Expected type of target element"
150
+ },
151
+ "sourceElementTypesValid": {
152
+ "type": "array",
153
+ "items": { "type": "string" },
154
+ "description": "Valid source element types"
155
+ },
156
+ "minimumCardinality": {
157
+ "type": "integer",
158
+ "minimum": 0,
159
+ "description": "Minimum number of links required (0 = optional)"
160
+ },
161
+ "maximumCardinality": {
162
+ "type": ["integer", "null"],
163
+ "minimum": 1,
164
+ "description": "Maximum number of links allowed (null = unlimited)"
165
+ }
166
+ },
167
+ "additionalProperties": true
168
+ },
169
+ "predicate": {
170
+ "type": ["string", "null"],
171
+ "pattern": "^[a-z][a-z0-9-]*$",
172
+ "description": "Semantic predicate for this relationship (forward direction)"
173
+ },
174
+ "inversePredicate": {
175
+ "type": ["string", "null"],
176
+ "pattern": "^[a-z][a-z0-9-]*$",
177
+ "description": "Inverse predicate for bidirectional navigation"
178
+ },
179
+ "relationshipCategory": {
180
+ "type": ["string", "null"],
181
+ "enum": [
182
+ "structural",
183
+ "behavioral",
184
+ "dependency",
185
+ "traceability",
186
+ "governance",
187
+ "apm",
188
+ "security",
189
+ "ux",
190
+ "data",
191
+ null
192
+ ],
193
+ "description": "Semantic category of this relationship"
194
+ },
195
+ "sourceElementTypes": {
196
+ "type": "array",
197
+ "items": {
198
+ "type": "string"
199
+ },
200
+ "description": "Element types in source layer(s) that can have this link"
201
+ },
202
+ "strength": {
203
+ "type": ["string", "null"],
204
+ "enum": ["critical", "high", "medium", "low", null],
205
+ "description": "Importance/strength of this relationship"
206
+ },
207
+ "isRequired": {
208
+ "type": "boolean",
209
+ "description": "Whether this link is mandatory for the source element"
210
+ },
211
+ "bidirectional": {
212
+ "type": "boolean",
213
+ "description": "Whether this link supports bidirectional navigation"
214
+ },
215
+ "archimateAlignment": {
216
+ "type": ["string", "null"],
217
+ "enum": [
218
+ "Composition",
219
+ "Aggregation",
220
+ "Specialization",
221
+ "Realization",
222
+ "Assignment",
223
+ "Triggering",
224
+ "Flow",
225
+ "Serving",
226
+ "Access",
227
+ "Influence",
228
+ null
229
+ ],
230
+ "description": "Corresponding ArchiMate 3.2 relationship type, if any"
231
+ },
232
+ "deprecation": {
233
+ "type": ["object", "null"],
234
+ "properties": {
235
+ "deprecated": {
236
+ "type": "boolean"
237
+ },
238
+ "since": {
239
+ "type": "string",
240
+ "pattern": "^\\d+\\.\\d+\\.\\d+$"
241
+ },
242
+ "reason": {
243
+ "type": "string"
244
+ },
245
+ "replacement": {
246
+ "type": "string"
247
+ }
248
+ },
249
+ "description": "Deprecation information if this link type is being phased out"
250
+ }
251
+ },
252
+ "required": [
253
+ "id",
254
+ "name",
255
+ "category",
256
+ "sourceLayers",
257
+ "targetLayer",
258
+ "targetElementTypes",
259
+ "fieldPaths",
260
+ "cardinality",
261
+ "format",
262
+ "description",
263
+ "validationRules"
264
+ ],
265
+ "additionalProperties": false
266
+ },
267
+
268
+ "category": {
269
+ "type": "object",
270
+ "description": "Metadata for a link category",
271
+ "properties": {
272
+ "description": {
273
+ "type": "string",
274
+ "minLength": 10
275
+ },
276
+ "color": {
277
+ "type": "string",
278
+ "pattern": "^#[0-9A-Fa-f]{6}$",
279
+ "description": "Hex color code for visualization"
280
+ },
281
+ "icon": {
282
+ "type": "string",
283
+ "description": "Icon identifier for this category"
284
+ }
285
+ },
286
+ "required": ["description"],
287
+ "additionalProperties": true
288
+ }
289
+ },
290
+
291
+ "type": "object",
292
+ "properties": {
293
+ "$schema": {
294
+ "type": "string",
295
+ "format": "uri"
296
+ },
297
+ "version": {
298
+ "type": "string",
299
+ "pattern": "^\\d+\\.\\d+\\.\\d+$",
300
+ "description": "Semantic version of the link registry"
301
+ },
302
+ "metadata": {
303
+ "type": "object",
304
+ "properties": {
305
+ "generatedBy": {
306
+ "type": "string"
307
+ },
308
+ "generatedAt": {
309
+ "type": "string",
310
+ "format": "date-time"
311
+ },
312
+ "totalLinkTypes": {
313
+ "type": "integer",
314
+ "minimum": 0
315
+ },
316
+ "schemaVersion": {
317
+ "type": "string",
318
+ "pattern": "^\\d+\\.\\d+\\.\\d+$"
319
+ }
320
+ }
321
+ },
322
+ "categories": {
323
+ "type": "object",
324
+ "additionalProperties": {
325
+ "$ref": "#/definitions/category"
326
+ },
327
+ "description": "Link category definitions with metadata"
328
+ },
329
+ "linkTypes": {
330
+ "type": "array",
331
+ "items": {
332
+ "$ref": "#/definitions/linkType"
333
+ },
334
+ "minItems": 1,
335
+ "description": "Array of link type definitions"
336
+ }
337
+ },
338
+ "required": ["$schema", "version", "linkTypes"]
339
+ }