@documentation-robotics/cli 0.2.0 → 0.3.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 (269) hide show
  1. package/README.md +36 -2
  2. package/dist/analysis/relationship-classifier.js +2 -9
  3. package/dist/analysis/relationship-classifier.js.map +2 -2
  4. package/dist/analyzers/call-graph-utils.js +2 -2
  5. package/dist/analyzers/call-graph-utils.js.map +2 -2
  6. package/dist/analyzers/cards/build.js +171 -0
  7. package/dist/analyzers/cards/build.js.map +7 -0
  8. package/dist/analyzers/cards/classify.js +42 -0
  9. package/dist/analyzers/cards/classify.js.map +7 -0
  10. package/dist/analyzers/cards/edge-index.js +44 -0
  11. package/dist/analyzers/cards/edge-index.js.map +7 -0
  12. package/dist/analyzers/cards/facts.js +46 -0
  13. package/dist/analyzers/cards/facts.js.map +7 -0
  14. package/dist/analyzers/cards/graph.js +42 -0
  15. package/dist/analyzers/cards/graph.js.map +7 -0
  16. package/dist/analyzers/cards/index.js +8 -0
  17. package/dist/analyzers/cards/index.js.map +7 -0
  18. package/dist/analyzers/cards/tier0.js +18 -0
  19. package/dist/analyzers/cards/tier0.js.map +7 -0
  20. package/dist/analyzers/cards/types.js +1 -0
  21. package/dist/analyzers/cards/types.js.map +7 -0
  22. package/dist/analyzers/cbm-analyzer.js +195 -171
  23. package/dist/analyzers/cbm-analyzer.js.map +2 -2
  24. package/dist/analyzers/cbm-responses.js +336 -0
  25. package/dist/analyzers/cbm-responses.js.map +7 -0
  26. package/dist/analyzers/edge-relationships.js +45 -0
  27. package/dist/analyzers/edge-relationships.js.map +7 -0
  28. package/dist/analyzers/mapping-loader.js +9 -0
  29. package/dist/analyzers/mapping-loader.js.map +2 -2
  30. package/dist/analyzers/tier0-rules.js +153 -0
  31. package/dist/analyzers/tier0-rules.js.map +7 -0
  32. package/dist/analyzers/types.js.map +1 -1
  33. package/dist/audit/relationships/ai/prompts.js +10 -10
  34. package/dist/audit/relationships/ai/prompts.js.map +2 -2
  35. package/dist/audit/relationships/analysis/layer-templates.js +52 -52
  36. package/dist/audit/relationships/analysis/layer-templates.js.map +1 -1
  37. package/dist/cli.js +12 -2
  38. package/dist/cli.js.map +2 -2
  39. package/dist/coding-agents/default-permissions.js +31 -1
  40. package/dist/coding-agents/default-permissions.js.map +2 -2
  41. package/dist/coding-agents/drbot-mcp.js +167 -0
  42. package/dist/coding-agents/drbot-mcp.js.map +7 -0
  43. package/dist/commands/add.js +3 -2
  44. package/dist/commands/add.js.map +2 -2
  45. package/dist/commands/analyzer.js +117 -14
  46. package/dist/commands/analyzer.js.map +2 -2
  47. package/dist/commands/changeset-verify.js +55 -0
  48. package/dist/commands/changeset-verify.js.map +7 -0
  49. package/dist/commands/changeset.js +43 -22
  50. package/dist/commands/changeset.js.map +2 -2
  51. package/dist/commands/delete.js +10 -4
  52. package/dist/commands/delete.js.map +2 -2
  53. package/dist/commands/farm.js +176 -60
  54. package/dist/commands/farm.js.map +2 -2
  55. package/dist/commands/mcp.js +19 -4
  56. package/dist/commands/mcp.js.map +2 -2
  57. package/dist/commands/relationship.js +207 -26
  58. package/dist/commands/relationship.js.map +2 -2
  59. package/dist/commands/update.js +42 -23
  60. package/dist/commands/update.js.map +2 -2
  61. package/dist/commands/upgrade.js +99 -11
  62. package/dist/commands/upgrade.js.map +3 -3
  63. package/dist/commands/version.js +1 -1
  64. package/dist/commands/visualize.js +4 -3
  65. package/dist/commands/visualize.js.map +2 -2
  66. package/dist/core/catalog-migration.js +33 -0
  67. package/dist/core/catalog-migration.js.map +7 -0
  68. package/dist/core/changeset-analysis.js +421 -0
  69. package/dist/core/changeset-analysis.js.map +7 -0
  70. package/dist/core/changeset-base-index.js +153 -0
  71. package/dist/core/changeset-base-index.js.map +7 -0
  72. package/dist/core/changeset-brief-delta.js +102 -0
  73. package/dist/core/changeset-brief-delta.js.map +7 -0
  74. package/dist/core/changeset-graph.js +281 -0
  75. package/dist/core/changeset-graph.js.map +7 -0
  76. package/dist/core/changeset-only-guard.js +32 -0
  77. package/dist/core/changeset-only-guard.js.map +7 -0
  78. package/dist/core/changeset-summary.js +68 -0
  79. package/dist/core/changeset-summary.js.map +7 -0
  80. package/dist/core/changeset-validator.js +66 -20
  81. package/dist/core/changeset-validator.js.map +2 -2
  82. package/dist/core/changeset-verify.js +518 -0
  83. package/dist/core/changeset-verify.js.map +7 -0
  84. package/dist/core/changeset.js +56 -9
  85. package/dist/core/changeset.js.map +2 -2
  86. package/dist/core/element-type-migration.js +145 -0
  87. package/dist/core/element-type-migration.js.map +7 -0
  88. package/dist/core/farm-manifest.js +12 -6
  89. package/dist/core/farm-manifest.js.map +2 -2
  90. package/dist/core/farm-sync-engine.js +1 -1
  91. package/dist/core/farm-sync-engine.js.map +2 -2
  92. package/dist/core/farm-sync-state.js +10 -2
  93. package/dist/core/farm-sync-state.js.map +2 -2
  94. package/dist/core/migration-registry.js +75 -46
  95. package/dist/core/migration-registry.js.map +2 -2
  96. package/dist/core/model-upgrade.js +102 -0
  97. package/dist/core/model-upgrade.js.map +7 -0
  98. package/dist/core/model.js +82 -30
  99. package/dist/core/model.js.map +2 -2
  100. package/dist/core/mutation-handler.js +71 -6
  101. package/dist/core/mutation-handler.js.map +2 -2
  102. package/dist/core/relationship-migration-table.js +6639 -0
  103. package/dist/core/relationship-migration-table.js.map +7 -0
  104. package/dist/core/relationship-migration.js +272 -0
  105. package/dist/core/relationship-migration.js.map +7 -0
  106. package/dist/core/relationship-prune.js +49 -0
  107. package/dist/core/relationship-prune.js.map +7 -0
  108. package/dist/core/relationship-staging.js +68 -0
  109. package/dist/core/relationship-staging.js.map +7 -0
  110. package/dist/core/relationships.js +26 -4
  111. package/dist/core/relationships.js.map +2 -2
  112. package/dist/core/report-data-model.js +7 -13
  113. package/dist/core/report-data-model.js.map +2 -2
  114. package/dist/core/staged-changeset-storage.js +64 -17
  115. package/dist/core/staged-changeset-storage.js.map +2 -2
  116. package/dist/core/staged-source-reference.js +28 -0
  117. package/dist/core/staged-source-reference.js.map +7 -0
  118. package/dist/core/staging-area.js +83 -18
  119. package/dist/core/staging-area.js.map +2 -2
  120. package/dist/core/virtual-projection.js +13 -5
  121. package/dist/core/virtual-projection.js.map +2 -2
  122. package/dist/export/archimate-exporter.js +1 -0
  123. package/dist/export/archimate-exporter.js.map +2 -2
  124. package/dist/generated/compiled-validators.js +2 -2
  125. package/dist/generated/compiled-validators.js.map +2 -2
  126. package/dist/generated/layer-registry.js +16 -16
  127. package/dist/generated/layer-registry.js.map +2 -2
  128. package/dist/generated/node-types.js +186 -168
  129. package/dist/generated/node-types.js.map +2 -2
  130. package/dist/generated/relationship-index.js +2236 -7790
  131. package/dist/generated/relationship-index.js.map +2 -2
  132. package/dist/integrations/claude_code/agents/dr-architect.md +16 -3
  133. package/dist/integrations/claude_code/agents/dr-extractor.md +1 -1
  134. package/dist/integrations/claude_code/commands/dr-analyzer.md +565 -0
  135. package/dist/integrations/claude_code/commands/dr-map.md +13 -0
  136. package/dist/integrations/claude_code/commands/dr-plan.md +40 -0
  137. package/dist/integrations/claude_code/commands/dr-relate.md +106 -96
  138. package/dist/integrations/claude_code/commands/dr-verify.md +45 -2
  139. package/dist/integrations/claude_code/docs/END_TO_END_WALKTHROUGH.md +14 -0
  140. package/dist/integrations/claude_code/docs/MCP_SERVER.md +26 -2
  141. package/dist/integrations/claude_code/docs/QUICK_START.md +37 -8
  142. package/dist/integrations/claude_code/docs/README.md +48 -1
  143. package/dist/integrations/claude_code/skills/dr_01_motivation_layer/SKILL.md +93 -72
  144. package/dist/integrations/claude_code/skills/dr_02_business_layer/SKILL.md +163 -126
  145. package/dist/integrations/claude_code/skills/dr_03_product_layer/SKILL.md +161 -126
  146. package/dist/integrations/claude_code/skills/dr_04_security_layer/SKILL.md +153 -133
  147. package/dist/integrations/claude_code/skills/dr_05_application_layer/SKILL.md +129 -100
  148. package/dist/integrations/claude_code/skills/dr_06_technology_layer/SKILL.md +111 -94
  149. package/dist/integrations/claude_code/skills/dr_07_api_layer/SKILL.md +143 -157
  150. package/dist/integrations/claude_code/skills/dr_08_data_model_layer/SKILL.md +117 -33
  151. package/dist/integrations/claude_code/skills/dr_09_dataset_layer/SKILL.md +74 -25
  152. package/dist/integrations/claude_code/skills/dr_10_ux_layer/SKILL.md +88 -12
  153. package/dist/integrations/claude_code/skills/dr_11_navigation_layer/SKILL.md +83 -24
  154. package/dist/integrations/claude_code/skills/dr_12_apm_layer/SKILL.md +57 -12
  155. package/dist/integrations/claude_code/skills/dr_13_testing_layer/SKILL.md +92 -15
  156. package/dist/integrations/claude_code/skills/dr_change_planning/SKILL.md +119 -0
  157. package/dist/integrations/claude_code/skills/dr_changeset_reviewer/SKILL.md +3 -0
  158. package/dist/integrations/claude_code/skills/dr_engineering_guide/SKILL.md +1 -1
  159. package/dist/integrations/github_copilot/agents/dr-architect.md +1 -1
  160. package/dist/integrations/github_copilot/skills/dr_01_motivation_layer/SKILL.md +182 -102
  161. package/dist/integrations/github_copilot/skills/dr_02_business_layer/SKILL.md +266 -148
  162. package/dist/integrations/github_copilot/skills/dr_03_product_layer/SKILL.md +547 -86
  163. package/dist/integrations/github_copilot/skills/dr_04_security_layer/SKILL.md +164 -169
  164. package/dist/integrations/github_copilot/skills/dr_05_application_layer/SKILL.md +420 -150
  165. package/dist/integrations/github_copilot/skills/dr_06_technology_layer/SKILL.md +331 -138
  166. package/dist/integrations/github_copilot/skills/dr_07_api_layer/SKILL.md +265 -201
  167. package/dist/integrations/github_copilot/skills/dr_08_data_model_layer/SKILL.md +181 -58
  168. package/dist/integrations/github_copilot/skills/dr_09_dataset_layer/SKILL.md +209 -57
  169. package/dist/integrations/github_copilot/skills/dr_10_ux_layer/SKILL.md +277 -112
  170. package/dist/integrations/github_copilot/skills/dr_11_navigation_layer/SKILL.md +219 -70
  171. package/dist/integrations/github_copilot/skills/dr_12_apm_layer/SKILL.md +189 -105
  172. package/dist/integrations/github_copilot/skills/dr_13_testing_layer/SKILL.md +222 -102
  173. package/dist/integrations/github_copilot/skills/dr_change_planning/SKILL.md +119 -0
  174. package/dist/integrations/github_copilot/skills/dr_changeset_reviewer/SKILL.md +3 -0
  175. package/dist/integrations/hash-utils.js.map +2 -2
  176. package/dist/mcp/api-key-manager.js +14 -1
  177. package/dist/mcp/api-key-manager.js.map +2 -2
  178. package/dist/mcp/changeset-only.js +34 -0
  179. package/dist/mcp/changeset-only.js.map +7 -0
  180. package/dist/mcp/tool-registry.js +19 -3
  181. package/dist/mcp/tool-registry.js.map +2 -2
  182. package/dist/mcp/tools/changeset-analysis-tools.js +78 -0
  183. package/dist/mcp/tools/changeset-analysis-tools.js.map +7 -0
  184. package/dist/mcp/tools/changeset-editing.js +184 -0
  185. package/dist/mcp/tools/changeset-editing.js.map +7 -0
  186. package/dist/mcp/tools/changeset-lifecycle.js +83 -0
  187. package/dist/mcp/tools/changeset-lifecycle.js.map +7 -0
  188. package/dist/mcp/tools/changeset-shared.js +31 -0
  189. package/dist/mcp/tools/changeset-shared.js.map +7 -0
  190. package/dist/mcp/tools/changeset-show.js +17 -1
  191. package/dist/mcp/tools/changeset-show.js.map +2 -2
  192. package/dist/mcp/tools/changeset-verify.js +43 -0
  193. package/dist/mcp/tools/changeset-verify.js.map +7 -0
  194. package/dist/mcp/tools/index.js +19 -1
  195. package/dist/mcp/tools/index.js.map +2 -2
  196. package/dist/mcp/tools/model-add.js +6 -5
  197. package/dist/mcp/tools/model-add.js.map +2 -2
  198. package/dist/mcp/tools/model-delete.js +2 -2
  199. package/dist/mcp/tools/model-delete.js.map +2 -2
  200. package/dist/mcp/tools/model-search.js +14 -0
  201. package/dist/mcp/tools/model-search.js.map +2 -2
  202. package/dist/mcp/tools/model-show.js +29 -2
  203. package/dist/mcp/tools/model-show.js.map +2 -2
  204. package/dist/mcp/tools/model-trace.js +93 -30
  205. package/dist/mcp/tools/model-trace.js.map +2 -2
  206. package/dist/mcp/tools/model-update.js +35 -19
  207. package/dist/mcp/tools/model-update.js.map +2 -2
  208. package/dist/mcp/tools/relationship-tools.js +98 -0
  209. package/dist/mcp/tools/relationship-tools.js.map +7 -0
  210. package/dist/mcp/tools/shared.js +25 -2
  211. package/dist/mcp/tools/shared.js.map +2 -2
  212. package/dist/mcp/tools/spec-type.js +90 -0
  213. package/dist/mcp/tools/spec-type.js.map +7 -0
  214. package/dist/schemas/bundled/analyzers/cbm.json +1186 -68
  215. package/dist/schemas/bundled/analyzers/manifest.json +2 -2
  216. package/dist/schemas/bundled/api.json +1029 -1658
  217. package/dist/schemas/bundled/apm.json +499 -734
  218. package/dist/schemas/bundled/application.json +735 -371
  219. package/dist/schemas/bundled/base.json +3 -220
  220. package/dist/schemas/bundled/business.json +452 -366
  221. package/dist/schemas/bundled/data-model.json +395 -411
  222. package/dist/schemas/bundled/data-store.json +334 -558
  223. package/dist/schemas/bundled/manifest.json +18 -18
  224. package/dist/schemas/bundled/motivation.json +349 -368
  225. package/dist/schemas/bundled/navigation.json +415 -731
  226. package/dist/schemas/bundled/product.json +325 -159
  227. package/dist/schemas/bundled/security.json +864 -1232
  228. package/dist/schemas/bundled/technology.json +574 -703
  229. package/dist/schemas/bundled/testing.json +718 -1643
  230. package/dist/schemas/bundled/ux.json +739 -1352
  231. package/dist/server/schemas.js +8 -0
  232. package/dist/server/schemas.js.map +2 -2
  233. package/dist/server/server.js +218 -34
  234. package/dist/server/server.js.map +2 -2
  235. package/dist/server-entry.js +2 -1
  236. package/dist/server-entry.js.map +2 -2
  237. package/dist/telemetry/index.js +1 -1
  238. package/dist/utils/ansi-suppressor.js +6 -8
  239. package/dist/utils/ansi-suppressor.js.map +2 -2
  240. package/dist/utils/attribute-patch.js +41 -0
  241. package/dist/utils/attribute-patch.js.map +7 -0
  242. package/dist/utils/error-hints.js +29 -0
  243. package/dist/utils/error-hints.js.map +7 -0
  244. package/dist/utils/errors.js +9 -3
  245. package/dist/utils/errors.js.map +2 -2
  246. package/dist/utils/project-paths.js +26 -1
  247. package/dist/utils/project-paths.js.map +2 -2
  248. package/dist/utils/source-reference.js +14 -12
  249. package/dist/utils/source-reference.js.map +2 -2
  250. package/dist/utils/spec-version.js +2 -2
  251. package/dist/utils/spec-version.js.map +1 -1
  252. package/dist/validators/composed-reference-validator.js +5 -27
  253. package/dist/validators/composed-reference-validator.js.map +2 -2
  254. package/dist/validators/reference-validator.js +0 -7
  255. package/dist/validators/reference-validator.js.map +2 -2
  256. package/dist/validators/relationship-schema-validator.js +3 -3
  257. package/dist/validators/relationship-schema-validator.js.map +2 -2
  258. package/dist/validators/schema-validator.js +27 -9
  259. package/dist/validators/schema-validator.js.map +2 -2
  260. package/dist/validators/types.js.map +1 -1
  261. package/dist/viewer/README.md +6 -6
  262. package/dist/viewer/assets/main-CxzcuU_o.js +84 -0
  263. package/dist/viewer/assets/main-j-7ULYpm.css +1 -0
  264. package/dist/viewer/index.html +2 -2
  265. package/dist/viewer/manifest.json +10 -10
  266. package/dist/viewer/version.json +1 -1
  267. package/package.json +2 -1
  268. package/dist/viewer/assets/main-B7AOQXXX.js +0 -81
  269. package/dist/viewer/assets/main-vdrFrG7q.css +0 -1
