@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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cbm",
3
- "version": "0.10.0",
4
- "source_version": "0.10.0",
3
+ "version": "0.12.0",
4
+ "source_version": "0.12.0",
5
5
  "analyzer": {
6
6
  "name": "cbm",
7
7
  "display_name": "codebase-memory-mcp",
@@ -38,7 +38,7 @@
38
38
  "lua",
39
39
  "scala"
40
40
  ],
41
- "known_minimum_version": null,
41
+ "known_minimum_version": "0.12.0",
42
42
  "project_identification": {
43
43
  "strategy": "absolute_path",
44
44
  "description": "DR CLI passes the project root as an absolute path via findProjectRoot(). The analyzer uses this path to establish a stable project identity for consistent indexing and caching across sessions."
@@ -118,6 +118,18 @@
118
118
  },
119
119
  "return_type": {
120
120
  "from": "return_type"
121
+ },
122
+ "decorators": {
123
+ "from": "decorators"
124
+ },
125
+ "decorator_tags": {
126
+ "from": "decorator_tags"
127
+ },
128
+ "route_method": {
129
+ "from": "route_method"
130
+ },
131
+ "route_path": {
132
+ "from": "route_path"
121
133
  }
122
134
  },
123
135
  "conditions": {
@@ -168,6 +180,18 @@
168
180
  },
169
181
  "overrides": {
170
182
  "from": "overrides"
183
+ },
184
+ "decorators": {
185
+ "from": "decorators"
186
+ },
187
+ "decorator_tags": {
188
+ "from": "decorator_tags"
189
+ },
190
+ "route_method": {
191
+ "from": "route_method"
192
+ },
193
+ "route_path": {
194
+ "from": "route_path"
171
195
  }
172
196
  },
173
197
  "conditions": {
@@ -206,6 +230,12 @@
206
230
  },
207
231
  "properties_count": {
208
232
  "from": "properties_count"
233
+ },
234
+ "decorators": {
235
+ "from": "decorators"
236
+ },
237
+ "decorator_tags": {
238
+ "from": "decorator_tags"
209
239
  }
210
240
  }
211
241
  },
@@ -224,163 +254,940 @@
224
254
  "from": "name"
225
255
  }
226
256
  }
257
+ },
258
+ "Interface": {
259
+ "cbm_label": "Interface",
260
+ "dr_layer": "application",
261
+ "dr_element_type": "dataobject",
262
+ "confidence": "medium",
263
+ "description": "In-code interface maps to an application data object. Tier-0 rules in extraction-heuristics.json take precedence: a Spring Data repository interface is data-store.accesspattern, an interface in generated client code or a component's props interface is not an element, and any other interface is narrowed to data object, application interface, application event or data-model object schema for the classifier to decide.",
264
+ "source_reference": {
265
+ "provenance": "extracted",
266
+ "file": {
267
+ "from": "file_path"
268
+ },
269
+ "symbol": {
270
+ "from": "name"
271
+ }
272
+ },
273
+ "evidence_fields": {
274
+ "base_classes": {
275
+ "from": "base_classes"
276
+ },
277
+ "decorators": {
278
+ "from": "decorators"
279
+ }
280
+ }
281
+ },
282
+ "Type": {
283
+ "cbm_label": "Type",
284
+ "dr_layer": "application",
285
+ "dr_element_type": "dataobject",
286
+ "confidence": "low",
287
+ "description": "Type alias or object type follows the Interface rules: an application data object unless generated or a component's props type.",
288
+ "source_reference": {
289
+ "provenance": "extracted",
290
+ "file": {
291
+ "from": "file_path"
292
+ },
293
+ "symbol": {
294
+ "from": "name"
295
+ }
296
+ },
297
+ "evidence_fields": {
298
+ "base_classes": {
299
+ "from": "base_classes"
300
+ },
301
+ "decorators": {
302
+ "from": "decorators"
303
+ }
304
+ }
305
+ },
306
+ "Enum": {
307
+ "cbm_label": "Enum",
308
+ "dr_layer": "application",
309
+ "dr_element_type": "dataobject",
310
+ "confidence": "low",
311
+ "description": "Enumeration of values held in code follows the Interface rules: an application data object.",
312
+ "source_reference": {
313
+ "provenance": "extracted",
314
+ "file": {
315
+ "from": "file_path"
316
+ },
317
+ "symbol": {
318
+ "from": "name"
319
+ }
320
+ },
321
+ "evidence_fields": {
322
+ "base_classes": {
323
+ "from": "base_classes"
324
+ },
325
+ "decorators": {
326
+ "from": "decorators"
327
+ }
328
+ }
329
+ },
330
+ "Struct": {
331
+ "cbm_label": "Struct",
332
+ "dr_layer": "application",
333
+ "dr_element_type": "dataobject",
334
+ "confidence": "low",
335
+ "description": "Plain struct maps to an application data object; one with receiver methods or an impl block behaves like a class (application component), which the classifier decides.",
336
+ "source_reference": {
337
+ "provenance": "extracted",
338
+ "file": {
339
+ "from": "file_path"
340
+ },
341
+ "symbol": {
342
+ "from": "name"
343
+ }
344
+ },
345
+ "evidence_fields": {
346
+ "base_classes": {
347
+ "from": "base_classes"
348
+ },
349
+ "decorators": {
350
+ "from": "decorators"
351
+ }
352
+ }
353
+ },
354
+ "Trait": {
355
+ "cbm_label": "Trait",
356
+ "dr_layer": "application",
357
+ "dr_element_type": "dataobject",
358
+ "confidence": "low",
359
+ "description": "Behavioural contract implemented by types follows the Interface rules.",
360
+ "source_reference": {
361
+ "provenance": "extracted",
362
+ "file": {
363
+ "from": "file_path"
364
+ },
365
+ "symbol": {
366
+ "from": "name"
367
+ }
368
+ },
369
+ "evidence_fields": {
370
+ "base_classes": {
371
+ "from": "base_classes"
372
+ },
373
+ "decorators": {
374
+ "from": "decorators"
375
+ }
376
+ }
227
377
  }
228
378
  },
