@documentation-robotics/cli 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (335) hide show
  1. package/README.md +46 -16
  2. package/dist/analysis/relationship-classifier.js +2 -9
  3. package/dist/analysis/relationship-classifier.js.map +2 -2
  4. package/dist/analyzers/active-analyzer.js +62 -0
  5. package/dist/analyzers/active-analyzer.js.map +7 -0
  6. package/dist/analyzers/call-graph-utils.js +2 -2
  7. package/dist/analyzers/call-graph-utils.js.map +2 -2
  8. package/dist/analyzers/cards/build.js +191 -0
  9. package/dist/analyzers/cards/build.js.map +7 -0
  10. package/dist/analyzers/cards/classify.js +42 -0
  11. package/dist/analyzers/cards/classify.js.map +7 -0
  12. package/dist/analyzers/cards/edge-index.js +44 -0
  13. package/dist/analyzers/cards/edge-index.js.map +7 -0
  14. package/dist/analyzers/cards/extract.js +138 -0
  15. package/dist/analyzers/cards/extract.js.map +7 -0
  16. package/dist/analyzers/cards/facts.js +46 -0
  17. package/dist/analyzers/cards/facts.js.map +7 -0
  18. package/dist/analyzers/cards/graph.js +42 -0
  19. package/dist/analyzers/cards/graph.js.map +7 -0
  20. package/dist/analyzers/cards/index.js +8 -0
  21. package/dist/analyzers/cards/index.js.map +7 -0
  22. package/dist/analyzers/cards/routes.js +96 -0
  23. package/dist/analyzers/cards/routes.js.map +7 -0
  24. package/dist/analyzers/cards/tier0.js +18 -0
  25. package/dist/analyzers/cards/tier0.js.map +7 -0
  26. package/dist/analyzers/cards/types.js +1 -0
  27. package/dist/analyzers/cards/types.js.map +7 -0
  28. package/dist/analyzers/cbm-analyzer.js +270 -174
  29. package/dist/analyzers/cbm-analyzer.js.map +2 -2
  30. package/dist/analyzers/cbm-responses.js +342 -0
  31. package/dist/analyzers/cbm-responses.js.map +7 -0
  32. package/dist/analyzers/code-changes.js +159 -0
  33. package/dist/analyzers/code-changes.js.map +7 -0
  34. package/dist/analyzers/edge-relationships.js +49 -0
  35. package/dist/analyzers/edge-relationships.js.map +7 -0
  36. package/dist/analyzers/extraction-plan.js +541 -0
  37. package/dist/analyzers/extraction-plan.js.map +7 -0
  38. package/dist/analyzers/index-job.js +229 -0
  39. package/dist/analyzers/index-job.js.map +7 -0
  40. package/dist/analyzers/mapping-loader.js +9 -0
  41. package/dist/analyzers/mapping-loader.js.map +2 -2
  42. package/dist/analyzers/tier0-rules.js +153 -0
  43. package/dist/analyzers/tier0-rules.js.map +7 -0
  44. package/dist/analyzers/types.js.map +1 -1
  45. package/dist/audit/relationships/ai/prompts.js +10 -10
  46. package/dist/audit/relationships/ai/prompts.js.map +2 -2
  47. package/dist/audit/relationships/analysis/layer-templates.js +52 -52
  48. package/dist/audit/relationships/analysis/layer-templates.js.map +1 -1
  49. package/dist/cli.js +23 -11
  50. package/dist/cli.js.map +2 -2
  51. package/dist/coding-agents/default-permissions.js +31 -1
  52. package/dist/coding-agents/default-permissions.js.map +2 -2
  53. package/dist/coding-agents/drbot-mcp.js +269 -0
  54. package/dist/coding-agents/drbot-mcp.js.map +7 -0
  55. package/dist/commands/add.js +7 -4
  56. package/dist/commands/add.js.map +2 -2
  57. package/dist/commands/analyzer.js +143 -40
  58. package/dist/commands/analyzer.js.map +2 -2
  59. package/dist/commands/changeset-verify.js +63 -0
  60. package/dist/commands/changeset-verify.js.map +7 -0
  61. package/dist/commands/changeset.js +80 -29
  62. package/dist/commands/changeset.js.map +2 -2
  63. package/dist/commands/delete.js +10 -4
  64. package/dist/commands/delete.js.map +2 -2
  65. package/dist/commands/farm.js +176 -60
  66. package/dist/commands/farm.js.map +2 -2
  67. package/dist/commands/init.js +9 -26
  68. package/dist/commands/init.js.map +2 -2
  69. package/dist/commands/mcp.js +40 -21
  70. package/dist/commands/mcp.js.map +3 -3
  71. package/dist/commands/relationship.js +208 -37
  72. package/dist/commands/relationship.js.map +2 -2
  73. package/dist/commands/reports.js +3 -3
  74. package/dist/commands/reports.js.map +2 -2
  75. package/dist/commands/update.js +52 -32
  76. package/dist/commands/update.js.map +2 -2
  77. package/dist/commands/upgrade.js +99 -103
  78. package/dist/commands/upgrade.js.map +3 -3
  79. package/dist/commands/validate.js +19 -3
  80. package/dist/commands/validate.js.map +2 -2
  81. package/dist/commands/version.js +1 -1
  82. package/dist/commands/visualize.js +34 -15
  83. package/dist/commands/visualize.js.map +2 -2
  84. package/dist/core/annotation-store.js +15 -5
  85. package/dist/core/annotation-store.js.map +2 -2
  86. package/dist/core/catalog-migration.js +34 -0
  87. package/dist/core/catalog-migration.js.map +7 -0
  88. package/dist/core/changeset-analysis.js +421 -0
  89. package/dist/core/changeset-analysis.js.map +7 -0
  90. package/dist/core/changeset-base-index.js +160 -0
  91. package/dist/core/changeset-base-index.js.map +7 -0
  92. package/dist/core/changeset-brief-compact.js +256 -0
  93. package/dist/core/changeset-brief-compact.js.map +7 -0
  94. package/dist/core/changeset-brief-delta.js +102 -0
  95. package/dist/core/changeset-brief-delta.js.map +7 -0
  96. package/dist/core/changeset-graph.js +281 -0
  97. package/dist/core/changeset-graph.js.map +7 -0
  98. package/dist/core/changeset-only-guard.js +32 -0
  99. package/dist/core/changeset-only-guard.js.map +7 -0
  100. package/dist/core/changeset-summary.js +68 -0
  101. package/dist/core/changeset-summary.js.map +7 -0
  102. package/dist/core/changeset-validator.js +66 -20
  103. package/dist/core/changeset-validator.js.map +2 -2
  104. package/dist/core/changeset-verify.js +848 -0
  105. package/dist/core/changeset-verify.js.map +7 -0
  106. package/dist/core/changeset.js +56 -9
  107. package/dist/core/changeset.js.map +2 -2
  108. package/dist/core/element-type-migration.js +145 -0
  109. package/dist/core/element-type-migration.js.map +7 -0
  110. package/dist/core/extraction-observability.js +161 -0
  111. package/dist/core/extraction-observability.js.map +7 -0
  112. package/dist/core/farm-manifest.js +12 -6
  113. package/dist/core/farm-manifest.js.map +2 -2
  114. package/dist/core/farm-sync-engine.js +1 -1
  115. package/dist/core/farm-sync-engine.js.map +2 -2
  116. package/dist/core/farm-sync-state.js +10 -2
  117. package/dist/core/farm-sync-state.js.map +2 -2
  118. package/dist/core/migration-registry.js +88 -47
  119. package/dist/core/migration-registry.js.map +2 -2
  120. package/dist/core/model-upgrade.js +102 -0
  121. package/dist/core/model-upgrade.js.map +7 -0
  122. package/dist/core/model.js +82 -30
  123. package/dist/core/model.js.map +2 -2
  124. package/dist/core/mutation-handler.js +71 -6
  125. package/dist/core/mutation-handler.js.map +2 -2
  126. package/dist/core/project-init.js +53 -0
  127. package/dist/core/project-init.js.map +7 -0
  128. package/dist/core/relationship-migration-table.js +6639 -0
  129. package/dist/core/relationship-migration-table.js.map +7 -0
  130. package/dist/core/relationship-migration.js +272 -0
  131. package/dist/core/relationship-migration.js.map +7 -0
  132. package/dist/core/relationship-prune.js +49 -0
  133. package/dist/core/relationship-prune.js.map +7 -0
  134. package/dist/core/relationship-staging.js +161 -0
  135. package/dist/core/relationship-staging.js.map +7 -0
  136. package/dist/core/relationships.js +26 -4
  137. package/dist/core/relationships.js.map +2 -2
  138. package/dist/core/report-data-model.js +7 -13
  139. package/dist/core/report-data-model.js.map +2 -2
  140. package/dist/core/staged-changeset-storage.js +145 -18
  141. package/dist/core/staged-changeset-storage.js.map +2 -2
  142. package/dist/core/staged-source-reference.js +28 -0
  143. package/dist/core/staged-source-reference.js.map +7 -0
  144. package/dist/core/staging-area.js +166 -24
  145. package/dist/core/staging-area.js.map +2 -2
  146. package/dist/core/upgrade-plan.js +117 -0
  147. package/dist/core/upgrade-plan.js.map +7 -0
  148. package/dist/core/virtual-projection.js +13 -5
  149. package/dist/core/virtual-projection.js.map +2 -2
  150. package/dist/export/archimate-exporter.js +1 -0
  151. package/dist/export/archimate-exporter.js.map +2 -2
  152. package/dist/generated/compiled-validators.js +2 -2
  153. package/dist/generated/compiled-validators.js.map +2 -2
  154. package/dist/generated/layer-registry.js +16 -16
  155. package/dist/generated/layer-registry.js.map +2 -2
  156. package/dist/generated/node-types.js +186 -168
  157. package/dist/generated/node-types.js.map +2 -2
  158. package/dist/generated/relationship-index.js +2468 -7913
  159. package/dist/generated/relationship-index.js.map +2 -2
  160. package/dist/integrations/claude_code/.claude-plugin/plugin.json +24 -0
  161. package/dist/integrations/claude_code/agents/dr-architect.md +30 -3
  162. package/dist/integrations/claude_code/agents/dr-extractor.md +8 -2
  163. package/dist/integrations/claude_code/commands/dr-analyzer.md +565 -0
  164. package/dist/integrations/claude_code/commands/dr-changeset.md +2 -1
  165. package/dist/integrations/claude_code/commands/dr-map.md +20 -1
  166. package/dist/integrations/claude_code/commands/dr-plan.md +66 -0
  167. package/dist/integrations/claude_code/commands/dr-relate.md +106 -96
  168. package/dist/integrations/claude_code/commands/dr-verify.md +45 -2
  169. package/dist/integrations/claude_code/docs/END_TO_END_WALKTHROUGH.md +14 -0
  170. package/dist/integrations/claude_code/docs/MCP_SERVER.md +47 -26
  171. package/dist/integrations/claude_code/docs/QUICK_START.md +37 -8
  172. package/dist/integrations/claude_code/docs/README.md +68 -2
  173. package/dist/integrations/claude_code/plugin-agents/dr-advisor.md +255 -0
  174. package/dist/integrations/claude_code/plugin-agents/dr-architect.md +306 -0
  175. package/dist/integrations/claude_code/skills/dr_01_motivation_layer/SKILL.md +93 -72
  176. package/dist/integrations/claude_code/skills/dr_02_business_layer/SKILL.md +163 -126
  177. package/dist/integrations/claude_code/skills/dr_03_product_layer/SKILL.md +161 -126
  178. package/dist/integrations/claude_code/skills/dr_04_security_layer/SKILL.md +153 -133
  179. package/dist/integrations/claude_code/skills/dr_05_application_layer/SKILL.md +129 -100
  180. package/dist/integrations/claude_code/skills/dr_06_technology_layer/SKILL.md +111 -94
  181. package/dist/integrations/claude_code/skills/dr_07_api_layer/SKILL.md +143 -157
  182. package/dist/integrations/claude_code/skills/dr_08_data_model_layer/SKILL.md +117 -33
  183. package/dist/integrations/claude_code/skills/dr_09_dataset_layer/SKILL.md +74 -25
  184. package/dist/integrations/claude_code/skills/dr_10_ux_layer/SKILL.md +88 -12
  185. package/dist/integrations/claude_code/skills/dr_11_navigation_layer/SKILL.md +83 -24
  186. package/dist/integrations/claude_code/skills/dr_12_apm_layer/SKILL.md +57 -12
  187. package/dist/integrations/claude_code/skills/dr_13_testing_layer/SKILL.md +95 -15
  188. package/dist/integrations/claude_code/skills/dr_change_planning/SKILL.md +178 -0
  189. package/dist/integrations/claude_code/skills/dr_changeset_reviewer/SKILL.md +8 -0
  190. package/dist/integrations/claude_code/skills/dr_engineering_guide/SKILL.md +6 -1
  191. package/dist/integrations/github_copilot/agents/dr-architect.md +3 -1
  192. package/dist/integrations/github_copilot/skills/dr_01_motivation_layer/SKILL.md +182 -102
  193. package/dist/integrations/github_copilot/skills/dr_02_business_layer/SKILL.md +266 -148
  194. package/dist/integrations/github_copilot/skills/dr_03_product_layer/SKILL.md +547 -86
  195. package/dist/integrations/github_copilot/skills/dr_04_security_layer/SKILL.md +164 -169
  196. package/dist/integrations/github_copilot/skills/dr_05_application_layer/SKILL.md +420 -150
  197. package/dist/integrations/github_copilot/skills/dr_06_technology_layer/SKILL.md +331 -138
  198. package/dist/integrations/github_copilot/skills/dr_07_api_layer/SKILL.md +265 -201
  199. package/dist/integrations/github_copilot/skills/dr_08_data_model_layer/SKILL.md +181 -58
  200. package/dist/integrations/github_copilot/skills/dr_09_dataset_layer/SKILL.md +209 -57
  201. package/dist/integrations/github_copilot/skills/dr_10_ux_layer/SKILL.md +277 -112
  202. package/dist/integrations/github_copilot/skills/dr_11_navigation_layer/SKILL.md +219 -70
  203. package/dist/integrations/github_copilot/skills/dr_12_apm_layer/SKILL.md +189 -105
  204. package/dist/integrations/github_copilot/skills/dr_13_testing_layer/SKILL.md +225 -102
  205. package/dist/integrations/github_copilot/skills/dr_change_planning/SKILL.md +177 -0
  206. package/dist/integrations/github_copilot/skills/dr_changeset_reviewer/SKILL.md +3 -0
  207. package/dist/integrations/hash-utils.js.map +2 -2
  208. package/dist/mcp/api-key-manager.js +14 -1
  209. package/dist/mcp/api-key-manager.js.map +2 -2
  210. package/dist/mcp/changeset-only.js +45 -0
  211. package/dist/mcp/changeset-only.js.map +7 -0
  212. package/dist/mcp/project-root.js +85 -0
  213. package/dist/mcp/project-root.js.map +7 -0
  214. package/dist/mcp/server-instructions.js +27 -0
  215. package/dist/mcp/server-instructions.js.map +7 -0
  216. package/dist/mcp/strict-schema.js +52 -0
  217. package/dist/mcp/strict-schema.js.map +7 -0
  218. package/dist/mcp/tool-registry.js +55 -5
  219. package/dist/mcp/tool-registry.js.map +2 -2
  220. package/dist/mcp/tools/changeset-analysis-tools.js +98 -0
  221. package/dist/mcp/tools/changeset-analysis-tools.js.map +7 -0
  222. package/dist/mcp/tools/changeset-commit.js +224 -0
  223. package/dist/mcp/tools/changeset-commit.js.map +7 -0
  224. package/dist/mcp/tools/changeset-editing.js +260 -0
  225. package/dist/mcp/tools/changeset-editing.js.map +7 -0
  226. package/dist/mcp/tools/changeset-lifecycle.js +83 -0
  227. package/dist/mcp/tools/changeset-lifecycle.js.map +7 -0
  228. package/dist/mcp/tools/changeset-shared.js +31 -0
  229. package/dist/mcp/tools/changeset-shared.js.map +7 -0
  230. package/dist/mcp/tools/changeset-show.js +17 -1
  231. package/dist/mcp/tools/changeset-show.js.map +2 -2
  232. package/dist/mcp/tools/changeset-verify.js +49 -0
  233. package/dist/mcp/tools/changeset-verify.js.map +7 -0
  234. package/dist/mcp/tools/codebase-extract.js +836 -0
  235. package/dist/mcp/tools/codebase-extract.js.map +7 -0
  236. package/dist/mcp/tools/codebase-index.js +125 -0
  237. package/dist/mcp/tools/codebase-index.js.map +7 -0
  238. package/dist/mcp/tools/codebase-shared.js +265 -0
  239. package/dist/mcp/tools/codebase-shared.js.map +7 -0
  240. package/dist/mcp/tools/codebase-verify.js +48 -0
  241. package/dist/mcp/tools/codebase-verify.js.map +7 -0
  242. package/dist/mcp/tools/index.js +34 -1
  243. package/dist/mcp/tools/index.js.map +2 -2
  244. package/dist/mcp/tools/model-add.js +191 -74
  245. package/dist/mcp/tools/model-add.js.map +2 -2
  246. package/dist/mcp/tools/model-delete.js +2 -2
  247. package/dist/mcp/tools/model-delete.js.map +2 -2
  248. package/dist/mcp/tools/model-search.js +14 -0
  249. package/dist/mcp/tools/model-search.js.map +2 -2
  250. package/dist/mcp/tools/model-show.js +29 -2
  251. package/dist/mcp/tools/model-show.js.map +2 -2
  252. package/dist/mcp/tools/model-trace.js +93 -30
  253. package/dist/mcp/tools/model-trace.js.map +2 -2
  254. package/dist/mcp/tools/model-update.js +46 -26
  255. package/dist/mcp/tools/model-update.js.map +2 -2
  256. package/dist/mcp/tools/model-validate.js +46 -4
  257. package/dist/mcp/tools/model-validate.js.map +2 -2
  258. package/dist/mcp/tools/project-status-collectors.js +381 -0
  259. package/dist/mcp/tools/project-status-collectors.js.map +7 -0
  260. package/dist/mcp/tools/project-status.js +237 -0
  261. package/dist/mcp/tools/project-status.js.map +7 -0
  262. package/dist/mcp/tools/project-tools.js +505 -0
  263. package/dist/mcp/tools/project-tools.js.map +7 -0
  264. package/dist/mcp/tools/relationship-tools.js +167 -0
  265. package/dist/mcp/tools/relationship-tools.js.map +7 -0
  266. package/dist/mcp/tools/review-open.js +210 -0
  267. package/dist/mcp/tools/review-open.js.map +7 -0
  268. package/dist/mcp/tools/shared.js +35 -4
  269. package/dist/mcp/tools/shared.js.map +2 -2
  270. package/dist/mcp/tools/spec-type.js +90 -0
  271. package/dist/mcp/tools/spec-type.js.map +7 -0
  272. package/dist/reports/model-report-orchestrator.js +31 -2
  273. package/dist/reports/model-report-orchestrator.js.map +2 -2
  274. package/dist/schemas/bundled/analyzers/cbm.json +1200 -70
  275. package/dist/schemas/bundled/analyzers/manifest.json +2 -2
  276. package/dist/schemas/bundled/api.json +1029 -1658
  277. package/dist/schemas/bundled/apm.json +499 -734
  278. package/dist/schemas/bundled/application.json +735 -371
  279. package/dist/schemas/bundled/base.json +3 -220
  280. package/dist/schemas/bundled/business.json +452 -366
  281. package/dist/schemas/bundled/data-model.json +395 -411
  282. package/dist/schemas/bundled/data-store.json +334 -558
  283. package/dist/schemas/bundled/manifest.json +18 -18
  284. package/dist/schemas/bundled/motivation.json +349 -368
  285. package/dist/schemas/bundled/navigation.json +415 -731
  286. package/dist/schemas/bundled/product.json +325 -159
  287. package/dist/schemas/bundled/security.json +864 -1232
  288. package/dist/schemas/bundled/technology.json +574 -703
  289. package/dist/schemas/bundled/testing.json +865 -1646
  290. package/dist/schemas/bundled/ux.json +739 -1352
  291. package/dist/server/schemas.js +8 -0
  292. package/dist/server/schemas.js.map +2 -2
  293. package/dist/server/server.js +686 -231
  294. package/dist/server/server.js.map +3 -3
  295. package/dist/server/viewer-registry.js +264 -0
  296. package/dist/server/viewer-registry.js.map +7 -0
  297. package/dist/server-entry.js +2 -1
  298. package/dist/server-entry.js.map +2 -2
  299. package/dist/telemetry/index.js +1 -1
  300. package/dist/utils/ansi-suppressor.js +6 -8
  301. package/dist/utils/ansi-suppressor.js.map +2 -2
  302. package/dist/utils/attribute-patch.js +41 -0
  303. package/dist/utils/attribute-patch.js.map +7 -0
  304. package/dist/utils/error-hints.js +29 -0
  305. package/dist/utils/error-hints.js.map +7 -0
  306. package/dist/utils/errors.js +9 -3
  307. package/dist/utils/errors.js.map +2 -2
  308. package/dist/utils/id-generator.js +5 -2
  309. package/dist/utils/id-generator.js.map +2 -2
  310. package/dist/utils/project-paths.js +26 -1
  311. package/dist/utils/project-paths.js.map +2 -2
  312. package/dist/utils/source-reference.js +64 -31
  313. package/dist/utils/source-reference.js.map +2 -2
  314. package/dist/utils/spec-version.js +2 -2
  315. package/dist/utils/spec-version.js.map +1 -1
  316. package/dist/validators/composed-reference-validator.js +5 -27
  317. package/dist/validators/composed-reference-validator.js.map +2 -2
  318. package/dist/validators/model-warnings.js +28 -0
  319. package/dist/validators/model-warnings.js.map +7 -0
  320. package/dist/validators/reference-validator.js +0 -7
  321. package/dist/validators/reference-validator.js.map +2 -2
  322. package/dist/validators/relationship-schema-validator.js +3 -3
  323. package/dist/validators/relationship-schema-validator.js.map +2 -2
  324. package/dist/validators/schema-validator.js +27 -9
  325. package/dist/validators/schema-validator.js.map +2 -2
  326. package/dist/validators/types.js.map +1 -1
  327. package/dist/viewer/README.md +6 -6
  328. package/dist/viewer/assets/main-CUOQGGRA.css +1 -0
  329. package/dist/viewer/assets/main-DvH3gYrI.js +84 -0
  330. package/dist/viewer/index.html +2 -2
  331. package/dist/viewer/manifest.json +10 -10
  332. package/dist/viewer/version.json +1 -1
  333. package/package.json +2 -1
  334. package/dist/viewer/assets/main-B7AOQXXX.js +0 -81
  335. package/dist/viewer/assets/main-vdrFrG7q.css +0 -1
