@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
@@ -12,13 +12,13 @@ triggers:
12
12
  "business layer",
13
13
  "archimate business"
14
14
  ]
15
- version: 0.8.1
15
+ version: 0.8.3
16
16
  ---
17
17
 
18
18
  # Business Layer Skill
19
19
 
20
20
  **Layer Number:** 02
21
- **Specification:** Metadata Model Spec v0.8.1
21
+ **Specification:** Metadata Model Spec v0.8.3
22
22
  **Purpose:** Represents business services, processes, actors, and objects that define the organization's operational structure and capabilities.
23
23
 
24
24
  ---
@@ -41,104 +41,202 @@ This layer uses **ArchiMate 3.2 Business Layer** standard without custom extensi
41
41
  > **CLI Introspection:** Run `dr schema types business` for the authoritative, always-current list of node types.
42
42
  > Run `dr schema node <type-id>` for full attribute details on any type.
43
43
 
44
- | Entity Type | Description | Key Attributes |
45
- | ------------------------- | ---------------------------------------------------- | --------------------------------------------------------------------- |
46
- | **BusinessActor** | Organizational entity capable of performing behavior | Examples: Customer, Employee, Partner, Supplier |
47
- | **BusinessRole** | Responsibility for performing specific behavior | Examples: Sales Representative, Account Manager, System Administrator |
48
- | **BusinessCollaboration** | Aggregate of business roles working together | Examples: Sales Team, Customer Service Department, Project Team |
49
- | **BusinessInterface** | Point of access where business service is available | Examples: Customer Portal, Phone Support, Email Support |
50
- | **BusinessProcess** | Sequence of business behaviors achieving a result | Can include BPMN references, security controls, KPI targets |
51
- | **BusinessFunction** | Collection of business behavior based on criteria | Examples: Marketing, Sales, Customer Service, Finance |
52
- | **BusinessInteraction** | Unit of collective behavior by collaboration | Examples: Sales Meeting, Contract Negotiation, Customer Onboarding |
53
- | **BusinessEvent** | Something that happens and influences behavior | Types: time-driven, state-change, external |
54
- | **BusinessService** | Service that fulfills a business need | Includes SLA properties, motivation links, APM monitoring |
55
- | **BusinessObject** | Concept used within business domain | Examples: Order, Invoice, Customer, Product, Contract |
56
- | **Contract** | Formal specification of agreement | Examples: SLA, Terms of Service, Purchase Agreement |
57
- | **Representation** | Perceptible form of business object | Formats: document, report, form, message, dashboard |
58
- | **Product** | Coherent collection of services with a value | Aggregates services and contracts, delivers value to customers |
44
+ | Entity Type | Description | Key Attributes |
45
+ | ------------------------- | ------------------------------------------------------ | --------------------------------------------------------------------------- |
46
+ | **BusinessActor** | Organizational entity capable of performing behavior | Examples: Customer, Employee, Partner, Supplier |
47
+ | **BusinessRole** | Responsibility for performing specific behavior | Examples: Sales Representative, Account Manager, System Administrator |
48
+ | **BusinessCollaboration** | Aggregate of business roles working together | Examples: Sales Team, Customer Service Department, Project Team |
49
+ | **BusinessInterface** | Point of access where business service is available | Examples: Customer Portal, Phone Support, Email Support |
50
+ | **BusinessProcess** | Sequence of business behaviors achieving a result | Can include BPMN references, security controls, KPI targets |
51
+ | **BusinessFunction** | Collection of business behavior based on criteria | Examples: Marketing, Sales, Customer Service, Finance |
52
+ | **BusinessInteraction** | Unit of collective behavior by collaboration | Examples: Sales Meeting, Contract Negotiation, Customer Onboarding |
53
+ | **BusinessEvent** | Something that happens and influences behavior | Types: time-driven, state-change, external |
54
+ | **BusinessService** | Service that fulfills a business need | Includes SLA properties, motivation links, APM monitoring |
55
+ | **BusinessObject** | Concept used within business domain | Examples: Order, Invoice, Customer, Opportunity, Support Ticket |
56
+ | **Contract** | Formal specification of agreement | Examples: SLA, Terms of Service, Purchase Agreement |
57
+ | **Representation** | Perceptible form of business object | Required `format`: pdf, html, xml, json, plain-text, binary |
58
+ | **Product** | Coherent collection of services with a value | Aggregates services and contracts, delivers value to customers |
59
+ | **BusinessCapability** | An ability the organization has (ArchiMate Capability) | Examples: Share data with partners, Settle claims; not a SoftwareCapability |
60
+
61
+ ---
62
+
63
+ ## Type Decision Tree
64
+
65
+ Use this decision tree **before assigning a type** to any observed business concept.
66
+
67
+ ```
68
+ IS this an individual person, organization, or system that acts in the business domain?
69
+ → BusinessActor (e.g., Customer, Supplier, Partner)
70
+
71
+ IS this a named responsibility or hat worn by an actor?
72
+ → BusinessRole (e.g., Sales Representative, Account Manager)
73
+
74
+ IS this a group of roles working together toward a shared goal?
75
+ → BusinessCollaboration (e.g., Sales Team, Project Team)
76
+
77
+ IS this a channel or contact point where a business service is accessed?
78
+ → BusinessInterface (e.g., Customer Portal, Phone Support Line)
79
+
80
+ IS this a structured sequence of steps that produces a business outcome?
81
+ → BusinessProcess (e.g., Order Fulfillment, Loan Approval)
82
+
83
+ IS this a grouping of related business behaviors (department-level capability)?
84
+ → BusinessFunction (e.g., Marketing, Finance, Customer Support)
85
+
86
+ IS this a joint behavior performed by two or more roles together?
87
+ → BusinessInteraction (e.g., Contract Negotiation, Sales Meeting)
88
+
89
+ IS this something that happens and triggers a response in the business?
90
+ → BusinessEvent (e.g., Order Received, Payment Confirmed)
91
+
92
+ IS this an externally visible capability the business offers to stakeholders?
93
+ → BusinessService (e.g., Order Management Service, Payment Service)
94
+
95
+ IS this a key domain concept or data entity used in business language?
96
+ → BusinessObject (e.g., Order, Invoice, Customer)
97
+
98
+ IS this a formal agreement with binding terms between parties?
99
+ → Contract (e.g., SLA, Purchase Agreement, Terms of Service)
100
+
101
+ IS this a concrete form in which a business object is communicated?
102
+ → Representation (e.g., Invoice PDF, Order Confirmation Email)
103
+
104
+ IS this a coherent bundle of services with a value proposition for customers?
105
+ → Product (e.g., E-commerce Platform, Premium Support Package)
106
+ ```
107
+
108
+ ---
109
+
110
+ ## Common Misclassifications
111
+
112
+ | Misclassification | Correct Classification | Why |
113
+ | ----------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
114
+ | A department or team as `BusinessService` | `BusinessFunction` (department) or `BusinessCollaboration` (team) | Services are externally visible capabilities; departments are behavioral groupings |
115
+ | A REST endpoint or UI as `BusinessInterface` | `BusinessInterface` is correct — but link it to the `ApplicationInterface` in the application layer | Business interfaces are the business-facing access point, not the technical one |
116
+ | A business rule or policy as `BusinessProcess` | `BusinessProcess` only for sequences of steps; rules belong in Motivation layer as `Principle` or `Constraint` | Processes produce outcomes through behavior; rules govern behavior |
117
+ | A domain entity (Order, Invoice) as `BusinessProcess` | `BusinessObject` | Objects are concepts; processes are sequences of behavior |
118
+ | A job title (Sales Rep) as `BusinessActor` | `BusinessRole` | Roles are responsibilities; actors are the people/orgs that fill them |
119
+ | An SLA document as `BusinessService` | `Contract` | An SLA is a formal agreement, not the service itself |
120
+ | A product feature as `BusinessFunction` | `Product` if it bundles services with customer value; `BusinessService` if it's a single capability | Products aggregate services; functions are internal behavioral groupings |
121
+ | A software ability ("Save to file") as `BusinessCapability` | `product.softwarecapability` | It is what the software can do; it realizes the business function it carries out, which realizes the business capability |
59
122
 
