@documentation-robotics/cli 0.1.13 → 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 (351) hide show
  1. package/README.md +74 -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/analyzers/verify-engine.js +22 -19
  34. package/dist/analyzers/verify-engine.js.map +2 -2
  35. package/dist/audit/relationships/ai/prompts.js +10 -10
  36. package/dist/audit/relationships/ai/prompts.js.map +2 -2
  37. package/dist/audit/relationships/analysis/layer-templates.js +52 -52
  38. package/dist/audit/relationships/analysis/layer-templates.js.map +1 -1
  39. package/dist/cli.js +112 -28
  40. package/dist/cli.js.map +3 -3
  41. package/dist/coding-agents/agents/claude-code.js +3 -1
  42. package/dist/coding-agents/agents/claude-code.js.map +2 -2
  43. package/dist/coding-agents/claude-code-client.js +2 -1
  44. package/dist/coding-agents/claude-code-client.js.map +2 -2
  45. package/dist/coding-agents/copilot-client.js +17 -12
  46. package/dist/coding-agents/copilot-client.js.map +2 -2
  47. package/dist/coding-agents/default-permissions.js +152 -0
  48. package/dist/coding-agents/default-permissions.js.map +7 -0
  49. package/dist/coding-agents/drbot-mcp.js +167 -0
  50. package/dist/coding-agents/drbot-mcp.js.map +7 -0
  51. package/dist/commands/add.js +12 -7
  52. package/dist/commands/add.js.map +2 -2
  53. package/dist/commands/analyzer.js +134 -23
  54. package/dist/commands/analyzer.js.map +2 -2
  55. package/dist/commands/audit.js +6 -6
  56. package/dist/commands/audit.js.map +2 -2
  57. package/dist/commands/changeset-verify.js +55 -0
  58. package/dist/commands/changeset-verify.js.map +7 -0
  59. package/dist/commands/changeset.js +261 -147
  60. package/dist/commands/changeset.js.map +2 -2
  61. package/dist/commands/delete.js +52 -19
  62. package/dist/commands/delete.js.map +3 -3
  63. package/dist/commands/element.js +3 -2
  64. package/dist/commands/element.js.map +2 -2
  65. package/dist/commands/farm.js +773 -0
  66. package/dist/commands/farm.js.map +7 -0
  67. package/dist/commands/init.js +11 -1
  68. package/dist/commands/init.js.map +2 -2
  69. package/dist/commands/mcp.js +122 -0
  70. package/dist/commands/mcp.js.map +7 -0
  71. package/dist/commands/relationship.js +251 -47
  72. package/dist/commands/relationship.js.map +2 -2
  73. package/dist/commands/reports.js +1 -1
  74. package/dist/commands/reports.js.map +2 -2
  75. package/dist/commands/update.js +56 -24
  76. package/dist/commands/update.js.map +2 -2
  77. package/dist/commands/upgrade.js +99 -11
  78. package/dist/commands/upgrade.js.map +3 -3
  79. package/dist/commands/validate.js +41 -3
  80. package/dist/commands/validate.js.map +2 -2
  81. package/dist/commands/version.js +2 -2
  82. package/dist/commands/version.js.map +2 -2
  83. package/dist/commands/visualize.js +4 -3
  84. package/dist/commands/visualize.js.map +2 -2
  85. package/dist/config.js +83 -0
  86. package/dist/config.js.map +7 -0
  87. package/dist/core/annotation-store.js +138 -0
  88. package/dist/core/annotation-store.js.map +7 -0
  89. package/dist/core/catalog-migration.js +33 -0
  90. package/dist/core/catalog-migration.js.map +7 -0
  91. package/dist/core/changeset-analysis.js +421 -0
  92. package/dist/core/changeset-analysis.js.map +7 -0
  93. package/dist/core/changeset-base-index.js +153 -0
  94. package/dist/core/changeset-base-index.js.map +7 -0
  95. package/dist/core/changeset-brief-delta.js +102 -0
  96. package/dist/core/changeset-brief-delta.js.map +7 -0
  97. package/dist/core/changeset-graph.js +281 -0
  98. package/dist/core/changeset-graph.js.map +7 -0
  99. package/dist/core/changeset-only-guard.js +32 -0
  100. package/dist/core/changeset-only-guard.js.map +7 -0
  101. package/dist/core/changeset-summary.js +68 -0
  102. package/dist/core/changeset-summary.js.map +7 -0
  103. package/dist/core/changeset-validator.js +66 -20
  104. package/dist/core/changeset-validator.js.map +2 -2
  105. package/dist/core/changeset-verify.js +518 -0
  106. package/dist/core/changeset-verify.js.map +7 -0
  107. package/dist/core/changeset.js +56 -9
  108. package/dist/core/changeset.js.map +2 -2
  109. package/dist/core/element-type-migration.js +145 -0
  110. package/dist/core/element-type-migration.js.map +7 -0
  111. package/dist/core/farm-manifest.js +140 -0
  112. package/dist/core/farm-manifest.js.map +7 -0
  113. package/dist/core/farm-sync-engine.js +346 -0
  114. package/dist/core/farm-sync-engine.js.map +7 -0
  115. package/dist/core/farm-sync-state.js +167 -0
  116. package/dist/core/farm-sync-state.js.map +7 -0
  117. package/dist/core/manifest.js +6 -3
  118. package/dist/core/manifest.js.map +2 -2
  119. package/dist/core/migration-registry.js +84 -1
  120. package/dist/core/migration-registry.js.map +2 -2
  121. package/dist/core/model-upgrade.js +102 -0
  122. package/dist/core/model-upgrade.js.map +7 -0
  123. package/dist/core/model.js +257 -44
  124. package/dist/core/model.js.map +3 -3
  125. package/dist/core/mutation-handler.js +71 -6
  126. package/dist/core/mutation-handler.js.map +2 -2
  127. package/dist/core/relationship-migration-table.js +6639 -0
  128. package/dist/core/relationship-migration-table.js.map +7 -0
  129. package/dist/core/relationship-migration.js +272 -0
  130. package/dist/core/relationship-migration.js.map +7 -0
  131. package/dist/core/relationship-prune.js +49 -0
  132. package/dist/core/relationship-prune.js.map +7 -0
  133. package/dist/core/relationship-staging.js +68 -0
  134. package/dist/core/relationship-staging.js.map +7 -0
  135. package/dist/core/relationships.js +26 -4
  136. package/dist/core/relationships.js.map +2 -2
  137. package/dist/core/report-data-model.js +7 -13
  138. package/dist/core/report-data-model.js.map +2 -2
  139. package/dist/core/staged-changeset-storage.js +64 -17
  140. package/dist/core/staged-changeset-storage.js.map +2 -2
  141. package/dist/core/staged-source-reference.js +28 -0
  142. package/dist/core/staged-source-reference.js.map +7 -0
  143. package/dist/core/staging-area.js +83 -18
  144. package/dist/core/staging-area.js.map +2 -2
  145. package/dist/core/virtual-projection.js +14 -5
  146. package/dist/core/virtual-projection.js.map +2 -2
  147. package/dist/export/archimate-exporter.js +1 -0
  148. package/dist/export/archimate-exporter.js.map +2 -2
  149. package/dist/generated/compiled-validators.js +2 -2
  150. package/dist/generated/compiled-validators.js.map +2 -2
  151. package/dist/generated/layer-registry.js +16 -16
  152. package/dist/generated/layer-registry.js.map +2 -2
  153. package/dist/generated/node-types.js +186 -168
  154. package/dist/generated/node-types.js.map +2 -2
  155. package/dist/generated/relationship-index.js +2209 -7727
  156. package/dist/generated/relationship-index.js.map +2 -2
  157. package/dist/integrations/claude_code/agents/dr-architect.md +16 -3
  158. package/dist/integrations/claude_code/agents/dr-extractor.md +1 -1
  159. package/dist/integrations/claude_code/commands/dr-analyzer.md +565 -0
  160. package/dist/integrations/claude_code/commands/dr-map.md +13 -0
  161. package/dist/integrations/claude_code/commands/dr-plan.md +40 -0
  162. package/dist/integrations/claude_code/commands/dr-relate.md +106 -96
  163. package/dist/integrations/claude_code/commands/dr-verify.md +45 -2
  164. package/dist/integrations/claude_code/docs/END_TO_END_WALKTHROUGH.md +14 -0
  165. package/dist/integrations/claude_code/docs/MCP_SERVER.md +79 -0
  166. package/dist/integrations/claude_code/docs/QUICK_START.md +37 -8
  167. package/dist/integrations/claude_code/docs/README.md +52 -1
  168. package/dist/integrations/claude_code/skills/dr_01_motivation_layer/SKILL.md +93 -72
  169. package/dist/integrations/claude_code/skills/dr_02_business_layer/SKILL.md +163 -126
  170. package/dist/integrations/claude_code/skills/dr_03_product_layer/SKILL.md +161 -126
  171. package/dist/integrations/claude_code/skills/dr_04_security_layer/SKILL.md +153 -133
  172. package/dist/integrations/claude_code/skills/dr_05_application_layer/SKILL.md +129 -100
  173. package/dist/integrations/claude_code/skills/dr_06_technology_layer/SKILL.md +111 -94
  174. package/dist/integrations/claude_code/skills/dr_07_api_layer/SKILL.md +143 -157
  175. package/dist/integrations/claude_code/skills/dr_08_data_model_layer/SKILL.md +117 -33
  176. package/dist/integrations/claude_code/skills/dr_09_dataset_layer/SKILL.md +74 -25
  177. package/dist/integrations/claude_code/skills/dr_10_ux_layer/SKILL.md +88 -12
  178. package/dist/integrations/claude_code/skills/dr_11_navigation_layer/SKILL.md +83 -24
  179. package/dist/integrations/claude_code/skills/dr_12_apm_layer/SKILL.md +57 -12
  180. package/dist/integrations/claude_code/skills/dr_13_testing_layer/SKILL.md +92 -15
  181. package/dist/integrations/claude_code/skills/dr_change_planning/SKILL.md +119 -0
  182. package/dist/integrations/claude_code/skills/dr_changeset_reviewer/SKILL.md +3 -0
  183. package/dist/integrations/claude_code/skills/dr_engineering_guide/SKILL.md +1 -1
  184. package/dist/integrations/github_copilot/agents/dr-architect.md +1 -1
  185. package/dist/integrations/github_copilot/skills/dr_01_motivation_layer/SKILL.md +182 -102
  186. package/dist/integrations/github_copilot/skills/dr_02_business_layer/SKILL.md +266 -148
  187. package/dist/integrations/github_copilot/skills/dr_03_product_layer/SKILL.md +547 -86
  188. package/dist/integrations/github_copilot/skills/dr_04_security_layer/SKILL.md +164 -169
  189. package/dist/integrations/github_copilot/skills/dr_05_application_layer/SKILL.md +420 -150
  190. package/dist/integrations/github_copilot/skills/dr_06_technology_layer/SKILL.md +331 -138
  191. package/dist/integrations/github_copilot/skills/dr_07_api_layer/SKILL.md +265 -201
  192. package/dist/integrations/github_copilot/skills/dr_08_data_model_layer/SKILL.md +181 -58
  193. package/dist/integrations/github_copilot/skills/dr_09_dataset_layer/SKILL.md +209 -57
  194. package/dist/integrations/github_copilot/skills/dr_10_ux_layer/SKILL.md +277 -112
  195. package/dist/integrations/github_copilot/skills/dr_11_navigation_layer/SKILL.md +219 -70
  196. package/dist/integrations/github_copilot/skills/dr_12_apm_layer/SKILL.md +189 -105
  197. package/dist/integrations/github_copilot/skills/dr_13_testing_layer/SKILL.md +222 -102
  198. package/dist/integrations/github_copilot/skills/dr_change_planning/SKILL.md +119 -0
  199. package/dist/integrations/github_copilot/skills/dr_changeset_reviewer/SKILL.md +3 -0
  200. package/dist/integrations/hash-utils.js.map +2 -2
  201. package/dist/mcp/api-key-manager.js +111 -0
  202. package/dist/mcp/api-key-manager.js.map +7 -0
  203. package/dist/mcp/changeset-only.js +34 -0
  204. package/dist/mcp/changeset-only.js.map +7 -0
  205. package/dist/mcp/http-transport.js +176 -0
  206. package/dist/mcp/http-transport.js.map +7 -0
  207. package/dist/mcp/resource-registry.js +97 -0
  208. package/dist/mcp/resource-registry.js.map +7 -0
  209. package/dist/mcp/tool-registry.js +60 -0
  210. package/dist/mcp/tool-registry.js.map +7 -0
  211. package/dist/mcp/tools/annotation-create.js +39 -0
  212. package/dist/mcp/tools/annotation-create.js.map +7 -0
  213. package/dist/mcp/tools/annotation-delete.js +29 -0
  214. package/dist/mcp/tools/annotation-delete.js.map +7 -0
  215. package/dist/mcp/tools/annotation-get.js +29 -0
  216. package/dist/mcp/tools/annotation-get.js.map +7 -0
  217. package/dist/mcp/tools/annotation-list.js +24 -0
  218. package/dist/mcp/tools/annotation-list.js.map +7 -0
  219. package/dist/mcp/tools/annotation-reply.js +34 -0
  220. package/dist/mcp/tools/annotation-reply.js.map +7 -0
  221. package/dist/mcp/tools/annotation-shared.js +10 -0
  222. package/dist/mcp/tools/annotation-shared.js.map +7 -0
  223. package/dist/mcp/tools/annotation-update.js +39 -0
  224. package/dist/mcp/tools/annotation-update.js.map +7 -0
  225. package/dist/mcp/tools/changeset-analysis-tools.js +78 -0
  226. package/dist/mcp/tools/changeset-analysis-tools.js.map +7 -0
  227. package/dist/mcp/tools/changeset-editing.js +184 -0
  228. package/dist/mcp/tools/changeset-editing.js.map +7 -0
  229. package/dist/mcp/tools/changeset-lifecycle.js +83 -0
  230. package/dist/mcp/tools/changeset-lifecycle.js.map +7 -0
  231. package/dist/mcp/tools/changeset-list.js +33 -0
  232. package/dist/mcp/tools/changeset-list.js.map +7 -0
  233. package/dist/mcp/tools/changeset-shared.js +31 -0
  234. package/dist/mcp/tools/changeset-shared.js.map +7 -0
  235. package/dist/mcp/tools/changeset-show.js +55 -0
  236. package/dist/mcp/tools/changeset-show.js.map +7 -0
  237. package/dist/mcp/tools/changeset-verify.js +43 -0
  238. package/dist/mcp/tools/changeset-verify.js.map +7 -0
  239. package/dist/mcp/tools/chat-launch.js +50 -0
  240. package/dist/mcp/tools/chat-launch.js.map +7 -0
  241. package/dist/mcp/tools/chat-status.js +26 -0
  242. package/dist/mcp/tools/chat-status.js.map +7 -0
  243. package/dist/mcp/tools/index.js +65 -0
  244. package/dist/mcp/tools/index.js.map +7 -0
  245. package/dist/mcp/tools/model-add.js +107 -0
  246. package/dist/mcp/tools/model-add.js.map +7 -0
  247. package/dist/mcp/tools/model-delete.js +99 -0
  248. package/dist/mcp/tools/model-delete.js.map +7 -0
  249. package/dist/mcp/tools/model-export.js +72 -0
  250. package/dist/mcp/tools/model-export.js.map +7 -0
  251. package/dist/mcp/tools/model-info.js +51 -0
  252. package/dist/mcp/tools/model-info.js.map +7 -0
  253. package/dist/mcp/tools/model-list.js +53 -0
  254. package/dist/mcp/tools/model-list.js.map +7 -0
  255. package/dist/mcp/tools/model-reload.js +34 -0
  256. package/dist/mcp/tools/model-reload.js.map +7 -0
  257. package/dist/mcp/tools/model-search.js +102 -0
  258. package/dist/mcp/tools/model-search.js.map +7 -0
  259. package/dist/mcp/tools/model-show.js +68 -0
  260. package/dist/mcp/tools/model-show.js.map +7 -0
  261. package/dist/mcp/tools/model-stats.js +22 -0
  262. package/dist/mcp/tools/model-stats.js.map +7 -0
  263. package/dist/mcp/tools/model-trace.js +118 -0
  264. package/dist/mcp/tools/model-trace.js.map +7 -0
  265. package/dist/mcp/tools/model-update.js +121 -0
  266. package/dist/mcp/tools/model-update.js.map +7 -0
  267. package/dist/mcp/tools/model-validate.js +78 -0
  268. package/dist/mcp/tools/model-validate.js.map +7 -0
  269. package/dist/mcp/tools/relationship-tools.js +98 -0
  270. package/dist/mcp/tools/relationship-tools.js.map +7 -0
  271. package/dist/mcp/tools/shared.js +126 -0
  272. package/dist/mcp/tools/shared.js.map +7 -0
  273. package/dist/mcp/tools/spec-type.js +90 -0
  274. package/dist/mcp/tools/spec-type.js.map +7 -0
  275. package/dist/reports/model-layer-report-generator.js +5 -3
  276. package/dist/reports/model-layer-report-generator.js.map +2 -2
  277. package/dist/reports/model-readme-generator.js +116 -0
  278. package/dist/reports/model-readme-generator.js.map +7 -0
  279. package/dist/reports/model-report-data.js +37 -1
  280. package/dist/reports/model-report-data.js.map +2 -2
  281. package/dist/reports/model-report-orchestrator.js +29 -6
  282. package/dist/reports/model-report-orchestrator.js.map +2 -2
  283. package/dist/reports/model-report-utils.js +9 -0
  284. package/dist/reports/model-report-utils.js.map +7 -0
  285. package/dist/schemas/bundled/analyzers/cbm.json +1186 -68
  286. package/dist/schemas/bundled/analyzers/manifest.json +2 -2
  287. package/dist/schemas/bundled/api.json +1029 -1658
  288. package/dist/schemas/bundled/apm.json +499 -734
  289. package/dist/schemas/bundled/application.json +745 -370
  290. package/dist/schemas/bundled/base.json +3 -220
  291. package/dist/schemas/bundled/business.json +452 -366
  292. package/dist/schemas/bundled/data-model.json +403 -383
  293. package/dist/schemas/bundled/data-store.json +334 -558
  294. package/dist/schemas/bundled/manifest.json +18 -18
  295. package/dist/schemas/bundled/motivation.json +349 -368
  296. package/dist/schemas/bundled/navigation.json +415 -731
  297. package/dist/schemas/bundled/product.json +325 -159
  298. package/dist/schemas/bundled/security.json +864 -1232
  299. package/dist/schemas/bundled/technology.json +574 -703
  300. package/dist/schemas/bundled/testing.json +718 -1643
  301. package/dist/schemas/bundled/ux.json +739 -1352
  302. package/dist/server/schemas.js +8 -0
  303. package/dist/server/schemas.js.map +2 -2
  304. package/dist/server/server.js +234 -31
  305. package/dist/server/server.js.map +2 -2
  306. package/dist/server-entry.js +2 -1
  307. package/dist/server-entry.js.map +2 -2
  308. package/dist/telemetry/config.js +2 -40
  309. package/dist/telemetry/config.js.map +2 -2
  310. package/dist/telemetry/index.js +1 -1
  311. package/dist/types/index.js.map +2 -2
  312. package/dist/utils/ansi-suppressor.js +23 -0
  313. package/dist/utils/ansi-suppressor.js.map +7 -0
  314. package/dist/utils/attribute-patch.js +41 -0
  315. package/dist/utils/attribute-patch.js.map +7 -0
  316. package/dist/utils/color-utils.js +34 -0
  317. package/dist/utils/color-utils.js.map +7 -0
  318. package/dist/utils/element-reference-shape.js +15 -1
  319. package/dist/utils/element-reference-shape.js.map +3 -3
  320. package/dist/utils/error-hints.js +29 -0
  321. package/dist/utils/error-hints.js.map +7 -0
  322. package/dist/utils/errors.js +75 -10
  323. package/dist/utils/errors.js.map +2 -2
  324. package/dist/utils/globals.js +17 -1
  325. package/dist/utils/globals.js.map +2 -2
  326. package/dist/utils/project-paths.js +50 -3
  327. package/dist/utils/project-paths.js.map +2 -2
  328. package/dist/utils/reference-path-parser.js +49 -0
  329. package/dist/utils/reference-path-parser.js.map +7 -0
  330. package/dist/utils/source-reference.js +17 -10
  331. package/dist/utils/source-reference.js.map +2 -2
  332. package/dist/utils/spec-version.js +10 -2
  333. package/dist/utils/spec-version.js.map +2 -2
  334. package/dist/validators/composed-reference-validator.js +240 -0
  335. package/dist/validators/composed-reference-validator.js.map +7 -0
  336. package/dist/validators/reference-validator.js +57 -13
  337. package/dist/validators/reference-validator.js.map +3 -3
  338. package/dist/validators/relationship-schema-validator.js +33 -5
  339. package/dist/validators/relationship-schema-validator.js.map +3 -3
  340. package/dist/validators/schema-validator.js +27 -9
  341. package/dist/validators/schema-validator.js.map +2 -2
  342. package/dist/validators/types.js.map +1 -1
  343. package/dist/viewer/README.md +6 -6
  344. package/dist/viewer/assets/main-CxzcuU_o.js +84 -0
  345. package/dist/viewer/assets/main-j-7ULYpm.css +1 -0
  346. package/dist/viewer/index.html +2 -2
  347. package/dist/viewer/manifest.json +10 -10
  348. package/dist/viewer/version.json +1 -1
  349. package/package.json +7 -3
  350. package/dist/viewer/assets/main-B7AOQXXX.js +0 -81
  351. package/dist/viewer/assets/main-vdrFrG7q.css +0 -1