@@ -13,13 +13,13 @@ triggers:
13
13
  "user experience",
14
14
  "state machine"
15
15
  ]
16
- version: 0.8.1
16
+ version: 0.8.3
17
17
  ---
18
18
 
19
19
  # UX Layer Skill
20
20
 
21
21
  **Layer Number:** 09
22
- **Specification:** Metadata Model Spec v0.8.1
22
+ **Specification:** Metadata Model Spec v0.8.3
23
23
  **Purpose:** Defines user experience using Three-Tier Architecture, specifying views, components, state machines, and interactions.
24
24
 
25
25
  ---
@@ -28,11 +28,10 @@ version: 0.8.1
28
28
 
29
29
  The UX Layer captures **user experience design**:
30
30
 
31
- - **VIEWS** - Routable screens/pages with layouts
31
+ - **VIEWS** - Screens/pages, modals, dialogs, drawers, and panels
32
32
  - **COMPONENTS** - UI components (forms, tables, charts, cards)
33
33
  - **STATE MACHINES** - Experience states and transitions
34
34
  - **ACTIONS** - Interactive elements (buttons, links, voice commands)
35
- - **VALIDATION** - Client-side validation rules
36
35
  - **LAYOUTS** - Layout configurations (grid, flex, etc.)
37
36
 
