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.
- package/.onto/authority/core-lens-registry.yaml +134 -0
- package/.onto/authority/core-lexicon.yaml +1562 -0
- package/.onto/authority/diagnostic-codes.yaml +94 -0
- package/.onto/domains/accounting/competency_qs.md +384 -0
- package/.onto/domains/accounting/concepts.md +186 -0
- package/.onto/domains/accounting/conciseness_rules.md +160 -0
- package/.onto/domains/accounting/dependency_rules.md +239 -0
- package/.onto/domains/accounting/domain_scope.md +213 -0
- package/.onto/domains/accounting/extension_cases.md +416 -0
- package/.onto/domains/accounting/logic_rules.md +226 -0
- package/.onto/domains/accounting/structure_spec.md +298 -0
- package/.onto/domains/accounting-kr/competency_qs.md +562 -0
- package/.onto/domains/accounting-kr/concepts.md +187 -0
- package/.onto/domains/accounting-kr/conciseness_rules.md +125 -0
- package/.onto/domains/accounting-kr/dependency_rules.md +93 -0
- package/.onto/domains/accounting-kr/domain_scope.md +140 -0
- package/.onto/domains/accounting-kr/extension_cases.md +343 -0
- package/.onto/domains/accounting-kr/logic_rules.md +160 -0
- package/.onto/domains/accounting-kr/structure_spec.md +85 -0
- package/.onto/domains/business/competency_qs.md +263 -0
- package/.onto/domains/business/concepts.md +200 -0
- package/.onto/domains/business/conciseness_rules.md +135 -0
- package/.onto/domains/business/dependency_rules.md +113 -0
- package/.onto/domains/business/domain_scope.md +240 -0
- package/.onto/domains/business/extension_cases.md +249 -0
- package/.onto/domains/business/logic_rules.md +134 -0
- package/.onto/domains/business/structure_spec.md +114 -0
- package/.onto/domains/finance/competency_qs.md +362 -0
- package/.onto/domains/finance/concepts.md +194 -0
- package/.onto/domains/finance/conciseness_rules.md +155 -0
- package/.onto/domains/finance/dependency_rules.md +171 -0
- package/.onto/domains/finance/domain_scope.md +215 -0
- package/.onto/domains/finance/extension_cases.md +350 -0
- package/.onto/domains/finance/logic_rules.md +191 -0
- package/.onto/domains/finance/structure_spec.md +182 -0
- package/.onto/domains/llm-native-development/competency_qs.md +430 -0
- package/.onto/domains/llm-native-development/concepts.md +242 -0
- package/.onto/domains/llm-native-development/conciseness_rules.md +163 -0
- package/.onto/domains/llm-native-development/dependency_rules.md +216 -0
- package/.onto/domains/llm-native-development/domain_scope.md +197 -0
- package/.onto/domains/llm-native-development/extension_cases.md +474 -0
- package/.onto/domains/llm-native-development/logic_rules.md +123 -0
- package/.onto/domains/llm-native-development/prompt_interface.md +49 -0
- package/.onto/domains/llm-native-development/structure_spec.md +245 -0
- package/.onto/domains/market-intelligence/competency_qs.md +274 -0
- package/.onto/domains/market-intelligence/concepts.md +233 -0
- package/.onto/domains/market-intelligence/conciseness_rules.md +165 -0
- package/.onto/domains/market-intelligence/dependency_rules.md +197 -0
- package/.onto/domains/market-intelligence/domain_scope.md +231 -0
- package/.onto/domains/market-intelligence/extension_cases.md +425 -0
- package/.onto/domains/market-intelligence/logic_rules.md +247 -0
- package/.onto/domains/market-intelligence/structure_spec.md +209 -0
- package/.onto/domains/ontology/competency_qs.md +394 -0
- package/.onto/domains/ontology/concepts.md +172 -0
- package/.onto/domains/ontology/conciseness_rules.md +134 -0
- package/.onto/domains/ontology/dependency_rules.md +125 -0
- package/.onto/domains/ontology/domain_scope.md +114 -0
- package/.onto/domains/ontology/extension_cases.md +501 -0
- package/.onto/domains/ontology/logic_rules.md +114 -0
- package/.onto/domains/ontology/problem_framing_profile.md +67 -0
- package/.onto/domains/ontology/structure_spec.md +115 -0
- package/.onto/domains/palantir-foundry/RESEARCH_NOTES.md +911 -0
- package/.onto/domains/palantir-foundry/competency_qs.md +191 -0
- package/.onto/domains/palantir-foundry/competitive_comparison.md +329 -0
- package/.onto/domains/palantir-foundry/concepts.md +197 -0
- package/.onto/domains/palantir-foundry/conciseness_rules.md +245 -0
- package/.onto/domains/palantir-foundry/dependency_rules.md +135 -0
- package/.onto/domains/palantir-foundry/domain_scope.md +395 -0
- package/.onto/domains/palantir-foundry/extension_cases.md +210 -0
- package/.onto/domains/palantir-foundry/logic_rules.md +172 -0
- package/.onto/domains/palantir-foundry/structure_spec.md +291 -0
- package/.onto/domains/software-engineering/competency_qs.md +538 -0
- package/.onto/domains/software-engineering/concepts.md +238 -0
- package/.onto/domains/software-engineering/conciseness_rules.md +167 -0
- package/.onto/domains/software-engineering/dependency_rules.md +216 -0
- package/.onto/domains/software-engineering/domain_scope.md +183 -0
- package/.onto/domains/software-engineering/extension_cases.md +551 -0
- package/.onto/domains/software-engineering/logic_rules.md +240 -0
- package/.onto/domains/software-engineering/problem_framing_profile.md +68 -0
- package/.onto/domains/software-engineering/structure_spec.md +185 -0
- package/.onto/domains/ui-design/competency_qs.md +567 -0
- package/.onto/domains/ui-design/concepts.md +194 -0
- package/.onto/domains/ui-design/conciseness_rules.md +190 -0
- package/.onto/domains/ui-design/dependency_rules.md +323 -0
- package/.onto/domains/ui-design/domain_scope.md +340 -0
- package/.onto/domains/ui-design/extension_cases.md +563 -0
- package/.onto/domains/ui-design/logic_rules.md +349 -0
- package/.onto/domains/ui-design/structure_spec.md +252 -0
- package/.onto/domains/visual-design/competency_qs.md +472 -0
- package/.onto/domains/visual-design/concepts.md +147 -0
- package/.onto/domains/visual-design/conciseness_rules.md +186 -0
- package/.onto/domains/visual-design/dependency_rules.md +282 -0
- package/.onto/domains/visual-design/domain_scope.md +290 -0
- package/.onto/domains/visual-design/extension_cases.md +480 -0
- package/.onto/domains/visual-design/logic_rules.md +232 -0
- package/.onto/domains/visual-design/structure_spec.md +213 -0
- package/.onto/principles/llm-native-development-guideline.md +401 -0
- package/.onto/principles/llm-runtime-interface-principles.md +665 -0
- package/.onto/principles/non-specialist-communication-guideline.md +74 -0
- package/.onto/principles/ontology-as-code-guideline.md +243 -0
- package/.onto/principles/ontology-as-code-naming-charter.md +130 -0
- package/.onto/principles/product-locality-principle.md +129 -0
- package/.onto/principles/productization-charter.md +569 -0
- package/.onto/processes/evolve/material-kind-adapter-contract.md +113 -0
- package/.onto/processes/reconstruct/reconstruct-boundary-contract.md +366 -0
- package/.onto/processes/reconstruct/source-profile-contract.md +107 -0
- package/.onto/processes/reconstruct/source-profiles/code.md +72 -0
- package/.onto/processes/reconstruct/source-profiles/database.md +74 -0
- package/.onto/processes/reconstruct/source-profiles/document.md +71 -0
- package/.onto/processes/reconstruct/source-profiles/spreadsheet.md +79 -0
- package/.onto/processes/review/binding-contract.md +270 -0
- package/.onto/processes/review/execution-preparation-artifacts.md +281 -0
- package/.onto/processes/review/interpretation-contract.md +245 -0
- package/.onto/processes/review/issue-stance-deliberation-contract.md +761 -0
- package/.onto/processes/review/lens-prompt-contract.md +402 -0
- package/.onto/processes/review/lens-registry.md +127 -0
- package/.onto/processes/review/pre-dispatch-contracts.md +428 -0
- package/.onto/processes/review/productized-live-path.md +398 -0
- package/.onto/processes/review/prompt-execution-runner-contract.md +187 -0
- package/.onto/processes/review/record-contract.md +427 -0
- package/.onto/processes/review/record-field-mapping.md +337 -0
- package/.onto/processes/review/review-context-manifest-contract.md +356 -0
- package/.onto/processes/review/review-execution-ux-contract.md +809 -0
- package/.onto/processes/review/review-target-profile-contract.md +259 -0
- package/.onto/processes/review/shared-phenomenon-contract.md +129 -0
- package/.onto/processes/review/synthesize-prompt-contract.md +343 -0
- package/.onto/processes/shared/target-material-kind-contract.md +198 -0
- package/.onto/roles/axiology.md +81 -0
- package/.onto/roles/conciseness.md +36 -0
- package/.onto/roles/coverage.md +34 -0
- package/.onto/roles/dependency.md +37 -0
- package/.onto/roles/evolution.md +35 -0
- package/.onto/roles/logic.md +104 -0
- package/.onto/roles/pragmatics.md +32 -0
- package/.onto/roles/semantics.md +36 -0
- package/.onto/roles/structure.md +33 -0
- package/.onto/roles/synthesize.md +92 -0
- package/AGENTS.md +240 -0
- package/CLAUDE.md +39 -0
- package/README.md +287 -0
- package/bin/onto +92 -0
- package/dist/cli.js +101 -0
- package/dist/core-api/reconstruct-api.js +222 -0
- package/dist/core-api/review-api.js +1271 -0
- package/dist/core-runtime/cli/assemble-review-record.js +431 -0
- package/dist/core-runtime/cli/bootstrap-review-binding.js +186 -0
- package/dist/core-runtime/cli/codex-nested-dispatch.js +226 -0
- package/dist/core-runtime/cli/codex-nested-dispatch.test.js +390 -0
- package/dist/core-runtime/cli/codex-nested-teamlead-executor.js +464 -0
- package/dist/core-runtime/cli/codex-nested-teamlead-executor.test.js +335 -0
- package/dist/core-runtime/cli/codex-review-unit-executor.js +228 -0
- package/dist/core-runtime/cli/complete-review-session.js +64 -0
- package/dist/core-runtime/cli/complexity-assessment.js +153 -0
- package/dist/core-runtime/cli/coordinator-helpers.js +583 -0
- package/dist/core-runtime/cli/coordinator-state-machine-deliberation.test.js +167 -0
- package/dist/core-runtime/cli/coordinator-state-machine.js +794 -0
- package/dist/core-runtime/cli/e2e-codex-multi-agent-fixes.test.js +615 -0
- package/dist/core-runtime/cli/e2e-start-review-session.test.js +312 -0
- package/dist/core-runtime/cli/health.js +44 -0
- package/dist/core-runtime/cli/inline-http-review-unit-executor.js +656 -0
- package/dist/core-runtime/cli/inline-http-review-unit-executor.test.js +567 -0
- package/dist/core-runtime/cli/materialize-review-execution-preparation.js +104 -0
- package/dist/core-runtime/cli/materialize-review-prompt-packets.js +952 -0
- package/dist/core-runtime/cli/migrate-session-roots.js +118 -0
- package/dist/core-runtime/cli/mock-review-unit-executor.js +285 -0
- package/dist/core-runtime/cli/onto-tools.js +369 -0
- package/dist/core-runtime/cli/prepare-review-session.js +272 -0
- package/dist/core-runtime/cli/render-review-final-output.js +350 -0
- package/dist/core-runtime/cli/repo-layout-migration-replace.smoke.test.js +106 -0
- package/dist/core-runtime/cli/review-invoke-auto-resolution.test.js +268 -0
- package/dist/core-runtime/cli/review-invoke-coordinator-topology.test.js +136 -0
- package/dist/core-runtime/cli/review-invoke-resolver-caching.test.js +201 -0
- package/dist/core-runtime/cli/review-invoke-topology-dispatch.test.js +192 -0
- package/dist/core-runtime/cli/review-invoke.js +2030 -0
- package/dist/core-runtime/cli/run-review-prompt-execution.js +2152 -0
- package/dist/core-runtime/cli/session-root-guard.js +168 -0
- package/dist/core-runtime/cli/spawn-watcher.js +173 -0
- package/dist/core-runtime/cli/spawn-watcher.test.js +457 -0
- package/dist/core-runtime/cli/start-review-session.js +68 -0
- package/dist/core-runtime/cli/strip-wrapping-code-fence.js +56 -0
- package/dist/core-runtime/cli/strip-wrapping-code-fence.test.js +79 -0
- package/dist/core-runtime/cli/teamcreate-lens-deliberation-executor.js +412 -0
- package/dist/core-runtime/cli/teamcreate-lens-deliberation-executor.test.js +351 -0
- package/dist/core-runtime/cli/topology-executor-mapping.js +139 -0
- package/dist/core-runtime/cli/topology-executor-mapping.test.js +173 -0
- package/dist/core-runtime/cli/write-review-interpretation.js +81 -0
- package/dist/core-runtime/config/onto-config-cli.js +278 -0
- package/dist/core-runtime/config/onto-config-key-path.js +288 -0
- package/dist/core-runtime/config/onto-config-key-path.test.js +195 -0
- package/dist/core-runtime/config/onto-config-preview.js +108 -0
- package/dist/core-runtime/config/onto-config-preview.test.js +132 -0
- package/dist/core-runtime/discovery/config-chain.js +118 -0
- package/dist/core-runtime/discovery/config-chain.test.js +103 -0
- package/dist/core-runtime/discovery/config-profile.js +199 -0
- package/dist/core-runtime/discovery/config-profile.test.js +233 -0
- package/dist/core-runtime/discovery/host-detection.js +33 -0
- package/dist/core-runtime/discovery/host-detection.test.js +186 -0
- package/dist/core-runtime/discovery/installation-paths.js +21 -0
- package/dist/core-runtime/discovery/installation-paths.test.js +65 -0
- package/dist/core-runtime/discovery/lens-registry.js +60 -0
- package/dist/core-runtime/discovery/lens-registry.test.js +81 -0
- package/dist/core-runtime/discovery/onto-home.js +71 -0
- package/dist/core-runtime/discovery/path-normalization.js +28 -0
- package/dist/core-runtime/discovery/path-normalization.test.js +22 -0
- package/dist/core-runtime/discovery/plugin-path.js +72 -0
- package/dist/core-runtime/discovery/plugin-path.test.js +95 -0
- package/dist/core-runtime/discovery/project-root.js +47 -0
- package/dist/core-runtime/discovery/settings-chain.js +353 -0
- package/dist/core-runtime/discovery/walk-up.js +17 -0
- package/dist/core-runtime/evolve/adapters/code-product/compile/compile-defense.js +344 -0
- package/dist/core-runtime/evolve/adapters/code-product/compile/compile-defense.test.js +915 -0
- package/dist/core-runtime/evolve/adapters/code-product/compile/compile.js +564 -0
- package/dist/core-runtime/evolve/adapters/code-product/compile/compile.test.js +708 -0
- package/dist/core-runtime/evolve/adapters/code-product/parsers/brief-parser.js +165 -0
- package/dist/core-runtime/evolve/adapters/code-product/parsers/brief-parser.test.js +227 -0
- package/dist/core-runtime/evolve/adapters/code-product/validators/validate.js +59 -0
- package/dist/core-runtime/evolve/adapters/code-product/validators/validate.test.js +205 -0
- package/dist/core-runtime/evolve/adapters/methodology/adapter.js +16 -0
- package/dist/core-runtime/evolve/adapters/methodology/adapter.test.js +9 -0
- package/dist/core-runtime/evolve/adapters/methodology/perspectives/authority-consistency.js +298 -0
- package/dist/core-runtime/evolve/adapters/methodology/perspectives/authority-consistency.test.js +70 -0
- package/dist/core-runtime/evolve/adapters/methodology/scope-types/process.js +46 -0
- package/dist/core-runtime/evolve/adapters/methodology/scope-types/process.test.js +73 -0
- package/dist/core-runtime/evolve/adapters/registry.js +47 -0
- package/dist/core-runtime/evolve/adapters/registry.test.js +67 -0
- package/dist/core-runtime/evolve/cli.js +256 -0
- package/dist/core-runtime/evolve/commands/align.js +194 -0
- package/dist/core-runtime/evolve/commands/align.test.js +82 -0
- package/dist/core-runtime/evolve/commands/apply.js +161 -0
- package/dist/core-runtime/evolve/commands/apply.test.js +138 -0
- package/dist/core-runtime/evolve/commands/close.js +39 -0
- package/dist/core-runtime/evolve/commands/close.test.js +99 -0
- package/dist/core-runtime/evolve/commands/defer.js +40 -0
- package/dist/core-runtime/evolve/commands/defer.test.js +134 -0
- package/dist/core-runtime/evolve/commands/draft.js +323 -0
- package/dist/core-runtime/evolve/commands/draft.test.js +178 -0
- package/dist/core-runtime/evolve/commands/e2e-evolve-full-cycle.test.js +208 -0
- package/dist/core-runtime/evolve/commands/error-messages.js +125 -0
- package/dist/core-runtime/evolve/commands/error-messages.test.js +167 -0
- package/dist/core-runtime/evolve/commands/propose-align.js +222 -0
- package/dist/core-runtime/evolve/commands/propose-align.test.js +136 -0
- package/dist/core-runtime/evolve/commands/reconstruct.js +330 -0
- package/dist/core-runtime/evolve/commands/reconstruct.test.js +278 -0
- package/dist/core-runtime/evolve/commands/shared.js +22 -0
- package/dist/core-runtime/evolve/commands/stale-check.js +103 -0
- package/dist/core-runtime/evolve/commands/stale-check.test.js +84 -0
- package/dist/core-runtime/evolve/commands/start.js +887 -0
- package/dist/core-runtime/evolve/commands/start.test.js +396 -0
- package/dist/core-runtime/evolve/config/project-config.js +99 -0
- package/dist/core-runtime/evolve/config/project-config.test.js +170 -0
- package/dist/core-runtime/evolve/renderers/align-packet.js +280 -0
- package/dist/core-runtime/evolve/renderers/align-packet.test.js +332 -0
- package/dist/core-runtime/evolve/renderers/draft-packet.js +303 -0
- package/dist/core-runtime/evolve/renderers/draft-packet.test.js +377 -0
- package/dist/core-runtime/evolve/renderers/format.js +5 -0
- package/dist/core-runtime/evolve/renderers/scope-md.js +237 -0
- package/dist/core-runtime/evolve/renderers/scope-md.test.js +306 -0
- package/dist/core-runtime/govern/cli.js +369 -0
- package/dist/core-runtime/govern/cli.test.js +314 -0
- package/dist/core-runtime/govern/drift-engine.js +103 -0
- package/dist/core-runtime/govern/drift-engine.test.js +319 -0
- package/dist/core-runtime/govern/promote-principle.js +206 -0
- package/dist/core-runtime/govern/promote-principle.test.js +368 -0
- package/dist/core-runtime/govern/queue.js +81 -0
- package/dist/core-runtime/govern/types.js +16 -0
- package/dist/core-runtime/install/cli.js +530 -0
- package/dist/core-runtime/install/detect.js +128 -0
- package/dist/core-runtime/install/detect.test.js +155 -0
- package/dist/core-runtime/install/gitignore-update.js +74 -0
- package/dist/core-runtime/install/gitignore-update.test.js +64 -0
- package/dist/core-runtime/install/install-integration.test.js +373 -0
- package/dist/core-runtime/install/prompts.js +389 -0
- package/dist/core-runtime/install/prompts.test.js +293 -0
- package/dist/core-runtime/install/types.js +26 -0
- package/dist/core-runtime/install/validation.js +295 -0
- package/dist/core-runtime/install/validation.test.js +313 -0
- package/dist/core-runtime/install/writer.js +254 -0
- package/dist/core-runtime/install/writer.test.js +218 -0
- package/dist/core-runtime/learning/extractor.js +461 -0
- package/dist/core-runtime/learning/feedback.js +179 -0
- package/dist/core-runtime/learning/health-report.js +165 -0
- package/dist/core-runtime/learning/health-report.test.js +169 -0
- package/dist/core-runtime/learning/loader.js +388 -0
- package/dist/core-runtime/learning/loader.test.js +102 -0
- package/dist/core-runtime/learning/promote/apply-state.js +240 -0
- package/dist/core-runtime/learning/promote/audit-obligation.js +195 -0
- package/dist/core-runtime/learning/promote/collector.js +432 -0
- package/dist/core-runtime/learning/promote/degraded-state.js +125 -0
- package/dist/core-runtime/learning/promote/domain-doc-proposer.js +166 -0
- package/dist/core-runtime/learning/promote/e2e-promote.test.js +6385 -0
- package/dist/core-runtime/learning/promote/health-snapshot.js +150 -0
- package/dist/core-runtime/learning/promote/insight-reclassifier.js +544 -0
- package/dist/core-runtime/learning/promote/judgment-auditor.js +517 -0
- package/dist/core-runtime/learning/promote/panel-reviewer.js +1158 -0
- package/dist/core-runtime/learning/promote/promote-executor.js +1675 -0
- package/dist/core-runtime/learning/promote/promoter.js +307 -0
- package/dist/core-runtime/learning/promote/retirement.js +122 -0
- package/dist/core-runtime/learning/promote/types.js +23 -0
- package/dist/core-runtime/learning/prompt-sections.js +51 -0
- package/dist/core-runtime/learning/shared/artifact-registry-init.js +45 -0
- package/dist/core-runtime/learning/shared/artifact-registry.js +254 -0
- package/dist/core-runtime/learning/shared/audit-obligation-kernel.js +73 -0
- package/dist/core-runtime/learning/shared/audit-state.js +99 -0
- package/dist/core-runtime/learning/shared/duplicate-check.js +28 -0
- package/dist/core-runtime/learning/shared/llm-caller.js +831 -0
- package/dist/core-runtime/learning/shared/llm-caller.test.js +601 -0
- package/dist/core-runtime/learning/shared/llm-tool-loop.js +393 -0
- package/dist/core-runtime/learning/shared/mode.js +25 -0
- package/dist/core-runtime/learning/shared/paths.js +84 -0
- package/dist/core-runtime/learning/shared/paths.test.js +79 -0
- package/dist/core-runtime/learning/shared/patterns.js +37 -0
- package/dist/core-runtime/learning/shared/recoverability.js +355 -0
- package/dist/core-runtime/learning/shared/recovery-context.js +374 -0
- package/dist/core-runtime/learning/shared/scope.js +1 -0
- package/dist/core-runtime/learning/shared/semantic-classifier.js +94 -0
- package/dist/core-runtime/learning/shared/specs/apply-execution-state-spec.js +42 -0
- package/dist/core-runtime/learning/shared/specs/audit-state-spec.js +37 -0
- package/dist/core-runtime/learning/shared/specs/backup-metadata-spec.js +39 -0
- package/dist/core-runtime/learning/shared/specs/emergency-log-spec.js +41 -0
- package/dist/core-runtime/learning/shared/specs/layout-version-spec.js +38 -0
- package/dist/core-runtime/learning/shared/specs/promote-decisions-spec.js +43 -0
- package/dist/core-runtime/learning/shared/specs/promote-report-spec.js +113 -0
- package/dist/core-runtime/learning/shared/specs/prune-log-spec.js +36 -0
- package/dist/core-runtime/learning/shared/specs/recovery-resolution-spec.js +48 -0
- package/dist/core-runtime/learning/shared/specs/restore-manifest-spec.js +43 -0
- package/dist/core-runtime/learning/shared/specs/spec-helpers.js +64 -0
- package/dist/core-runtime/learning/usage-tracker.js +190 -0
- package/dist/core-runtime/learning/usage-tracker.test.js +176 -0
- package/dist/core-runtime/llm/llm-caller.js +649 -0
- package/dist/core-runtime/llm/llm-tool-loop.js +401 -0
- package/dist/core-runtime/llm/model-switcher.js +62 -0
- package/dist/core-runtime/logger.js +22 -0
- package/dist/core-runtime/onboard/detect-review-axes.js +122 -0
- package/dist/core-runtime/onboard/detect-review-axes.test.js +127 -0
- package/dist/core-runtime/onboard/write-review-block.js +188 -0
- package/dist/core-runtime/onboard/write-review-block.test.js +240 -0
- package/dist/core-runtime/readers/brownfield-builder.js +150 -0
- package/dist/core-runtime/readers/brownfield-builder.test.js +136 -0
- package/dist/core-runtime/readers/code-chunk-collector.js +53 -0
- package/dist/core-runtime/readers/code-chunk-collector.test.js +136 -0
- package/dist/core-runtime/readers/file-utils.js +240 -0
- package/dist/core-runtime/readers/file-utils.test.js +146 -0
- package/dist/core-runtime/readers/lexicon-citation-check.js +93 -0
- package/dist/core-runtime/readers/lexicon-citation-check.test.js +77 -0
- package/dist/core-runtime/readers/mcp-figma.js +30 -0
- package/dist/core-runtime/readers/mcp-figma.test.js +82 -0
- package/dist/core-runtime/readers/mcp-generic.js +31 -0
- package/dist/core-runtime/readers/mcp-generic.test.js +76 -0
- package/dist/core-runtime/readers/ontology-index.js +148 -0
- package/dist/core-runtime/readers/ontology-index.test.js +245 -0
- package/dist/core-runtime/readers/ontology-query.js +168 -0
- package/dist/core-runtime/readers/ontology-query.test.js +311 -0
- package/dist/core-runtime/readers/ontology-resolve.js +48 -0
- package/dist/core-runtime/readers/ontology-resolve.test.js +48 -0
- package/dist/core-runtime/readers/patterns/index.js +7 -0
- package/dist/core-runtime/readers/review-log.js +213 -0
- package/dist/core-runtime/readers/review-log.test.js +313 -0
- package/dist/core-runtime/readers/scan-local.js +102 -0
- package/dist/core-runtime/readers/scan-local.test.js +102 -0
- package/dist/core-runtime/readers/scan-tarball.js +121 -0
- package/dist/core-runtime/readers/scan-tarball.test.js +283 -0
- package/dist/core-runtime/readers/scan-vault.js +34 -0
- package/dist/core-runtime/readers/scan-vault.test.js +81 -0
- package/dist/core-runtime/readers/types.js +42 -0
- package/dist/core-runtime/readers/types.test.js +94 -0
- package/dist/core-runtime/readers/viewpoint-collectors.js +229 -0
- package/dist/core-runtime/reconstruct/artifact-types.js +1 -0
- package/dist/core-runtime/reconstruct/directive-validation.js +123 -0
- package/dist/core-runtime/reconstruct/materialize-preparation.js +251 -0
- package/dist/core-runtime/reconstruct/record.js +198 -0
- package/dist/core-runtime/reconstruct/run.js +578 -0
- package/dist/core-runtime/reconstruct/seed-candidate-validation.js +356 -0
- package/dist/core-runtime/reconstruct/source-observations.js +62 -0
- package/dist/core-runtime/reconstruct/source-profiles.js +73 -0
- package/dist/core-runtime/release-channel/release-channel.js +90 -0
- package/dist/core-runtime/review/artifact-types.js +13 -0
- package/dist/core-runtime/review/citation-audit.js +204 -0
- package/dist/core-runtime/review/citation-audit.test.js +165 -0
- package/dist/core-runtime/review/controlled-lens-deliberation.js +125 -0
- package/dist/core-runtime/review/execution-plan-resolver.js +247 -0
- package/dist/core-runtime/review/execution-plan-resolver.test.js +243 -0
- package/dist/core-runtime/review/execution-topology-resolver-axis-first.test.js +246 -0
- package/dist/core-runtime/review/execution-topology-resolver.js +401 -0
- package/dist/core-runtime/review/execution-topology-resolver.test.js +315 -0
- package/dist/core-runtime/review/failure-records.js +57 -0
- package/dist/core-runtime/review/inline-context-embedder.js +141 -0
- package/dist/core-runtime/review/inline-context-embedder.test.js +154 -0
- package/dist/core-runtime/review/issue-artifact-runtime.js +859 -0
- package/dist/core-runtime/review/legacy-mode-policy.js +88 -0
- package/dist/core-runtime/review/lens-completion-policy.js +17 -0
- package/dist/core-runtime/review/materializers-effort-persist.test.js +79 -0
- package/dist/core-runtime/review/materializers.js +963 -0
- package/dist/core-runtime/review/ontology-path-classifier.js +179 -0
- package/dist/core-runtime/review/ontology-path-classifier.test.js +216 -0
- package/dist/core-runtime/review/packet-boundary-policy.js +215 -0
- package/dist/core-runtime/review/packet-boundary-policy.test.js +107 -0
- package/dist/core-runtime/review/participating-lens-paths.js +61 -0
- package/dist/core-runtime/review/participating-lens-paths.test.js +73 -0
- package/dist/core-runtime/review/review-artifact-utils.js +287 -0
- package/dist/core-runtime/review/review-config-legacy-translate.js +244 -0
- package/dist/core-runtime/review/review-config-legacy-translate.test.js +161 -0
- package/dist/core-runtime/review/review-config-validator.js +289 -0
- package/dist/core-runtime/review/review-config-validator.test.js +236 -0
- package/dist/core-runtime/review/review-execution-profile.js +193 -0
- package/dist/core-runtime/review/review-execution-route.js +52 -0
- package/dist/core-runtime/review/review-progress-contract.js +123 -0
- package/dist/core-runtime/review/review-record-validation.js +251 -0
- package/dist/core-runtime/review/review-result-classification.js +379 -0
- package/dist/core-runtime/review/review-state-machine.js +39 -0
- package/dist/core-runtime/review/route-visibility.js +125 -0
- package/dist/core-runtime/review/shape-pipeline-audit.test.js +311 -0
- package/dist/core-runtime/review/shape-to-topology-id.js +117 -0
- package/dist/core-runtime/review/shape-to-topology-id.test.js +132 -0
- package/dist/core-runtime/review/topology-shape-derivation.js +155 -0
- package/dist/core-runtime/review/topology-shape-derivation.test.js +195 -0
- package/dist/core-runtime/scope-runtime/constants.js +12 -0
- package/dist/core-runtime/scope-runtime/constraint-pool.js +166 -0
- package/dist/core-runtime/scope-runtime/constraint-pool.test.js +674 -0
- package/dist/core-runtime/scope-runtime/domain-validation-log.js +135 -0
- package/dist/core-runtime/scope-runtime/domain-validation-log.test.js +156 -0
- package/dist/core-runtime/scope-runtime/eval-persistence.js +65 -0
- package/dist/core-runtime/scope-runtime/eval-persistence.test.js +84 -0
- package/dist/core-runtime/scope-runtime/event-pipeline.js +64 -0
- package/dist/core-runtime/scope-runtime/event-pipeline.test.js +450 -0
- package/dist/core-runtime/scope-runtime/event-store.js +39 -0
- package/dist/core-runtime/scope-runtime/event-store.test.js +95 -0
- package/dist/core-runtime/scope-runtime/gate-guard.js +348 -0
- package/dist/core-runtime/scope-runtime/gate-guard.test.js +1047 -0
- package/dist/core-runtime/scope-runtime/hash.js +4 -0
- package/dist/core-runtime/scope-runtime/hash.test.js +33 -0
- package/dist/core-runtime/scope-runtime/id.js +4 -0
- package/dist/core-runtime/scope-runtime/id.test.js +17 -0
- package/dist/core-runtime/scope-runtime/reducer.js +297 -0
- package/dist/core-runtime/scope-runtime/reducer.test.js +759 -0
- package/dist/core-runtime/scope-runtime/scope-manager.js +161 -0
- package/dist/core-runtime/scope-runtime/state-machine.js +309 -0
- package/dist/core-runtime/scope-runtime/state-machine.test.js +704 -0
- package/dist/core-runtime/scope-runtime/types.js +116 -0
- package/dist/core-runtime/scope-runtime/types.test.js +69 -0
- package/dist/core-runtime/target-material-kind.js +256 -0
- package/dist/core-runtime/translate/render-for-user.js +169 -0
- package/dist/core-runtime/translate/render-for-user.test.js +122 -0
- package/dist/mcp/server.js +1011 -0
- package/dist/mcp/tool-schemas.js +93 -0
- package/dist/providers/capability-contract.js +1 -0
- package/package.json +68 -0
- package/settings.example.json +33 -0
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: 2
|
|
3
|
+
last_updated: "2026-04-16"
|
|
4
|
+
source: manual
|
|
5
|
+
status: established
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Accounting Domain — Logic Rules
|
|
9
|
+
|
|
10
|
+
Classification axis: **Accounting rule type** — rules classified by the accounting concern they govern.
|
|
11
|
+
|
|
12
|
+
## Double-Entry Balance Logic
|
|
13
|
+
|
|
14
|
+
Fundamental invariants of double-entry bookkeeping. Violation indicates data error.
|
|
15
|
+
|
|
16
|
+
| ID | Rule | Severity | Verification Timing |
|
|
17
|
+
|---|---|---|---|
|
|
18
|
+
| DE-01 | Total Debits = Total Credits in every Journal Entry | Error | At journal entry |
|
|
19
|
+
| DE-02 | Sum of all Debit balances = Sum of all Credit balances in Trial Balance | Error | At trial balance compilation |
|
|
20
|
+
| DE-03 | Accounting Equation (Assets = Liabilities + Equity) holds after every transaction | Error | At statement preparation |
|
|
21
|
+
| DE-04 | Account balance direction matches element type (Assets/Expenses: debit normal; Liabilities/Equity/Revenue: credit normal) | Warning | At journal entry |
|
|
22
|
+
| DE-05 | Adjusting entries maintain Debit/Credit balance | Error | At adjusting entry |
|
|
23
|
+
|
|
24
|
+
### Rule Rationale
|
|
25
|
+
|
|
26
|
+
- **DE-01**: Transaction-level balance is the atomic invariant. Violation at this level produces cascading failures at ledger, trial balance, and statements
|
|
27
|
+
- **DE-02**: Trial balance imbalance indicates a journal posting error or journal entry violation. Tracing back finds the source
|
|
28
|
+
- **DE-03**: The accounting equation is preserved by construction if DE-01 holds. Direct verification catches posting errors that DE-01 missed (wrong account selected but correct amounts)
|
|
29
|
+
- **DE-04 Warning**: Unusual balance directions (credit cash, debit payables) are possible legitimately (e.g., bank overdraft, prepaid by vendor), but rare. Flag for review, not block
|
|
30
|
+
|
|
31
|
+
### Trial Balance ≠ Correctness
|
|
32
|
+
|
|
33
|
+
- Trial Balance balance does not guarantee classification accuracy. If both Debit and Credit use wrong accounts, totals still match
|
|
34
|
+
- Example: Sales of 1M recorded as Dr. Cash / Cr. "Miscellaneous Revenue" instead of "Sales Revenue" — totals balance, but revenue recognition is misclassified
|
|
35
|
+
- Complementary checks required: account classification audit, revenue/expense matching, period attribution
|
|
36
|
+
|
|
37
|
+
## Recognition Logic
|
|
38
|
+
|
|
39
|
+
Rules for when to recognize elements in financial statements.
|
|
40
|
+
|
|
41
|
+
### Revenue Recognition (IFRS 15)
|
|
42
|
+
|
|
43
|
+
| ID | Rule | Description | Severity |
|
|
44
|
+
|---|---|---|---|
|
|
45
|
+
| RR-01 | Revenue recognized at point of control transfer | IFRS 15 core principle. "Delivery complete" ≠ "control transferred" necessarily | Warning |
|
|
46
|
+
| RR-02 | 5-step model applied: contract → performance obligations → transaction price → allocation → recognition | Framework application | Warning |
|
|
47
|
+
| RR-03 | Over-time recognition requires one of 3 criteria (customer consumes as produced, customer controls WIP, no alternative use + enforceable payment) | Determines recognition pattern | Warning |
|
|
48
|
+
| RR-04 | Variable consideration estimated using expected value or most likely amount | Rebates, penalties, performance bonuses | Warning |
|
|
49
|
+
| RR-05 | Significant financing component separated when payment timing creates material benefit | Payment deferred > 1 year typically | Warning |
|
|
50
|
+
|
|
51
|
+
### Expense Recognition (Matching Principle)
|
|
52
|
+
|
|
53
|
+
| ID | Rule | Description | Severity |
|
|
54
|
+
|---|---|---|---|
|
|
55
|
+
| ER-01 | Direct expenses recognized in same period as related revenue | Matching principle — COGS with sales | Error |
|
|
56
|
+
| ER-02 | Expenses that cannot be directly matched recognized in period incurred | Period costs — rent, salaries | Warning |
|
|
57
|
+
| ER-03 | Expected future expenses for current period obligations recognized as provisions | Warranty, restructuring | Warning |
|
|
58
|
+
|
|
59
|
+
### Asset Recognition
|
|
60
|
+
|
|
61
|
+
| ID | Rule | Description | Severity |
|
|
62
|
+
|---|---|---|---|
|
|
63
|
+
| AR-01 | Asset recognized when probable future economic benefit + reliable cost measurement | IFRS Conceptual Framework | Warning |
|
|
64
|
+
| AR-02 | Internally generated intangibles capitalized only when recognition criteria met | IAS 38 — research expensed, development capitalized per criteria | Warning |
|
|
65
|
+
| AR-03 | Contingent assets recognized only when virtually certain | Not recognized for probable; disclosed for possible | Warning |
|
|
66
|
+
|
|
67
|
+
### Liability Recognition
|
|
68
|
+
|
|
69
|
+
| ID | Rule | Description | Severity |
|
|
70
|
+
|---|---|---|---|
|
|
71
|
+
| LR-01 | Liability recognized when present obligation + probable outflow + reliable measurement | IFRS Conceptual Framework | Warning |
|
|
72
|
+
| LR-02 | Provision recognized when legal or constructive obligation exists | IAS 37 — warranty, restructuring | Warning |
|
|
73
|
+
| LR-03 | Contingent liability disclosed (not recognized) when outflow possible but not probable | IAS 37 | Warning |
|
|
74
|
+
|
|
75
|
+
## Measurement Logic
|
|
76
|
+
|
|
77
|
+
| ID | Rule | Description | Severity |
|
|
78
|
+
|---|---|---|---|
|
|
79
|
+
| MR-01 | Initial recognition at transaction price (cost) unless specific standard requires fair value | IFRS Conceptual Framework | Warning |
|
|
80
|
+
| MR-02 | Subsequent measurement follows accounting policy choice (cost model or fair value model) | Applied consistently per asset class | Warning |
|
|
81
|
+
| MR-03 | Fair Value hierarchy: Level 1 (quoted prices active market) > Level 2 (observable inputs) > Level 3 (unobservable) | IFRS 13 | Warning |
|
|
82
|
+
| MR-04 | Impairment: Carrying Amount > Recoverable Amount → recognize Impairment Loss | IAS 36 | Error |
|
|
83
|
+
| MR-05 | Recoverable Amount = max(Fair Value less costs of disposal, Value in Use) | IAS 36 | Error |
|
|
84
|
+
| MR-06 | Depreciation: systematic allocation over useful life. Useful life and residual value reviewed annually | IAS 16 | Warning |
|
|
85
|
+
| MR-07 | Inventory valued at lower of cost and Net Realizable Value | IAS 2 | Error |
|
|
86
|
+
|
|
87
|
+
### Measurement Conflict Resolution
|
|
88
|
+
|
|
89
|
+
When multiple measurement bases could apply (e.g., PP&E can use cost or revaluation model):
|
|
90
|
+
1. Choose one model per asset class and apply consistently
|
|
91
|
+
2. Document policy choice in notes (IAS 1.117)
|
|
92
|
+
3. Change between models permitted only if resulting information more relevant/reliable (IAS 8)
|
|
93
|
+
4. Retrospective application required for policy change
|
|
94
|
+
|
|
95
|
+
## Period Attribution Logic
|
|
96
|
+
|
|
97
|
+
Rules for correct period attribution under accrual basis.
|
|
98
|
+
|
|
99
|
+
| Pattern | Cash Timing | Service Timing | Recognition |
|
|
100
|
+
|---------|-------------|----------------|-------------|
|
|
101
|
+
| Unearned Revenue (선수수익) | Received | Not yet performed | Liability (Contract Liability per IFRS 15) |
|
|
102
|
+
| Accrued Revenue (미수수익) | Not yet received | Performed | Asset (Contract Asset or Receivable) |
|
|
103
|
+
| Prepaid Expense (선급비용) | Paid | Not yet consumed | Asset |
|
|
104
|
+
| Accrued Expense (미지급비용) | Not yet paid | Consumed | Liability |
|
|
105
|
+
|
|
106
|
+
### Period-End Adjusting Entry Rules
|
|
107
|
+
|
|
108
|
+
| ID | Rule | Description |
|
|
109
|
+
|---|---|---|
|
|
110
|
+
| PA-01 | Every unrecorded accrual must be adjusted at period end | 4 types (unearned, accrued revenue; prepaid, accrued expense) |
|
|
111
|
+
| PA-02 | Depreciation recorded as adjusting entry at period end | Straight-line typical; matches expense to period of benefit |
|
|
112
|
+
| PA-03 | ECL allowance updated at period end | IFRS 9 stage transitions and forward-looking updates |
|
|
113
|
+
| PA-04 | Inventory write-down recognized when NRV < cost | IAS 2; recognize loss in period of decline |
|
|
114
|
+
| PA-05 | Foreign currency period-end translation applied | Monetary items at closing rate, non-monetary at historical |
|
|
115
|
+
|
|
116
|
+
## Closing Procedures
|
|
117
|
+
|
|
118
|
+
End-of-period procedures that reset temporary accounts and finalize statements.
|
|
119
|
+
|
|
120
|
+
1. **Adjusting entries** — accruals, deferrals, depreciation, allowances (per PA-01 to PA-05)
|
|
121
|
+
2. **Closing entries** — transfer revenue and expense balances to Retained Earnings, zeroing temporary accounts
|
|
122
|
+
3. **Reversing entries** (optional, next period start) — reverse certain adjusting entries to simplify subsequent cash transactions
|
|
123
|
+
4. **Carry-forward** — permanent account balances carried forward as opening balances
|
|
124
|
+
|
|
125
|
+
### Closing Entry Sequence
|
|
126
|
+
|
|
127
|
+
1. Close Revenue accounts to Income Summary: `Dr. Revenues / Cr. Income Summary`
|
|
128
|
+
2. Close Expense accounts to Income Summary: `Dr. Income Summary / Cr. Expenses`
|
|
129
|
+
3. Close Income Summary to Retained Earnings: `Dr. Income Summary / Cr. Retained Earnings` (profit) or reverse (loss)
|
|
130
|
+
4. Close Dividends declared to Retained Earnings (if separately tracked): `Dr. Retained Earnings / Cr. Dividends`
|
|
131
|
+
|
|
132
|
+
## Consolidation Logic
|
|
133
|
+
|
|
134
|
+
| ID | Rule | Description | Severity |
|
|
135
|
+
|---|---|---|---|
|
|
136
|
+
| CL-01 | Control determined by power + variable returns + link (IFRS 10) | All three required | Warning |
|
|
137
|
+
| CL-02 | Intercompany transactions fully eliminated in consolidation | Sales, purchases, loans, interest, dividends | Error |
|
|
138
|
+
| CL-03 | Unrealized profits on intercompany inventory eliminated until external sale | Prevents inflated earnings | Error |
|
|
139
|
+
| CL-04 | Non-controlling Interest presented separately in equity | IFRS 10.22; attributed share of net income | Error |
|
|
140
|
+
| CL-05 | Goodwill recognized as excess of acquisition cost over identifiable net assets at fair value | IFRS 3 | Warning |
|
|
141
|
+
| CL-06 | Goodwill not amortised; annually tested for impairment (IAS 36) | No reversal of goodwill impairment permitted | Warning |
|
|
142
|
+
| CL-07 | Associates/joint ventures accounted for using equity method (IAS 28) | 20-50% ownership typically; significant influence test | Warning |
|
|
143
|
+
|
|
144
|
+
### Consolidation Adjustment Example
|
|
145
|
+
|
|
146
|
+
Parent P owns 80% of Subsidiary S.
|
|
147
|
+
- S's net income: 100M
|
|
148
|
+
- Intercompany sale from S to P: 20M at 25% profit margin (5M profit, 10M still in P's inventory)
|
|
149
|
+
|
|
150
|
+
Adjustments:
|
|
151
|
+
- Eliminate intercompany sales revenue: 20M
|
|
152
|
+
- Eliminate intercompany COGS at P: 20M (net effect on consolidated: 0M)
|
|
153
|
+
- Eliminate unrealized profit in P's inventory: 2.5M (half of 5M profit still in ending inventory)
|
|
154
|
+
|
|
155
|
+
Attribution:
|
|
156
|
+
- NCI share of S's adjusted net income: 20% × (100 - 2.5) = 19.5M
|
|
157
|
+
- Parent share: 78M
|
|
158
|
+
|
|
159
|
+
## Tax-Accounting Difference Logic
|
|
160
|
+
|
|
161
|
+
| ID | Rule | Description | Severity |
|
|
162
|
+
|---|---|---|---|
|
|
163
|
+
| TD-01 | Temporary Difference: Carrying Amount ≠ Tax Base, will reverse | Generates Deferred Tax | Warning |
|
|
164
|
+
| TD-02 | Permanent Difference: accounting/tax treatment never reconciles | No Deferred Tax effect (e.g., entertainment expense limit excess) | Warning |
|
|
165
|
+
| TD-03 | Deferred Tax Asset recognized only when future taxable income probable | Recoverability assessment mandatory | Warning |
|
|
166
|
+
| TD-04 | Deferred Tax Liability recognized for all taxable temporary differences (with limited exceptions) | IAS 12.15 exceptions: initial goodwill, initial recognition of non-business-combination assets | Warning |
|
|
167
|
+
| TD-05 | Measured at tax rates expected to apply when difference reverses | Enacted or substantively enacted rates | Warning |
|
|
168
|
+
|
|
169
|
+
### Tax Adjustment Categories
|
|
170
|
+
|
|
171
|
+
| Category | Examples | Difference Type |
|
|
172
|
+
|----------|----------|-----------------|
|
|
173
|
+
| Non-deductible expenses | Entertainment excess, penalties, certain donations | Permanent |
|
|
174
|
+
| Tax-exempt income | Certain dividends, tax-free interest | Permanent |
|
|
175
|
+
| Timing differences | Depreciation method differences, bad debt expense timing, accrued expenses tax-deductible only on payment | Temporary |
|
|
176
|
+
| Loss carryforward | Tax losses carried to future periods | Temporary (future DTA) |
|
|
177
|
+
|
|
178
|
+
## Constraint Conflict Checking
|
|
179
|
+
|
|
180
|
+
When rules produce conflicting guidance:
|
|
181
|
+
|
|
182
|
+
### K-IFRS vs Tax Law
|
|
183
|
+
|
|
184
|
+
- Financial reporting follows K-IFRS; tax filing follows tax law. **Never consolidate into a single standard**
|
|
185
|
+
- Reconciliation via Tax Adjustment schedule
|
|
186
|
+
- Example: Depreciation — K-IFRS allows 4-year useful life based on actual wear; tax law mandates 5-year straight-line. Both apply independently
|
|
187
|
+
|
|
188
|
+
### Fair Value vs Historical Cost
|
|
189
|
+
|
|
190
|
+
- Once an accounting policy is chosen per asset class, applied consistently
|
|
191
|
+
- Example: Investment property must use cost model OR fair value model for all investment properties (IAS 40). Cannot mix
|
|
192
|
+
- Policy change requires IAS 8 retrospective application
|
|
193
|
+
|
|
194
|
+
### Conservatism vs Neutrality
|
|
195
|
+
|
|
196
|
+
- IFRS prioritizes **neutrality** over conservatism (revised Conceptual Framework 2018)
|
|
197
|
+
- Excessive conservatism (e.g., over-providing for bad debts) distorts financial statements toward understatement
|
|
198
|
+
- Prudence applied without systematic bias
|
|
199
|
+
|
|
200
|
+
### Recognition Threshold Conflicts
|
|
201
|
+
|
|
202
|
+
- When recognition criteria for an asset are marginally met, document the assessment
|
|
203
|
+
- Probable (>50%) vs virtually certain (>95%) vs remote thresholds drive classification (liability vs disclosure vs ignored)
|
|
204
|
+
|
|
205
|
+
### Resolution Procedure
|
|
206
|
+
|
|
207
|
+
1. Apply the tier ordering (domain_scope.md §Normative System Classification): Tier-1a > Tier-1b > Tier-2 > Tier-3
|
|
208
|
+
2. For same-tier conflicts, apply the more specific rule to the specific transaction
|
|
209
|
+
3. Document the decision and rationale in accounting policy notes
|
|
210
|
+
|
|
211
|
+
## SE Transfer Verification
|
|
212
|
+
|
|
213
|
+
| SE Pattern | Accounting Equivalent | Key Difference |
|
|
214
|
+
|---|---|---|
|
|
215
|
+
| Type system enforcement (compile-time) | Double-entry balance (at-entry) | SE uses compiler; accounting uses trial balance and software validation |
|
|
216
|
+
| Database constraints (CHECK, FK) | Chart of accounts validity, account classification | SE uses DB; accounting uses journal entry validation |
|
|
217
|
+
| Transaction atomicity (ACID) | Journal entry atomicity (all debits and credits post together) | Both require atomicity; accounting enforces via trial balance |
|
|
218
|
+
| Audit log | Audit trail (source document → journal → ledger → statement) | Same principle; accounting extends to include paper documents |
|
|
219
|
+
| Version control | Period-end closing and comparative restatement | Both preserve history; accounting groups by accounting period |
|
|
220
|
+
|
|
221
|
+
## Related Documents
|
|
222
|
+
- concepts.md — Definitions of Debit/Credit, recognition, measurement, consolidation terms
|
|
223
|
+
- structure_spec.md — Financial statement structure, chart of accounts, hierarchy principles
|
|
224
|
+
- dependency_rules.md — Inter-statement linkage, inter-standard dependencies
|
|
225
|
+
- competency_qs.md — Questions where logic rules provide inference paths
|
|
226
|
+
- domain_scope.md — Normative tier classification, cross-cutting concerns
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: 2
|
|
3
|
+
last_updated: "2026-04-16"
|
|
4
|
+
source: manual
|
|
5
|
+
status: established
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Accounting Domain — Structure Specification
|
|
9
|
+
|
|
10
|
+
Classification axis: **Structural component** — specifications classified by the accounting element they govern.
|
|
11
|
+
|
|
12
|
+
## Financial Statement Structure Required Elements
|
|
13
|
+
|
|
14
|
+
### Statement of Financial Position (재무상태표)
|
|
15
|
+
|
|
16
|
+
3-section structure per IAS 1:
|
|
17
|
+
|
|
18
|
+
- **Assets**: Current Assets (유동자산) + Non-current Assets (비유동자산)
|
|
19
|
+
- Current Assets: Cash and Cash Equivalents, Trade Receivables, Inventories, Prepaid Expenses, Other Current Assets
|
|
20
|
+
- Non-current Assets: PP&E, Intangible Assets, Investment Property, Long-term Investments, Deferred Tax Assets, Goodwill
|
|
21
|
+
- **Liabilities**: Current Liabilities (유동부채) + Non-current Liabilities (비유동부채)
|
|
22
|
+
- Current Liabilities: Trade Payables, Short-term Borrowings, Current Portion of Long-term Debt, Accrued Expenses, Contract Liabilities
|
|
23
|
+
- Non-current Liabilities: Long-term Borrowings, Lease Liabilities, Deferred Tax Liabilities, Provisions, Pension Liabilities
|
|
24
|
+
- **Equity**: Share Capital (자본금) + Share Premium (자본잉여금) + Retained Earnings (이익잉여금) + Accumulated OCI (기타포괄손익누계액) + Non-controlling Interest (비지배지분, if consolidated)
|
|
25
|
+
|
|
26
|
+
**Identity**: Assets = Liabilities + Equity (must hold within rounding)
|
|
27
|
+
|
|
28
|
+
### Statement of Comprehensive Income (포괄손익계산서)
|
|
29
|
+
|
|
30
|
+
Sequential structure per IAS 1.82-87:
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
Revenue (매출액)
|
|
34
|
+
- Cost of Sales (매출원가)
|
|
35
|
+
= Gross Profit (매출총이익)
|
|
36
|
+
- Selling, General and Administrative Expenses (판매비와관리비)
|
|
37
|
+
= Operating Income (영업이익)
|
|
38
|
+
+/- Other Income/Expenses (기타영업외손익)
|
|
39
|
+
+/- Finance Income/Costs (금융손익)
|
|
40
|
+
= Pre-tax Income (법인세차감전순이익)
|
|
41
|
+
- Income Tax Expense (법인세비용)
|
|
42
|
+
= Net Income (당기순이익)
|
|
43
|
+
+/- Other Comprehensive Income items (기타포괄손익)
|
|
44
|
+
= Total Comprehensive Income (총포괄이익)
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Attribution for consolidated statements:
|
|
48
|
+
- Net Income attributable to Parent (모회사 귀속)
|
|
49
|
+
- Net Income attributable to NCI (비지배지분 귀속)
|
|
50
|
+
|
|
51
|
+
### Statement of Cash Flows (현금흐름표)
|
|
52
|
+
|
|
53
|
+
3-section structure per IAS 7:
|
|
54
|
+
|
|
55
|
+
- **Operating Activities (영업활동)**: Cash from operations — direct method (gross cash receipts/payments) or indirect method (net income + non-cash adjustments + working capital changes)
|
|
56
|
+
- **Investing Activities (투자활동)**: Purchase/sale of PP&E, intangibles, investments; loans to others
|
|
57
|
+
- **Financing Activities (재무활동)**: Borrowing/repayment, share issuance/repurchase, dividends paid
|
|
58
|
+
|
|
59
|
+
**Identity**: Opening Cash + Operating CF + Investing CF + Financing CF + Exchange rate effects = Closing Cash
|
|
60
|
+
|
|
61
|
+
### Statement of Changes in Equity (자본변동표)
|
|
62
|
+
|
|
63
|
+
Column structure per IAS 1.106:
|
|
64
|
+
|
|
65
|
+
| Equity Component | Opening | + Net Income | + OCI | + Capital Txns | - Dividends | Closing |
|
|
66
|
+
|---|---|---|---|---|---|---|
|
|
67
|
+
| Share Capital | X | — | — | X | — | X |
|
|
68
|
+
| Share Premium | X | — | — | X | — | X |
|
|
69
|
+
| Retained Earnings | X | X | — | — | (X) | X |
|
|
70
|
+
| Accumulated OCI | X | — | X | — | — | X |
|
|
71
|
+
| NCI (consolidated) | X | X | X | X | (X) | X |
|
|
72
|
+
| **Total** | X | X | X | X | (X) | X |
|
|
73
|
+
|
|
74
|
+
### Notes (주석)
|
|
75
|
+
|
|
76
|
+
4-area structure per IAS 1.112:
|
|
77
|
+
|
|
78
|
+
- **Significant Accounting Policies (중요한 회계정책)**: measurement bases, recognition criteria, consolidation principles
|
|
79
|
+
- **Critical Accounting Estimates (중요한 회계추정)**: sources of estimation uncertainty, sensitivities
|
|
80
|
+
- **Detailed Breakdowns (세부 내역)**: disaggregation of aggregated line items (inventory breakdown, PP&E movement schedule, leases)
|
|
81
|
+
- **Other Disclosures (기타 공시)**: related party transactions, contingencies, subsequent events, capital management, segment reporting
|
|
82
|
+
|
|
83
|
+
## Chart of Accounts
|
|
84
|
+
|
|
85
|
+
Hierarchical 3-level structure:
|
|
86
|
+
|
|
87
|
+
### Level 1: 5 Elements
|
|
88
|
+
|
|
89
|
+
| Code | Element | Temporal Attribute | Normal Balance |
|
|
90
|
+
|---|---|---|---|
|
|
91
|
+
| 1 | Assets (자산) | Instant | Debit |
|
|
92
|
+
| 2 | Liabilities (부채) | Instant | Credit |
|
|
93
|
+
| 3 | Equity (자본) | Instant | Credit |
|
|
94
|
+
| 4 | Revenue (수익) | Duration | Credit |
|
|
95
|
+
| 5 | Expenses (비용) | Duration | Debit |
|
|
96
|
+
|
|
97
|
+
### Level 2: Classification by Nature
|
|
98
|
+
|
|
99
|
+
| Code | Classification | Parent Element |
|
|
100
|
+
|---|---|---|
|
|
101
|
+
| 11 | Current Assets (유동자산) | 1 |
|
|
102
|
+
| 12 | Non-current Assets (비유동자산) | 1 |
|
|
103
|
+
| 21 | Current Liabilities (유동부채) | 2 |
|
|
104
|
+
| 22 | Non-current Liabilities (비유동부채) | 2 |
|
|
105
|
+
| 31 | Share Capital (자본금) | 3 |
|
|
106
|
+
| 32 | Retained Earnings (이익잉여금) | 3 |
|
|
107
|
+
| 33 | Other Equity Components | 3 |
|
|
108
|
+
| 41 | Operating Revenue (영업수익) | 4 |
|
|
109
|
+
| 42 | Non-operating Income (영업외수익) | 4 |
|
|
110
|
+
| 51 | Cost of Sales (매출원가) | 5 |
|
|
111
|
+
| 52 | SG&A (판매비와관리비) | 5 |
|
|
112
|
+
| 53 | Non-operating Expenses (영업외비용) | 5 |
|
|
113
|
+
| 54 | Income Tax (법인세비용) | 5 |
|
|
114
|
+
|
|
115
|
+
### Level 3: Individual Accounts
|
|
116
|
+
|
|
117
|
+
Transaction-recording units. Examples:
|
|
118
|
+
- 1101: Cash and Cash Equivalents
|
|
119
|
+
- 1102: Trade Receivables
|
|
120
|
+
- 1105: Inventories
|
|
121
|
+
- 4101: Sales Revenue
|
|
122
|
+
- 4102: Service Revenue
|
|
123
|
+
- 5101: Cost of Goods Sold
|
|
124
|
+
|
|
125
|
+
### Subsidiary Ledgers
|
|
126
|
+
|
|
127
|
+
Detailed breakdowns supplementing Level 3 accounts:
|
|
128
|
+
- Trade Receivables subsidiary ledger: by customer
|
|
129
|
+
- Inventory subsidiary ledger: by item (SKU, batch, location)
|
|
130
|
+
- PP&E subsidiary ledger: by asset (acquisition date, depreciation method)
|
|
131
|
+
- Accounts Payable subsidiary ledger: by vendor
|
|
132
|
+
|
|
133
|
+
## Required Relationships
|
|
134
|
+
|
|
135
|
+
| ID | Relationship | Description |
|
|
136
|
+
|---|---|---|
|
|
137
|
+
| RR-01 | Every Journal Entry has ≥1 Debit account and ≥1 Credit account | Double-entry fundamental |
|
|
138
|
+
| RR-02 | Every Account belongs to exactly one Element (5 classification) | Chart of accounts integrity |
|
|
139
|
+
| RR-03 | Every Financial Statement item maps to ≥1 General Ledger account | Traceability |
|
|
140
|
+
| RR-04 | Every Note reference points to existing Main Statement item | Referential integrity |
|
|
141
|
+
| RR-05 | Intercompany transactions have matching counterparty entries | Consolidation requirement |
|
|
142
|
+
| RR-06 | Every material estimate has documented basis | Audit evidence |
|
|
143
|
+
|
|
144
|
+
## Hierarchy Structure Principles
|
|
145
|
+
|
|
146
|
+
Upward aggregation from transaction to statement:
|
|
147
|
+
|
|
148
|
+
```
|
|
149
|
+
Transaction (occurrence)
|
|
150
|
+
↓
|
|
151
|
+
Journal Entry (분개, transaction recording)
|
|
152
|
+
↓
|
|
153
|
+
Ledger (account-level aggregation)
|
|
154
|
+
↓
|
|
155
|
+
Trial Balance (시산표, overall balance verification)
|
|
156
|
+
↓
|
|
157
|
+
Financial Statements (main + notes)
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
### Principles
|
|
161
|
+
|
|
162
|
+
- Changes at lower levels propagate to upper levels. Journal entry modification triggers ledger re-posting and statement update
|
|
163
|
+
- Lower-level entities are more granular; upper-level entities are aggregates
|
|
164
|
+
- Modifications allowed only at transaction level via new journal entries (adjusting entries). Direct ledger/trial balance/statement edits are forbidden
|
|
165
|
+
- Notes supplement main statements. Notes alone cannot redefine main statement meaning
|
|
166
|
+
|
|
167
|
+
## State System (Period Lifecycle)
|
|
168
|
+
|
|
169
|
+
| State | Description | Allowed Operations |
|
|
170
|
+
|-------|-------------|--------------------|
|
|
171
|
+
| Open | Active accounting period | Record transactions, post journals, adjust entries |
|
|
172
|
+
| Pre-closing | Period-end, adjusting entries phase | Adjusting entries only (no regular transactions) |
|
|
173
|
+
| Closing | Closing entries being posted | Closing entries; no new transactions |
|
|
174
|
+
| Closed | Period finalized | No modifications (only prior period corrections via next period) |
|
|
175
|
+
| Reopened | Error correction requires reopening | Adjusting entries for correction only; re-closing required |
|
|
176
|
+
|
|
177
|
+
### Transitions
|
|
178
|
+
|
|
179
|
+
- Open → Pre-closing: at period end date
|
|
180
|
+
- Pre-closing → Closing: after all adjusting entries posted and reviewed
|
|
181
|
+
- Closing → Closed: after closing entries posted and statements prepared
|
|
182
|
+
- Closed → Reopened: only when material error discovered and management approves
|
|
183
|
+
|
|
184
|
+
## Classification Criteria
|
|
185
|
+
|
|
186
|
+
### Current vs Non-current Classification
|
|
187
|
+
|
|
188
|
+
Per IAS 1.66 (Assets):
|
|
189
|
+
- Current if: realized/sold/consumed in normal operating cycle, OR held primarily for trading, OR realized within 12 months, OR cash/cash equivalent
|
|
190
|
+
- Non-current: everything else
|
|
191
|
+
- Operating cycle: default 12 months if not identifiable
|
|
192
|
+
|
|
193
|
+
Per IAS 1.69 (Liabilities):
|
|
194
|
+
- Current if: settled in normal operating cycle, OR held primarily for trading, OR due within 12 months, OR no unconditional right to defer beyond 12 months
|
|
195
|
+
- Non-current: everything else
|
|
196
|
+
|
|
197
|
+
### Operating vs Non-operating Classification
|
|
198
|
+
|
|
199
|
+
- **Operating**: directly related to entity's primary activities (revenue, COGS, SG&A, depreciation of PP&E)
|
|
200
|
+
- **Non-operating**: not directly related (finance income/cost, gains on sale of investments, foreign exchange gains/losses)
|
|
201
|
+
- K-IFRS does NOT prescribe Operating Income calculation format — entity chooses presentation
|
|
202
|
+
|
|
203
|
+
### Recurring vs Non-recurring
|
|
204
|
+
|
|
205
|
+
K-IFRS prohibits presentation of extraordinary items. All items classified only as operating/non-operating. Material one-time items disclosed separately within these categories.
|
|
206
|
+
|
|
207
|
+
## Verification Structure
|
|
208
|
+
|
|
209
|
+
### Monthly Closing
|
|
210
|
+
|
|
211
|
+
1. Trial Balance balance verification (total Debits = total Credits)
|
|
212
|
+
2. Bank reconciliation (book balance vs bank statement)
|
|
213
|
+
3. Receivable/Payable confirmation with counterparties (sample basis)
|
|
214
|
+
4. Monthly journal review (unusual entries flagged)
|
|
215
|
+
|
|
216
|
+
### Quarterly Closing
|
|
217
|
+
|
|
218
|
+
All monthly procedures +
|
|
219
|
+
1. Revenue/expense period attribution verification
|
|
220
|
+
2. Depreciation and amortisation recorded
|
|
221
|
+
3. ECL allowance updated (IFRS 9)
|
|
222
|
+
4. Inventory valuation verified (NRV check)
|
|
223
|
+
5. Quarterly review (if listed) by external auditor
|
|
224
|
+
|
|
225
|
+
### Annual Closing
|
|
226
|
+
|
|
227
|
+
All quarterly procedures +
|
|
228
|
+
1. Physical inventory count and reconciliation
|
|
229
|
+
2. Impairment review of all material assets (IAS 36)
|
|
230
|
+
3. Deferred Tax recalculation (IAS 12)
|
|
231
|
+
4. Notes preparation (IAS 1 disclosure requirements)
|
|
232
|
+
5. Annual audit by external auditor (ISA procedures)
|
|
233
|
+
6. Subsequent event review (IAS 10)
|
|
234
|
+
|
|
235
|
+
### Completion Criteria at Each Stage
|
|
236
|
+
|
|
237
|
+
- Every verification stage must produce:
|
|
238
|
+
1. Completion criteria (what must be true)
|
|
239
|
+
2. Verification evidence (documentary support)
|
|
240
|
+
3. Approver identification (who signed off)
|
|
241
|
+
4. Exception log (what was flagged and resolution)
|
|
242
|
+
|
|
243
|
+
## Isolated Node Prohibition
|
|
244
|
+
|
|
245
|
+
Accounts and structural elements that must not exist in isolation:
|
|
246
|
+
|
|
247
|
+
| Node Type | Required Connection | Warning If |
|
|
248
|
+
|-----------|--------------------|-----|
|
|
249
|
+
| Account (chart of accounts) | Used in ≥1 Journal Entry per period | Unused account for multiple periods (may indicate retired account) |
|
|
250
|
+
| Ledger Balance | Presented in financial statement | Balance present but not on statement (omitted reporting) |
|
|
251
|
+
| Financial Statement Item (material) | Referenced in notes | Material item without note reference (disclosure omission) |
|
|
252
|
+
| Classification | Defined in standard | Non-standard classification without policy disclosure |
|
|
253
|
+
| Note | Points to main statement item | Orphan note (no main statement reference) |
|
|
254
|
+
| Intercompany Transaction | Matched counterparty entry | Single-sided intercompany (elimination impossible) |
|
|
255
|
+
|
|
256
|
+
## Classification Criteria Design
|
|
257
|
+
|
|
258
|
+
### Account Classification Axes
|
|
259
|
+
|
|
260
|
+
| Axis | Values | Structural Implication |
|
|
261
|
+
|------|--------|----------------------|
|
|
262
|
+
| Element | Asset / Liability / Equity / Revenue / Expense | Determines normal balance, temporal attribute |
|
|
263
|
+
| Liquidity | Current / Non-current | Determines BS classification |
|
|
264
|
+
| Operating status | Operating / Non-operating | Determines IS classification |
|
|
265
|
+
| Measurement basis | Historical cost / Fair value / Amortised cost / NRV / Value in use | Determines measurement procedure |
|
|
266
|
+
| Audit priority | High risk / Medium risk / Low risk | Determines audit effort |
|
|
267
|
+
|
|
268
|
+
### Anti-Patterns in Classification
|
|
269
|
+
|
|
270
|
+
- **Arbitrary classification**: classifying based on ease rather than substance (e.g., all long-term items as non-current without 12-month test)
|
|
271
|
+
- **Silent reclassification**: changing classification without disclosure (IAS 1.45 requires disclosure of reclassification)
|
|
272
|
+
- **Mixed measurement without policy**: using both historical cost and fair value for the same asset class
|
|
273
|
+
|
|
274
|
+
## Domain Boundary Management
|
|
275
|
+
|
|
276
|
+
- **This domain covers**: transaction recording, ledger aggregation, financial statement preparation, closing procedures, disclosure
|
|
277
|
+
- **Finance domain covers**: financial statement ontology, analytical metrics, inter-statement relationships for querying
|
|
278
|
+
- **Accounting-kr domain covers**: Korea-specific practices, K-GAAP transition, DART filing requirements
|
|
279
|
+
- **Software-engineering domain covers**: database schema for accounting software, query optimization, UI
|
|
280
|
+
- **Business domain covers**: strategic analysis using accounting data (not the data production itself)
|
|
281
|
+
|
|
282
|
+
## SE Transfer Verification
|
|
283
|
+
|
|
284
|
+
| SE Pattern | Accounting Equivalent | Key Difference |
|
|
285
|
+
|---|---|---|
|
|
286
|
+
| Required Module Structure | Required Financial Statement Elements (BS, IS, CF, SoCE, Notes) | SE by architectural layer; accounting by reporting element |
|
|
287
|
+
| Golden Relationships | Required Relationships (RR-01 to RR-06) | SE validates code coherence; accounting validates transactional coherence |
|
|
288
|
+
| Naming Conventions | Chart of Accounts hierarchy (Level 1/2/3 with codes) | SE uses code conventions; accounting uses standardized account codes |
|
|
289
|
+
| Isolated Node Prohibition | Unused account warning, orphan note warning | Same principle; different domain objects |
|
|
290
|
+
| Classification Criteria Design | Account classification axes | SE classifies code; accounting classifies transactions/balances |
|
|
291
|
+
|
|
292
|
+
## Related Documents
|
|
293
|
+
- concepts.md — Account types, financial statement terms, measurement terms
|
|
294
|
+
- dependency_rules.md — Inter-statement linkage, direction rules, referential integrity
|
|
295
|
+
- logic_rules.md — Recognition, measurement, closing procedures
|
|
296
|
+
- domain_scope.md — Normative tier classification, cross-cutting concerns
|
|
297
|
+
- competency_qs.md — Structural verification questions
|
|
298
|
+
- extension_cases.md — Structural evolution scenarios
|