onto-mcp 0.3.0 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/.onto/authority/core-lexicon.yaml +12 -0
  2. package/.onto/domains/software-engineering/competency_qs.md +192 -63
  3. package/.onto/domains/software-engineering/concepts.md +67 -5
  4. package/.onto/domains/software-engineering/conciseness_rules.md +22 -2
  5. package/.onto/domains/software-engineering/dependency_rules.md +78 -8
  6. package/.onto/domains/software-engineering/domain_scope.md +181 -150
  7. package/.onto/domains/software-engineering/extension_cases.md +318 -542
  8. package/.onto/domains/software-engineering/logic_rules.md +75 -3
  9. package/.onto/domains/software-engineering/problem_framing_profile.md +29 -2
  10. package/.onto/domains/software-engineering/prompt_interface.md +122 -0
  11. package/.onto/domains/software-engineering/structure_spec.md +53 -4
  12. package/.onto/principles/llm-native-development-guideline.md +20 -0
  13. package/.onto/principles/productization-charter.md +6 -0
  14. package/.onto/processes/evolve/material-kind-adapter-contract.md +6 -0
  15. package/.onto/processes/reconstruct/reconstruct-boundary-contract.md +468 -81
  16. package/.onto/processes/reconstruct/reconstruct-execution-ux-contract.md +177 -0
  17. package/.onto/processes/reconstruct/source-profile-contract.md +39 -6
  18. package/.onto/processes/reconstruct/top-level-concept-discovery-contract.md +387 -0
  19. package/.onto/processes/review/binding-contract.md +8 -0
  20. package/.onto/processes/review/lens-registry.md +16 -0
  21. package/.onto/processes/review/pre-dispatch-contracts.md +34 -13
  22. package/.onto/processes/review/productized-live-path.md +3 -1
  23. package/.onto/processes/shared/pipeline-execution-ledger-contract.md +185 -0
  24. package/.onto/processes/shared/target-material-kind-contract.md +24 -2
  25. package/.onto/roles/axiology.md +7 -2
  26. package/AGENTS.md +4 -2
  27. package/README.md +52 -29
  28. package/dist/core-api/reconstruct-api.js +92 -5
  29. package/dist/core-api/review-api.js +1744 -371
  30. package/dist/core-runtime/cli/mock-review-unit-executor.js +17 -0
  31. package/dist/core-runtime/cli/render-review-final-output.js +9 -0
  32. package/dist/core-runtime/cli/review-invoke.js +387 -55
  33. package/dist/core-runtime/cli/run-review-prompt-execution.js +361 -90
  34. package/dist/core-runtime/path-boundary.js +58 -0
  35. package/dist/core-runtime/pipeline-execution-ledger.js +100 -0
  36. package/dist/core-runtime/reconstruct/artifact-types.js +33 -1
  37. package/dist/core-runtime/reconstruct/materialize-preparation.js +54 -4
  38. package/dist/core-runtime/reconstruct/pipeline-execution-ledger.js +342 -0
  39. package/dist/core-runtime/reconstruct/post-seed-validation.js +630 -0
  40. package/dist/core-runtime/reconstruct/record.js +105 -1
  41. package/dist/core-runtime/reconstruct/run.js +1594 -38
  42. package/dist/core-runtime/reconstruct/seed-candidate-validation.js +29 -0
  43. package/dist/core-runtime/review/continuation-plan.js +160 -0
  44. package/dist/core-runtime/review/execution-plan-boundary.js +123 -0
  45. package/dist/core-runtime/review/materializers.js +8 -3
  46. package/dist/core-runtime/review/pipeline-execution-ledger.js +250 -0
  47. package/dist/core-runtime/review/review-artifact-utils.js +15 -2
  48. package/dist/core-runtime/review/review-invocation-runner.js +604 -0
  49. package/dist/core-runtime/target-material-kind.js +43 -5
  50. package/dist/mcp/server.js +289 -59
  51. package/dist/mcp/tool-schemas.js +28 -2
  52. package/package.json +4 -2
  53. package/.onto/domains/llm-native-development/competency_qs.md +0 -430
  54. package/.onto/domains/llm-native-development/concepts.md +0 -242
  55. package/.onto/domains/llm-native-development/conciseness_rules.md +0 -163
  56. package/.onto/domains/llm-native-development/dependency_rules.md +0 -216
  57. package/.onto/domains/llm-native-development/domain_scope.md +0 -197
  58. package/.onto/domains/llm-native-development/extension_cases.md +0 -474
  59. package/.onto/domains/llm-native-development/logic_rules.md +0 -123
  60. package/.onto/domains/llm-native-development/prompt_interface.md +0 -49
  61. package/.onto/domains/llm-native-development/structure_spec.md +0 -245