38
37
  This layer uses **Three-Tier Architecture** (v0.5.0+):
@@ -41,7 +40,19 @@ This layer uses **Three-Tier Architecture** (v0.5.0+):
41
40
  2. **Application Tier** - Application-wide configuration
42
41
  3. **Experience Tier** - Experience-specific views and flows
43
42
 
44
- **Central Entity:** The **View** (routable screen) is the core modeling unit.
43
+ **Central Entity:** The **View** (page, modal, dialog, drawer, or panel) is the core modeling unit.
44
+
45
+ ---
46
+
47
+ ## When to Use This Skill
48
+
49
+ Activate when the user:
50
+
51
+ - Mentions "UX", "UI", "view", "screen", "component", "form"
52
+ - Wants to define user interfaces or user experiences
53
+ - Asks about state machines, transitions, or user flows
54
+ - Needs to model screens, forms, or interactive elements
55
+ - Wants to link UX to navigation, APIs, or business processes
45
56
 
46
57
  ---
47
58
 
@@ -50,7 +61,7 @@ This layer uses **Three-Tier Architecture** (v0.5.0+):
50
61
  > **CLI Introspection:** Run `dr schema types ux` for the authoritative, always-current list of node types.
51
62
  > Run `dr schema node <type-id>` for full attribute details on any type.
