@documentation-robotics/cli 0.2.0 → 0.4.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 (335) hide show
  1. package/README.md +46 -16
  2. package/dist/analysis/relationship-classifier.js +2 -9
  3. package/dist/analysis/relationship-classifier.js.map +2 -2
  4. package/dist/analyzers/active-analyzer.js +62 -0
  5. package/dist/analyzers/active-analyzer.js.map +7 -0
  6. package/dist/analyzers/call-graph-utils.js +2 -2
  7. package/dist/analyzers/call-graph-utils.js.map +2 -2
  8. package/dist/analyzers/cards/build.js +191 -0
  9. package/dist/analyzers/cards/build.js.map +7 -0
  10. package/dist/analyzers/cards/classify.js +42 -0
  11. package/dist/analyzers/cards/classify.js.map +7 -0
  12. package/dist/analyzers/cards/edge-index.js +44 -0
  13. package/dist/analyzers/cards/edge-index.js.map +7 -0
  14. package/dist/analyzers/cards/extract.js +138 -0
  15. package/dist/analyzers/cards/extract.js.map +7 -0
  16. package/dist/analyzers/cards/facts.js +46 -0
  17. package/dist/analyzers/cards/facts.js.map +7 -0
  18. package/dist/analyzers/cards/graph.js +42 -0
  19. package/dist/analyzers/cards/graph.js.map +7 -0
  20. package/dist/analyzers/cards/index.js +8 -0
  21. package/dist/analyzers/cards/index.js.map +7 -0
  22. package/dist/analyzers/cards/routes.js +96 -0
  23. package/dist/analyzers/cards/routes.js.map +7 -0
  24. package/dist/analyzers/cards/tier0.js +18 -0
  25. package/dist/analyzers/cards/tier0.js.map +7 -0
  26. package/dist/analyzers/cards/types.js +1 -0
  27. package/dist/analyzers/cards/types.js.map +7 -0
  28. package/dist/analyzers/cbm-analyzer.js +270 -174
  29. package/dist/analyzers/cbm-analyzer.js.map +2 -2
  30. package/dist/analyzers/cbm-responses.js +342 -0
  31. package/dist/analyzers/cbm-responses.js.map +7 -0
  32. package/dist/analyzers/code-changes.js +159 -0
  33. package/dist/analyzers/code-changes.js.map +7 -0
  34. package/dist/analyzers/edge-relationships.js +49 -0
  35. package/dist/analyzers/edge-relationships.js.map +7 -0
  36. package/dist/analyzers/extraction-plan.js +541 -0
  37. package/dist/analyzers/extraction-plan.js.map +7 -0
  38. package/dist/analyzers/index-job.js +229 -0
  39. package/dist/analyzers/index-job.js.map +7 -0
  40. package/dist/analyzers/mapping-loader.js +9 -0
  41. package/dist/analyzers/mapping-loader.js.map +2 -2
  42. package/dist/analyzers/tier0-rules.js +153 -0
  43. package/dist/analyzers/tier0-rules.js.map +7 -0
  44. package/dist/analyzers/types.js.map +1 -1
  45. package/dist/audit/relationships/ai/prompts.js +10 -10
  46. package/dist/audit/relationships/ai/prompts.js.map +2 -2
  47. package/dist/audit/relationships/analysis/layer-templates.js +52 -52
  48. package/dist/audit/relationships/analysis/layer-templates.js.map +1 -1
  49. package/dist/cli.js +23 -11
  50. package/dist/cli.js.map +2 -2
  51. package/dist/coding-agents/default-permissions.js +31 -1
  52. package/dist/coding-agents/default-permissions.js.map +2 -2
  53. package/dist/coding-agents/drbot-mcp.js +269 -0
  54. package/dist/coding-agents/drbot-mcp.js.map +7 -0
  55. package/dist/commands/add.js +7 -4
  56. package/dist/commands/add.js.map +2 -2
  57. package/dist/commands/analyzer.js +143 -40
  58. package/dist/commands/analyzer.js.map +2 -2
  59. package/dist/commands/changeset-verify.js +63 -0
  60. package/dist/commands/changeset-verify.js.map +7 -0
  61. package/dist/commands/changeset.js +80 -29
  62. package/dist/commands/changeset.js.map +2 -2
  63. package/dist/commands/delete.js +10 -4
  64. package/dist/commands/delete.js.map +2 -2
  65. package/dist/commands/farm.js +176 -60
  66. package/dist/commands/farm.js.map +2 -2
  67. package/dist/commands/init.js +9 -26
  68. package/dist/commands/init.js.map +2 -2
  69. package/dist/commands/mcp.js +40 -21
  70. package/dist/commands/mcp.js.map +3 -3
  71. package/dist/commands/relationship.js +208 -37
  72. package/dist/commands/relationship.js.map +2 -2
  73. package/dist/commands/reports.js +3 -3
  74. package/dist/commands/reports.js.map +2 -2
  75. package/dist/commands/update.js +52 -32
  76. package/dist/commands/update.js.map +2 -2
  77. package/dist/commands/upgrade.js +99 -103
  78. package/dist/commands/upgrade.js.map +3 -3
  79. package/dist/commands/validate.js +19 -3
  80. package/dist/commands/validate.js.map +2 -2
  81. package/dist/commands/version.js +1 -1
  82. package/dist/commands/visualize.js +34 -15
  83. package/dist/commands/visualize.js.map +2 -2
  84. package/dist/core/annotation-store.js +15 -5
  85. package/dist/core/annotation-store.js.map +2 -2
  86. package/dist/core/catalog-migration.js +34 -0
  87. package/dist/core/catalog-migration.js.map +7 -0
  88. package/dist/core/changeset-analysis.js +421 -0
  89. package/dist/core/changeset-analysis.js.map +7 -0
  90. package/dist/core/changeset-base-index.js +160 -0
  91. package/dist/core/changeset-base-index.js.map +7 -0
  92. package/dist/core/changeset-brief-compact.js +256 -0
  93. package/dist/core/changeset-brief-compact.js.map +7 -0
  94. package/dist/core/changeset-brief-delta.js +102 -0
  95. package/dist/core/changeset-brief-delta.js.map +7 -0
  96. package/dist/core/changeset-graph.js +281 -0
  97. package/dist/core/changeset-graph.js.map +7 -0
  98. package/dist/core/changeset-only-guard.js +32 -0
  99. package/dist/core/changeset-only-guard.js.map +7 -0
  100. package/dist/core/changeset-summary.js +68 -0
  101. package/dist/core/changeset-summary.js.map +7 -0
  102. package/dist/core/changeset-validator.js +66 -20
  103. package/dist/core/changeset-validator.js.map +2 -2
  104. package/dist/core/changeset-verify.js +848 -0
  105. package/dist/core/changeset-verify.js.map +7 -0
  106. package/dist/core/changeset.js +56 -9
  107. package/dist/core/changeset.js.map +2 -2
  108. package/dist/core/element-type-migration.js +145 -0
  109. package/dist/core/element-type-migration.js.map +7 -0
  110. package/dist/core/extraction-observability.js +161 -0
  111. package/dist/core/extraction-observability.js.map +7 -0
  112. package/dist/core/farm-manifest.js +12 -6
  113. package/dist/core/farm-manifest.js.map +2 -2
  114. package/dist/core/farm-sync-engine.js +1 -1
  115. package/dist/core/farm-sync-engine.js.map +2 -2
  116. package/dist/core/farm-sync-state.js +10 -2
  117. package/dist/core/farm-sync-state.js.map +2 -2
  118. package/dist/core/migration-registry.js +88 -47
  119. package/dist/core/migration-registry.js.map +2 -2
  120. package/dist/core/model-upgrade.js +102 -0
  121. package/dist/core/model-upgrade.js.map +7 -0
  122. package/dist/core/model.js +82 -30
  123. package/dist/core/model.js.map +2 -2
  124. package/dist/core/mutation-handler.js +71 -6
  125. package/dist/core/mutation-handler.js.map +2 -2
  126. package/dist/core/project-init.js +53 -0
  127. package/dist/core/project-init.js.map +7 -0
  128. package/dist/core/relationship-migration-table.js +6639 -0
  129. package/dist/core/relationship-migration-table.js.map +7 -0
  130. package/dist/core/relationship-migration.js +272 -0
  131. package/dist/core/relationship-migration.js.map +7 -0
  132. package/dist/core/relationship-prune.js +49 -0
  133. package/dist/core/relationship-prune.js.map +7 -0
  134. package/dist/core/relationship-staging.js +161 -0
  135. package/dist/core/relationship-staging.js.map +7 -0
  136. package/dist/core/relationships.js +26 -4
  137. package/dist/core/relationships.js.map +2 -2
  138. package/dist/core/report-data-model.js +7 -13
  139. package/dist/core/report-data-model.js.map +2 -2
  140. package/dist/core/staged-changeset-storage.js +145 -18
  141. package/dist/core/staged-changeset-storage.js.map +2 -2
  142. package/dist/core/staged-source-reference.js +28 -0
  143. package/dist/core/staged-source-reference.js.map +7 -0
  144. package/dist/core/staging-area.js +166 -24
  145. package/dist/core/staging-area.js.map +2 -2
  146. package/dist/core/upgrade-plan.js +117 -0
  147. package/dist/core/upgrade-plan.js.map +7 -0
  148. package/dist/core/virtual-projection.js +13 -5
  149. package/dist/core/virtual-projection.js.map +2 -2
  150. package/dist/export/archimate-exporter.js +1 -0
  151. package/dist/export/archimate-exporter.js.map +2 -2
  152. package/dist/generated/compiled-validators.js +2 -2
  153. package/dist/generated/compiled-validators.js.map +2 -2
  154. package/dist/generated/layer-registry.js +16 -16
  155. package/dist/generated/layer-registry.js.map +2 -2
  156. package/dist/generated/node-types.js +186 -168
  157. package/dist/generated/node-types.js.map +2 -2
  158. package/dist/generated/relationship-index.js +2468 -7913
  159. package/dist/generated/relationship-index.js.map +2 -2
  160. package/dist/integrations/claude_code/.claude-plugin/plugin.json +24 -0
  161. package/dist/integrations/claude_code/agents/dr-architect.md +30 -3
  162. package/dist/integrations/claude_code/agents/dr-extractor.md +8 -2
  163. package/dist/integrations/claude_code/commands/dr-analyzer.md +565 -0
  164. package/dist/integrations/claude_code/commands/dr-changeset.md +2 -1
  165. package/dist/integrations/claude_code/commands/dr-map.md +20 -1
  166. package/dist/integrations/claude_code/commands/dr-plan.md +66 -0
  167. package/dist/integrations/claude_code/commands/dr-relate.md +106 -96
  168. package/dist/integrations/claude_code/commands/dr-verify.md +45 -2
  169. package/dist/integrations/claude_code/docs/END_TO_END_WALKTHROUGH.md +14 -0
  170. package/dist/integrations/claude_code/docs/MCP_SERVER.md +47 -26
  171. package/dist/integrations/claude_code/docs/QUICK_START.md +37 -8
  172. package/dist/integrations/claude_code/docs/README.md +68 -2
  173. package/dist/integrations/claude_code/plugin-agents/dr-advisor.md +255 -0
  174. package/dist/integrations/claude_code/plugin-agents/dr-architect.md +306 -0
  175. package/dist/integrations/claude_code/skills/dr_01_motivation_layer/SKILL.md +93 -72
  176. package/dist/integrations/claude_code/skills/dr_02_business_layer/SKILL.md +163 -126
  177. package/dist/integrations/claude_code/skills/dr_03_product_layer/SKILL.md +161 -126
  178. package/dist/integrations/claude_code/skills/dr_04_security_layer/SKILL.md +153 -133
  179. package/dist/integrations/claude_code/skills/dr_05_application_layer/SKILL.md +129 -100
  180. package/dist/integrations/claude_code/skills/dr_06_technology_layer/SKILL.md +111 -94
  181. package/dist/integrations/claude_code/skills/dr_07_api_layer/SKILL.md +143 -157
  182. package/dist/integrations/claude_code/skills/dr_08_data_model_layer/SKILL.md +117 -33
  183. package/dist/integrations/claude_code/skills/dr_09_dataset_layer/SKILL.md +74 -25
  184. package/dist/integrations/claude_code/skills/dr_10_ux_layer/SKILL.md +88 -12
  185. package/dist/integrations/claude_code/skills/dr_11_navigation_layer/SKILL.md +83 -24
  186. package/dist/integrations/claude_code/skills/dr_12_apm_layer/SKILL.md +57 -12
  187. package/dist/integrations/claude_code/skills/dr_13_testing_layer/SKILL.md +95 -15
  188. package/dist/integrations/claude_code/skills/dr_change_planning/SKILL.md +178 -0
  189. package/dist/integrations/claude_code/skills/dr_changeset_reviewer/SKILL.md +8 -0
  190. package/dist/integrations/claude_code/skills/dr_engineering_guide/SKILL.md +6 -1
  191. package/dist/integrations/github_copilot/agents/dr-architect.md +3 -1
  192. package/dist/integrations/github_copilot/skills/dr_01_motivation_layer/SKILL.md +182 -102
  193. package/dist/integrations/github_copilot/skills/dr_02_business_layer/SKILL.md +266 -148
  194. package/dist/integrations/github_copilot/skills/dr_03_product_layer/SKILL.md +547 -86
  195. package/dist/integrations/github_copilot/skills/dr_04_security_layer/SKILL.md +164 -169
  196. package/dist/integrations/github_copilot/skills/dr_05_application_layer/SKILL.md +420 -150
  197. package/dist/integrations/github_copilot/skills/dr_06_technology_layer/SKILL.md +331 -138
  198. package/dist/integrations/github_copilot/skills/dr_07_api_layer/SKILL.md +265 -201
  199. package/dist/integrations/github_copilot/skills/dr_08_data_model_layer/SKILL.md +181 -58
  200. package/dist/integrations/github_copilot/skills/dr_09_dataset_layer/SKILL.md +209 -57
  201. package/dist/integrations/github_copilot/skills/dr_10_ux_layer/SKILL.md +277 -112
  202. package/dist/integrations/github_copilot/skills/dr_11_navigation_layer/SKILL.md +219 -70
  203. package/dist/integrations/github_copilot/skills/dr_12_apm_layer/SKILL.md +189 -105
  204. package/dist/integrations/github_copilot/skills/dr_13_testing_layer/SKILL.md +225 -102
  205. package/dist/integrations/github_copilot/skills/dr_change_planning/SKILL.md +177 -0
  206. package/dist/integrations/github_copilot/skills/dr_changeset_reviewer/SKILL.md +3 -0
  207. package/dist/integrations/hash-utils.js.map +2 -2
  208. package/dist/mcp/api-key-manager.js +14 -1
  209. package/dist/mcp/api-key-manager.js.map +2 -2
  210. package/dist/mcp/changeset-only.js +45 -0
  211. package/dist/mcp/changeset-only.js.map +7 -0
  212. package/dist/mcp/project-root.js +85 -0
  213. package/dist/mcp/project-root.js.map +7 -0
  214. package/dist/mcp/server-instructions.js +27 -0
  215. package/dist/mcp/server-instructions.js.map +7 -0
  216. package/dist/mcp/strict-schema.js +52 -0
  217. package/dist/mcp/strict-schema.js.map +7 -0
  218. package/dist/mcp/tool-registry.js +55 -5
  219. package/dist/mcp/tool-registry.js.map +2 -2
  220. package/dist/mcp/tools/changeset-analysis-tools.js +98 -0
  221. package/dist/mcp/tools/changeset-analysis-tools.js.map +7 -0
  222. package/dist/mcp/tools/changeset-commit.js +224 -0
  223. package/dist/mcp/tools/changeset-commit.js.map +7 -0
  224. package/dist/mcp/tools/changeset-editing.js +260 -0
  225. package/dist/mcp/tools/changeset-editing.js.map +7 -0
  226. package/dist/mcp/tools/changeset-lifecycle.js +83 -0
  227. package/dist/mcp/tools/changeset-lifecycle.js.map +7 -0
  228. package/dist/mcp/tools/changeset-shared.js +31 -0
  229. package/dist/mcp/tools/changeset-shared.js.map +7 -0
  230. package/dist/mcp/tools/changeset-show.js +17 -1
  231. package/dist/mcp/tools/changeset-show.js.map +2 -2
  232. package/dist/mcp/tools/changeset-verify.js +49 -0
  233. package/dist/mcp/tools/changeset-verify.js.map +7 -0
  234. package/dist/mcp/tools/codebase-extract.js +836 -0
  235. package/dist/mcp/tools/codebase-extract.js.map +7 -0
  236. package/dist/mcp/tools/codebase-index.js +125 -0
  237. package/dist/mcp/tools/codebase-index.js.map +7 -0
  238. package/dist/mcp/tools/codebase-shared.js +265 -0
  239. package/dist/mcp/tools/codebase-shared.js.map +7 -0
  240. package/dist/mcp/tools/codebase-verify.js +48 -0
  241. package/dist/mcp/tools/codebase-verify.js.map +7 -0
  242. package/dist/mcp/tools/index.js +34 -1
  243. package/dist/mcp/tools/index.js.map +2 -2
  244. package/dist/mcp/tools/model-add.js +191 -74
  245. package/dist/mcp/tools/model-add.js.map +2 -2
  246. package/dist/mcp/tools/model-delete.js +2 -2
  247. package/dist/mcp/tools/model-delete.js.map +2 -2
  248. package/dist/mcp/tools/model-search.js +14 -0
  249. package/dist/mcp/tools/model-search.js.map +2 -2
  250. package/dist/mcp/tools/model-show.js +29 -2
  251. package/dist/mcp/tools/model-show.js.map +2 -2
  252. package/dist/mcp/tools/model-trace.js +93 -30
  253. package/dist/mcp/tools/model-trace.js.map +2 -2
  254. package/dist/mcp/tools/model-update.js +46 -26
  255. package/dist/mcp/tools/model-update.js.map +2 -2
  256. package/dist/mcp/tools/model-validate.js +46 -4
  257. package/dist/mcp/tools/model-validate.js.map +2 -2
  258. package/dist/mcp/tools/project-status-collectors.js +381 -0
  259. package/dist/mcp/tools/project-status-collectors.js.map +7 -0
  260. package/dist/mcp/tools/project-status.js +237 -0
  261. package/dist/mcp/tools/project-status.js.map +7 -0
  262. package/dist/mcp/tools/project-tools.js +505 -0
  263. package/dist/mcp/tools/project-tools.js.map +7 -0
  264. package/dist/mcp/tools/relationship-tools.js +167 -0
  265. package/dist/mcp/tools/relationship-tools.js.map +7 -0
  266. package/dist/mcp/tools/review-open.js +210 -0
  267. package/dist/mcp/tools/review-open.js.map +7 -0
  268. package/dist/mcp/tools/shared.js +35 -4
  269. package/dist/mcp/tools/shared.js.map +2 -2
  270. package/dist/mcp/tools/spec-type.js +90 -0
  271. package/dist/mcp/tools/spec-type.js.map +7 -0
  272. package/dist/reports/model-report-orchestrator.js +31 -2
  273. package/dist/reports/model-report-orchestrator.js.map +2 -2
  274. package/dist/schemas/bundled/analyzers/cbm.json +1200 -70
  275. package/dist/schemas/bundled/analyzers/manifest.json +2 -2
  276. package/dist/schemas/bundled/api.json +1029 -1658
  277. package/dist/schemas/bundled/apm.json +499 -734
  278. package/dist/schemas/bundled/application.json +735 -371
  279. package/dist/schemas/bundled/base.json +3 -220
  280. package/dist/schemas/bundled/business.json +452 -366
  281. package/dist/schemas/bundled/data-model.json +395 -411
  282. package/dist/schemas/bundled/data-store.json +334 -558
  283. package/dist/schemas/bundled/manifest.json +18 -18
  284. package/dist/schemas/bundled/motivation.json +349 -368
  285. package/dist/schemas/bundled/navigation.json +415 -731
  286. package/dist/schemas/bundled/product.json +325 -159
  287. package/dist/schemas/bundled/security.json +864 -1232
  288. package/dist/schemas/bundled/technology.json +574 -703
  289. package/dist/schemas/bundled/testing.json +865 -1646
  290. package/dist/schemas/bundled/ux.json +739 -1352
  291. package/dist/server/schemas.js +8 -0
  292. package/dist/server/schemas.js.map +2 -2
  293. package/dist/server/server.js +686 -231
  294. package/dist/server/server.js.map +3 -3
  295. package/dist/server/viewer-registry.js +264 -0
  296. package/dist/server/viewer-registry.js.map +7 -0
  297. package/dist/server-entry.js +2 -1
  298. package/dist/server-entry.js.map +2 -2
  299. package/dist/telemetry/index.js +1 -1
  300. package/dist/utils/ansi-suppressor.js +6 -8
  301. package/dist/utils/ansi-suppressor.js.map +2 -2
  302. package/dist/utils/attribute-patch.js +41 -0
  303. package/dist/utils/attribute-patch.js.map +7 -0
  304. package/dist/utils/error-hints.js +29 -0
  305. package/dist/utils/error-hints.js.map +7 -0
  306. package/dist/utils/errors.js +9 -3
  307. package/dist/utils/errors.js.map +2 -2
  308. package/dist/utils/id-generator.js +5 -2
  309. package/dist/utils/id-generator.js.map +2 -2
  310. package/dist/utils/project-paths.js +26 -1
  311. package/dist/utils/project-paths.js.map +2 -2
  312. package/dist/utils/source-reference.js +64 -31
  313. package/dist/utils/source-reference.js.map +2 -2
  314. package/dist/utils/spec-version.js +2 -2
  315. package/dist/utils/spec-version.js.map +1 -1
  316. package/dist/validators/composed-reference-validator.js +5 -27
  317. package/dist/validators/composed-reference-validator.js.map +2 -2
  318. package/dist/validators/model-warnings.js +28 -0
  319. package/dist/validators/model-warnings.js.map +7 -0
  320. package/dist/validators/reference-validator.js +0 -7
  321. package/dist/validators/reference-validator.js.map +2 -2
  322. package/dist/validators/relationship-schema-validator.js +3 -3
  323. package/dist/validators/relationship-schema-validator.js.map +2 -2
  324. package/dist/validators/schema-validator.js +27 -9
  325. package/dist/validators/schema-validator.js.map +2 -2
  326. package/dist/validators/types.js.map +1 -1
  327. package/dist/viewer/README.md +6 -6
  328. package/dist/viewer/assets/main-CUOQGGRA.css +1 -0
  329. package/dist/viewer/assets/main-DvH3gYrI.js +84 -0
  330. package/dist/viewer/index.html +2 -2
  331. package/dist/viewer/manifest.json +10 -10
  332. package/dist/viewer/version.json +1 -1
  333. package/package.json +2 -1
  334. package/dist/viewer/assets/main-B7AOQXXX.js +0 -81
  335. package/dist/viewer/assets/main-vdrFrG7q.css +0 -1