60
123
  ---
61
124
 
62
125
  ## Intra-Layer Relationships
63
126
 
127
+ The business layer's modelling rules (from `spec/layers/02-business.layer.json`):
128
+
129
+ - Actors fill roles. Roles and collaborations are `assigned-to` the processes, functions and interactions they perform; behaviour is never assigned to an actor directly.
130
+ - Internal behaviour `realizes` business services. Interfaces offer services (`assigned-to`), and services `serve` actors, roles and processes.
131
+ - Only behaviour `accesses` business objects and contracts. Actors, roles and interfaces reach information through the behaviour assigned to them.
132
+ - Events `trigger` processes and interactions, and behaviour raises events (`triggers`). A hand-off between behaviours is `flows-to`. A function has no start, so it is reached by `flows-to`, never triggered.
133
+ - A business capability is an ability the organization has: business functions and processes `realize` it, capabilities `aggregate` narrower capabilities, and software capabilities (product layer) contribute by realizing the business functions behind it.
134
+
64
135
  ### Structural Relationships
65
136
 
66
- | Source Type | Predicate | Target Type | Example |
67
- | --------------------- | ----------- | ------------------- | ----------------------------------------------------------------- |
68
- | Product | composes | BusinessService | "E-commerce Platform" composes "Payment Service" |
69
- | BusinessCollaboration | composes | BusinessRole | "Sales Team" composes "Sales Representative" role |
70
- | BusinessProcess | composes | BusinessProcess | "Order Fulfillment" composes "Pick", "Pack", "Ship" sub-processes |
71
- | BusinessFunction | composes | BusinessProcess | "Sales Function" composes "Lead Generation Process" |
72
- | Product | aggregates | BusinessService | Product bundles multiple services |
73
- | Product | aggregates | Contract | Product includes SLA contracts |
74
- | BusinessCollaboration | aggregates | BusinessRole | Collaboration includes multiple roles |
75
- | BusinessActor | assigned-to | BusinessRole | "John Smith" assigned to "Sales Rep" |
76
- | BusinessActor | assigned-to | BusinessProcess | Actor directly performs process |
77
- | BusinessRole | assigned-to | BusinessProcess | Role responsible for process execution |
78
- | BusinessRole | assigned-to | BusinessFunction | Role performs function |
79
- | BusinessCollaboration | assigned-to | BusinessInteraction | Collaboration performs interaction |
80
- | BusinessProcess | realizes | BusinessService | "Order Processing" realizes "Order Management Service" |
81
- | BusinessFunction | realizes | BusinessService | "Customer Support Function" realizes "Support Service" |
82
- | BusinessInteraction | realizes | BusinessService | "Contract Negotiation" realizes "Contracting Service" |
83
- | Representation | realizes | BusinessObject | "Invoice PDF" realizes "Invoice" concept |
84
- | BusinessObject | specializes | BusinessObject | "RetailCustomer" specializes "Customer" |
85
- | BusinessRole | specializes | BusinessRole | "Senior Sales Rep" specializes "Sales Rep" |
86
- | Contract | specializes | Contract | "Premium SLA" specializes "Standard SLA" |
137
+ | Source Type | Predicate | Target Type | Example |
138
+ | --------------------- | ---------- | ------------------ | ---------------------------------------------------------- |
139
+ | Product | aggregates | BusinessService | "Premium Membership" aggregates "Free Shipping Service" |
140
+ | Product | composes | Contract | "Premium Membership" composes "Membership Terms" |
141
+ | BusinessFunction | composes | BusinessFunction | "Sales" composes "Lead Management" |
142
+ | BusinessRole | composes | BusinessRole | "Store Manager" composes "Cashier Supervisor" |
143
+ | BusinessObject | composes | BusinessObject | "Order" composes "Order Line" |
144
+ | BusinessCollaboration | aggregates | BusinessRole | "Sales Team" aggregates "Sales Representative" |
145
+ | Representation | realizes | BusinessObject | "Invoice PDF" realizes "Invoice" |
146
+ | Representation | realizes | Contract | "Signed MSA Document" realizes "Master Services Agreement" |
147
+ | Contract | governs | BusinessService | "Premium SLA" governs "Support Service" |
148
+ | BusinessCapability | aggregates | BusinessCapability | "Customer Management" aggregates "Customer Onboarding" |
149
+ | BusinessFunction | realizes | BusinessCapability | "Data Exchange" realizes "Share Data with Partners" |
150
+ | BusinessProcess | realizes | BusinessCapability | "Claim Settlement" realizes "Settle Claims" |
151
+
152
+ ### Assignment Relationships (who performs what)
153
+
154
+ | Source Type | Predicate | Target Type | Example |
155
+ | --------------------- | ----------- | ------------------- | -------------------------------------------------------- |
156
+ | BusinessActor | assigned-to | BusinessRole | "Jane Smith" assigned to "Account Manager" |
157
+ | BusinessRole | assigned-to | BusinessProcess | "Order Processor" assigned to "Order Fulfillment" |
158
+ | BusinessRole | assigned-to | BusinessFunction | "Support Agent" assigned to "Customer Support" |
159
+ | BusinessRole | assigned-to | BusinessInteraction | "Account Manager" assigned to "Contract Negotiation" |
160
+ | BusinessCollaboration | assigned-to | BusinessInteraction | "Sales Team" assigned to "Sales Meeting" |
161
+ | BusinessInterface | assigned-to | BusinessService | "Customer Portal" assigned to "Order Management Service" |
162
+
163
+ ### Service Relationships
164
+
165
+ | Source Type | Predicate | Target Type | Example |
166
+ | ------------------- | --------- | --------------- | ------------------------------------------------------- |
167
+ | BusinessProcess | realizes | BusinessService | "Order Fulfillment" realizes "Order Management Service" |
168
+ | BusinessFunction | realizes | BusinessService | "Customer Support" realizes "Support Service" |
169
+ | BusinessInteraction | realizes | BusinessService | "Contract Negotiation" realizes "Contracting Service" |
170
+ | BusinessService | serves | BusinessActor | "Order Management Service" serves "Customer" |
171
+ | BusinessService | serves | BusinessRole | "Sales Reporting Service" serves "Regional Manager" |
172
+ | BusinessService | serves | BusinessProcess | "Credit Check Service" serves "Loan Approval" |
173
+ | BusinessInterface | serves | BusinessActor | "Mobile App" serves "Customer" |
174
+ | BusinessInterface | serves | BusinessRole | "Admin Console" serves "Administrator" |
175
+ | BusinessService | delivers | BusinessObject | "Policy Issuance Service" delivers "Insurance Policy" |
87
176
 