52
63
 
53
- ### Three-Tier Architecture (26 entities)
64
+ ### Three-Tier Architecture (22 entities)
54
65
 
55
66
  **Library Tier:**
56
67
 
@@ -59,6 +70,10 @@ This layer uses **Three-Tier Architecture** (v0.5.0+):
59
70
  - **LibrarySubView** - Reusable component groupings
60
71
  - **StatePattern** - Reusable state machine patterns
61
72
  - **ActionPattern** - Reusable action definitions
73
+ - **StateActionTemplate** - Reusable template for state lifecycle actions (required: `action`)
74
+ - **TransitionTemplate** - Reusable template for state transitions (required: `to`, `trigger`)
75
+ - **TableColumn** - Column definition for table components (required: `header`, `field`)
76
+ - **ChartSeries** - Data series configuration for chart components (required: `label`, `dataField`)
62
77
 
63
78
  **Application Tier:**
64
79
 
@@ -67,43 +82,146 @@ This layer uses **Three-Tier Architecture** (v0.5.0+):
67
82
  **Experience Tier:**
68
83
 
69
84
  - **UXSpec** - Container for experience specification
70
- - **View** - Routable screen/page
85
+ - **View** - Screen/page/modal/dialog/drawer/panel (required: `type`)
71
86
  - **SubView** - Component grouping within view