@@ -6,6 +6,7 @@ triggers:
6
6
  "product",
7
7
  "feature",
8
8
  "persona",
9
+ "software capability",
9
10
  "capability",
10
11
  "milestone",
11
12
  "user workflow",
@@ -20,7 +21,7 @@ version: 0.8.4
20
21
 
21
22
  **Layer Number:** 03
22
23
  **Specification:** Metadata Model Spec v0.8.4
23
- **Purpose:** Defines product personas, capabilities, features, user workflows, and milestones that represent what the product does and for whom.
24
+ **Purpose:** Defines product personas, software capabilities, features, user workflows, and milestones that represent what the product does and for whom.
24
25
 
25
26
  ---
26
27
 
@@ -29,7 +30,7 @@ version: 0.8.4
29
30
  The Product Layer captures the **product management dimension** of architecture:
30
31
 
31
32
  - **WHO** - Personas and target user archetypes
32
- - **WHAT** - Capabilities and features the product delivers
33
+ - **WHAT** - Software capabilities and features the product delivers
33
34
  - **HOW** - User workflows describing how users accomplish goals
34
35
  - **WHEN** - Milestones representing delivery roadmap
35
36
  - **WHY** - Linkage to business goals and requirements
@@ -45,13 +46,14 @@ This layer uses a **custom specification** designed for product planning, priori
45
46
  > **CLI Introspection:** Run `dr schema types product` for the authoritative, always-current list of node types.