@@ -14,13 +14,13 @@ triggers:
14
14
  "motivation",
15
15
  "archimate motivation"
16
16
  ]
17
- version: 0.8.1
17
+ version: 0.8.3
18
18
  ---
19
19
 
20
20
  # Motivation Layer Skill
21
21
 
22
22
  **Layer Number:** 01
23
- **Specification:** Metadata Model Spec v0.8.1
23
+ **Specification:** Metadata Model Spec v0.8.3
24
24
  **Purpose:** Captures stakeholder concerns, goals, requirements, and constraints that drive architectural decisions using ArchiMate motivation elements.
25
25
 
26
26
  ---
@@ -58,66 +58,137 @@ This layer uses **ArchiMate 3.2 Motivation Layer** standard without custom exten
58
58
 
59
59
  ---
60
60
 
61
- ## Intra-Layer Relationships
61
+ ## Type Decision Tree
62
+
63
+ Use this decision tree **before assigning a type** to any motivation concept.
64
+
65
+ ```
66
+ IS this an individual, team, or organization with an interest in the system or its outcomes?
67
+ → motivation.stakeholder
68
+
69
+ IS this an external or internal condition (market, regulatory, technology, competitive, operational,
70
+ strategic) that motivates the organization to change or act?
71
+ → motivation.driver
72
+
73
+ IS this the result of analyzing the current state — a strength, weakness, opportunity, threat, risk,
74
+ or gap identified through assessment (e.g., SWOT)?
75
+ → motivation.assessment
76
+
77
+ IS this a high-level statement of intent, direction, or desired end state the organization wants to achieve?
78
+ → motivation.goal
62
79
 
63
- ### Structural Relationships
64
-
65
- | Source Type | Predicate | Target Type | Example |
66
- | ----------- | ----------- | ----------- | ------------------------------------------------------------ |
67
- | Goal | aggregates | Goal | Strategic Goal aggregates Operational Goals |
68
- | Requirement | aggregates | Requirement | Business Requirement aggregates Functional Requirements |
69
- | Principle | aggregates | Principle | Enterprise Principles aggregate Domain Principles |
70
- | Constraint | aggregates | Constraint | Budget Constraint aggregates Project Budget Constraints |
71
- | Outcome | realizes | Goal | "Launched Mobile App" realizes "Launch Mobile App by Q4" |
72
- | Goal | realizes | Value | "Improve Customer Satisfaction" realizes "Customer Value" |
73
- | Requirement | realizes | Goal | Functional Requirements realize Business Goals |
74
- | Requirement | realizes | Principle | Technical Requirements realize Security Principles |
75
- | Constraint | realizes | Principle | Technology Constraints realize Technology Principles |
76
- | Goal | specializes | Goal | "Reduce API Latency" specializes "Improve Performance" |
77
- | Requirement | specializes | Requirement | "95% Uptime SLA" specializes "High Availability Requirement" |
78
- | Principle | specializes | Principle | "Encrypt All PII" specializes "Data Security Principle" |
79
- | Value | specializes | Value | "Customer Retention Value" specializes "Customer Value" |
80
-
81
- ### Behavioral Relationships
82
-
83
- | Source Type | Predicate | Target Type | Example |
84
- | ----------- | --------------- | ----------- | ----------------------------------------------------------------------- |
85
- | Driver | influences | Goal | "Digital Transformation" influences "Modernize Architecture" |
86
- | Driver | influences | Requirement | "GDPR Compliance" influences "Data Protection Requirements" |
87
- | Driver | influences | Principle | "Cloud-First Strategy" influences "Cloud-Native Principles" |
88
- | Assessment | influences | Goal | "Legacy System Weakness" influences "Modernization Goal" |
89
- | Goal | influences | Requirement | Business Goals influence Functional Requirements |
90
- | Principle | influences | Requirement | Security Principles influence Technical Requirements |
91
- | Principle | influences | Constraint | "API-First Principle" influences "RESTful API Constraint" |
92
- | Constraint | influences | Requirement | Budget Constraints influence Implementation Requirements |
93
- | Value | influences | Goal | "Customer Value" influences "Improve UX Goal" |
94
- | Stakeholder | influences | Goal | "CEO" influences Strategic Goals |
95
- | Stakeholder | influences | Requirement | "End Users" influence Functional Requirements |
96
- | Stakeholder | influences | Value | "Shareholders" influence Financial Value |
97
- | Stakeholder | associated-with | Driver | "Product Manager" associated with "Market Competition Driver" |
98
- | Goal | associated-with | Outcome | "Improve Performance" associated with "Achieved 50ms Latency" |
99
- | Requirement | associated-with | Outcome | "High Availability Requirement" associated with "99.99% Uptime Outcome" |
100
- | Driver | associated-with | Assessment | "Market Driver" associated with "Competitive Threat Assessment" |
101
- | Value | associated-with | Meaning | "Customer Value" associated with "Definition of Customer Success" |
80
+ IS this a specific, verifiable statement of need that must be realized (functional, non-functional,
81
+ compliance, business, technical, or user need)?
82
+ → motivation.requirement
83
+
84
+ IS this a normative rule or guideline that all systems in this context must follow
85
+ (business, data, application, technology, security, integration)?
86
+ → motivation.principle
87
+
88
+ IS this a hard restriction on HOW the system can be realized — a limit the system cannot exceed
89
+ (budget, time, technology, regulatory, organizational, resource)?
90
+ → motivation.constraint
91
+
92
+ IS this an end result that has been or is being achieved — tracked against a goal?
93
+ → motivation.outcome
94
+
95
+ IS this the relative worth, utility, or importance that the system or feature delivers?
96
+ → motivation.value
97
+
98
+ IS this a semantic definition, interpretation, or piece of knowledge attached to another element?
99
+ → motivation.meaning
100
+ ```
101
+
102
+ **Key distinctions:**
103
+
104
+ - **Goal vs Requirement**: A Goal is aspirational ("improve performance"); a Requirement is a verifiable must ("API must respond in <200ms")
105
+ - **Requirement vs Constraint**: A Requirement says WHAT must be done; a Constraint says HOW it is bounded ("must use OAuth 2.0" limits the solution space)
106
+ - **Driver vs Assessment**: A Driver is an ongoing force motivating action; an Assessment is a point-in-time finding about the current state
107
+ - **Outcome vs Goal**: A Goal is what you intend to achieve; an Outcome is what has been (or is being) achieved
102
108
 