72
87
  - **ComponentInstance** - Instance of library component
73
- - **ActionComponent** - Interactive element
88
+ - **ComponentReference** - Reference to a library component by ID (required: `ref`)
89
+ - **ActionComponent** - Interactive element (button, link, voice command)
74
90
  - **ExperienceState** - State in state machine
75
91
  - **StateAction** - Action during state lifecycle
76
92
  - **StateTransition** - Transition between states
77
- - **ValidationRule** - Client-side validation
93
+ - **LayoutConfig** - Layout configuration for views and components (required: `type`)
94
+ - **DataConfig** - Data binding configuration (required: `source`, `target`)
95
+ - **ErrorConfig** - Error handling configuration for components
78
96
 
79
97
  ---
80
98
 
81
- ## When to Use This Skill
99
+ ## Type Decision Tree
82
100
 
83
- Activate when the user:
101
+ Use this decision tree **before assigning a type** to any UX element.
84
102
 
85
- - Mentions "UX", "UI", "view", "screen", "component", "form"
86
- - Wants to define user interfaces or user experiences
87
- - Asks about state machines, transitions, or user flows
88
- - Needs to model screens, forms, or interactive elements
89
- - Wants to link UX to navigation, APIs, or business processes
103
+ ```
104
+ LIBRARY TIER — reusable, cross-experience artifacts
105
+ ├── Component library container? → ux.uxlibrary
106
+ ├── Reusable UI component type (form, table, chart, card)? → ux.librarycomponent
107
+ ├── Reusable grouping of components? → ux.librarysubview
108
+ ├── Reusable state machine pattern? → ux.statepattern
109
+ ├── Reusable action definition? → ux.actionpattern
110
+ ├── Reusable parameterized state action template? → ux.stateactiontemplate
111
+ │ (no lifecycle binding; has parameters array)
112
+ ├── Reusable transition template with animation? → ux.transitiontemplate
113
+ │ (has animationType/duration/easing; both `to` and `trigger` required)
114
+ ├── Column definition for a table component? → ux.tablecolumn
115
+ └── Data series definition for a chart component? → ux.chartseries
116
+
117
+ APPLICATION TIER — app-wide UX configuration
118
+ └── Application-wide UX configuration (channel required)? → ux.uxapplication
119
+
120
+ EXPERIENCE TIER — specific to a view or experience
121
+ ├── Top-level experience specification container? → ux.uxspec
122
+ ├── Screen, page, modal, dialog, drawer, or panel? → ux.view
123
+ │ (required: type enum — page|modal|dialog|drawer|panel|overlay|embedded|full-screen)
124
+ ├── Section or grouping within a view? → ux.subview
125
+ ├── Placed instance of a component on a view? → ux.componentinstance
126
+ │ (has `order` for positioning and `props` for overrides)
127
+ ├── Typed reference to a component by slot or variant? → ux.componentreference
128
+ │ (ref required; use when targeting a specific variant or slot, not placement)
129
+ ├── Interactive element (button, link, voice command)? → ux.actioncomponent
130
+ ├── State in an experience state machine? → ux.experiencestate
131
+ ├── Concrete action bound to a state lifecycle? → ux.stateaction
132
+ │ (has lifecycle: on-enter|on-exit|on-transition and timing; no parameters)
133
+ ├── Concrete transition with trigger and optional guard? → ux.statetransition
134
+ │ (trigger required; has guard conditions and inline actions; no animation)
135
+ ├── Layout configuration (grid, flex, block, etc.)? → ux.layoutconfig
136
+ ├── Data binding configuration (source → target)? → ux.dataconfig
137
+ └── Error handling configuration? → ux.errorconfig
138
+ ```
90
139
 
