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,428 @@
|
|
|
1
|
+
# Review Pre-Dispatch Contracts
|
|
2
|
+
|
|
3
|
+
> Status: Active
|
|
4
|
+
> Purpose: Close the five contracts that must be fixed before review dispatch can be treated as canonical runtime truth.
|
|
5
|
+
> Scope: `review` only.
|
|
6
|
+
> Related:
|
|
7
|
+
> - `.onto/processes/review/productized-live-path.md`
|
|
8
|
+
> - `.onto/processes/review/execution-preparation-artifacts.md`
|
|
9
|
+
> - `.onto/processes/review/review-context-manifest-contract.md`
|
|
10
|
+
> - `.onto/processes/review/prompt-execution-runner-contract.md`
|
|
11
|
+
> - `.onto/processes/review/record-contract.md`
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## 1. Position
|
|
16
|
+
|
|
17
|
+
These contracts are runtime contracts, not prompt guidance.
|
|
18
|
+
|
|
19
|
+
They close five decisions before implementation work may add more behavior:
|
|
20
|
+
|
|
21
|
+
1. pre-manifest failure versus post-manifest lifecycle boundary
|
|
22
|
+
2. review value-alignment dispatch gate
|
|
23
|
+
3. manifest input versus generated packet phase boundary
|
|
24
|
+
4. parallel lens completion barrier
|
|
25
|
+
5. retired entry policy
|
|
26
|
+
|
|
27
|
+
The runtime may change TypeScript names, helper boundaries, fixture shapes, and
|
|
28
|
+
MCP field spelling while implementing these contracts. It may not change the
|
|
29
|
+
state transitions, gate decisions, artifact authority, or failure semantics
|
|
30
|
+
without updating this document first.
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## 2. Artifact Authority
|
|
35
|
+
|
|
36
|
+
Canonical seats:
|
|
37
|
+
|
|
38
|
+
```text
|
|
39
|
+
{session_root}/
|
|
40
|
+
interpretation.yaml
|
|
41
|
+
binding.yaml
|
|
42
|
+
execution-plan.yaml
|
|
43
|
+
execution-result.yaml
|
|
44
|
+
error-log.md
|
|
45
|
+
lens-completion-barrier.yaml
|
|
46
|
+
failures/*.yaml
|
|
47
|
+
execution-preparation/
|
|
48
|
+
actor-invocation-profiles.yaml
|
|
49
|
+
actor-consumer-bindings.yaml
|
|
50
|
+
domain-binding.yaml
|
|
51
|
+
review-target-profile.yaml
|
|
52
|
+
review-value-alignment-criteria.yaml
|
|
53
|
+
review-context-manifest.yaml
|
|
54
|
+
target-snapshot.md
|
|
55
|
+
target-snapshot-manifest.yaml
|
|
56
|
+
materialized-input.md
|
|
57
|
+
context-candidate-assembly.yaml
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Ownership:
|
|
61
|
+
|
|
62
|
+
| Artifact | Owner | Authority |
|
|
63
|
+
|---|---|---|
|
|
64
|
+
| `interpretation.yaml` | LLM interpretation stage | request meaning and ambiguity notes |
|
|
65
|
+
| `binding.yaml` | runtime | selected domain, lens set, seats, boundaries |
|
|
66
|
+
| `actor-invocation-profiles.yaml` | runtime | resolved actor LLM invocation profiles |
|
|
67
|
+
| `actor-consumer-bindings.yaml` | runtime | actor profile to context consumer binding |
|
|
68
|
+
| `domain-binding.yaml` | runtime | selected domain docs, required status, hashes |
|
|
69
|
+
| `review-target-profile.yaml` | runtime | artifact role, target input kind, target material kind, closure level, target refs, and hashes |
|
|
70
|
+
| `review-value-alignment-criteria.yaml` | runtime with user authority | purpose/value dispatch gate |
|
|
71
|
+
| `review-context-manifest.yaml` | runtime | context source eligibility and packet provenance |
|
|
72
|
+
| `lens-completion-barrier.yaml` | runtime | lens completion gate for downstream stages |
|
|
73
|
+
| `execution-result.yaml` | runtime | execution result truth after dispatch begins |
|
|
74
|
+
| `failures/*.yaml` | runtime | structured failure truth before execution result exists |
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## 3. Contract 1: Pre-Manifest Failure And Post-Manifest Lifecycle
|
|
79
|
+
|
|
80
|
+
### 3.1 Phases
|
|
81
|
+
|
|
82
|
+
| Phase | Required entry artifacts | Allowed exit |
|
|
83
|
+
|---|---|---|
|
|
84
|
+
| `invocation_bound` | `interpretation.yaml`, `binding.yaml`, `execution-plan.yaml` | continue to pre-manifest checks |
|
|
85
|
+
| `pre_manifest` | actor profiles, consumer bindings, domain binding, value criteria | create manifest or write failure record |
|
|
86
|
+
| `manifest_validated` | `review-context-manifest.yaml` with `lifecycle_state=validated` | generate packets |
|
|
87
|
+
| `packets_materialized` | packet files and packet hashes | set manifest `lifecycle_state=dispatched` |
|
|
88
|
+
| `lens_execution` | dispatched packet refs | write lens outputs and barrier |
|
|
89
|
+
| `post_manifest` | barrier output | issue artifacts, deliberation, synthesize, final output, review record |
|
|
90
|
+
|
|
91
|
+
### 3.2 Failure Seats
|
|
92
|
+
|
|
93
|
+
Pre-manifest failures write one structured record under:
|
|
94
|
+
|
|
95
|
+
```text
|
|
96
|
+
{session_root}/failures/{failure_id}.yaml
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Pre-manifest failure records do not require a valid context manifest and do not
|
|
100
|
+
require `execution-result.yaml`.
|
|
101
|
+
|
|
102
|
+
Post-manifest failures use:
|
|
103
|
+
|
|
104
|
+
- `execution-result.yaml`
|
|
105
|
+
- `lens-completion-barrier.yaml`
|
|
106
|
+
- `error-log.md`
|
|
107
|
+
- a structured failure record only when the phase-specific failure is outside
|
|
108
|
+
the execution-result contract or must be returned through MCP before a result
|
|
109
|
+
artifact exists.
|
|
110
|
+
|
|
111
|
+
### 3.3 Failure Envelope
|
|
112
|
+
|
|
113
|
+
Every structured failure record uses:
|
|
114
|
+
|
|
115
|
+
```yaml
|
|
116
|
+
schema_version: "1"
|
|
117
|
+
failure_id: "..."
|
|
118
|
+
created_at: "..."
|
|
119
|
+
phase: "..."
|
|
120
|
+
reason_code: "..."
|
|
121
|
+
human_message: "..."
|
|
122
|
+
required_user_action: "..."
|
|
123
|
+
retry_safety: "safe_after_input_change | safe_after_environment_change | unsafe_without_operator_review"
|
|
124
|
+
artifact_trust: "no_artifacts_trusted | pre_manifest_artifacts_trusted | manifest_artifacts_trusted | execution_artifacts_partial | execution_artifacts_trusted"
|
|
125
|
+
dispatch_state: "not_dispatched | dispatch_blocked | partially_dispatched | dispatched"
|
|
126
|
+
artifact_refs: {}
|
|
127
|
+
mcp_error_code: "..."
|
|
128
|
+
details_kind: "settings_validation | retired_config | domain_binding | value_alignment_gate | actor_route | manifest_lifecycle | context_eligibility | provider_api | malformed_output | schema_validation | artifact_write | security_disclosure"
|
|
129
|
+
details: {}
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## 4. Contract 2: Review Value-Alignment Dispatch Gate
|
|
135
|
+
|
|
136
|
+
`review-value-alignment-criteria.yaml` is the authority for purpose, values,
|
|
137
|
+
non-goals, and judgment criteria used by `axiology` and final synthesis.
|
|
138
|
+
|
|
139
|
+
### 4.1 Criterion Fields
|
|
140
|
+
|
|
141
|
+
Each criterion has:
|
|
142
|
+
|
|
143
|
+
- `criterion_id`
|
|
144
|
+
- `statement`
|
|
145
|
+
- `source_kind`
|
|
146
|
+
- `source_ref`
|
|
147
|
+
- `authority_rank`
|
|
148
|
+
- `inference_owner`
|
|
149
|
+
- `confidence`
|
|
150
|
+
- `confidence_basis`
|
|
151
|
+
- `confirmation_status`
|
|
152
|
+
- `ambiguity_status`
|
|
153
|
+
- `conflict_status`
|
|
154
|
+
- `lifecycle_state`
|
|
155
|
+
- `lineage_ref`
|
|
156
|
+
- `dispatch_decision`
|
|
157
|
+
|
|
158
|
+
### 4.2 Criterion-Level Decision Table
|
|
159
|
+
|
|
160
|
+
| State | Required condition | `dispatch_decision` |
|
|
161
|
+
|---|---|---|
|
|
162
|
+
| ready | `lifecycle_state=confirmed`, `confirmation_status=confirmed`, `ambiguity_status=clear`, `conflict_status=none`, `confidence >= 0.8` | `allow_dispatch` |
|
|
163
|
+
| user confirmation needed | `confirmation_status=pending_confirmation` or `0.5 <= confidence < 0.8` | `block_for_confirmation` |
|
|
164
|
+
| authority conflict | `conflict_status=contested` or `lifecycle_state=contested` | `block_for_revision` |
|
|
165
|
+
| insufficient basis | `lifecycle_state=insufficient` or `confidence < 0.5` | `block_for_more_context` |
|
|
166
|
+
| blocked | `lifecycle_state=blocked` | `halt` |
|
|
167
|
+
| invalidated | `lifecycle_state=invalidated` | `regenerate_or_cancel` |
|
|
168
|
+
|
|
169
|
+
### 4.3 Session-Level Gate
|
|
170
|
+
|
|
171
|
+
The session gate is derived from all criterion decisions:
|
|
172
|
+
|
|
173
|
+
| Criterion decisions | Session dispatch state |
|
|
174
|
+
|---|---|
|
|
175
|
+
| all criteria are `allow_dispatch` | `allow_dispatch` |
|
|
176
|
+
| any `block_for_confirmation` | `blocked` with `value_alignment_gate` failure |
|
|
177
|
+
| any `block_for_revision` | `blocked` with `value_alignment_gate` failure |
|
|
178
|
+
| any `block_for_more_context` | `blocked` with `value_alignment_gate` failure |
|
|
179
|
+
| any `halt` | `blocked` with `value_alignment_gate` failure |
|
|
180
|
+
| any `regenerate_or_cancel` | `blocked` with `value_alignment_gate` failure |
|
|
181
|
+
|
|
182
|
+
### 4.4 Initial Runtime Rule
|
|
183
|
+
|
|
184
|
+
The explicit user request may be written as a confirmed criterion with
|
|
185
|
+
`confidence=1`.
|
|
186
|
+
|
|
187
|
+
Criteria inferred from conversation memory, project principles, domain docs, or
|
|
188
|
+
prior sessions require confidence scoring. If they could materially change the
|
|
189
|
+
review conclusion and are not confirmed, the runtime stops before manifest
|
|
190
|
+
creation.
|
|
191
|
+
|
|
192
|
+
`axiology` receives the value criteria as primary grounding. `synthesize`
|
|
193
|
+
receives axiology output and value-criteria provenance; it does not create new
|
|
194
|
+
criteria.
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
## 5. Contract 3: Manifest Input And Packet Phase Boundary
|
|
199
|
+
|
|
200
|
+
### 5.1 Manifest Creation
|
|
201
|
+
|
|
202
|
+
`review-context-manifest.yaml` is created only after these artifacts validate:
|
|
203
|
+
|
|
204
|
+
- `actor-invocation-profiles.yaml`
|
|
205
|
+
- `actor-consumer-bindings.yaml`
|
|
206
|
+
- `domain-binding.yaml`
|
|
207
|
+
- `review-value-alignment-criteria.yaml`
|
|
208
|
+
- target snapshot, materialized input, and review target profile
|
|
209
|
+
|
|
210
|
+
At creation, lifecycle is:
|
|
211
|
+
|
|
212
|
+
```yaml
|
|
213
|
+
lifecycle_state: validated
|
|
214
|
+
packet_refs: []
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
The manifest authority for context eligibility is:
|
|
218
|
+
|
|
219
|
+
```yaml
|
|
220
|
+
context_sources[].allowed_consumers
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
`derived_context_access_matrix` is a derived view and must match the canonical
|
|
224
|
+
relation exactly.
|
|
225
|
+
|
|
226
|
+
### 5.2 Packet Materialization
|
|
227
|
+
|
|
228
|
+
Prompt packets are generated from the validated manifest and fixed artifacts.
|
|
229
|
+
Preparation-time lens and base synthesize packets are registered before lens
|
|
230
|
+
dispatch. Runtime-generated packets are registered immediately after materialize
|
|
231
|
+
and before their unit dispatch:
|
|
232
|
+
|
|
233
|
+
- issue artifact packets
|
|
234
|
+
- per-lens deliberation packets
|
|
235
|
+
- teamlead controlled-deliberation packet
|
|
236
|
+
- synthesize runtime packet
|
|
237
|
+
|
|
238
|
+
For each packet, the runtime records:
|
|
239
|
+
|
|
240
|
+
- `consumer_id`
|
|
241
|
+
- `packet_ref`
|
|
242
|
+
- `packet_sha256`
|
|
243
|
+
- `consumed_context_refs`
|
|
244
|
+
- `forbidden_context_refs`
|
|
245
|
+
|
|
246
|
+
After preparation-time packet refs and hashes are written, lifecycle becomes:
|
|
247
|
+
|
|
248
|
+
```yaml
|
|
249
|
+
lifecycle_state: dispatched
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
Runtime-generated packet registration preserves `lifecycle_state: dispatched`
|
|
253
|
+
and appends/upserts the generated packet ref before invoking the unit.
|
|
254
|
+
|
|
255
|
+
### 5.3 Freshness And Resume
|
|
256
|
+
|
|
257
|
+
Current canonical MCP review does not expose an explicit resume tool.
|
|
258
|
+
|
|
259
|
+
`review-run-manifest.yaml` records a `resume_token` for audit, idempotency, and
|
|
260
|
+
future operator-controlled resume design only. The token is not a dispatch
|
|
261
|
+
capability and must not be accepted as authorization to restart, skip, or reuse
|
|
262
|
+
worker stages.
|
|
263
|
+
|
|
264
|
+
A future resumed or reused session must validate:
|
|
265
|
+
|
|
266
|
+
- manifest schema version
|
|
267
|
+
- source hash for every required `context_source`
|
|
268
|
+
- packet hash for every packet ref
|
|
269
|
+
- consumer id admission
|
|
270
|
+
- consumed context eligibility
|
|
271
|
+
- generated packet refs before invoking issue-artifact, deliberation, or
|
|
272
|
+
synthesize runtime units
|
|
273
|
+
|
|
274
|
+
Any mismatch stops before lens execution and writes a `manifest_lifecycle` or
|
|
275
|
+
`context_eligibility` failure record.
|
|
276
|
+
|
|
277
|
+
Until an explicit resume contract is implemented, MCP callers must start a new
|
|
278
|
+
review session after changing inputs, settings, target scope, provider route, or
|
|
279
|
+
manifest-governed artifacts. Runtime status/result tools may read existing
|
|
280
|
+
session artifacts, but they do not resume execution.
|
|
281
|
+
|
|
282
|
+
### 5.4 Synthesize Context
|
|
283
|
+
|
|
284
|
+
By default, `synthesize` consumes:
|
|
285
|
+
|
|
286
|
+
- lens outputs
|
|
287
|
+
- issue artifacts
|
|
288
|
+
- controlled deliberation result
|
|
289
|
+
- problem framing
|
|
290
|
+
- value-criteria provenance
|
|
291
|
+
|
|
292
|
+
Raw domain documents are not first-source synthesize input unless the manifest
|
|
293
|
+
explicitly admits `synthesize` for those context sources.
|
|
294
|
+
|
|
295
|
+
---
|
|
296
|
+
|
|
297
|
+
## 6. Contract 4: Parallel Lens Completion Barrier
|
|
298
|
+
|
|
299
|
+
### 6.1 Dispatch Width
|
|
300
|
+
|
|
301
|
+
`observed_dispatch_width` is runtime-derived:
|
|
302
|
+
|
|
303
|
+
```text
|
|
304
|
+
observed_dispatch_width = selected_lens_ids.length
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
It is not user-configurable.
|
|
308
|
+
|
|
309
|
+
### 6.2 Barrier Inputs
|
|
310
|
+
|
|
311
|
+
The barrier reads:
|
|
312
|
+
|
|
313
|
+
- planned lens ids from `execution-plan.yaml`
|
|
314
|
+
- `minimum_participating_lenses`, which must equal `planned_lens_ids.length`
|
|
315
|
+
- per-lens execution outcomes
|
|
316
|
+
- output file existence
|
|
317
|
+
- output file non-empty check
|
|
318
|
+
- failure messages, including executor timeout or provider failure
|
|
319
|
+
|
|
320
|
+
### 6.3 Barrier Status
|
|
321
|
+
|
|
322
|
+
| Condition | `status` | `downstream_allowed` |
|
|
323
|
+
|---|---|---|
|
|
324
|
+
| all planned lenses complete and planned count is at least 1 | `passed` | `true` |
|
|
325
|
+
| one or more planned lenses fail, time out, produce no file, or produce an empty file | `failed` | `false` |
|
|
326
|
+
| planned lens count is less than 1 | `failed` | `false` |
|
|
327
|
+
|
|
328
|
+
`passed_with_degradation` is a diagnostic status for non-canonical inspection
|
|
329
|
+
or historical artifacts. The canonical review path does not use it to proceed
|
|
330
|
+
into issue artifacts, deliberation, or synthesize.
|
|
331
|
+
|
|
332
|
+
Single-lens review is a valid explicit lens selection. It still passes through
|
|
333
|
+
issue artifact creation, bounded deliberation artifact creation, synthesize,
|
|
334
|
+
and ReviewRecord assembly. Cross-lens disagreement fields are empty unless
|
|
335
|
+
another lens participates.
|
|
336
|
+
|
|
337
|
+
### 6.4 Timeout Semantics
|
|
338
|
+
|
|
339
|
+
A lens timeout is a lens failure.
|
|
340
|
+
|
|
341
|
+
Timeout must be recorded as:
|
|
342
|
+
|
|
343
|
+
- per-unit `status=failed`
|
|
344
|
+
- `failure_message` containing timeout reason
|
|
345
|
+
- `failed_lens_ids` entry in `lens-completion-barrier.yaml`
|
|
346
|
+
- `execution_status=halted_partial` in `execution-result.yaml`
|
|
347
|
+
|
|
348
|
+
The runtime does not synthesize a final review from a partial lens set.
|
|
349
|
+
|
|
350
|
+
Controlled deliberation timeout follows the same fail-loud closure shape:
|
|
351
|
+
|
|
352
|
+
- synthesize is not executed
|
|
353
|
+
- `execution_status=halted_partial`
|
|
354
|
+
- `deliberation_status=not_performed`
|
|
355
|
+
- `halt_phase=controlled_lens_deliberation`
|
|
356
|
+
- `halt_unit_id`, `halt_unit_kind`, and lens-bound `halt_lens_id` identify the
|
|
357
|
+
failed deliberation unit
|
|
358
|
+
- `deliberation_execution_results` preserve completed and failed deliberation
|
|
359
|
+
unit results, including timeout `failure_message`
|
|
360
|
+
- `ReviewRecord` preserves refs for issue-stage artifacts already produced in
|
|
361
|
+
the same run and uses `null` for output artifacts that were not produced
|
|
362
|
+
|
|
363
|
+
---
|
|
364
|
+
|
|
365
|
+
## 7. Contract 5: Retired Entry Policy
|
|
366
|
+
|
|
367
|
+
Runtime authority enters through:
|
|
368
|
+
|
|
369
|
+
- `.onto/settings.json`
|
|
370
|
+
- MCP tool arguments
|
|
371
|
+
- canonical `review:invoke` arguments
|
|
372
|
+
- session artifacts written by the runtime
|
|
373
|
+
|
|
374
|
+
Retired entry points and retired user inputs do not become runtime authority.
|
|
375
|
+
|
|
376
|
+
### 7.1 Retired User Inputs
|
|
377
|
+
|
|
378
|
+
The runtime rejects:
|
|
379
|
+
|
|
380
|
+
- `.onto/config.yml`
|
|
381
|
+
- `.onto/config.yaml`
|
|
382
|
+
- `--max-concurrent-lenses`
|
|
383
|
+
- `--host-runtime` at `review:invoke`
|
|
384
|
+
- `--execution-realization` at `review:invoke`
|
|
385
|
+
- `--execution-mode` at `review:invoke`
|
|
386
|
+
- host-specific shortcuts that bypass resolved execution profile authority
|
|
387
|
+
|
|
388
|
+
### 7.2 Runtime-Derived Coordination
|
|
389
|
+
|
|
390
|
+
The runtime still records coordination facts:
|
|
391
|
+
|
|
392
|
+
- `observed_dispatch_width`
|
|
393
|
+
- selected lens ids
|
|
394
|
+
- participating lens ids
|
|
395
|
+
- failed lens ids
|
|
396
|
+
- packet refs and hashes
|
|
397
|
+
|
|
398
|
+
These fields are derived from session artifacts. They are not read from retired
|
|
399
|
+
user input.
|
|
400
|
+
|
|
401
|
+
### 7.3 Failure Behavior
|
|
402
|
+
|
|
403
|
+
Retired input failure uses:
|
|
404
|
+
|
|
405
|
+
```yaml
|
|
406
|
+
details_kind: retired_config
|
|
407
|
+
dispatch_state: not_dispatched
|
|
408
|
+
artifact_trust: no_artifacts_trusted
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
When a session root already exists and the retired input is detected after
|
|
412
|
+
session allocation, the failure record is written under that session. Otherwise
|
|
413
|
+
the CLI/MCP error returns the same envelope shape without a session artifact.
|
|
414
|
+
|
|
415
|
+
---
|
|
416
|
+
|
|
417
|
+
## 8. Acceptance Criteria
|
|
418
|
+
|
|
419
|
+
The five contracts are closed when:
|
|
420
|
+
|
|
421
|
+
- invalid pre-manifest state writes a structured failure record without
|
|
422
|
+
requiring a context manifest
|
|
423
|
+
- value criteria produce one deterministic session dispatch state
|
|
424
|
+
- packet refs and hashes are recorded only after manifest validation
|
|
425
|
+
- a missing, failed, timed-out, or empty lens output blocks downstream stages
|
|
426
|
+
- retired user inputs are rejected before they influence binding, manifest, or
|
|
427
|
+
dispatch
|
|
428
|
+
- MCP, CLI, and ReviewRecord surfaces cite the same artifact refs
|