103
109
  ---
104
110
 
105
- ## Cross-Layer References
111
+ ## Intra-Layer Relationships
106
112
 
107
- **Motivation Layer is the highest layer** - It does **NOT reference any lower layers**. Instead, lower layers reference UP to this layer for governance.
113
+ Note that the ArchiMate influence predicate is spelled `influence` (not `influences`).
114
+
115
+ ### Realization and Decomposition
116
+
117
+ Requirements realize the outcomes, goals and principles they make concrete, and outcomes realize
118
+ goals. Decomposition is same-type only: `aggregates` for parts, `specializes` for variants.
119
+
120
+ | Source Type | Predicate | Target Type | Example |
121
+ | ----------- | ----------- | ----------- | ------------------------------------------------------------------- |
122
+ | Requirement | realizes | Goal | "API must respond in <200ms" realizes "Improve Performance" |
123
+ | Requirement | realizes | Outcome | "99.99% availability" realizes "Downtime Under 1h per Quarter" |
124
+ | Requirement | realizes | Principle | "Orders API uses OAuth 2.0" realizes "Security by Design" |
125
+ | Outcome | realizes | Goal | "Churn Reduced 10%" realizes "Improve Customer Satisfaction" |
126
+ | Goal | aggregates | Goal | "Improve Customer Satisfaction" aggregates "Reduce Response Time" |
127
+ | Requirement | aggregates | Requirement | "Secure User Data" requirement aggregates "Encrypt Data in Transit" |
128
+ | Outcome | aggregates | Outcome | "Global NPS 50" aggregates "EU NPS 50" |
129
+ | Stakeholder | aggregates | Stakeholder | "Finance" aggregates "Accounts Payable Team" |
130
+ | Value | aggregates | Value | "Lower Total Cost" aggregates "Lower Licence Cost" |
131
+ | Goal | specializes | Goal | "Reduce API Latency" specializes "Improve Performance" |
132
+ | Requirement | specializes | Requirement | "99.95% Uptime SLA" specializes "High Availability Requirement" |
133
+ | Constraint | specializes | Constraint | "EU-only Data Residency" specializes "Data Residency Constraint" |
134
+ | Constraint | constrains | Requirement | "Must use OAuth 2.0" constrains "User Authentication" |
135
+
136
+ ### Influence and Association Relationships
137
+
138
+ `influence` is one motivation element shaping another. `associated-with` is kept for concerns
139
+ (stakeholders, assessments evaluating drivers) and interpretation: meaning and value are associated
140
+ with any concept and are always the source.
141
+
142
+ | Source Type | Predicate | Target Type | Example |
143
+ | ----------- | --------------- | ----------- | --------------------------------------------------------------------- |
144
+ | Stakeholder | influence | Goal | "CEO" influences "Reduce Operating Costs by 20%" |
145
+ | Driver | influence | Goal | "Digital Transformation" influences "Modernize Architecture" |
146
+ | Driver | influence | Requirement | "GDPR Regulation" influences "Right to Deletion" |
147
+ | Driver | influence | Principle | "Cloud-First Strategy" influences "Cloud-Native Architecture" |
148
+ | Driver | influence | Constraint | "GDPR Regulation" influences "EU-only Data Residency" |
149
+ | Assessment | influence | Goal | "Legacy System Debt" influences "Modernize Architecture" |
150
+ | Assessment | influence | Requirement | "Slow Checkout Weakness" influences "Checkout must complete in <2s" |
151
+ | Assessment | influence | Outcome | "Checkout p95 is 4s" influences "Checkout p95 Under 2s by Q3" |
152
+ | Goal | influence | Requirement | "Improve Security" influences "Enforce MFA for Admins" |
153
+ | Goal | influence | Principle | "Modernize Architecture" influences "Cloud-Native Architecture" |
154
+ | Principle | influence | Requirement | "API-First Design" influences "Every Feature Exposes an API" |
155
+ | Constraint | influence | Goal | "Fixed Q4 Budget" influences "Launch Mobile App by Q4" |
156
+ | Stakeholder | associated-with | Driver | "Head of Compliance" associated with "GDPR Regulation" |
157
+ | Stakeholder | associated-with | Requirement | "End Users" associated with "Offline Mode Support" |
158
+ | Assessment | associated-with | Driver | "GDPR Gap Analysis" associated with "GDPR Regulation" |
159
+ | Value | associated-with | Stakeholder | "Customer Loyalty" associated with "Customers" |
160
+ | Value | associated-with | Goal | "Customer Loyalty" associated with "Improve Customer Satisfaction" |
161
+ | Value | associated-with | Driver | "Faster Time to Market" associated with "Market Competition" |
162
+ | Meaning | associated-with | Value | "Definition of Customer Success" associated with "Customer Loyalty" |
163
+ | Meaning | associated-with | Requirement | "Definition of Session" associated with "Sessions Expire After 15min" |
108
164
 