@@ -71,6 +71,22 @@ controlled deliberation은 관점 간 충돌을 제한 맥락에서 정리하며
71
71
  - 다른 lens 전체를 요약하지 않는다
72
72
  - `New Perspectives` canonical slot을 소유한다 (axiology-exclusive)
73
73
 
74
+ `New Perspectives`는 현재 review에서 관찰된 목적상 미커버 관점을 보존하는 슬롯이다.
75
+ 이 슬롯은 현재 실행의 active lens set을 변경하지 않는다.
76
+ domain 문서, domain concern tag, CQ, case evidence는 lens 추가를 요구하거나 결정하는
77
+ authority가 아니다. domain은 concern을 lens-usable 원칙, 사례, CQ, 관련 문서 경로로
78
+ 표현할 수 있지만, lens 추가/삭제/분할/통합 판단은 review process 차원의 lens governance
79
+ 문제다.
80
+
81
+ `New Perspectives` 제안이 나오면 가능한 처리 경로는 아래 중 하나다.
82
+
83
+ 1. 기존 lens/CQ/domain rule 경로로 흡수한다.
84
+ 2. domain 문서의 concern tag 또는 CQ를 보강한다.
85
+ 3. 별도 lens-governance follow-up으로 보존한다.
86
+
87
+ 3번은 후속 검토 입력일 뿐이며, 본 review 실행이나 특정 domain 문서가 새 active lens를
88
+ 추가했다는 뜻이 아니다.
89
+
74
90
  ### 4.2 `synthesize`
75
91
 
76
92
  - lens set 전체와 `deliberation.md`를 읽어 final review output을 만든다
@@ -252,16 +252,32 @@ lifecycle_state: dispatched
252
252
  Runtime-generated packet registration preserves `lifecycle_state: dispatched`
253
253
  and appends/upserts the generated packet ref before invoking the unit.
254
254
 
255
- ### 5.3 Freshness And Resume
255
+ ### 5.3 Freshness And Continuation
256
256
 
257
- Current canonical MCP review does not expose an explicit resume tool.
257
+ Current MCP review/status/result can read halted session artifacts. The planned
258
+ explicit continuation surface is `onto.review_continue`; its design lives in
259
+ `docs/architecture/review-continuation-surface.md`.
258
260
 
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.
261
+ The public concept is review continuation, not subagent management. A
262
+ continuation may re-dispatch failed or missing review execution units while
263
+ reusing completed units from the same session.
263
264
 
264
- A future resumed or reused session must validate:
265
+ Continuation planning should use the shared `PipelineExecutionLedger`
266
+ projection defined in
267
+ `.onto/processes/shared/pipeline-execution-ledger-contract.md`. For
268
+ `review`, the projection derives from the execution plan, run manifest,
269
+ execution result, lens barrier, semantic ledgers, and output seats. The ledger's
270
+ primary purpose is to verify artifact trust boundaries: which outputs were
271
+ produced by completed units, which outputs are untrusted because the producing
272
+ unit failed or upstream work is incomplete, and where execution should continue.
273
+ `finding-ledger.yaml` and `issue-ledger.yaml` remain semantic ledgers; they are
274
+ continuation inputs after they exist, not the full pipeline execution ledger.
275
+
276
+ `review-run-manifest.yaml` records a `resume_token` for audit and idempotency
277
+ only. The token is not a dispatch capability and must not be accepted as
278
+ authorization to restart, skip, continue, or reuse worker stages.
279
+
280
+ Any continued or reused session must validate:
265
281
 
266
282
  - manifest schema version
267
283
  - source hash for every required `context_source`
@@ -270,14 +286,19 @@ A future resumed or reused session must validate:
270
286
  - consumed context eligibility
271
287
  - generated packet refs before invoking issue-artifact, deliberation, or
272
288
  synthesize runtime units
289
+ - route consistency against the existing execution plan and actor invocation
290
+ profiles
291
+
292
+ Any mismatch stops before continuation dispatch and writes a
293
+ `manifest_lifecycle`, `context_eligibility`, or route-specific failure record.
273
294
 