88
177
  ### Behavioral Relationships
89
178
 
90
- | Source Type | Predicate | Target Type | Example |
91
- | ------------------- | --------------- | ------------------- | ------------------------------------------------------------ |
92
- | BusinessEvent | triggers | BusinessProcess | "Order Received" triggers "Order Fulfillment Process" |
93
- | BusinessEvent | triggers | BusinessFunction | "Monthly Close" triggers "Financial Reporting Function" |
94
- | BusinessEvent | triggers | BusinessInteraction | "Customer Complaint" triggers "Issue Resolution Interaction" |
95
- | BusinessProcess | triggers | BusinessEvent | "Payment Complete" triggers "Order Confirmed Event" |
96
- | BusinessInteraction | triggers | BusinessProcess | "Sales Meeting" triggers "Proposal Generation Process" |
97
- | BusinessProcess | flows-to | BusinessProcess | "Credit Check" flows to "Order Approval" |
98
- | BusinessInteraction | flows-to | BusinessProcess | "Negotiation" flows to "Contract Signing" |
99
- | BusinessService | serves | BusinessActor | "Customer Portal" serves "Customer" |
100
- | BusinessService | serves | BusinessRole | "Reporting Service" serves "Manager" role |
101
- | BusinessService | serves | BusinessProcess | "Authentication Service" serves "Login Process" |
102
- | BusinessInterface | serves | BusinessActor | "Mobile App" serves "Customer" |
103
- | BusinessInterface | serves | BusinessRole | "Admin Console" serves "Administrator" role |
104
- | BusinessProcess | accesses | BusinessObject | "Order Process" accesses "Order" object |
105
- | BusinessFunction | accesses | BusinessObject | "Billing Function" accesses "Invoice" object |
106
- | BusinessInteraction | accesses | BusinessObject | "Contract Review" accesses "Contract" object |
107
- | Contract | associated-with | BusinessService | SLA contract associated with service delivery |
108
- | BusinessObject | associated-with | BusinessProcess | "Customer" associated with "Onboarding Process" |
179
+ | Source Type | Predicate | Target Type | Example |
180
+ | ------------------- | --------- | ------------------- | ----------------------------------------------------- |
181
+ | BusinessEvent | triggers | BusinessProcess | "Order Received" triggers "Order Fulfillment" |
182
+ | BusinessEvent | triggers | BusinessInteraction | "Customer Complaint" triggers "Issue Resolution Call" |
183
+ | BusinessProcess | triggers | BusinessEvent | "Order Shipping" triggers "Order Shipped" |
184
+ | BusinessFunction | triggers | BusinessEvent | "Financial Close" triggers "Month Closed" |
185
+ | BusinessInteraction | triggers | BusinessEvent | "Contract Negotiation" triggers "Deal Agreed" |
186
+ | BusinessProcess | flows-to | BusinessProcess | "Pick Items" flows to "Pack Order" |
187
+ | BusinessProcess | flows-to | BusinessFunction | "Order Fulfillment" flows to "Invoicing" |
188
+ | BusinessFunction | flows-to | BusinessProcess | "Underwriting" flows to "Policy Issuance" |
189
+ | BusinessInteraction | flows-to | BusinessProcess | "Sales Meeting" flows to "Proposal Generation" |
190
+
191
+ ### Information Access Relationships
192
+
193
+ | Source Type | Predicate | Target Type | Example |
194
+ | ------------------- | --------- | -------------- | ------------------------------------------------------ |
195
+ | BusinessProcess | accesses | BusinessObject | "Order Fulfillment" accesses "Order" |
196
+ | BusinessFunction | accesses | BusinessObject | "Billing" accesses "Invoice" |
197
+ | BusinessInteraction | accesses | BusinessObject | "Contract Review" accesses "Quote" |
198
+ | BusinessProcess | accesses | Contract | "Renewal Processing" accesses "Subscription Agreement" |
199
+ | BusinessFunction | accesses | Contract | "Contract Management" accesses "Supplier Agreement" |
200
+ | BusinessService | accesses | Contract | "Support Service" accesses "Premium SLA" |
109
201
 