46
47
  > Run `dr schema node <type-id>` for full attribute details on any type.
47
48
 
48
- | Entity Type | Description | Key Attributes |
49
- | ---------------- | ---------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
50
- | **Persona** | User archetype with shared goals, behaviors, pain points | category (primary, secondary, served, negative), proficiency (novice, intermediate, advanced, expert) |
51
- | **Capability** | Product ability independent of implementation | status (proposed, planned, developing, delivered, deprecated), properties |
52
- | **Feature** | User-visible unit of functionality delivering capabilities | priority (critical, high, medium, low, informational), status, size (xs, s, m, l, xl) |
53
- | **UserWorkflow** | Sequence of user-facing steps to accomplish a goal | complexity (simple, moderate, complex), properties |
54
- | **Milestone** | Time-bound delivery target grouping features/capabilities | status (proposed, planned, active, completed, cancelled) |
49
+ | Entity Type | Description | Key Attributes |
50
+ | ---------------------- | ------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
51
+ | **Persona** | User archetype with shared goals, behaviors, pain points | category (primary, secondary, served, negative), proficiency (novice, intermediate, advanced, expert) |
52
+ | **SoftwareCapability** | Ability of the software platform, independent of implementation (not a business capability) | status (proposed, planned, developing, delivered, deprecated), properties |
53
+ | **Feature** | User-visible unit of functionality delivering software capabilities | priority (critical, high, medium, low, informational), status, size (xs, s, m, l, xl) |
54
+ | **UserWorkflow** | Sequence of user-facing steps to accomplish a goal | complexity (simple, moderate, complex), properties |
55
+ | **WorkflowStep** | One ordered, user-facing step within a UserWorkflow | sequence, action, outcome, optional, properties |
56
+ | **Milestone** | Time-bound delivery target grouping features and software capabilities | status (proposed, planned, active, completed, cancelled) |
55
57
 