274
- Any mismatch stops before lens execution and writes a `manifest_lifecycle` or
275
- `context_eligibility` failure record.
295
+ Continuation must not change inputs, settings, target scope, provider route,
296
+ domain, review mode, selected lens set, or manifest-governed artifacts. If any
297
+ of those must change, the caller must start a new review session.
276
298
 
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.
299
+ Until `onto.review_continue` is implemented, MCP callers must still start a new
300
+ review session when they need execution to proceed. Runtime status/result tools
301
+ may read existing session artifacts, but they do not resume execution.
281
302
 
282
303
  ### 5.4 Synthesize Context
283
304
 
@@ -89,6 +89,8 @@ prompt-backed path에서도 이 단계의 결과는 최종적으로
89
89
  - configured domain이 하나면 바로 사용
90
90
  - configured domain이 여러 개면 interactive selection을 수행
91
91
  - interactive selection이 불가능한 non-interactive 환경이면 fail-fast 하고 explicit domain selection을 요구
92
+ - explicit token과 configured domain이 모두 없으면 review target path/content/intent를 기반으로 available domain 문서 중 하나를 자동 선택하고, 선택 domain과 이유를 start preview, `binding_notes`, opening brief input, final output에 기록한다
93
+ - target 기반 자동 선택에 충분한 signal이 없거나 available domain seat가 없으면 `session_domain=none`으로 진행하며 그 이유를 같은 표면에 기록한다
92
94
  - `--domain` 과 `--no-domain` 동시 지정은 parser layer 에서 fail-fast
93
95
 
94
96
  ### 3.4 호출 고정 (InvocationBinding)
@@ -395,4 +397,4 @@ Target rules:
395
397
  남은 follow-up은 live path 자체의 구조 변경이 아니라 운영/확장 품질이다.
396
398
 
397
399
  1. provider credentials/endpoints가 의도적으로 준비된 환경에서 provider별 live conformance를 수행한다.