@@ -29,9 +29,9 @@ full set of spec-defined schemas — intra-layer and cross-layer alike.
29
29
 
30
30
  Relationships require the full model to be visible before wiring can begin:
31
31
 
32
- - A `ux.librarycomponent.renders.ux.view` relationship can't be created until both
32
+ - A `ux.view.composes.ux.componentinstance` relationship can't be created until both
33
33
  the source and target UX elements exist
34
- - Cross-layer relationships (e.g., `business.businessservice --[delivers-value]--> motivation.value`)
34
+ - Cross-layer relationships (e.g., `business.businessservice --[delivers]--> motivation.value`)
35
35
  can't be wired until both layers are populated
36
36
  - Re-running `/dr-relate` after adding more layers is cheap — no nodes are re-created
37
37
 
@@ -303,16 +303,16 @@ Build a relationship map that includes both intra-layer and cross-layer schemas:
303
303
 
304
304
  ```
305
305
  ux layer relationship map (intra-layer):
306
- ux.librarycomponent →[renders]→ ux.view
307
- ux.librarycomponent →[extends]→ ux.librarycomponent
308
- ux.view →[contains]→ ux.widget
306
+ ux.view →[composes]→ ux.componentinstance
307
+ ux.componentinstance →[realizes]→ ux.librarycomponent
308
+ ux.librarycomponent →[specializes]→ ux.librarycomponent
309
309
  ux.view →[handles]→ ux.event
310
310
  ux.widget →[triggers]→ ux.event
311
311
  ... (123 total intra-layer schemas in ux)
312
312
 
313
313
  application layer cross-layer schemas:
314
314
  application.applicationprocess →[realizes]→ business.businessprocess
315
- application.applicationservice →[delivers-value]→ motivation.value
315
+ application.applicationservice →[delivers]→ motivation.value
316
316
  application.applicationservice →[references]→ apm.traceconfiguration
317
317
  ...
318
318
  ```