229
379
  "edges_by_type": {
230
- "HTTP_CALLS": {
231
- "cbm_edge": "HTTP_CALLS",
232
- "dr_relationship": "consumes",
233
- "confidence": "high",
234
- "description": "HTTP API call between services maps to consumes relationship",
380
+ "CALLS": {
381
+ "cbm_edge": "CALLS",
382
+ "dr_relationship": "depends-on",
383
+ "confidence": "medium",
384
+ "description": "A function calls another function: the caller depends on the callee",
235
385
  "usage": "verification_and_mapping",
236
- "dr_scope": "cross-layer",
237
- "direction": "caller_to_callee",
238
- "confidence_from_property": "confidence",
239
- "dr_pattern": "application.applicationservice → api.operation",
240
- "implementation_note": "Requires HTTP verb and endpoint analysis to create cross-layer reference"
386
+ "dr_scope": "intra-layer",
387
+ "direction": "forward",
388
+ "dr_pattern": "application.applicationfunction → application.applicationfunction",
389
+ "implementation_note": "Listed first: it is the call-graph default edge type for dr analyzer callers and callees. Creates a relationship only between functions that both survive classification. A call from a test case to the code it exercises (a component, function, process, interface, service, operation, object schema or access pattern) is the test testing it (testing.testcasesketch.tests.*); a call to a member with no element of its own counts as a call to its class, and from a test only when the test's file refers to that class (a USAGE or IMPORTS edge), because the index resolves a call by the member's name.",
390
+ "conditions": {
391
+ "predicates": [
392
+ {
393
+ "predicate": "tests",
394
+ "invert": false,
395
+ "from_types": ["testing.testcasesketch"]
396
+ },
397
+ {
398
+ "predicate": "depends-on",
399
+ "invert": false
400
+ },
401
+ {
402
+ "predicate": "uses",
403
+ "invert": false
404
+ },
405
+ {
406
+ "predicate": "accesses",
407
+ "invert": false
408
+ },
409
+ {
410
+ "predicate": "triggers",
411
+ "invert": false
412
+ },
413
+ {
414
+ "predicate": "flows-to",
415
+ "invert": false
416
+ },
417
+ {
418
+ "predicate": "serves",
419
+ "invert": true
420
+ }
421
+ ],
422
+ "gate": "both ends kept by Tier-1 significance gating; most functions are not elements on their own"
423
+ }
241
424
  },
242
425
  "HANDLES": {
243
426
  "cbm_edge": "HANDLES",
244
- "dr_relationship": "provides",
427
+ "dr_relationship": "realizes",
245
428
  "confidence": "high",
246
- "description": "HTTP request handler maps to provides relationship",
429
+ "description": "A function or method handles an HTTP route: the API operation for that route realizes the application function",
430
+ "directionality_transform": "invert",
247
431
  "usage": "verification_and_mapping",
248
432
  "dr_scope": "cross-layer",
249
433
  "direction": "forward",
250
- "confidence_from_property": "handler_decorator",
251
- "dr_pattern": "application.applicationfunction → api.operation",
252
- "implementation_note": "HTTP handler decoration indicates implementation relationship"
434
+ "dr_pattern": "api.operation → application.applicationfunction",
435
+ "implementation_note": "CBM writes the edge handler → Route; the DR relationship runs from the operation to the function it realizes (api.operation.realizes.application.applicationfunction), so the direction is inverted. HANDLES names routes by path while Route nodes are named __route__METHOD__/path.",
436
+ "conditions": {
437
+ "predicates": [
438
+ {
439
+ "predicate": "realizes",
440
+ "invert": true
441
+ }
442
+ ]
443
+ }
253
444
  },
254
- "CALLS": {
255
- "cbm_edge": "CALLS",
256
- "dr_relationship": null,
257
- "confidence": "medium",
258
- "description": "Function/method call within codebase",
259
- "usage": "traversal_only",
445
+ "DEFINES_METHOD": {
446
+ "cbm_edge": "DEFINES_METHOD",
447
+ "dr_relationship": "assigned-to",
448
+ "confidence": "high",
449
+ "description": "A class defines a method: the application component is assigned the application function",
450
+ "usage": "verification_and_mapping",
260
451
  "dr_scope": "intra-layer",
261
452
  "direction": "forward",
453
+ "dr_pattern": "application.applicationcomponent → application.applicationfunction",
454
+ "implementation_note": "Deterministic. A controller class (application interface) defining its route handlers (application functions) creates no relationship here: the catalog has no interface-to-function structural triple, and the operation side comes from HANDLES.",
262
455
  "conditions": {
263
- "usage_detail": "intra-layer behavioral"
456
+ "predicates": [
457
+ {
458
+ "predicate": "assigned-to",
459
+ "invert": false
460
+ },
461
+ {
462
+ "predicate": "composes",
463
+ "invert": false
464
+ },
465
+ {
466
+ "predicate": "aggregates",
467
+ "invert": false
468
+ }
469
+ ],
470
+ "from_types": ["application.*"],
471
+ "to_types": ["application.*"],
472
+ "gate": "both ends kept by Tier-1 significance gating; most functions are not elements on their own"
264
473
  }
265
474
  },
266
475
  "IMPORTS": {
267
476
  "cbm_edge": "IMPORTS",
268
- "dr_relationship": null,
477
+ "dr_relationship": "uses",
269
478
  "confidence": "high",
270
- "description": "Module/file import dependency",
271
- "usage": "traversal_only",
479
+ "description": "Module or file import dependency: one application component uses another",
480
+ "usage": "verification_and_mapping",
272
481
  "dr_scope": "intra-layer",
273
482
  "direction": "forward",
483
+ "dr_pattern": "application.applicationcomponent → application.applicationcomponent",
484
+ "implementation_note": "Only between application-layer elements (component to component, or a component or function to the data object a module defines); imports of external packages, and of anything else, stay traversal input (datastore detection reads them).",
274
485
  "conditions": {
275
- "usage_detail": "intra-layer structural"
486
+ "predicates": [
487
+ {
488
+ "predicate": "uses",
489
+ "invert": false
490
+ },
491
+ {
492
+ "predicate": "depends-on",
493
+ "invert": false
494
+ },
495
+ {
496
+ "predicate": "accesses",
497
+ "invert": false
498
+ },
499
+ {
500
+ "predicate": "references",
501
+ "invert": false
502
+ },
503
+ {
504
+ "predicate": "composes",
505
+ "invert": false
506
+ },
507
+ {
508
+ "predicate": "aggregates",
509
+ "invert": false
510
+ },
511
+ {
512
+ "predicate": "serves",
513
+ "invert": true
514
+ }
515
+ ],
516
+ "from_types": ["application.*"],
517
+ "to_types": ["application.*"]
518
+ }
519
+ },
520
+ "CALL_REFERENCE": {
521
+ "cbm_edge": "CALL_REFERENCE",
522
+ "dr_relationship": "depends-on",
523
+ "confidence": "medium",
524
+ "description": "A callable is used as a value (handler or callback registration): the registering function depends on it",
525
+ "usage": "verification_and_mapping",
526
+ "dr_scope": "intra-layer",
527
+ "direction": "forward",
528
+ "dr_pattern": "application.applicationfunction → application.applicationfunction",
529
+ "implementation_note": "Same treatment as CALLS.",
530
+ "conditions": {
531
+ "predicates": [
532
+ {
533
+ "predicate": "depends-on",
534
+ "invert": false
535
+ },
536
+ {
537
+ "predicate": "uses",
538
+ "invert": false
539
+ },
540
+ {
541
+ "predicate": "triggers",
542
+ "invert": false
543
+ }
544
+ ],
545
+ "gate": "both ends kept by Tier-1 significance gating; most functions are not elements on their own"
546
+ }
547
+ },
548
+ "DATA_FLOWS": {
549
+ "cbm_edge": "DATA_FLOWS",
550
+ "dr_relationship": "flows-to",
551
+ "confidence": "medium",
552
+ "description": "An argument flows into a parameter: data flows from the calling function to the called one",
553
+ "usage": "verification_and_mapping",
554
+ "dr_scope": "intra-layer",
555
+ "direction": "forward",
556
+ "dr_pattern": "application.applicationfunction → application.applicationfunction",
557
+ "implementation_note": "Documented by CBM, not observed in the eval corpora.",
558
+ "conditions": {
559
+ "predicates": [
560
+ {
561
+ "predicate": "flows-to",
562
+ "invert": false
563
+ },
564
+ {
565
+ "predicate": "depends-on",
566
+ "invert": false
567
+ }
568
+ ],
569
+ "gate": "both ends kept by Tier-1 significance gating; most functions are not elements on their own"
570
+ }
571
+ },
572
+ "USAGE": {
573
+ "cbm_edge": "USAGE",
574
+ "dr_relationship": "accesses",
575
+ "confidence": "low",
576
+ "description": "A function or component uses a data structure without calling it: it accesses the data object",
577
+ "usage": "verification_and_mapping",
578
+ "dr_scope": "intra-layer",
579
+ "direction": "forward",
580
+ "dr_pattern": "application.applicationfunction → application.dataobject",
581
+ "implementation_note": "The largest-reach edge (387 gold cards). Map only when the target was accepted as a data object (an Interface, Type, Enum or data class); usage of variables and anything else is traversal only. CBM rates USAGE as identifier use without a proven target, so confidence is low. A function or component using a data-model object schema (an entity class) accesses it, as it accesses a data object.",
582
+ "conditions": {
583
+ "predicates": [
584
+ {
585
+ "predicate": "accesses",
586
+ "invert": false
587
+ },
588
+ {
589
+ "predicate": "uses",
590
+ "invert": false
591
+ },
592
+ {
593
+ "predicate": "references",
594
+ "invert": false
595
+ },
596
+ {
597
+ "predicate": "depends-on",
598
+ "invert": false
599
+ }
600
+ ],
601
+ "to_types": [
602
+ "application.dataobject",
603
+ "data-model.objectschema",
604
+ "api.schema"
605
+ ]
606
+ }
607
+ },
608
+ "WRITES": {
609
+ "cbm_edge": "WRITES",
610
+ "dr_relationship": "accesses",
611
+ "confidence": "medium",
612
+ "description": "A function or component mutates a data structure's state: it accesses the data object",
613
+ "usage": "verification_and_mapping",
614
+ "dr_scope": "intra-layer",
615
+ "direction": "forward",
616
+ "dr_pattern": "application.applicationfunction → application.dataobject",
617
+ "implementation_note": "Same targets as USAGE; writing is access, so the provider reading (serves) does not apply.",
618
+ "conditions": {
619
+ "predicates": [
620
+ {
621
+ "predicate": "accesses",
622
+ "invert": false
623
+ },
624
+ {
625
+ "predicate": "uses",
626
+ "invert": false
627
+ }
628
+ ],
629
+ "to_types": [
630
+ "application.dataobject",
631
+ "data-model.objectschema",
632
+ "api.schema"
633
+ ]
634
+ }
635
+ },
636
+ "IMPLEMENTS": {
637
+ "cbm_edge": "IMPLEMENTS",
638
+ "dr_relationship": "provides",
639
+ "confidence": "high",
640
+ "description": "A class implements an interface that was classified as an application interface: the component provides that interface",
641
+ "usage": "verification_and_mapping",
642
+ "dr_scope": "intra-layer",
643
+ "direction": "forward",
644
+ "dr_pattern": "application.applicationcomponent → application.applicationinterface",
645
+ "implementation_note": "Only when the implemented interface was accepted as application.applicationinterface. Implementing a data-object interface creates no relationship (the catalog has no component-to-dataobject structural triple, by design).",
646
+ "conditions": {
647
+ "predicates": [
648
+ {
649
+ "predicate": "provides",
650
+ "invert": false
651
+ },
652
+ {
653
+ "predicate": "realizes",
654
+ "invert": false
655
+ },
656
+ {
657
+ "predicate": "specializes",
658
+ "invert": false
659
+ }
660
+ ],
661
+ "to_types": ["application.applicationinterface"]
662
+ }
663
+ },
664
+ "TESTS": {
665
+ "cbm_edge": "TESTS",
666
+ "dr_relationship": "tests",
667
+ "confidence": "high",
668
+ "description": "A test function exercises a symbol: the test case sketch tests that component, function, interface, service, operation, object schema or access pattern",
669
+ "usage": "verification_and_mapping",
670
+ "dr_scope": "cross-layer",
671
+ "direction": "forward",
672
+ "dr_pattern": "testing.testcasesketch → application.applicationfunction",
673
+ "implementation_note": "From a test case (a test function Tier 0 classified as testing.testcasesketch) to the production symbol it exercises, when that symbol is an accepted element; calls into builtins, helpers and unclassified symbols create nothing.",
674
+ "conditions": {
675
+ "predicates": [
676
+ {
677
+ "predicate": "tests",
678
+ "invert": false
679
+ }
680
+ ],
681
+ "from_types": ["testing.testcasesketch"]
682
+ }
683
+ },
684
+ "TESTS_FILE": {
685
+ "cbm_edge": "TESTS_FILE",
686
+ "dr_relationship": "covers",
687
+ "confidence": "high",
688
+ "description": "A test file covers a source file: the coverage target covers the component",
689
+ "usage": "verification_and_mapping",
690
+ "dr_scope": "cross-layer",
691
+ "direction": "forward",
692
+ "dr_pattern": "testing.testcoveragetarget → application.applicationcomponent",
693
+ "implementation_note": "File-level counterpart of TESTS; same test pass.",
694
+ "conditions": {
695
+ "predicates": [
696
+ {
697
+ "predicate": "covers",
698
+ "invert": false
699
+ }
700
+ ]
701
+ }
702
+ },
703
+ "ASYNC_CALLS": {
704
+ "cbm_edge": "ASYNC_CALLS",
705
+ "dr_relationship": "triggers",
706
+ "confidence": "medium",
707
+ "description": "A function publishes to a queue or topic: it raises the application event the queue carries",
708
+ "usage": "verification_and_mapping",
709
+ "dr_scope": "intra-layer",
710
+ "direction": "forward",
711
+ "dr_pattern": "application.applicationfunction → application.applicationevent",
712
+ "implementation_note": "The queue or topic Route (__route__sqs__..., __route__kafka__...) is modelled as an application event, which the publishing function triggers (application.applicationfunction.triggers.application.applicationevent, in the catalog since the application-layer rules of 2026-11-05). depends-on stays as the fallback for other source types.",
713
+ "conditions": {
714
+ "predicates": [
715
+ {
716
+ "predicate": "triggers",
717
+ "invert": false
718
+ },
719
+ {
720
+ "predicate": "depends-on",
721
+ "invert": false
722
+ }
723
+ ]
724
+ }
725
+ },
726
+ "LISTENS_ON": {
727
+ "cbm_edge": "LISTENS_ON",
728
+ "dr_relationship": "triggers",
729
+ "confidence": "medium",
730
+ "description": "A function listens on a channel: the application event triggers the handler function",
731
+ "usage": "verification_and_mapping",
732
+ "dr_scope": "intra-layer",
733
+ "direction": "forward",
734
+ "dr_pattern": "application.applicationevent → application.applicationfunction",
735
+ "implementation_note": "Function-level listeners: CBM writes listener → Channel, so the relationship runs the other way (application event triggers application function). The interface-level reading waits on catalog addition 4.",
736
+ "conditions": {
737
+ "predicates": [
738
+ {
739
+ "predicate": "triggers",
740
+ "invert": true
741
+ }
742
+ ]
743
+ },
744
+ "directionality_transform": "invert"
745
+ },
746
+ "SPAWNS": {
747
+ "cbm_edge": "SPAWNS",
748
+ "dr_relationship": "serves",
749
+ "confidence": "medium",
750
+ "description": "Code starts an external program: the system software serves the calling component",
751
+ "directionality_transform": "invert",
752
+ "usage": "verification_and_mapping",
753
+ "dr_scope": "cross-layer",
754
+ "direction": "caller_to_callee",
755
+ "dr_pattern": "technology.systemsoftware → application.applicationcomponent",
756
+ "implementation_note": "Inverted: CBM writes caller → Process, the catalog has technology.systemsoftware.serves.application.applicationcomponent. Observed on CBM 0.12.1 (61 / 3 / 2 on dr-cli / fastapi / petclinic: git, node, bun, gh, claude and other programs the code or its scripts launch); creates a relationship only once Process maps to technology.systemsoftware (inventory step 9), since Process is in unmapped_labels.",
757
+ "conditions": {
758
+ "predicates": [
759
+ {
760
+ "predicate": "serves",
761
+ "invert": true
762
+ },
763
+ {
764
+ "predicate": "uses",
765
+ "invert": false
766
+ },
767
+ {
768
+ "predicate": "depends-on",
769
+ "invert": false
770
+ }
771
+ ]
276
772
  }
277
773
  },
278
774
  "DEPENDS_ON": {
279
775
  "cbm_edge": "DEPENDS_ON",
280
- "dr_relationship": null,
776
+ "dr_relationship": "depends-on",
281
777
  "confidence": "medium",
282
- "description": "Runtime dependency relationship",
283
- "usage": "traversal_only",
778
+ "description": "Infrastructure dependency between artifacts (charts, packages, base images) or system software",
779
+ "usage": "verification_and_mapping",
284
780
  "dr_scope": "intra-layer",
285
781
  "direction": "forward",
782
+ "dr_pattern": "technology.artifact → technology.artifact",
783
+ "implementation_note": "Infrastructure only: Helm chart dependencies, go.mod / requirements.txt to a Package, a Dockerfile to its base Images and an Image to its Dockerfile, compose depends_on and links (CBM 0.12.1; observed 0 / 12 / 1). Creates a relationship only between infrastructure elements, which wait on inventory step 9; compose depends_on between services also waits on catalog addition 9 (technology.node depends-on technology.node).",
286
784
  "conditions": {
287
- "usage_detail": "intra-layer dependency"
785
+ "predicates": [
786
+ {
787
+ "predicate": "depends-on",
788
+ "invert": false
789
+ }
790
+ ]
288
791
  }
289
792
  },
793
+ "INFRA_MAPS": {
794
+ "cbm_edge": "INFRA_MAPS",
795
+ "dr_relationship": "realizes",
796
+ "confidence": "high",
797
+ "description": "A Kubernetes Service selects workloads: each workload node realizes the technology service",
798
+ "directionality_transform": "invert",
799
+ "usage": "verification_and_mapping",
800
+ "dr_scope": "intra-layer",
801
+ "direction": "forward",
802
+ "dr_pattern": "technology.node → technology.technologyservice",
803
+ "implementation_note": "Inverted: CBM writes Service → workload. Observed on CBM 0.12.1 (petclinic 2: k8s Service to Deployment). Creates a relationship once Resource maps by kind (inventory step 9).",
804
+ "conditions": {
805
+ "predicates": [
806
+ {
807
+ "predicate": "realizes",
808
+ "invert": true
809
+ }
810
+ ]
811
+ }
812
+ },
813
+ "DEPLOYS": {
814
+ "cbm_edge": "DEPLOYS",
815
+ "dr_relationship": "composes",
816
+ "confidence": "medium",
817
+ "description": "Manifests, charts or Terraform are deployed onto a cluster: the node composes the artifact",
818
+ "directionality_transform": "invert",
819
+ "usage": "verification_and_mapping",
820
+ "dr_scope": "intra-layer",
821
+ "direction": "forward",
822
+ "dr_pattern": "technology.node → technology.artifact",
823
+ "implementation_note": "Inverted: CBM writes artifact → cluster. Observed on CBM 0.12.1 (petclinic 2). Creates a relationship once Resource and Image map (inventory step 9).",
824
+ "conditions": {
825
+ "predicates": [
826
+ {
827
+ "predicate": "composes",
828
+ "invert": true
829
+ },
830
+ {
831
+ "predicate": "assigned-to",
832
+ "invert": false
833
+ }
834
+ ]
835
+ }
836
+ },
837
+ "HTTP_CALLS": {
838
+ "cbm_edge": "HTTP_CALLS",
839
+ "dr_relationship": "tests",
840
+ "confidence": "medium",
841
+ "description": "Outbound HTTP call to an API route. From a test case it is the test exercising that operation",
842
+ "usage": "verification_and_mapping",
843
+ "dr_scope": "cross-layer",
844
+ "direction": "caller_to_callee",
845
+ "confidence_from_property": "confidence",
846
+ "implementation_note": "Creates a relationship only from a test case (a symbol Tier 0 classified as testing.testcasesketch) to an operation: on CBM 0.12.1 almost every observed caller is test code (53 of 55 on fastapi, 81 of 86 on dr-cli). A production caller (application code consuming an operation) still creates none: that triple waits on catalog addition 7 (docs/analyzers/CBM_MAPPING_INVENTORY.md), queued in Context Studio. Extraction also reads this edge from test code that calls a served route by URL (MockMvc get(\"/owners/{ownerId}\"), RestTemplate, supertest), which CBM has no edge for.",
847
+ "dr_pattern": "testing.testcasesketch → api.operation",
848
+ "conditions": {
849
+ "from_types": ["testing.testcasesketch"],
850
+ "to_types": ["api.operation"],
851
+ "predicates": [
852
+ {
853
+ "predicate": "tests",
854
+ "invert": false
855
+ }
856
+ ]
857
+ }
858
+ },
859
+ "GRPC_CALLS": {
860
+ "cbm_edge": "GRPC_CALLS",
861
+ "dr_relationship": null,
862
+ "confidence": "high",
863
+ "description": "Outbound gRPC call",
864
+ "usage": "traversal_only",
865
+ "dr_scope": "cross-layer",
866
+ "direction": "caller_to_callee",
867
+ "implementation_note": "Same as HTTP_CALLS; proposed to Context Studio's review queue as a catalog addition (docs/analyzers/CBM_MAPPING_INVENTORY.md, addition 7); map once accepted."
868
+ },
869
+ "GRAPHQL_CALLS": {
870
+ "cbm_edge": "GRAPHQL_CALLS",
871
+ "dr_relationship": null,
872
+ "confidence": "high",
873
+ "description": "Outbound GraphQL call",
874
+ "usage": "traversal_only",
875
+ "dr_scope": "cross-layer",
876
+ "direction": "caller_to_callee",
877
+ "implementation_note": "Same as HTTP_CALLS; in the binary and UI only. proposed to Context Studio's review queue as a catalog addition (docs/analyzers/CBM_MAPPING_INVENTORY.md, addition 7); map once accepted."
878
+ },
879
+ "TRPC_CALLS": {
880
+ "cbm_edge": "TRPC_CALLS",
881
+ "dr_relationship": null,
882
+ "confidence": "high",
883
+ "description": "Outbound tRPC call",
884
+ "usage": "traversal_only",
885
+ "dr_scope": "cross-layer",
886
+ "direction": "caller_to_callee",
887
+ "implementation_note": "Same as HTTP_CALLS; in the binary and UI only. proposed to Context Studio's review queue as a catalog addition (docs/analyzers/CBM_MAPPING_INVENTORY.md, addition 7); map once accepted."
888
+ },
290
889
  "INHERITS": {
291
890
  "cbm_edge": "INHERITS",
891
+ "dr_relationship": "specializes",
892
+ "confidence": "high",
893
+ "description": "Class or interface inheritance: the subclass specializes its parent",
894
+ "usage": "verification_and_mapping",
895
+ "dr_scope": "intra-layer",
896
+ "direction": "forward",
897
+ "dr_pattern": "data-model.objectschema → data-model.objectschema",
898
+ "implementation_note": "Only between two elements of the same type that the catalog lets specialize (object schemas, data objects, components, functions, ...): an entity class extending a mapped superclass. Inheriting from a class of another type, or from one that is not an element, creates nothing.",
899
+ "conditions": {
900
+ "usage_detail": "intra-layer structural",
901
+ "predicates": [
902
+ {
903
+ "predicate": "specializes",
904
+ "invert": false
905
+ }
906
+ ]
907
+ }
908
+ },
909
+ "EXTENDS": {
910
+ "cbm_edge": "EXTENDS",
292
911
  "dr_relationship": null,
293
912
  "confidence": "high",
294
- "description": "Class inheritance relationship",
913
+ "description": "Class or interface extension",
295
914
  "usage": "traversal_only",
296
915
  "dr_scope": "intra-layer",
297
916
  "direction": "forward",
298
917
  "conditions": {
299
918
  "usage_detail": "intra-layer structural"
300
- }
919
+ },
920
+ "implementation_note": "In the CBM binary only (0.10.2 and 0.12.1), not in its documented vocabulary or any observed graph; kept for forward compatibility. INHERITS is the edge CBM emits for class extension."
301
921
  },
302
- "IMPLEMENTS": {
303
- "cbm_edge": "IMPLEMENTS",
922
+ "OVERRIDE": {
923
+ "cbm_edge": "OVERRIDE",
304
924
  "dr_relationship": null,
305
- "confidence": "high",
306
- "description": "Interface implementation relationship",
925
+ "confidence": "medium",
926
+ "description": "Method override",
307
927
  "usage": "traversal_only",
308
928
  "dr_scope": "intra-layer",
309
929
  "direction": "forward",
930
+ "implementation_note": "specializes between functions; proposed to Context Studio's review queue as a catalog addition (docs/analyzers/CBM_MAPPING_INVENTORY.md, addition 2); map once accepted. Also Kustomize patches in infrastructure.",
310
931
  "conditions": {
311
932
  "usage_detail": "intra-layer structural"
312
933
  }
313
934
  },
314
- "CREATES": {
315
- "cbm_edge": "CREATES",
935
+ "EMITS": {
936
+ "cbm_edge": "EMITS",
316
937
  "dr_relationship": null,
317
938
  "confidence": "medium",
318
- "description": "Object instantiation or component creation",
939
+ "description": "A function emits on a channel",
319
940
  "usage": "traversal_only",
320
941
  "dr_scope": "intra-layer",
321
942
  "direction": "forward",
943
+ "implementation_note": "triggers an application event from a function or component; proposed to Context Studio's review queue as a catalog addition (docs/analyzers/CBM_MAPPING_INVENTORY.md, addition 3); map once accepted."
944
+ },
945
+ "RAISES": {
946
+ "cbm_edge": "RAISES",
947
+ "dr_relationship": null,
948
+ "confidence": "low",
949
+ "description": "A function raises an exception class",
950
+ "usage": "traversal_only",
951
+ "dr_scope": "intra-layer",
952
+ "direction": "forward",
953
+ "implementation_note": "Evidence for error-handling concerns; triggers an application event when the exception is a domain event, proposed to Context Studio's review queue as a catalog addition (docs/analyzers/CBM_MAPPING_INVENTORY.md, addition 3); map once accepted."
954
+ },
955
+ "THROWS": {
956
+ "cbm_edge": "THROWS",
957
+ "dr_relationship": null,
958
+ "confidence": "low",
959
+ "description": "A method throws an exception class",
960
+ "usage": "traversal_only",
961
+ "dr_scope": "intra-layer",
962
+ "direction": "forward",
963
+ "implementation_note": "Same as RAISES: evidence for error-handling concerns; the triggers reading waits on catalog addition 3."
964
+ },
965
+ "CONTAINS_FOLDER": {
966
+ "cbm_edge": "CONTAINS_FOLDER",
967
+ "dr_relationship": null,
968
+ "confidence": "high",
969
+ "description": "Folder contains folder",
970
+ "usage": "traversal_only",
971
+ "dr_scope": "intra-layer",
972
+ "direction": "forward",
973
+ "implementation_note": "composes between directory-level components; proposed to Context Studio's review queue as a catalog addition (docs/analyzers/CBM_MAPPING_INVENTORY.md, addition 5); map once accepted."
974
+ },
975
+ "CONNECTS_TO": {
976
+ "cbm_edge": "CONNECTS_TO",
977
+ "dr_relationship": null,
978
+ "confidence": "medium",
979
+ "description": "A workload addresses a Service",
980
+ "usage": "traversal_only",
981
+ "dr_scope": "intra-layer",
982
+ "direction": "forward",
983
+ "implementation_note": "depends-on from a node to a technology service; proposed to Context Studio's review queue as a catalog addition (docs/analyzers/CBM_MAPPING_INVENTORY.md, addition 9); map once accepted."
984
+ },
985
+ "DEFINES": {
986
+ "cbm_edge": "DEFINES",
987
+ "dr_relationship": null,
988
+ "confidence": "high",
989
+ "description": "A file defines a symbol",
990
+ "usage": "traversal_only",
991
+ "dr_scope": "intra-layer",
992
+ "direction": "forward",
993
+ "implementation_note": "Provenance: supplies source_reference.file for every element mapped from a symbol. Not a relationship between elements.",
322
994
  "conditions": {
323
- "usage_detail": "intra-layer behavioral"
995
+ "usage_detail": "provenance"
324
996
  }
325
997
  },
326
- "USES": {
327
- "cbm_edge": "USES",
998
+ "DECORATES": {
999
+ "cbm_edge": "DECORATES",
1000
+ "dr_relationship": null,
1001
+ "confidence": "high",
1002
+ "description": "A decorator applies to a symbol",
1003
+ "usage": "traversal_only",
1004
+ "dr_scope": "intra-layer",
1005
+ "direction": "forward",
1006
+ "implementation_note": "Evidence: decorator names feed the Tier-0 rules (extraction-heuristics.json) and the card. Decorator is not an element.",
1007
+ "conditions": {
1008
+ "usage_detail": "evidence"
1009
+ }
1010
+ },
1011
+ "CONFIGURES": {
1012
+ "cbm_edge": "CONFIGURES",
328
1013
  "dr_relationship": null,
329
1014
  "confidence": "medium",
330
- "description": "General usage relationship",
1015
+ "description": "A symbol reads a config key, or a config key names a symbol",
331
1016
  "usage": "traversal_only",
332
1017
  "dr_scope": "intra-layer",
333
1018
  "direction": "forward",
1019
+ "implementation_note": "Evidence for security and APM concerns (EnvVar is not an element).",
334
1020
  "conditions": {
335
- "usage_detail": "intra-layer dependency"
1021
+ "usage_detail": "evidence"
336
1022
  }
337
1023
  },
338
- "EXTENDS": {
339
- "cbm_edge": "EXTENDS",
1024
+ "CONTAINS_FILE": {
1025
+ "cbm_edge": "CONTAINS_FILE",
340
1026
  "dr_relationship": null,
341
1027
  "confidence": "high",
342
- "description": "Class or interface extension",
1028
+ "description": "Folder contains file",
343
1029
  "usage": "traversal_only",
344
1030
  "dr_scope": "intra-layer",
345
1031
  "direction": "forward",
1032
+ "implementation_note": "Traversal only: the directory structure behind placement facts.",
346
1033
  "conditions": {
347
- "usage_detail": "intra-layer structural"
1034
+ "usage_detail": "provenance"
348
1035
  }
349
1036
  },
350
- "REFERENCES": {
351
- "cbm_edge": "REFERENCES",
1037
+ "SEMANTICALLY_RELATED": {
1038
+ "cbm_edge": "SEMANTICALLY_RELATED",
352
1039
  "dr_relationship": null,
353
- "confidence": "medium",
354
- "description": "Reference to variable, field, or constant",
1040
+ "confidence": "low",
1041
+ "description": "Vocabulary-mismatch similarity (score >= 0.80)",
355
1042
  "usage": "traversal_only",
356
1043
  "dr_scope": "intra-layer",
357
1044
  "direction": "forward",
1045
+ "implementation_note": "No DR counterpart; for Tier-0 clustering and duplicate detection.",
358
1046
  "conditions": {
359
- "usage_detail": "intra-layer dependency"
1047
+ "usage_detail": "similarity"
360
1048
  }
361
1049
  },
362
- "RETURNS": {
363
- "cbm_edge": "RETURNS",
1050
+ "SIMILAR_TO": {
1051
+ "cbm_edge": "SIMILAR_TO",
364
1052
  "dr_relationship": null,
365
1053
  "confidence": "low",
366
- "description": "Return type relationship (type information only)",
1054
+ "description": "MinHash near-clone",
367
1055
  "usage": "traversal_only",
368
1056
  "dr_scope": "intra-layer",
369
1057
  "direction": "forward",
1058
+ "implementation_note": "No DR counterpart; for duplicate detection.",
370
1059
  "conditions": {
371
- "usage_detail": "type-level metadata"
1060
+ "usage_detail": "similarity"
372
1061
  }
373
1062
  },
374
- "MODIFIES": {
375
- "cbm_edge": "MODIFIES",
1063
+ "FILE_CHANGES_WITH": {
1064
+ "cbm_edge": "FILE_CHANGES_WITH",
1065
+ "dr_relationship": null,
1066
+ "confidence": "low",
1067
+ "description": "Files that change together in history",
1068
+ "usage": "traversal_only",
1069
+ "dr_scope": "intra-layer",
1070
+ "direction": "forward",
1071
+ "implementation_note": "No DR counterpart; evidence for component boundaries.",
1072
+ "conditions": {
1073
+ "usage_detail": "history"
1074
+ }
1075
+ },
1076
+ "HAS_BRANCH": {
1077
+ "cbm_edge": "HAS_BRANCH",
1078
+ "dr_relationship": null,
1079
+ "confidence": "high",
1080
+ "description": "Git branch metadata",
1081
+ "usage": "traversal_only",
1082
+ "dr_scope": "intra-layer",
1083
+ "direction": "forward",
1084
+ "implementation_note": "Provenance for source_reference; not a relationship.",
1085
+ "conditions": {
1086
+ "usage_detail": "provenance"
1087
+ }
1088
+ },
1089
+ "REFERENCES_FILE": {
1090
+ "cbm_edge": "REFERENCES_FILE",
376
1091
  "dr_relationship": null,
377
1092
  "confidence": "medium",
378
- "description": "State modification relationship",
1093
+ "description": "Documentation references a file",
1094
+ "usage": "traversal_only",
1095
+ "dr_scope": "intra-layer",
1096
+ "direction": "forward",
1097
+ "implementation_note": "Evidence for descriptions and for Tier 2's upper-layer inference.",
1098
+ "conditions": {
1099
+ "usage_detail": "documentation"
1100
+ }
1101
+ },
1102
+ "MENTIONS": {
1103
+ "cbm_edge": "MENTIONS",
1104
+ "dr_relationship": null,
1105
+ "confidence": "low",
1106
+ "description": "Documentation mentions a symbol",
379
1107
  "usage": "traversal_only",
380
1108
  "dr_scope": "intra-layer",
381
1109
  "direction": "forward",
1110
+ "implementation_note": "Evidence for descriptions and for Tier 2's upper-layer inference.",
1111
+ "conditions": {
1112
+ "usage_detail": "documentation"
1113
+ }
1114
+ },
1115
+ "CROSS_HTTP_CALLS": {
1116
+ "cbm_edge": "CROSS_HTTP_CALLS",
1117
+ "dr_relationship": null,
1118
+ "confidence": "high",
1119
+ "description": "Cross-repository call or channel",
1120
+ "usage": "traversal_only",
1121
+ "dr_scope": "cross-layer",
1122
+ "direction": "caller_to_callee",
1123
+ "implementation_note": "These are DR's qualified cross-model references (@model/layer.type.name in a references field), not relationships inside one model; mapped when federated extraction is built.",
1124
+ "conditions": {
1125
+ "usage_detail": "cross-model reference"
1126
+ }
1127
+ },
1128
+ "CROSS_GRPC_CALLS": {
1129
+ "cbm_edge": "CROSS_GRPC_CALLS",
1130
+ "dr_relationship": null,
1131
+ "confidence": "high",
1132
+ "description": "Cross-repository call or channel",
1133
+ "usage": "traversal_only",
1134
+ "dr_scope": "cross-layer",
1135
+ "direction": "caller_to_callee",
1136
+ "implementation_note": "These are DR's qualified cross-model references (@model/layer.type.name in a references field), not relationships inside one model; mapped when federated extraction is built.",
1137
+ "conditions": {
1138
+ "usage_detail": "cross-model reference"
1139
+ }
1140
+ },
1141
+ "CROSS_GRAPHQL_CALLS": {
1142
+ "cbm_edge": "CROSS_GRAPHQL_CALLS",
1143
+ "dr_relationship": null,
1144
+ "confidence": "high",
1145
+ "description": "Cross-repository call or channel",
1146
+ "usage": "traversal_only",
1147
+ "dr_scope": "cross-layer",
1148
+ "direction": "caller_to_callee",
1149
+ "implementation_note": "These are DR's qualified cross-model references (@model/layer.type.name in a references field), not relationships inside one model; mapped when federated extraction is built.",
1150
+ "conditions": {
1151
+ "usage_detail": "cross-model reference"
1152
+ }
1153
+ },
1154
+ "CROSS_TRPC_CALLS": {
1155
+ "cbm_edge": "CROSS_TRPC_CALLS",
1156
+ "dr_relationship": null,
1157
+ "confidence": "high",
1158
+ "description": "Cross-repository call or channel",
1159
+ "usage": "traversal_only",
1160
+ "dr_scope": "cross-layer",
1161
+ "direction": "caller_to_callee",
1162
+ "implementation_note": "These are DR's qualified cross-model references (@model/layer.type.name in a references field), not relationships inside one model; mapped when federated extraction is built.",
1163
+ "conditions": {
1164
+ "usage_detail": "cross-model reference"
1165
+ }
1166
+ },
1167
+ "CROSS_ASYNC_CALLS": {
1168
+ "cbm_edge": "CROSS_ASYNC_CALLS",
1169
+ "dr_relationship": null,
1170
+ "confidence": "high",
1171
+ "description": "Cross-repository call or channel",
1172
+ "usage": "traversal_only",
1173
+ "dr_scope": "cross-layer",
1174
+ "direction": "caller_to_callee",
1175
+ "implementation_note": "These are DR's qualified cross-model references (@model/layer.type.name in a references field), not relationships inside one model; mapped when federated extraction is built.",
1176
+ "conditions": {
1177
+ "usage_detail": "cross-model reference"
1178
+ }
1179
+ },
1180
+ "CROSS_CHANNEL": {
1181
+ "cbm_edge": "CROSS_CHANNEL",
1182
+ "dr_relationship": null,
1183
+ "confidence": "high",
1184
+ "description": "Cross-repository call or channel",
1185
+ "usage": "traversal_only",
1186
+ "dr_scope": "cross-layer",
1187
+ "direction": "caller_to_callee",
1188
+ "implementation_note": "These are DR's qualified cross-model references (@model/layer.type.name in a references field), not relationships inside one model; mapped when federated extraction is built.",
382
1189
  "conditions": {
383
- "usage_detail": "intra-layer behavioral"
1190
+ "usage_detail": "cross-model reference"
384
1191
  }
385
1192
  }
386
1193
  },
@@ -517,10 +1324,10 @@
517
1324
  "name": "datastore_detection",
518
1325
  "description": "Patterns and conventions that identify datastore-related elements (tables, schemas, migrations)",
519
1326
  "applies_to": [
520
- "data-store.table",
521
- "data-store.column",
522
- "data-model.entity",
523
- "data-model.attribute"
1327
+ "data-store.collection",
1328
+ "data-store.field",
1329
+ "data-model.objectschema",
1330
+ "data-model.schemaproperty"
524
1331
  ],
525
1332
  "parameters": {
526
1333
  "patterns": [
@@ -541,8 +1348,331 @@
541
1348
  "model"
542
1349
  ]
543
1350
  },
544
- "rule": "If element resides in datastore-related directories or files, or follows datastore naming conventions, identify as data-store or data-model layer element",
1351
+ "rule": "If element resides in datastore-related directories or files, or follows datastore naming conventions, identify it as a data-store collection or field, or a data-model object schema or schema property",
545
1352
  "confidence_adjustment": 0.25
1353
+ },
1354
+ {
1355
+ "name": "tier0_generated_code",
1356
+ "description": "Symbols in generated client code are not elements",
1357
+ "rule": "An interface, type, enum or function in a generated file (*.gen.ts, client/core/) is generator output, not a modelled element; the published API it was generated from is",
1358
+ "parameters": {
1359
+ "tier0": {
1360
+ "labels": ["Interface", "Type", "Enum", "Function"],
1361
+ "when": {
1362
+ "file": "(\\.gen\\.[cm]?[jt]sx?$|(^|/)client/core/)"
1363
+ },
1364
+ "decide": "none",
1365
+ "confidence": "high"
1366
+ }
1367
+ }
1368
+ },
1369
+ {
1370
+ "name": "tier0_test_case_annotation",
1371
+ "description": "A test-case annotation marks a test case",
1372
+ "applies_to": ["testing.testcasesketch"],
1373
+ "rule": "A method or function annotated as a test (JUnit @Test, @ParameterizedTest, @RepeatedTest, @TestFactory, @TestTemplate; a pytest mark) is one implemented test case, which the testing layer models as a test case sketch linked to it through source",
1374
+ "parameters": {
1375
+ "tier0": {
1376
+ "labels": ["Method", "Function"],
1377
+ "when": {
1378
+ "decorator": "^(Test|ParameterizedTest|RepeatedTest|TestFactory|TestTemplate|pytest\\.mark\\..+)$"
1379
+ },
1380
+ "decide": "testing.testcasesketch",
1381
+ "confidence": "high"
1382
+ }
1383
+ }
1384
+ },
1385
+ {
1386
+ "name": "tier0_test_support_annotation",
1387
+ "description": "Test setup, fixtures and test configuration are not elements",
1388
+ "rule": "Setup and teardown methods (@BeforeEach, @AfterEach, @BeforeAll, @AfterAll), pytest fixtures and test-context annotations on classes (@SpringBootTest, @WebMvcTest, @DataJpaTest, @ExtendWith, @TestConfiguration) support test cases; the testing layer has no element for them",
1389
+ "parameters": {
1390
+ "tier0": {
1391
+ "labels": ["Class", "Method", "Function"],
1392
+ "when": {
1393
+ "decorator": "^(BeforeEach|AfterEach|BeforeAll|AfterAll|pytest\\.fixture|SpringBootTest|WebMvcTest|DataJpaTest|ExtendWith|TestConfiguration)$"
1394
+ },
1395
+ "decide": "none",
1396
+ "confidence": "high"
1397
+ }
1398
+ }
1399
+ },
1400
+ {
1401
+ "name": "tier0_test_case_name",
1402
+ "description": "A test-named function in a test file is a test case",
1403
+ "applies_to": ["testing.testcasesketch"],
1404
+ "rule": "A function or method in a Python, Go, Java or Kotlin test file whose name follows that runner's convention (pytest and unittest test_*, JUnit 3 testX, Go TestX) is one implemented test case. JavaScript and TypeScript are left out: their cases are anonymous it() and test() callbacks, and a named testX method there is a helper.",
1405
+ "parameters": {
1406
+ "tier0": {
1407
+ "labels": ["Function", "Method"],
1408
+ "when": {
1409
+ "file": "^(?=.*\\.(py|go|java|kt)$)(?=.*((^|/)(tests?|__tests__|__fixtures__|fixtures?)/|(^|/)test_[^/]*\\.py$|(^|/)conftest\\.py$|_test\\.(go|py)$|\\.(test|spec)\\.[cm]?[jt]sx?$|Tests?\\.(java|kt)$))",
1410
+ "name": "^(test_|test[A-Z0-9]|Test[A-Z0-9_])"
1411
+ },
1412
+ "decide": "testing.testcasesketch",
1413
+ "confidence": "medium"
1414
+ }
1415
+ }
1416
+ },
1417
+ {
1418
+ "name": "tier0_test_file",
1419
+ "description": "Other symbols in test files are test support, not elements",
1420
+ "rule": "A helper, fixture, setup method or test class in a test file (tests/ and fixtures/ directories, test_*.py, conftest.py, *_test.go, *.test.ts, *.spec.ts, *Tests.java) supports the test cases. The testing layer has no element for it, and the production code under test belongs to the layer it implements. Test cases themselves are caught by the two rules before this one; anonymous it() and test() callbacks never become cards.",
1421
+ "parameters": {
1422
+ "tier0": {
1423
+ "labels": ["Function", "Method", "Class"],
1424
+ "when": {
1425
+ "file": "((^|/)(tests?|__tests__|__fixtures__|fixtures?)/|(^|/)test_[^/]*\\.py$|(^|/)conftest\\.py$|_test\\.(go|py)$|\\.(test|spec)\\.[cm]?[jt]sx?$|Tests?\\.(java|kt)$)"
1426
+ },
1427
+ "decide": "none",
1428
+ "confidence": "medium"
1429
+ }
1430
+ }
1431
+ },
1432
+ {
1433
+ "name": "tier0_component_props",
1434
+ "description": "A component's props type belongs to the component",
1435
+ "rule": "An interface or type named ...Props in a .tsx or .jsx file declares a UI component's inputs and is part of that component, not an element of its own",
1436
+ "parameters": {
1437
+ "tier0": {
1438
+ "labels": ["Interface", "Type"],
1439
+ "when": {
1440
+ "name": "Props$",
1441
+ "file": "\\.(tsx|jsx)$"
1442
+ },
1443
+ "decide": "none",
1444
+ "confidence": "high"
1445
+ }
1446
+ }
1447
+ },
1448
+ {
1449
+ "name": "tier0_spring_data_repository",
1450
+ "description": "Repository interfaces are data-store access patterns",
1451
+ "applies_to": ["data-store.accesspattern"],
1452
+ "rule": "An interface or class extending a Spring Data style repository (JpaRepository, CrudRepository, Repository) declares how the store is queried",
1453
+ "parameters": {
1454
+ "tier0": {
1455
+ "labels": ["Interface", "Class"],
1456
+ "when": {
1457
+ "declaration": "\\bextends\\s+[\\w.]*Repository\\b"
1458
+ },
1459
+ "decide": "data-store.accesspattern",
1460
+ "confidence": "high"
1461
+ }
1462
+ }
1463
+ },
1464
+ {
1465
+ "name": "tier0_repository_query",
1466
+ "description": "Query annotations mark data-store access patterns",
1467
+ "applies_to": ["data-store.accesspattern"],
1468
+ "rule": "A method annotated @Query or @Modifying is a declared store query",
1469
+ "parameters": {
1470
+ "tier0": {
1471
+ "labels": ["Method"],
1472
+ "when": {
1473
+ "decorator": "^(Query|Modifying)$"
1474
+ },
1475
+ "decide": "data-store.accesspattern",
1476
+ "confidence": "high"
1477
+ }
1478
+ }
1479
+ },
1480
+ {
1481
+ "name": "tier0_route_handler",
1482
+ "description": "Route-mapping decorators mark the application function that implements an API operation",
1483
+ "applies_to": ["application.applicationfunction"],
1484
+ "rule": "A method or function decorated with a route mapping (@GetMapping, @RequestMapping, router.get, items_router.post, app.get, NestJS @Get, JAX-RS @GET, ...) is the application function that implements the route's API operation. The operation itself is the CBM Route node, and HANDLES links them as api.operation realizes application.applicationfunction.",
1485
+ "parameters": {
1486
+ "tier0": {
1487
+ "labels": ["Method", "Function"],
1488
+ "when": {
1489
+ "decorator": "^((Get|Post|Put|Patch|Delete|Request)Mapping|\\w*(router|app|api|bp|blueprint)\\.(get|post|put|patch|delete|head|options|route|api_route)|(Get|Post|Put|Patch|Delete|All|Head|Options)|(GET|POST|PUT|PATCH|DELETE|HEAD|OPTIONS))$"
1490
+ },
1491
+ "decide": "application.applicationfunction",
1492
+ "confidence": "high"
1493
+ }
1494
+ }
1495
+ },
1496
+ {
1497
+ "name": "tier0_controller",
1498
+ "description": "Controller annotations mark application interfaces",
1499
+ "applies_to": ["application.applicationinterface"],
1500
+ "rule": "A class annotated @Controller or @RestController is the application interface its routes are served through",
1501
+ "parameters": {
1502
+ "tier0": {
1503
+ "labels": ["Class"],
1504
+ "when": {
1505
+ "decorator": "^(Rest)?Controller$"
1506
+ },
1507
+ "decide": "application.applicationinterface",
1508
+ "confidence": "high"
1509
+ }
1510
+ }
1511
+ },
1512
+ {
1513
+ "name": "tier0_persistent_entity",
1514
+ "description": "Persistence annotations mark data-model object schemas",
1515
+ "applies_to": ["data-model.objectschema"],
1516
+ "rule": "A class annotated @Entity, @Table, @MappedSuperclass, @Embeddable or @Document defines the shape of persisted data. Its table is a data-store collection the card builder derives (data-model.objectschema maps-to data-store.collection).",
1517
+ "parameters": {
1518
+ "tier0": {
1519
+ "labels": ["Class"],
1520
+ "when": {
1521
+ "decorator": "^(Entity|Table|MappedSuperclass|Embeddable|Document)$"
1522
+ },
1523
+ "decide": "data-model.objectschema",
1524
+ "confidence": "high"
1525
+ }
1526
+ }
1527
+ },
1528
+ {
1529
+ "name": "tier0_sqlmodel_table",
1530
+ "description": "SQLModel table classes are object schemas mapped to a table",
1531
+ "applies_to": ["data-model.objectschema"],
1532
+ "rule": "A SQLModel class declared with table=True defines the shape of persisted data, like a JPA @Entity: it is a data-model object schema. Its table is a data-store collection that the card builder derives (data-model.objectschema maps-to data-store.collection), not the class itself.",
1533
+ "parameters": {
1534
+ "tier0": {
1535
+ "labels": ["Class"],
1536
+ "when": {
1537
+ "declaration": "\\btable\\s*=\\s*True\\b"
1538
+ },
1539
+ "decide": "data-model.objectschema",
1540
+ "confidence": "high"
1541
+ }
1542
+ }
1543
+ },
1544
+ {
1545
+ "name": "tier0_sqlmodel_schema",
1546
+ "description": "SQLModel classes without a table are object schemas",
1547
+ "applies_to": ["data-model.objectschema"],
1548
+ "rule": "A class deriving directly from SQLModel without table=True defines a data shape (request, response or base schema)",
1549
+ "parameters": {
1550
+ "tier0": {
1551
+ "labels": ["Class"],
1552
+ "when": {
1553
+ "declaration": "\\(\\s*SQLModel\\s*\\)"
1554
+ },
1555
+ "decide": "data-model.objectschema",
1556
+ "confidence": "medium"
1557
+ }
1558
+ }
1559
+ },
1560
+ {
1561
+ "name": "tier0_accessor",
1562
+ "description": "Accessor and binder annotations are implementation details",
1563
+ "rule": "A property accessor, serialization accessor or web-data binder hook is below element granularity",
1564
+ "parameters": {
1565
+ "tier0": {
1566
+ "labels": ["Method"],
1567
+ "when": {
1568
+ "decorator": "^(property|computed_field|XmlElement|XmlAttribute|JsonProperty|InitBinder)$"
1569
+ },
1570
+ "decide": "none",
1571
+ "confidence": "high"
1572
+ }
1573
+ }
1574
+ },
1575
+ {
1576
+ "name": "tier0_spring_component",
1577
+ "description": "Spring component stereotypes mark application components",
1578
+ "applies_to": ["application.applicationcomponent"],
1579
+ "rule": "A class annotated @Component or @SpringBootApplication is a deployable application component",
1580
+ "parameters": {
1581
+ "tier0": {
1582
+ "labels": ["Class"],
1583
+ "when": {
1584
+ "decorator": "^(Component|SpringBootApplication)$"
1585
+ },
1586
+ "decide": "application.applicationcomponent",
1587
+ "confidence": "medium"
1588
+ }
1589
+ }
1590
+ },
1591
+ {
1592
+ "name": "tier0_spring_service",
1593
+ "description": "Spring service stereotype narrows to service or component",
1594
+ "applies_to": [
1595
+ "application.applicationservice",
1596
+ "application.applicationcomponent"
1597
+ ],
1598
+ "rule": "A class annotated @Service exposes application behaviour; it is the service or the component providing it",
1599
+ "parameters": {
1600
+ "tier0": {
1601
+ "labels": ["Class"],
1602
+ "when": {
1603
+ "decorator": "^Service$"
1604
+ },
1605
+ "narrow": [
1606
+ "application.applicationservice",
1607
+ "application.applicationcomponent"
1608
+ ],
1609
+ "confidence": "medium"
1610
+ }
1611
+ }
1612
+ },
1613
+ {
1614
+ "name": "tier0_ui_library",
1615
+ "description": "Shared UI library directories hold library components",
1616
+ "applies_to": ["ux.librarycomponent", "ux.actioncomponent"],
1617
+ "rule": "A component in a shared UI library directory (components/ui, packages/*/ui, design-system) is a reusable library component or a single action trigger, not a placed view",
1618
+ "parameters": {
1619
+ "tier0": {
1620
+ "labels": ["Function", "Module", "Class"],
1621
+ "when": {
1622
+ "file": "(^|/)(components/ui|packages/[^/]+/ui|design-system|ui-kit)/[^/]+\\.(tsx|jsx|vue|svelte)$"
1623
+ },
1624
+ "narrow": ["ux.librarycomponent", "ux.actioncomponent"],
1625
+ "confidence": "medium"
1626
+ }
1627
+ }
1628
+ },
1629
+ {
1630
+ "name": "tier0_file_route",
1631
+ "description": "File-based route modules are views or routes",
1632
+ "applies_to": [
1633
+ "ux.view",
1634
+ "ux.subview",
1635
+ "navigation.route",
1636
+ "navigation.navigationgraph"
1637
+ ],
1638
+ "rule": "A module in a file-based routing directory (routes/ or pages/, or a Next.js app/ page, layout or route file) is reached by navigation: a view, a subview placed in a layout, or the route itself",
1639
+ "parameters": {
1640
+ "tier0": {
1641
+ "labels": ["Function", "Module", "Class"],
1642
+ "when": {
1643
+ "file": "((^|/)(src/)?(routes|pages)/.+|(^|/)app/(.+/)?(page|layout|route|template|loading|error|not-found|default))\\.(tsx|jsx|vue|svelte)$"
1644
+ },
1645
+ "narrow": [
1646
+ "ux.view",
1647
+ "ux.subview",
1648
+ "navigation.route",
1649
+ "navigation.navigationgraph"
1650
+ ],
1651
+ "confidence": "medium"
1652
+ }
1653
+ }
1654
+ },
1655
+ {
1656
+ "name": "tier0_interface_default",
1657
+ "description": "Other interfaces are application data objects or contracts",
1658
+ "applies_to": [
1659
+ "application.dataobject",
1660
+ "application.applicationinterface",
1661
+ "application.applicationevent"
1662
+ ],
1663
+ "rule": "Any interface, type alias, enum or trait no earlier rule decided is an in-code data structure or contract: an application data object, application interface or application event (published schemas are data-model, but an in-code interface is not a published schema; design charter, 2026-10-25 relabelling); the classifier chooses, or says none",
1664
+ "parameters": {
1665
+ "tier0": {
1666
+ "labels": ["Interface", "Type", "Enum", "Trait"],
1667
+ "when": {},
1668
+ "narrow": [
1669
+ "application.dataobject",
1670
+ "application.applicationinterface",
1671
+ "application.applicationevent"
1672
+ ],
1673
+ "confidence": "medium"
1674
+ }
1675
+ }
546
1676
  }
547
1677
  ],
548
1678
  "inference_rules": [
@@ -589,7 +1719,7 @@
589
1719
  "metadata": {
590
1720
  "version": "1.0",
591
1721
  "created_at": "2026-04-17T00:00:00Z",
592
- "updated_at": "2026-04-17T00:00:00Z"
1722
+ "updated_at": "2026-10-29T00:00:00Z"
593
1723
  }
594
1724
  }
595
1725
  }