56
58
  ---
57
59
 
@@ -59,54 +61,56 @@ This layer uses a **custom specification** designed for product planning, priori
59
61
 
60
62
  The Product layer models product structure and planning via these core relationships:
61
63
 
62
- | Source | Predicate | Destination | Cardinality | Rationale |
63
- | ---------------------- | --------------- | -------------------- | ------------ | ---------------------------------------------- |
64
- | `product.capability` | `aggregates` | `product.capability` | many-to-many | Capability decomposition into sub-capabilities |
65
- | `product.feature` | `realizes` | `product.capability` | many-to-many | Feature delivers a capability |
66
- | `product.feature` | `serves` | `product.persona` | many-to-many | Feature targets a persona |
67
- | `product.feature` | `scheduled-for` | `product.milestone` | many-to-many | Feature assigned to delivery milestone |
68
- | `product.capability` | `scheduled-for` | `product.milestone` | many-to-many | Capability assigned to milestone |
69
- | `product.userworkflow` | `serves` | `product.persona` | many-to-many | Workflow designed for a persona |
70
- | `product.userworkflow` | `composes` | `product.feature` | many-to-many | Workflow composed of features |
71
- | `product.milestone` | `precedes` | `product.milestone` | many-to-many | Milestone sequencing |
72
- | `product.feature` | `depends-on` | `product.feature` | many-to-many | Feature dependency |
64
+ | Source Type | Predicate | Target Type | Example |
65
+ | ------------------ | ------------- | ------------------ | --------------------------------------------------------------- |
66
+ | SoftwareCapability | aggregates | SoftwareCapability | "Authentication" aggregates "Multi-Factor Auth" |
67
+ | SoftwareCapability | depends-on | SoftwareCapability | "Order Tracking" depends on "Send Email" |
68
+ | SoftwareCapability | scheduled-for | Milestone | "Customer Segmentation" scheduled for "Q3 2024 Release" |
69
+ | Feature | realizes | SoftwareCapability | "Two-Factor Login" realizes "Authentication" |
70
+ | Feature | serves | Persona | "CSV Export" serves "Data Analyst" |
71
+ | Feature | scheduled-for | Milestone | "Live Cursor Tracking" scheduled for "Q4 Collaboration Release" |
72
+ | Feature | depends-on | Feature | "Scheduled Reports" depends on "Custom Dashboards" |
73
+ | Milestone | precedes | Milestone | "Q3 Security Release" precedes "Q4 Collaboration Release" |
74
+ | UserWorkflow | composes | WorkflowStep | "Password Reset" composes "Request Reset Link" |
75
+ | UserWorkflow | serves | Persona | "Checkout" serves "Busy Parent" |
76
+ | WorkflowStep | flows-to | WorkflowStep | "Request Reset Link" flows to "Receive Reset Email" |
77
+ | WorkflowStep | uses | Feature | "Choose New Password" uses "Password Reset" |
73
78
 
74
79
  ---
75
80
 
76
81
  ## Cross-Layer References
77
82
 
