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,213 @@
1
+ ---
2
+ version: 2
3
+ last_updated: "2026-04-16"
4
+ source: manual
5
+ status: established
6
+ ---
7
+
8
+ # Accounting Domain — Domain Scope Definition
9
+
10
+ This is the reference document used by coverage to identify "what should exist but is missing" in accounting systems.
11
+ This domain applies when **reviewing** accounting systems and financial reporting frameworks — transaction recording, journal entries, ledger aggregation, closing procedures, financial statement preparation, and note disclosure.
12
+
13
+ > **Boundary with finance domain**: The finance domain covers the output of accounting — financial statement ontologies, taxonomies, inter-statement relationships, analytical metrics. This domain covers the input and processing — journal entries, ledger posting, closing procedures, recognition/measurement rules, and disclosure mechanics. A completed income statement belongs to finance; the sequence of journal entries that produced it belongs to accounting.
14
+
15
+ > **Boundary with accounting-kr (Korean-specific) domain**: The accounting-kr domain covers Korea-specific accounting practices, K-GAAP vs K-IFRS transition issues, and Korean tax code interactions. This domain covers accounting fundamentals applicable across jurisdictions. Korean-specific regulatory filings (DART reporting) belong to accounting-kr; K-IFRS core standard principles belong here.
16
+
17
+ ## Classification Axes
18
+
19
+ | Axis | Values | Description |
20
+ |---|---|---|
21
+ | Recording basis | Cash basis / Accrual basis | Timing of revenue/expense recognition |
22
+ | Standard | K-IFRS / K-GAAP / US-GAAP | Applicable accounting standard |
23
+ | Reporting unit | Consolidated / Separate | Financial statement preparation unit |
24
+ | Reporting frequency | Annual / Semi-annual / Quarterly / Monthly | Closing frequency |
25
+ | Entity type | General / Financial / Public sector / Non-profit | Chart of accounts structure varies |
26
+ | Measurement basis | Historical cost / Fair value / Amortised cost / NRV / Value in use | Valuation method per asset/liability |
27
+
28
+ ## Key Sub-Areas
29
+
30
+ Classification axis: **Accounting concern** — Classified by the concern that an accounting system must address.
31
+
32
+ Applicability markers:
33
+ - **(required)**: Must be addressed in any accounting system review. Absence indicates a fundamental gap
34
+ - **(when applicable)**: Address when the entity's activity includes the relevant pattern. Condition type: feature existence (binary)
35
+ - **(scale-dependent)**: Becomes required beyond a scale threshold documented per item. Condition type: scale threshold (quantitative boundary crossed)
36
+
37
+ ### Double-Entry Bookkeeping
38
+ - **Double-entry principles** (required): Debit (차변) / Credit (대변) balance, Journal Entry (분개), Trial Balance (시산표), Posting (전기), General Ledger (총계정원장)
39
+ - **Accrual basis accounting** (required): Revenue/expense recognition timing, differences from cash basis, period attribution via adjusting entries
40
+ - **Chart of accounts** (required): 5-element classification (Assets/Liabilities/Equity/Revenue/Expenses), account code hierarchy, subsidiary ledgers
41
+
42
+ ### Financial Statements
43
+ - **Statement of Financial Position (재무상태표)** (required): Assets = Liabilities + Equity identity, current/non-current classification, measurement basis per item
44
+ - **Statement of Comprehensive Income (포괄손익계산서)** (required): Revenue/expense recognition, Operating Income structure, Other Comprehensive Income (기타포괄손익, OCI)
45
+ - **Statement of Cash Flows (현금흐름표)** (required): Operating/investing/financing classification, direct/indirect method for operating CF
46
+ - **Statement of Changes in Equity (자본변동표)** (required): Changes in equity components, Retained Earnings (이익잉여금) appropriation, OCI accumulation
47
+
48
+ ### K-IFRS Core Standards
49
+ - **IFRS 15 Revenue Recognition (수익인식)** (required): 5-step model (contract → performance obligations → transaction price → allocation → recognition), over-time vs point-in-time
50
+ - **IFRS 16 Leases (리스)** (required): Right-of-Use Asset (사용권자산) / Lease Liability (리스부채) recognition, short-term and low-value exemptions
51
+ - **IFRS 9 Financial Instruments (금융상품)** (required): Classification (AC/FVOCI/FVTPL), Expected Credit Loss (기대신용손실), hedge accounting basics
52
+ - **IAS 36 Impairment (자산손상)** (when applicable): Cash-generating units, recoverable amount, impairment indicators, impairment reversal
53
+ - **IAS 2 Inventories (재고자산)** (when applicable): Cost formula (FIFO / weighted average), net realizable value, write-down
54
+ - **IAS 16 PP&E (유형자산)** (when applicable): Depreciation method, useful life, residual value, revaluation model
55
+ - **IAS 38 Intangible Assets (무형자산)** (when applicable): Recognition criteria, amortisation, internally generated intangibles
56
+ - **IFRS 3 Business Combinations (사업결합)** (when applicable): Acquisition method, goodwill (영업권) recognition, purchase price allocation (PPA)
57
+
58
+ ### Period and Closing
59
+ - **Accounting period** (required): Fiscal year definition, interim periods, period attribution enforcement
60
+ - **Closing procedures** (required): Adjusting entries (수정분개), closing entries (마감분개), reversing entries, opening balance rollover
61
+ - **Disclosure and notes** (required): Significant accounting policy disclosure, estimation uncertainty, related party transactions, subsequent events
62
+ - **XBRL reporting** (scale-dependent): Electronic disclosure taxonomy mapping, tagging rules, validation. Scale threshold: listed entity
63
+
64
+ ### Supporting Areas
65
+ - **Tax accounting** (when applicable): K-IFRS ↔ Corporate Tax Law reconciliation, Deferred Tax (이연법인세), tax adjustments (세무조정)
66
+ - **Cost accounting** (when applicable): Manufacturing cost allocation, job order vs process costing, standard costing, activity-based costing
67
+ - **Management accounting** (when applicable): Budgeting, variance analysis, break-even analysis, CVP analysis
68
+ - **Audit and internal controls** (when applicable): ISA-based audit procedures, internal control design (COSO framework), audit evidence, management assertions
69
+ - **Consolidated accounting** (when applicable): Control determination (IFRS 10), consolidation scope, intercompany elimination, Non-controlling Interest (비지배지분)
70
+ - **Foreign currency translation** (when applicable): Functional currency determination, transaction date rate, period-end rate, translation differences
71
+
72
+ ## Normative System Classification
73
+
74
+ Standards governing accounting operate at four distinct tiers.
75
+
76
+ | Tier | Name | Enforcement Mechanism | Change Velocity | Examples |
77
+ |------|------|----------------------|-----------------|---------|
78
+ | Tier-1a | Accounting Standards | **Legal obligation** + auditor enforcement | Slow (years) | K-IFRS standards, IFRS/IAS, K-GAAP for non-listed, US-GAAP ASC |
79
+ | Tier-1b | Regulatory and Tax Requirements | **Regulatory/tax authority** enforcement | Medium (annual) | Financial Services Commission (FSC) disclosure rules, Corporate Tax Law, Income Tax Law, listing requirements |
80
+ | Tier-2 | Audit Standards and Data Taxonomies | Audit firm and regulatory review | Medium (annual) | ISA (International Standards on Auditing), XBRL taxonomies, DART filing rules |
81
+ | Tier-3 | Industry Practice and Heuristics | Professional convention, peer comparison | Fast (per analysis) | Common cost allocation methods, typical materiality thresholds (5% of pre-tax income), industry-specific metrics |
82
+
83
+ **Ordering principle**: Tier-1a > Tier-1b > Tier-2 > Tier-3. Accounting standards override everything; tax requirements override data standards and practice.
84
+
85
+ Tier classification decision tree:
86
+ 1. **Tier-1a**: Is this rule from K-IFRS, IFRS/IAS, K-GAAP, or US-GAAP? Would non-conformance produce a qualified audit opinion?
87
+ 2. **Tier-1b**: If not Tier-1a, is this rule from tax law, regulatory filing requirements, or listing rules? Would non-conformance produce a regulatory penalty?
88
+ 3. **Tier-2**: If not Tier-1a/1b, is this rule from audit standards (ISA) or data taxonomies (XBRL)?
89
+ 4. **Tier-3**: If none of the above, is this an industry practice or professional convention?
90
+
91
+ ## Cross-Cutting Concerns
92
+
93
+ ### Audit Trail
94
+
95
+ Spans all sub-areas. Every recorded transaction must be traceable from origin (source document) through journal entry, ledger, trial balance, to financial statement presentation.
96
+
97
+ - Transaction-to-statement traceability: logic_rules.md §Double-Entry Balance Logic
98
+ - Journal-to-ledger posting: dependency_rules.md §Direction Rules
99
+ - Supporting documentation retention: structure_spec.md §Verification Structure
100
+
101
+ ### Period Attribution Integrity
102
+
103
+ Spans Double-Entry Bookkeeping, Financial Statements, and Period/Closing. Transactions must be attributed to the correct accounting period through accrual basis accounting.
104
+
105
+ - Accrual adjustments: logic_rules.md §Period Attribution Logic (unearned/accrued revenue, prepaid/accrued expense)
106
+ - Period boundaries: logic_rules.md §Closing Procedures
107
+ - Comparative period consistency: dependency_rules.md §Period Dependencies
108
+
109
+ ### Measurement Consistency
110
+
111
+ Spans Financial Statements and Accounting Standards. Measurement basis (historical cost, fair value, amortised cost) must be consistently applied per accounting policy.
112
+
113
+ - Policy disclosure: concepts.md §Accounting Policy Choices
114
+ - Policy changes: extension_cases.md §K-IFRS Standard Amendment
115
+ - Measurement hierarchy: logic_rules.md §Measurement Logic
116
+
117
+ ## Required Concept Categories
118
+
119
+ | Category | Description | Risk if Missing | Example of Failure |
120
+ |---|---|---|---|
121
+ | Debit/Credit balance (차변/대변) | Every transaction must have equal debits and credits | Trial Balance imbalance, financial statement integrity breakdown | Cash sale of 1M KRW recorded only as revenue increase — assets don't increase, trial balance broken |
122
+ | Accrual basis (발생기준) | Economic events recognized at occurrence, not cash exchange | Revenue/expense period attribution errors | December 31 service delivered, cash received January — if recorded in January only, December revenue understated |
123
+ | Going concern (계속기업) | Assumption that entity continues operations | Asset valuation basis breakdown; liquidation value application required instead | Bankruptcy-imminent entity still values assets at historical cost instead of NRV |
124
+ | Materiality (중요성) | Threshold for influencing user decisions | Excessive disclosure (noise) or omission of significant information | Disclosing every 10,000 KRW rounding difference as a note, obscuring material items |
125
+ | Substance over form (실질우선) | Economic substance drives accounting, not legal form | Formal classification errors | Sale-and-leaseback structured as sale for legal form but economically financing — must be classified as financing |
126
+ | Audit trail (추적가능성) | Traceability from transaction to statement | Audit impossible, error sources unidentifiable | Financial statements show revenue 10B but supporting journal entries only total 8B |
127
+ | Chart of accounts integrity | All accounts used are defined, classified correctly | Unauthorized accounts emerge, reporting drift | Journal entry uses "miscellaneous" account not in chart; aggregation produces inconsistent totals |
128
+ | Closing discipline | Period-end procedures executed completely | Period attribution errors carried forward | Adjusting entries not posted — accrued expenses missed, next period's opening balance wrong |
129
+ | Estimation reasonableness | Estimates (depreciation, ECL, Fair value) based on documented methodology | Subjective swings, manipulation risk | Depreciation useful life changed from 10 to 20 years without documented rationale — smoothed earnings artificially |
130
+
131
+ ## Reference Standards/Frameworks
132
+
133
+ This file is the **single source of truth for external standard version information** within the accounting domain.
134
+
135
+ | Standard | Version | Application Area | Core Content |
136
+ |----------|---------|-----------------|--------------|
137
+ | K-IFRS | 2024 (aligned with IFRS) | Listed entity accounting | Korean adoption of IFRS; 17 IFRS + 29 IAS standards |
138
+ | K-GAAP | 2024 | Non-listed SME accounting | Korean accounting standards for entities not applying K-IFRS |
139
+ | Corporate Tax Law | 2024 (revised annually) | Tax accounting | Tax adjustments, Deferred Tax calculation |
140
+ | Income Tax Law | 2024 | Personal tax | Individual taxpayer filing and deduction rules |
141
+ | XBRL | 2.1 (2003, maintained) | Electronic disclosure | Structured reporting format for financial data |
142
+ | IFRS Taxonomy | 2024 | XBRL mapping | Element definitions for IFRS disclosure requirements |
143
+ | ISA | 2023 (IAASB) | Audit procedures | 40+ standards for audit planning, execution, reporting |
144
+ | COSO Internal Control Framework | 2013 | Internal controls | 5 components (control environment, risk assessment, control activities, information/communication, monitoring) |
145
+ | DART Taxonomy | Current | Korean electronic disclosure | Financial Supervisory Service taxonomy for DART filings |
146
+
147
+ ## Bias Detection Criteria
148
+
149
+ ### Coverage Distribution
150
+
151
+ - If 3 or more of the 5 concern areas are not represented at all → **insufficient coverage**
152
+ - If concepts from a specific standard (e.g., IFRS 15) account for more than 70% of the total → **standard bias**
153
+
154
+ ### Transaction Path Completeness
155
+
156
+ - If only normal transactions are addressed with no adjusting entries/error corrections → **path bias**
157
+ - If only recognition/measurement is present with no disclosure/notes → **reporting incomplete**
158
+ - If closing procedures (adjusting, closing, reversing entries) are not addressed → **closing gap**
159
+
160
+ ### Reporting Unit Completeness
161
+
162
+ - If only individual financial statements are present with no consolidated perspective (when applicable) → **consolidated perspective absence**
163
+ - If only current period is addressed with no comparative period → **comparability absence**
164
+
165
+ ### Standard Separation
166
+
167
+ - If K-IFRS income is used directly as taxable income without tax adjustments → **tax-accounting confusion**
168
+ - If fair value measurement and cost measurement coexist for the same asset without policy documentation → **measurement policy ambiguity**
169
+ - If substance over form principle is not applied to complex transactions (e.g., leaseback, repo) → **form-driven classification**
170
+
171
+ ## Inter-Document Contract
172
+
173
+ ### Rule Ownership
174
+
175
+ | Cross-cutting Topic | Owner File | Other Files |
176
+ |---|---|---|
177
+ | Double-entry balance logic | logic_rules.md §Double-Entry Balance Logic | structure_spec.md (references) |
178
+ | Recognition rules (IFRS 15/9/16) | logic_rules.md §Recognition Logic | dependency_rules.md (references) |
179
+ | Concept definitions and synonyms | concepts.md | All other files reference, do not redefine |
180
+ | Source of Truth priority | dependency_rules.md §Source of Truth Management | domain_scope.md (tier mapping) |
181
+ | Structural requirements | structure_spec.md §Financial Statement Structure Required Elements | Other files reference |
182
+ | Conciseness criteria | conciseness_rules.md | Other files reference |
183
+ | Competency questions | competency_qs.md | Other files provide inference path targets |
184
+ | Constraint conflict resolution | logic_rules.md §Constraint Conflict Checking | dependency_rules.md (cascading failures) |
185
+
186
+ ### Sub-area to CQ Section Mapping
187
+
188
+ | Sub-area | CQ Sections | Coverage |
189
+ |---|---|---|
190
+ | Double-Entry Bookkeeping | CQ-DE | Full |
191
+ | Financial Statements | CQ-FS | Full |
192
+ | IFRS 15 Revenue Recognition | CQ-RR | Full |
193
+ | IFRS 9 Financial Instruments | CQ-FI | Full |
194
+ | IFRS 16 Leases | CQ-LS | Full |
195
+ | Period and Closing | CQ-PC | Full |
196
+ | Tax Accounting | CQ-TX | Full |
197
+ | Audit and Internal Controls | CQ-AU | Full |
198
+ | Consolidated Accounting | CQ-CS | Full |
199
+ | Disclosure and Notes | CQ-DS | Full |
200
+
201
+ Cross-cutting CQ sections:
202
+ - CQ-AT (Audit Trail) — spans all transaction flow sub-areas
203
+ - CQ-PA (Period Attribution) — spans Double-Entry, Financial Statements, Period/Closing
204
+ - CQ-MC (Measurement Consistency) — spans Financial Statements and Accounting Standards
205
+
206
+ ## Related Documents
207
+ - concepts.md — Definitions of terms within this scope
208
+ - structure_spec.md — Specific rules for financial statement structure and chart of accounts
209
+ - competency_qs.md — Questions this scope must be able to answer
210
+ - logic_rules.md — Recognition, measurement, and balance logic
211
+ - dependency_rules.md — Inter-statement linkage, inter-standard dependencies
212
+ - extension_cases.md — Scenarios for accounting evolution (new revenue types, standard amendments, consolidation changes)
213
+ - conciseness_rules.md — Allowed/prohibited redundancy patterns
@@ -0,0 +1,416 @@
1
+ ---
2
+ version: 2
3
+ last_updated: "2026-04-16"
4
+ source: manual
5
+ status: established
6
+ ---
7
+
8
+ # Accounting Domain — Extension Scenarios
9
+
10
+ Classification axis: **Change trigger** — cases classified by the type of change that triggers accounting system evolution. Cases cover growth triggers (Cases 1–8) and shrinkage/simplification triggers (Cases 9–10).
11
+
12
+ ---
13
+
14
+ ## Case 1: Adding a New Revenue Source
15
+
16
+ ### Situation
17
+
18
+ A previously non-existent type of revenue occurs (subscription model, licensing, bundled sales, usage-based billing).
19
+
20
+ ### Case Study: SaaS Subscription Transition
21
+
22
+ A software company shifted from perpetual licenses (recognized at delivery) to SaaS subscriptions (over-time recognition). Each subscription has multiple performance obligations: software access (over-time), implementation services (point-in-time on delivery), customer support (over-time over subscription period). Revenue recognition required IFRS 15 allocation at standalone selling price.
23
+
24
+ ### Impact Analysis
25
+
26
+ | Principle | Impact |
27
+ |---|---|
28
+ | Performance obligation identification | New types must be identified and documented |
29
+ | Over-time vs point-in-time determination | New arrangements may require different pattern |
30
+ | Transaction price allocation | Multi-element contracts require allocation |
31
+ | Chart of accounts | New revenue account may be needed |
32
+ | System support | ERP must handle over-time revenue and contract liabilities |
33
+
34
+ ### Verification Checklist
35
+
36
+ - [ ] Can 5-step IFRS 15 model be applied to new revenue source? → logic_rules.md §Recognition Logic
37
+ - [ ] Are Performance Obligations properly identified? → concepts.md §Revenue Recognition Terms
38
+ - [ ] Can chart of accounts accommodate new revenue type? → structure_spec.md §Chart of Accounts
39
+ - [ ] Does ERP system handle over-time recognition? → domain_scope.md §Key Sub-Areas
40
+ - [ ] Are contract assets/liabilities distinguishable from trade receivables/payables? → concepts.md §Revenue Recognition Terms
41
+
42
+ ### Affected Files
43
+
44
+ | File | Impact | Section |
45
+ |---|---|---|
46
+ | concepts.md | Verify | §Revenue Recognition Terms |
47
+ | logic_rules.md | Verify | §Recognition Logic (Revenue) |
48
+ | structure_spec.md | Modify | §Chart of Accounts |
49
+ | dependency_rules.md | Verify | §Inter-Account Dependencies |
50
+
51
+ ---
52
+
53
+ ## Case 2: K-IFRS Standard Amendment
54
+
55
+ ### Situation
56
+
57
+ A major amendment to an applicable standard changing recognition, measurement, or disclosure requirements.
58
+
59
+ ### Case Study: IFRS 16 Leases Adoption (2019)
60
+
61
+ Operating leases moved from off-balance-sheet to on-balance-sheet. Companies must choose transition method:
62
+ - Full retrospective (prior periods restated)
63
+ - Modified retrospective (cumulative effect at transition date, no prior period restatement)
64
+
65
+ Impact: total assets and liabilities increase materially (10-30% for asset-heavy companies). Leverage ratios fundamentally altered.
66
+
67
+ ### Impact Analysis
68
+
69
+ | Principle | Impact |
70
+ |---|---|
71
+ | Accounting policy change | Retrospective or modified retrospective |
72
+ | Prior period restatement | Comparative statements may be restated |
73
+ | Ratio recalculation | Leverage, ROA, interest coverage all affected |
74
+ | Disclosure transition year | Additional disclosures in first year of application |
75
+ | Tax effect | Tax adjustment items change (tax often uses prior treatment) |
76
+
77
+ ### Verification Checklist
78
+
79
+ - [ ] Is transition method chosen and documented? → dependency_rules.md §Period Dependencies → IAS 8
80
+ - [ ] Are prior period comparatives restated (if full retrospective)? → logic_rules.md §Period Attribution Logic
81
+ - [ ] Is transition impact disclosed in notes? → domain_scope.md §Key Sub-Areas → Disclosure
82
+ - [ ] Do tax adjustments reflect new treatment? → logic_rules.md §Tax-Accounting Difference Logic
83
+ - [ ] Are affected ratios recalculated and disclosed? → dependency_rules.md §Inter-Financial-Statement Linkage
84
+
85
+ ### Affected Files
86
+
87
+ | File | Impact | Section |
88
+ |---|---|---|
89
+ | concepts.md | Modify | relevant IFRS section, §Accounting Policy Choices |
90
+ | logic_rules.md | Modify | relevant rules, §Constraint Conflict Checking |
91
+ | dependency_rules.md | Verify | §Period Dependencies, §External Dependency Management |
92
+
93
+ ---
94
+
95
+ ## Case 3: Subsidiary Acquisition/Disposal
96
+
97
+ ### Situation
98
+
99
+ Consolidation scope changes: new acquisition, share disposal, loss of control, gaining control.
100
+
101
+ ### Case Study: Control Assessment Change
102
+
103
+ A company owned 45% of an associate (equity method). Board composition change gave the investor majority board seats, passing the power test. All three IFRS 10 tests (power + variable returns + link) now met → reclassification from associate to subsidiary → full consolidation required from date of control.
104
+
105
+ ### Impact Analysis
106
+
107
+ | Principle | Impact |
108
+ |---|---|
109
+ | Control determination | 3-element test applied (IFRS 10) |
110
+ | Consolidation scope change | Subsidiary added or removed |
111
+ | Intercompany elimination | New intercompany transactions to eliminate |
112
+ | NCI calculation | NCI share of subsidiary's net assets and income |
113
+ | Goodwill | PPA required for acquisition; goodwill = acquisition cost - fair value of net assets |
114
+ | Retrospective vs prospective | Generally prospective from acquisition/disposal date |
115
+
116
+ ### Verification Checklist
117
+
118
+ - [ ] Are control determination criteria applied (3 elements)? → logic_rules.md §Consolidation Logic
119
+ - [ ] Is consolidation scope updated? → structure_spec.md §Required Relationships
120
+ - [ ] Are intercompany transactions identified and eliminated? → logic_rules.md §Consolidation Logic
121
+ - [ ] Is NCI calculated correctly? → concepts.md §Consolidation Terms
122
+ - [ ] Is goodwill recognition documented per IFRS 3? → logic_rules.md §Consolidation Logic
123
+ - [ ] For disposal: is loss of control recognition appropriate? → concepts.md §Consolidation Terms
124
+
125
+ ### Affected Files
126
+
127
+ | File | Impact | Section |
128
+ |---|---|---|
129
+ | logic_rules.md | Verify | §Consolidation Logic |
130
+ | dependency_rules.md | Verify | §Referential Integrity |
131
+ | structure_spec.md | Verify | §Required Relationships |
132
+
133
+ ---
134
+
135
+ ## Case 4: Foreign Currency Transaction Increase
136
+
137
+ ### Situation
138
+
139
+ Increase in transactions with overseas counterparties, establishment of overseas subsidiaries with different functional currency.
140
+
141
+ ### Case Study: Overseas Subsidiary Establishment
142
+
143
+ Korean parent establishes US subsidiary with USD as functional currency. Consolidation requires:
144
+ - Subsidiary's assets/liabilities translated at closing rate
145
+ - Subsidiary's income/expenses translated at average rate (or transaction-date rate)
146
+ - Translation differences recognized in OCI (Foreign Currency Translation Reserve)
147
+ - On disposal, accumulated translation differences reclassified to P&L
148
+
149
+ ### Impact Analysis
150
+
151
+ | Principle | Impact |
152
+ |---|---|
153
+ | Functional currency determination | Primary economic environment of operations |
154
+ | Initial recognition rate | Transaction date rate |
155
+ | Period-end translation | Monetary items at closing rate; non-monetary at historical |
156
+ | Translation differences | P&L for monetary; OCI for consolidated foreign operations |
157
+ | Exchange rate disclosure | Basis for applicable rates disclosed |
158
+
159
+ ### Verification Checklist
160
+
161
+ - [ ] Are initial recognition and period-end rates applied separately? → logic_rules.md §Measurement Logic, §Period Attribution Logic
162
+ - [ ] Are translation differences classified correctly (P&L vs OCI)? → dependency_rules.md §Inter-Financial-Statement Linkage (OCI)
163
+ - [ ] Are exchange rate effects separately presented on CF? → structure_spec.md §Financial Statement Structure → CF
164
+ - [ ] Is functional currency determination documented? → concepts.md §Accounting Policy Choices
165
+ - [ ] For consolidated foreign operation, is translation reserve tracked? → logic_rules.md §Consolidation Logic
166
+
167
+ ### Affected Files
168
+
169
+ | File | Impact | Section |
170
+ |---|---|---|
171
+ | structure_spec.md | Verify | §Financial Statement Structure |
172
+ | logic_rules.md | Verify | §Measurement Logic, §Consolidation Logic |
173
+ | dependency_rules.md | Modify | §External Dependency Management |
174
+
175
+ ---
176
+
177
+ ## Case 5: Tax Law Amendment
178
+
179
+ ### Situation
180
+
181
+ Corporate tax rate change, tax adjustment item change, new tax credit introduction, transfer pricing rule change.
182
+
183
+ ### Case Study: Corporate Tax Rate Reduction
184
+
185
+ Korea reduces Corporate Tax rate from 25% to 22%. All Deferred Tax assets and liabilities must be remeasured at new rate. Impact:
186
+ - DTL reduction → Deferred Tax benefit in current period P&L
187
+ - DTA reduction → Deferred Tax expense in current period P&L
188
+ - Net impact depends on entity's DT balance composition
189
+ - Disclosure: change impact on effective tax rate
190
+
191
+ ### Impact Analysis
192
+
193
+ | Principle | Impact |
194
+ |---|---|
195
+ | Deferred Tax recalculation | All DT at new rate |
196
+ | Current period P&L | Net impact of remeasurement in current period |
197
+ | Effective tax rate | Shifts toward new statutory rate |
198
+ | Prior period | Unchanged (rate change applies prospectively) |
199
+ | Disclosure | IAS 12 requires disclosure of tax rate change impact |
200
+
201
+ ### Verification Checklist
202
+
203
+ - [ ] Are DT assets/liabilities recalculated at new rate? → logic_rules.md §Tax-Accounting Difference Logic
204
+ - [ ] Is remeasurement impact in current period P&L? → concepts.md §Tax Accounting Terms
205
+ - [ ] Are temporary vs permanent differences classifications reviewed? → concepts.md §Tax Accounting Terms
206
+ - [ ] Is tax law change disclosed? → domain_scope.md §Key Sub-Areas → Disclosure
207
+ - [ ] Is effective tax rate reconciliation updated? → competency_qs.md CQ-TX-05
208
+
209
+ ### Affected Files
210
+
211
+ | File | Impact | Section |
212
+ |---|---|---|
213
+ | logic_rules.md | Modify | §Tax-Accounting Difference Logic |
214
+ | dependency_rules.md | Modify | §External Dependency Management |
215
+ | concepts.md | Verify | §Tax Accounting Terms |
216
+
217
+ ---
218
+
219
+ ## Case 6: Audit Standards Change
220
+
221
+ ### Situation
222
+
223
+ ISA amendments, strengthened internal control requirements (SOX-like), new audit report format.
224
+
225
+ ### Case Study: Key Audit Matters Introduction (ISA 701, 2016)
226
+
227
+ Listed company audit reports must include Key Audit Matters (KAM) section. Auditor identifies matters of most significance in current period audit:
228
+ - Areas of higher assessed risk
229
+ - Areas involving significant management judgment
230
+ - Significant transactions in the period
231
+
232
+ ### Impact Analysis
233
+
234
+ | Principle | Impact |
235
+ |---|---|
236
+ | Audit procedures | KAM identification formalized |
237
+ | Audit report | New KAM section |
238
+ | Entity response | Management prepares for enhanced audit scrutiny |
239
+ | Internal controls | Enhanced documentation may be needed |
240
+ | Disclosure | Entity notes align with KAM areas |
241
+
242
+ ### Verification Checklist
243
+
244
+ - [ ] Does audit trail meet strengthened requirements? → domain_scope.md §Cross-Cutting Concerns → Audit Trail
245
+ - [ ] Is internal control documentation updated? → concepts.md §Audit and Internal Control Terms
246
+ - [ ] Are KAM identification procedures established? → concepts.md §Audit and Internal Control Terms → KAM
247
+ - [ ] Are management estimates more robustly documented? → logic_rules.md §Measurement Logic
248
+ - [ ] Are disclosures aligned with KAM topics? → domain_scope.md §Key Sub-Areas → Disclosure
249
+
250
+ ### Affected Files
251
+
252
+ | File | Impact | Section |
253
+ |---|---|---|
254
+ | structure_spec.md | Modify | §Verification Structure |
255
+ | concepts.md | Modify | §Audit and Internal Control Terms |
256
+ | competency_qs.md | Verify | CQ-AU section |
257
+
258
+ ---
259
+
260
+ ## Case 7: Digital Reporting Transition
261
+
262
+ ### Situation
263
+
264
+ XBRL tagging expansion, real-time reporting requirements, electronic disclosure format changes.
265
+
266
+ ### Case Study: DART (Korea) Expanded XBRL Tagging
267
+
268
+ Financial Supervisory Service expands XBRL tagging scope from main statements to notes (block tagging). Companies must:
269
+ - Map chart of accounts to DART taxonomy elements
270
+ - Tag main statements and note items
271
+ - Validate referential integrity between tagged items
272
+
273
+ ### Impact Analysis
274
+
275
+ | Principle | Impact |
276
+ |---|---|
277
+ | Taxonomy mapping | Chart of accounts mapped to DART elements |
278
+ | Note tagging | Additional tagging burden |
279
+ | Referential integrity | Tags in notes must match main statement tags |
280
+ | Validation | Filing system validates before acceptance |
281
+ | Reporting frequency | More frequent tagging if reporting cycles shortened |
282
+
283
+ ### Verification Checklist
284
+
285
+ - [ ] Does chart of accounts map to XBRL taxonomy? → structure_spec.md §Chart of Accounts
286
+ - [ ] Is referential integrity between financial statement items and XBRL tags maintained? → dependency_rules.md §Referential Integrity
287
+ - [ ] When reporting frequency shortens, is period attribution verification scaled? → logic_rules.md §Period Attribution Logic
288
+ - [ ] Are extension elements documented when standard taxonomy insufficient? → concepts.md §Accounting Policy Choices
289
+ - [ ] Is validation pipeline established? → structure_spec.md §Verification Structure
290
+
291
+ ### Affected Files
292
+
293
+ | File | Impact | Section |
294
+ |---|---|---|
295
+ | structure_spec.md | Modify | §Chart of Accounts |
296
+ | dependency_rules.md | Verify | §Referential Integrity |
297
+ | domain_scope.md | Verify | §Reference Standards/Frameworks |
298
+
299
+ ---
300
+
301
+ ## Case 8: ESG/Sustainability Reporting Integration
302
+
303
+ ### Situation
304
+
305
+ Adding ESG (Environmental, Social, Governance) reporting requirements alongside financial reporting.
306
+
307
+ ### Case Study: ISSB S1/S2 Adoption
308
+
309
+ International Sustainability Standards Board (ISSB) releases S1 (General sustainability) and S2 (Climate) requiring disclosures:
310
+ - Climate-related risks and opportunities
311
+ - Scope 1/2/3 greenhouse gas emissions
312
+ - Climate-related financial effects
313
+ - Transition plans
314
+
315
+ Integration with financial reporting: sustainability metrics may flow into impairment assessment, provisions, contingent liabilities.
316
+
317
+ ### Impact Analysis
318
+
319
+ | Principle | Impact |
320
+ |---|---|
321
+ | New reporting standards | ISSB alongside IFRS |
322
+ | Financial impact | Climate risks may trigger impairment, provisions |
323
+ | Disclosure integration | Sustainability and financial disclosures connected |
324
+ | Data requirements | Non-financial data (emissions, workforce) alongside financial |
325
+ | Audit scope | Assurance on sustainability may be required |
326
+
327
+ ### Verification Checklist
328
+
329
+ - [ ] Are ISSB standards applicable and adopted? → domain_scope.md §Reference Standards/Frameworks
330
+ - [ ] Do climate risks trigger impairment or provisions? → logic_rules.md §Recognition Logic (Asset/Liability)
331
+ - [ ] Are sustainability disclosures connected to financial disclosures? → domain_scope.md §Cross-Cutting Concerns
332
+ - [ ] Is audit scope extended to sustainability? → concepts.md §Audit and Internal Control Terms
333
+
334
+ ### Affected Files
335
+
336
+ | File | Impact | Section |
337
+ |---|---|---|
338
+ | domain_scope.md | Modify | §Key Sub-Areas (new sub-area) |
339
+ | concepts.md | Modify | new §Sustainability Terms |
340
+ | dependency_rules.md | Verify | §External Dependency Management |
341
+
342
+ ---
343
+
344
+ ## Case 9: Chart of Accounts Simplification
345
+
346
+ ### Situation (Shrinkage)
347
+
348
+ Reducing chart of accounts to improve reporting clarity and reduce maintenance burden.
349
+
350
+ ### Impact Analysis
351
+
352
+ | Principle | Impact |
353
+ |---|---|
354
+ | Account consolidation | Rarely-used accounts merged into parent accounts |
355
+ | Subsidiary ledger preservation | Detail may be retained in subsidiary ledgers |
356
+ | Historical comparability | Prior period re-classification may be needed |
357
+ | System migration | ERP updates required |
358
+ | Reporting impact | Simplified statements possible |
359
+
360
+ ### Verification Checklist
361
+
362
+ - [ ] Are merged accounts documented with migration mapping? → structure_spec.md §Chart of Accounts
363
+ - [ ] Is detail preserved in subsidiary ledgers? → concepts.md §Double-Entry Bookkeeping → Subsidiary Ledger
364
+ - [ ] Are prior period statements re-classified for comparability? → dependency_rules.md §Period Dependencies
365
+ - [ ] Are system changes tested? → structure_spec.md §Verification Structure
366
+
367
+ ---
368
+
369
+ ## Case 10: Interim Reporting Discontinuation
370
+
371
+ ### Situation (Shrinkage)
372
+
373
+ Private company that went private or de-listed discontinues interim reporting.
374
+
375
+ ### Impact Analysis
376
+
377
+ | Principle | Impact |
378
+ |---|---|
379
+ | Reporting frequency | Quarterly → Annual only |
380
+ | Internal management reporting | May continue interim for internal use |
381
+ | Audit scope | Annual audit remains; quarterly review discontinued |
382
+ | Disclosure relief | Fewer mandatory disclosures |
383
+ | Data retention | Historical interim data retained but not published |
384
+
385
+ ### Verification Checklist
386
+
387
+ - [ ] Are regulatory requirements updated for private company status? → domain_scope.md §Reference Standards/Frameworks
388
+ - [ ] Is internal reporting structure separated from external? → structure_spec.md §Verification Structure
389
+ - [ ] Is audit contract updated? → concepts.md §Audit and Internal Control Terms
390
+ - [ ] Are historical interim records retained? → domain_scope.md §Cross-Cutting Concerns → Audit Trail
391
+
392
+ ---
393
+
394
+ ## Scenario Interconnections
395
+
396
+ | Scenario | Triggers / Interacts With | Reason |
397
+ |---|---|---|
398
+ | Case 1 (New Revenue Source) | → Case 2 (Standard Amendment) | New revenue patterns may reveal standard interpretation questions |
399
+ | Case 2 (Standard Amendment) | → Case 5 (Tax Law) | Accounting change often triggers tax treatment review |
400
+ | Case 3 (Consolidation Change) | → Case 4 (Foreign Currency) | International acquisitions create FX exposure |
401
+ | Case 4 (Foreign Currency) | → Case 7 (Digital Reporting) | Multi-currency reporting requires XBRL dimensional tagging |
402
+ | Case 5 (Tax Law Change) | → Case 2 (Standard Amendment) | Tax change may require accounting policy review |
403
+ | Case 6 (Audit Standards) | → Case 8 (ESG) | Enhanced audit often includes sustainability assurance |
404
+ | Case 7 (Digital Reporting) | → Case 9 (Chart Simplification) | Taxonomy mapping reveals chart consolidation opportunities |
405
+ | Case 8 (ESG) | → Case 6 (Audit Standards) | ESG assurance expands audit scope |
406
+ | Case 9 (Chart Simplification) | → Case 1 (New Revenue) | Simplified chart must still accommodate new revenue types |
407
+
408
+ ---
409
+
410
+ ## Related Documents
411
+ - domain_scope.md — Classification axes, sub-area definitions affected by scenarios
412
+ - concepts.md — Term definitions for scenario impact analysis
413
+ - structure_spec.md — Structural basis for new elements
414
+ - dependency_rules.md — Inter-statement linkages, referential integrity, external dependencies
415
+ - logic_rules.md — Recognition, measurement, consolidation, tax logic
416
+ - competency_qs.md — Questions verifying scenario handling