109
- ### Incoming References (Lower Layers → Motivation)
165
+ ---
110
166
 
111
- | Layer | References Motivation For |
112
- | ------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
113
- | **Layer 2 (Business)** | BusinessService delivers Value, supports Goals, governed by Principles; BusinessActor is Stakeholder; Contract drives Constraints |
114
- | **Layer 3 (Security)** | Actor references Stakeholder; ActorObjective references Goal; Threat references Assessment; Countermeasure implements Requirement |
115
- | **Layer 4 (Application)** | ApplicationService supports Goals, delivers Value, governed by Principles; ApplicationFunction fulfills Requirements |
116
- | **Layer 5 (Technology)** | TechnologyService supports Goals, governed by Principles; Node fulfills Requirements, constrained by Constraints |
117
- | **Layer 6 (API)** | Operation supports Goals (x-supports-goals), fulfills Requirements, governed by Principles, constrained by Constraints |
118
- | **Layer 7-13** | All layers can reference Principles, Constraints, Requirements, Goals for governance and traceability |
167
+ ## Cross-Layer References
119
168
 
120
- **Design Pattern:** Lower layers "look up" to the Motivation layer to justify WHY they exist and WHAT value they deliver.
169
+ **Motivation Layer is the root of traceability.** The catalog defines no outgoing references from Motivation; elements in other layers point to motivation elements to justify WHY they exist and WHAT value they deliver.
170
+
171
+ ### Incoming References (Other Layers → Motivation)
172
+
173
+ | Source Type | Predicate | Target Type | Example |
174
+ | --------------------------------- | ---------------- | ----------- | ------------------------------------------------------------------- |
175
+ | `business.businessservice` | realizes | Goal | "Online Ordering" realizes "Grow Digital Revenue" |
176
+ | `business.businessservice` | delivers | Value | "Same-Day Delivery" delivers "Customer Convenience" |
177
+ | `business.businessprocess` | satisfies | Requirement | "Refund Processing" satisfies "Refunds Issued Within 5 Days" |
178
+ | `business.businessactor` | references | Stakeholder | "Customer" actor references "Customers" stakeholder |
179
+ | `product.softwarecapability` | supports | Goal | "Self-Service Returns" supports "Reduce Support Costs" |
180
+ | `product.feature` | satisfies | Requirement | "Two-Factor Login" satisfies "Enforce MFA for Admins" |
181
+ | `product.persona` | references | Stakeholder | "Busy Parent Persona" references "Retail Customers" |
182
+ | `product.userworkflow` | delivers | Outcome | "Checkout Flow" delivers "Cart Abandonment Reduced 15%" |
183
+ | `security.securitypolicy` | satisfies | Principle | "Encryption Policy" satisfies "Security by Design" |
184
+ | `security.countermeasure` | satisfies | Requirement | "Rate Limiting" satisfies "Prevent Credential Stuffing" |
185
+ | `application.applicationservice` | realizes | Goal | "Recommendation Service" realizes "Increase Average Order Value" |
186
+ | `application.applicationfunction` | satisfies | Requirement | "Audit Logging" satisfies "Log All Admin Actions" |
187
+ | `technology.systemsoftware` | satisfies | Constraint | "PostgreSQL 15" satisfies "Approved Open-Source Databases Only" |
188
+ | `api.operation` | satisfies | Requirement | "POST /orders" satisfies "Orders Accepted via Public API" |
189
+ | `data-store.retentionpolicy` | satisfies | Constraint | "Purge PII After 30 Days" satisfies "GDPR Data Minimization" |
190
+ | `apm.metricinstrument` | measures-outcome | Outcome | "checkout.duration" metric measures "Checkout Under 2s Outcome" |
191
+ | `testing.testcoveragemodel` | satisfies | Requirement | "Checkout Coverage Model" satisfies "Checkout must complete in <2s" |
121
192
 