398
- 2. replay, stale artifact, partial worker, duplicate-dispatch semantics가 닫힌 explicit resume command를 설계한다.
400
+ 2. `.onto/processes/shared/pipeline-execution-ledger-contract.md`의 shared ledger를 `review`에 먼저 투영하고, `docs/architecture/review-continuation-surface.md`의 설계에 따라 `onto.review_status` continuation plan과 `onto.review_continue`를 구현한다.
@@ -0,0 +1,185 @@
1
+ # Pipeline Execution Ledger Contract
2
+
3
+ > Status: shared design contract.
4
+ > Purpose: define the artifact trust and provenance ledger that every onto
5
+ > pipeline must expose or derive across `review`, `reconstruct`, and future
6
+ > `evolve`.
7
+
8
+ ## 1. Position
9
+
10
+ `PipelineExecutionLedger` is a shared runtime concept. It records how a
11
+ pipeline produced its artifacts at the unit level so a caller can determine:
12
+
13
+ - which artifacts are trustworthy;
14
+ - which artifacts are untrusted because their producing unit failed;
15
+ - which artifacts are blocked because upstream units did not complete;
16
+ - which unit is the first incomplete or failed boundary;
17
+ - where a later continuation or repair action may safely begin.
18
+
19
+ Continuation is one consumer of the ledger. The primary purpose is execution
20
+ audit, trust boundary inspection, and artifact provenance.
21
+
22
+ This contract applies to:
23
+
24
+ - `review`;
25
+ - `reconstruct`;
26
+ - future `evolve`;
27
+ - any later onto pipeline that materializes staged artifacts.
28
+
29
+ ## 2. Ownership
30
+
31
+ Runtime owns the ledger projection because it observes unit dispatch, validation,
32
+ file writes, hashes, and terminal status.
33
+
34
+ Host LLMs may read the ledger to explain trust boundaries or propose the next
35
+ action, but they do not author ledger truth.
36
+
37
+ Semantic ledgers remain separate:
38
+
39
+ - `review` semantic ledgers include `finding-ledger.yaml` and
40
+ `issue-ledger.yaml`.
41
+ - `reconstruct` semantic or decision artifacts include Seed, confirmation,
42
+ question, failure, revision, and stop-decision artifacts.
43
+ - future `evolve` may define design-specification or decision ledgers.
44
+
45
+ Semantic ledgers explain meaning. The pipeline execution ledger explains whether
46
+ the process that produced each artifact can be trusted.
47
+
48
+ ## 3. Minimum Model
49
+
50
+ Shared ledger shape:
51
+
52
+ ```ts
53
+ interface PipelineExecutionLedger {
54
+ schemaVersion: "1";
55
+ pipeline: "review" | "reconstruct" | "evolve" | string;
56
+ sessionId: string;
57
+ sourceRefs: string[];
58
+ units: PipelineExecutionLedgerUnitEntry[];
59
+ }
60
+
61
+ interface PipelineExecutionLedgerUnitEntry {
62
+ unitId: string;
63
+ unitKind: string;
64
+ owner: "runtime" | "host_llm" | "user_or_host_mediated";
65
+ producedArtifactRefs: string[];
66
+ consumedArtifactRefs: string[];
67
+ packetRef?: string | null;
68
+ packetSha256?: string | null;
69
+ outputRefs: string[];
70
+ outputHashes: Record<string, string | null>;
71
+ status:
72
+ | "planned"
73
+ | "completed"
74
+ | "failed"
75
+ | "missing"
76
+ | "skipped"
77
+ | "not_reached";
78
+ trustStatus: "trusted" | "untrusted" | "blocked_by_upstream";
79
+ trustReason: string;
80
+ attemptCount: number;
81
+ lastFailureMessage: string | null;
82
+ upstreamUnitIds: string[];
83
+ downstreamUnitIds: string[];
84
+ }
85
+ ```
86
+
87
+ Rules:
88
+
89
+ - `trusted` requires the producing unit to complete and all required output
90
+ artifacts to exist and validate.
91
+ - `untrusted` means the unit ran but failed, produced invalid output, or wrote
92
+ artifacts that failed validation.
93
+ - `blocked_by_upstream` means this unit's trust cannot be established because an
94
+ upstream required unit is missing, failed, or untrusted.
95
+ - `skipped` must include a reason and must not be confused with trusted output.
96
+ - A missing optional unit may be `skipped`; a missing required unit is
97
+ `missing` or `blocked_by_upstream`.
98
+ - The ledger is derived from existing run artifacts unless a pipeline contract
99
+ explicitly promotes it to a durable artifact.
100
+
101
+ ## 4. Source Inputs
102
+
103
+ Each pipeline maps its own runtime artifacts into the shared ledger.
104
+
105
+ | Pipeline | Required derivation sources |
106
+ |---|---|
107
+ | `review` | `execution-plan.yaml`, `review-run-manifest.yaml`, `execution-preparation/review-context-manifest.yaml`, `execution-result.yaml`, `lens-completion-barrier.yaml`, semantic ledgers when present, and output seats |
108
+ | `reconstruct` | `reconstruct-run-manifest.yaml`, `reconstruct-record.yaml`, stage registry, validation artifacts, metrics, stop decision, final output, and output seats |
109
+ | `evolve` | future evolve run manifest, target profile, adapter selection, observation/projection artifacts, design specification validation, final disposition, and output seats |
110
+
111
+ The pipeline-specific source artifacts remain authority. The ledger is a
112
+ normalized projection over them.
113
+
114
+ ## 5. Pipeline Mapping
115
+
116
+ ### Review
117
+
118
+ `review` units include:
119
+
120
+ - lens units;
121
+ - issue artifact units;
122
+ - per-lens deliberation units;
123
+ - controlled deliberation;
124
+ - synthesize;
125
+ - record/final-output assembly where runtime treats them as separate stages.
126
+
127
+ `finding-ledger.yaml` and `issue-ledger.yaml` remain semantic ledgers. They are
128
+ inputs for downstream trust once they exist, not replacements for the execution
129
+ ledger.
130
+
131
+ ### Reconstruct
132
+
133
+ `reconstruct` units follow stable `ReconstructStageId` values:
134
+
135
+ - material profiling;
136
+ - source inventory;
137
+ - source observation;
138
+ - LLM-authored directive production;
139
+ - runtime directive validation;
140
+ - Seed candidate, confirmation, competency-question, assessment,
141
+ failure-classification, revision, metrics, stop-decision, final-output, and
142
+ record assembly stages as the contract enables them.
143
+
144
+ Runtime validation units are the trust gates for LLM-authored artifacts. A
145
+ semantic artifact can exist but remain untrusted until its validation unit
146
+ completes.
147
+
148
+ ### Evolve
149
+
150
+ Future `evolve` units must begin with:
151
+
152
+ - target profiling;
153
+ - adapter selection;
154
+ - material-specific observation or projection;
155
+ - design inquiry/specification stages;
156
+ - validation and final disposition stages.
157
+
158
+ No future evolve adapter may bypass the ledger by writing design artifacts
159
+ without a producing unit and trust status.
160
+
161
+ ## 6. Status And Result Surfaces
162
+
163
+ Status tools should expose the ledger, or a bounded projection of it, whenever a
164
+ pipeline is prepared, running, halted, or completed.
165
+
166
+ Result tools should expose enough ledger refs or summary fields for callers to
167
+ audit why final artifacts are trusted.
168
+
169
+ Continuation tools, where implemented, must derive their frontier from the
170
+ ledger's trust and completion boundary rather than from ad hoc file existence.
171
+
172
+ ## 7. Durable Artifact Policy
173
+
174
+ First implementation may keep the ledger as a derived status projection.
175
+
176
+ Promote a durable root artifact such as `pipeline-execution-ledger.yaml`
177
+ only when at least one of these is true:
178
+
179
+ - external audit needs a stable standalone ledger file;
180
+ - continuation attempts need replayable pre/post trust snapshots;
181
+ - result artifacts need to cite a ledger ref as part of their trust contract.
182
+
183
+ If promoted, the durable artifact must still be derived from the pipeline's run
184
+ manifest, record, validation artifacts, and output seats. It must not become a
185
+ second execution truth.
@@ -4,6 +4,12 @@
4
4
  > Purpose: define the cross-process goal for material-aware target handling