@@ -343,8 +343,8 @@ For each populated layer (in the order they appear in the model):
343
343
  - Element names and descriptions
344
344
  - Source provenance files (if elements share the same source file, a relationship
345
345
  is likely)
346
- - Domain semantics of the predicate (e.g., `renders` implies a parent component
347
- rendering a child view)
346
+ - Domain semantics of the predicate (e.g., `composes` implies a parent view
347
+ placing a child component)
348
348
 
349
349
  3. For warranted pairs, create the relationship:
350
350
 
@@ -378,20 +378,20 @@ For each populated layer (in the order they appear in the model):
378
378
 
379
379
  **Intra-layer relationship priorities by layer:**
380
380
 
381
- | Layer | High-value predicates to look for |
382
- | ----------- | ----------------------------------------------------------- |
383
- | ux | renders, contains, handles, extends, triggers, navigates-to |
384
- | navigation | routes-to, contains, links-to, guards |
385
- | api | service-of, extends, depends-on, produces, consumes |
386
- | data-model | extends, references, contains |
387
- | data-store | stores, partitions, indexes |
388
- | application | depends-on, orchestrates, delegates-to |
389
- | technology | depends-on, runs-on, extends |
390
- | security | protects, requires, grants, scopes |
391
- | apm | monitors, aggregates, triggers |
392
- | testing | tests, covers, depends-on |
393
- | business | realizes, depends-on, triggers, supports |
394
- | motivation | supports, influences, realizes, fulfills |
381
+ | Layer | High-value predicates to look for |
382
+ | ----------- | ------------------------------------------------------------------------- |
383
+ | ux | composes, realizes, applies, binds-to, uses, triggers, navigates-to |
384
+ | navigation | navigates-to, flows-to, protects, evaluates, composes, accesses |
385
+ | api | composes, references, specializes, governs, realizes, serves |
386
+ | data-model | composes, references, specializes, maps-to |
387
+ | data-store | composes, accesses, references, triggers, derives-from |
388
+ | application | depends-on, orchestrates, delegates-to |
389
+ | technology | composes, assigned-to, realizes, serves, connects, depends-on |
390
+ | security | aggregates, composes, authorizes, mandates, mitigates, generates, governs |
391
+ | apm | aggregates, composes, flows-to, references, monitors |
392
+ | testing | composes, references, validates, aggregates, covers, tests |
393
+ | business | realizes, depends-on, triggers, supports |
394
+ | motivation | realizes, aggregates, specializes, influence, associated-with, constrains |
395
395
 