91
140
  ---
92
141
 
93
- ## Cross-Layer Relationships
94
-
95
- **Outgoing (UX → Other Layers):**
96
-
97
- - `motivation.*` → Motivation Layer (UX supports goals)
98
- - `business.*` → Business Layer (UX realizes business processes)
99
- - `api.*` → API Layer (API calls from components)
100
- - `data.*` → Data Model Layer (form validation rules)
101
- - `navigation.*` → Navigation Layer (routing to views)
142
+ ## Intra-Layer Relationships
143
+
144
+ Placement is `composes`: a view composes its sub-views, instances and action components, and an
145
+ instance composes its nested instances, slots, chart series and table columns. Instances and placed
146
+ sub-views `realizes` their library definition. Elements `applies` their layout, `binds-to` their data
147
+ config and `uses` their error config. A state composes its outgoing transitions, which `flows-to`
148
+ the next state. UX reaches other layers only through the interfaces and features a view realizes,
149
+ the operations an action triggers and the data a data config maps to.
150
+
151
+ | Source Type | Predicate | Target Type | Example |
152
+ | ------------------ | ------------ | ------------------- | ------------------------------------------------------------- |
153
+ | UXApplication | aggregates | UXSpec | "Storefront Web" aggregates the "Checkout Experience" spec |
154
+ | UXSpec | aggregates | View | "Checkout Experience" aggregates the "Cart" view |
155
+ | UXSpec | aggregates | ExperienceState | "Checkout Experience" aggregates the "Payment Pending" state |
156
+ | UXSpec | uses | UXLibrary | "Checkout Experience" uses the "Design System" library |
157
+ | UXLibrary | aggregates | LibraryComponent | "Design System" aggregates "Data Table" |
158
+ | UXLibrary | aggregates | LibrarySubView | "Design System" aggregates "Address Form Group" |
159
+ | View | composes | SubView | "Cart" view composes the "Order Summary" panel |
160
+ | View | composes | ComponentInstance | "Cart" view composes "Cart Items Table" |
161
+ | View | composes | ActionComponent | "Cart" view composes the "Checkout" button |
162
+ | View | applies | LayoutConfig | "Cart" view applies the "Two-Column Grid" layout |
163
+ | View | binds-to | DataConfig | "Cart" view binds to "Cart Data" |
164
+ | View | uses | ErrorConfig | "Cart" view uses "Cart Load Error" |
165
+ | SubView | realizes | LibrarySubView | "Shipping Address" section realizes "Address Form Group" |
166
+ | SubView | composes | ComponentInstance | "Order Summary" panel composes "Totals Card" |
167
+ | ComponentInstance | realizes | LibraryComponent | "Cart Items Table" realizes "Data Table" |
168
+ | ComponentInstance | binds-to | DataConfig | "Cart Items Table" binds to "Cart Data" |
169
+ | ComponentInstance | composes | TableColumn | "Cart Items Table" composes the "Quantity" column |
170
+ | ComponentInstance | composes | ChartSeries | "Revenue Chart" composes the "Monthly Revenue" series |
171
+ | ComponentReference | references | LibraryComponent | "Primary Button Slot" references "Button" (variant `primary`) |
172
+ | LibraryComponent | composes | LibraryComponent | "Data Table" composes "Pagination Bar" |
173
+ | LibraryComponent | specializes | LibraryComponent | "Currency Input" specializes "Text Input" |
174
+ | LibraryComponent | uses | StatePattern | "Data Table" uses the "Loading / Loaded / Error" pattern |
175
+ | ActionPattern | governs | ActionComponent | The "Submit" action pattern governs the "Checkout" button |
176
+ | ActionComponent | triggers | StateTransition | "Checkout" button triggers "Begin Payment" |
177
+ | ActionComponent | navigates-to | View | "Continue Shopping" link navigates to the "Catalog" view |
178
+ | ExperienceState | composes | StateTransition | "Cart Ready" composes "Begin Payment" |
179
+ | StateTransition | flows-to | ExperienceState | "Begin Payment" flows to "Payment Pending" |
180
+ | StateTransition | triggers | StateAction | "Begin Payment" triggers "Disable Checkout Button" |
181
+ | StateAction | realizes | StateActionTemplate | "Show Spinner" realizes the "Show Loading Indicator" template |
182
+ | StatePattern | aggregates | ExperienceState | "Loading / Loaded / Error" aggregates "Loading" |
183
+ | StateTransition | uses | TransitionTemplate | "Open Cart" uses the "Slide-In Drawer" template |
184
+ | DataConfig | uses | ErrorConfig | "Cart Data" uses the "Cart Load Error" config |
102
185
 
103
- **Incoming (Other Layers → UX):**
186
+ ---
104
187
 