5
5
  > across `review`, `reconstruct`, and future `evolve`.
6
6
 
7
+ Related shared contract:
8
+
9
+ ```text
10
+ .onto/processes/shared/pipeline-execution-ledger-contract.md
11
+ ```
12
+
7
13
  ## 1. Goal Statement
8
14
 
9
15
  Establish a material-aware runtime contract so `review`, `reconstruct`, and
@@ -50,7 +56,7 @@ Allowed values:
50
56
  | `spreadsheet` | Workbook, sheet, CSV, accounting schedule, formula model, report, or tabular calculation artifact. |
51
57
  | `document` | Prose, requirements, policy, guide, report, contract, PDF, DOCX, Markdown, or similar textual artifact. |
52
58
  | `database` | Database connection, schema, migration, SQL file, warehouse model, table, view, or query artifact. |
53
- | `mixed` | Bundle containing more than one material kind. Each member needs its own material classification. |
59
+ | `mixed` | Bundle containing more than one material kind. Each member needs its own material classification; `mixed` itself is not an adapter target. |
54
60
  | `unknown` | Runtime cannot classify the material safely. Adapter execution must halt or ask for clarification. |
55
61
 
56
62
  The axis is separate from:
@@ -71,6 +77,21 @@ The axis is separate from:
71
77
  | `reconstruct` | Source profiles, source adapters, source observations, and directive validation must be keyed by `target_material_kind`. |
72
78
  | `evolve` | Future adapters must not assume code-product inputs; adapter selection should start from `target_material_kind` as defined in `.onto/processes/evolve/material-kind-adapter-contract.md`. |
73
79
 
80
+ ### 4.1 Mixed Support Semantics
81
+
82
+ Because `mixed` is an allowed public value, every process that exposes it must
83
+ also expose one of these support states:
84
+
85
+ | Support state | Runtime behavior |
86
+ |---|---|
87
+ | `supported_composite` | Classify every member, dispatch only member-specific supported adapters, and preserve cross-material refs as structural refs. |
88
+ | `partial_composite` | Classify every member, observe supported members, record unsupported members and downstream authority impact. |
89
+ | `unsupported` | Halt or ask for clarification before adapter dispatch with a stable unsupported reason. |
90
+ | `reserved_future` | Treat `mixed` as non-executable vocabulary and do not expose it as a runnable path. |
91
+
92
+ No process may dispatch a single generic `mixed` adapter. Semantic
93
+ cross-material interpretation belongs to the LLM after runtime observation.
94
+
74
95
  ## 5. Artifact Contract Additions
75
96
 
76
97
  | Artifact | Required change |
@@ -114,7 +135,8 @@ Runtime must validate:
114
135
 
115
136
  - `target_material_kind` is one of the allowed values
116
137
  - `unknown` does not dispatch a material adapter
117
- - `mixed` records per-member material kinds
138
+ - `mixed` records per-member material kinds and one of the support states in
139
+ section 4.1 before adapter dispatch
118
140
  - unsupported formats halt or degrade explicitly
119
141
  - source observations do not claim ontology facts such as entity, relation,
120
142
  business rule, aggregate root, or policy meaning
@@ -61,12 +61,17 @@
61
61
 
62
62
  현재 lens set 에 빠진 purpose-critical 관점을 이 lens 가 발견하면 여기서 직접 제안한다. `synthesize` 는 이 제안을 보존할 수 있으나 독자적으로 발명할 수 없다. 이 slot 은 axiology 만 사용할 수 있는 의도적 canonical asymmetry 이다.