78
- ### Outgoing References (Product → Motivation)
79
-
80
- Product layer references Motivation layer to justify product decisions with strategic goals:
81
-
82
- | Predicate | Source | Target | Rationale |
83
- | ---------------- | ------------ | ----------- | -------------------------------------------- |
84
- | `realizes` | Persona | Stakeholder | Persona concretizes stakeholder archetypes |
85
- | `satisfies` | Feature | Requirement | Feature satisfies business/user requirements |
86
- | `supports` | Capability | Goal | Capability supports strategic goals |
87
- | `delivers` | UserWorkflow | Outcome | Workflow delivers business outcomes |
88
- | `delivers-value` | Feature | Value | Feature delivers business value |
89
- | `fulfills` | Capability | Requirement | Capability fulfills requirements |
90
-
91
- ### Outgoing References (Product → Business)
92
-
93
- Product layer references Business layer to align with organizational services and roles:
94
-
95
- | Predicate | Source | Target | Rationale |
96
- | ------------ | ------------ | ---------------- | --------------------------------------- |
97
- | `realizes` | Feature | BusinessService | Feature realizes a business service |
98
- | `aggregates` | UserWorkflow | BusinessProcess | Workflow aggregates business processes |
99
- | `realizes` | Capability | BusinessFunction | Capability realizes a business function |
100
- | `serves` | Persona | BusinessRole | Persona is served by a business role |
101
-
102
- ### Incoming References (Lower Layers → Product)
103
-
104
- Higher layers (Security through Testing) reference Product layer for feature-level concerns:
105
-
106
- - Application → Feature: Application components implement features
107
- - UX → Feature: UI views render features
108
- - Testing → Feature: Test cases validate features
109
- - API → Feature: API operations expose features
83
+ ### Outgoing References (Product → Other Layers)
84
+
85
+ Product elements point to Motivation to justify product decisions, and to Business to align with organizational services and roles:
86
+
87
+ | Source Type | Predicate | Target Type | Example |
88
+ | ------------------ | ---------- | --------------------------- | ---------------------------------------------------- |
89
+ | Persona | references | `motivation.stakeholder` | "Busy Parent" realizes "Retail Customers" |
90
+ | Feature | satisfies | `motivation.requirement` | "Two-Factor Login" satisfies "User Account Security" |
91
+ | Feature | delivers | `motivation.value` | "One-Click Reorder" delivers "Customer Convenience" |
92
+ | SoftwareCapability | supports | `motivation.goal` | "Authentication" supports "Customer Trust" |
93
+ | SoftwareCapability | satisfies | `motivation.requirement` | "Data Export" satisfies "Data Portability" |
94
+ | UserWorkflow | delivers | `motivation.outcome` | "Checkout" delivers "Cart Abandonment Reduced 15%" |
95
+ | SoftwareCapability | realizes | `business.businessfunction` | "Subscription Billing" realizes "Billing" |
96
+ | UserWorkflow | realizes | `business.businessprocess` | "Checkout" aggregates "Order Fulfillment" |
97
+ | Persona | references | `business.businessrole` | "Power User" serves "Data Analyst" role |
98
+
99
+ ### Incoming References (Other Layers → Product)
100
+
101
+ Other layers reference Product elements to record what implements, exposes or verifies them:
102
+
103
+ | Source Type | Predicate | Target Type | Example |
104
+ | -------------------------------- | --------- | ------------------ | --------------------------------------------------------- |
105
+ | `application.applicationservice` | realizes | SoftwareCapability | "EmailService" realizes "Send Email" |
106
+ | `technology.technologyservice` | realizes | SoftwareCapability | "SMTP Relay" realizes "Send Email" |
107
+ | `application.applicationservice` | realizes | Feature | "ExportService" realizes "CSV Export" |
108
+ | `api.operation` | exposes | Feature | "GET /reports/{id}/csv" exposes "CSV Export" |
109
+ | `ux.view` | realizes | Feature | "Cart Page" realizes "Shopping Cart" |
110
+ | `navigation.navigationflow` | realizes | UserWorkflow | "password-reset" flow realizes "Password Reset" |
111
+ | `navigation.flowstep` | realizes | WorkflowStep | "/reset/new-password" step realizes "Choose New Password" |
112
+ | `testing.testcasesketch` | tests | Feature | "MFA login happy path" tests "Two-Factor Login" |
113
+ | `testing.testcoveragetarget` | covers | Feature | "Export coverage target" covers "CSV Export" |
110
114
 
111
115
  ---
112
116
 
@@ -133,16 +137,36 @@ A Persona is a **user archetype** representing a class of users with shared goal
133
137
  - **Advanced** - Power users with domain expertise
134
138
  - **Expert** - Specialists who push product limits
135
139
 
140
+ **Example:**
141
+
142
+ ```
143
+ Persona: "Sales Representative"
144
+ ├── category: primary
145
+ ├── proficiency: intermediate
146
+ ├── realizes → Stakeholder: "Sales Team"
147
+ ├── serves → BusinessRole: "Sales Representative"
148
+ └── pain-points:
149
+ - Time-consuming manual data entry
150
+ - Limited visibility into customer interactions
151
+ ```
152
+
136
153
  ---
137
154
 
138
- ## Capability Definition
155
+ ## SoftwareCapability Definition
156
+
157
+ A SoftwareCapability is an **ability of the software platform**, stated as what the software can do (for example "Save documents to files" or "Full-text search"), independent of the features that expose it and the services that implement it. Features realize software capabilities, and a software capability realizes the business function it carries out: "Save documents to files" realizes the business function "Share data".
158
+
159
+ **Distinction from BusinessCapability (Business layer):**
160
+
161
+ - **BusinessCapability** - an ability the _organization_ has ("Share data with partners"), which would remain if different software, or none, provided it. Business functions and processes realize it. It is ArchiMate's Capability.
162
+ - **SoftwareCapability** - an ability of the _software platform_ ("Save documents to files"). It reaches the business layer by realizing business functions, which in turn realize business capabilities.
139
163
 
140
- A Capability is an **ability the product possesses**, independent of how it's implemented.
164
+ If removing the software would remove the ability, it is a software capability; if the organization would still need the ability and find another way to provide it, it is a business capability.
141
165
 
142
166
  **Distinction from BusinessFunction (Business layer):**
143
167
 
144
- - **BusinessFunction** - Internal organizational grouping of behavior
145
- - **Capability** - Externally-facing product ability
168
+ - **BusinessFunction** - a standing area of organizational work, performed by roles
169
+ - **SoftwareCapability** - what the software can do that carries such work out
146
170
 
147
171
  **Lifecycle Statuses:**
148
172
 
@@ -152,11 +176,25 @@ A Capability is an **ability the product possesses**, independent of how it's im
152
176
  - **Delivered** - Implemented and released
153
177
  - **Deprecated** - No longer supported
154
178
 
179
+ **Decomposition:**
180
+ Software capabilities decompose into narrower software capabilities via `aggregates` relationships.
181
+
182
+ **Example:**
183
+
184
+ ```
185
+ SoftwareCapability: "Customer Data Management"
186
+ ├── status: developing
187
+ ├── aggregates → SoftwareCapability: "Customer CRUD"
188
+ ├── aggregates → SoftwareCapability: "Customer Segmentation"
189
+ ├── realizes → BusinessFunction: "Customer Lifecycle Management"
190
+ └── supports → Goal: "Improve Customer Retention"
191
+ ```
192
+
155
193
  ---
156
194
 
157
195
  ## Feature Definition
158
196
 
159
- A Feature is a **user-visible unit of functionality** that delivers one or more capabilities and is the primary unit of product planning.
197
+ A Feature is a **user-visible unit of functionality** that delivers one or more software capabilities and is the primary unit of product planning.
160
198
 
161
199
  **Distinction from Requirement (Motivation layer):**
162
200
 
@@ -165,7 +203,7 @@ A Feature is a **user-visible unit of functionality** that delivers one or more
165
203
 
166
204
  **Priority Levels:**
167
205
 
168
- - **Critical** - Product cannot function without it
206
+ - **Critical** - Product cannot function without it (v1 release blocker)
169
207
  - **High** - Core functionality users expect
170
208
  - **Medium** - Valuable enhancement
171
209
  - **Low** - Nice-to-have optimization
@@ -179,23 +217,84 @@ A Feature is a **user-visible unit of functionality** that delivers one or more
179
217
  - **L** - 2–4 weeks
180
218
  - **XL** - > 4 weeks
181
219
 