110
202
  ---
111
203
 
112
204
  ## Cross-Layer References
113
205
 
114
- ### Outgoing References (Business → Lower Layers)
115
-
116
- | Target Layer | Reference Type | Example |
117
- | ------------------------- | --------------------------------------------------- | -------------------------------------------------------- |
118
- | **Layer 1 (Motivation)** | BusinessService delivers **Value** | "Payment Service" delivers "Revenue Generation" value |
119
- | **Layer 1 (Motivation)** | BusinessService supports **Goal** | Service achieves business goals |
120
- | **Layer 1 (Motivation)** | BusinessService governed by **Principle** | Follows business principles |
121
- | **Layer 1 (Motivation)** | BusinessActor **is** Stakeholder | Actor maps to stakeholder in motivation layer |
122
- | **Layer 1 (Motivation)** | BusinessProcess achieves **Goal** | Process realizes business goals |
123
- | **Layer 1 (Motivation)** | Contract drives **Constraint** | SLA contract defines constraints |
124
- | **Layer 4 (Application)** | BusinessService realized by **ApplicationService** | "Order Service" realized by "OrderManagementAPI" |
125
- | **Layer 4 (Application)** | BusinessProcess automated by **ApplicationProcess** | Process workflow automated by application |
126
- | **Layer 4 (Application)** | BusinessObject represented in **DataObject** | "Customer" business concept maps to customer data object |
127
- | **Layer 4 (Application)** | BusinessEvent triggers **ApplicationEvent** | Business event generates application event |
128
- | **Layer 3 (Security)** | BusinessProcess protected by **SecurityControl** | Process has authentication/authorization |
129
- | **Layer 3 (Security)** | BusinessCollaboration maps to **SecurityActor** | Team maps to security roles |
130
- | **Layer 6 (API)** | BusinessInterface maps to **API Operation** | Portal interface maps to REST endpoints |
131
- | **Layer 7 (Data Model)** | BusinessObject → **JSON Schema** | Business object defined as schema |
132
- | **Layer 11 (APM)** | BusinessProcess tracked by **BusinessMetric** | Process performance measured |
133
- | **Layer 11 (APM)** | BusinessService defines **KPI Target** | SLA targets for monitoring |
134
-
135
- ### Incoming References (Lower Layers → Business)
136
-
137
- Lower layers (Application, Technology, API, etc.) reference Business layer elements to show:
138
-
139
- - **Realization**: Application services realize business services
140
- - **Support**: Technology supports business operations
141
- - **Traceability**: APIs map to business interfaces
206
+ ### Outgoing References (Business → Other Layers)
207
+
208
+ | Source Type | Predicate | Target Type | Example |
209
+ | ------------------ | -------------- | --------------------------- | -------------------------------------------------------------- |
210
+ | BusinessService | realizes | `motivation.goal` | "Order Management Service" realizes "Improve Order Efficiency" |
211
+ | BusinessCapability | supports | `motivation.goal` | "Settle Claims" supports "Pay Claims Within a Day" |
212
+ | BusinessCapability | realizes | `motivation.outcome` | "Onboard Customers" realizes "Onboarding Time Halved" |
213
+ | BusinessService | realizes | `motivation.outcome` | "Same-Day Delivery" realizes "Delivery Complaints Halved" |
214
+ | BusinessService | delivers | `motivation.value` | "Order Management Service" delivers "Customer Convenience" |
215
+ | BusinessService | satisfies | `motivation.requirement` | "Support Service" satisfies "24/7 Support Availability" |
216
+ | BusinessProcess | realizes | `motivation.outcome` | "Automated Refunds" realizes "Refund Time Under 48h" |
217
+ | BusinessProcess | satisfies | `motivation.requirement` | "KYC Verification" satisfies "Verify Customer Identity" |
218
+ | BusinessActor | references | `motivation.stakeholder` | "Customer" actor references "Retail Customers" stakeholder |
219
+ | BusinessRole | references | `motivation.stakeholder` | "Compliance Officer" references "Regulators" |
220
+ | BusinessObject | references | `application.dataobject` | "Order" references the "OrderRecord" data object |
221
+ | BusinessProcess | constrained-by | `security.separationofduty` | "Payment Approval" constrained by "Maker-Checker Rule" |
222
+
223
+ ### Incoming References (Other Layers → Business)
224
+
225
+ | Source Type | Predicate | Target Type | Example |
226
+ | --------------------------------- | ---------- | ---------------- | -------------------------------------------------------- |
227
+ | `application.applicationservice` | realizes | BusinessService | "OrderService API" realizes "Order Management Service" |
228
+ | `application.applicationprocess` | realizes | BusinessProcess | "Checkout Saga" realizes "Order Fulfillment" |
229
+ | `application.applicationfunction` | realizes | BusinessFunction | "Invoice Generator" realizes "Billing" |
230
+ | `application.applicationevent` | triggers | BusinessProcess | "PaymentSucceeded" event triggers "Order Fulfillment" |
231
+ | `application.applicationservice` | accesses | BusinessObject | "OrderService API" accesses "Order" |
232
+ | `product.softwarecapability` | realizes | BusinessFunction | "Save Documents to Files" realizes "Share Data" |
233
+ | `product.userworkflow` | realizes | BusinessProcess | "Checkout Journey" realizes "Order Fulfillment" |
234
+ | `data-model.objectschema` | realizes | BusinessObject | "Order" schema realizes "Order" business object |
235
+ | `data-store.collection` | realizes | BusinessObject | "orders" table realizes "Order" |
236
+ | `security.role` | references | BusinessRole | "admin" security role references "Administrator" |
237
+ | `security.securitypolicy` | governs | BusinessService | "Payment Security Policy" governs "Payment Service" |
238
+ | `apm.metricinstrument` | monitors | BusinessProcess | "orders.fulfilled" metric monitors "Order Fulfillment" |
239
+ | `testing.testcoveragetarget` | covers | BusinessProcess | "Fulfillment Workflow" target covers "Order Fulfillment" |
142
240
 