63
63
 
64
+ 이 slot 은 domain concern 을 active lens 로 승격하는 장치가 아니다. domain 문서의 concern
65
+ tag, CQ, case evidence 는 원칙적으로 기존 lens/CQ/domain-rule 경로로 소비된다.
66
+ New Perspectives 는 "현재 domain 이 새 lens 를 원한다"는 뜻이 아니라, review process
67
+ governance 에서 별도로 검토할 수 있는 목적상 미커버 관찰을 보존하는 출력이다.
68
+
64
69
  New Perspectives 제안 시 최소 필수 필드:
65
70
 
66
71
  1. **trigger condition** — 제안을 촉발한 증거 (대상 · 관찰 · authority 미커버 영역)
67
72
  2. **proposed perspective** — 무엇을 평가할 것인가 (1~2 문장 perspective 요약)
68
- 3. **insufficiency argument** — 기존 9 lens 각각이관점을 왜 커버하지 못하는지 명시
69
- 4. **intended receiving seat** — 제안이 착지해야 할 위치 (현재 review 의 `synthesize` 보존 / 후속 lens governance / axiology 내부 sub-check 등). 착지 seat 미지정 제안은 orphaned 로 간주하여 `synthesize` 가 거부할 수 있다
73
+ 3. **insufficiency argument** — 기존 9 lens, CQ, domain rule 경로가 관찰을충분히 커버하지 못하는지 명시
74
+ 4. **intended receiving seat** — 제안이 착지해야 할 위치 (현재 review 의 `synthesize` 보존 / 기존 lens·CQ·domain rule 보강 / 후속 lens governance / axiology 내부 sub-check 등). 착지 seat 미지정 제안은 orphaned 로 간주하여 `synthesize` 가 거부할 수 있다
70
75
 
71
76
  New Perspectives 제안은 현재 리뷰 실행의 active lens set 을 변경하지 않는다. 실제 lens set 확장은 별도 governance 경로를 통한다.
72
77
 
package/AGENTS.md CHANGED
@@ -60,8 +60,10 @@ target material 관련 작업 시 추가로 읽을 문서:
60
60
  `reconstruct` 작업 시 추가로 읽을 문서:
61
61
 
62
62
  1. [reconstruct-boundary-contract.md](/Users/kangmin/cowork/onto-mcp/.onto/processes/reconstruct/reconstruct-boundary-contract.md)
63
- 2. [source-profile-contract.md](/Users/kangmin/cowork/onto-mcp/.onto/processes/reconstruct/source-profile-contract.md)
64
- 3. selected source profile under `.onto/processes/reconstruct/source-profiles/`
63
+ 2. [reconstruct-execution-ux-contract.md](/Users/kangmin/cowork/onto-mcp/.onto/processes/reconstruct/reconstruct-execution-ux-contract.md)
64
+ 3. [top-level-concept-discovery-contract.md](/Users/kangmin/cowork/onto-mcp/.onto/processes/reconstruct/top-level-concept-discovery-contract.md)
65
+ 4. [source-profile-contract.md](/Users/kangmin/cowork/onto-mcp/.onto/processes/reconstruct/source-profile-contract.md)
66
+ 5. selected source profile under `.onto/processes/reconstruct/source-profiles/`
65
67
 
66
68
  ---
67
69
 
package/README.md CHANGED
@@ -36,15 +36,17 @@ cross-process goal contract lives at
36
36
 
37
37
  `reconstruct` now has a current design contract under
38
38
  `.onto/processes/reconstruct/`, material-aware runtime helpers, and a bounded
39
- happy-path runner. The runner classifies target material, writes source
40
- observations, accepts pluggable LLM-owned directive authors and confirmation
41
- providers, validates evidence refs, computes deterministic metrics, and writes
39
+ direct-call integral runner. The runner classifies target material, expands
40
+ directory targets into per-member source observations, writes the initial source
41
+ frontier, runs reconstruct lens judgments and exploration synthesis through a
42
+ configured LLM provider, validates evidence refs, computes deterministic metrics, and writes
42
43
  `final-output.md`, `reconstruct-run-manifest.yaml`, and the primary
43
44
  `reconstruct-record.yaml`. Code is the first fixture; the runner path is shared
44
45
  with spreadsheet/document/database material through source profiles and