220
+ **Example:**
221
+
222
+ ```
223
+ Feature: "Two-Factor Authentication"
224
+ ├── priority: high
225
+ ├── status: developing
226
+ ├── size: m
227
+ ├── realizes → SoftwareCapability: "Account Security"
228
+ ├── serves → Persona: "Security-Conscious User"
229
+ ├── satisfies → Requirement: "Support TOTP and SMS 2FA"
230
+ └── scheduled-for → Milestone: "Q3 Security Release"
231
+ ```
232
+
182
233
  ---
183
234
 
184
235
  ## User Workflow Definition
185
236
 
186
237
  A UserWorkflow is a **sequence of user-facing steps** through the product to accomplish a goal.
187
238
 
239
+ **Distinction from BusinessProcess (Business layer) and ExperienceState (UX layer):**
240
+
241
+ - **BusinessProcess** - Organization-internal process (BPMN, ArchiMate)
242
+ - **UserWorkflow** - User-centric journey through product features
243
+ - **ExperienceState** - UI/interface-level state transitions
244
+
188
245
  **Complexity Assessment:**
189
246
 
190
247
  - **Simple** - Linear flow, 2–3 steps, minimal decision points
191
248
  - **Moderate** - Multiple branches, 5–10 steps, some conditional logic
192
249
  - **Complex** - Many decision points, 10+ steps, cross-system integration
193
250
 
251
+ **Example:**
252
+
253
+ ```
254
+ UserWorkflow: "Checkout Flow"
255
+ ├── complexity: moderate
256
+ ├── serves → Persona: "Online Shopper"
257
+ ├── composes → Feature: "Shopping Cart"
258
+ ├── composes → Feature: "Payment Processing"
259
+ ├── composes → Feature: "Order Confirmation"
260
+ ├── delivers → Outcome: "Completed Purchase"
261
+ └── aggregates → BusinessProcess: "Order Fulfillment"
262
+
263
+ Steps:
264
+ 1. Add item to cart (Feature: Shopping Cart)
265
+ 2. Review cart and shipping (Feature: Checkout)
266
+ 3. Enter payment details (Feature: Payment Processing)
267
+ 4. Confirm order (Feature: Order Confirmation)
268
+ 5. Receive confirmation email
269
+ ```
270
+
271
+ ---
272
+
273
+ **Steps as elements (WorkflowStep):**
274
+
275
+ Model the steps as `product.workflowstep` elements when you need to trace which features each step
276
+ relies on, or to link steps to navigation routes. A workflow reaches features, and through them software
277
+ capabilities, only through its steps: the workflow composes steps, each step `uses` the features it
278
+ exercises, and those features realize software capabilities. Example: the _Password reset_ workflow
279
+ composes steps, and the platform's _Send email_ capability is reached through the feature that uses it:
280
+
281
+ ```
282
+ UserWorkflow: "Password Reset"
283
+ ├── composes → WorkflowStep 1 "Request reset link" (uses → Feature: Password Reset)
284
+ ├── composes → WorkflowStep 2 "Receive reset email" (uses → Feature: Reset Email)
285
+ ├── composes → WorkflowStep 3 "Choose new password" (uses → Feature: Password Reset)
286
+ └── realizes ← NavigationFlow: "password-reset" (its FlowSteps realize the WorkflowSteps)
287
+
288
+ Feature: "Reset Email" → realizes SoftwareCapability: "Send Email"
289
+ SoftwareCapability: "Send Email" ← realizes application.applicationservice "EmailService"
290
+ ← realizes technology.technologyservice "SMTP relay"
291
+ ```
292
+
194
293
  ---
195
294
 
196
295
  ## Milestone Definition
197
296
 
198
- A Milestone is a **time-bound delivery target** grouping features or capabilities.
297
+ A Milestone is a **time-bound delivery target** grouping features or software capabilities.
199
298
 
200
299
  **Lifecycle Statuses:**
201
300
 
@@ -205,17 +304,379 @@ A Milestone is a **time-bound delivery target** grouping features or capabilitie
205
304
  - **Completed** - Released to users
206
305
  - **Cancelled** - Postponed or deprioritized
207
306
 