105
- - Navigation Layer → UX (routes point to views)
106
- - Business Layer → UX (business processes trigger UX flows)
188
+ ## Cross-Layer References
189
+
190
+ ### Outgoing References (UX → Other Layers)
191
+
192
+ | Source Type | Predicate | Target Type | Example |
193
+ | ---------------- | ---------- | ---------------------------------- | --------------------------------------------------------------- |
194
+ | View | realizes | `product.feature` | "Cart" view realizes the "Shopping Cart" feature |
195
+ | View | references | `business.businessobject` | "Order Detail" view references the "Order" business object |
196
+ | View | realizes | `application.applicationinterface` | "Cart" view realizes the "Storefront Web UI" interface |
197
+ | View | satisfies | `motivation.requirement` | "Checkout" view satisfies "Guest checkout must be supported" |
198
+ | View | requires | `security.permission` | "Admin Orders" view requires the `orders:read` permission |
199
+ | View | serves | `business.businessrole` | "Admin Orders" view serves the "Fulfillment Clerk" role |
200
+ | ActionComponent | triggers | `api.operation` | "Place Order" button triggers `POST /orders` |
201
+ | ActionComponent | requires | `security.permission` | "Refund" button requires the `orders:refund` permission |
202
+ | StateAction | triggers | `api.operation` | "Load Cart" on-enter action triggers `GET /cart` |
203
+ | DataConfig | maps-to | `api.response` | "Cart Data" maps to the `GET /cart` 200 response |
204
+ | DataConfig | maps-to | `api.requestbody` | "Checkout Form Data" maps to the `POST /orders` request body |
205
+ | DataConfig | maps-to | `data-model.objectschema` | "Cart Data" maps to the "Cart" schema |
206
+ | TableColumn | maps-to | `data-model.schemaproperty` | "Quantity" column maps to the "quantity" property |
207
+ | TableColumn | references | `security.fieldaccesscontrol` | "Card Number" column references the "PAN Masking" control |
208
+ | ErrorConfig | references | `api.response` | "Payment Declined" references the `POST /payments` 402 response |
209
+ | LibraryComponent | depends-on | `technology.systemsoftware` | "Data Table" depends on "React 18" |
210
+
211
+ ### Incoming References (Other Layers → UX)
212
+
213
+ | Source Type | Predicate | Target Type | Example |
214
+ | --------------------------------- | --------- | --------------- | --------------------------------------------------------------- |
215
+ | `navigation.route` | maps-to | View | `/cart` route maps to the "Cart" view |
216
+ | `navigation.navigationtransition` | triggers | StateTransition | "Cart → Checkout" transition triggers "Begin Payment" |
217
+ | `navigation.navigationguard` | triggers | ExperienceState | "Require Login" guard triggers the "Signed Out" state |
218
+ | `testing.testcasesketch` | tests | View | "Empty cart renders placeholder" tests the "Cart" view |
219
+ | `testing.testcasesketch` | tests | ActionComponent | "Checkout disabled when cart empty" tests the "Checkout" button |
220
+ | `apm.span` | monitors | View | "page.load /cart" span monitors the "Cart" view |
221
+ | `apm.metricinstrument` | monitors | ActionComponent | "checkout_click_count" monitors the "Checkout" button |
222
+
223
+ > Routing is modelled from the Navigation Layer: a `navigation.route` `maps-to` the view it shows,
224
+ > rather than the view pointing at the route.
107
225
 
108
226
  ---
109
227
 
@@ -111,11 +229,65 @@ Activate when the user:
111
229
 
112
230
  1. **Reusability** - Use library components for consistency
113
231
  2. **State machines** - Model complex flows with states/transitions
114
- 3. **Validation** - Add client-side validation rules
232
+ 3. **Error handling** - Define error states, ErrorConfig, and recovery transitions
115
233
  4. **Accessibility** - Consider accessibility requirements
116
234
  5. **Responsive** - Design for multiple screen sizes
117
235
  6. **Performance** - Set performance targets (load time, interaction latency)
118
- 7. **Error handling** - Define error states and messages
236
+
237
+ ---
238
+
239
+ ## React Flow / Graph Visualization Patterns
240
+
241
+ When the codebase uses a graph visualization library (React Flow, D3, Cytoscape), apply these patterns in addition to the standard UX decision tree.
242
+
243
+ ### Configuration-Driven Node Renderer
244
+
245
+ ```tsx
246
+ // src/core/nodes/components/UnifiedNode.tsx
247
+ export function UnifiedNode({ data }: NodeProps<UnifiedNodeData>) {
248
+ const config = nodeConfigLoader.get(data.elementType);
249
+ return <div style={config.styles}>{data.name}</div>;
250
+ }
251
+ // src/core/nodes/nodeConfig.json ← drives all 20 node type styles
252
+ ```
253
+
254
+ → `UnifiedNode.tsx` → `ux.librarycomponent.unified-node` (type: graph-node)
255
+ → `nodeConfig.json` → `data-model.objectschema.node-config`
256
+ → Do NOT create 20 separate elements for each node type in the config — the configuration-driven system as a whole is one `librarycomponent`
257
+
258
+ ### Custom Edge Type
259
+
260
+ ```tsx
261
+ // src/core/edges/ElbowEdge.tsx
262
+ export function ElbowEdge(props: EdgeProps) { ... }
263
+ ```
264
+
265
+ → `ux.librarycomponent.elbow-edge` (type: graph-edge)
266
+ → Each distinct custom edge type → one `librarycomponent`
267
+
268
+ ### Layer Container / Swimlane Node
269
+
270
+ ```tsx
271
+ // src/core/nodes/LayerContainerNode.tsx
272
+ export function LayerContainerNode({ data }: NodeProps) { ... }
273
+ ```
274
+
275
+ → `ux.librarycomponent.layer-container-node` (type: graph-container)
276
+
277
+ ### Graph Canvas Component
278
+
279
+ ```tsx
280
+ // src/core/components/GraphViewer.tsx
281
+ export function GraphViewer({ nodes, edges }) {
282
+ return <ReactFlow nodeTypes={nodeTypes} edgeTypes={edgeTypes} />;
283
+ }
284
+ ```
285
+
286
+ → Already captured in the application layer as `ApplicationComponent`. Do NOT add it again as a UX element — the `ux.view.*` that represents the graph page already serves this purpose in the UX layer.
287
+
288
+ ### Sub-components (field lists, tooltips, badges)
289
+
290
+ `FieldList.tsx`, `FieldTooltip.tsx`, `RelationshipBadge.tsx`, `BadgeRenderer.tsx` are internal implementation details of `UnifiedNode`. Do NOT add them as separate `librarycomponent` entries.
119
291
 
120
292
  ---
121
293
 
@@ -123,99 +295,61 @@ Activate when the user:
123
295
 
124
296
  ```bash
125
297
  # Add view
126
- dr add ux view --name "User Profile" --property route=/profile
298
+ dr add ux view "User Profile" --description "User profile page"
127
299
 
128
300
  # Add component instance
129
- dr add ux component-instance --name "Profile Form"
301
+ dr add ux component-instance "Profile Form"
130
302
 
131
303
  # List views
132
- dr list ux view
304
+ dr list ux --type view
133
305
 
134
306
  # Validate UX layer
135
- dr validate --layer ux
307
+ dr validate --layers ux
136
308
 
137
309
  # Export UX documentation
138
- dr export --layer ux --format markdown
310
+ dr export markdown --layers ux
139
311
  ```
140
312
 
141
313
  ---
142
314
 
