onto-mcp 0.4.7 → 0.4.8

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/README.md CHANGED
@@ -1,9 +1,10 @@
1
1
  # Onto MCP
2
2
 
3
- `onto-mcp` is the TypeScript product core for ontology-as-code review and
4
- reconstruct. The
5
- public interface is MCP-native; repository-local verification harnesses are
6
- internal and are not product entrypoints.
3
+ [![npm version](https://img.shields.io/npm/v/onto-mcp)](https://www.npmjs.com/package/onto-mcp)
4
+
5
+ MCP-native ontology tools that help LLMs **review** implementation artifacts,
6
+ **derive an ontology** from real sources, and guide extensions with runtime
7
+ validation gates owning every structured claim.
7
8
 
8
9
  ```text
9
10
  .onto contracts and domain documents
@@ -13,131 +14,31 @@ internal and are not product entrypoints.
13
14
  -> provider adapters
14
15
  ```
15
16
 
16
- ## Current Product Slice
17
-
18
- The active implementation targets are `review` and reconstruct seeding/maturation.
17
+ The public interface is MCP-native: install the server once, register it with
18
+ your MCP host, and drive it through tools. Targets are not assumed to be code —
19
+ runtime contracts classify the material form (`code`, `spreadsheet`,
20
+ `document`, `database`, `mixed`, or `unknown`) before choosing observation,
21
+ validation, or adapter behavior.
19
22
 
20
- Across `review`, `reconstruct`, and future `evolve`, targets are not assumed to
21
- be code. Runtime contracts classify the material form with
22
- `target_material_kind` (`code`, `spreadsheet`, `document`, `database`, `mixed`,
23
- or `unknown`) before choosing observation, validation, or adapter behavior. The
24
- cross-process goal contract lives at
25
- `.onto/processes/shared/target-material-kind-contract.md`.
26
-
27
- `review` performs:
28
-
29
- 1. invocation interpretation and binding
30
- 2. execution preparation artifacts
31
- 3. isolated parallel lens execution
32
- 4. issue ledger and issue stance closure artifacts
33
- 5. controlled lens deliberation
34
- 6. conservative synthesis
35
- 7. `ReviewRecord` assembly
36
- 8. concise human-readable final output
37
-
38
- `reconstruct` is an active productization slice. It has active contracts
39
- under `.onto/processes/reconstruct/`, MCP/direct-call wiring, material-aware
40
- runtime helpers, and a bounded integral runner. Code and document are the first
41
- partially wired runtime profiles. Spreadsheet and database profiles are
42
- contract-active but runtime-planned until their adapters are implemented; mixed
43
- targets are partial-composite only. The current runner classifies target
44
- material, writes and validates `reconstruct-run-control.yaml` before semantic
45
- artifacts are trusted, admits the first run-control owner with atomic create
46
- semantics, writes and validates `registry-verification-evidence.yaml`
47
- against the current reconstruct contract registry, expands supported directory targets into per-member source
48
- observations, writes and validates `source-safety-ledger.yaml` before LLM prompt
49
- materialization, writes the initial source frontier, runs reconstruct lens
50
- judgments and exploration synthesis through a configured LLM provider, validates
51
- available evidence refs, authors and validates source-purpose authority,
52
- confirms inferred purpose when required, writes and validates
53
- `material-admission-ledger.yaml` so purpose-critical admission rows are consumed
54
- by candidate, seed, and maturation artifacts or closed as limitations, writes
55
- and validates `seed-authoring-readiness.yaml` before ontology seed authoring so
56
- selected-purpose closure is deterministic while semantic adequacy remains owned
57
- by the seed author and downstream validators, treats ontology-domain category
58
- rows as diagnostic unless a selected-purpose closure row exists for that
59
- category, sends seed authoring a compact selected-purpose projection instead of
60
- the full source-purpose candidate artifact, preserves the first invalid
61
- `ontology-seed.yaml` and its validation as
62
- repair input when seed validation fails, runs one focused seed repair call over
63
- the failed validation sections, revalidates the repaired seed, passes
64
- exploration synthesis to downstream frontier, purpose, and candidate inventory
65
- authors as a compact observation-id projection instead of full evidence-ref
66
- objects, computes
67
- deterministic metrics, and writes `reconstruct-run-manifest.yaml`. After seed
68
- handoff validation it also
69
- projects the first-pass maturation surface: `maturation-baseline.yaml`,
70
- `actionability-matrix.yaml`, `maturation-question-frontier.yaml`,
71
- `maturation-closure-frontier.yaml`, `maturation-authority-response.yaml`,
72
- `answer-support-ledger.yaml`, `maturation-answer-claims.yaml`,
73
- `ontology-expansion.yaml`, `maturation-source-delta.yaml`,
74
- `maturation-convergence-ledger.yaml`, proof-boundary artifacts for query,
75
- visualization, and graph-exploration surfaces, and
76
- `maturation-continuation-decision.yaml` with runtime validations. Final
77
- re-question convergence is recorded inside the convergence ledger before
78
- `actionable_ready` can be projected. It writes pre-publication
79
- `claim-projection.yaml` and
80
- `claim-projection-validation.yaml` after handoff and maturation continuation
81
- authorities pass, using an immutable
82
- `reconstruct-run-control.pre-publication-validation.yaml` checkpoint and
83
- validated `target-material-profile-validation.yaml` for material-kind support,
84
- then emits `final-output.md` through the validated handoff path; final output
85
- cites claim-projection authority refs without restating pre-publication claim
86
- values. The final `reconstruct-record.yaml` is assembled
87
- after `claim-projection-validation.yaml` and final-output provenance validation
88
- pass; otherwise terminal projection must be blocked or limitation-backed. The final
89
- `reconstruct-run-manifest.post-publication-validation.yaml` is a post-publication audit for the
90
- complete manifest after final output and record refs exist. The
91
- current public run path defaults to
92
- `direct_call` semantic authoring and host-mediated confirmation. It fails loud
93
- when provider/model/credentials, LLM-authored artifact shape, unsupported
94
- material, or runtime gates are invalid. Optional reconstruct `domain` input
95
- admits that domain's `competency_qs.md` into the run governing snapshot for
96
- domain competency trace validation; there is no separate active
97
- domain competency selection artifact.
98
-
99
- Timeout recovery is bounded by the same LLM/runtime ownership split. A
100
- source-purpose timeout retries a minimal-kernel LLM prompt with the same
101
- artifact contract. Seed authoring also retries through a minimal kernel, but if
102
- both full and minimal seed authoring time out the run fails closed; runtime does
103
- not author deterministic ontology seed content. Competency-question timeout
104
- recovery may still project coverage questions from allowed claims and domain
105
- competency rows so validation can prove coverage or preserve explicit
106
- limitations.
107
- `evolve` has a future material-kind adapter contract at
108
- `.onto/processes/evolve/material-kind-adapter-contract.md`, but no active
109
- runtime or MCP tool. `learn` and `govern` remain separate design slices.
110
-
111
- ## Public Interface
112
-
113
- Install from npm:
23
+ ## Quickstart
114
24
 
115
25
  ```bash
116
26
  npm install -g onto-mcp
27
+ onto register # interactive: pick detected MCP hosts
117
28
  ```
118
29
 
119
- Start the MCP server:
120
-
121
- ```bash
122
- onto mcp
123
- ```
124
-
125
- ### Register with hosts
126
-
127
30
  `npm install` only puts the `onto` binary on PATH — each MCP host (Claude Code,
128
31
  Codex, Claude Desktop, Cursor) must additionally be told to launch it. `onto
129
- register` does that in one step. The same global binary is shared by every host.
32
+ register` does that in one step; the same global binary is shared by every
33
+ host. Restart the host app after registering.
130
34
 
131
35
  ```bash
132
- onto register # interactive: pick detected hosts (terminal only)
133
- onto register --all --yes # non-interactive: every detected host
36
+ onto register --all --yes # non-interactive: every detected host
134
37
  onto register --hosts cursor,codex --yes
135
- onto register --list # show detection status, write nothing
38
+ onto register --list # show detection status, write nothing
136
39
  onto register --hosts cursor --dry-run # preview the change, write nothing
137
40
  ```
138
41
 
139
- Mechanism per host:
140
-
141
42
  | Host | How it is registered |
142
43
  |---|---|
143
44
  | Claude Code | `claude mcp add onto -s user -- onto mcp` (user scope = all projects) |
@@ -145,42 +46,107 @@ Mechanism per host:
145
46
  | Claude Desktop | edits `mcpServers.onto` in `claude_desktop_config.json` |
146
47
  | Cursor | edits `mcpServers.onto` in `~/.cursor/mcp.json` |
147
48
 
148
- For the CLI-backed hosts, `onto register` prefers the official CLI and falls back
149
- to printing manual instructions when it is not on PATH. It verifies the result
150
- after `mcp add` and reports `failed` (not a false `registered`) if the CLI exits
151
- successfully but the server is not listed afterward — e.g. when `claude` on PATH
152
- is an alias/wrapper or points at the wrong profile. JSON edits preserve any
153
- servers already present and are idempotent (re-running reports `skipped`).
154
- Registration writes only host-owned config; it never writes onto runtime data.
155
- Restart the host app after registering to pick up the new server. Override the
49
+ For the CLI-backed hosts, `onto register` prefers the official CLI and falls
50
+ back to printing manual instructions when it is not on PATH. It verifies the
51
+ result after `mcp add` and reports `failed` (not a false `registered`) if the
52
+ CLI exits successfully but the server is not listed afterward. JSON edits
53
+ preserve any servers already present and are idempotent. Registration writes
54
+ only host-owned config; it never writes onto runtime data. Override the
156
55
  launched command or server name with `--command <cmd>` / `--name <id>`.
157
56
 
158
57
  **Claude Code profiles.** Claude Code stores MCP servers per config directory
159
- (`CLAUDE_CONFIG_DIR`). If you run multiple profiles (e.g. `~/.claude`,
160
- `~/.claude-1`), target one explicitly so registration lands in the right place:
58
+ (`CLAUDE_CONFIG_DIR`). If you run multiple profiles, target one explicitly:
161
59
 
162
60
  ```bash
163
61
  onto register --hosts claude-code --claude-config-dir ~/.claude-1 --yes
164
62
  ```
165
63
 
166
- When `--claude-config-dir` is omitted, an ambient `CLAUDE_CONFIG_DIR` is honored
167
- (shown in the plan), otherwise the claude default `~/.claude` is used.
168
-
169
- For project-local installs, add `onto-mcp` to the project and run the local
170
- binary:
64
+ For project-local installs:
171
65
 
172
66
  ```bash
173
67
  npm install --save-dev onto-mcp
174
68
  npm exec -- onto mcp
175
69
  ```
176
70
 
177
- Available MCP tools:
71
+ Before running reviews, configure an LLM provider in `.onto/settings.json` or
72
+ `~/.onto/settings.json` (see [Configuration](#configuration)).
73
+
74
+ ## What it does
75
+
76
+ ### Review
77
+
78
+ `onto_review` runs a structured, multi-perspective review of a target:
79
+
80
+ 1. invocation interpretation and binding
81
+ 2. execution preparation artifacts
82
+ 3. isolated parallel lens execution (context-isolated perspectives)
83
+ 4. issue ledger and issue stance closure artifacts
84
+ 5. controlled lens deliberation
85
+ 6. conservative synthesis
86
+ 7. `ReviewRecord` assembly
87
+ 8. concise human-readable final output
88
+
89
+ Two orchestration modes share one runtime: the default runtime-orchestrated
90
+ path (`onto_review` drives everything), and a host-orchestration path where the
91
+ MCP host executes units itself round by round (`onto_review_round` /
92
+ `onto_review_advance`) while onto keeps artifact truth, validation, and gates.
93
+
94
+ A review session writes artifacts under `.onto/review/<session-id>/`:
95
+
96
+ | Artifact | Purpose |
97
+ |---|---|
98
+ | `execution-plan.yaml` | bounded runtime plan |
99
+ | `issue-ledger.yaml` | normalized issue list |
100
+ | `issue-stance-matrix.yaml` | every participating lens stance per issue |
101
+ | `deliberation.md` | teamlead-controlled deliberation result |
102
+ | `problem-framing.yaml` | end-of-review problem classification |
103
+ | `review-run-manifest.yaml` | packet/output refs and hashes |
104
+ | `review-record.yaml` | primary structured review artifact |
105
+ | `final-output.md` | principal-facing report with `Final Review Result` explanation |
106
+
107
+ ### Reconstruct
108
+
109
+ `onto_reconstruct` derives a bounded ontology seed from real sources and
110
+ matures it: classify target material, observe sources behind safety and
111
+ lineage gates, author and validate `ontology-seed.yaml`, then iterate a
112
+ maturation loop (question frontier → answer support → ontology expansion →
113
+ convergence) until the result is `actionable_ready`, `actionable_limited`, or
114
+ explicitly blocked. Every structured claim is owned by a runtime validation
115
+ gate; the run fails loud when provider credentials, LLM-authored artifact
116
+ shape, unsupported material, or runtime gates are invalid.
117
+
118
+ Minimal MCP call shape:
119
+
120
+ ```json
121
+ {
122
+ "name": "onto_reconstruct",
123
+ "arguments": {
124
+ "projectRoot": "/path/to/project",
125
+ "targetRefs": ["src/example.ts"],
126
+ "intent": "Create a bounded reconstruct Seed from this target.",
127
+ "domain": "ontology",
128
+ "sessionRoot": ".onto/reconstruct/example-run"
129
+ }
130
+ }
131
+ ```
132
+
133
+ The artifact and gate catalog authority is the machine-readable
134
+ [reconstruct contract registry](https://github.com/kangminlee-maker/onto-mcp/blob/main/.onto/processes/reconstruct/reconstruct-contract-registry.yaml);
135
+ semantics and rationale live in the prose contracts under
136
+ [`.onto/processes/reconstruct/`](https://github.com/kangminlee-maker/onto-mcp/tree/main/.onto/processes/reconstruct). A readable
137
+ point-in-time map (v0.4.7 snapshot, not maintained) is kept at
138
+ [development-records/design/reconstruct-runtime-reference-v0.4.7-snapshot.md](https://github.com/kangminlee-maker/onto-mcp/blob/main/development-records/design/reconstruct-runtime-reference-v0.4.7-snapshot.md).
139
+
140
+ ## MCP tools
178
141
 
179
142
  | Tool | Purpose |
180
143
  |---|---|
181
144
  | `onto_review` | Run the full review path and return artifact refs plus summary |
182
145
  | `onto_prepare_review` | Prepare a review session and prompt packets |
183
146
  | `onto_review_continue` | Continue a prepared or halted review from the ledger frontier |
147
+ | `onto_review_round` | Host-orchestration: return the units ready to execute now, with prompt packets materialized |
148
+ | `onto_review_advance` | Host-orchestration: report host-executed units; onto validates seats, records results, and returns the next round |
149
+ | `onto_review_cancel` | Request cancellation for a running review session |
184
150
  | `onto_review_status` | Read structured status and artifact refs |
185
151
  | `onto_review_result` | Read bounded result projections; `compact`/`standard` use count-and-signal summaries, `full` includes `review-record.yaml` and final output |
186
152
  | `onto_list_lenses` | List canonical lens sets |
@@ -192,79 +158,36 @@ Available MCP tools:
192
158
  | `onto_reconstruct_status` | Read reconstruct session status, progress, counts, and artifact refs |
193
159
  | `onto_reconstruct_result` | Read `reconstruct-record.yaml`, run manifest, progress projection, and final output |
194
160
 
195
- MCP results include `llmPresentation` prompts. The runtime supplies bounded
196
- facts; the host LLM should use those prompts to explain the opening brief and
197
- final result to the user without inventing settings or findings.
198
-
199
- ### Self-documentation (resources and prompts)
200
-
201
- The server advertises MCP `resources` and `prompts` so a host LLM can learn onto
202
- without external docs:
203
-
204
- - **Resource `onto://usage`** — a usage guide covering provider setup, the review
205
- and reconstruct workflows, the running-handle polling pattern, and output-size
206
- guidance. Discover with `resources/list`, read with `resources/read`.
207
- - **Prompts** (`prompts/list` / `prompts/get`) — canonical task templates
208
- `review_target` (args: `target`, `intent`, `reviewMode`) and `reconstruct_seed`
209
- (args: `targetRefs`, `intent`) that expand into ready-to-run instructions.
210
-
211
- `onto_review_status` accepts `projectionLevel` (`compact` | `standard` | `full`,
212
- default `full`); use `compact` in token-limited hosts since the full status can be
213
- large.
214
-
215
- When `onto_review`, `onto_review_continue`, or `onto_reconstruct` starts, the
216
- runtime writes a session-local `runtime-events.ndjson` stream and tries to open
217
- `scripts/onto-runtime-watch.sh` in a supported terminal split/tab. Current
218
- automatic attach targets are `tmux`, Codex Desktop with a configured launcher
219
- path, Warp, Cursor, iTerm2, and Apple Terminal. Codex Desktop attach never uses
220
- UI keystroke automation by default; set
221
- `ONTO_RUNTIME_WATCHER_CODEX_APP_LAUNCHER=/absolute/path/to/launcher.sh` to
222
- enable it. The launcher receives `watcherScript`, `sessionRoot`, `projectRoot`,
223
- and `watcherCommand` as positional arguments. Unsupported hosts can set
224
- `ONTO_RUNTIME_WATCHER_COMMAND` with a launcher template containing
225
- `{watcherCommand}`. Each stream line is source-tagged by pipeline,
226
- unit/stage/process, and stdout/stderr/status. Set `ONTO_RUNTIME_WATCHER=0` to
227
- disable the automatic terminal attach.
228
-
229
- Minimal reconstruct MCP call shape:
161
+ MCP results include `llmPresentation` prompts: the runtime supplies bounded
162
+ facts, and the host LLM uses those prompts to explain the opening brief and
163
+ final result without inventing settings or findings.
230
164
 
231
- ```json
232
- {
233
- "name": "onto_reconstruct",
234
- "arguments": {
235
- "projectRoot": "/path/to/project",
236
- "targetRefs": ["src/example.ts"],
237
- "intent": "Create a bounded reconstruct Seed from this target.",
238
- "domain": "ontology",
239
- "sessionRoot": ".onto/reconstruct/example-run"
240
- }
241
- }
242
- ```
165
+ ### Self-documentation
243
166
 
244
- `semanticAuthorRealization` and `confirmationProviderRealization` default to
245
- `direct_call`. Configure `.onto/settings.json` or user `~/.onto/settings.json`
246
- with provider/model settings before running. Test-only mock helpers are
247
- verification realizations: they can support contract and harness checks, but
248
- they are not product completion or semantic quality evidence.
167
+ The server advertises MCP `resources` and `prompts` so a host LLM can learn
168
+ onto without external docs:
249
169
 
250
- For MCP clients, prefer the `llmPresentation.openingBrief` and
251
- `llmPresentation.finalResult` prompt/input pairs when presenting start and
252
- finish explanations.
170
+ - **Resource `onto://usage`** — provider setup, the review and reconstruct
171
+ workflows, the running-handle polling pattern, and output-size guidance.
172
+ - **Prompts** — canonical task templates `review_target` (args: `target`,
173
+ `intent`, `reviewMode`) and `reconstruct_seed` (args: `targetRefs`,
174
+ `intent`).
253
175
 
254
- Route hardening is available as a development verification harness:
176
+ `onto_review_status` accepts `projectionLevel` (`compact` | `standard` |
177
+ `full`); use `compact` in token-limited hosts.
255
178
 
256
- ```bash
257
- npm run check:review:route
258
- ```
179
+ ### Runtime watcher
259
180
 
260
- It validates the configured review route and provider/auth preflight behavior.
261
- Mock-backed or fixture-backed checks should be reported separately from live
262
- E2E evidence.
181
+ When a review or reconstruct run starts, the runtime writes a session-local
182
+ `runtime-events.ndjson` stream and tries to open a live watcher in a supported
183
+ terminal (tmux, Warp, Cursor, iTerm2, Apple Terminal, Codex Desktop with a
184
+ configured launcher). Set `ONTO_RUNTIME_WATCHER=0` to disable, or
185
+ `ONTO_RUNTIME_WATCHER_COMMAND` with a `{watcherCommand}` template for
186
+ unsupported hosts.
263
187
 
264
- ## Settings
188
+ ## Configuration
265
189
 
266
- Runtime settings live in `settings.json`. The file keeps a JSON shape, and
267
- onto-mcp also accepts `#` comments for user-facing explanations.
190
+ Runtime settings live in `settings.json` (JSON shape; `#` comments accepted):
268
191
 
269
192
  | Path | Role |
270
193
  |---|---|
@@ -273,10 +196,7 @@ onto-mcp also accepts `#` comments for user-facing explanations.
273
196
 
274
197
  Project settings override user defaults for scalar keys. In
275
198
  `settings.json/v3`, actor `llm` blocks are complete model settings; they do not
276
- inherit from a root `llm.default`. Reconstruct direct-call execution uses
277
- `reconstruct.execution.actors.semantic_author.llm` and
278
- `reconstruct.execution.actors.confirmation_provider.llm`; v3 does not expose a
279
- root reconstruct LLM setting.
199
+ inherit from a root `llm.default`.
280
200
 
281
201
  Minimal Codex OAuth profile:
282
202
 
@@ -355,7 +275,8 @@ LLM switcher axes:
355
275
 
356
276
  | auth | provider | Runtime path |
357
277
  |---|---|---|
358
- | `oauth` | `openai` | Codex worker |
278
+ | `oauth` | `openai` | Codex worker (subscription) |
279
+ | `oauth` | `anthropic` | Claude Code worker (subscription) |
359
280
  | `api_key` | `openai` | OpenAI API |
360
281
  | `api_key` | `anthropic` | Anthropic API |
361
282
  | `api_key` | `grok` | xAI/Grok OpenAI-style API |
@@ -363,228 +284,12 @@ LLM switcher axes:
363
284
 
364
285
  Unsupported settings stop during profile resolution.
365
286
 
366
- ## Review Artifacts
367
-
368
- A review session writes artifacts under `.onto/review/<session-id>/`.
369
-
370
- Primary outputs:
371
-
372
- | Artifact | Purpose |
373
- |---|---|
374
- | `execution-plan.yaml` | bounded runtime plan |
375
- | `issue-ledger.yaml` | normalized issue list |
376
- | `issue-stance-matrix.yaml` | every participating lens stance per issue |
377
- | `deliberation.md` | teamlead-controlled deliberation result |
378
- | `problem-framing.yaml` | end-of-review problem classification |
379
- | `review-run-manifest.yaml` | packet/output refs and hashes |
380
- | `review-record.yaml` | primary structured review artifact |
381
- | `final-output.md` | principal-facing report with `Final Review Result` explanation |
382
-
383
- ## Reconstruct Artifacts
384
-
385
- A reconstruct session writes artifacts under `.onto/reconstruct/<session-id>/`.
386
-
387
- Target runtime-gated outputs below are a non-authoritative quick map. The active
388
- artifact and gate catalog authority is
389
- `.onto/processes/reconstruct/reconstruct-contract-registry.yaml`.
390
-
391
- | Artifact | Owner | Purpose |
392
- |---|---|---|
393
- | `reconstruct-run-control.yaml` | runtime | atomic session owner admission, request fingerprint, idempotency hash, attempt/lock state, and observed file-hash write transactions |
394
- | `reconstruct-run-control-validation.yaml` | runtime | validation that the current atomically admitted attempt owns the session root and has no conflicting request, lock, or committed transaction hash gap |
395
- | `reconstruct-run-control.pre-publication-validation.yaml` | runtime | immutable run-control checkpoint consumed by pre-publication claim projection before final write publication rewrites the final validation path |
396
- | `reconstruct-run-bootstrap-diagnostic.yaml` | runtime | pre-trust diagnostic for duplicate-conflict or other run-control failure before semantic artifacts are consumed |
397
- | `registry-verification-evidence.yaml` | runtime | current registry hash and active artifact, gate, validator, predicate, and source-profile subject evidence |
398
- | `registry-verification-evidence-validation.yaml` | runtime | validation that registry evidence matches the current registry file and every active gate has validator and predicate closure |
399
- | `target-material-profile.yaml` | runtime | detected `target_material_kind`, support status, and selected source profiles |
400
- | `target-material-profile-validation.yaml` | runtime | material profile gate status and selected-profile closure |
401
- | `source-inventory.yaml` | runtime | material-specific inventory units and scan boundary |
402
- | `source-observations.yaml` | runtime | structural observations with stable evidence ids and source content fingerprints |
403
- | `source-safety-ledger.yaml` | runtime | six-axis source safety rows keyed by observation plus intended consumption, with derived prompt/evidence/output/replay/material-claim visibility; public-output and material-claim rows default to authority-gap states unless explicitly authorized for that consumption |
404
- | `source-safety-ledger-validation.yaml` | runtime | validation that every observation has scoped consumption rows and that canonical axes, derived visibility, and redaction proof details are consistent |
405
- | `source-scout-pack.yaml` | runtime | deterministic actor/action/state-first profile-local scout index derived from source observations and source safety, without selected-purpose or ontology-claim authority |
406
- | `source-scout-pack-validation.yaml` | runtime | validation that scout rows resolve to observations, prompt-visible rows have valid source-safety permission, unsupported scopes do not overclaim, and pack hashes bind to current upstream artifacts |
407
- | `source-scout-pack.pre-seed.yaml` | runtime | immutable SourceScoutPack snapshot consumed by source-purpose, candidate-inventory, seed-readiness, and seed authoring provenance before maturation |
408
- | `source-scout-pack-validation.pre-seed.yaml` | runtime | validation snapshot for the pre-seed consumed SourceScoutPack |
409
- | `source-scout-pack.post-maturation.yaml` | runtime | immutable SourceScoutPack snapshot after maturation source lineage refresh; `source-scout-pack.yaml` remains the latest-current alias |
410
- | `source-scout-pack-validation.post-maturation.yaml` | runtime | validation snapshot for the post-maturation consumed SourceScoutPack |
411
- | `post-maturation-gate-projection-validation.yaml` | runtime | later terminal-equivalent projection proving the post-maturation SourceScoutPack gate is applicable and valid before final-output or record consumption |
412
- | `source-observation-directive.yaml` | host LLM author | selected observations for evidence use |
413
- | `source-observation-directive-validation.yaml` | runtime | validation of selected observation refs |
414
- | `reconstruct-run-control.yaml#resume_rows` | runtime | promoted same-request resume admission when existing authored artifacts have matching provenance and no completed attempt already owns the session |
415
- | `rounds/<round-id>/lens-judgments/*.yaml` | host LLM author | reconstruct lens judgments over trusted observations |
416
- | `rounds/<round-id>/exploration-synthesis.yaml` | host LLM author | integrated gaps and next-source needs |
417
- | `rounds/<round-id>/source-frontier.yaml` | host LLM author plus bounded runtime policy | requested next source refs or no-next-frontier rationale; round-1 may receive scout-derived actor/action/state gap candidates and runtime may add up to three unobserved inventory refs when the author returns an empty frontier |
418
- | `rounds/<round-id>/source-frontier-validation.yaml` | runtime | frontier validation plus explicit dependency proof on `target-material-profile-validation.yaml` |
419
- | `rounds/<round-id>/source-observation-delta.yaml` | runtime | per-round lineage for newly observed frontier refs before the expanded source observations are reused, including batch and triggering-frontier validation identity |
420
- | `rounds/<round-id>/source-observation-delta-validation.yaml` | runtime | validation that delta rows match accepted frontier refs, observed source refs, material kind, observation hashes, batch identity, and frontier-validation identity |
421
- | `rounds/<round-id>/source-observation-reentry-validation.yaml` | runtime | validation that delta observations passed lineage and source-safety gates before prompt/context re-entry and answer-support consumption |
422
- | `source-observation-lineage-index.yaml` | runtime | session-level index of every round delta, delta validation, re-entry validation, frontier kind, and added observation id consumed by answer-support validation |
423
- | `source-observation-lineage-index-validation.yaml` | runtime | validation that the session lineage index matches valid round delta validations, re-entry validations, frontier kinds, and observed source ids before downstream semantic use |
424
- | `source-purpose-candidates.yaml` | host LLM author | ranked source-derived purpose candidates with P1-P5 evidence strength, selected purpose frame, and static/kinetic/dynamic required elements |
425
- | `source-purpose-candidates-validation.yaml` | runtime | source-purpose evidence, selected primary, mixed lineage, contradiction, and confirmation-required validation |
426
- | `purpose-confirmation.yaml` | host/user mediated | confirmation record for inferred or limitation-backed selected purpose; `not_required` for directly source-declared purpose |
427
- | `purpose-confirmation-validation.yaml` | runtime | purpose confirmation gate that blocks seed readiness when confirmation is pending, rejected, unavailable, or requires rerun |
428
- | `material-admission-ledger.yaml` | runtime | admission rows for purpose-critical adequacy elements, with a separate phase reserved for literal source-backed material values |
429
- | `material-admission-ledger-validation.yaml` | runtime | validation that admitted/required/supporting admission rows are consumed downstream or explicitly closed, and rejected/deferred rows cannot silently affect actionability |
430
- | `candidate-inventory.yaml` | host LLM author | salient object, actor, action, workflow, permission, data source, constraint, and concept candidates |
431
- | `candidate-disposition.yaml` | host LLM author | one disposition for every salient candidate, including planned target seed refs for promoted candidates |
432
- | `candidate-disposition-validation.yaml` | runtime | inventory/disposition closure and projection validation |
433
- | `seed-authoring-readiness.yaml` | runtime | deterministic pre-seed selected-purpose closure projection over validated purpose, source scout, material admission, and candidate disposition authorities; max-round exhaustion keeps sufficient selected scope distinct from exhausted open-frontier source insufficiency |
434
- | `seed-authoring-readiness-validation.yaml` | runtime | validation that readiness rows match selected `PurposeAdequacyFrame.required_elements[]`, max-round interpretation, and the deterministic-gate/semantic-authority boundary; validation may be valid while readiness classification blocks seed authoring |
435
- | `ontology-seed.yaml` | host LLM author | primary ontology seed for maturation iteration |
436
- | `ontology-seed-validation.yaml` | runtime | seed layer, id, binding, disposition, and evidence-ref validation |
437
- | `claim-realization-map.yaml` | host LLM author | one realization stance for every ontology seed claim |
438
- | `claim-realization-map-validation.yaml` | runtime | seed-claim closure and realization evidence validation |
439
- | `competency-questions.yaml` | host LLM author | questions linked to the declared purpose, seed layers, registry facets, proof-contract refs, admitted domain competency ids, and diagnostic/claim-based dispositions |
440
- | `competency-questions-validation.yaml` | runtime | question id, derived evidence scope, seed-link, evidence, registry facet/proof refs, exactly-one admitted domain competency coverage, and run-manifest admitted domain trace validation |
441
- | `competency-question-assessment.yaml` | host LLM author + runtime projections | answer status, required seed refs, evidence refs, and downstream effect for every authoritative CQ |
442
- | `competency-question-assessment-validation.yaml` | runtime | exactly-once CQ assessment validation plus answer-status/downstream-effect and seed/evidence closure |
443
- | `seed-confirmation.yaml` | host/user mediated | confirmation or limitation decision over validated seed claims before CQ authoring |
444
- | `seed-confirmation-validation.yaml` | runtime | confirmation closure and CQ eligibility over the validated seed; terminal seed iteration readiness is owned by `handoff-decision-validation.yaml` |
445
- | `failure-classification.yaml` | host LLM author | material failure and gap classification |
446
- | `failure-classification-validation.yaml` | runtime | failure enum, linkage, and materiality validation |
447
- | `revision-proposal.yaml` | host LLM author | bounded revision/deferral proposals |
448
- | `revision-proposal-validation.yaml` | runtime | proposal id, target, action, and regression guard validation |
449
- | `reconstruct-metrics.yaml` | runtime | deterministic counts, answerability bucket counts, unresolved/deferred counts, and pass rate |
450
- | `stop-decision.yaml` | host LLM author | proposed stop/continue/ask-user decision; not the readiness authority |
451
- | `handoff-decision-validation.yaml` | runtime | canonical seed iteration readiness projection from runtime gates plus `stop-decision.yaml` consistency before final output and record projection |
452
- | `maturation-baseline.yaml` | runtime | immutable M1 projection from validated source-purpose frame, seed refs, CQ assessment, limitations, and the validated seeding reconstruct record |
453
- | `maturation-baseline-validation.yaml` | runtime | baseline row closure against purpose elements, surfaces, dimensions, mixed lineage, upstream validations, and source seeding record ref/hash |
454
- | `baseline-actionability-matrix.yaml` | runtime | immutable baseline-derived matrix consumed by M2 question frontier authoring |
455
- | `baseline-actionability-matrix-validation.yaml` | runtime | baseline matrix derivation and frontier-required row validation before question authoring |
456
- | `maturation-question-frontier.yaml` | host LLM author | M2 concrete questions for material frontier-required rows |
457
- | `maturation-question-frontier-validation.yaml` | runtime | question id, ref, materiality, surface/dimension, authority need, and material coverage validation |
458
- | `maturation-closure-frontier.yaml` | host LLM author | M3 next-source or authority requests for material unanswered maturation questions |
459
- | `maturation-closure-frontier-validation.yaml` | runtime | duplicate, already-observed source, unsupported source, concrete-location, question, materiality, and authority-request validation |
460
- | `maturation-authority-response.yaml` | runtime | explicit projection of authority responses or deferred authority absence for closure-frontier requests |
461
- | `maturation-authority-response-validation.yaml` | runtime | authority request/ref/status/scope validation before support ledgers consume responses |
462
- | `answer-support-ledger.yaml` | host LLM author | M3 positive support clusters for answer claims, backed by direct authority, runtime proof, user confirmation, authority response, or convergent source evidence |
463
- | `answer-support-ledger-validation.yaml` | runtime | support-mode, source-observation lineage, source-safety proof sufficiency/replay, evidence closure, independence, contradiction, and deferred-authority validation |
464
- | `maturation-answer-claims.yaml` | host LLM author | M3 answers to frontier questions derived only from validated positive support clusters |
465
- | `maturation-answer-claims-validation.yaml` | runtime | question/support/surface/dimension/purpose ref closure and partial-answer limitation validation |
466
- | `ontology-expansion.yaml` | host LLM author | M4 overlay additions, refinements, deferrals, or rejections without rewriting `ontology-seed.yaml` |
467
- | `ontology-expansion-validation.yaml` | runtime | answer-claim ref closure, evidence carry-forward, concept economy, and seed rewrite guard validation |
468
- | `actionability-matrix.yaml` | runtime | current projection recomputed after validated answer claims and ontology expansion |
469
- | `actionability-matrix-validation.yaml` | runtime | matrix derivation, maturity upgrade, supporting-ref, and material frontier-required row validation |
470
- | `maturation-source-delta.yaml` | runtime | source-observation delta impact projection against current actionability rows |
471
- | `maturation-source-delta-validation.yaml` | runtime | validation that source delta impact state and affected matrix rows match the current source/actionability evidence |
472
- | `maturation-convergence-ledger.yaml` | runtime | M4 closure ledger for material questions, answer/expansion closure, deferred authority, blocked rows, remaining frontier, and final re-question projection |
473
- | `maturation-convergence-ledger-validation.yaml` | runtime | closure-row and final re-question validation that blocker/high questions, answer claims, expansions, and remaining frontier refs are not hidden before continuation |
474
- | `maturation-continuation-decision.yaml` | runtime | M4 continuation projection: `continue`, `ask_user`, `blocked`, `actionable_limited`, or `actionable_ready`; `actionable_ready` is withheld until final re-question convergence is proven |
475
- | `maturation-continuation-decision-validation.yaml` | runtime | continuation-state validation against matrix, frontier, support, authority response, expansion, and convergence-ledger validation |
476
- | `query-proofs.yaml` / `query-proofs-validation.yaml` | runtime | query/API proof authority boundary; current runs emit explicit `not_claimed` rows unless runtime query proof is actually claimed |
477
- | `visualization-proofs.yaml` / `visualization-proofs-validation.yaml` | runtime | visualization proof authority boundary; current runs emit explicit `not_claimed` rows unless visual proof is actually claimed |
478
- | `graph-exploration-proofs.yaml` / `graph-exploration-proofs-validation.yaml` | runtime | graph exploration proof authority boundary; current runs emit explicit `not_claimed` rows unless graph traversal proof is actually claimed |
479
- | `actionable-ontology.yaml` | runtime | optional final matured ontology projection when continuation reaches `actionable_limited` or `actionable_ready` without inventing new semantic content |
480
- | `actionable-ontology-validation.yaml` | runtime | actionability-claim, claim-scope, row coverage, limitation, final re-question, and proof-boundary validation |
481
- | `claim-projection.yaml` | runtime | pre-publication public/status/result/API/MCP claim boundary and final-output claim authority refs derived from handoff, pre-publication run-control, registry verification, source safety, material admission, target-material profile validation, and maturation continuation validation |
482
- | `claim-projection-validation.yaml` | runtime | projection surface, claim-level, decision-state, actionability-claim, governance-scope, material-kind/member support lineage, capability-specific UX status, and current upstream validation-ref closure |
483
- | `final-output.md` | host LLM author + runtime footer | user-facing result grounded in artifacts, seed validity, claim projection, and maturation limitations |
484
- | `reconstruct-run-manifest.yaml` | runtime | step refs, `performed_by` provenance, execution profile, requested domain ids, and purpose adequacy scope |
485
- | `reconstruct-run-manifest.post-publication-validation.yaml` | runtime | post-publication registry hash, active contract hash, source profile migration, validator, reference-standard, pattern-catalog URI/snapshot, version, and migration snapshot consistency after final output and record refs exist |
486
- | `reconstruct-record.yaml` | runtime | primary structured reconstruct artifact |
487
-
488
- The runtime keeps full source evidence in `source-observations.yaml` and full
489
- purpose authority in `source-purpose-candidates.yaml`. LLM authoring calls may
490
- receive compact prompt projections, such as selected observations with shortened
491
- text excerpts, `source_purpose_projection` for the selected purpose candidate,
492
- `ontology_seed_summary` for claim and competency-question authoring, and
493
- `allowed_claims` for claim realization, while validation still checks all
494
- generated evidence refs against the full artifact truth.
495
- `source-scout-pack.yaml` is the latest-current compact non-semantic projection.
496
- Pre-seed consumers use `source-scout-pack.pre-seed.yaml` and
497
- `source-scout-pack-validation.pre-seed.yaml` so their provenance remains bound
498
- to the exact scout snapshot they consumed even after maturation refreshes the
499
- latest-current alias. The reconstruct contract registry exposes the latest,
500
- pre-seed, and post-maturation scout validations as separate active
501
- validator/gate authorities, and `seed-authoring-readiness-validation.yaml`
502
- depends on the concrete pre-seed validation snapshot sibling rather than the
503
- mutable alias or another session's same-basename snapshot. The
504
- pre-handoff terminal projection treats the post-maturation gate as not
505
- applicable until the post-maturation snapshot exists; terminal validation also
506
- projects `source_scout_pack_post_maturation_gate` when a manifest contains the
507
- post-maturation snapshot refs. The live run path additionally writes
508
- `post-maturation-gate-projection-validation.yaml` after
509
- `source-scout-pack.post-maturation.yaml` and
510
- `source-scout-pack-validation.post-maturation.yaml` exist, then requires that
511
- projection in final-output provenance and the reconstruct record so the
512
- post-maturation gate is not only declared by the registry. This projection also
513
- requires the post-maturation validation artifact to point at the concrete
514
- same-session sibling snapshot, not merely a matching basename.
515
- The
516
- scout projection prioritizes actor/action/state
517
- inspection without replacing evidence refs or selected-purpose authority.
518
- For mixed targets, the current scout scope may record
519
- `member_scoped_composite`, but it emits no scout signal rows and carries an
520
- explicit limitation until a member-scoped scout contract is promoted.
521
- Explicit authored-artifact resume is fail-closed through reuse provenance that
522
- binds intent, target refs, source inventory/observations, governing domain
523
- snapshot, provider ids, source-safety validation, scout pack validation, source
524
- lineage validation, and seed-authoring readiness validation once each authority
525
- exists. Run-control `resume_rows[]` records the provenance match policy and
526
- check refs used for the promoted resume audit.
527
- Terminal projection uses `handoff-decision-validation.yaml.readiness_projection`
528
- as the seed iteration readiness authority and requires atomically admitted valid run-control, valid registry verification,
529
- validated handoff, and a validated pre-handoff run-manifest snapshot. Run-control write transactions currently record
530
- post-write `observed_file_hash` evidence; they do not claim every writer used
531
- atomic rename. Public claim surfaces use
532
- `claim-projection-validation.yaml`, so seed handoff readiness and actionable
533
- ontology readiness remain separate claims. The final
534
- `reconstruct-run-manifest.post-publication-validation.yaml` is the post-publication audit for the
535
- complete manifest after `final-output.md` and `reconstruct-record.yaml` refs are
536
- known; it is not a prerequisite for the pre-handoff seed iteration readiness projection, but it is the required terminal authority before run-control can record durable completion or promote `resume_allowed`. The
537
- same artifact records `gate_projection[]`, where each
538
- active gate is evaluated through the registry `required_when_predicate_catalog`
539
- before validation status is required.
540
-
541
- Current reconstruct runs emit explicit proof-authority boundary artifacts for
542
- query, visualization, and graph exploration surfaces. They default to
543
- `not_claimed` unless a future runtime actually produces executable proof rows.
544
- Other conditional proof surfaces remain planned:
545
-
546
- | artifact | authority |
547
- |---|---|
548
- | `required-when-evaluation.yaml` / `required-when-evaluation-validation.yaml` | standalone audited conditional-gate applicability trace; the current terminal handoff projection embeds predicate input/result details in `handoff-decision-validation.yaml.gate_projection[]` |
549
- | `ontology-handoff mapping proof` | per-axis ontology handoff mapping gate once that validator is implemented |
550
-
551
- The active seed target is defined by
552
- `.onto/processes/reconstruct/operational-ontology-seed-contract.md`.
553
- The full seeding and maturation plan is
554
- `.onto/processes/reconstruct/ontology-seeding-and-maturation-design.md`.
555
- The active contract, source profile, lens judgment, artifact, gate, seed iteration readiness, and
556
- projection authority registry is
557
- `.onto/processes/reconstruct/reconstruct-contract-registry.yaml`.
558
- The seed is valid only when process completion, seed validation, downstream
559
- gates, and maturation limitations are reported separately and consistently.
560
- The seed and later maturation loop judge actionability through three coverage
561
- surfaces: `static_surface` for what exists and what evidence grounds it,
562
- `kinetic_surface` for who can do what and what changes, and `dynamic_surface`
563
- for conditions, permissions, states, exceptions, runtime context, external
564
- dependencies, and unresolved decisions that change the answer.
565
-
566
- ## Repository Map
287
+ ## Documentation
567
288
 
568
- | Path | Role |
289
+ | Document | Contents |
569
290
  |---|---|
570
- | `.onto/authority/` | canonical ontology data and runtime registries |
571
- | `.onto/processes/shared/` | cross-process target and runtime contracts |
572
- | `.onto/processes/review/` | review contracts |
573
- | `.onto/processes/reconstruct/` | reconstruct contracts and source profiles |
574
- | `.onto/domains/` | bundled domain documents |
575
- | `src/core-runtime/` | TypeScript runtime |
576
- | `src/core-api/` | library facade used by MCP |
577
- | `src/mcp/` | MCP tool surface |
578
- | `development-records/` | development records and archived material |
579
- | `IMPLEMENTATION_MAP.html` | visual architecture and roadmap map |
580
-
581
- ## Verification
582
-
583
- ```bash
584
- npm run check:ts-core
585
- npm run build:ts-core
586
- npm run check:mcp:review
587
- npm run check:review:route
588
- npm run test:e2e
589
- git diff --check
590
- ```
291
+ | [reconstruct contract registry](https://github.com/kangminlee-maker/onto-mcp/blob/main/.onto/processes/reconstruct/reconstruct-contract-registry.yaml) | active reconstruct artifact/gate authority graph (prose contracts alongside) |
292
+ | [docs/development.md](https://github.com/kangminlee-maker/onto-mcp/blob/main/docs/development.md) | verification harnesses and development workflow |
293
+ | [docs/architecture/repo-layout.md](https://github.com/kangminlee-maker/onto-mcp/blob/main/docs/architecture/repo-layout.md) | repository layout SSOT: folder roles and placement rules |
294
+ | [docs/architecture/](https://github.com/kangminlee-maker/onto-mcp/tree/main/docs/architecture) | architecture notes |
295
+ | [docs/roadmap.md](https://github.com/kangminlee-maker/onto-mcp/blob/main/docs/roadmap.md) | staged roadmap |