396
396
  ---
397
397
 
@@ -424,79 +424,89 @@ The table below lists every cross-layer layer pair and the predicates defined in
424
424
  Run `dr schema relationship <element-type>` for the exact source/destination node types
425
425
  within each pair — this table shows the predicate vocabulary, not individual type combinations.
426
426
 
427
- | Source Layer | Target Layer | Predicates |
428
- | ------------ | ------------ | ----------------------------------------------------------------------------------------------------------- |
429
- | api | apm | references |
430
- | api | application | realizes, references, serves, triggers, uses |
431
- | api | business | maps-to, realizes, references, serves, triggers |
432
- | api | data-store | maps-to |
433
- | api | motivation | realizes, satisfies, serves |
434
- | api | security | implements, maps-to, references, requires, satisfies |
435
- | api | technology | depends-on, uses |
436
- | apm | api | monitors, references |
437
- | apm | application | maps-to, monitors |
438
- | apm | business | maps-to, monitors, serves |
439
- | apm | data-model | monitors, references |
440
- | apm | data-store | accesses, depends-on, monitors, serves |
441
- | apm | motivation | maps-to, realizes, satisfies |
442
- | apm | navigation | monitors, references |
443
- | apm | security | monitors, references, satisfies |
444
- | apm | technology | depends-on, monitors |
445
- | apm | ux | monitors, references |
446
- | application | apm | references |
447
- | application | business | accesses, realizes, serves, triggers |
448
- | application | motivation | delivers-value, realizes, satisfies, serves |
449
- | application | security | accesses, constrained-by, exposes, implements, mitigates, requires |
450
- | business | application | aggregates, references |
451
- | business | motivation | delivers-value, realizes, satisfies, serves |
452
- | business | security | constrained-by |
453
- | data-model | api | maps-to, realizes, serves |
454
- | data-model | application | maps-to, realizes, references, serves |
455
- | data-model | business | realizes, references, serves |
456
- | data-model | data-store | maps-to |
457
- | data-model | motivation | realizes, satisfies |
458
- | data-model | security | references, requires, satisfies |
459
- | data-model | technology | depends-on, maps-to, uses |
460
- | data-store | api | maps-to, realizes, serves |
461
- | data-store | application | implements, serves, triggers |
462
- | data-store | business | realizes, satisfies, serves, triggers |
463
- | data-store | motivation | satisfies |
464
- | data-store | security | implements, requires, satisfies |
465
- | data-store | technology | depends-on, uses |
466
- | navigation | api | accesses, maps-to, references, requires, uses |
467
- | navigation | application | accesses, depends-on, lazy-loads, realizes, references, resolves-with, triggers, uses |
468
- | navigation | business | maps-to, realizes, references, serves, triggers |
469
- | navigation | data-model | accesses, maps-to, references, uses |
470
- | navigation | data-store | accesses, depends-on, uses |
471
- | navigation | motivation | realizes, satisfies |
472
- | navigation | security | accesses, implements, references, requires, satisfies |
473
- | navigation | technology | depends-on, uses |
474
- | navigation | ux | accesses, maps-to, triggers, uses |
475
- | security | business | constrains, governs, maps-to, protects, references, targets |
476
- | security | motivation | implements, maps-to, realizes, satisfies |
477
- | technology | application | realizes, serves |
478
- | technology | business | realizes, serves |
479
- | technology | motivation | implements, realizes, satisfies, serves |
480
- | technology | security | accesses, implements, mitigates, realizes, satisfies |
481
- | testing | api | accesses, covers, references, tests, validates |
482
- | testing | apm | references, tests |
483
- | testing | application | covers, tests |
484
- | testing | business | covers, references, tests |
485
- | testing | data-model | covers, references, tests |
486
- | testing | data-store | accesses, references, tests |
487
- | testing | motivation | constrained-by, fulfills-requirements, governed-by-principles, measures-outcome, references, supports-goals |
488
- | testing | navigation | covers, references, tests |
489
- | testing | security | covers, references, tests, validates |
490
- | testing | technology | references, requires, tests |
491
- | testing | ux | covers, maps-to, tests |
492
- | ux | api | accesses, maps-to, triggers, uses |
493
- | ux | application | accesses, realizes, serves, triggers, uses |
494
- | ux | business | maps-to, realizes, serves, triggers |
495
- | ux | data-model | maps-to, references |
496
- | ux | data-store | accesses, maps-to, triggers |
497
- | ux | motivation | maps-to, realizes, satisfies, serves |
498
- | ux | security | references, requires, satisfies |
499
- | ux | technology | depends-on, requires, uses |
427
+ | Source Layer | Target Layer | Predicates |
428
+ | ------------ | ------------ | ---------------------------------------------------------------------- |
429
+ | api | application | realizes, references, serves, triggers, uses |
430
+ | api | motivation | satisfies, supports |
431
+ | api | navigation | serves |
432
+ | api | product | exposes |
433
+ | api | security | realizes, references, requires, satisfies |
434
+ | api | technology | depends-on |
435
+ | apm | api | monitors, references |
436
+ | apm | application | maps-to, monitors |
437
+ | apm | business | monitors |
438
+ | apm | data-model | monitors, references |
439
+ | apm | data-store | accesses, monitors |
440
+ | apm | motivation | measures-outcome, satisfies |
441
+ | apm | navigation | monitors, references |
442
+ | apm | security | monitors, references, satisfies |
443
+ | apm | technology | monitors, references |
444
+ | apm | ux | monitors, references |
445
+ | application | apm | references |
446
+ | application | business | accesses, realizes, serves, triggers |
447
+ | application | data-model | accesses |
448
+ | application | data-store | accesses |
449
+ | application | motivation | delivers, realizes, satisfies |
450
+ | application | product | realizes |
451
+ | application | security | accesses, constrained-by, exposes, realizes, requires |
452
+ | business | application | references |
453
+ | business | motivation | delivers, realizes, references, satisfies, supports |
454
+ | business | security | constrained-by |
455
+ | data-model | api | maps-to |
456
+ | data-model | application | realizes |
457
+ | data-model | business | realizes |
458
+ | data-model | data-store | maps-to |
459
+ | data-model | motivation | satisfies |
460
+ | data-model | security | references, requires, satisfies |
461
+ | data-model | technology | maps-to |
462
+ | data-store | api | maps-to, serves |
463
+ | data-store | application | realizes, serves, triggers |
464
+ | data-store | business | realizes, satisfies |
465
+ | data-store | motivation | satisfies |
466
+ | data-store | security | realizes, references, requires, satisfies |
467
+ | data-store | technology | depends-on |
468
+ | navigation | api | maps-to, references, requires, uses |
469
+ | navigation | application | accesses, depends-on, lazy-loads, realizes, references, triggers, uses |
470
+ | navigation | business | references |
471
+ | navigation | data-model | accesses, maps-to, references |
472
+ | navigation | motivation | satisfies |
473
+ | navigation | product | realizes |
474
+ | navigation | security | accesses, realizes, references, requires, satisfies |
475
+ | navigation | technology | depends-on |
476
+ | navigation | ux | maps-to, triggers, uses |
477
+ | product | business | realizes, references |
478
+ | product | motivation | delivers, references, satisfies, supports |
479
+ | security | business | constrains, governs, protects, references, targets |
480
+ | security | motivation | realizes, references, satisfies |
481
+ | technology | api | serves |
482
+ | technology | apm | serves |
483
+ | technology | application | realizes, serves |
484
+ | technology | data-store | serves |
485
+ | technology | motivation | realizes, satisfies |
486
+ | technology | navigation | serves |
487
+ | technology | product | realizes |
488
+ | technology | security | accesses, realizes, satisfies |
489
+ | technology | ux | serves |
490
+ | testing | api | covers, references, tests |
491
+ | testing | apm | tests |
492
+ | testing | application | covers, tests |
493
+ | testing | business | covers, tests |
494
+ | testing | data-model | covers, references, tests |
495
+ | testing | data-store | accesses, covers, tests |
496
+ | testing | motivation | measures-outcome, satisfies, supports |
497
+ | testing | navigation | covers, tests |
498
+ | testing | product | covers, tests |
499
+ | testing | security | covers, tests |
500
+ | testing | technology | covers, references, requires |
501
+ | testing | ux | covers, references, tests |
502
+ | ux | api | maps-to, references, triggers |
503
+ | ux | application | realizes, triggers |
504
+ | ux | business | references, serves |
505
+ | ux | data-model | maps-to, references |
506
+ | ux | motivation | satisfies, supports |
507
+ | ux | product | realizes |
508
+ | ux | security | references, requires, satisfies |
509
+ | ux | technology | depends-on |
500
510
 