45
- material-specific observers. The current public run path is an explicit mock
46
- semantic/confirmation happy path; domain context selection, failure
47
- classification, and revision proposal are recorded as deferred scope.
46
+ material-specific observers. The current public run path defaults to
47
+ `direct_call` semantic authoring and host-mediated confirmation. It fails loud
48
+ when provider/model/credentials, LLM-authored artifact shape, or runtime gates
49
+ are invalid; domain context selection remains deferred.
48
50
  `evolve` has a future material-kind adapter contract at
49
51
  `.onto/processes/evolve/material-kind-adapter-contract.md`, but no active
50
52
  runtime or MCP tool. `learn` and `govern` remain separate design slices.
@@ -77,6 +79,7 @@ Available MCP tools:
77
79
  |---|---|
78
80
  | `onto.review` | Run the full review path and return artifact refs plus summary |
79
81
  | `onto.prepare_review` | Prepare a review session and prompt packets |
82
+ | `onto.review_continue` | Continue a prepared or halted review from the ledger frontier |
80
83
  | `onto.review_status` | Read structured status and artifact refs |
81
84
  | `onto.review_result` | Read `review-record.yaml` and final output |
82
85
  | `onto.list_lenses` | List canonical lens sets |
@@ -84,9 +87,9 @@ Available MCP tools:
84
87
  | `onto.list_source_profiles` | List reconstruct source profiles |
85
88
  | `onto.observe_source` | Materialize reconstruct material profile, inventory, source observations, and initial record |
86
89
  | `onto.validate_reconstruct_directive` | Validate LLM-authored reconstruct directive files |
87
- | `onto.reconstruct` | Run the material-aware reconstruct happy path with explicit mock semantic/confirmation realization |
88
- | `onto.reconstruct_status` | Read reconstruct session status and artifact refs |
89
- | `onto.reconstruct_result` | Read `reconstruct-record.yaml`, run manifest, and final output |
90
+ | `onto.reconstruct` | Run the material-aware direct-call reconstruct path with runtime validation gates |
91
+ | `onto.reconstruct_status` | Read reconstruct session status, progress, counts, and artifact refs |
92
+ | `onto.reconstruct_result` | Read `reconstruct-record.yaml`, run manifest, progress projection, and final output |
90
93
 
91
94
  MCP results include `llmPresentation` prompts. The runtime supplies bounded
92
95
  facts; the host LLM should use those prompts to explain the opening brief and
@@ -101,18 +104,15 @@ Minimal reconstruct MCP call shape:
101
104
  "projectRoot": "/path/to/project",
102
105
  "targetRefs": ["src/example.ts"],
103
106
  "intent": "Create a bounded reconstruct Seed from this target.",
104
- "sessionRoot": ".onto/reconstruct/example-run",
105
- "semanticAuthorRealization": "mock",
106
- "confirmationProviderRealization": "mock"
107
+ "sessionRoot": ".onto/reconstruct/example-run"
107
108
  }
108
109
  }