307
+ **Milestone Sequencing:**
308
+ Milestones can precede/follow other milestones for roadmap planning.
309
+
310
+ **Example:**
311
+
312
+ ```
313
+ Milestone: "Q3 2024 Release"
314
+ ├── status: active
315
+ ├── scheduled-features:
316
+ │ ├── Feature: "Two-Factor Authentication"
317
+ │ ├── Feature: "Audit Logging"
318
+ │ └── Feature: "API Rate Limiting"
319
+ ├── scheduled-software-capabilities:
320
+ │ ├── SoftwareCapability: "Account Security"
321
+ │ └── SoftwareCapability: "System Reliability"
322
+ ├── precedes → Milestone: "Q4 2024 Release"
323
+ └── includes → Outcome: "Improved User Trust"
324
+ ```
325
+
326
+ ---
327
+
328
+ ## Codebase Detection Patterns
329
+
330
+ ### Pattern 1: Feature Flags
331
+
332
+ ```python
333
+ # Feature flag indicating incomplete feature
334
+ if feature_flags.get("two_factor_auth_enabled"):
335
+ user.enable_2fa()
336
+
337
+ # Feature flag with rollout percentage
338
+ if feature_flags.is_enabled("new_checkout", rollout_percentage=10):
339
+ return new_checkout_flow()
340
+ ```
341
+
342
+ **Maps to:**
343
+
344
+ - Feature: "Two-Factor Authentication" (status: developing)
345
+ - Feature: "New Checkout Flow" (status: developing, rollout: 10%)
346
+
347
+ ### Pattern 2: Product Roadmap Comment
348
+
349
+ ```python
350
+ # TODO: Implement user segmentation for Q3 milestone
351
+ # Feature: "User Segmentation" (priority: high)
352
+ # SoftwareCapability: "Customer Segmentation"
353
+ # Milestone: "Q3 2024 Release"
354
+ def segment_users_by_behavior():
355
+ pass
356
+ ```
357
+
358
+ **Maps to:**
359
+
360
+ - Feature: "User Segmentation" (priority: high)
361
+ - SoftwareCapability: "Customer Segmentation"
362
+ - Milestone: "Q3 2024 Release"
363
+
364
+ ### Pattern 3: User Role / Persona References
365
+
366
+ ```typescript
367
+ // Different workflows for different user personas
368
+ const workflowByPersona = {
369
+ basicUser: {
370
+ steps: ["login", "browse", "add-to-cart", "checkout"],
371
+ complexity: "simple"
372
+ },
373
+ powerUser: {
374
+ steps: [
375
+ "login",
376
+ "advanced-search",
377
+ "bulk-compare",
378
+ "batch-order",
379
+ "checkout"
380
+ ],
381
+ complexity: "complex"
382
+ },
383
+ admin: {
384
+ steps: ["login", "access-dashboard", "manage-users", "view-analytics"],
385
+ complexity: "complex"
386
+ }
387
+ };
388
+ ```
389
+
390
+ **Maps to:**
391
+
392
+ - Persona: "Basic User" (proficiency: novice)
393
+ - Persona: "Power User" (proficiency: advanced)
394
+ - Persona: "Admin" (proficiency: expert)
395
+ - UserWorkflow: "Basic Checkout Flow" (complexity: simple) → serves → Persona: "Basic User"
396
+ - UserWorkflow: "Power User Ordering" (complexity: complex) → serves → Persona: "Power User"
397
+
398
+ ### Pattern 4: Software Capability Requirements
399
+
400
+ ```yaml
401
+ # Software capability definition
402
+ capabilities:
403
+ authentication:
404
+ - password-based
405
+ - oauth2
406
+ - saml
407
+ - multi-factor-auth
408
+ reporting:
409
+ - real-time-dashboards
410
+ - scheduled-reports
411
+ - custom-queries
412
+ - data-export
413
+ ```
414
+
415
+ **Maps to:**
416
+
417
+ - SoftwareCapability: "Authentication" → aggregates → [Password-Based Auth, OAuth2, SAML, Multi-Factor Auth]
418
+ - SoftwareCapability: "Reporting" → aggregates → [Real-Time Dashboards, Scheduled Reports, Custom Queries, Data Export]
419
+
420
+ ### Pattern 5: Persona Attributes in Code
421
+
422
+ ```python
423
+ class UserProfile:
424
+ """User archetype modeling"""
425
+ def __init__(self, persona_type: str, proficiency: str):
426
+ self.persona_type = persona_type # e.g., "power-user", "casual-user"
427
+ self.proficiency = proficiency # e.g., "advanced", "novice"
428
+ self.pain_points = []
429
+ self.goals = []
430
+
431
+ def can_access_feature(self, feature: str) -> bool:
432
+ # Persona determines accessible features
433
+ if self.persona_type == "power-user":
434
+ return True
435
+ return feature in self.accessible_features
436
+ ```
437
+
438
+ **Maps to:**
439
+
440
+ - Persona: "Power User" (proficiency: advanced) → serves → Feature collection
441
+ - Persona: "Casual User" (proficiency: novice) → serves → Limited feature set
442
+
443
+ ---
444
+
445
+ ## Modeling Workflow
446
+
447
+ ### Step 1: Define Target Personas
448
+
449
+ ```bash
450
+ # Identify primary personas
451
+ dr add product persona "power-user" \
452
+ --description "Expert user who uses all advanced features" \
453
+ --attributes '{"category":"primary","proficiency":"advanced"}'
454
+
455
+ dr add product persona "casual-user" \
456
+ --description "Occasional user focused on core features" \
457
+ --attributes '{"category":"primary","proficiency":"novice"}'
458
+
459
+ dr add product persona "admin" \
460
+ --description "System administrator managing users and settings" \
461
+ --attributes '{"category":"primary","proficiency":"expert"}'
462
+ ```
463
+
464
+ ### Step 2: Define Software Capabilities
465
+
466
+ ```bash
467
+ # Product-level abilities (outcome-focused)
468
+ dr add product softwarecapability "user-authentication" \
469
+ --description "Authenticate and authorize users" \
470
+ --attributes '{"status":"planned"}'
471
+
472
+ dr add product softwarecapability "data-export" \
473
+ --description "Export user data in multiple formats" \
474
+ --attributes '{"status":"proposed"}'
475
+
476
+ dr add product softwarecapability "real-time-collaboration" \
477
+ --description "Enable multiple users to collaborate simultaneously" \
478
+ --attributes '{"status":"developing"}'
479
+ ```
480
+
481
+ ### Step 3: Define Features
482
+
483
+ ```bash
484
+ # User-visible features (deliverable units)
485
+ dr add product feature "multi-factor-authentication" \
486
+ --description "Two-factor auth via TOTP or SMS" \
487
+ --attributes '{"priority":"high","size":"m","status":"developing"}'
488
+
489
+ dr add product feature "csv-export" \
490
+ --description "Export data to CSV format" \
491
+ --attributes '{"priority":"medium","size":"s","status":"planned"}'
492
+
493
+ dr add product feature "live-cursor-tracking" \
494
+ --description "See other users' cursor positions in real-time" \
495
+ --attributes '{"priority":"high","size":"l","status":"proposed"}'
496
+ ```
497
+
498
+ ### Step 4: Map Features to Software Capabilities
499
+
500
+ ```bash
501
+ # Features realize software capabilities
502
+ dr relationship add product.feature.multi-factor-authentication \
503
+ product.softwarecapability.user-authentication --predicate realizes
504
+
505
+ dr relationship add product.feature.csv-export \
506
+ product.softwarecapability.data-export --predicate realizes
507
+
508
+ dr relationship add product.feature.live-cursor-tracking \
509
+ product.softwarecapability.real-time-collaboration --predicate realizes
510
+ ```
511
+
512
+ ### Step 5: Map Features to Personas
513
+
514
+ ```bash
515
+ # Features serve personas
516
+ dr relationship add product.feature.multi-factor-authentication \
517
+ product.persona.security-conscious-user --predicate serves
518
+
519
+ dr relationship add product.feature.live-cursor-tracking \
520
+ product.persona.power-user --predicate serves
521
+
522
+ dr relationship add product.feature.csv-export \
523
+ product.persona.data-analyst --predicate serves
524
+ ```
525
+
526
+ ### Step 6: Define User Workflows
527
+
528
+ ```bash
529
+ # User journeys through product
530
+ dr add product user-workflow "basic-authentication-flow" \
531
+ --description "Standard login and session management" \
532
+ --attributes '{"complexity":"simple"}'
533
+
534
+ dr add product user-workflow "secure-authentication-flow" \
535
+ --description "Multi-factor authentication workflow" \
536
+ --attributes '{"complexity":"moderate"}'
537
+
538
+ dr add product user-workflow "collaboration-session" \
539
+ --description "Join and participate in real-time collaboration" \
540
+ --attributes '{"complexity":"complex"}'
541
+ ```
542
+
543
+ ### Step 7: Map Workflows to Features Through Steps
544
+
545
+ ```bash
546
+ # A workflow composes its steps; each step uses the features it exercises
547
+ dr add product workflowstep "enter-verification-code" \
548
+ --description "The user enters the code sent to their phone"
549
+
550
+ dr relationship add product.userworkflow.secure-authentication-flow \
551
+ product.workflowstep.enter-verification-code --predicate composes
552
+
553
+ dr relationship add product.workflowstep.enter-verification-code \
554
+ product.feature.multi-factor-authentication --predicate uses
555
+ ```
556
+
557
+ ### Step 8: Define Milestones
558
+
559
+ ```bash
560
+ # Delivery roadmap
561
+ dr add product milestone "q3-security-release" \
562
+ --description "Security-focused quarterly release" \
563
+ --attributes '{"status":"planned"}'
564
+
565
+ dr add product milestone "q4-collaboration-release" \
566
+ --description "Real-time collaboration release" \
567
+ --attributes '{"status":"proposed"}'
568
+ ```
569
+
570
+ ### Step 9: Schedule Features to Milestones
571
+
572
+ ```bash
573
+ # Assign features to delivery targets
574
+ dr relationship add product.feature.multi-factor-authentication \
575
+ product.milestone.q3-security-release --predicate scheduled-for
576
+
577
+ dr relationship add product.feature.live-cursor-tracking \
578
+ product.milestone.q4-collaboration-release --predicate scheduled-for
579
+ ```
580
+
581
+ ### Step 10: Cross-Layer Integration
582
+
583
+ ```bash
584
+ # Link to Motivation layer
585
+ dr relationship add product.feature.multi-factor-authentication \
586
+ motivation.requirement.user-account-security --predicate satisfies
587
+
588
+ dr relationship add product.softwarecapability.user-authentication \
589
+ motivation.goal.customer-trust --predicate supports
590
+
591
+ # Link to Business layer: software capabilities realize the business functions they carry out
592
+ dr relationship add product.softwarecapability.data-export \
593
+ business.businessfunction.data-sharing --predicate realizes
594
+
595
+ # A persona references the business role it stands for
596
+ dr relationship add product.persona.power-user \
597
+ business.businessrole.data-analyst --predicate references
598
+ ```
599
+
600
+ ---
601
+
602
+ ## Modeling Patterns
603
+
604
+ ### Pattern 1: Feature Hierarchy
605
+
606
+ ```
607
+ SoftwareCapability: "Order Management"
608
+ ├── aggregates → SoftwareCapability: "Order Placement"
609
+ │ └── realizes ← Feature: "Shopping Cart"
610
+ ├── aggregates → SoftwareCapability: "Order Tracking"
611
+ │ └── realizes ← Feature: "Order History"
612
+ └── aggregates → SoftwareCapability: "Order Fulfillment"
613
+ └── realizes ← Feature: "Shipment Tracking"
614
+ ```
615
+
616
+ ### Pattern 2: Persona-Driven Features
617
+
618
+ ```
619
+ Persona: "Enterprise Administrator"
620
+ ├── proficiency: expert
621
+ ├── serves ← Feature: "Bulk User Import"
622
+ ├── serves ← Feature: "Advanced Reporting"
623
+ ├── serves ← Feature: "API Key Management"
624
+ └── serves → BusinessRole: "IT Operations"
625
+ ```
626
+
627
+ ### Pattern 3: Milestone Roadmap
628
+
629
+ ```
630
+ Milestone: "Q1 2025 MVP"
631
+ ├── scheduled-for ← Feature: "User Authentication"
632
+ ├── scheduled-for ← Feature: "Basic Search"
633
+ ├── scheduled-for ← Feature: "Profile Management"
634
+ └── precedes → Milestone: "Q2 2025 Enhancement"
635
+ ├── scheduled-for ← Feature: "Advanced Search"
636
+ └── scheduled-for ← Feature: "Real-Time Notifications"
637
+ ```
638
+
639
+ ### Pattern 4: Workflow with Multiple Features
640
+
641
+ ```
642
+ UserWorkflow: "Power User Data Analysis"
643
+ ├── complexity: complex
644
+ ├── serves → Persona: "Data Analyst"
645
+ ├── composes → Feature: "Advanced Search"
646
+ ├── composes → Feature: "Custom Dashboards"
647
+ ├── composes → Feature: "CSV Export"
648
+ ├── composes → Feature: "Scheduled Reports"
649
+ └── aggregates → BusinessProcess: "Business Intelligence"
650
+ ```
651
+
208
652
  ---