501
511
  > **API→Application traceability pattern**
502
512
  >
@@ -644,7 +654,7 @@ Log the failure and continue. At the end of the pass, surface skipped pairs:
644
654
  Skipped relationships (not in spec):
645
655
  ux.view.dashboard-view →[contains]→ ux.widget.sidebar
646
656
  Reason: ux.view.contains.ux.widget is not a defined relationship schema
647
- Suggestion: Valid predicates for ux.view: renders, handles, triggers
657
+ Suggestion: Valid predicates for ux.view: composes, applies, binds-to, uses
648
658
  ```
649
659
 
650
660
  ### Element not found
@@ -16,7 +16,19 @@ Cross-reference the Documentation Robotics model against an external code analyz
16
16
  - **Graph-only**: Routes discovered in the code but missing from the model (suspected gaps) ⚠
17
17
  - **Model-only**: Operations in the model but not discovered in the code (possible drift) ?
18
18
 
19
- 4. Offers actionable next steps: add missing routes, remove orphaned operations, or ignore entries
19
+ 4. Checks matched elements for connections the spec models but the model lacks, and looks for
20
+ evidence of each in the analyzer's graph and the code
21
+ 5. Offers actionable next steps: add missing routes and connections, remove orphaned operations, or
22
+ ignore entries
23
+
24
+ ## Important: Dual-Root Configuration
25
+
26
+ The verification process respects your project's dual-root configuration. If your codebase root (source code location) differs from your model root (metadata location), ensure:
27
+
28
+ 1. **Configure in manifest**: Set `codebase_path` in `documentation-robotics/model/manifest.yaml` if needed
29
+ 2. **Re-index if needed**: If you recently updated `codebase_path`, run `dr analyzer index --force` before verifying
30
+
31
+ See [dr-analyzer.md](dr-analyzer.md) for complete dual-root documentation.
20
32
 
21
33
  ## Usage
22
34
 
@@ -348,7 +360,38 @@ ignore:
348
360
  match: "model_only"
349
361
  ```
