onto-mcp 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (447) hide show
  1. package/.onto/authority/core-lens-registry.yaml +134 -0
  2. package/.onto/authority/core-lexicon.yaml +1562 -0
  3. package/.onto/authority/diagnostic-codes.yaml +94 -0
  4. package/.onto/domains/accounting/competency_qs.md +384 -0
  5. package/.onto/domains/accounting/concepts.md +186 -0
  6. package/.onto/domains/accounting/conciseness_rules.md +160 -0
  7. package/.onto/domains/accounting/dependency_rules.md +239 -0
  8. package/.onto/domains/accounting/domain_scope.md +213 -0
  9. package/.onto/domains/accounting/extension_cases.md +416 -0
  10. package/.onto/domains/accounting/logic_rules.md +226 -0
  11. package/.onto/domains/accounting/structure_spec.md +298 -0
  12. package/.onto/domains/accounting-kr/competency_qs.md +562 -0
  13. package/.onto/domains/accounting-kr/concepts.md +187 -0
  14. package/.onto/domains/accounting-kr/conciseness_rules.md +125 -0
  15. package/.onto/domains/accounting-kr/dependency_rules.md +93 -0
  16. package/.onto/domains/accounting-kr/domain_scope.md +140 -0
  17. package/.onto/domains/accounting-kr/extension_cases.md +343 -0
  18. package/.onto/domains/accounting-kr/logic_rules.md +160 -0
  19. package/.onto/domains/accounting-kr/structure_spec.md +85 -0
  20. package/.onto/domains/business/competency_qs.md +263 -0
  21. package/.onto/domains/business/concepts.md +200 -0
  22. package/.onto/domains/business/conciseness_rules.md +135 -0
  23. package/.onto/domains/business/dependency_rules.md +113 -0
  24. package/.onto/domains/business/domain_scope.md +240 -0
  25. package/.onto/domains/business/extension_cases.md +249 -0
  26. package/.onto/domains/business/logic_rules.md +134 -0
  27. package/.onto/domains/business/structure_spec.md +114 -0
  28. package/.onto/domains/finance/competency_qs.md +362 -0
  29. package/.onto/domains/finance/concepts.md +194 -0
  30. package/.onto/domains/finance/conciseness_rules.md +155 -0
  31. package/.onto/domains/finance/dependency_rules.md +171 -0
  32. package/.onto/domains/finance/domain_scope.md +215 -0
  33. package/.onto/domains/finance/extension_cases.md +350 -0
  34. package/.onto/domains/finance/logic_rules.md +191 -0
  35. package/.onto/domains/finance/structure_spec.md +182 -0
  36. package/.onto/domains/llm-native-development/competency_qs.md +430 -0
  37. package/.onto/domains/llm-native-development/concepts.md +242 -0
  38. package/.onto/domains/llm-native-development/conciseness_rules.md +163 -0
  39. package/.onto/domains/llm-native-development/dependency_rules.md +216 -0
  40. package/.onto/domains/llm-native-development/domain_scope.md +197 -0
  41. package/.onto/domains/llm-native-development/extension_cases.md +474 -0
  42. package/.onto/domains/llm-native-development/logic_rules.md +123 -0
  43. package/.onto/domains/llm-native-development/prompt_interface.md +49 -0
  44. package/.onto/domains/llm-native-development/structure_spec.md +245 -0
  45. package/.onto/domains/market-intelligence/competency_qs.md +274 -0
  46. package/.onto/domains/market-intelligence/concepts.md +233 -0
  47. package/.onto/domains/market-intelligence/conciseness_rules.md +165 -0
  48. package/.onto/domains/market-intelligence/dependency_rules.md +197 -0
  49. package/.onto/domains/market-intelligence/domain_scope.md +231 -0
  50. package/.onto/domains/market-intelligence/extension_cases.md +425 -0
  51. package/.onto/domains/market-intelligence/logic_rules.md +247 -0
  52. package/.onto/domains/market-intelligence/structure_spec.md +209 -0
  53. package/.onto/domains/ontology/competency_qs.md +394 -0
  54. package/.onto/domains/ontology/concepts.md +172 -0
  55. package/.onto/domains/ontology/conciseness_rules.md +134 -0
  56. package/.onto/domains/ontology/dependency_rules.md +125 -0
  57. package/.onto/domains/ontology/domain_scope.md +114 -0
  58. package/.onto/domains/ontology/extension_cases.md +501 -0
  59. package/.onto/domains/ontology/logic_rules.md +114 -0
  60. package/.onto/domains/ontology/problem_framing_profile.md +67 -0
  61. package/.onto/domains/ontology/structure_spec.md +115 -0
  62. package/.onto/domains/palantir-foundry/RESEARCH_NOTES.md +911 -0
  63. package/.onto/domains/palantir-foundry/competency_qs.md +191 -0
  64. package/.onto/domains/palantir-foundry/competitive_comparison.md +329 -0
  65. package/.onto/domains/palantir-foundry/concepts.md +197 -0
  66. package/.onto/domains/palantir-foundry/conciseness_rules.md +245 -0
  67. package/.onto/domains/palantir-foundry/dependency_rules.md +135 -0
  68. package/.onto/domains/palantir-foundry/domain_scope.md +395 -0
  69. package/.onto/domains/palantir-foundry/extension_cases.md +210 -0
  70. package/.onto/domains/palantir-foundry/logic_rules.md +172 -0
  71. package/.onto/domains/palantir-foundry/structure_spec.md +291 -0
  72. package/.onto/domains/software-engineering/competency_qs.md +538 -0
  73. package/.onto/domains/software-engineering/concepts.md +238 -0
  74. package/.onto/domains/software-engineering/conciseness_rules.md +167 -0
  75. package/.onto/domains/software-engineering/dependency_rules.md +216 -0
  76. package/.onto/domains/software-engineering/domain_scope.md +183 -0
  77. package/.onto/domains/software-engineering/extension_cases.md +551 -0
  78. package/.onto/domains/software-engineering/logic_rules.md +240 -0
  79. package/.onto/domains/software-engineering/problem_framing_profile.md +68 -0
  80. package/.onto/domains/software-engineering/structure_spec.md +185 -0
  81. package/.onto/domains/ui-design/competency_qs.md +567 -0
  82. package/.onto/domains/ui-design/concepts.md +194 -0
  83. package/.onto/domains/ui-design/conciseness_rules.md +190 -0
  84. package/.onto/domains/ui-design/dependency_rules.md +323 -0
  85. package/.onto/domains/ui-design/domain_scope.md +340 -0
  86. package/.onto/domains/ui-design/extension_cases.md +563 -0
  87. package/.onto/domains/ui-design/logic_rules.md +349 -0
  88. package/.onto/domains/ui-design/structure_spec.md +252 -0
  89. package/.onto/domains/visual-design/competency_qs.md +472 -0
  90. package/.onto/domains/visual-design/concepts.md +147 -0
  91. package/.onto/domains/visual-design/conciseness_rules.md +186 -0
  92. package/.onto/domains/visual-design/dependency_rules.md +282 -0
  93. package/.onto/domains/visual-design/domain_scope.md +290 -0
  94. package/.onto/domains/visual-design/extension_cases.md +480 -0
  95. package/.onto/domains/visual-design/logic_rules.md +232 -0
  96. package/.onto/domains/visual-design/structure_spec.md +213 -0
  97. package/.onto/principles/llm-native-development-guideline.md +401 -0
  98. package/.onto/principles/llm-runtime-interface-principles.md +665 -0
  99. package/.onto/principles/non-specialist-communication-guideline.md +74 -0
  100. package/.onto/principles/ontology-as-code-guideline.md +243 -0
  101. package/.onto/principles/ontology-as-code-naming-charter.md +130 -0
  102. package/.onto/principles/product-locality-principle.md +129 -0
  103. package/.onto/principles/productization-charter.md +569 -0
  104. package/.onto/processes/evolve/material-kind-adapter-contract.md +113 -0
  105. package/.onto/processes/reconstruct/reconstruct-boundary-contract.md +366 -0
  106. package/.onto/processes/reconstruct/source-profile-contract.md +107 -0
  107. package/.onto/processes/reconstruct/source-profiles/code.md +72 -0
  108. package/.onto/processes/reconstruct/source-profiles/database.md +74 -0
  109. package/.onto/processes/reconstruct/source-profiles/document.md +71 -0
  110. package/.onto/processes/reconstruct/source-profiles/spreadsheet.md +79 -0
  111. package/.onto/processes/review/binding-contract.md +270 -0
  112. package/.onto/processes/review/execution-preparation-artifacts.md +281 -0
  113. package/.onto/processes/review/interpretation-contract.md +245 -0
  114. package/.onto/processes/review/issue-stance-deliberation-contract.md +761 -0
  115. package/.onto/processes/review/lens-prompt-contract.md +402 -0
  116. package/.onto/processes/review/lens-registry.md +127 -0
  117. package/.onto/processes/review/pre-dispatch-contracts.md +428 -0
  118. package/.onto/processes/review/productized-live-path.md +398 -0
  119. package/.onto/processes/review/prompt-execution-runner-contract.md +187 -0
  120. package/.onto/processes/review/record-contract.md +427 -0
  121. package/.onto/processes/review/record-field-mapping.md +337 -0
  122. package/.onto/processes/review/review-context-manifest-contract.md +356 -0
  123. package/.onto/processes/review/review-execution-ux-contract.md +809 -0
  124. package/.onto/processes/review/review-target-profile-contract.md +259 -0
  125. package/.onto/processes/review/shared-phenomenon-contract.md +129 -0
  126. package/.onto/processes/review/synthesize-prompt-contract.md +343 -0
  127. package/.onto/processes/shared/target-material-kind-contract.md +198 -0
  128. package/.onto/roles/axiology.md +81 -0
  129. package/.onto/roles/conciseness.md +36 -0
  130. package/.onto/roles/coverage.md +34 -0
  131. package/.onto/roles/dependency.md +37 -0
  132. package/.onto/roles/evolution.md +35 -0
  133. package/.onto/roles/logic.md +104 -0
  134. package/.onto/roles/pragmatics.md +32 -0
  135. package/.onto/roles/semantics.md +36 -0
  136. package/.onto/roles/structure.md +33 -0
  137. package/.onto/roles/synthesize.md +92 -0
  138. package/AGENTS.md +240 -0
  139. package/CLAUDE.md +39 -0
  140. package/README.md +287 -0
  141. package/bin/onto +92 -0
  142. package/dist/cli.js +101 -0
  143. package/dist/core-api/reconstruct-api.js +222 -0
  144. package/dist/core-api/review-api.js +1271 -0
  145. package/dist/core-runtime/cli/assemble-review-record.js +431 -0
  146. package/dist/core-runtime/cli/bootstrap-review-binding.js +186 -0
  147. package/dist/core-runtime/cli/codex-nested-dispatch.js +226 -0
  148. package/dist/core-runtime/cli/codex-nested-dispatch.test.js +390 -0
  149. package/dist/core-runtime/cli/codex-nested-teamlead-executor.js +464 -0
  150. package/dist/core-runtime/cli/codex-nested-teamlead-executor.test.js +335 -0
  151. package/dist/core-runtime/cli/codex-review-unit-executor.js +228 -0
  152. package/dist/core-runtime/cli/complete-review-session.js +64 -0
  153. package/dist/core-runtime/cli/complexity-assessment.js +153 -0
  154. package/dist/core-runtime/cli/coordinator-helpers.js +583 -0
  155. package/dist/core-runtime/cli/coordinator-state-machine-deliberation.test.js +167 -0
  156. package/dist/core-runtime/cli/coordinator-state-machine.js +794 -0
  157. package/dist/core-runtime/cli/e2e-codex-multi-agent-fixes.test.js +615 -0
  158. package/dist/core-runtime/cli/e2e-start-review-session.test.js +312 -0
  159. package/dist/core-runtime/cli/health.js +44 -0
  160. package/dist/core-runtime/cli/inline-http-review-unit-executor.js +656 -0
  161. package/dist/core-runtime/cli/inline-http-review-unit-executor.test.js +567 -0
  162. package/dist/core-runtime/cli/materialize-review-execution-preparation.js +104 -0
  163. package/dist/core-runtime/cli/materialize-review-prompt-packets.js +952 -0
  164. package/dist/core-runtime/cli/migrate-session-roots.js +118 -0
  165. package/dist/core-runtime/cli/mock-review-unit-executor.js +285 -0
  166. package/dist/core-runtime/cli/onto-tools.js +369 -0
  167. package/dist/core-runtime/cli/prepare-review-session.js +272 -0
  168. package/dist/core-runtime/cli/render-review-final-output.js +350 -0
  169. package/dist/core-runtime/cli/repo-layout-migration-replace.smoke.test.js +106 -0
  170. package/dist/core-runtime/cli/review-invoke-auto-resolution.test.js +268 -0
  171. package/dist/core-runtime/cli/review-invoke-coordinator-topology.test.js +136 -0
  172. package/dist/core-runtime/cli/review-invoke-resolver-caching.test.js +201 -0
  173. package/dist/core-runtime/cli/review-invoke-topology-dispatch.test.js +192 -0
  174. package/dist/core-runtime/cli/review-invoke.js +2030 -0
  175. package/dist/core-runtime/cli/run-review-prompt-execution.js +2152 -0
  176. package/dist/core-runtime/cli/session-root-guard.js +168 -0
  177. package/dist/core-runtime/cli/spawn-watcher.js +173 -0
  178. package/dist/core-runtime/cli/spawn-watcher.test.js +457 -0
  179. package/dist/core-runtime/cli/start-review-session.js +68 -0
  180. package/dist/core-runtime/cli/strip-wrapping-code-fence.js +56 -0
  181. package/dist/core-runtime/cli/strip-wrapping-code-fence.test.js +79 -0
  182. package/dist/core-runtime/cli/teamcreate-lens-deliberation-executor.js +412 -0
  183. package/dist/core-runtime/cli/teamcreate-lens-deliberation-executor.test.js +351 -0
  184. package/dist/core-runtime/cli/topology-executor-mapping.js +139 -0
  185. package/dist/core-runtime/cli/topology-executor-mapping.test.js +173 -0
  186. package/dist/core-runtime/cli/write-review-interpretation.js +81 -0
  187. package/dist/core-runtime/config/onto-config-cli.js +278 -0
  188. package/dist/core-runtime/config/onto-config-key-path.js +288 -0
  189. package/dist/core-runtime/config/onto-config-key-path.test.js +195 -0
  190. package/dist/core-runtime/config/onto-config-preview.js +108 -0
  191. package/dist/core-runtime/config/onto-config-preview.test.js +132 -0
  192. package/dist/core-runtime/discovery/config-chain.js +118 -0
  193. package/dist/core-runtime/discovery/config-chain.test.js +103 -0
  194. package/dist/core-runtime/discovery/config-profile.js +199 -0
  195. package/dist/core-runtime/discovery/config-profile.test.js +233 -0
  196. package/dist/core-runtime/discovery/host-detection.js +33 -0
  197. package/dist/core-runtime/discovery/host-detection.test.js +186 -0
  198. package/dist/core-runtime/discovery/installation-paths.js +21 -0
  199. package/dist/core-runtime/discovery/installation-paths.test.js +65 -0
  200. package/dist/core-runtime/discovery/lens-registry.js +60 -0
  201. package/dist/core-runtime/discovery/lens-registry.test.js +81 -0
  202. package/dist/core-runtime/discovery/onto-home.js +71 -0
  203. package/dist/core-runtime/discovery/path-normalization.js +28 -0
  204. package/dist/core-runtime/discovery/path-normalization.test.js +22 -0
  205. package/dist/core-runtime/discovery/plugin-path.js +72 -0
  206. package/dist/core-runtime/discovery/plugin-path.test.js +95 -0
  207. package/dist/core-runtime/discovery/project-root.js +47 -0
  208. package/dist/core-runtime/discovery/settings-chain.js +353 -0
  209. package/dist/core-runtime/discovery/walk-up.js +17 -0
  210. package/dist/core-runtime/evolve/adapters/code-product/compile/compile-defense.js +344 -0
  211. package/dist/core-runtime/evolve/adapters/code-product/compile/compile-defense.test.js +915 -0
  212. package/dist/core-runtime/evolve/adapters/code-product/compile/compile.js +564 -0
  213. package/dist/core-runtime/evolve/adapters/code-product/compile/compile.test.js +708 -0
  214. package/dist/core-runtime/evolve/adapters/code-product/parsers/brief-parser.js +165 -0
  215. package/dist/core-runtime/evolve/adapters/code-product/parsers/brief-parser.test.js +227 -0
  216. package/dist/core-runtime/evolve/adapters/code-product/validators/validate.js +59 -0
  217. package/dist/core-runtime/evolve/adapters/code-product/validators/validate.test.js +205 -0
  218. package/dist/core-runtime/evolve/adapters/methodology/adapter.js +16 -0
  219. package/dist/core-runtime/evolve/adapters/methodology/adapter.test.js +9 -0
  220. package/dist/core-runtime/evolve/adapters/methodology/perspectives/authority-consistency.js +298 -0
  221. package/dist/core-runtime/evolve/adapters/methodology/perspectives/authority-consistency.test.js +70 -0
  222. package/dist/core-runtime/evolve/adapters/methodology/scope-types/process.js +46 -0
  223. package/dist/core-runtime/evolve/adapters/methodology/scope-types/process.test.js +73 -0
  224. package/dist/core-runtime/evolve/adapters/registry.js +47 -0
  225. package/dist/core-runtime/evolve/adapters/registry.test.js +67 -0
  226. package/dist/core-runtime/evolve/cli.js +256 -0
  227. package/dist/core-runtime/evolve/commands/align.js +194 -0
  228. package/dist/core-runtime/evolve/commands/align.test.js +82 -0
  229. package/dist/core-runtime/evolve/commands/apply.js +161 -0
  230. package/dist/core-runtime/evolve/commands/apply.test.js +138 -0
  231. package/dist/core-runtime/evolve/commands/close.js +39 -0
  232. package/dist/core-runtime/evolve/commands/close.test.js +99 -0
  233. package/dist/core-runtime/evolve/commands/defer.js +40 -0
  234. package/dist/core-runtime/evolve/commands/defer.test.js +134 -0
  235. package/dist/core-runtime/evolve/commands/draft.js +323 -0
  236. package/dist/core-runtime/evolve/commands/draft.test.js +178 -0
  237. package/dist/core-runtime/evolve/commands/e2e-evolve-full-cycle.test.js +208 -0
  238. package/dist/core-runtime/evolve/commands/error-messages.js +125 -0
  239. package/dist/core-runtime/evolve/commands/error-messages.test.js +167 -0
  240. package/dist/core-runtime/evolve/commands/propose-align.js +222 -0
  241. package/dist/core-runtime/evolve/commands/propose-align.test.js +136 -0
  242. package/dist/core-runtime/evolve/commands/reconstruct.js +330 -0
  243. package/dist/core-runtime/evolve/commands/reconstruct.test.js +278 -0
  244. package/dist/core-runtime/evolve/commands/shared.js +22 -0
  245. package/dist/core-runtime/evolve/commands/stale-check.js +103 -0
  246. package/dist/core-runtime/evolve/commands/stale-check.test.js +84 -0
  247. package/dist/core-runtime/evolve/commands/start.js +887 -0
  248. package/dist/core-runtime/evolve/commands/start.test.js +396 -0
  249. package/dist/core-runtime/evolve/config/project-config.js +99 -0
  250. package/dist/core-runtime/evolve/config/project-config.test.js +170 -0
  251. package/dist/core-runtime/evolve/renderers/align-packet.js +280 -0
  252. package/dist/core-runtime/evolve/renderers/align-packet.test.js +332 -0
  253. package/dist/core-runtime/evolve/renderers/draft-packet.js +303 -0
  254. package/dist/core-runtime/evolve/renderers/draft-packet.test.js +377 -0
  255. package/dist/core-runtime/evolve/renderers/format.js +5 -0
  256. package/dist/core-runtime/evolve/renderers/scope-md.js +237 -0
  257. package/dist/core-runtime/evolve/renderers/scope-md.test.js +306 -0
  258. package/dist/core-runtime/govern/cli.js +369 -0
  259. package/dist/core-runtime/govern/cli.test.js +314 -0
  260. package/dist/core-runtime/govern/drift-engine.js +103 -0
  261. package/dist/core-runtime/govern/drift-engine.test.js +319 -0
  262. package/dist/core-runtime/govern/promote-principle.js +206 -0
  263. package/dist/core-runtime/govern/promote-principle.test.js +368 -0
  264. package/dist/core-runtime/govern/queue.js +81 -0
  265. package/dist/core-runtime/govern/types.js +16 -0
  266. package/dist/core-runtime/install/cli.js +530 -0
  267. package/dist/core-runtime/install/detect.js +128 -0
  268. package/dist/core-runtime/install/detect.test.js +155 -0
  269. package/dist/core-runtime/install/gitignore-update.js +74 -0
  270. package/dist/core-runtime/install/gitignore-update.test.js +64 -0
  271. package/dist/core-runtime/install/install-integration.test.js +373 -0
  272. package/dist/core-runtime/install/prompts.js +389 -0
  273. package/dist/core-runtime/install/prompts.test.js +293 -0
  274. package/dist/core-runtime/install/types.js +26 -0
  275. package/dist/core-runtime/install/validation.js +295 -0
  276. package/dist/core-runtime/install/validation.test.js +313 -0
  277. package/dist/core-runtime/install/writer.js +254 -0
  278. package/dist/core-runtime/install/writer.test.js +218 -0
  279. package/dist/core-runtime/learning/extractor.js +461 -0
  280. package/dist/core-runtime/learning/feedback.js +179 -0
  281. package/dist/core-runtime/learning/health-report.js +165 -0
  282. package/dist/core-runtime/learning/health-report.test.js +169 -0
  283. package/dist/core-runtime/learning/loader.js +388 -0
  284. package/dist/core-runtime/learning/loader.test.js +102 -0
  285. package/dist/core-runtime/learning/promote/apply-state.js +240 -0
  286. package/dist/core-runtime/learning/promote/audit-obligation.js +195 -0
  287. package/dist/core-runtime/learning/promote/collector.js +432 -0
  288. package/dist/core-runtime/learning/promote/degraded-state.js +125 -0
  289. package/dist/core-runtime/learning/promote/domain-doc-proposer.js +166 -0
  290. package/dist/core-runtime/learning/promote/e2e-promote.test.js +6385 -0
  291. package/dist/core-runtime/learning/promote/health-snapshot.js +150 -0
  292. package/dist/core-runtime/learning/promote/insight-reclassifier.js +544 -0
  293. package/dist/core-runtime/learning/promote/judgment-auditor.js +517 -0
  294. package/dist/core-runtime/learning/promote/panel-reviewer.js +1158 -0
  295. package/dist/core-runtime/learning/promote/promote-executor.js +1675 -0
  296. package/dist/core-runtime/learning/promote/promoter.js +307 -0
  297. package/dist/core-runtime/learning/promote/retirement.js +122 -0
  298. package/dist/core-runtime/learning/promote/types.js +23 -0
  299. package/dist/core-runtime/learning/prompt-sections.js +51 -0
  300. package/dist/core-runtime/learning/shared/artifact-registry-init.js +45 -0
  301. package/dist/core-runtime/learning/shared/artifact-registry.js +254 -0
  302. package/dist/core-runtime/learning/shared/audit-obligation-kernel.js +73 -0
  303. package/dist/core-runtime/learning/shared/audit-state.js +99 -0
  304. package/dist/core-runtime/learning/shared/duplicate-check.js +28 -0
  305. package/dist/core-runtime/learning/shared/llm-caller.js +831 -0
  306. package/dist/core-runtime/learning/shared/llm-caller.test.js +601 -0
  307. package/dist/core-runtime/learning/shared/llm-tool-loop.js +393 -0
  308. package/dist/core-runtime/learning/shared/mode.js +25 -0
  309. package/dist/core-runtime/learning/shared/paths.js +84 -0
  310. package/dist/core-runtime/learning/shared/paths.test.js +79 -0
  311. package/dist/core-runtime/learning/shared/patterns.js +37 -0
  312. package/dist/core-runtime/learning/shared/recoverability.js +355 -0
  313. package/dist/core-runtime/learning/shared/recovery-context.js +374 -0
  314. package/dist/core-runtime/learning/shared/scope.js +1 -0
  315. package/dist/core-runtime/learning/shared/semantic-classifier.js +94 -0
  316. package/dist/core-runtime/learning/shared/specs/apply-execution-state-spec.js +42 -0
  317. package/dist/core-runtime/learning/shared/specs/audit-state-spec.js +37 -0
  318. package/dist/core-runtime/learning/shared/specs/backup-metadata-spec.js +39 -0
  319. package/dist/core-runtime/learning/shared/specs/emergency-log-spec.js +41 -0
  320. package/dist/core-runtime/learning/shared/specs/layout-version-spec.js +38 -0
  321. package/dist/core-runtime/learning/shared/specs/promote-decisions-spec.js +43 -0
  322. package/dist/core-runtime/learning/shared/specs/promote-report-spec.js +113 -0
  323. package/dist/core-runtime/learning/shared/specs/prune-log-spec.js +36 -0
  324. package/dist/core-runtime/learning/shared/specs/recovery-resolution-spec.js +48 -0
  325. package/dist/core-runtime/learning/shared/specs/restore-manifest-spec.js +43 -0
  326. package/dist/core-runtime/learning/shared/specs/spec-helpers.js +64 -0
  327. package/dist/core-runtime/learning/usage-tracker.js +190 -0
  328. package/dist/core-runtime/learning/usage-tracker.test.js +176 -0
  329. package/dist/core-runtime/llm/llm-caller.js +649 -0
  330. package/dist/core-runtime/llm/llm-tool-loop.js +401 -0
  331. package/dist/core-runtime/llm/model-switcher.js +62 -0
  332. package/dist/core-runtime/logger.js +22 -0
  333. package/dist/core-runtime/onboard/detect-review-axes.js +122 -0
  334. package/dist/core-runtime/onboard/detect-review-axes.test.js +127 -0
  335. package/dist/core-runtime/onboard/write-review-block.js +188 -0
  336. package/dist/core-runtime/onboard/write-review-block.test.js +240 -0
  337. package/dist/core-runtime/readers/brownfield-builder.js +150 -0
  338. package/dist/core-runtime/readers/brownfield-builder.test.js +136 -0
  339. package/dist/core-runtime/readers/code-chunk-collector.js +53 -0
  340. package/dist/core-runtime/readers/code-chunk-collector.test.js +136 -0
  341. package/dist/core-runtime/readers/file-utils.js +240 -0
  342. package/dist/core-runtime/readers/file-utils.test.js +146 -0
  343. package/dist/core-runtime/readers/lexicon-citation-check.js +93 -0
  344. package/dist/core-runtime/readers/lexicon-citation-check.test.js +77 -0
  345. package/dist/core-runtime/readers/mcp-figma.js +30 -0
  346. package/dist/core-runtime/readers/mcp-figma.test.js +82 -0
  347. package/dist/core-runtime/readers/mcp-generic.js +31 -0
  348. package/dist/core-runtime/readers/mcp-generic.test.js +76 -0
  349. package/dist/core-runtime/readers/ontology-index.js +148 -0
  350. package/dist/core-runtime/readers/ontology-index.test.js +245 -0
  351. package/dist/core-runtime/readers/ontology-query.js +168 -0
  352. package/dist/core-runtime/readers/ontology-query.test.js +311 -0
  353. package/dist/core-runtime/readers/ontology-resolve.js +48 -0
  354. package/dist/core-runtime/readers/ontology-resolve.test.js +48 -0
  355. package/dist/core-runtime/readers/patterns/index.js +7 -0
  356. package/dist/core-runtime/readers/review-log.js +213 -0
  357. package/dist/core-runtime/readers/review-log.test.js +313 -0
  358. package/dist/core-runtime/readers/scan-local.js +102 -0
  359. package/dist/core-runtime/readers/scan-local.test.js +102 -0
  360. package/dist/core-runtime/readers/scan-tarball.js +121 -0
  361. package/dist/core-runtime/readers/scan-tarball.test.js +283 -0
  362. package/dist/core-runtime/readers/scan-vault.js +34 -0
  363. package/dist/core-runtime/readers/scan-vault.test.js +81 -0
  364. package/dist/core-runtime/readers/types.js +42 -0
  365. package/dist/core-runtime/readers/types.test.js +94 -0
  366. package/dist/core-runtime/readers/viewpoint-collectors.js +229 -0
  367. package/dist/core-runtime/reconstruct/artifact-types.js +1 -0
  368. package/dist/core-runtime/reconstruct/directive-validation.js +123 -0
  369. package/dist/core-runtime/reconstruct/materialize-preparation.js +251 -0
  370. package/dist/core-runtime/reconstruct/record.js +198 -0
  371. package/dist/core-runtime/reconstruct/run.js +578 -0
  372. package/dist/core-runtime/reconstruct/seed-candidate-validation.js +356 -0
  373. package/dist/core-runtime/reconstruct/source-observations.js +62 -0
  374. package/dist/core-runtime/reconstruct/source-profiles.js +73 -0
  375. package/dist/core-runtime/release-channel/release-channel.js +90 -0
  376. package/dist/core-runtime/review/artifact-types.js +13 -0
  377. package/dist/core-runtime/review/citation-audit.js +204 -0
  378. package/dist/core-runtime/review/citation-audit.test.js +165 -0
  379. package/dist/core-runtime/review/controlled-lens-deliberation.js +125 -0
  380. package/dist/core-runtime/review/execution-plan-resolver.js +247 -0
  381. package/dist/core-runtime/review/execution-plan-resolver.test.js +243 -0
  382. package/dist/core-runtime/review/execution-topology-resolver-axis-first.test.js +246 -0
  383. package/dist/core-runtime/review/execution-topology-resolver.js +401 -0
  384. package/dist/core-runtime/review/execution-topology-resolver.test.js +315 -0
  385. package/dist/core-runtime/review/failure-records.js +57 -0
  386. package/dist/core-runtime/review/inline-context-embedder.js +141 -0
  387. package/dist/core-runtime/review/inline-context-embedder.test.js +154 -0
  388. package/dist/core-runtime/review/issue-artifact-runtime.js +859 -0
  389. package/dist/core-runtime/review/legacy-mode-policy.js +88 -0
  390. package/dist/core-runtime/review/lens-completion-policy.js +17 -0
  391. package/dist/core-runtime/review/materializers-effort-persist.test.js +79 -0
  392. package/dist/core-runtime/review/materializers.js +963 -0
  393. package/dist/core-runtime/review/ontology-path-classifier.js +179 -0
  394. package/dist/core-runtime/review/ontology-path-classifier.test.js +216 -0
  395. package/dist/core-runtime/review/packet-boundary-policy.js +215 -0
  396. package/dist/core-runtime/review/packet-boundary-policy.test.js +107 -0
  397. package/dist/core-runtime/review/participating-lens-paths.js +61 -0
  398. package/dist/core-runtime/review/participating-lens-paths.test.js +73 -0
  399. package/dist/core-runtime/review/review-artifact-utils.js +287 -0
  400. package/dist/core-runtime/review/review-config-legacy-translate.js +244 -0
  401. package/dist/core-runtime/review/review-config-legacy-translate.test.js +161 -0
  402. package/dist/core-runtime/review/review-config-validator.js +289 -0
  403. package/dist/core-runtime/review/review-config-validator.test.js +236 -0
  404. package/dist/core-runtime/review/review-execution-profile.js +193 -0
  405. package/dist/core-runtime/review/review-execution-route.js +52 -0
  406. package/dist/core-runtime/review/review-progress-contract.js +123 -0
  407. package/dist/core-runtime/review/review-record-validation.js +251 -0
  408. package/dist/core-runtime/review/review-result-classification.js +379 -0
  409. package/dist/core-runtime/review/review-state-machine.js +39 -0
  410. package/dist/core-runtime/review/route-visibility.js +125 -0
  411. package/dist/core-runtime/review/shape-pipeline-audit.test.js +311 -0
  412. package/dist/core-runtime/review/shape-to-topology-id.js +117 -0
  413. package/dist/core-runtime/review/shape-to-topology-id.test.js +132 -0
  414. package/dist/core-runtime/review/topology-shape-derivation.js +155 -0
  415. package/dist/core-runtime/review/topology-shape-derivation.test.js +195 -0
  416. package/dist/core-runtime/scope-runtime/constants.js +12 -0
  417. package/dist/core-runtime/scope-runtime/constraint-pool.js +166 -0
  418. package/dist/core-runtime/scope-runtime/constraint-pool.test.js +674 -0
  419. package/dist/core-runtime/scope-runtime/domain-validation-log.js +135 -0
  420. package/dist/core-runtime/scope-runtime/domain-validation-log.test.js +156 -0
  421. package/dist/core-runtime/scope-runtime/eval-persistence.js +65 -0
  422. package/dist/core-runtime/scope-runtime/eval-persistence.test.js +84 -0
  423. package/dist/core-runtime/scope-runtime/event-pipeline.js +64 -0
  424. package/dist/core-runtime/scope-runtime/event-pipeline.test.js +450 -0
  425. package/dist/core-runtime/scope-runtime/event-store.js +39 -0
  426. package/dist/core-runtime/scope-runtime/event-store.test.js +95 -0
  427. package/dist/core-runtime/scope-runtime/gate-guard.js +348 -0
  428. package/dist/core-runtime/scope-runtime/gate-guard.test.js +1047 -0
  429. package/dist/core-runtime/scope-runtime/hash.js +4 -0
  430. package/dist/core-runtime/scope-runtime/hash.test.js +33 -0
  431. package/dist/core-runtime/scope-runtime/id.js +4 -0
  432. package/dist/core-runtime/scope-runtime/id.test.js +17 -0
  433. package/dist/core-runtime/scope-runtime/reducer.js +297 -0
  434. package/dist/core-runtime/scope-runtime/reducer.test.js +759 -0
  435. package/dist/core-runtime/scope-runtime/scope-manager.js +161 -0
  436. package/dist/core-runtime/scope-runtime/state-machine.js +309 -0
  437. package/dist/core-runtime/scope-runtime/state-machine.test.js +704 -0
  438. package/dist/core-runtime/scope-runtime/types.js +116 -0
  439. package/dist/core-runtime/scope-runtime/types.test.js +69 -0
  440. package/dist/core-runtime/target-material-kind.js +256 -0
  441. package/dist/core-runtime/translate/render-for-user.js +169 -0
  442. package/dist/core-runtime/translate/render-for-user.test.js +122 -0
  443. package/dist/mcp/server.js +1011 -0
  444. package/dist/mcp/tool-schemas.js +93 -0
  445. package/dist/providers/capability-contract.js +1 -0
  446. package/package.json +68 -0
  447. package/settings.example.json +33 -0