209
653
 
210
654
  ## Best Practices
211
655
 
212
656
  1. **Start with Personas, End with Workflows** - Understand users first, model journeys last
213
- 2. **Features Deliver Capabilities** - Every feature should map to at least one capability
214
- 3. **Capabilities Support Goals** - Link capabilities to motivation layer goals for justification
657
+ 2. **Features Realize Software Capabilities** - Every feature should realize at least one software capability
658
+ 3. **Software Capabilities Support Goals** - Link software capabilities to motivation layer goals for justification
215
659
  4. **Milestones Sequence Logically** - Plan dependencies and prerequisites
216
- 5. **Workflows are User-Centric** - Name them from the user's perspective
217
- 6. **Prioritization Reflects Business Value** - Higher priority features deliver more strategic value
218
- 7. **Link to Business Layer** - Map features to business services to show value realization
660
+ 5. **Workflows are User-Centric** - Name them from the user's perspective, not system perspective
661
+ 6. **Complexity Reflects User Experience** - Complex workflows should have features to manage that complexity
662
+ 7. **Prioritization Reflects Business Value** - Higher priority features deliver more strategic value
663
+ 8. **Personas Evolve** - As product matures, update persona proficiency and categories
664
+ 9. **Features Have Clear Status** - Track development progress from proposed to delivered
665
+ 10. **Link to Business Layer** - Map features to business services to show value realization
666
+
667
+ ---
668
+
669
+ ## Validation Tips
670
+
671
+ | Issue | Cause | Fix |
672
+ | ------------------- | --------------------------------------------- | ------------------------------------- |
673
+ | Orphaned Feature | Feature doesn't realize a software capability | Add one or remove feature |
674
+ | Unused Persona | Persona serves no features | Add features for persona or remove |
675
+ | Unmapped Capability | SoftwareCapability doesn't support a goal | Link to Motivation goal or remove |
676
+ | Incomplete Workflow | Workflow has no features | Add feature composition or simplify |
677
+ | Future Milestone | Milestone has no scheduled features | Add features or mark as candidate |
678
+ | Vague Persona | Persona lacks proficiency or category | Define proficiency level and category |
679
+ | Unlinked Feature | Feature doesn't satisfy a requirement | Add requirement link or remove |
219
680
 
220
681
  ---
221
682
 
@@ -224,30 +685,30 @@ A Milestone is a **time-bound delivery target** grouping features or capabilitie
224
685
  **Add Commands:**
225
686
 
226
687
  ```bash
227
- dr add product persona <name>
228
- dr add product capability <name>
229
- dr add product feature <name>
230
- dr add product user-workflow <name>
231
- dr add product milestone <name>
688
+ dr add product persona <name> --description <desc> --attributes '{"category":"<category>","proficiency":"<proficiency>"}'
689
+ dr add product softwarecapability <name> --description <desc> --attributes '{"status":"<status>"}'
690
+ dr add product feature <name> --description <desc> --attributes '{"priority":"<priority>","status":"<status>","size":"<size>"}'
691
+ dr add product user-workflow <name> --description <desc> --attributes '{"complexity":"<complexity>"}'
692
+ dr add product milestone <name> --description <desc> --attributes '{"status":"<status>"}'
232
693
  ```
233
694
 
234
695
  **Relationship Commands:**
235
696
 
236
697
  ```bash
237
- dr relationship add <source> <destination> --predicate <predicate>
238
- ```
239
-
240
- **Available Predicates:**
241
-
242
- - `aggregates` - Capability decomposes into sub-capability
243
- - `realizes` - Feature/Capability realizes capability/service/function
244
- - `serves` - Feature/Workflow/Persona serves persona/role
245
- - `scheduled-for` - Feature/Capability scheduled for milestone
246
- - `composes` - Workflow composed of features
247
- - `depends-on` - Feature depends on feature
248
- - `precedes` - Milestone precedes milestone
249
- - `satisfies` - Feature satisfies requirement
250
- - `supports` - Capability supports goal
251
- - `delivers` - Workflow delivers outcome
252
- - `delivers-value` - Feature delivers value
253
- - `fulfills` - Capability fulfills requirement
698
+ dr relationship add <software-capability> <software-capability> --predicate aggregates
699
+ dr relationship add <feature> <software-capability> --predicate realizes
700
+ dr relationship add <feature> <persona> --predicate serves
701
+ dr relationship add <workflow> <feature> --predicate composes
702
+ dr relationship add <feature> <milestone> --predicate scheduled-for
703
+ dr relationship add <milestone> <milestone> --predicate precedes
704
+ ```
705
+
706
+ **Cross-Layer Commands:**
707
+
708
+ ```bash
709
+ dr relationship add <persona> <stakeholder> --predicate realizes
710
+ dr relationship add <feature> <requirement> --predicate satisfies
711
+ dr relationship add <software-capability> <goal> --predicate supports
712
+ dr relationship add <workflow> <outcome> --predicate delivers
713
+ dr relationship add <feature> <business-service> --predicate realizes
714
+ ```