122
193
  ---
123
194
 
@@ -203,6 +274,26 @@ TARGET_UPTIME_SLA = 0.9999
203
274
 
204
275
  ---
205
276
 
277
+ ## Coverage Completeness Checklist
278
+
279
+ Before declaring motivation layer extraction complete, verify each type was considered:
280
+
281
+ - [ ] **stakeholder** — All individuals, teams, and organizations with interests in the system are documented
282
+ - [ ] **driver** — External and internal forces motivating architectural decisions are captured
283
+ - [ ] **assessment** — SWOT-style findings (strengths, weaknesses, opportunities, threats, risks, gaps) are recorded
284
+ - [ ] **goal** — High-level intentions and desired end states are defined with priority
285
+ - [ ] **requirement** — Specific needs that must be realized are documented (functional, non-functional, compliance, etc.)
286
+ - [ ] **principle** — Normative guidelines governing all system implementations are listed
287
+ - [ ] **constraint** — Hard limits and restrictions on system realization are documented
288
+ - [ ] **outcome** — Achieved or tracked results linked to goals are recorded
289
+ - [ ] **value** — The worth and utility delivered by the system or feature is articulated
290
+ - [ ] **meaning** — Semantic definitions or knowledge interpretations are captured where elements need clarification
291
+
292
+ If any type has ZERO elements, explicitly decide:
293
+ "This type doesn't apply to this codebase" with reasoning.
294
+
295
+ ---
296
+
206
297
  ## Modeling Workflow