@@ -0,0 +1,282 @@
1
+ ---
2
+ version: 2
3
+ last_updated: "2026-04-16"
4
+ source: manual
5
+ status: established
6
+ ---
7
+
8
+ # Visual Design Domain — Dependency Rules
9
+
10
+ Classification axis: **linkage type** — dependencies classified by the type of relationship between visual design elements and systems.
11
+
12
+ ## Token–Component Dependency
13
+
14
+ ### Token Reference Direction
15
+
16
+ - Primitive Token → Semantic Token → Component Token: tokens must reference in the direction of lower → upper (unidirectional). If semantic tokens directly contain raw values, theme switching becomes impossible
17
+ - Dependency chain: Raw Value → Primitive Token Definition → Semantic Token Reference → Component Token Reference → Component Visual Property
18
+ - Violation example: a design system defined `button-bg: #2563EB` directly. When dark mode was added, the blue that worked on white backgrounds became invisible on dark surfaces. Restructuring to `button-bg: color-primary` → `color-primary: blue-500` (light) / `color-primary: blue-300` (dark) resolved this
19
+
20
+ ### Component → Token Binding
21
+
22
+ - A component's visual properties must reference semantic tokens. Using hardcoded values directly makes consistency maintenance impossible
23
+ - Verification: for each component visual property (background, border, text color, shadow, spacing, border-radius), confirm a token reference exists. Hardcoded values = violation
24
+ - Case study: a product had 47 distinct button background colors because developers copied hex values from design tool screenshots instead of referencing tokens. Migrating to token references and consolidating to 5 semantic button colors reduced visual inconsistency across 200+ screens
25
+
26
+ ### Semantic Token Change → Propagation
27
+
28
+ - Changing a semantic token value affects all components referencing that token. Impact scope verification before change is mandatory
29
+ - Change chain: Semantic Token Value Change → Identify All Referencing Component Tokens → Verify Each Component's Visual Integrity → Verify Contrast Ratios → Approve Change
30
+ - When adding a new token: first verify whether an existing token can express the intent. Unnecessary token growth increases system complexity. Threshold: if a new semantic token is proposed, check whether it is used by 2+ components. Single-use semantic tokens are candidates for component tokens instead
31
+
32
+ ## Typography–Layout Dependency
33
+
34
+ ### Type Scale → Visual Hierarchy
35
+
36
+ - A type scale must be defined before visual hierarchy between text elements can be established. Without a scale, heading sizes are arbitrary and hierarchy is inconsistent
37
+ - Dependency chain: Base Size Selection → Ratio Selection → Scale Generation → Role Assignment (display/h1/h2/h3/body/caption)
38
+ - Failure mode: a marketing site defined headings at 32px, 28px, 24px (arbitrary steps). The 28px and 24px levels were nearly indistinguishable. Switching to a 1.25 scale (16, 20, 25, 31.25) produced clear, harmonious size differences
39
+
40
+ ### Type Scale → Spacing System
41
+
42
+ - Text size provides the basis for surrounding spacing. Larger text requires proportionally more spacing above and below
43
+ - Dependency: heading spacing > body text spacing. A heading with the same spacing as body text appears cramped; body text with heading-level spacing appears isolated
44
+ - Verification: for each type scale level, confirm that the associated spacing creates visual grouping — text and its content are closer together than text and adjacent sections
45
+
46
+ ### Measure → Grid Column Width
47
+
48
+ - The optimal readability measure (45~75 characters) constrains grid column width. Grid design must not produce text blocks that exceed or fall far below this range
49
+ - Calculation: at 16px body text, average character width is ~8px. Optimal measure (60 characters) = ~480px. A 12-column grid with 24px gutters on a 1440px screen produces ~96px columns; a 5-column text block = ~480px — within range
50
+ - Violation example: a 2-column layout on desktop placed body text in columns 1~8 (768px wide), producing ~96 characters per line. Users reported difficulty finding the next line start. Constraining text to columns 1~6 (576px, ~72 characters) resolved the issue
51
+
52
+ ### Typeface Change → Full Typography Re-verification
53
+
54
+ - Different typefaces have different x-height, character width, and line-height characteristics. Changing a typeface requires re-verification of scale, line-height, measure, and spacing
55
+ - Change chain: New Typeface Selection → x-height Comparison → Line-height Adjustment → Measure Re-verification → Spacing Review → Type Scale Tuning → Visual Regression Test
56
+ - A typeface with significantly larger x-height than the previous one may make the same pixel size feel larger, requiring scale adjustments across the system
57
+
58
+ ## Color–Accessibility Dependency
59
+
60
+ ### Color Palette → Contrast Verification
61
+
62
+ - After defining colors, verify that WCAG contrast criteria are met in all usage contexts (text/background, icon/background, UI component/adjacent color)
63
+ - Dependency chain: Palette Definition → Usage Context Mapping → Contrast Ratio Calculation → Failure Identification → Color Adjustment or Context Change
64
+ - Verification scope: every foreground-background combination in the system, not just the "primary" combinations. Edge cases (light gray text on white, dark blue text on dark gray) are where failures hide
65
+
66
+ ### Color Palette Change → Accessibility Re-verification
67
+
68
+ - If any color in the palette changes, contrast re-verification of all combinations using that color is needed
69
+ - Proportional impact: changing a primary color affects more combinations than changing an accent color. The propagation scope depends on the changed token's reference count
70
+ - Case study: a brand refreshed its primary green from `#2E7D32` to `#4CAF50` (lighter, more vibrant). The new green failed contrast (3.2:1) against white backgrounds for normal text. Adding a dark variant `#2E7D32` for text use while keeping `#4CAF50` for large elements resolved the conflict
71
+
72
+ ### Semantic Color → Supplementary Means
73
+
74
+ - Semantic colors (error, success, warning) must always be accompanied by supplementary means other than color
75
+ - Required supplementary means per semantic meaning:
76
+ - Error: red + exclamation icon + descriptive text
77
+ - Success: green + checkmark icon + confirmation text
78
+ - Warning: amber/yellow + warning triangle icon + guidance text
79
+ - Info: blue + info circle icon + explanatory text
80
+ - Violation: a form validation system showed only a red border on invalid fields. Color-blind users could not distinguish error fields from normal fields. Adding an error icon and inline error text message resolved this
81
+
82
+ ### Dark Mode Addition → Full Color System Redefinition
83
+
84
+ - Dark mode is not an inversion of light mode colors. It requires a separate semantic token mapping
85
+ - Dark mode specific rules: (1) reduce saturation of colored surfaces, (2) elevated surfaces use lighter backgrounds (opposite of light mode shadows), (3) text colors adjust for comfortable reading on dark backgrounds, (4) all contrast ratios re-verified
86
+ - Dependency chain: Dark Mode Decision → Separate Primitive Set (dark) → Semantic Token Remapping → All Component Contrast Re-verification → Image/Icon Adaptation → System Preference Detection
87
+
88
+ ## Brand–Visual System Dependency
89
+
90
+ ### Brand Colors → Color System
91
+
92
+ - Brand colors constrain the primary/accent colors of the color system. Choosing primary colors unrelated to brand colors violates brand alignment
93
+ - Dependency chain: Brand Guideline Colors → Design System Primitive Tokens → Semantic Token Mapping → Component Application
94
+ - When brand colors do not form a complete palette (common — brand guidelines define 2~3 colors), the design system extends the palette with neutral colors and complementary/analogous hues derived from the brand colors
95
+
96
+ ### Brand Typeface → Typography System
97
+
98
+ - When a brand typeface is designated, it constrains typeface selection in the typography system
99
+ - Dependency chain: Brand Typeface → Typography System Primary Face → Pairing Typeface Selection → Type Scale Definition
100
+ - If the brand typeface has poor screen readability (e.g., a display typeface meant for headings), restrict it to headings and select a complementary readable typeface for body text
101
+
102
+ ### Brand Tone and Manner → Visual Element Choices
103
+
104
+ - If the tone is "professional and restrained," elaborate illustrations, bright saturated colors, and playful typefaces are inappropriate. Tone constrains all visual choices
105
+ - Verification: for each visual element decision (typeface, color, icon style, image style, motion style), confirm alignment with the documented tone. Misalignment = brand drift
106
+
107
+ ### Brand Guideline Change → Full Visual System Review
108
+
109
+ - Brand identity is a higher-level constraint on the visual system. Changes have a large propagation scope
110
+ - Change chain: Brand Guideline Update → Identify All Brand-Coupled Tokens → Re-verify Brand Alignment → Update Design System → Re-verify Accessibility → Propagate to Code → Visual Regression Test
111
+ - Transition period: define coexistence duration for old and new brand elements. Without a defined period, both versions proliferate indefinitely
112
+
113
+ ## Component–State Dependency
114
+
115
+ ### Component Definition → State Definition
116
+
117
+ - All interactive components must have at least 5 states visually defined: default, hover, active, focus, disabled
118
+ - Extended states for stateful components: loading, error, selected (total 8 states — see structure_spec.md §State System)
119
+ - Failure mode: a toggle switch component defined only default and active states. When users tabbed to it (focus state undefined), there was no visible indication of keyboard focus
120
+
121
+ ### State Definition → Motion Definition
122
+
123
+ - If visual state transitions exist, the easing and duration of the transition must be defined
124
+ - Dependency: state pair → transition definition. Default→Hover: 150ms ease-out. Hover→Active: 100ms ease-in. Any→Focus: instant (0ms or crossfade). Any→Disabled: 200ms ease-out
125
+ - Without transition definitions, implementations vary: some developers add 0ms (jarring), others add 500ms (sluggish). Defining transitions prevents this divergence
126
+
127
+ ### Component Variant Addition → All States Required
128
+
129
+ - When adding a new variant, all states of that variant must be defined. Partial definition causes arbitrary interpretation during implementation
130
+ - Verification: variant × state matrix. Every cell must have a visual specification. Empty cells = incomplete definition
131
+
132
+ ## Design Tool–Code Dependency
133
+
134
+ ### Design Tool Component → Code Component
135
+
136
+ - Components defined in design tools (Figma) must be implementable in code. Bidirectional synchronization frequency must be defined (e.g., weekly token sync, per-sprint component sync)
137
+ - Failure mode: Figma components using effects (blur, blend modes) that are not reproducible in CSS without performance impact. Design tool capabilities must be constrained by implementation feasibility
138
+
139
+ ### Design Token → Code Variable
140
+
141
+ - Design tokens are converted to CSS custom properties, style constants, or platform-specific variables in code. A conversion pipeline must exist (e.g., Style Dictionary, Tokens Studio)
142
+ - Dependency chain: Design Token (Figma/JSON) → Token Build Pipeline → CSS Custom Properties / Swift Constants / Kotlin Values → Component Styles
143
+ - Without a pipeline, tokens are manually copied — introducing transcription errors and drift over time
144
+
145
+ ### Discrepancy Resolution
146
+
147
+ - Prior agreement on which side is the source of truth is needed. Without agreement, discrepancies evolve independently, causing drift
148
+ - Recommended model: **design system documentation** (not Figma, not code) is the source of truth. Both Figma and code are implementations that must conform to the documentation. When they disagree, the documentation resolves the conflict
149
+ - Acceptable discrepancy: implementation-specific adaptations (CSS shadow rendering differs slightly from Figma shadow) within defined tolerance. Unacceptable: different colors, different spacing values, missing states
150
+
151
+ ## Accessibility–Motion Dependency
152
+
153
+ ### Motion Definition → prefers-reduced-motion Support
154
+
155
+ - All elements with motion must have a reduced-motion alternative defined. This is not optional — it is a WCAG requirement (2.3.3 AAA, widely adopted as AA baseline)
156
+ - Dependency chain: Motion Element Identified → Motion Purpose Documented → Reduced-Motion Alternative Defined → prefers-reduced-motion Media Query Implemented → Visual State Change Still Communicated
157
+ - The alternative must communicate the same state change without motion. Replace animation with instant transition (opacity crossfade at 0ms or very short duration), not with complete removal
158
+ - Violation example: a dashboard used animated bar chart transitions to show data changes. When prefers-reduced-motion was active, bars updated without any visual feedback — users couldn't tell when data refreshed. Adding an instant value change with a brief highlight (background flash without motion) resolved this
159
+
160
+ ### Auto-playing Content → Pause Mechanism
161
+
162
+ - Automatically moving content (carousels, auto-scrolling feeds, video backgrounds) must be pausable by the user (WCAG 2.2.2)
163
+ <!-- derived-from: WCAG 2.2, SC 2.2.2 -->
164
+ - Dependency chain: Auto-playing Element Identified → Pause Control Visible → Pause State Persistent → Resume Available
165
+ - The pause control must be visible without scrolling or searching. A pause button hidden behind a hover state on the carousel itself is insufficient for keyboard and screen reader users
166
+
167
+ ### Flashing Content → Absolute Restriction
168
+
169
+ - Content that flashes more than 3 times per second can trigger seizures (WCAG 2.3.1). This is an absolute prohibition
170
+ <!-- derived-from: WCAG 2.2, SC 2.3.1 -->
171
+ - Scope: all visual changes including animated GIFs, video content, loading animations, and transition effects
172
+ - Verification: analyze all animated elements for flash frequency. Tools: Photosensitive Epilepsy Analysis Tool (PEAT)
173
+ - No exceptions: this prohibition cannot be overridden by any other design consideration, brand requirement, or stakeholder request
174
+
175
+ ## Responsive–Visual Dependency
176
+
177
+ ### Viewport Size → Typography Adaptation
178
+
179
+ - Type scale must adapt to viewport size. The same heading size appropriate for desktop (e.g., 48px) may be too large for mobile
180
+ - Dependency chain: Viewport Width → Breakpoint Threshold → Type Scale Adjustment → Line-height Re-check → Measure Re-check → Vertical Spacing Adjustment
181
+ - Implementation: fluid typography (`clamp()`) or per-breakpoint scale definitions. Both are valid; fluid is smoother but harder to debug
182
+ - Constraint: minimum sizes (body ≥16px, caption ≥12px) must be maintained at all viewports
183
+
184
+ ### Viewport Size → Spacing Adaptation
185
+
186
+ - Spacing values may need to reduce on smaller viewports to maintain content density without horizontal overflow
187
+ - Dependency: if spacing remains constant while viewport shrinks, eventually content overflows or becomes cramped
188
+ - Approach: define compact spacing scale for mobile (typically 75% of desktop values), but never below touch target minimums
189
+
190
+ ### Viewport Size → Grid Adaptation
191
+
192
+ - Grid column count and gutter width change at breakpoints. Content must reflow to accommodate fewer columns without information loss
193
+ - Dependency chain: Viewport Width → Breakpoint → Column Count Change → Content Reflow → Priority Preservation → Touch Target Verification
194
+ - Content loss prohibition: no content may be permanently hidden in responsive transitions. Content may be collapsed, reorganized, or moved to alternative locations, but must remain accessible
195
+
196
+ ## Circular Dependency Detection and Classification
197
+
198
+ In visual design, some apparent circular dependencies are intentional patterns, while others indicate structural defects.
199
+
200
+ ### Intentional Circular Patterns
201
+
202
+ - **Token ↔ Theme**: tokens define visual properties; themes redefine token values. This is not a cycle — it is a controlled override mechanism. Management: the token system defines the structure; themes override primitive values only
203
+ - **Brand ↔ Design System**: brand guidelines constrain the design system; the design system feeds back into brand guidelines when digital-specific needs arise. Management: brand guidelines are the higher authority for identity decisions; the design system is the higher authority for digital implementation decisions
204
+ - **Grid ↔ Typography**: grid column width constrains measure; type scale affects spacing which affects grid gutters. Management: choose one as the starting point (usually type scale) and derive the other
205
+
206
+ ### Unintentional Circular Dependencies (Defects)
207
+
208
+ - **Token ↔ Token**: semantic token A references semantic token B, and B references A. Resolution: flatten — one must reference a primitive directly
209
+ - **Component ↔ Component**: component A's visual spec depends on component B's dimensions, and B depends on A. Resolution: extract the shared dimension into a token
210
+ - **Brand ↔ Accessibility**: brand colors adjusted for accessibility fed back into brand guidelines, then brand guidelines re-adjusted for aesthetics, creating a loop. Resolution: establish accessibility as the non-negotiable baseline; brand adjusts once and the result is the new brand color
211
+
212
+ ### Detection Method
213
+
214
+ For any bidirectional dependency between elements X and Y:
215
+ 1. **Identify the source of truth**: is there a clear owner? If yes → intentional (document the SoT). If no → defect
216
+ 2. **Trace the reference chain**: does the chain terminate at a primitive value? If yes → not a cycle. If it loops → defect
217
+ 3. **Check for infinite loops**: can a token change cascade back to itself? If yes → structural defect regardless of intent
218
+
219
+ ## Referential Integrity
220
+
221
+ ### Token Reference Integrity
222
+
223
+ - Every semantic token must reference an existing primitive token. Broken references (semantic token pointing to a deleted primitive) produce undefined visual properties
224
+ - Every component token must reference an existing semantic token
225
+ - Verification: automated token reference validation as part of the design system build pipeline
226
+
227
+ ### Cross-File References
228
+
229
+ - design_scope.md sub-areas referenced in competency_qs.md must exist and match the CQ-ID mapping
230
+ - logic_rules.md sections referenced in competency_qs.md inference paths must exist
231
+ - structure_spec.md structural requirements referenced in dependency_rules.md must exist
232
+ - Verification: grep all `→` and `§` references and confirm targets exist
233
+
234
+ ### Design Tool–Code References
235
+
236
+ - Components in Figma must have corresponding code components (or documented exceptions)
237
+ - Token values in Figma must match code variables (within defined tolerance)
238
+ - Verification: per-sprint comparison of Figma token values vs code custom property values
239
+
240
+ ## Source of Truth Management
241
+
242
+ ### Internal Source of Truth
243
+
244
+ - **Visual design decisions**: source of truth is the design system documentation (token definitions, component visual specs). Not Figma, not code — documentation
245
+ - **Brand visual decisions**: source of truth is the brand guidelines document. If the design system and brand guidelines conflict on a brand element, the brand guidelines prevail
246
+ - **Accessibility criteria**: source of truth is WCAG official documentation and the organization's accessibility policy
247
+
248
+ ### External Source of Truth
249
+
250
+ - **Accessibility standards**: WCAG 2.2 AA (minimum), applicable accessibility laws. Non-negotiable baseline
251
+ - **Platform visual guidelines**: Material Design 3 (Android), Apple HIG (iOS/macOS). Define platform-specific visual conventions
252
+ - **Color standards**: ICC color profiles for cross-device consistency, Pantone for print
253
+
254
+ ### Conflict Resolution Priority
255
+
256
+ When sources of truth conflict:
257
+
258
+ 1. **Accessibility standards** (Tier-1a): legal and ethical obligation. Non-negotiable
259
+ 2. **Platform guidelines** (Tier-1b): enforced by platform review and user expectation
260
+ 3. **Design system / Brand guidelines** (Tier-2): internal decisions
261
+ 4. **Industry principles / Heuristics** (Tier-3): guidance when no higher-tier rule applies
262
+
263
+ Documentation requirement: when a higher-priority source overrides a lower-priority source, document the conflict and resolution.
264
+
265
+ ## SE Transfer Verification
266
+
267
+ The following SE dependency patterns were evaluated for transfer to Visual Design:
268
+
269
+ | SE Pattern | Visual Design Equivalent | Key Difference |
270
+ |---|---|---|
271
+ | Acyclic Dependencies Principle (module DAG) | Token reference direction (primitive → semantic → component, unidirectional) | SE prohibits all cycles; visual design distinguishes intentional override patterns from unintentional cycles |
272
+ | Dependency Inversion Principle (depend on abstractions) | Token abstraction (components depend on semantic tokens, not primitive values) | SE uses interfaces; visual design uses semantic tokens as the abstraction layer |
273
+ | Stable Dependencies Principle (depend toward stability) | Source of Truth Priority (depend toward higher-tier standards) | SE measures stability by coupling metrics; visual design measures by enforcement mechanism strength |
274
+ | Referential Integrity (foreign keys) | Token reference integrity, design tool–code consistency | SE enforces at database level; visual design verifies at build pipeline and design review level |
275
+ | Diamond Dependencies (version conflict) | Token conflicts (same semantic token, different primitive values in different themes) | SE resolves with version managers; visual design resolves with theme-scoped token overrides |
276
+
277
+ ## Related Documents
278
+ - concepts.md — Token, component, color, typography, brand, motion term definitions
279
+ - structure_spec.md — Token layers, component layers, state system, required relationships
280
+ - logic_rules.md — Color/typography/accessibility/motion/brand behavioral rules
281
+ - domain_scope.md — Normative hierarchy (Tier-1a/1b/2/3), source of truth priority mapping
282
+ - competency_qs.md — Dependency-related verification questions (CQ-DS, CQ-SOT, CQ-CO)
@@ -0,0 +1,290 @@
1
+ ---
2
+ version: 2
3
+ last_updated: "2026-04-16"
4
+ source: manual
5
+ status: established
6
+ ---
7
+
8
+ # Visual Design Domain — Domain Scope Definition
9
+
10
+ This is the reference document used by coverage to identify "what should exist but is missing."
11
+ This domain applies when **reviewing** visual design systems (design systems, brand identity, UI/UX visual elements, print/digital media design).
12
+ It identifies "what should be there but is missing" based on core principles and systems of visual design.
13
+
14
+ > **Boundary with ui-design domain**: ui-design covers "the structure through which the interface accommodates user intent and communicates results." This domain covers "the visual expression system" — color, typography, composition, layout, branding, iconography, motion aesthetics. Button placement, feedback timing, and disabled-state logic are ui-design's jurisdiction; button color, typeface, border-radius, and hover color shift are this domain's jurisdiction.
15
+
16
+ ## Key Sub-Areas
17
+
18
+ Classification axis: **Visual design concern** — Classified by the design concern that the visual system must address.
19
+
20
+ Applicability markers:
21
+ - **(required)**: Must be addressed in any visual design system review. Absence indicates a fundamental gap
22
+ - **(when applicable)**: Address when the system's feature set includes the relevant pattern. Condition type: feature existence (binary)
23
+ - **(scale-dependent)**: Becomes required beyond a scale threshold documented per item. Condition type: scale threshold (quantitative boundary crossed)
24
+
25
+ `(when applicable)` and `(scale-dependent)` are **mutually exclusive** (ME). If a concern depends on both feature presence and scale, split it into two statements.
26
+
27
+ ### Typography
28
+ - **Typeface System** (required): Typeface selection rationale, typeface hierarchy (heading/body/caption/code), typeface pairing principles, fallback stacks
29
+ - **Type Scale** (required): Size steps based on a ratio (e.g., Minor Third 1.2, Perfect Fourth 1.333), minimum/maximum size per viewport
30
+ - **Readability** (required): Line-height per text role, measure (line length) constraints, letter-spacing rules, readability vs legibility distinction
31
+ - **Multilingual Typography** (when applicable): CJK typesetting rules, RTL script handling, script-specific typeface fallbacks, text expansion accommodation
32
+ - **Variable Fonts** (when applicable): Axis usage (weight, width, optical size), performance trade-offs vs multiple static files
33
+
34
+ ### Color
35
+ - **Color System** (required): Color palette composition, primary/secondary/accent definition, color ratio (60-30-10), neutral palette
36
+ - **Color Theory** (required): Color wheel relationships, harmony rules (complementary/analogous/triadic/split-complementary), color psychology by context
37
+ - **Accessibility** (required): WCAG contrast ratio criteria (AA and AAA), color blindness accommodation, supplementary means beyond color
38
+ - **Dark Mode/Themes** (when applicable): Light/dark theme switching via semantic tokens, elevation model inversion, image/icon adaptation per theme
39
+ - **Data Visualization Colors** (when applicable): Sequential, diverging, and categorical palettes, colorblind-safe palette requirements
40
+
41
+ ### Layout and Composition
42
+ - **Grid System** (required): Column grid (4/8/12), modular grid, gutters, margins, max-width constraints
43
+ - **Composition Principles** (required): Visual hierarchy, Gestalt principles (proximity, similarity, continuity, closure, figure-ground), CRAP principles
44
+ - **Spacing System** (required): Base unit (4px or 8px), spacing scale, intentional whitespace rules
45
+ - **Responsive Layout** (required): Breakpoint definitions, fluid vs fixed widths, content reflow rules per viewport
46
+ - **Print Layout** (when applicable): Bleed, trim, safe area, fold considerations, CMYK conversion rules
47
+
48
+ ### Iconography and Imagery
49
+ - **Icon System** (required): Icon style (outline/filled/duotone), size system (16/20/24/32px), grid-based design, meaning consistency
50
+ - **Image Usage Principles** (when applicable): Photo/illustration style guide, aspect ratios, cropping rules, image quality thresholds
51
+ - **Data Visualization** (when applicable): Chart type selection criteria, data-ink ratio (Tufte), visual encoding principles (position, length, area, color)
52
+
53
+ ### Motion and Animation
54
+ - **Motion Principles** (when applicable): Animation purpose classification (feedback/transition/guidance/decoration), easing curve system, duration system
55
+ - **Micro-interaction Visuals** (when applicable): State transition animations (hover/active/focus), loading animations, success/error feedback animations
56
+ - **Accessibility Motion** (required): prefers-reduced-motion support, vestibular disorder considerations, flashing content prohibition (WCAG 2.3.1)
57
+
58
+ ### Brand Identity
59
+ - **Brand Visual Elements** (required): Logo usage rules (minimum size, clear space, prohibited modifications), brand colors, brand typefaces
60
+ - **Brand Tone and Manner** (required): Visual tone definition via adjective pairs, mood boards, intended impression
61
+ - **Medium-Specific Application** (when applicable): Print/digital/environmental graphic rules, co-branding rules, social media asset rules
62
+ - **Brand Architecture** (scale-dependent): Sub-brand visual relationships, endorsed vs monolithic branding. Scale threshold: 2+ distinct brand identities managed
63
+
64
+ ### Design System
65
+ - **Tokens** (required): Design tokens — primitive/semantic/component layers for color, typography, spacing, shadow, border-radius, z-index
66
+ - **Components** (required): Visual specifications for reusable UI components, per-state visual representations, variant definitions
67
+ - **Patterns** (scale-dependent): Recurring visual compositions (card layouts, hero sections, data display patterns). Scale threshold: component count >20
68
+ - **Governance** (scale-dependent): Design system contribution/change/deprecation procedures, version management, adoption tracking. Scale threshold: 2+ contributing teams
69
+
70
+ ### Accessibility
71
+ - **Visual Accessibility** (required): Contrast ratio, minimum text size, focus indicator design, information delivery means beyond color
72
+ - **Cognitive Accessibility** (when applicable): Information overload prevention via visual hierarchy, consistent visual patterns, clear visual labeling
73
+ - **Legal Standards** (reference): WCAG 2.1/2.2, Section 508, EN 301 549, ADA — by jurisdiction
74
+
75
+ ## Normative System Classification
76
+
77
+ Standards governing visual design operate at four distinct tiers with different enforcement mechanisms.
78
+
79
+ | Tier | Name | Enforcement Mechanism | Change Velocity | Examples |
80
+ |------|------|----------------------|-----------------|---------|
81
+ | Tier-1a | Accessibility Standards | **Legal obligation** + browser/AT enforcement | Slow (years) | WCAG 2.2 contrast (1.4.3, 1.4.6, 1.4.11), color-only info prohibition (1.4.1), text resize (1.4.4), flashing (2.3.1) |
82
+ | Tier-1b | Platform Visual Standards | **OS/app store review** + device rendering constraints | Slow (years) | Apple HIG Dynamic Type, Material Design color system mandatory specs, system font rendering |
83
+ | Tier-2 | Design System / Brand Guidelines | Design system linting/tokens, brand compliance review | Medium (quarterly) | Internal design tokens, brand style guide, component visual specs |
84
+ | Tier-3 | Industry Principles / Heuristics | Design review, visual QA | Fast (per project) | Gestalt Principles, 60-30-10 rule, type scale ratios, 8pt grid convention |
85
+
86
+ **Ordering principle**: Binding force determines priority: **Tier-1a > Tier-1b > Tier-2 > Tier-3**. When rules from different tiers conflict, the higher tier prevails.
87
+
88
+ Tier classification decision tree:
89
+ 1. **Tier-1a**: Would non-conformance create an accessibility/legal violation?
90
+ 2. **Tier-1b**: If not Tier-1a, is the rule enforced by OS rendering, device constraints, or app store visual requirements?
91
+ 3. **Tier-2**: If not Tier-1a/1b, is the rule enforced by an internal design system, token system, or brand compliance process?
92
+ 4. **Tier-3**: If none of the above, treat it as an industry convention or visual design heuristic
93
+
94
+ **Visual-design-specific enforcement mechanisms** (distinct from ui-design's interaction-focused mechanisms):
95
+ - **Tier-1a**: Automated contrast checkers (axe-core, Stark), WCAG compliance audits, browser text-resize enforcement
96
+ - **Tier-1b**: App store screenshot review, OS-level Dynamic Type / text scaling enforcement, system dark mode API
97
+ - **Tier-2**: Design token linting (Stylelint with token rules), Figma design lint plugins, brand compliance checklists
98
+ - **Tier-3**: Design critique sessions, visual QA by inspection, style guide adherence review — no automated enforcement
99
+
100
+ ### Source of Truth Priority Mapping
101
+
102
+ | Existing SoT Priority (dependency_rules.md) | Tier Mapping | Rationale |
103
+ |---------------------------------------------|-------------|-----------|
104
+ | Accessibility standards (WCAG) | **Tier-1a** | Legal obligation + browser/AT enforcement |
105
+ | Brand guidelines | **Tier-2** | Internal enforcement via brand review |
106
+ | Design system documentation | **Tier-2** | Internal enforcement via token linting |
107
+
108
+ ### Relationship Between Tier and Abstraction Layer (L)
109
+
110
+ The normative tier axis is defined here. The abstraction layer axis (`[L1]`/`[L2]`/`[L3]`) is defined in concepts.md. The two are independently defined but not all combinations are occupied:
111
+
112
+ | | L1 (Standard/Specification) | L2 (Principle/Convention) | L3 (Practice/Tool-Specific) |
113
+ |---|---|---|---|
114
+ | **Tier-1a** | WCAG 2.2 contrast spec, color-only prohibition | WCAG interpretation guidelines | (empty) |
115
+ | **Tier-1b** | OS font rendering specs, Dynamic Type API | Platform visual adaptation patterns | (empty) |
116
+ | **Tier-2** | Design token specification format | Token hierarchy conventions | Team-specific token naming |
117
+ | **Tier-3** | (empty) | Gestalt principles, color theory, type scale ratios | Project-specific visual decisions |
118
+
119
+ ## Cross-Cutting Concerns
120
+
121
+ Cross-cutting concerns span multiple Key Sub-Areas. Defined here because their enforcement points are distributed across multiple files.
122
+
123
+ Admission criteria:
124
+ - Spans **3 or more** Key Sub-Areas
125
+ - No single sub-area can own the concern without hiding enforcement points
126
+ - Creates a reusable verification lens (CQ-worthy)
127
+
128
+ Scale guardrail: if cross-cutting concerns exceed **Key Sub-Areas / 3**, revisit taxonomy.
129
+
130
+ ### Visual Consistency
131
+
132
+ Identical visual concepts must have identical visual representations; deviations must be intentional and justified. Three sub-types:
133
+
134
+ 1. **Internal consistency** (same visual expression for the same meaning within the product):
135
+ - Enforcement: logic_rules.md §Constraint Conflict Checks + structure_spec.md §Required Relationships
136
+ - Detection: visual element inventory comparison
137
+
138
+ 2. **External consistency** (conformance to platform and industry visual conventions):
139
+ - Enforcement: domain_scope.md §Reference Standards/Frameworks + dependency_rules.md §Source of Truth Management
140
+ - Detection: comparison against platform guidelines and industry patterns
141
+
142
+ 3. **Intentional deviation with rationale requirement**: deviation must document why it provides a better outcome.
143
+ - Enforcement: logic_rules.md §Constraint Conflict Checks
144
+ - Detection: deviation audit
145
+
146
+ ### Accessibility Conformance
147
+
148
+ Spans Color, Typography, Motion, Layout, Iconography. The visual system must meet accessibility standards across all visual elements, not just color.
149
+
150
+ - Color: contrast ratios, supplementary means (structure_spec.md §Required Relationships)
151
+ - Typography: minimum size, resize support (logic_rules.md §Typography Logic)
152
+ - Motion: reduced-motion support (logic_rules.md §Motion Logic)
153
+ - Layout: reflow at 200% zoom (structure_spec.md §Responsive Structure)
154
+ - Iconography: meaning not conveyed by icon alone without text label (logic_rules.md §Accessibility Logic)
155
+
156
+ ## Required Concept Categories
157
+
158
+ | Category | Description | Risk if Missing | Example of Failure |
159
+ |----------|------------|----------------|-------------------|
160
+ | Visual hierarchy | System for conveying information importance through visual means | Users cannot find critical information | Dashboard with 12 equally-sized metrics in same color; users scan randomly, miss the one KPI that requires action |
161
+ | Color system | Rules for color selection, combination, and meaning assignment | Visual inconsistency, accessibility violations | Product uses 23 shades of blue with no defined palette; dark mode conversion produces unreadable text on 8 screens |
162
+ | Type system | Rules for typeface, size, line-height, letter-spacing | Readability degradation, information delivery failure | Marketing site uses decorative typeface at 12px for body text; mobile bounce rate increases significantly |
163
+ | Spacing system | Rules for distance between elements | Absence of visual rhythm, unclear relationships | Card grid uses 5 different gap values (8, 12, 15, 20, 24px); elements appear randomly placed |
164
+ | Visual consistency | Same visual expression for the same meaning | Increased learning cost, reduced trust | "Primary" buttons are blue on 3 screens, green on 2, and purple on 1; users hesitate before clicking |
165
+ | Accessibility | Design enabling users of diverse abilities to access visual information | User exclusion, legal violations | Error messages conveyed only by red text color; 8% of male users with red-green color blindness cannot identify errors |
166
+ | Brand alignment | Degree to which visual elements match brand identity | Brand recognition confusion | Sub-product uses a different typeface and color palette with no documented reason; users question whether it is the same brand |
167
+ | Source of truth | Authoritative standard for visual design decisions | Visual inconsistency proliferation | Design team and development team each maintain separate color values; 15 of 40 tokens have diverged over 6 months |
168
+
169
+ ## Reference Standards/Frameworks
170
+
171
+ This file is the **single source of truth for external standard version information** within the visual-design domain. Other files reference standards without version numbers; the version in this table governs.
172
+
173
+ | Standard/Framework | Version | Application Area | Core Content | When to Apply |
174
+ |-------------------|---------|-----------------|--------------|---------------|
175
+ | WCAG | 2.2 (2023) | Accessibility | Contrast ratios (1.4.3, 1.4.6, 1.4.11), color-only prohibition (1.4.1), text resize (1.4.4), flashing (2.3.1) | Every visual design review |
176
+ | Material Design | 3 (2023) | Design system | Color system (dynamic color, tonal palettes), typography (type scale), motion (easing, duration) | Android (mandatory); others (reference) |
177
+ | Apple HIG | 2024 | Design system | Dynamic Type, SF Symbols, vibrancy, materials, system colors, dark mode | iOS/macOS (mandatory); others (reference) |
178
+ | Gestalt Principles | — | Composition/layout | Proximity, similarity, continuity, closure, figure-ground, common fate | Every layout/composition review |
179
+ | Modular Scale | — | Typography | Ratio-based size step system (Minor Third 1.2, Major Third 1.25, Perfect Fourth 1.333) | Type scale definition |
180
+ | 8pt Grid | — | Layout/spacing | 8px unit-based spacing and sizing system (4px for fine adjustments) | Spacing and layout review |
181
+ | Color Universal Design (CUD) | — | Color/accessibility | Color design considering color vision diversity | Color palette review |
182
+ | Atomic Design | — | Design system | Atom → Molecule → Organism → Template → Page, 5 layers | Component architecture review |
183
+ | Design Tokens W3C | Community Group Draft (2023) | Design system | Platform-agnostic token format specification (JSON) | Token system review |
184
+ | ICC Color Profile | v4 (2004) | Color management | sRGB, Display P3 color spaces, cross-device color consistency | Print and cross-device color review |
185
+
186
+ ### External-Standard Derivation Markers
187
+
188
+ Rules materially derived from external standards carry grep-friendly source markers in their owner files:
189
+
190
+ - `<!-- derived-from: WCAG 2.2, SC 1.4.3 -->`
191
+ - `<!-- derived-from: Material Design 3, Color system -->`
192
+
193
+ Marker usage: add when the rule would need review if the standard version changes. Keep the marker in the rule-owning file.
194
+
195
+ ## Bias Detection Criteria
196
+
197
+ A triggered criterion indicates a review coverage problem, not necessarily a design defect.
198
+
199
+ ### Coverage Distribution
200
+
201
+ - If 3 or more of the 8 Key Sub-Areas are not represented at all → **insufficient coverage** (threshold: ⌈8 / 2.5⌉ = 4, using 3 for visual design's tighter coupling)
202
+ - If definitions in a specific area account for >70% of the total → **bias warning**
203
+
204
+ ### System Balance
205
+
206
+ - If only color is defined and typography system is missing → **basic system imbalance**
207
+ - If only components are defined and tokens are missing → **abstraction layer missing** (consistency maintenance impossible without tokens)
208
+ - If a visual system exists without brand guidelines → **brand basis absent**
209
+ - If only static states are defined without state transitions (hover, active, disabled) → **interaction state missing**
210
+
211
+ ### Media and Context
212
+
213
+ - If only digital is covered while print/environmental media are applicable but missing → **media bias**
214
+ - If only light mode is defined when dark mode is required → **theme coverage gap**
215
+ - If only desktop visual specs exist when mobile is applicable → **viewport bias**
216
+
217
+ ### Governance and Authority
218
+
219
+ - If 2 or more core visual elements have no designated source of truth → **authority undesignated**
220
+ - If animation is present but no motion system or `prefers-reduced-motion` is evaluated → **animation excess without governance**
221
+ - If design tool (Figma) and code implementation have no synchronization method defined → **tool-code drift risk**
222
+
223
+ ## Inter-Document Contract
224
+
225
+ ### Rule Ownership
226
+
227
+ | Cross-cutting Topic | Owner File | Other Files |
228
+ |---|---|---|
229
+ | Dependency direction rules | dependency_rules.md | structure_spec.md (references only) |
230
+ | Source of Truth priority | dependency_rules.md §Source of Truth Management | domain_scope.md (tier mapping) |
231
+ | Concept definitions and synonyms | concepts.md | All other files reference, do not redefine |
232
+ | Structural coherence rules | structure_spec.md §Required Relationships | Other files reference |
233
+ | Conciseness criteria | conciseness_rules.md | Other files reference |
234
+ | Competency questions | competency_qs.md | Other files provide inference path targets |
235
+ | Behavioral quantitative thresholds | logic_rules.md | structure_spec.md (structural thresholds only) |
236
+ | External-standard derivation markers | owner file of each derived rule | domain_scope.md (version SSOT only) |
237
+ | Constraint conflict resolution | logic_rules.md §Constraint Conflict Checks | dependency_rules.md (cascading failures) |
238
+ | Visual consistency (cross-cutting) | domain_scope.md §Cross-Cutting Concerns | logic_rules.md, structure_spec.md, dependency_rules.md |
239
+
240
+ ### Required Substance per Sub-area
241
+
242
+ Each sub-area in Key Sub-Areas must have corresponding substance in at least one of:
243
+ - concepts.md: term definitions
244
+ - logic_rules.md or structure_spec.md or dependency_rules.md: operational rules
245
+ - competency_qs.md: verification questions
246
+
247
+ A sub-area with declaration but no substance in any file is a "ghost sub-area."
248
+
249
+ ### Cross-cutting Concern Attribution
250
+
251
+ When a concern spans multiple sub-areas, attribute to the sub-area with the **primary enforcement point**:
252
+
253
+ 1. **Primary enforcement point**: the sub-area whose rules would be violated. Example: contrast ratio spans Color and Accessibility. Primary: Accessibility (WCAG violation is the enforcement driver)
254
+ 2. **Secondary references**: other sub-areas reference primary rules, do not duplicate
255
+ 3. **Tie-breaking**: if enforcement equally distributed, attribute to the sub-area with fewer existing items
256
+
257
+ ### Classification Axis Relationships
258
+
259
+ | File | Axis | Facet |
260
+ |---|---|---|
261
+ | domain_scope.md | Visual design concern | What design concerns exist (scope) |
262
+ | logic_rules.md | Visual construction concern | What concerns are governed by behavioral rules |
263
+ | competency_qs.md | Verification concern | What concerns must be verified |
264
+
265
+ ### Sub-area to CQ Section Mapping
266
+
267
+ | Sub-area | CQ Sections | Coverage |
268
+ |---|---|---|
269
+ | Typography | CQ-T | Full |
270
+ | Color | CQ-C | Full |
271
+ | Layout and Composition | CQ-GL | Full |
272
+ | Iconography and Imagery | CQ-II | Full |
273
+ | Motion and Animation | CQ-MO | Full |
274
+ | Brand Identity | CQ-BI | Full |
275
+ | Design System | CQ-DS | Full |
276
+ | Accessibility | CQ-AC | Full |
277
+
278
+ Cross-cutting CQ sections:
279
+ - CQ-VH (Visual Hierarchy) — spans Typography, Color, Layout, Iconography
280
+ - CQ-SOT (Source of Truth) — spans Design System, Brand Identity
281
+ - CQ-CO (Consistency) — spans all sub-areas
282
+
283
+ ## Related Documents
284
+ - concepts.md — Term definitions, abstraction layer ([L1]/[L2]/[L3]) classification
285
+ - structure_spec.md — Visual design system structural requirements and thresholds
286
+ - logic_rules.md — Visual construction behavioral rules, constraint conflict checks
287
+ - dependency_rules.md — Token–component, brand–visual system, color–accessibility dependency rules
288
+ - competency_qs.md — Verification questions organized by CQ-ID sections
289
+ - extension_cases.md — Growth and contraction scenarios with impact analysis
290
+ - conciseness_rules.md — Conciseness criteria for review output