onto-mcp 0.3.2 → 0.4.1
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/processes/reconstruct/actionable-ontology-seed-recomposition-design.md +447 -0
- package/.onto/processes/reconstruct/foundry-style-ontology-seed-contract.md +934 -0
- package/.onto/processes/reconstruct/reconstruct-boundary-contract.md +303 -725
- package/.onto/processes/reconstruct/reconstruct-contract-registry.yaml +1645 -0
- package/.onto/processes/reconstruct/reconstruct-execution-ux-contract.md +26 -22
- package/.onto/processes/reconstruct/source-profile-contract.md +49 -23
- package/.onto/processes/reconstruct/source-profiles/code.md +6 -3
- package/.onto/processes/reconstruct/source-profiles/database.md +5 -2
- package/.onto/processes/reconstruct/source-profiles/document.md +5 -2
- package/.onto/processes/reconstruct/source-profiles/spreadsheet.md +5 -4
- package/.onto/processes/review/review-execution-ux-contract.md +40 -0
- package/.onto/processes/shared/pipeline-execution-ledger-contract.md +26 -10
- package/.onto/processes/shared/target-material-kind-contract.md +29 -16
- package/AGENTS.md +6 -4
- package/README.md +149 -76
- package/dist/cli.js +8 -8
- package/dist/core-api/reconstruct-api.js +117 -31
- package/dist/core-api/review-api.js +47 -0
- package/dist/core-runtime/cli/codex-review-unit-executor.js +39 -2
- package/dist/core-runtime/cli/complete-review-session.js +2 -2
- package/dist/core-runtime/cli/mock-review-unit-executor.js +1 -1
- package/dist/core-runtime/cli/review-invoke.js +9 -9
- package/dist/core-runtime/cli/run-review-prompt-execution.js +39 -5
- package/dist/core-runtime/cli/spawn-watcher.js +266 -47
- package/dist/core-runtime/cli/start-review-session.js +3 -3
- package/dist/core-runtime/llm/llm-caller.js +11 -0
- package/dist/core-runtime/llm/llm-tool-loop.js +2 -0
- package/dist/core-runtime/observability/runtime-stream-observation.js +118 -0
- package/dist/core-runtime/onboard/cli-host.js +174 -0
- package/dist/core-runtime/onboard/host-target.js +22 -0
- package/dist/core-runtime/onboard/json-config-host.js +122 -0
- package/dist/core-runtime/onboard/path-scan.js +26 -0
- package/dist/core-runtime/onboard/prompt.js +51 -0
- package/dist/core-runtime/onboard/register.js +214 -0
- package/dist/core-runtime/onboard/types.js +27 -0
- package/dist/core-runtime/reconstruct/actionable-seed-validation.js +1777 -0
- package/dist/core-runtime/reconstruct/artifact-types.js +10 -4
- package/dist/core-runtime/reconstruct/contract-registry.js +623 -0
- package/dist/core-runtime/reconstruct/domain-id.js +10 -0
- package/dist/core-runtime/reconstruct/governing-snapshot.js +716 -0
- package/dist/core-runtime/reconstruct/material-profile-validation.js +191 -0
- package/dist/core-runtime/reconstruct/materialize-preparation.js +49 -11
- package/dist/core-runtime/reconstruct/pipeline-execution-ledger.js +269 -79
- package/dist/core-runtime/reconstruct/post-seed-validation.js +1194 -51
- package/dist/core-runtime/reconstruct/record.js +104 -20
- package/dist/core-runtime/reconstruct/run.js +2107 -413
- package/dist/core-runtime/reconstruct/seed-claim-projections.js +268 -0
- package/dist/core-runtime/reconstruct/source-profiles.js +93 -4
- package/dist/core-runtime/reconstruct/terminal-validation.js +807 -0
- package/dist/core-runtime/review/review-invocation-runner.js +4 -4
- package/dist/mcp/server.js +110 -38
- package/dist/mcp/tool-schemas.js +20 -6
- package/package.json +8 -17
- package/scripts/onto-review-watch.sh +486 -0
- package/scripts/onto-runtime-watch.sh +122 -0
- package/scripts/postinstall-hint.js +22 -0
- package/.onto/processes/reconstruct/top-level-concept-discovery-contract.md +0 -387
- package/dist/core-runtime/cli/bootstrap-review-binding.js +0 -186
- package/dist/core-runtime/cli/codex-nested-dispatch.test.js +0 -390
- package/dist/core-runtime/cli/codex-nested-teamlead-executor.test.js +0 -335
- package/dist/core-runtime/cli/coordinator-helpers.js +0 -583
- package/dist/core-runtime/cli/coordinator-state-machine-deliberation.test.js +0 -167
- package/dist/core-runtime/cli/coordinator-state-machine.js +0 -794
- package/dist/core-runtime/cli/e2e-codex-multi-agent-fixes.test.js +0 -615
- package/dist/core-runtime/cli/e2e-start-review-session.test.js +0 -312
- package/dist/core-runtime/cli/health.js +0 -44
- package/dist/core-runtime/cli/inline-http-review-unit-executor.test.js +0 -567
- package/dist/core-runtime/cli/materialize-review-execution-preparation.js +0 -104
- package/dist/core-runtime/cli/migrate-session-roots.js +0 -118
- package/dist/core-runtime/cli/repo-layout-migration-replace.smoke.test.js +0 -106
- package/dist/core-runtime/cli/review-invoke-auto-resolution.test.js +0 -268
- package/dist/core-runtime/cli/review-invoke-coordinator-topology.test.js +0 -136
- package/dist/core-runtime/cli/review-invoke-resolver-caching.test.js +0 -201
- package/dist/core-runtime/cli/review-invoke-topology-dispatch.test.js +0 -192
- package/dist/core-runtime/cli/session-root-guard.js +0 -168
- package/dist/core-runtime/cli/spawn-watcher.test.js +0 -457
- package/dist/core-runtime/cli/strip-wrapping-code-fence.test.js +0 -79
- package/dist/core-runtime/cli/teamcreate-lens-deliberation-executor.js +0 -412
- package/dist/core-runtime/cli/teamcreate-lens-deliberation-executor.test.js +0 -351
- package/dist/core-runtime/cli/topology-executor-mapping.js +0 -139
- package/dist/core-runtime/cli/topology-executor-mapping.test.js +0 -173
- package/dist/core-runtime/cli/write-review-interpretation.js +0 -81
- package/dist/core-runtime/config/onto-config-cli.js +0 -278
- package/dist/core-runtime/config/onto-config-key-path.js +0 -288
- package/dist/core-runtime/config/onto-config-key-path.test.js +0 -195
- package/dist/core-runtime/config/onto-config-preview.js +0 -108
- package/dist/core-runtime/config/onto-config-preview.test.js +0 -132
- package/dist/core-runtime/discovery/config-chain.js +0 -118
- package/dist/core-runtime/discovery/config-chain.test.js +0 -103
- package/dist/core-runtime/discovery/config-profile.js +0 -199
- package/dist/core-runtime/discovery/config-profile.test.js +0 -233
- package/dist/core-runtime/discovery/host-detection.test.js +0 -186
- package/dist/core-runtime/discovery/installation-paths.test.js +0 -65
- package/dist/core-runtime/discovery/lens-registry.test.js +0 -81
- package/dist/core-runtime/discovery/path-normalization.test.js +0 -22
- package/dist/core-runtime/discovery/plugin-path.js +0 -72
- package/dist/core-runtime/discovery/plugin-path.test.js +0 -95
- package/dist/core-runtime/evolve/adapters/code-product/compile/compile-defense.js +0 -344
- package/dist/core-runtime/evolve/adapters/code-product/compile/compile-defense.test.js +0 -915
- package/dist/core-runtime/evolve/adapters/code-product/compile/compile.js +0 -564
- package/dist/core-runtime/evolve/adapters/code-product/compile/compile.test.js +0 -708
- package/dist/core-runtime/evolve/adapters/code-product/parsers/brief-parser.js +0 -165
- package/dist/core-runtime/evolve/adapters/code-product/parsers/brief-parser.test.js +0 -227
- package/dist/core-runtime/evolve/adapters/code-product/validators/validate.js +0 -59
- package/dist/core-runtime/evolve/adapters/code-product/validators/validate.test.js +0 -205
- package/dist/core-runtime/evolve/adapters/methodology/adapter.js +0 -16
- package/dist/core-runtime/evolve/adapters/methodology/adapter.test.js +0 -9
- package/dist/core-runtime/evolve/adapters/methodology/perspectives/authority-consistency.js +0 -298
- package/dist/core-runtime/evolve/adapters/methodology/perspectives/authority-consistency.test.js +0 -70
- package/dist/core-runtime/evolve/adapters/methodology/scope-types/process.js +0 -46
- package/dist/core-runtime/evolve/adapters/methodology/scope-types/process.test.js +0 -73
- package/dist/core-runtime/evolve/adapters/registry.js +0 -47
- package/dist/core-runtime/evolve/adapters/registry.test.js +0 -67
- package/dist/core-runtime/evolve/cli.js +0 -256
- package/dist/core-runtime/evolve/commands/align.js +0 -194
- package/dist/core-runtime/evolve/commands/align.test.js +0 -82
- package/dist/core-runtime/evolve/commands/apply.js +0 -161
- package/dist/core-runtime/evolve/commands/apply.test.js +0 -138
- package/dist/core-runtime/evolve/commands/close.js +0 -39
- package/dist/core-runtime/evolve/commands/close.test.js +0 -99
- package/dist/core-runtime/evolve/commands/defer.js +0 -40
- package/dist/core-runtime/evolve/commands/defer.test.js +0 -134
- package/dist/core-runtime/evolve/commands/draft.js +0 -323
- package/dist/core-runtime/evolve/commands/draft.test.js +0 -178
- package/dist/core-runtime/evolve/commands/e2e-evolve-full-cycle.test.js +0 -208
- package/dist/core-runtime/evolve/commands/error-messages.js +0 -125
- package/dist/core-runtime/evolve/commands/error-messages.test.js +0 -167
- package/dist/core-runtime/evolve/commands/propose-align.js +0 -222
- package/dist/core-runtime/evolve/commands/propose-align.test.js +0 -136
- package/dist/core-runtime/evolve/commands/reconstruct.js +0 -330
- package/dist/core-runtime/evolve/commands/reconstruct.test.js +0 -278
- package/dist/core-runtime/evolve/commands/shared.js +0 -22
- package/dist/core-runtime/evolve/commands/stale-check.js +0 -103
- package/dist/core-runtime/evolve/commands/stale-check.test.js +0 -84
- package/dist/core-runtime/evolve/commands/start.js +0 -887
- package/dist/core-runtime/evolve/commands/start.test.js +0 -396
- package/dist/core-runtime/evolve/config/project-config.js +0 -99
- package/dist/core-runtime/evolve/config/project-config.test.js +0 -170
- package/dist/core-runtime/evolve/renderers/align-packet.js +0 -280
- package/dist/core-runtime/evolve/renderers/align-packet.test.js +0 -332
- package/dist/core-runtime/evolve/renderers/draft-packet.js +0 -303
- package/dist/core-runtime/evolve/renderers/draft-packet.test.js +0 -377
- package/dist/core-runtime/evolve/renderers/format.js +0 -5
- package/dist/core-runtime/evolve/renderers/scope-md.js +0 -237
- package/dist/core-runtime/evolve/renderers/scope-md.test.js +0 -306
- package/dist/core-runtime/govern/cli.js +0 -369
- package/dist/core-runtime/govern/cli.test.js +0 -314
- package/dist/core-runtime/govern/drift-engine.js +0 -103
- package/dist/core-runtime/govern/drift-engine.test.js +0 -319
- package/dist/core-runtime/govern/promote-principle.js +0 -206
- package/dist/core-runtime/govern/promote-principle.test.js +0 -368
- package/dist/core-runtime/govern/queue.js +0 -81
- package/dist/core-runtime/govern/types.js +0 -16
- package/dist/core-runtime/install/cli.js +0 -530
- package/dist/core-runtime/install/detect.js +0 -128
- package/dist/core-runtime/install/detect.test.js +0 -155
- package/dist/core-runtime/install/gitignore-update.js +0 -74
- package/dist/core-runtime/install/gitignore-update.test.js +0 -64
- package/dist/core-runtime/install/install-integration.test.js +0 -373
- package/dist/core-runtime/install/prompts.js +0 -389
- package/dist/core-runtime/install/prompts.test.js +0 -293
- package/dist/core-runtime/install/types.js +0 -26
- package/dist/core-runtime/install/validation.js +0 -295
- package/dist/core-runtime/install/validation.test.js +0 -313
- package/dist/core-runtime/install/writer.js +0 -254
- package/dist/core-runtime/install/writer.test.js +0 -218
- package/dist/core-runtime/learning/extractor.js +0 -461
- package/dist/core-runtime/learning/feedback.js +0 -179
- package/dist/core-runtime/learning/health-report.js +0 -165
- package/dist/core-runtime/learning/health-report.test.js +0 -169
- package/dist/core-runtime/learning/loader.js +0 -388
- package/dist/core-runtime/learning/loader.test.js +0 -102
- package/dist/core-runtime/learning/promote/apply-state.js +0 -240
- package/dist/core-runtime/learning/promote/audit-obligation.js +0 -195
- package/dist/core-runtime/learning/promote/collector.js +0 -432
- package/dist/core-runtime/learning/promote/degraded-state.js +0 -125
- package/dist/core-runtime/learning/promote/domain-doc-proposer.js +0 -166
- package/dist/core-runtime/learning/promote/e2e-promote.test.js +0 -6385
- package/dist/core-runtime/learning/promote/health-snapshot.js +0 -150
- package/dist/core-runtime/learning/promote/insight-reclassifier.js +0 -544
- package/dist/core-runtime/learning/promote/judgment-auditor.js +0 -517
- package/dist/core-runtime/learning/promote/panel-reviewer.js +0 -1158
- package/dist/core-runtime/learning/promote/promote-executor.js +0 -1675
- package/dist/core-runtime/learning/promote/promoter.js +0 -307
- package/dist/core-runtime/learning/promote/retirement.js +0 -122
- package/dist/core-runtime/learning/promote/types.js +0 -23
- package/dist/core-runtime/learning/prompt-sections.js +0 -51
- package/dist/core-runtime/learning/shared/artifact-registry-init.js +0 -45
- package/dist/core-runtime/learning/shared/artifact-registry.js +0 -254
- package/dist/core-runtime/learning/shared/audit-obligation-kernel.js +0 -73
- package/dist/core-runtime/learning/shared/audit-state.js +0 -99
- package/dist/core-runtime/learning/shared/duplicate-check.js +0 -28
- package/dist/core-runtime/learning/shared/llm-caller.js +0 -831
- package/dist/core-runtime/learning/shared/llm-caller.test.js +0 -601
- package/dist/core-runtime/learning/shared/llm-tool-loop.js +0 -393
- package/dist/core-runtime/learning/shared/mode.js +0 -25
- package/dist/core-runtime/learning/shared/paths.js +0 -84
- package/dist/core-runtime/learning/shared/paths.test.js +0 -79
- package/dist/core-runtime/learning/shared/patterns.js +0 -37
- package/dist/core-runtime/learning/shared/recoverability.js +0 -355
- package/dist/core-runtime/learning/shared/recovery-context.js +0 -374
- package/dist/core-runtime/learning/shared/scope.js +0 -1
- package/dist/core-runtime/learning/shared/semantic-classifier.js +0 -94
- package/dist/core-runtime/learning/shared/specs/apply-execution-state-spec.js +0 -42
- package/dist/core-runtime/learning/shared/specs/audit-state-spec.js +0 -37
- package/dist/core-runtime/learning/shared/specs/backup-metadata-spec.js +0 -39
- package/dist/core-runtime/learning/shared/specs/emergency-log-spec.js +0 -41
- package/dist/core-runtime/learning/shared/specs/layout-version-spec.js +0 -38
- package/dist/core-runtime/learning/shared/specs/promote-decisions-spec.js +0 -43
- package/dist/core-runtime/learning/shared/specs/promote-report-spec.js +0 -113
- package/dist/core-runtime/learning/shared/specs/prune-log-spec.js +0 -36
- package/dist/core-runtime/learning/shared/specs/recovery-resolution-spec.js +0 -48
- package/dist/core-runtime/learning/shared/specs/restore-manifest-spec.js +0 -43
- package/dist/core-runtime/learning/shared/specs/spec-helpers.js +0 -64
- package/dist/core-runtime/learning/usage-tracker.js +0 -190
- package/dist/core-runtime/learning/usage-tracker.test.js +0 -176
- package/dist/core-runtime/onboard/detect-review-axes.js +0 -122
- package/dist/core-runtime/onboard/detect-review-axes.test.js +0 -127
- package/dist/core-runtime/onboard/write-review-block.js +0 -188
- package/dist/core-runtime/onboard/write-review-block.test.js +0 -240
- package/dist/core-runtime/readers/brownfield-builder.js +0 -150
- package/dist/core-runtime/readers/brownfield-builder.test.js +0 -136
- package/dist/core-runtime/readers/code-chunk-collector.js +0 -53
- package/dist/core-runtime/readers/code-chunk-collector.test.js +0 -136
- package/dist/core-runtime/readers/file-utils.js +0 -240
- package/dist/core-runtime/readers/file-utils.test.js +0 -146
- package/dist/core-runtime/readers/lexicon-citation-check.js +0 -93
- package/dist/core-runtime/readers/lexicon-citation-check.test.js +0 -77
- package/dist/core-runtime/readers/mcp-figma.js +0 -30
- package/dist/core-runtime/readers/mcp-figma.test.js +0 -82
- package/dist/core-runtime/readers/mcp-generic.js +0 -31
- package/dist/core-runtime/readers/mcp-generic.test.js +0 -76
- package/dist/core-runtime/readers/ontology-index.js +0 -148
- package/dist/core-runtime/readers/ontology-index.test.js +0 -245
- package/dist/core-runtime/readers/ontology-query.js +0 -168
- package/dist/core-runtime/readers/ontology-query.test.js +0 -311
- package/dist/core-runtime/readers/ontology-resolve.js +0 -48
- package/dist/core-runtime/readers/ontology-resolve.test.js +0 -48
- package/dist/core-runtime/readers/patterns/index.js +0 -7
- package/dist/core-runtime/readers/review-log.js +0 -213
- package/dist/core-runtime/readers/review-log.test.js +0 -313
- package/dist/core-runtime/readers/scan-local.js +0 -102
- package/dist/core-runtime/readers/scan-local.test.js +0 -102
- package/dist/core-runtime/readers/scan-tarball.js +0 -121
- package/dist/core-runtime/readers/scan-tarball.test.js +0 -283
- package/dist/core-runtime/readers/scan-vault.js +0 -34
- package/dist/core-runtime/readers/scan-vault.test.js +0 -81
- package/dist/core-runtime/readers/types.js +0 -42
- package/dist/core-runtime/readers/types.test.js +0 -94
- package/dist/core-runtime/readers/viewpoint-collectors.js +0 -229
- package/dist/core-runtime/reconstruct/seed-candidate-validation.js +0 -385
- package/dist/core-runtime/review/citation-audit.test.js +0 -165
- package/dist/core-runtime/review/execution-plan-resolver.js +0 -247
- package/dist/core-runtime/review/execution-plan-resolver.test.js +0 -243
- package/dist/core-runtime/review/execution-topology-resolver-axis-first.test.js +0 -246
- package/dist/core-runtime/review/execution-topology-resolver.js +0 -401
- package/dist/core-runtime/review/execution-topology-resolver.test.js +0 -315
- package/dist/core-runtime/review/inline-context-embedder.test.js +0 -154
- package/dist/core-runtime/review/legacy-mode-policy.js +0 -88
- package/dist/core-runtime/review/materializers-effort-persist.test.js +0 -79
- package/dist/core-runtime/review/ontology-path-classifier.js +0 -179
- package/dist/core-runtime/review/ontology-path-classifier.test.js +0 -216
- package/dist/core-runtime/review/packet-boundary-policy.test.js +0 -107
- package/dist/core-runtime/review/participating-lens-paths.test.js +0 -73
- package/dist/core-runtime/review/review-config-legacy-translate.js +0 -244
- package/dist/core-runtime/review/review-config-legacy-translate.test.js +0 -161
- package/dist/core-runtime/review/review-config-validator.js +0 -289
- package/dist/core-runtime/review/review-config-validator.test.js +0 -236
- package/dist/core-runtime/review/shape-pipeline-audit.test.js +0 -311
- package/dist/core-runtime/review/shape-to-topology-id.js +0 -117
- package/dist/core-runtime/review/shape-to-topology-id.test.js +0 -132
- package/dist/core-runtime/review/topology-shape-derivation.js +0 -155
- package/dist/core-runtime/review/topology-shape-derivation.test.js +0 -195
- package/dist/core-runtime/scope-runtime/constants.js +0 -12
- package/dist/core-runtime/scope-runtime/constraint-pool.js +0 -166
- package/dist/core-runtime/scope-runtime/constraint-pool.test.js +0 -674
- package/dist/core-runtime/scope-runtime/domain-validation-log.js +0 -135
- package/dist/core-runtime/scope-runtime/domain-validation-log.test.js +0 -156
- package/dist/core-runtime/scope-runtime/eval-persistence.js +0 -65
- package/dist/core-runtime/scope-runtime/eval-persistence.test.js +0 -84
- package/dist/core-runtime/scope-runtime/event-pipeline.js +0 -64
- package/dist/core-runtime/scope-runtime/event-pipeline.test.js +0 -450
- package/dist/core-runtime/scope-runtime/event-store.js +0 -39
- package/dist/core-runtime/scope-runtime/event-store.test.js +0 -95
- package/dist/core-runtime/scope-runtime/gate-guard.js +0 -348
- package/dist/core-runtime/scope-runtime/gate-guard.test.js +0 -1047
- package/dist/core-runtime/scope-runtime/hash.js +0 -4
- package/dist/core-runtime/scope-runtime/hash.test.js +0 -33
- package/dist/core-runtime/scope-runtime/id.js +0 -4
- package/dist/core-runtime/scope-runtime/id.test.js +0 -17
- package/dist/core-runtime/scope-runtime/reducer.js +0 -297
- package/dist/core-runtime/scope-runtime/reducer.test.js +0 -759
- package/dist/core-runtime/scope-runtime/scope-manager.js +0 -161
- package/dist/core-runtime/scope-runtime/state-machine.js +0 -309
- package/dist/core-runtime/scope-runtime/state-machine.test.js +0 -704
- package/dist/core-runtime/scope-runtime/types.js +0 -116
- package/dist/core-runtime/scope-runtime/types.test.js +0 -69
- package/dist/core-runtime/translate/render-for-user.js +0 -169
- package/dist/core-runtime/translate/render-for-user.test.js +0 -122
- package/dist/providers/capability-contract.js +0 -1
|
@@ -1,753 +1,331 @@
|
|
|
1
1
|
# Reconstruct Boundary Contract
|
|
2
2
|
|
|
3
|
-
> Status:
|
|
4
|
-
> Purpose: define
|
|
5
|
-
>
|
|
6
|
-
> Explorer/fact_type path.
|
|
3
|
+
> Status: active reconstruct contract.
|
|
4
|
+
> Purpose: define `reconstruct` as a host-LLM-authored, runtime-validated
|
|
5
|
+
> process that produces an actionable ontology seed.
|
|
7
6
|
|
|
8
7
|
## 1. Position
|
|
9
8
|
|
|
10
|
-
`reconstruct`
|
|
11
|
-
deterministic runtime gates. It is not a runtime ontology generator.
|
|
9
|
+
`reconstruct` turns a source material set into an `ActionableOntologySeed`.
|
|
12
10
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
runtime validates that frontier before observing the next source slice.
|
|
11
|
+
The seed is not a complete ontology and is not generated by deterministic
|
|
12
|
+
runtime code. It is a small, evidence-backed semantic contract that lets later
|
|
13
|
+
work decide, design, review, and act against the target with clear limits.
|
|
17
14
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
The active reconstruct contract set is registry-owned. Runtime prompt packets,
|
|
16
|
+
validation gates, status surfaces, and result explanations must load the active
|
|
17
|
+
refs from
|
|
18
|
+
`.onto/processes/reconstruct/reconstruct-contract-registry.yaml#active_contract_refs`;
|
|
19
|
+
this boundary document explains ownership semantics but does not enumerate the
|
|
20
|
+
active set independently.
|
|
22
21
|
|
|
23
|
-
|
|
24
|
-
`.onto/processes/shared/target-material-kind-contract.md`.
|
|
25
|
-
|
|
26
|
-
The active full product runtime remains `review`. `reconstruct` now has a
|
|
27
|
-
bounded MCP surface for source profile listing, source observation, directive
|
|
28
|
-
validation, direct-call semantic execution, status, and result reads. The runtime path
|
|
29
|
-
is not a general ontology generator: it requires pluggable LLM-owned directive
|
|
30
|
-
authors and confirmation providers for Seed content, claim realization,
|
|
31
|
-
competency questions, assessments, failure classifications, revision proposals,
|
|
32
|
-
stop decisions, and final output.
|
|
33
|
-
|
|
34
|
-
Retired material stays retired:
|
|
22
|
+
## 2. Ownership Boundary
|
|
35
23
|
|
|
36
|
-
|
|
37
|
-
|---|---|
|
|
38
|
-
| `development-records/archive/retired-processes-20260526/processes/reconstruct.md` | historical Explorer/fact_type implementation; integral-loop principle may be reintroduced only under the current ownership boundary |
|
|
39
|
-
| `development-records/archive/retired-runtime-legacy-20260526/explorers/` | historical semantic Explorer profiles; do not revive as runtime observers |
|
|
40
|
-
| `src/core-runtime/evolve/commands/reconstruct.ts` | retired placeholder path that wrote `ontology-draft.md` |
|
|
24
|
+
The host LLM owns semantic authorship:
|
|
41
25
|
|
|
42
|
-
|
|
26
|
+
- purpose interpretation
|
|
27
|
+
- semantic naming and grouping
|
|
28
|
+
- object, actor, action, workflow, permission, and data-binding interpretation
|
|
29
|
+
- candidate disposition decisions
|
|
30
|
+
- competency-question authorship and assessment
|
|
31
|
+
- user-facing explanation
|
|
43
32
|
|
|
44
|
-
|
|
45
|
-
.onto/processes/reconstruct/reconstruct-boundary-contract.md
|
|
46
|
-
.onto/processes/reconstruct/reconstruct-execution-ux-contract.md
|
|
47
|
-
.onto/processes/reconstruct/top-level-concept-discovery-contract.md
|
|
48
|
-
.onto/processes/reconstruct/source-profile-contract.md
|
|
49
|
-
.onto/processes/reconstruct/source-profiles/
|
|
50
|
-
.onto/processes/shared/pipeline-execution-ledger-contract.md
|
|
51
|
-
```
|
|
33
|
+
Runtime owns deterministic authority:
|
|
52
34
|
|
|
53
|
-
|
|
35
|
+
- target material classification
|
|
36
|
+
- selected source profile determination
|
|
37
|
+
- source inventory and observation
|
|
38
|
+
- evidence-ref closure
|
|
39
|
+
- artifact schema validation
|
|
40
|
+
- cross-artifact id closure
|
|
41
|
+
- validation gate reports
|
|
42
|
+
- execution manifests, progress state, and artifact refs
|
|
43
|
+
- fail-loud errors when required authored content is absent or malformed
|
|
54
44
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
src/mcp/tool-schemas.ts
|
|
59
|
-
src/mcp/server.ts
|
|
60
|
-
```
|
|
45
|
+
Runtime must not silently fill missing ontology meaning. If a semantic field is
|
|
46
|
+
required but not LLM-authored, the run must fail a validation gate or present the
|
|
47
|
+
gap as an explicit handoff limitation.
|
|
61
48
|
|
|
62
|
-
|
|
63
|
-
profiles, write preparation artifacts, validate source-observation boundaries,
|
|
64
|
-
validate `SourceObservationDirective` evidence refs, validate
|
|
65
|
-
`SeedCandidateDirective` shape plus evidence refs, validate post-Seed artifacts,
|
|
66
|
-
compute deterministic metrics, and assemble `reconstruct-record.yaml`. The
|
|
67
|
-
implemented direct-call slice now includes initial source frontier, lens
|
|
68
|
-
judgment, exploration synthesis, source-frontier validation, Seed, confirmation,
|
|
69
|
-
CQ, assessment, failure, revision, stop, and final-output artifacts.
|
|
70
|
-
Domain-context selection remains explicitly deferred.
|
|
49
|
+
## 3. Material Boundary
|
|
71
50
|
|
|
72
|
-
|
|
73
|
-
facade for MCP tooling. It can prepare reconstruct artifacts, list source
|
|
74
|
-
profiles, validate LLM-authored directive files, run the direct-call reconstruct loop,
|
|
75
|
-
assemble records, and read status/result artifacts. It does not author semantic
|
|
76
|
-
directives.
|
|
51
|
+
Every run starts by classifying the target with `target_material_kind`.
|
|
77
52
|
|
|
78
|
-
|
|
53
|
+
The material kind determines how runtime can observe source structure:
|
|
79
54
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
55
|
+
| Material kind | Runtime observation examples |
|
|
56
|
+
|---|---|
|
|
57
|
+
| `code` | files, symbols, imports, exported APIs, route handlers, configs, tests |
|
|
58
|
+
| `spreadsheet` | sheets, tables, formulas, named ranges, charts, protected ranges |
|
|
59
|
+
| `document` | headings, sections, tables, figures, references, metadata |
|
|
60
|
+
| `database` | schemas, tables, columns, keys, views, procedures, grants |
|
|
61
|
+
| `mixed` | explicit bundle members and per-member material kinds |
|
|
62
|
+
| `unknown` | bounded file metadata and unsupported-material failure details |
|
|
87
63
|
|
|
88
|
-
|
|
89
|
-
|
|
64
|
+
Material classification is orthogonal to domain. A code repository may describe
|
|
65
|
+
finance, education, legal, product operations, or another domain; a spreadsheet
|
|
66
|
+
may contain software planning, accounting, or sales operations.
|
|
90
67
|
|
|
91
|
-
##
|
|
68
|
+
## 4. Process Boundary
|
|
92
69
|
|
|
93
|
-
The
|
|
94
|
-
Runtime owns deterministic observation, validation, metrics, artifact refs, and
|
|
95
|
-
failure reporting.
|
|
96
|
-
|
|
97
|
-
Runtime must not write or generate:
|
|
98
|
-
|
|
99
|
-
- Ontology Seed content
|
|
100
|
-
- ontology entities, relations, actions, properties, or rules
|
|
101
|
-
- competency questions
|
|
102
|
-
- failure classifications
|
|
103
|
-
- decision logs
|
|
104
|
-
- revision proposals
|
|
105
|
-
- final ontology drafts
|
|
106
|
-
|
|
107
|
-
Runtime may return:
|
|
108
|
-
|
|
109
|
-
- source observations
|
|
110
|
-
- source profile metadata
|
|
111
|
-
- directive validation reports
|
|
112
|
-
- deterministic metrics
|
|
113
|
-
- source/artifact refs
|
|
114
|
-
- structured failures
|
|
115
|
-
|
|
116
|
-
Runtime gate failure never triggers automatic semantic repair. The host LLM must
|
|
117
|
-
revise the directive and resubmit it.
|
|
118
|
-
|
|
119
|
-
## 3. Concept Registration Gate
|
|
120
|
-
|
|
121
|
-
The names below are design-contract concepts. Before any TS runtime type,
|
|
122
|
-
artifact field, or MCP schema is introduced, each shared concept must either be
|
|
123
|
-
promoted to `.onto/authority/core-lexicon.yaml` or explicitly marked as
|
|
124
|
-
design-local in this contract.
|
|
125
|
-
|
|
126
|
-
Do not introduce a TypeScript type, public artifact field, or MCP field with a
|
|
127
|
-
new reconstruct concept name before this gate is closed.
|
|
128
|
-
|
|
129
|
-
Seat categories:
|
|
130
|
-
|
|
131
|
-
- `shared`: registered in `.onto/authority/core-lexicon.yaml` and reusable
|
|
132
|
-
across processes.
|
|
133
|
-
- `reconstruct-local runtime`: may appear in reconstruct artifacts or TS
|
|
134
|
-
implementation only under this contract.
|
|
135
|
-
- `reconstruct-local semantic artifact`: LLM-authored artifact shape; runtime
|
|
136
|
-
may validate it but must not author its meaning.
|
|
137
|
-
- `directive shape`: structured LLM output name, not an ontology entity.
|
|
138
|
-
- `design shorthand`: prose-only helper term. It must not become a TS type,
|
|
139
|
-
MCP field, public artifact field, or runtime status value.
|
|
140
|
-
|
|
141
|
-
Current concept decisions:
|
|
142
|
-
|
|
143
|
-
| Name | Decision | Reason |
|
|
144
|
-
|---|---|---|
|
|
145
|
-
| `target_material_kind` | promoted shared term | Review, reconstruct, and evolve all need a target-material axis that is separate from domain, medium, target input kind, and artifact role. |
|
|
146
|
-
| `PipelineExecutionLedger` | promoted shared term | Review, reconstruct, evolve, and later pipelines need the same runtime-owned artifact trust/provenance projection. |
|
|
147
|
-
| `source_kind` | not used for material classification | Review already uses `source_kind` for context-source artifacts. Reconstruct must not overload it to mean code/spreadsheet/document/database. |
|
|
148
|
-
| `SourceProfile` | reconstruct-local runtime contract | A profile guides observation for one `target_material_kind`; it is not a semantic explorer. Public meaning is limited to the profile files under `.onto/processes/reconstruct/source-profiles/`. |
|
|
149
|
-
| `SourceObservation` | reconstruct-local runtime artifact | Runtime-produced structural observation with stable ids; not an ontology fact and not legacy `fact_type`. |
|
|
150
|
-
| `SourceAdapter` | implementation boundary | Adapter identity may appear in artifacts later, but it is not an entity. |
|
|
151
|
-
| `ExplorationRound` | reconstruct-local runtime grouping | One bounded observe → lens judgment → synthesis → frontier cycle. It groups artifacts but does not own semantic truth. |
|
|
152
|
-
| `ReconstructLensJudgment` | reconstruct-local semantic artifact | LLM lens output that labels observations, names gaps, refines evidence certainty, and proposes next-source needs without directly traversing source. |
|
|
153
|
-
| `ExplorationSynthesis` | reconstruct-local semantic artifact | Host LLM synthesis that integrates lens judgments into a round result and source frontier without adding a new independent perspective. |
|
|
154
|
-
| `SourceFrontier` | reconstruct-local semantic artifact plus runtime validation | LLM-authored list of unjudged source refs requested for the next observation round, validated by runtime for boundary, support, duplication, and judgment coverage identity. |
|
|
155
|
-
| `ReconstructDirective` | directive shape | LLM-authored directive envelope, not an entity. |
|
|
156
|
-
| `OntologySeed` | reconstruct-local semantic artifact until promoted | Evidence-backed execution meaning contract confirmed by the user. Runtime may validate shape and refs but must not generate Seed meaning. |
|
|
157
|
-
| `SeedConfirmation` | reconstruct-local semantic artifact | User/host-mediated confirmation artifact for a Seed candidate; not a semantic concept by itself. |
|
|
158
|
-
| `CompetencyQuestion` | shared ontology-design term, reconstruct-local artifact instances | The term exists in core lexicon; reconstruct owns run-specific `competency-questions.yaml` artifact instances. |
|
|
159
|
-
| `ClaimRealization` | reconstruct-local semantic artifact | Claim-level stance about whether a Seed claim is observed behavior, declared intent, contract presence, fixture-only evidence, deferred/non-goal, or unknown. |
|
|
160
|
-
| `CompetencyQuestionAssessment` | reconstruct-local semantic artifact | LLM-authored assessment of every authoritative competency question against the confirmed Seed and evidence. |
|
|
161
|
-
| `FailureClassification` | reconstruct-local semantic artifact | LLM-authored explanation of why a competency question or claim cannot be trusted for the declared purpose. |
|
|
162
|
-
| `RevisionProposal` | reconstruct-local semantic artifact | LLM-authored bounded proposal to reuse, extend, rename, split, reject, or defer ontology content. |
|
|
163
|
-
| `ReconstructMetrics` | reconstruct design-local | Runtime projection from existing artifacts; counts and pass rates, not a quality judgment. |
|
|
164
|
-
| `StopDecision` | reconstruct design-local | LLM-authored directive that interprets metrics for the declared purpose. |
|
|
165
|
-
| `ReconstructRunManifest` | reconstruct design-local | Runtime execution manifest for reconstruct runs. |
|
|
166
|
-
| `FinalOutput` | shared artifact role, reconstruct-local seat | Human-readable result text grounded in reconstruct artifacts; not an ontology draft authority. |
|
|
167
|
-
| `ReconstructStageId` | reconstruct design-local | Stable append-only stage identifier for progress, manifests, status reads, and implementation planning. |
|
|
168
|
-
| `RuntimeGate` | design shorthand only | Runtime implementation must use named validation stages, boundary policy, and failure artifacts instead of a generic public concept. |
|
|
169
|
-
| `DomainContextPack` | design shorthand only | Use `domain-context-selection.yaml`, selected domain-document refs, and invocation binding rather than creating a new domain context entity. |
|
|
170
|
-
|
|
171
|
-
## 4. Registered And Reconstruct-Local Terms
|
|
172
|
-
|
|
173
|
-
| Concept | Meaning | Owner |
|
|
174
|
-
|---|---|---|
|
|
175
|
-
| `TargetMaterialKind` | Shared runtime axis for how the target must be read or validated: `code`, `spreadsheet`, `document`, `database`, `mixed`, or `unknown` | `.onto/authority/core-lexicon.yaml` |
|
|
176
|
-
| `OntologySeed` | Smallest evidence-backed execution meaning contract confirmed by the user; reconstruct-local until promoted to shared lexicon | LLM authored, user confirmed |
|
|
177
|
-
| `SourceProfile` | Reconstruct-local observation profile for one `target_material_kind` | `.onto/processes/reconstruct/source-profiles/` |
|
|
178
|
-
| `SourceAdapter` | Runtime observer that returns material structure without ontology meaning | TS runtime |
|
|
179
|
-
| `SourceObservation` | Runtime-produced structural fact about paths, cells, formulas, schemas, headings, symbols, or code patterns | TS runtime |
|
|
180
|
-
| `ExplorationRound` | Bounded cycle that observes a source slice, runs reconstruct lens judgments, synthesizes gaps, and validates the next source frontier | runtime manifest plus host LLM artifacts |
|
|
181
|
-
| `ReconstructLensJudgment` | Lens-authored semantic judgment over observed source evidence, including candidate labels, gaps, certainty refinements, and next-source needs | host LLM |
|
|
182
|
-
| `ExplorationSynthesis` | Integrated round result that preserves lens disagreements and converts accepted gaps into a source frontier | host LLM |
|
|
183
|
-
| `SourceFrontier` | Synthesized request for the next unjudged source refs to observe, including rationale, priority, and expected evidence value | host LLM authored, runtime validated |
|
|
184
|
-
| `ReconstructDirective` | LLM-authored structured output submitted to a runtime gate | host LLM |
|
|
185
|
-
| `SeedConfirmation` | User/host-mediated decision over the Seed candidate before downstream questions and metrics | user/host mediated |
|
|
186
|
-
| `ClaimRealization` | Claim-level evidence stance used to separate observed runtime behavior from declared design intent, schema presence, fixture-only evidence, deferred scope, and unknowns | host LLM |
|
|
187
|
-
| `CompetencyQuestion` | Authoritative question set used to test the confirmed Seed for its declared purpose | host LLM |
|
|
188
|
-
| `CompetencyQuestionAssessment` | Answer status and evidence basis for every authoritative competency question | host LLM |
|
|
189
|
-
| `FailureClassification` | Cause classification for unanswered, contradicted, unsupported, or deferred questions and claims | host LLM |
|
|
190
|
-
| `RevisionProposal` | Bounded change proposal derived from failures and claim realization gaps | host LLM |
|
|
191
|
-
| `ReconstructMetrics` | Deterministic projection from validation, confirmation, and question artifacts | TS runtime |
|
|
192
|
-
| `ReconstructRunManifest` | Step and artifact-ref manifest for reconstruct runs | TS runtime |
|
|
193
|
-
| `PipelineExecutionLedger` | Shared trust/provenance projection over reconstruct stages, validations, outputs, and upstream/downstream boundaries | TS runtime |
|
|
194
|
-
|
|
195
|
-
Design shorthand names such as `RuntimeGate` and `DomainContextPack` may appear
|
|
196
|
-
in explanatory prose only. Runtime and MCP schemas must expose the specific
|
|
197
|
-
stage or artifact names instead, such as
|
|
198
|
-
`seed-candidate-validation.yaml`, `domain-context-selection.yaml`, or
|
|
199
|
-
`source-frontier-validation.yaml`.
|
|
200
|
-
|
|
201
|
-
The domain axis and material axis must not be collapsed:
|
|
202
|
-
|
|
203
|
-
| Axis | Example values | Question answered |
|
|
204
|
-
|---|---|---|
|
|
205
|
-
| `domain` | accounting, software-engineering, legal, product | What is the target about? |
|
|
206
|
-
| `target_material_kind` | code, spreadsheet, document, database, mixed | How must the target be read and validated? |
|
|
207
|
-
| `target_input_kind` | single_file, directory, explicit_bundle, git_diff | How did the target enter the runtime? |
|
|
208
|
-
| `artifact_roles` | data_artifact, contract_artifact, computational_artifact | What responsibility does the artifact carry in the current run? |
|
|
209
|
-
|
|
210
|
-
## 5. MCP Tools
|
|
211
|
-
|
|
212
|
-
Initial bounded tools are exposed through `src/core-api/reconstruct-api.ts`.
|
|
213
|
-
|
|
214
|
-
| Tool | Status | Runtime responsibility | Explicit non-responsibility |
|
|
215
|
-
|---|---|---|---|
|
|
216
|
-
| `onto.list_source_profiles` | active | list source profiles, target material kinds, scan targets, and support status | choose ontology meaning |
|
|
217
|
-
| `onto.observe_source` | active | materialize target profile, inventory, source observations, and initial reconstruct record for the bound target or a validated frontier | infer entities, relations, actions, properties, or rules |
|
|
218
|
-
| `onto.validate_reconstruct_directive` | active | validate LLM-authored source-observation or Seed-candidate directive shape and evidence refs | repair or rewrite the directive |
|
|
219
|
-
| `onto.reconstruct` | active | orchestrate the bounded artifact-backed path from target refs and intent through direct-call semantic authoring, runtime validation gates, final output, run manifest, and reconstruct record | author ontology meaning |
|
|
220
|
-
| `onto.reconstruct_status` | active | read `reconstruct-record.yaml` stage and artifact refs | infer missing semantic content |
|
|
221
|
-
| `onto.reconstruct_result` | active | read record, run manifest, and final output text | rewrite or improve the result |
|
|
222
|
-
|
|
223
|
-
MCP remains a thin tool surface. It must expose bounded runtime facts and prompt
|
|
224
|
-
inputs for host presentation; it must not become a second reconstruct semantics
|
|
225
|
-
implementation.
|
|
226
|
-
|
|
227
|
-
Current `onto.reconstruct` calls default to
|
|
228
|
-
`semanticAuthorRealization=direct_call` and
|
|
229
|
-
`confirmationProviderRealization=direct_call`. The run manifest records both
|
|
230
|
-
realization values. Missing provider/model/credential configuration, invalid
|
|
231
|
-
LLM-authored artifact shape, and failed runtime validation gates fail loud.
|
|
232
|
-
Test-only mock helpers may exist inside tests, but they are not product
|
|
233
|
-
completion evidence.
|
|
234
|
-
|
|
235
|
-
### 5.1 Execution Profile Truth
|
|
236
|
-
|
|
237
|
-
The run manifest must record an execution profile. These profile labels are
|
|
238
|
-
manifest/status values, not ontology concepts.
|
|
239
|
-
|
|
240
|
-
| Profile | Completion claim allowed | Required disclosure |
|
|
241
|
-
|---|---|---|
|
|
242
|
-
| `observer_gate_slice` | Runtime classified material, inventoried sources, observed structure, and validated available directive refs. | No Seed, lens judgment, domain context, frontier, CQ, revision, or final ontology direction may be implied. |
|
|
243
|
-
| `mock_semantic_slice` | Test/fixture-only harness exercised post-Seed artifact flow with mock semantic author and mock confirmation provider. | Mock authorship, skipped live exploration, skipped domain-context selection, skipped user confirmation, and narrowed downstream authority must be visible in manifest, status, result, and final output. This profile is not product completion evidence. |
|
|
244
|
-
| `full_integral_exploration` | Trusted observation, lens judgment, source frontier, domain-context, Seed, confirmation, CQ, assessment, failure, revision, metrics, stop, and final-output artifacts were produced or explicitly skipped with trusted reasons. | Every skipped or deferred stage must have stage status, reason, and downstream authority impact. |
|
|
245
|
-
|
|
246
|
-
A status of `completed` always means "completed for this execution profile".
|
|
247
|
-
It must not be rendered as completed full reconstruct unless the execution
|
|
248
|
-
profile is `full_integral_exploration` and all required stage trust gates pass.
|
|
249
|
-
|
|
250
|
-
## 6. Invocation And Boundary Prelude
|
|
251
|
-
|
|
252
|
-
Every reconstruct run starts with the same entrypoint split used by review:
|
|
253
|
-
|
|
254
|
-
1. `InvocationInterpretation`: the host LLM interprets the natural-language
|
|
255
|
-
request into target candidates, target material candidates, intended outcome,
|
|
256
|
-
and ambiguity.
|
|
257
|
-
2. `InvocationBinding`: runtime binds the interpreted request into canonical
|
|
258
|
-
target refs, filesystem or connection boundaries, write policy, and source
|
|
259
|
-
profile candidates.
|
|
260
|
-
|
|
261
|
-
Only after binding is complete may target material profiling and source
|
|
262
|
-
inventory begin. Runtime may use deterministic evidence to set
|
|
263
|
-
`target_material_kind` to `unknown` rather than guessing. This keeps reconstruct
|
|
264
|
-
aligned with the existing invocation convention and prevents source adapters
|
|
265
|
-
from expanding their own boundary.
|
|
266
|
-
|
|
267
|
-
## 7. Canonical Flow
|
|
70
|
+
The reconstruct process is an evidence loop with semantic authoring gates:
|
|
268
71
|
|
|
269
72
|
```text
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
6. Runtime validates domain-context selection and source snapshot refs
|
|
285
|
-
7. LLM writes SeedCandidateDirective from trusted observation and judgment artifacts
|
|
286
|
-
8. Runtime validates Seed evidence and shape
|
|
287
|
-
9. LLM writes ClaimRealizationDirective
|
|
288
|
-
10. Runtime validates claim realization refs and stance enums
|
|
289
|
-
11. User or host confirms Seed claims at claim level
|
|
290
|
-
12. Runtime validates confirmation transitions and derived claim sets
|
|
291
|
-
13. LLM writes authoritative competency questions
|
|
292
|
-
14. Runtime validates competency question ids, claim links, and evidence refs
|
|
293
|
-
15. LLM assesses every authoritative competency question
|
|
294
|
-
16. Runtime validates question assessment completeness and refs
|
|
295
|
-
17. LLM classifies material failures and unresolved gaps
|
|
296
|
-
18. Runtime validates failure classifications and linkage
|
|
297
|
-
19. LLM proposes bounded revisions or deferrals
|
|
298
|
-
20. Runtime validates revision proposal ids, targets, and actions
|
|
299
|
-
21. Runtime computes deterministic metrics from artifacts
|
|
300
|
-
22. LLM writes StopDecisionDirective
|
|
301
|
-
23. LLM writes final decision-ready output grounded in artifact refs
|
|
302
|
-
24. User confirms final ontology direction if needed
|
|
73
|
+
target refs
|
|
74
|
+
-> target material profile
|
|
75
|
+
-> source inventory
|
|
76
|
+
-> source observations
|
|
77
|
+
-> selected evidence directive
|
|
78
|
+
-> reconstruct lens judgments
|
|
79
|
+
-> exploration synthesis
|
|
80
|
+
-> next source frontier or source closure
|
|
81
|
+
-> candidate inventory and disposition
|
|
82
|
+
-> ActionableOntologySeed
|
|
83
|
+
-> competency questions and assessment
|
|
84
|
+
-> seed, question, assessment, confirmation, and handoff validation gates
|
|
85
|
+
-> failure classification and revision proposal
|
|
86
|
+
-> final output and reconstruct record
|
|
303
87
|
```
|
|
304
88
|
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
| Stage id | Required artifact boundary | Owner |
|
|
315
|
-
|---|---|---|
|
|
316
|
-
| `invocation_binding` | interpretation and binding refs | host LLM plus runtime |
|
|
317
|
-
| `target_material_profile` | `target-material-profile.yaml` | runtime |
|
|
318
|
-
| `source_inventory` | `source-inventory.yaml` | runtime |
|
|
319
|
-
| `initial_source_frontier` | `initial-source-frontier.yaml` | runtime |
|
|
320
|
-
| `source_observation` | `source-observations.yaml` | runtime |
|
|
321
|
-
| `observation_directive` | `rounds/{round_id}/source-observation-directive.yaml` | host LLM |
|
|
322
|
-
| `observation_directive_validation` | `rounds/{round_id}/source-observation-directive-validation.yaml` | runtime |
|
|
323
|
-
| `lens_judgment` | `rounds/{round_id}/lens-judgments/{lens_id}.yaml` | host LLM |
|
|
324
|
-
| `exploration_synthesis` | `rounds/{round_id}/exploration-synthesis.yaml` | host LLM |
|
|
325
|
-
| `source_frontier` | `rounds/{round_id}/source-frontier.yaml` | host LLM |
|
|
326
|
-
| `source_frontier_validation` | `rounds/{round_id}/source-frontier-validation.yaml` | runtime |
|
|
327
|
-
| `domain_context_selection` | `domain-context-selection.yaml` | host LLM |
|
|
328
|
-
| `domain_context_selection_validation` | `domain-context-selection-validation.yaml` | runtime |
|
|
329
|
-
| `seed_candidate` | `seed-candidate.yaml` | host LLM |
|
|
330
|
-
| `seed_candidate_validation` | `seed-candidate-validation.yaml` | runtime |
|
|
331
|
-
| `claim_realization` | `claim-realization-map.yaml` | host LLM |
|
|
332
|
-
| `claim_realization_validation` | `claim-realization-map-validation.yaml` | runtime |
|
|
333
|
-
| `seed_confirmation` | `seed-confirmation.yaml` | user/host mediated |
|
|
334
|
-
| `seed_confirmation_validation` | `seed-confirmation-validation.yaml` | runtime |
|
|
335
|
-
| `competency_questions` | `competency-questions.yaml` | host LLM |
|
|
336
|
-
| `competency_questions_validation` | `competency-questions-validation.yaml` | runtime |
|
|
337
|
-
| `competency_question_assessment` | `competency-question-assessment.yaml` | host LLM |
|
|
338
|
-
| `competency_question_assessment_validation` | `competency-question-assessment-validation.yaml` | runtime |
|
|
339
|
-
| `failure_classification` | `failure-classification.yaml` | host LLM |
|
|
340
|
-
| `failure_classification_validation` | `failure-classification-validation.yaml` | runtime |
|
|
341
|
-
| `revision_proposal` | `revision-proposal.yaml` | host LLM |
|
|
342
|
-
| `revision_proposal_validation` | `revision-proposal-validation.yaml` | runtime |
|
|
343
|
-
| `metrics` | `reconstruct-metrics.yaml` | runtime |
|
|
344
|
-
| `stop_decision` | `stop-decision.yaml` | host LLM |
|
|
345
|
-
| `final_output` | `final-output.md` | host LLM |
|
|
346
|
-
| `record_assembly` | `reconstruct-record.yaml` and `reconstruct-run-manifest.yaml` | runtime |
|
|
347
|
-
|
|
348
|
-
Rules:
|
|
349
|
-
|
|
350
|
-
- Existing stage ids must not be renamed after runtime exposure.
|
|
351
|
-
- Optional stages must be recorded as `skipped` with a reason, not omitted from
|
|
352
|
-
the manifest.
|
|
353
|
-
- Skipped stages must record `authority_impact`, especially when skipping live
|
|
354
|
-
lens judgment, source-frontier exploration, domain-context selection, user
|
|
355
|
-
confirmation, or CQ assessment narrows the final result's trust claim.
|
|
356
|
-
- Terminal halted stages must keep already-produced artifacts immutable unless a
|
|
357
|
-
future explicit continuation contract says otherwise.
|
|
358
|
-
- New stages may be appended between semantic phases only when their input and
|
|
359
|
-
output artifact authority is explicit.
|
|
360
|
-
|
|
361
|
-
### 7.2 Pipeline Execution Unit Ledger
|
|
362
|
-
|
|
363
|
-
Reconstruct must map every `ReconstructStageId` into the shared
|
|
364
|
-
`PipelineExecutionLedger` contract. The ledger verifies artifact trust and
|
|
365
|
-
provenance for both runtime-owned and LLM-authored stages.
|
|
366
|
-
|
|
367
|
-
Rules:
|
|
368
|
-
|
|
369
|
-
- Runtime validation stages are trust gates for LLM-authored artifacts.
|
|
370
|
-
- An LLM-authored artifact may exist while its `trustStatus` remains
|
|
371
|
-
`untrusted` until the corresponding validation stage completes.
|
|
372
|
-
- A downstream stage is `blocked_by_upstream` if any required source artifact is
|
|
373
|
-
missing, failed validation, or belongs to an untrusted producing stage.
|
|
374
|
-
- `reconstruct_status` should expose the ledger, or a bounded projection of it,
|
|
375
|
-
so callers can see which artifacts are trustworthy and where the pipeline
|
|
376
|
-
halted.
|
|
377
|
-
- Future reconstruct continuation must derive its frontier from this ledger, not
|
|
378
|
-
from ad hoc file existence.
|
|
379
|
-
|
|
380
|
-
The shared contract is
|
|
381
|
-
`.onto/processes/shared/pipeline-execution-ledger-contract.md`.
|
|
382
|
-
|
|
383
|
-
### 7.3 Identifier Authority
|
|
384
|
-
|
|
385
|
-
Every cross-artifact reference must point back to one authority artifact. Derived
|
|
386
|
-
views may expose ids, but must not become a second source of truth.
|
|
387
|
-
|
|
388
|
-
| Id family | Authority artifact |
|
|
389
|
-
|---|---|
|
|
390
|
-
| initial source frontier ids | `initial-source-frontier.yaml` |
|
|
391
|
-
| source observation ids | `source-observations.yaml` |
|
|
392
|
-
| selected observation ids | `rounds/{round_id}/source-observation-directive.yaml` |
|
|
393
|
-
| exploration round ids | `reconstruct-run-manifest.yaml` |
|
|
394
|
-
| lens judgment ids | `rounds/{round_id}/lens-judgments/{lens_id}.yaml` |
|
|
395
|
-
| source frontier ids | `rounds/{round_id}/source-frontier.yaml` |
|
|
396
|
-
| domain context ids and `domain_snapshot_id` | `domain-context-selection.yaml` |
|
|
397
|
-
| Seed claim ids | `seed-candidate.yaml` |
|
|
398
|
-
| claim realization ids | `claim-realization-map.yaml` |
|
|
399
|
-
| confirmation-derived claim sets | `seed-confirmation-validation.yaml` |
|
|
400
|
-
| competency question ids | `competency-questions.yaml` |
|
|
401
|
-
| competency question result ids | `competency-question-assessment.yaml` |
|
|
402
|
-
| failure ids | `failure-classification.yaml` |
|
|
403
|
-
| proposal ids | `revision-proposal.yaml` |
|
|
404
|
-
|
|
405
|
-
### 7.4 Integral Exploration Loop
|
|
406
|
-
|
|
407
|
-
An exploration round is the smallest repeatable reconstruct unit. It starts from
|
|
408
|
-
a runtime-validated source frontier and ends with either a validated next
|
|
409
|
-
frontier or a declared no-next-frontier rationale.
|
|
410
|
-
|
|
411
|
-
Round rules:
|
|
412
|
-
|
|
413
|
-
- Lenses may request additional source refs, but they must not fetch those refs
|
|
414
|
-
directly.
|
|
415
|
-
- Source frontier requests must cite the judgment or gap that created the need,
|
|
416
|
-
the expected evidence value, and the material kind if known.
|
|
417
|
-
- Runtime validates frontier refs for declared boundary, existing inventory or
|
|
418
|
-
discoverability, material support, duplicate observation, duplicate judgment,
|
|
419
|
-
and unsafe broadness.
|
|
420
|
-
- Runtime records accepted, rejected, already-observed, unsupported, and
|
|
421
|
-
out-of-bound frontier refs separately.
|
|
422
|
-
- A source ref is considered unjudged only when no trusted lens judgment has
|
|
423
|
-
already covered the relevant observation scope for the declared purpose.
|
|
424
|
-
- Accumulated Seed evidence may use only trusted observations, validated
|
|
425
|
-
observation directives, trusted lens judgments, and validated frontier records.
|
|
426
|
-
|
|
427
|
-
Frontier validation must record enough identity data to explain duplicate,
|
|
428
|
-
stale, repeat, and re-exploration decisions:
|
|
429
|
-
|
|
430
|
-
- canonical source ref key
|
|
431
|
-
- material kind
|
|
432
|
-
- adapter id and adapter version or profile version
|
|
433
|
-
- source snapshot hash or source mtime/hash basis when available
|
|
434
|
-
- observation scope key
|
|
435
|
-
- profile id and profile version
|
|
436
|
-
- lens set id and lens prompt version when a judgment is involved
|
|
437
|
-
- domain snapshot id when domain context has been selected
|
|
438
|
-
- declared purpose scope id or normalized purpose summary
|
|
439
|
-
- prior trusted observation refs and judgment refs used for the decision
|
|
440
|
-
|
|
441
|
-
The loop may pause or halt when the next useful source is outside the declared
|
|
442
|
-
boundary, unsupported by adapters, too broad to validate safely, or requires a
|
|
443
|
-
user decision. A no-next-frontier rationale is an LLM-authored judgment, not a
|
|
444
|
-
runtime quality decision.
|
|
445
|
-
|
|
446
|
-
### 7.5 Claim Realization Stances
|
|
447
|
-
|
|
448
|
-
`claim-realization-map.yaml` must classify every Seed claim with one of these
|
|
449
|
-
stances:
|
|
450
|
-
|
|
451
|
-
| Stance | Meaning |
|
|
452
|
-
|---|---|
|
|
453
|
-
| `observed_runtime_behavior` | The claim is supported by observed behavior in the target material. |
|
|
454
|
-
| `declared_design_intent` | The claim is stated as design or product intent, but runtime behavior is not directly observed. |
|
|
455
|
-
| `schema_or_contract_presence` | The claim is supported by a schema, type, contract, config, or interface boundary. |
|
|
456
|
-
| `test_or_fixture_only` | The claim is supported only by tests, fixtures, mocks, or examples. |
|
|
457
|
-
| `deferred_or_non_goal` | The claim belongs to deferred scope or a declared non-goal. |
|
|
458
|
-
| `unknown` | The available artifacts do not justify a stronger stance. |
|
|
89
|
+
Source exploration may repeat while the host LLM identifies unobserved source
|
|
90
|
+
refs that could change actionable seed content. Runtime validates the requested
|
|
91
|
+
frontier before observing additional source. Frontier-triggered observations
|
|
92
|
+
must carry round lineage before they can be used by later semantic authoring.
|
|
93
|
+
|
|
94
|
+
## 5. Active Artifacts
|
|
95
|
+
|
|
96
|
+
The canonical reconstruct session root is `.onto/reconstruct/<session-id>/`.
|
|
459
97
|
|
|
460
|
-
|
|
98
|
+
The complete artifact authority catalog is registry-owned at
|
|
99
|
+
`reconstruct-contract-registry.yaml#artifact_authorities`. This boundary groups
|
|
100
|
+
artifact responsibilities only:
|
|
461
101
|
|
|
462
|
-
|
|
463
|
-
|
|
102
|
+
- runtime preparation and observation artifacts;
|
|
103
|
+
- LLM-authored semantic artifacts;
|
|
104
|
+
- runtime validation artifacts;
|
|
105
|
+
- conditional proof authorities for query, visualization, and graph exploration;
|
|
106
|
+
- terminal handoff, final output, manifest, and record projections.
|
|
107
|
+
|
|
108
|
+
If implementation still writes a different artifact name, that name is an
|
|
109
|
+
implementation mismatch to remove before this contract can be called complete.
|
|
464
110
|
|
|
465
|
-
|
|
111
|
+
## 6. Seed Boundary
|
|
112
|
+
|
|
113
|
+
The primary semantic artifact is `ontology-seed.yaml`.
|
|
114
|
+
|
|
115
|
+
Its target shape is defined by
|
|
116
|
+
`.onto/processes/reconstruct/foundry-style-ontology-seed-contract.md`.
|
|
117
|
+
|
|
118
|
+
The seed must include these layers:
|
|
119
|
+
|
|
120
|
+
- `seed_identity`
|
|
121
|
+
- `purpose`
|
|
122
|
+
- `decision_context`
|
|
123
|
+
- `conceptual_frame`
|
|
124
|
+
- `semantic_layer`
|
|
125
|
+
- `kinetic_layer`
|
|
126
|
+
- `dynamic_layer`
|
|
127
|
+
- `data_binding_layer`
|
|
128
|
+
- `validation_layer`
|
|
129
|
+
- `candidate_disposition_authority_ref`
|
|
130
|
+
- `ontology_handoff`
|
|
131
|
+
- `source_authority`
|
|
132
|
+
- `handoff_limitations`
|
|
133
|
+
|
|
134
|
+
The conceptual frame orients the reader. It does not replace object, actor,
|
|
135
|
+
action, workflow, permission, and data-binding content.
|
|
136
|
+
|
|
137
|
+
## 7. Candidate Disposition Boundary
|
|
138
|
+
|
|
139
|
+
High-salience candidates must not disappear.
|
|
140
|
+
|
|
141
|
+
When source evidence suggests a possible object, actor, action, workflow,
|
|
142
|
+
permission, data source, constraint, or domain concept, the seed must either
|
|
143
|
+
promote it into a layer or record why it is represented differently.
|
|
144
|
+
|
|
145
|
+
Allowed root dispositions and their meanings are owned by
|
|
146
|
+
`reconstruct-contract-registry.yaml#candidate_disposition_registry`. This
|
|
147
|
+
boundary document does not carry an independent disposition enum.
|
|
148
|
+
|
|
149
|
+
Every disposition needs a rationale and evidence refs.
|
|
150
|
+
|
|
151
|
+
`candidate-inventory.yaml` and `candidate-disposition.yaml` are the canonical
|
|
152
|
+
candidate authority seats. `ontology-seed.yaml` may only reference them through
|
|
153
|
+
`candidate_disposition_authority_ref`; it must not restate a second independent
|
|
154
|
+
disposition ledger.
|
|
155
|
+
|
|
156
|
+
## 8. Exploration Lineage Boundary
|
|
157
|
+
|
|
158
|
+
Repeated exploration is round-scoped. The current active runtime validates the
|
|
159
|
+
requested source frontier before use. Multi-round observation delta and re-entry
|
|
160
|
+
validation are planned authority seats until their validators are implemented
|
|
161
|
+
and promoted in `reconstruct-contract-registry.yaml`.
|
|
162
|
+
|
|
163
|
+
When `rounds/<round-id>/source-frontier.yaml` requests additional source refs,
|
|
164
|
+
runtime writes `rounds/<round-id>/source-observation-delta.yaml` after
|
|
165
|
+
observation. That delta must record:
|
|
166
|
+
|
|
167
|
+
- `round_id`
|
|
168
|
+
- `observation_batch_id`
|
|
169
|
+
- `triggering_frontier_ref`
|
|
170
|
+
- observed source refs
|
|
171
|
+
- created or updated observation ids
|
|
172
|
+
- validation ref for the frontier that authorized the observation
|
|
173
|
+
|
|
174
|
+
Each new observation record in `source-observations.yaml` must carry the same
|
|
175
|
+
`observation_batch_id` and `round_id`. Later directives, lens judgments,
|
|
176
|
+
exploration synthesis, candidate inventory, and seed artifacts must reference
|
|
177
|
+
the relevant observation ids. A run cannot finalize candidate inventory from
|
|
178
|
+
frontier-triggered evidence until that evidence has re-entered directive,
|
|
179
|
+
lens judgment, and synthesis.
|
|
180
|
+
|
|
181
|
+
`source-observation-delta.yaml` is lineage evidence, not gate truth. When the
|
|
182
|
+
planned multi-round validators are promoted, runtime writes
|
|
183
|
+
`rounds/<round-id>/source-observation-delta-validation.yaml` as the pass/fail
|
|
184
|
+
authority for `round_lineage_gate`. That validation artifact must check that
|
|
185
|
+
the delta cites an accepted frontier validation, every created or updated
|
|
186
|
+
observation exists, and round and batch ids match before downstream semantic
|
|
187
|
+
use.
|
|
188
|
+
|
|
189
|
+
`source_frontier_gate` must validate duplicate status against
|
|
190
|
+
`source-observations.yaml` as well as inventory bounds.
|
|
191
|
+
The planned `observation_reentry_gate` must declare the downstream re-entry
|
|
192
|
+
authorities it checks, including lens judgments, exploration synthesis,
|
|
193
|
+
candidate inventory/disposition, and seed validation artifacts.
|
|
194
|
+
|
|
195
|
+
## 9. Validation Boundary
|
|
196
|
+
|
|
197
|
+
Runtime validates structure, closure, and evidence. It does not validate truth by
|
|
198
|
+
inventing semantic content.
|
|
199
|
+
|
|
200
|
+
Active runtime gates are the entries in
|
|
201
|
+
`reconstruct-contract-registry.yaml#validation_gate_catalog`. This document does
|
|
202
|
+
not duplicate the active gate catalog; prose here explains boundary intent only.
|
|
203
|
+
|
|
204
|
+
Planned gates are kept in
|
|
205
|
+
`reconstruct-contract-registry.yaml#planned_validation_gate_catalog` and do not
|
|
206
|
+
block current handoff until promoted. That planned set includes
|
|
207
|
+
`round_lineage_gate`, `observation_reentry_gate`,
|
|
208
|
+
`ontology_handoff_mapping_gate`, query proof, visualization proof, graph
|
|
209
|
+
exploration proof, and explicit required-when-evaluation gates.
|
|
210
|
+
|
|
211
|
+
Non-terminal gate failures must be visible in `reconstruct-record.yaml`, status
|
|
212
|
+
reads, and final output when `handoff_gate` passes and terminal projection is
|
|
213
|
+
emitted. A failed `handoff_gate` is visible through status/result failure
|
|
214
|
+
surfaces and `handoff-decision-validation.yaml`; it does not require
|
|
215
|
+
`final-output.md` or `reconstruct-record.yaml` to be emitted as successful
|
|
216
|
+
validated handoff projections. A failed gate may still produce a useful partial
|
|
217
|
+
result, but the handoff limitation must be explicit.
|
|
218
|
+
|
|
219
|
+
Gate status authority belongs only to runtime-owned validation artifacts. The
|
|
220
|
+
LLM-authored seed may state validation requirements and refs, but it must not
|
|
221
|
+
state pass/fail gate truth.
|
|
222
|
+
|
|
223
|
+
`reconstruct-contract-registry.yaml` is the canonical machine-readable authority
|
|
224
|
+
for active artifact seats, validation gate catalog, source profile records,
|
|
225
|
+
reconstruct lens judgment records, validator records, version policy, and
|
|
226
|
+
readiness projection. Prose contracts define the semantics; runtime uses the
|
|
227
|
+
registry to decide which artifacts and gates are active for dispatch,
|
|
228
|
+
validation, status projection, and record assembly. A fact artifact and a gate
|
|
229
|
+
artifact must remain separate whenever pass/fail truth has a lifecycle of its
|
|
230
|
+
own; `target-material-profile.yaml` records selected material facts, while
|
|
231
|
+
`target-material-profile-validation.yaml` records `material_profile_gate` truth.
|
|
232
|
+
|
|
233
|
+
Seed confirmation is a lifecycle-required gate for seed validity and handoff
|
|
234
|
+
readiness, not an artifact-existence-only gate. If confirmation or its runtime
|
|
235
|
+
validation is absent when readiness is projected, status/result surfaces must
|
|
236
|
+
project `blocked` unless a valid confirmation-validation artifact records an
|
|
237
|
+
explicit limitation state. Handoff validation must consume the validation-result
|
|
238
|
+
authorities that contribute to readiness, not only raw authored artifacts or
|
|
239
|
+
`reconstruct-record.yaml` projections.
|
|
240
|
+
Those contributing authorities are selected through the registry's
|
|
241
|
+
`required_when` conditions. Missing required-and-applicable validation artifacts
|
|
242
|
+
project `blocked`; conditional artifacts whose `required_when` condition is not
|
|
243
|
+
met project `not_applicable` and do not block handoff by themselves.
|
|
244
|
+
Runtime evaluates each `required_when` through the registry-owned predicate
|
|
245
|
+
catalog, including input artifact refs, field-level truth expressions, unknown
|
|
246
|
+
projection, and status explanation text.
|
|
247
|
+
If an active gate uses a predicate expression without runtime evaluator support,
|
|
248
|
+
handoff validation fails closed with an unknown gate projection. It must not
|
|
249
|
+
silently treat that gate as `not_applicable`.
|
|
250
|
+
Terminal `handoff-decision-validation.yaml` is produced by `handoff_gate`.
|
|
251
|
+
`final-output.md` and `reconstruct-record.yaml` are emitted after that validation
|
|
252
|
+
passes; they are projections from the validated terminal readiness result, not inputs to
|
|
253
|
+
`handoff-decision-validator`.
|
|
254
|
+
`final-output-provenance-validation.yaml` is a post-handoff projection check, not
|
|
255
|
+
an input to readiness projection.
|
|
256
|
+
Terminal handoff validation also requires
|
|
257
|
+
`reconstruct-run-manifest.pre-handoff-validation.yaml` so final projection cannot
|
|
258
|
+
rely on an unvalidated registry, contract, source-profile, validator,
|
|
259
|
+
reference-standard, version, or migration snapshot. The final
|
|
260
|
+
`reconstruct-run-manifest.post-publication-validation.yaml` is a post-publication audit for the
|
|
261
|
+
complete manifest after final output and record refs exist; it is not an input to
|
|
262
|
+
pre-handoff readiness projection.
|
|
263
|
+
Earlier validators consume only already-authored authorities. In particular,
|
|
264
|
+
`ontology-seed-validation.yaml` may validate expected competency coverage axes,
|
|
265
|
+
but it must not require downstream competency-question ids before the question
|
|
266
|
+
artifact is authored; later question validation closes question refs back to the
|
|
267
|
+
validated seed.
|
|
268
|
+
|
|
269
|
+
## 10. User-Facing Boundary
|
|
270
|
+
|
|
271
|
+
The result must be useful for decision and action planning.
|
|
272
|
+
|
|
273
|
+
The final output must show:
|
|
274
|
+
|
|
275
|
+
- what the seed says the target is for
|
|
276
|
+
- which objects, actors, actions, workflows, permissions, and data bindings were
|
|
277
|
+
found
|
|
278
|
+
- what can be trusted for the declared purpose
|
|
279
|
+
- what remains unsupported or uncertain
|
|
280
|
+
- what the next action should be
|
|
281
|
+
- which artifacts contain the structured authority
|
|
282
|
+
|
|
283
|
+
The final output must not present orientation concepts as if they were the full
|
|
284
|
+
ontology seed.
|
|
285
|
+
|
|
286
|
+
## 11. MCP Surface Boundary
|
|
287
|
+
|
|
288
|
+
MCP tools expose bounded reconstruct operations:
|
|
289
|
+
|
|
290
|
+
| Tool | Responsibility |
|
|
466
291
|
|---|---|
|
|
467
|
-
| `
|
|
468
|
-
| `
|
|
469
|
-
| `
|
|
470
|
-
| `
|
|
471
|
-
|
|
472
|
-
`
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
`
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
- reuse, extension, rename, split, reject, or defer decisions
|
|
508
|
-
- mapping or alignment to selected domain documents and existing lexicon terms
|
|
509
|
-
|
|
510
|
-
Runtime validates artifact shape, ids, and evidence refs for these dimensions.
|
|
511
|
-
Runtime must not infer the ontology meaning itself.
|
|
512
|
-
|
|
513
|
-
## 8. Prompt-Backed Reference Path
|
|
514
|
-
|
|
515
|
-
Before runtime replacement, reconstruct needs at least one prompt-backed
|
|
516
|
-
reference run that follows this contract and produces the same artifact shapes
|
|
517
|
-
planned for the runtime path.
|
|
518
|
-
|
|
519
|
-
The reference run may be host-LLM-authored, but it must preserve:
|
|
520
|
-
|
|
521
|
-
- the same invocation/binding prelude
|
|
522
|
-
- the same directive names
|
|
523
|
-
- the same artifact seats
|
|
524
|
-
- the same evidence-ref discipline
|
|
525
|
-
- the same runtime/non-runtime ownership boundary
|
|
526
|
-
- at least one observe → lens judgment → source frontier loop
|
|
527
|
-
- an acceptance observation describing usefulness, missing evidence, and drift
|
|
528
|
-
|
|
529
|
-
Runtime implementation may replace only one deterministic boundary at a time:
|
|
530
|
-
source profile loading, source observation, directive validation, metric
|
|
531
|
-
calculation, then MCP exposure.
|
|
532
|
-
|
|
533
|
-
## 9. Meaning Directives And Runtime Gates
|
|
534
|
-
|
|
535
|
-
| Directive | Purpose | Runtime gate |
|
|
536
|
-
|---|---|---|
|
|
537
|
-
| `SourceObservationDirective` | choose which runtime observations are evidence candidates for one round | observation id, material kind, source ref, round id, and location validation |
|
|
538
|
-
| `ReconstructLensJudgmentDirective` | label observations, identify semantic gaps, refine certainty, and request next-source needs from one lens perspective | lens id, observation refs, claim/gap ids, evidence refs, and no-direct-source-read validation |
|
|
539
|
-
| `ExplorationSynthesisDirective` | compose lens judgments into an integrated round result without adding a new independent perspective | source judgment refs, conflict handling refs, and preservation of minority/open gaps |
|
|
540
|
-
| `SourceFrontierDirective` | request unjudged source refs for the next observation round or declare no-next-frontier rationale | boundary, inventory, material support, duplicate, broadness, and expected-evidence validation |
|
|
541
|
-
| `DomainContextSelectionDirective` | choose domain documents and explain why | context existence, scope, and `domain_snapshot_id` validation |
|
|
542
|
-
| `SeedCandidateDirective` | propose purpose, non-goals, entities, relations, actions, properties, and rules with separate stable `claim_id` and user-facing `name` | schema shape, required non-generic claim name, prior observation-directive status, selected observation, and evidence ref validation |
|
|
543
|
-
| `ClaimRealizationDirective` | classify each Seed claim's evidence stance | claim id, stance enum, source/evidence ref, and rationale presence validation |
|
|
544
|
-
| `SeedConfirmationDirective` | record claim-level accepted, rejected, partial, or deferred confirmation | state transition, duplicate claim, missing claim, and derived-set validation |
|
|
545
|
-
| `CompetencyQuestionDirective` | define the authoritative execution question set and scope boundaries | duplicate id, closed question set, claim linkage, and evidence-ref validation |
|
|
546
|
-
| `CompetencyQuestionAssessmentDirective` | answer or mark every authoritative question | exactly-once question coverage, answer-state enum, claim linkage, and evidence-ref validation |
|
|
547
|
-
| `FailureClassificationDirective` | classify why a question or claim cannot be trusted for the declared purpose | enum, question/result linkage, claim linkage, and materiality rationale checks |
|
|
548
|
-
| `RevisionProposalDirective` | propose reuse, extend, rename, split, reject, or defer decisions | proposal id, target id, action enum, schema, and regression checks |
|
|
549
|
-
| `StopDecisionDirective` | decide continue, stop, or ask user based on metrics and purpose | metrics presence and enum validation |
|
|
550
|
-
| `FinalOutputDirective` | present decision-ready user-facing output | artifact provenance, section presence, and unresolved/deferred disclosure checks |
|
|
551
|
-
|
|
552
|
-
Every semantic claim in a Seed or revision proposal needs evidence refs. A claim
|
|
553
|
-
without evidence remains a hypothesis or open question.
|
|
554
|
-
|
|
555
|
-
Evidence mapping is not a separate authority unless this contract later adds an
|
|
556
|
-
explicit artifact seat for it. Evidence refs are owned by the artifact that makes
|
|
557
|
-
the claim, assessment, failure, proposal, or final-output statement. Any future
|
|
558
|
-
evidence-map view must be a projection over those owning artifacts and must not
|
|
559
|
-
duplicate evidence authority.
|
|
560
|
-
|
|
561
|
-
## 10. Artifact Truth
|
|
562
|
-
|
|
563
|
-
The reconstruct session should write artifacts under a dedicated session root,
|
|
564
|
-
following the review convention that primary truth lives in artifacts and MCP
|
|
565
|
-
returns bounded refs.
|
|
566
|
-
|
|
567
|
-
Current and provisional artifact contract:
|
|
568
|
-
|
|
569
|
-
| Artifact | Owner | Status | Purpose |
|
|
570
|
-
|---|---|---|---|
|
|
571
|
-
| `target-material-profile.yaml` | runtime | helper implemented | selected target material kind, candidates, confidence, selected source profiles, and unsupported-material status |
|
|
572
|
-
| `source-inventory.yaml` | runtime | helper implemented | selected source roots, material-specific inventory units, and scan boundaries |
|
|
573
|
-
| `initial-source-frontier.yaml` | runtime | implemented | initial frontier derived from invocation binding and source inventory; authority for the first observation frontier |
|
|
574
|
-
| `source-observations.yaml` | runtime | helper implemented | adapter id, material kind, location, structural data, and stable observation ids |
|
|
575
|
-
| `source-observation-directive.yaml` | LLM | helper implemented for current single-slice path; projection only after round artifacts exist | compatibility projection of selected observations and evidence-candidate rationale; must record projection metadata and no downstream authority when round-scoped artifacts exist |
|
|
576
|
-
| `source-observation-directive-validation.yaml` | runtime | helper implemented for current single-slice path; projection only after round artifacts exist | compatibility projection of validation status and violations; must record projection metadata and no downstream authority when round-scoped artifacts exist |
|
|
577
|
-
| `rounds/{round_id}/source-observation-directive.yaml` | LLM | implemented for round 1 | round-scoped selected observations and evidence-candidate rationale |
|
|
578
|
-
| `rounds/{round_id}/source-observation-directive-validation.yaml` | runtime | implemented for round 1 | round-scoped validation status and violations for LLM-selected observation refs |
|
|
579
|
-
| `rounds/{round_id}/lens-judgments/{lens_id}.yaml` | LLM | implemented for round 1 direct-call path | independent reconstruct lens judgment over trusted observations, including labels, gaps, certainty refinements, and source needs |
|
|
580
|
-
| `rounds/{round_id}/exploration-synthesis.yaml` | LLM | implemented for round 1 direct-call path | integrated round result that preserves conflicts and prepares frontier selection |
|
|
581
|
-
| `rounds/{round_id}/source-frontier.yaml` | LLM | implemented for round 1 direct-call path | requested next source refs, priorities, rationale, and no-next-frontier judgment |
|
|
582
|
-
| `rounds/{round_id}/source-frontier-validation.yaml` | runtime | implemented for round 1 direct-call path | accepted/rejected frontier refs with boundary, support, duplicate, and broadness validation |
|
|
583
|
-
| `domain-context-selection.yaml` | LLM | future | chosen domain context refs and rationale |
|
|
584
|
-
| `domain-context-selection-validation.yaml` | runtime | future | context existence, scope, and snapshot validation |
|
|
585
|
-
| `seed-candidate.yaml` | LLM | implemented through pluggable author | proposed Ontology Seed before user confirmation; every claim carries `claim_id`, `name`, `statement`, and evidence refs |
|
|
586
|
-
| `seed-candidate-validation.yaml` | runtime | helper implemented | validation status and violations for LLM-authored Seed claim shape, non-generic claim names, and observation evidence refs |
|
|
587
|
-
| `claim-realization-map.yaml` | LLM | implemented through pluggable direct-call author | evidence stance for every Seed claim |
|
|
588
|
-
| `claim-realization-map-validation.yaml` | runtime | implemented | claim id, stance enum, and evidence linkage validation |
|
|
589
|
-
| `seed-confirmation.yaml` | user/host mediated | implemented through pluggable direct-call provider | claim-level accepted, rejected, partial, or deferred Seed decisions |
|
|
590
|
-
| `seed-confirmation-validation.yaml` | runtime | implemented | confirmation transition validation and derived claim sets |
|
|
591
|
-
| `competency-questions.yaml` | LLM | implemented through pluggable author | authoritative execution questions and boundaries |
|
|
592
|
-
| `competency-questions-validation.yaml` | runtime | implemented | closed CQ set, duplicate id, eligible-claim coverage, claim-link, and evidence validation |
|
|
593
|
-
| `competency-question-assessment.yaml` | LLM | implemented through pluggable direct-call author | answer status and evidence basis for every authoritative question |
|
|
594
|
-
| `competency-question-assessment-validation.yaml` | runtime | implemented | exactly-once coverage, status enum, and evidence validation |
|
|
595
|
-
| `failure-classification.yaml` | LLM | implemented through pluggable direct-call author | failed or unsafe-to-trust question and claim causes |
|
|
596
|
-
| `failure-classification-validation.yaml` | runtime | implemented | failure enum, linkage, and materiality rationale validation |
|
|
597
|
-
| `revision-proposal.yaml` | LLM | implemented through pluggable direct-call author | bounded ontology changes, deferrals, or rejection proposals |
|
|
598
|
-
| `revision-proposal-validation.yaml` | runtime | implemented | proposal id, target id, action enum, and regression guard validation |
|
|
599
|
-
| `reconstruct-metrics.yaml` | runtime | implemented | deterministic counts and pass rates |
|
|
600
|
-
| `stop-decision.yaml` | LLM | implemented through pluggable author | continue, stop, or ask-user judgment |
|
|
601
|
-
| `final-output.md` | LLM | implemented through pluggable author and provenance-checked by runtime | user-facing result text grounded in artifacts |
|
|
602
|
-
| `reconstruct-run-manifest.yaml` | runtime assembly | implemented | step list, owner boundary, performed-by provenance, happy-path scope, artifact refs, and execution profile |
|
|
603
|
-
| `reconstruct-record.yaml` | runtime assembly | implemented, primary artifact | primary structured reconstruct artifact with material, validation, and artifact refs |
|
|
604
|
-
|
|
605
|
-
These artifact names are provisional but contract-owned. Runtime implementation
|
|
606
|
-
must either implement this contract or update this contract before code lands.
|
|
607
|
-
Runtime code must not silently fix a different schema.
|
|
608
|
-
|
|
609
|
-
The current direct-call runtime path explicitly implements:
|
|
610
|
-
|
|
611
|
-
- target material profile, inventory, initial source frontier, and source observations
|
|
612
|
-
- source-observation directive plus validation
|
|
613
|
-
- round 1 reconstruct lens judgments
|
|
614
|
-
- exploration synthesis
|
|
615
|
-
- source-frontier selection plus validation
|
|
616
|
-
- Seed candidate plus validation
|
|
617
|
-
- claim realization plus validation
|
|
618
|
-
- Seed confirmation through an explicit host-mediated direct-call provider
|
|
619
|
-
- Seed confirmation validation and derived claim sets
|
|
620
|
-
- competency questions through an explicit direct-call directive author
|
|
621
|
-
- competency-question validation and assessment
|
|
622
|
-
- failure classification plus validation
|
|
623
|
-
- revision proposal plus validation
|
|
624
|
-
- deterministic reconstruct metrics
|
|
625
|
-
- stop decision and provenance-checked final output through an explicit direct-call directive author
|
|
626
|
-
- reconstruct run manifest and primary reconstruct record
|
|
627
|
-
|
|
628
|
-
The current direct-call runtime path explicitly defers:
|
|
629
|
-
|
|
630
|
-
- `domain-context-selection.yaml`
|
|
631
|
-
- `domain-context-selection-validation.yaml`
|
|
632
|
-
|
|
633
|
-
These deferred artifacts require additional host/user semantic decisions and
|
|
634
|
-
must not be implied by a completed run. `reconstruct-run-manifest.yaml`,
|
|
635
|
-
`reconstruct-record.yaml`, status payloads, result payloads, and
|
|
636
|
-
`final-output.md` must expose these stages as skipped or deferred for the
|
|
637
|
-
current execution profile.
|
|
638
|
-
|
|
639
|
-
`reconstruct-record.yaml` is the primary artifact for reconstruct in the same
|
|
640
|
-
way `review-record.yaml` is primary for review.
|
|
641
|
-
|
|
642
|
-
### 10.1 Seed Validation Prerequisites
|
|
643
|
-
|
|
644
|
-
`SeedCandidateDirective` validation is profile-sensitive:
|
|
645
|
-
|
|
646
|
-
- In `full_integral_exploration`, Seed candidate validation requires trusted
|
|
647
|
-
source observations, validated observation directives, trusted lens judgments,
|
|
648
|
-
validated source-frontier records or a trusted no-next-frontier rationale,
|
|
649
|
-
validated domain-context selection or a trusted skipped-stage authority
|
|
650
|
-
impact, and accepted source snapshot refs.
|
|
651
|
-
- In `mock_semantic_slice`, Seed candidate validation may prove only the
|
|
652
|
-
test/fixture artifact flow. It must record skipped live exploration and
|
|
653
|
-
skipped domain-context selection as authority limits, and it must not be used
|
|
654
|
-
as product completion evidence.
|
|
655
|
-
- In `observer_gate_slice`, Seed candidate validation must be skipped unless a
|
|
656
|
-
host-supplied Seed candidate artifact is explicitly provided and validated
|
|
657
|
-
against existing trusted observations.
|
|
658
|
-
|
|
659
|
-
No profile may present a Seed as confirmed unless `seed-confirmation.yaml` and
|
|
660
|
-
`seed-confirmation-validation.yaml` exist and are trusted for that profile.
|
|
661
|
-
|
|
662
|
-
## 11. Completion Rule
|
|
663
|
-
|
|
664
|
-
Runtime computes, but does not decide:
|
|
665
|
-
|
|
666
|
-
- exploration round count
|
|
667
|
-
- observed source ref count by round
|
|
668
|
-
- new observation count by round
|
|
669
|
-
- accepted and rejected source frontier ref counts
|
|
670
|
-
- already-observed, unsupported, and out-of-bound frontier ref counts
|
|
671
|
-
- evidence ref count
|
|
672
|
-
- Seed concept count
|
|
673
|
-
- claim realization stance counts
|
|
674
|
-
- confirmation state counts and derived claim-set counts
|
|
675
|
-
- competency question count
|
|
676
|
-
- competency question assessment status counts
|
|
677
|
-
- failed question count
|
|
678
|
-
- failure classification counts
|
|
679
|
-
- proposed revision count
|
|
680
|
-
- unresolved count
|
|
681
|
-
- pass rate
|
|
682
|
-
- new concept rate
|
|
683
|
-
- duplicate candidate count
|
|
684
|
-
- regression failure count
|
|
685
|
-
|
|
686
|
-
The host LLM compares these metrics against the declared execution purpose and
|
|
687
|
-
writes a `StopDecisionDirective` with `continue`, `stop`, or `ask_user`.
|
|
688
|
-
|
|
689
|
-
The user-facing result should separate:
|
|
690
|
-
|
|
691
|
-
- confirmed Seed content
|
|
692
|
-
- claim realization summary
|
|
693
|
-
- competency question assessment summary
|
|
694
|
-
- failure classifications
|
|
695
|
-
- revision proposals or deferrals
|
|
696
|
-
- unresolved material questions
|
|
697
|
-
- unsupported or out-of-scope requests
|
|
698
|
-
- proposed next actions
|
|
699
|
-
- artifact provenance for the claims, questions, failures, proposals, and stop
|
|
700
|
-
rationale it mentions
|
|
701
|
-
|
|
702
|
-
`final-output.md` is decision-ready prose, not a new truth source. Any claim it
|
|
703
|
-
presents as confirmed, unresolved, failed, deferred, or proposed must point back
|
|
704
|
-
to the artifact id family that owns that state.
|
|
705
|
-
|
|
706
|
-
## 12. Runtime Implementation Readiness
|
|
707
|
-
|
|
708
|
-
Runtime attachment is ready only when all of these are true:
|
|
709
|
-
|
|
710
|
-
1. Shared concept names are registered or explicitly scoped as design-local.
|
|
711
|
-
2. A prompt-backed reference run has produced the provisional artifact set.
|
|
712
|
-
3. The source profile loader has a fixed path under
|
|
713
|
-
`.onto/processes/reconstruct/source-profiles/`.
|
|
714
|
-
4. `target_material_kind` is recorded before source adapter selection.
|
|
715
|
-
5. Source adapter output has stable observation ids and boundary failure rules.
|
|
716
|
-
6. Source frontier validation rejects out-of-bound, unsupported, duplicate, and
|
|
717
|
-
unsafe-broad next-source requests.
|
|
718
|
-
7. Lens judgment artifacts are context-isolated and cannot directly fetch source.
|
|
719
|
-
8. Directive validation has schemas for every meaning directive it accepts.
|
|
720
|
-
9. Metrics are defined as deterministic projections from existing artifacts.
|
|
721
|
-
10. MCP schemas expose only bounded facts and artifact refs.
|
|
722
|
-
11. Stage ids are stable and recorded in status, run manifest, and records.
|
|
723
|
-
12. Cross-artifact id authority is explicit and validators reject dangling refs.
|
|
724
|
-
13. Final output provenance is validated against artifact ids rather than prose.
|
|
725
|
-
|
|
726
|
-
## 13. Verification Target
|
|
727
|
-
|
|
728
|
-
When the implementation starts, use at least:
|
|
729
|
-
|
|
730
|
-
```bash
|
|
731
|
-
npm run check:ts-core
|
|
732
|
-
npx vitest run src/core-runtime/reconstruct
|
|
733
|
-
npx vitest run src/core-api/reconstruct-api.test.ts
|
|
734
|
-
npm run test:mcp:review
|
|
735
|
-
git diff --check
|
|
736
|
-
```
|
|
737
|
-
|
|
738
|
-
`test:mcp:review` remains review-focused, but it protects the shared MCP server
|
|
739
|
-
from regressions when reconstruct tools are introduced.
|
|
740
|
-
|
|
741
|
-
The first end-to-end fixture may use the `day1co/day1co-ai-usage-dashboard`
|
|
742
|
-
repository or an equivalent temporary fixture. An equivalent fixture must cover:
|
|
743
|
-
|
|
744
|
-
- multiple selected source observations
|
|
745
|
-
- at least two exploration rounds or one validated no-next-frontier rationale
|
|
746
|
-
- at least one accepted source frontier ref and one rejected or already-observed
|
|
747
|
-
frontier ref
|
|
748
|
-
- at least five Seed claims
|
|
749
|
-
- at least one accepted claim and one rejected, partial, or deferred claim
|
|
750
|
-
- at least one competency question that is not fully answered
|
|
751
|
-
- at least one failure classification
|
|
752
|
-
- at least one revision proposal
|
|
753
|
-
- final output references back to the owning artifact ids
|
|
292
|
+
| `onto.list_source_profiles` | list supported material profiles |
|
|
293
|
+
| `onto.observe_source` | produce runtime source observations |
|
|
294
|
+
| `onto.validate_reconstruct_directive` | validate an authored directive against runtime observations |
|
|
295
|
+
| `onto.reconstruct` | run the reconstruct process |
|
|
296
|
+
| `onto.reconstruct_status` | read progress, liveness, stage state, and artifact refs |
|
|
297
|
+
| `onto.reconstruct_result` | read final output, record refs, and structured result projection |
|
|
298
|
+
|
|
299
|
+
Tool responses should expose artifact refs and validation state, not duplicate a
|
|
300
|
+
second semantic authority.
|
|
301
|
+
|
|
302
|
+
## 12. Source Profile And Extension Boundary
|
|
303
|
+
|
|
304
|
+
`SourceProfileDefinition` is contract-owned and lives under
|
|
305
|
+
`.onto/processes/reconstruct/source-profiles/`.
|
|
306
|
+
|
|
307
|
+
`SelectedSourceProfile` is runtime-owned and recorded in
|
|
308
|
+
`target-material-profile.yaml` after material classification. The host LLM may
|
|
309
|
+
use the selected profile as context, but it must not choose the profile or expand
|
|
310
|
+
the observation boundary.
|
|
311
|
+
|
|
312
|
+
Source profile status is split. `contract_status` says whether a profile
|
|
313
|
+
definition or public material kind is authoritative. `runtime_implementation_status`
|
|
314
|
+
says whether the current runtime can execute that profile. A contract-active
|
|
315
|
+
profile may still be planned, partially wired, unsupported, or halt-only at
|
|
316
|
+
runtime.
|
|
317
|
+
|
|
318
|
+
Candidate kinds and dispositions have stable base enums in
|
|
319
|
+
`candidate_kind_registry` and `candidate_disposition_registry`. Source profiles
|
|
320
|
+
may add profile-specific qualifiers through `candidate_subkind` or
|
|
321
|
+
`disposition_detail`, but adding a new root candidate kind, disposition, or
|
|
322
|
+
material kind requires a contract change and registry update.
|
|
323
|
+
|
|
324
|
+
## 13. Documentation Hygiene
|
|
325
|
+
|
|
326
|
+
Active reconstruct prompts and contracts may load only the active contract set
|
|
327
|
+
listed in Section 1.
|
|
328
|
+
|
|
329
|
+
Development history belongs under `development-records/`. Historical notes must
|
|
330
|
+
not be referenced by runtime prompt packets, active source profiles, active UX
|
|
331
|
+
contracts, or MCP result wording unless a user explicitly asks for that history.
|