207
298
 
208
299
  ### Step 1: Identify Stakeholders
@@ -212,15 +303,12 @@ Start by documenting **WHO cares** about the system:
212
303
  ```bash
213
304
  # Add key stakeholders
214
305
  dr add motivation stakeholder "End Users" \
215
- --properties type=external \
216
306
  --description "Customers using the platform"
217
307
 
218
308
  dr add motivation stakeholder "Product Manager" \
219
- --properties type=internal \
220
309
  --description "Defines product vision and priorities"
221
310
 
222
311
  dr add motivation stakeholder "Compliance Team" \
223
- --properties type=internal \
224
312
  --description "Ensures regulatory compliance"
225
313
  ```
226
314
 
@@ -231,16 +319,13 @@ Identify **WHAT is pushing** the organization:
231
319
  ```bash
232
320
  # Market driver
233
321
  dr add motivation driver "Cloud Migration Pressure" \
234
- --properties category=market \
235
322
  --description "Industry shift to cloud-native architectures"
236
323
 
237
324
  # SWOT assessment
238
325
  dr add motivation assessment "Legacy System Debt" \
239
- --properties assessmentType=weakness \
240
326
  --description "Monolithic architecture limits agility"
241
327
 
242
328
  dr add motivation assessment "Strong Engineering Team" \
243
- --properties assessmentType=strength \
244
329
  --description "Experienced team with cloud expertise"
245
330
  ```