143
241
  ---
144
242
 
@@ -254,6 +352,31 @@ services:
254
352
 
255
353
  ---
256
354
 
355
+ ## Coverage Completeness Checklist
356
+
357
+ Before declaring business layer extraction complete, verify ALL 13 entity types have been considered:
358
+
359
+ ```
360
+ □ BusinessActor — people, orgs, or systems that act (Customer, Supplier, Partner)
361
+ □ BusinessRole — named responsibilities assigned to actors (Sales Rep, Admin)
362
+ □ BusinessCollaboration — groups of roles working together (Sales Team, Support Dept)
363
+ □ BusinessInterface — access points where services are available (Portal, API, Phone)
364
+ □ BusinessProcess — step sequences producing a business outcome (Order Fulfillment)
365
+ □ BusinessFunction — department-level behavioral capability (Marketing, Finance)
366
+ □ BusinessInteraction — collective behavior by a collaboration (Contract Negotiation)
367
+ □ BusinessEvent — triggers: time-driven, state-change, external (Order Received)
368
+ □ BusinessService — externally visible capability (Order Management, Payment)
369
+ □ BusinessObject — key domain concepts (Order, Invoice, Customer, Opportunity)
370
+ □ Contract — formal agreements: SLA, Terms of Service, Purchase Agreement
371
+ □ Representation — concrete forms of objects (format: pdf, html, xml, json, plain-text, binary)
372
+ □ Product — bundles of services with customer value proposition
373
+
374
+ If any type has ZERO elements, explicitly decide:
375
+ "This type doesn't apply to this codebase" with reasoning.
376
+ ```
377
+
378
+ ---
379
+
257
380
  ## Modeling Workflow