143
- ## Example: Login View
144
-
145
- ```yaml
146
- id: ux.view.login
147
- name: "Login View"
148
- type: view
149
- properties:
150
- route: /login
151
- layout:
152
- type: centered
153
- maxWidth: 400px
154
- components:
155
- - id: login-form
156
- componentRef: library.component.form-field
157
- dataBinding:
158
- source: api.operation.login
159
- submitAction: POST /api/auth/login
160
- fields:
161
- - name: email
162
- type: email
163
- required: true
164
- validation:
165
- - type: email-format
166
- - type: required
167
- - name: password
168
- type: password
169
- required: true
170
- validation:
171
- - type: min-length
172
- value: 8
173
- actions:
174
- - id: submit-button
175
- type: button
176
- label: "Login"
177
- action: submit-form
178
- target: login-form
179
- - id: forgot-password
180
- type: link
181
- label: "Forgot password?"
182
- navigation: /forgot-password
183
- states:
184
- - id: idle
185
- initial: true
186
- onEnter: []
187
- - id: submitting
188
- onEnter:
189
- - action: disable-form
190
- - action: show-spinner
191
- - id: success
192
- onEnter:
193
- - action: navigate
194
- target: /dashboard
195
- - id: error
196
- onEnter:
197
- - action: show-error
198
- - action: enable-form
199
- transitions:
200
- - from: idle
201
- to: submitting
202
- trigger: submit
203
- - from: submitting
204
- to: success
205
- trigger: success
206
- - from: submitting
207
- to: error
208
- trigger: failure
209
- - from: error
210
- to: idle
211
- trigger: retry
212
- motivation:
213
- supports-goals:
214
- - motivation.goal.user-authentication
215
- api:
216
- operationId: login
217
- navigation:
218
- route-ref: navigation.route.login
315
+ ## Example: Login Screen
316
+
317
+ A login page with a form component, state machine, and data binding:
318
+
319
+ ```bash
320
+ # Add the view (page type, routable)
321
+ dr add ux view "Login" --description "Login page" --attributes '{"type":"page","routable":true}'
322
+ # → id: ux.view.login
323
+
324
+ # Add a form component from the library
325
+ dr add ux librarycomponent "Login Form" --description "Email/password form" --attributes '{"type":"form"}'
326
+ # → id: ux.librarycomponent.login-form
327
+
328
+ # Place the form as an instance on the login view
329
+ dr add ux componentinstance "Login Form Instance"
330
+ # → id: ux.componentinstance.login-form-instance
331
+
332
+ # Add states for the login flow
333
+ dr add ux experiencestate "Idle"
334
+ dr add ux experiencestate "Submitting"
335
+ dr add ux experiencestate "Error"
336
+
337
+ # Add a transition: click submit → submitting
338
+ dr add ux statetransition "Submit Clicked" --attributes '{"trigger":"click","to":"ux.experiencestate.submitting"}'
339
+ # → id: ux.statetransition.submit-clicked
340
+
341
+ # Add data config binding the form to the API
342
+ dr add ux dataconfig "Login Data" --attributes '{"source":"api","target":"ux.componentinstance.login-form-instance"}'
343
+
344
+ # Add error config for failed login
345
+ dr add ux errorconfig "Login Error" --description "Show inline error on auth failure"
346
+
347
+ # Wire the elements together
348
+ dr relationship add ux.view.login ux.componentinstance.login-form-instance --predicate composes
349
+ dr relationship add ux.componentinstance.login-form-instance ux.librarycomponent.login-form --predicate realizes
350
+ dr relationship add ux.statetransition.submit-clicked ux.experiencestate.submitting --predicate flows-to
351
+ dr relationship add ux.componentinstance.login-form-instance ux.dataconfig.login-data --predicate binds-to
352
+ dr relationship add ux.view.login ux.errorconfig.login-error --predicate uses
219
353
  ```
220
354
 
221
355
  ---
@@ -223,8 +357,39 @@ properties:
223
357
  ## Pitfalls to Avoid
224
358
 
225
359
  - ❌ Not using library components (inconsistent UX)
226
- - ❌ Missing validation rules (poor user experience)
227
360
  - ❌ Complex state machines without documentation
228
361
  - ❌ Not linking to API operations or navigation routes
229
362
  - ❌ Missing error states and handling
230
363
  - ❌ No performance targets defined
364
+
365
+ ---
366
+
367
+ ## Coverage Completeness Checklist
368
+
369
+ Before declaring UX layer extraction complete, verify each type was considered:
370
+
371
+ - [ ] **ux.uxlibrary** — Component library container
372
+ - [ ] **ux.librarycomponent** — Reusable UI component (form-field, table, chart, card)
373
+ - [ ] **ux.librarysubview** — Reusable grouping of components
374
+ - [ ] **ux.statepattern** — Reusable state machine pattern
375
+ - [ ] **ux.actionpattern** — Reusable action definition
376
+ - [ ] **ux.stateactiontemplate** — Reusable state action template
377
+ - [ ] **ux.transitiontemplate** — Reusable transition template
378
+ - [ ] **ux.tablecolumn** — Column definition for table components
379
+ - [ ] **ux.chartseries** — Data series configuration for chart components
380
+ - [ ] **ux.uxapplication** — Application-wide UX configuration
381
+ - [ ] **ux.uxspec** — Experience specification container
382
+ - [ ] **ux.view** — Screen, page, modal, dialog, drawer, or panel (required: `type`)
383
+ - [ ] **ux.subview** — Section or panel within a view
384
+ - [ ] **ux.componentinstance** — Instance of a library component on a view
385
+ - [ ] **ux.componentreference** — Reference to a library component by ID
386
+ - [ ] **ux.actioncomponent** — Interactive element (button, link, voice command)
387
+ - [ ] **ux.experiencestate** — State in experience state machine
388
+ - [ ] **ux.stateaction** — Action executed during a state lifecycle
389
+ - [ ] **ux.statetransition** — Transition between states
390
+ - [ ] **ux.layoutconfig** — Layout configuration (grid, flex, block, etc.)
391
+ - [ ] **ux.dataconfig** — Data binding configuration (source → target)
392
+ - [ ] **ux.errorconfig** — Error handling configuration
393
+
394
+ If any type has ZERO elements, explicitly decide:
395
+ "This type doesn't apply to this codebase" with reasoning.