246
331
 
@@ -251,12 +336,10 @@ Articulate **WHAT we want to achieve**:
251
336
  ```bash
252
337
  # Strategic goal
253
338
  dr add motivation goal "Modernize Architecture" \
254
- --properties priority=critical,measurable=true,target-date=2024-12-31 \
255
339
  --description "Migrate to microservices architecture"
256
340
 
257
341
  # Value delivered
258
342
  dr add motivation value "Operational Efficiency" \
259
- --properties type=operational \
260
343
  --description "Reduced deployment time and increased reliability"
261
344
  ```
262
345
 
@@ -267,17 +350,14 @@ Define **HOW we will operate**:
267
350
  ```bash
268
351
  # Functional requirement
269
352
  dr add motivation requirement "API Authentication" \
270
- --properties type=functional \
271
353
  --description "All API endpoints must authenticate users"
272
354
 
273
355
  # Guiding principle
274
356
  dr add motivation principle "API-First Design" \
275
- --properties category=application \
276
357
  --description "All services expose RESTful APIs with OpenAPI specs"
277
358
 
278
359
  # Hard constraint
279
360
  dr add motivation constraint "AWS-Only Infrastructure" \
280
- --properties type=technology \
281
361
  --description "All services must deploy to AWS (no multi-cloud)"
282
362
  ```
283
363
 
@@ -287,31 +367,31 @@ Connect motivation elements using predicates:
287
367
 