350
362
 
351
- ### Step 7: Status and Next Steps
363
+ ### Step 7: Check for Missing Connections
364
+
365
+ Matching elements is half the check. Within reason, every connection the spec models for a type is
366
+ expected, though not every one will exist. Look for the ones the model has not captured:
367
+
368
+ 1. **Pick the elements.** The matched elements, plus the ones you added in Step 5. With a changeset
369
+ active, the elements it adds or changes.
370
+ 2. **Ask the spec what each type can connect to:** `dr schema relationship <layer>.<type>` lists
371
+ the triples the catalog defines from that type (over MCP, `spec_type` lists both directions).
372
+ Incoming ones are covered when you check the element at the other end.
373
+ 3. **Compare with the model:** `dr show <element-id>` lists the relationships the element has.
374
+ Every triple the spec models that the element lacks is a candidate.
375
+ 4. **Look for evidence of each candidate, in this order:**
376
+ - the analyzer's graph: `dr analyzer callers <symbol>` / `dr analyzer callees <symbol>` for the
377
+ element's source symbol, or `dr analyzer query` for HTTP calls, imports and handlers between
378
+ the element's file and the other element's file
379
+ - the code at the element's source file and symbol
380
+ 5. **Act on what you find.**
381
+ - Evidence found: offer the relationship with the evidence, for example
382
+ `dr relationship add <source-id> <target-id> --predicate <predicate>`. Say what the evidence is
383
+ ("`createOrder` calls `OrderRepository.save`").
384
+ - No evidence: don't add it. The catalog says a connection can exist, not that it does here.
385
+
386
+ **Report the result in its own section:**
387
+
388
+ ```
389
+ Missing connections: N candidates checked, X with evidence (offered), Y without evidence (left out).
390
+ ```
391
+
392
+ List each one with evidence: the triple, the two elements, and where the evidence is.
393
+
394
+ ### Step 8: Status and Next Steps
352
395
 
353
396
  **After processing all buckets, summarize:**
354
397
 
@@ -168,6 +168,18 @@ If you select [y], the analyzer is installed and ready.
168
168
 
169
169
  **What this does:** Scans your codebase and builds an indexed code graph for later verification.
170
170
 