258
381
 
259
382
  ### Step 1: Identify Business Actors and Roles
@@ -263,7 +386,7 @@ services:
263
386
  dr add business actor "Customer" \
264
387
  --description "End user purchasing products"
265
388
 
266
- dr add business actor "Sales Team" \
389
+ dr add business collaboration "Sales Team" \
267
390
  --description "Internal sales organization"
268
391
 
269
392
  # Add business roles
@@ -279,12 +402,11 @@ dr add business role "Account Manager" \
279
402
  ```bash
280
403
  # Core business service
281
404
  dr add business service "Order Management Service" \
282
- --properties sla-availability=99.9%,sla-response-time=500ms \
283
405
  --description "Manages customer order lifecycle"
284
406
 
285
407
  # Link to motivation layer
286
- dr relationship add "business/service/order-management" \
287
- supports "motivation/goal/improve-order-efficiency"
408
+ dr relationship add business.businessservice.order-management-service \
409
+ motivation.goal.improve-order-efficiency --predicate realizes
288
410
  ```
289
411
 
290
412
  ### Step 3: Model Business Processes
@@ -292,7 +414,6 @@ dr relationship add "business/service/order-management" \
292
414
  ```bash
293
415
  # Main process
294
416
  dr add business process "Order Fulfillment Process" \
295
- --properties bpmn-file=processes/order-fulfillment.bpmn \
296
417
  --description "End-to-end order fulfillment from creation to delivery"
297
418
 
298
419
  # Sub-processes
@@ -302,16 +423,14 @@ dr add business process "Pick Items Process" \
302
423
  dr add business process "Pack Order Process" \
303
424
  --description "Pack picked items for shipment"
304
425
 
305
- # Composition relationships
306
- dr relationship add "business/process/order-fulfillment" \
307
- composes "business/process/pick-items"
308
-
309
- dr relationship add "business/process/order-fulfillment" \
310
- composes "business/process/pack-order"
426
+ # The catalog has no process-to-process composition; link sub-processes
427
+ # in sequence with flows-to, and tie the main process to the service it realizes
428
+ dr relationship add business.businessprocess.order-fulfillment-process \
429
+ business.businessservice.order-management-service --predicate realizes
311
430
 
312
431
  # Process flows
313
- dr relationship add "business/process/pick-items" \
314
- flows-to "business/process/pack-order"
432
+ dr relationship add business.businessprocess.pick-items-process \
433
+ business.businessprocess.pack-order-process --predicate flows-to
315
434
  ```
316
435
 
317
436
  ### Step 4: Define Business Objects
@@ -328,8 +447,8 @@ dr add business object "Product" \
328
447
  --description "Item available for purchase"
329
448
 
330
449
  # Process access to objects
331
- dr relationship add "business/process/order-fulfillment" \
332
- accesses "business/object/order"
450
+ dr relationship add business.businessprocess.order-fulfillment-process \
451
+ business.businessobject.order --predicate accesses
333
452
  ```
334
453
 
335
454
  ### Step 5: Model Business Events
@@ -337,39 +456,37 @@ dr relationship add "business/process/order-fulfillment" \
337
456
  ```bash
338
457
  # Events that trigger processes
339
458
  dr add business event "Order Received" \