109
110
  ```
110
111
 
111
- `semanticAuthorRealization` and `confirmationProviderRealization` are required
112
- so completed reconstruct runs are explicit about their current mock semantics.
113
- Today this proves the material-aware happy path, artifact gates, and MCP
114
- surface. It does not claim live host-LLM semantic authorship or live
115
- user-mediated confirmation.
112
+ `semanticAuthorRealization` and `confirmationProviderRealization` default to
113
+ `direct_call`. Configure `.onto/settings.json` or user `~/.onto/settings.json`
114
+ with an `llm` provider/model before running. Test-only mock helpers are not
115
+ product completion evidence.
116
116
 
117
117
  Repository-local development harness:
118
118
 
@@ -235,30 +235,53 @@ Primary outputs:
235
235
 
236
236
  A reconstruct session writes artifacts under `.onto/reconstruct/<session-id>/`.
237
237
 
238
- Implemented happy-path outputs:
238
+ Implemented direct-call, runtime-gated outputs:
239
239
 
240
240
  | Artifact | Owner | Purpose |
241
241
  |---|---|---|
242
242
  | `target-material-profile.yaml` | runtime | detected `target_material_kind`, support status, and selected source profiles |
243
243
  | `source-inventory.yaml` | runtime | material-specific inventory units and scan boundary |
244
+ | `initial-source-frontier.yaml` | runtime | first observation frontier derived from inventory |
244
245
  | `source-observations.yaml` | runtime | structural observations with stable evidence ids |
245
- | `source-observation-directive.yaml` | mock/host author | selected observations for evidence use |
246
+ | `source-observation-directive.yaml` | host LLM author | selected observations for evidence use |
246
247
  | `source-observation-directive-validation.yaml` | runtime | validation of selected observation refs |
247
- | `seed-candidate.yaml` | mock/host author | evidence-backed Seed candidate |
248
- | `seed-candidate-validation.yaml` | runtime | Seed claim and evidence-ref validation |
249
- | `seed-confirmation.yaml` | mock/host/user mediated | accepted, rejected, or partial Seed confirmation |
250
- | `competency-questions.yaml` | mock/host author | questions linked to confirmed claims |
251
- | `reconstruct-metrics.yaml` | runtime | deterministic counts, unresolved count, and pass rate |
252
- | `stop-decision.yaml` | mock/host author | stop, continue, or ask-user decision based on metrics |
253
- | `final-output.md` | mock/host author | user-facing result grounded in artifacts |
248
+ | `rounds/<round-id>/lens-judgments/*.yaml` | host LLM author | reconstruct lens judgments over trusted observations |
249
+ | `rounds/<round-id>/exploration-synthesis.yaml` | host LLM author | integrated gaps and next-source needs |
250
+ | `rounds/<round-id>/source-frontier.yaml` | host LLM author | requested next source refs or no-next-frontier rationale |
251
+ | `rounds/<round-id>/source-frontier-validation.yaml` | runtime | boundary, duplicate, and inventory validation for the frontier |
252
+ | `seed-candidate.yaml` | host LLM author | evidence-backed Seed candidate with separate `claim_id` and user-facing `name` |
253
+ | `seed-candidate-validation.yaml` | runtime | Seed claim name, shape, and evidence-ref validation |
254
+ | `claim-realization-map.yaml` | host LLM author | claim-level evidence stance |
255
+ | `claim-realization-map-validation.yaml` | runtime | claim id, stance enum, and evidence linkage validation |
256
+ | `seed-confirmation.yaml` | host/user mediated | accepted, rejected, partial, or deferred Seed confirmation |
257
+ | `seed-confirmation-validation.yaml` | runtime | confirmation transition validation and derived claim sets |
258
+ | `competency-questions.yaml` | host LLM author | questions linked to confirmed claims |
259
+ | `competency-questions-validation.yaml` | runtime | CQ id, eligible-claim coverage, claim-link, and evidence validation |
260
+ | `competency-question-assessment.yaml` | host LLM author | answer status for every authoritative CQ |
261
+ | `competency-question-assessment-validation.yaml` | runtime | exactly-once CQ assessment validation |
262
+ | `failure-classification.yaml` | host LLM author | material failure and gap classification |
263
+ | `failure-classification-validation.yaml` | runtime | failure enum, linkage, and materiality validation |
264
+ | `revision-proposal.yaml` | host LLM author | bounded revision/deferral proposals |
265
+ | `revision-proposal-validation.yaml` | runtime | proposal id, target, action, and regression guard validation |
266
+ | `reconstruct-metrics.yaml` | runtime | deterministic counts, unresolved/deferred counts, and pass rate |
267
+ | `stop-decision.yaml` | host LLM author | stop, continue, or ask-user decision based on metrics |
268
+ | `final-output.md` | host LLM author | user-facing result grounded in artifacts and provenance-checked by runtime |
254
269
  | `reconstruct-run-manifest.yaml` | runtime | step refs, `performed_by` provenance, execution profile, and happy-path scope |
255
270
  | `reconstruct-record.yaml` | runtime | primary structured reconstruct artifact |
256
271
 
257
272
  Current deferred reconstruct artifacts are recorded in
258
273
  `reconstruct-run-manifest.yaml` under `happy_path_scope.deferred_artifacts`:
259
- `domain_context_selection`, `failure_classification`, and `revision_proposal`.
260
- Those require additional host/user semantic decisions and are outside the
261
- current mock happy path.
274
+ `domain_context_selection` and `domain_context_selection_validation`. Those
275
+ require additional domain selection semantics and are outside the current
276
+ direct-call path.
277
+
278
+ The reconstruct design contract also defines validation artifacts for those
279
+ stages, stable reconstruct stage ids, cross-artifact id authority, and progress
280
+ UX expectations in `.onto/processes/reconstruct/reconstruct-execution-ux-contract.md`.
281
+ Seed discovery is further constrained by
282
+ `.onto/processes/reconstruct/top-level-concept-discovery-contract.md`, which
283
+ defines the Seed as a purpose-relative top-level concept discovery artifact
284
+ rather than a full ontology or broad claim ledger.
262
285
 
263
286
  ## Repository Map
264
287