171
+ **Important: If Your Codebase is in a Different Directory**
172
+
173
+ If your source code lives in a different directory than your model (common in monorepos), configure it first:
174
+
175
+ **In `documentation-robotics/model/manifest.yaml`:**
176
+
177
+ ```yaml
178
+ codebase_path: src # Relative to the directory that contains documentation-robotics/
179
+ ```
180
+
181
+ Then proceed with indexing.
182
+
171
183
  **Command:**
172
184
 
173
185
  ```bash
@@ -206,6 +218,8 @@ Ready for extraction with /dr-map
206
218
 
207
219
  **Then proceed to Step 3** with the analyzer installed. This enables `/dr-verify` for gap and drift detection.
208
220
 
221
+ For complete analyzer documentation including dual-root configuration, see [dr-analyzer.md](../commands/dr-analyzer.md).
222
+
209
223
  ---
210
224
 
211
225
  ### Option B: Without Code Analyzer (Faster, Manual-First Approach)
@@ -9,14 +9,38 @@ description: Configure an MCP client to connect to the Documentation Robotics MC
9
9
 
10
10
  Annotation tools (`annotation_list`, `annotation_get`, `annotation_create`, `annotation_update`, `annotation_delete`, `annotation_reply`) mirror the capabilities of the REST server's `/api/annotations/*` endpoints. Unlike the REST server's in-memory, per-process annotation store, the MCP tools persist annotations to `documentation-robotics/annotations/` on disk, so they survive across MCP sessions.
11
11
 
12
+ ## Tools
13
+
14
+ | Group | Tools |
15
+ | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
16
+ | Read the model | `model_list`, `model_show`, `model_search`, `model_trace`, `model_stats`, `model_info`, `model_validate`, `model_export`, `model_reload` |
17
+ | Change the model | `model_add`, `model_update`, `model_delete`, `relationship_add`, `relationship_delete` |
18
+ | Look up the spec | `spec_type` |
19
+ | Changesets | `changeset_list`, `changeset_show`, `changeset_create`, `changeset_activate`, `changeset_deactivate`, `changeset_update`, `changeset_unstage`, `changeset_discard` |
20
+ | Pressure-test and verify | `changeset_brief`, `changeset_impact`, `changeset_verify` |
21
+ | Annotations | `annotation_list`, `annotation_get`, `annotation_create`, `annotation_update`, `annotation_delete`, `annotation_reply` |
22
+ | Chat | `chat_launch`, `chat_status` |
23
+
24
+ With a changeset active, the "change the model" tools stage into it, and the read tools show the model as the changeset leaves it. Committing or applying a changeset is not a tool: the human does that in the viewer or with `dr changeset commit`. `changeset_discard` deletes staged changes for good, so it needs the changeset named explicitly (id or name) and `confirm: true`.
25
+
26
+ To plan a change with these tools, use `/dr-plan` (or the `dr_change_planning` skill). The design is in [`docs/CHANGE_MODELING.md`](../../../docs/CHANGE_MODELING.md).
27
+
28
+ ## Environment
29
+
30
+ | Variable | Effect |
31
+ | ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
32
+ | `DR_MCP_API_KEY` | Required. The key `dr mcp` prints on start. |
33
+ | `DR_MCP_ROOT_PATH` | Serve the model at this path instead of the working directory. An unusable path is reported on stderr and the server keeps its own directory. |
34
+ | `DR_CHANGESET_ONLY` | `true`/`1`/`yes`/`on` refuses model writes unless a staged changeset is active (an unrecognised value also turns it on, with a warning). DrBot sets it with `dr visualize --with-changesets`. |
35
+
12
36
  ## Configuring Claude Code
13
37
 
14
- Add an entry to your project's `.mcp.json` (or the equivalent global MCP config):
38
+ Add an entry to your project's `.mcp.json` (or the equivalent global MCP config). Name the server `dr`: the DR agents and DrBot refer to its tools as `mcp__dr__<tool>`.
15
39
 
16
40
  ```json
17
41
  {
18
42
  "mcpServers": {
19
- "documentation-robotics": {
43
+ "dr": {
20
44
  "command": "dr",
21
45
  "args": ["mcp"],
22
46
  "env": {
@@ -185,6 +185,34 @@ dr analyzer index
185
185
  - **Pre-Briefs:** Analyzer provides summaries of endpoints, services, datastores that `/dr-map` uses for high-confidence extraction
186
186
  - **Three Buckets:** Verification shows **matched** (good), **graph-only** (gaps), **model-only** (drift)
187
187
  - **Interactive Reconciliation:** `/dr-verify` prompts you to add gaps or remove drift one by one
188
+ - **Dual-Root Architecture:** Your model (metadata) and codebase (source code) can be in different directories. Configure via `codebase_path` in `manifest.yaml` if needed (relative to the directory that contains `documentation-robotics/`).
189
+
190
+ ---
191
+
192
+ ## Special Setup: Dual-Root Configuration
193
+
194
+ If your source code and model are in **separate directories** (common in monorepos), configure the codebase root:
195
+
196
+ **In `documentation-robotics/model/manifest.yaml`:**
197
+
198
+ ```yaml
199
+ version: 0.1.0
200
+ schema: documentation-robotics-v1
201
+ ---
202
+ codebase_path: src # Relative to the directory that contains documentation-robotics/
203
+ ```
204
+
205
+ `codebase_path` is resolved against the model root: the directory that **contains** `documentation-robotics/`, not the `documentation-robotics/model/` folder the manifest sits in. So `src` points at `<model-root>/src`, and a sibling checkout at `<model-root>/../my-app` is `codebase_path: ../my-app`.
206
+
207
+ **Then re-index:**
208
+
209
+ ```bash
210
+ dr analyzer index --force
211
+ ```
212
+
213
+ **Don't have separate directories?** No action needed — DR defaults to the model directory.
214
+
215
+ For complete details, see [dr-analyzer.md dual-root documentation](../commands/dr-analyzer.md).
188
216
 
189
217
  ---
190
218
 
@@ -231,14 +259,15 @@ Ready for export/sharing
231
259
 
232
260
  ## Troubleshooting Quick Fixes
233
261
 
234
- | Problem | Solution |
235
- | ------------------- | -------------------------------------------------------------- |
236
- | "No analyzer" | `dr analyzer discover` then pick one |
237
- | "Not indexed" | `dr analyzer index` to build graph |
238
- | "Index stale" | `dr analyzer index` to refresh |
239
- | "Many gaps" | `/dr-map ./src --layers api` to re-extract |
240
- | "Validation errors" | `dr validate --strict` to see details, then `/dr-model` to fix |
241
- | "Lost in process" | Read `END_TO_END_WALKTHROUGH.md` for detailed guide |
262
+ | Problem | Solution |
263
+ | ------------------- | ---------------------------------------------------------------------- |
264
+ | "No analyzer" | `dr analyzer discover` then pick one |
265
+ | "Not indexed" | `dr analyzer index` to build graph |
266
+ | "Index stale" | `dr analyzer index` to refresh |
267
+ | "Many gaps" | `/dr-map ./src --layers api` to re-extract |
268
+ | "Wrong codebase" | Set `codebase_path` in manifest.yaml, then `dr analyzer index --force` |
269
+ | "Validation errors" | `dr validate --strict` to see details, then `/dr-model` to fix |
270
+ | "Lost in process" | Read `END_TO_END_WALKTHROUGH.md` for detailed guide |
242
271
 
243
272
  ---
244
273
 
@@ -50,6 +50,16 @@ The comprehensive manual walkthrough covering every step from fresh project thro
50
50
 
51
51
  ### Command Reference
52
52
 
53
+ - **[dr-plan.md](../commands/dr-plan.md)** — Plan a change as a staged changeset over the `dr` MCP server
54
+ - Frame, draft, pressure-test (`changeset_brief`, `changeset_impact`), review, build, verify
55
+ - The human commits the changeset in the PR
56
+
57
+ - **[dr-analyzer.md](../commands/dr-analyzer.md)** — Discover, install, and manage code analyzers
58
+ - Dual-root architecture (separate metadata and codebase roots)
59
+ - Index and query code graphs
60
+ - Analyzer endpoints, services, datastores
61
+ - Pre-index configuration for dual-root setups
62
+
53
63
  - **[dr-map.md](../commands/dr-map.md)** — Extract architecture from your codebase
54
64
  - Recipe vs. Targeted modes
55
65
  - Layer-by-layer extraction
@@ -59,6 +69,7 @@ The comprehensive manual walkthrough covering every step from fresh project thro
59
69
  - Three-bucket reporting (matched, gaps, drift)
60
70
  - Interactive reconciliation
61
71
  - Ignore lists and drift management
72
+ - Works with dual-root analyzer setup
62
73
 
63
74
  - **[dr-validate.md](../commands/dr-validate.md)** — Validate model integrity
64
75
  - Schema and reference validation
@@ -75,6 +86,7 @@ The comprehensive manual walkthrough covering every step from fresh project thro
75
86
 
76
87
  ### Skills & Agents
77
88
 
89
+ - **[dr_change_planning/SKILL.md](../skills/dr_change_planning/SKILL.md)** — "Plan this change" as a DR changeset (the steps behind `/dr-plan`)
78
90
  - **[dr-codebase-memory/SKILL.md](../skills/dr_codebase_memory/SKILL.md)** — Codebase memory and context management
79
91
  - Layer-specific skills (Layer 1-13)
80
92
 
@@ -158,10 +170,12 @@ integrations/claude_code/
158
170
  │ ├── dr-sync.md ← Sync with code changes
159
171
  │ ├── dr-design.md ← Design elements
160
172
  │ ├── dr-info.md ← Get model information
173
+ │ ├── dr-plan.md ← Plan a change as a changeset
161
174
  │ ├── dr-changeset.md ← Manage changesets
162
175
  │ └── dr-relate.md ← Establish relationships
163
176
  │
164
177
  ├── skills/ ← Specialized knowledge modules
178
+ │ ├── dr_change_planning/
165
179
  │ ├── dr_codebase_memory/
166
180
  │ ├── dr_01_motivation_layer/
167
181
  │ ├── ... (all 13 layers)
@@ -177,11 +191,44 @@ integrations/claude_code/
177
191
 
178
192
  ## 🔑 Key Concepts
179
193
 
194
+ ### Dual-Root Architecture
195
+
196
+ Your Documentation Robotics project has two roots:
197
+
198
+ - **Model Root** — Where your `documentation-robotics/` directory lives (contains manifest, layers, changesets)
199
+ - **Codebase Root** — Where your actual source code is located
200
+
201
+ These can be the same directory (typical) or different directories (useful for monorepos or federated architectures). Analyzer commands automatically respect this configuration.
202
+
203
+ **Resolution Priority:**
204
+
205
+ The codebase root is resolved in this order:
206
+
207
+ 1. **`--codebase-path` CLI flag** — Global option that overrides all other resolution methods
208
+ 2. **`manifest.codebase_path`** — Configured in `documentation-robotics/model/manifest.yaml`; resolved relative to the model root, the directory that contains `documentation-robotics/`
209
+ 3. **Farm auto-resolution** — If your model is in a farm, resolved from farm configuration
210
+ 4. **Default** — Uses the model root itself
211
+
212
+ **Configure via `manifest.codebase_path`:**
213
+
214
+ ```yaml
215
+ # documentation-robotics/model/manifest.yaml
216
+ codebase_path: ../my-app # Relative to the directory that contains documentation-robotics/, points to actual source code
217
+ ```
218
+
219
+ After configuration, re-index for changes to take effect:
220
+
221
+ ```bash
222
+ dr analyzer index --force
223
+ ```
224
+
225
+ For details, see [dr-analyzer.md](../commands/dr-analyzer.md).
226
+
180
227
  ### Source Provenance
181
228
 
182
229
  Every extracted element includes:
183
230
 
184
- - **source_file** — The file path (relative to repo root)
231
+ - **source_file** — The file path (relative to codebase root)
185
232
  - **source_symbol** — The specific class/function/symbol
186
233
  - **source_provenance** — "extracted" (from code) or "inferred" (from patterns)
187
234