340
- --properties type=state-change,topic=orders.received \
341
459
  --description "New order submitted by customer"
342
460
 
343
461
  dr add business event "Payment Confirmed" \
344
- --properties type=state-change,topic=payments.confirmed \
345
462
  --description "Payment successfully processed"
346
463
 
347
464
  # Event triggering
348
- dr relationship add "business/event/order-received" \
349
- triggers "business/process/order-fulfillment"
465
+ dr relationship add business.businessevent.order-received \
466
+ business.businessprocess.order-fulfillment-process --predicate triggers
350
467
  ```
351
468
 
352
469
  ### Step 6: Establish Cross-Layer Relationships
353
470
 
354
471
  ```bash
355
- # Link to application layer
356
- dr relationship add "business/service/order-management" \
357
- realized-by "application/service/order-api"
472
+ # Application service realizes the business service (source is the realizer)
473
+ dr relationship add application.applicationservice.order-api \
474
+ business.businessservice.order-management-service --predicate realizes
358
475
 
359
476
  # Link to motivation layer
360
- dr relationship add "business/service/order-management" \
361
- delivers "motivation/value/customer-satisfaction"
477
+ dr relationship add business.businessservice.order-management-service \
478
+ motivation.value.customer-satisfaction --predicate delivers
362
479
 
363
- # Link to data layer
364
- dr relationship add "business/object/order" \
365
- defined-by "data-model/schema/order.schema.json"
480
+ # Data-model schema realizes the business object
481
+ dr relationship add data-model.objectschema.order \
482
+ business.businessobject.order --predicate realizes
366
483
  ```
367
484
 
368
485
  ### Step 7: Validate
369
486
 
370
487
  ```bash
371
- dr validate --layer business
372
- dr validate --validate-relationships
488
+ dr validate --layers business
489
+ dr validate --relationships
373
490
  ```
374
491
 
375
492
  ---
@@ -380,38 +497,38 @@ dr validate --validate-relationships
380
497
 
381
498
  ```
382
499
  Product: "E-commerce Platform"
383
- ├── composes → BusinessService: "Order Service"
500
+ ├── aggregates → BusinessService: "Order Service"
384
501
  │ ├── realizes ← BusinessProcess: "Order Fulfillment"
385
502
  │ │ ├── triggers ← BusinessEvent: "Order Received"
386
503
  │ │ ├── accesses → BusinessObject: "Order"
387
- │ │ └── assigned-to → BusinessRole: "Order Processor"
388
- │ └── realized-by → ApplicationService: "OrderManagementAPI"
389
- ├── composes → BusinessService: "Payment Service"
504
+ │ │ └── assigned-to ← BusinessRole: "Order Processor"
505
+ │ └── realizes ← ApplicationService: "OrderManagementAPI"
506
+ ├── aggregates → BusinessService: "Payment Service"
390
507
  │ └── realizes ← BusinessProcess: "Payment Processing"
391
- └── aggregates → Contract: "E-commerce SLA"
508
+ └── composes → Contract: "E-commerce SLA"
392
509
  ```
393
510
 
394
511
  ### Scenario 2: Customer Support System
395
512
 
396
513
  ```
397
514
  BusinessFunction: "Customer Support"
398
- ├── composes → BusinessProcess: "Ticket Resolution"
515
+ ├── flows-to → BusinessProcess: "Ticket Resolution"
399
516
  │ ├── triggers ← BusinessEvent: "Support Request Received"
400
- │ ├── assigned-to → BusinessRole: "Support Agent"
517
+ │ ├── assigned-to ← BusinessRole: "Support Agent"
401
518
  │ ├── accesses → BusinessObject: "Support Ticket"
402
519
  │ └── flows-to → BusinessProcess: "Follow-up Communication"
403
520
  ├── realizes → BusinessService: "Support Service"
404
521
  │ ├── serves → BusinessActor: "Customer"
405
522
  │ └── properties: sla-response-time=2h, sla-resolution-time=24h
406
- └── tracked-by → BusinessMetric: "First Response Time"
523
+ └── monitors ← apm.MetricInstrument: "First Response Time"
407
524
  ```
408
525
 
409
526
  ### Scenario 3: Sales Pipeline
410
527
 
411
528
  ```
412
529
  BusinessCollaboration: "Sales Team"
413
- ├── composes → BusinessRole: "Sales Representative"
414
- ├── composes → BusinessRole: "Sales Manager"
530
+ ├── aggregates → BusinessRole: "Sales Representative"
531
+ ├── aggregates → BusinessRole: "Sales Manager"
415
532
  └── assigned-to → BusinessInteraction: "Sales Meeting"
416
533
  ├── accesses → BusinessObject: "Opportunity"
417
534
  ├── flows-to → BusinessProcess: "Proposal Generation"
@@ -426,7 +543,6 @@ When business processes reference BPMN diagrams:
426
543
 
427
544
  ```bash
428
545
  dr add business process "Loan Approval Process" \
429
- --properties bpmn-file=processes/loan-approval.bpmn,bpmn-version=2.0 \
430
546
  --description "End-to-end loan application review and approval"
431
547
  ```