288
368
  ```bash
289
369
  # Driver influences Goal
290
- dr relationship add "motivation/driver/cloud-migration-pressure" \
291
- influences "motivation/goal/modernize-architecture"
370
+ dr relationship add motivation.driver.cloud-migration-pressure \
371
+ motivation.goal.modernize-architecture --predicate influence
292
372
 
293
- # Goal realizes Value
294
- dr relationship add "motivation/goal/modernize-architecture" \
295
- realizes "motivation/value/operational-efficiency"
373
+ # Value associated with Goal (meaning and value are the source)
374
+ dr relationship add motivation.value.operational-efficiency \
375
+ motivation.goal.modernize-architecture --predicate associated-with
296
376
 
297
377
  # Principle influences Requirement
298
- dr relationship add "motivation/principle/api-first-design" \
299
- influences "motivation/requirement/api-authentication"
378
+ dr relationship add motivation.principle.api-first-design \
379
+ motivation.requirement.api-authentication --predicate influence
300
380
 
301
381
  # Stakeholder influences Goal
302
- dr relationship add "motivation/stakeholder/product-manager" \
303
- influences "motivation/goal/modernize-architecture"
382
+ dr relationship add motivation.stakeholder.product-manager \
383
+ motivation.goal.modernize-architecture --predicate influence
304
384
 
305
385
  # Assessment influences Goal
306
- dr relationship add "motivation/assessment/legacy-system-debt" \
307
- influences "motivation/goal/modernize-architecture"
386
+ dr relationship add motivation.assessment.legacy-system-debt \
387
+ motivation.goal.modernize-architecture --predicate influence
308
388
  ```
309
389
 
310
390
  ### Step 6: Validate
311
391
 
312
392
  ```bash
313
- dr validate --layer motivation
314
- dr validate --validate-relationships
393
+ dr validate --layers motivation
394
+ dr validate --relationships
315
395
  ```
316
396
 
317
397
  ---
@@ -335,30 +415,29 @@ Strategic Goal: "Improve Customer Satisfaction"
335
415
  ```
336
416
  Business Requirement: "Secure User Data"
337
417
  ├── aggregates → Functional Requirement: "Encrypt Data at Rest"
338
- │ └── influences → Technical Requirement: "Use AES-256 Encryption"
418
+ │ └── aggregates → Technical Requirement: "Use AES-256 Encryption"
339
419
  ├── aggregates → Functional Requirement: "Encrypt Data in Transit"
340
- │ └── influences → Technical Requirement: "Use TLS 1.3"
420
+ │ └── aggregates → Technical Requirement: "Use TLS 1.3"
341
421
  └── aggregates → Compliance Requirement: "GDPR Data Protection"
342
- └── influences → Technical Requirement: "Right to Deletion API"
422
+ └── aggregates → Technical Requirement: "Right to Deletion API"
343
423
  ```
344
424
 
345
425
  ### Pattern 3: Principle Application
346
426
 
347
427
  ```
348
428
  Principle: "Cloud-Native Architecture"
349
- ├── influences → Requirement: "Containerized Deployments"
350
- ├── influences → Requirement: "Stateless Services"
351
- ├── influences → Constraint: "No On-Premise Infrastructure"
352
- └── realizes → Value: "Scalability and Resilience"
429
+ ├── influence → Requirement: "Containerized Deployments"
430
+ ├── influence → Requirement: "Stateless Services"
431
+ └── associated-with → Value: "Scalability and Resilience"
353
432
  ```
354
433
 
355
434
  ### Pattern 4: Stakeholder → Goal → Implementation Chain
356
435
 
357
436
  ```
358
437
  Stakeholder: "CEO"
359
- └── influences → Goal: "Reduce Operating Costs by 20%"
360
- ├── influences → Requirement: "Automated CI/CD Pipeline"
361
- ├── influences → Principle: "Infrastructure as Code"
438
+ └── influence → Goal: "Reduce Operating Costs by 20%"
439
+ ├── influence → Requirement: "Automated CI/CD Pipeline"
440
+ ├── influence → Principle: "Infrastructure as Code"
362
441
  └── realizes → Value: "Financial Efficiency"
363
442
  └── (lower layers reference this chain)
364
443
  ```
@@ -410,7 +489,7 @@ Stakeholder: "CEO"
410
489
  When exporting to ArchiMate format:
411
490
 
412
491
  ```bash
413
- dr export archimate --layer motivation --output motivation.archimate
492
+ dr export archimate --layers motivation --output motivation.archimate
414
493
  ```
415
494
 
416
495
  **Supported ArchiMate Elements:**
@@ -428,7 +507,7 @@ dr export archimate --layer motivation --output motivation.archimate
428
507
 
429
508
  **Supported Relationships:**
430
509
 
431
- - `aggregates`, `realizes`, `specializes`, `influences`, `associated-with`
510
+ - `aggregates`, `realizes`, `specializes`, `influence`, `associated-with`
432
511
 
433
512
  ---
434
513
 
@@ -465,27 +544,28 @@ Common validation issues:
465
544
  **Add Commands:**
466
545
 
467
546
  ```bash
468
- dr add motivation stakeholder <name> --properties type=<type>
469
- dr add motivation driver <name> --properties category=<category>
470
- dr add motivation goal <name> --properties priority=<priority>
471
- dr add motivation requirement <name> --properties type=<type>
472
- dr add motivation principle <name> --properties category=<category>
473
- dr add motivation constraint <name> --properties type=<type>
547
+ dr add motivation stakeholder <name> --description <description>
548
+ dr add motivation driver <name> --description <description>
549
+ dr add motivation goal <name> --description <description>
550
+ dr add motivation requirement <name> --description <description>
551
+ dr add motivation principle <name> --description <description>
552
+ dr add motivation constraint <name> --description <description>
474
553
  ```
475
554
 
476
555
  **Relationship Commands:**
477
556
 
478
557
  ```bash
479
- dr relationship add <source-id> influences <target-id>
480
- dr relationship add <source-id> aggregates <target-id>
481
- dr relationship add <source-id> realizes <target-id>
482
- dr relationship add <source-id> specializes <target-id>
558
+ dr relationship add <source-id> <target-id> --predicate influence
559
+ dr relationship add <source-id> <target-id> --predicate aggregates
560
+ dr relationship add <source-id> <target-id> --predicate realizes
561
+ dr relationship add <source-id> <target-id> --predicate specializes
562
+ dr relationship add <source-id> <target-id> --predicate associated-with
483
563
  ```
484
564
 
485
565
  **Query Commands:**
486
566
 
487
567
  ```bash
488
- dr search --layer motivation --type goal
489
- dr search --layer motivation --property priority=critical
568
+ dr list motivation --type goal
569
+ dr search "" --layer motivation
490
570
  dr relationship list <element-id> --direction outgoing
491
571
  ```