432
548
 
@@ -466,7 +582,7 @@ These SLAs flow down to:
466
582
  ## ArchiMate Export
467
583
 
468
584
  ```bash
469
- dr export archimate --layer business --output business.archimate
585
+ dr export archimate --layers business --output business.archimate
470
586
  ```
471
587
 
472
588
  **Supported ArchiMate Elements:**
@@ -479,7 +595,7 @@ dr export archimate --layer business --output business.archimate
479
595
  ## Best Practices
480
596
 
481
597
  1. **Start with Services, Not Processes** - Identify WHAT the business provides before HOW it's delivered
482
- 2. **Use Process Composition** - Break complex processes into manageable sub-processes
598
+ 2. **Decompose Processes** - Break complex processes into sub-processes linked in sequence with `flows-to`
483
599
  3. **Model Events Explicitly** - Event-driven architectures need explicit BusinessEvent entities
484
600
  4. **Link to Motivation Early** - Connect services and processes to goals for traceability
485
601
  5. **Don't Over-Detail** - Focus on architecturally significant processes, not every task
@@ -492,14 +608,14 @@ dr export archimate --layer business --output business.archimate
492
608
 
493
609
  ## Validation Tips
494
610
 
495
- | Issue | Cause | Fix |
496
- | ---------------------------- | -------------------------------------------- | --------------------------------------------- |
497
- | Orphaned Process | No event triggers it, no service realizes it | Add triggering event or link to service |
498
- | Unrealized Service | No process/function realizes the service | Add process that implements the service |
499
- | Missing Business Objects | Processes don't access any objects | Identify key domain concepts and add them |
500
- | No Cross-Layer Relationships | Business not linked to application/data | Add realization relationships to lower layers |
501
- | Unassigned Roles | Roles not assigned to processes | Assign roles to show responsibility |
502
- | Missing SLA Properties | Services lack performance targets | Add SLA properties for monitoring |
611
+ | Issue | Cause | Fix |
612
+ | ---------------------------- | -------------------------------------------- | ------------------------------------------- |
613
+ | Orphaned Process | No event triggers it, no service realizes it | Add triggering event or link to service |
614
+ | Unrealized Service | No process/function realizes the service | Add process that implements the service |
615
+ | Missing Business Objects | Processes don't access any objects | Identify key domain concepts and add them |
616
+ | No Cross-Layer Relationships | Business not linked to application/data | Add realizes from application/data elements |
617
+ | Unassigned Roles | Roles not assigned to processes | Assign roles to show responsibility |
618
+ | Missing SLA Properties | Services lack performance targets | Add SLA properties for monitoring |
503
619
 
504
620
  ---
505
621
 
@@ -510,10 +626,10 @@ dr export archimate --layer business --output business.archimate
510
626
  ```bash
511
627
  dr add business actor <name>
512
628
  dr add business role <name>
513
- dr add business service <name> --properties sla-availability=<value>
514
- dr add business process <name> --properties bpmn-file=<path>
629
+ dr add business service <name> --description <description>
630
+ dr add business process <name> --description <description>
515
631
  dr add business object <name>
516
- dr add business event <name> --properties type=<type>,topic=<topic>
632
+ dr add business event <name> --description <description>
517
633
  dr add business function <name>
518
634
  dr add business collaboration <name>
519
635
  ```
@@ -521,19 +637,21 @@ dr add business collaboration <name>
521
637
  **Relationship Commands:**
522
638
 
523
639
  ```bash
524
- dr relationship add <source> realizes <target>
525
- dr relationship add <source> composes <target>
526
- dr relationship add <source> assigned-to <target>
527
- dr relationship add <source> triggers <target>
528
- dr relationship add <source> flows-to <target>
529
- dr relationship add <source> accesses <target>
530
- dr relationship add <source> serves <target>
640
+ dr relationship add <source> <target> --predicate realizes
641
+ dr relationship add <source> <target> --predicate composes
642
+ dr relationship add <source> <target> --predicate assigned-to
643
+ dr relationship add <source> <target> --predicate triggers
644
+ dr relationship add <source> <target> --predicate flows-to
645
+ dr relationship add <source> <target> --predicate accesses
646
+ dr relationship add <source> <target> --predicate serves
647
+ dr relationship add <source> <target> --predicate aggregates
531
648
  ```
532
649
 
533
650
  **Cross-Layer Relationship Commands:**
534
651
 
535
652
  ```bash
536
- dr relationship add <business-service> supports <motivation-goal>
537
- dr relationship add <business-service> realized-by <application-service>
538
- dr relationship add <business-object> defined-by <data-schema>
653
+ dr relationship add <business-service> <motivation-goal> --predicate realizes
654
+ dr relationship add <business-service> <motivation-value> --predicate delivers
655
+ dr relationship add <application-service> <business-service> --predicate realizes
656
+ dr relationship add <data-model-objectschema> <business-object> --predicate realizes
539
657
  ```