omnius 1.0.646 → 1.0.648

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.
@@ -0,0 +1,320 @@
1
+ # Omnius Reliability and Long-Horizon Workboard
2
+
3
+ Updated: 2026-08-28
4
+
5
+ This file is the durable workboard for the current repair program.
6
+ It records scope, dependencies, evidence, and closure rules.
7
+
8
+ ## Status rules
9
+
10
+ - `[x]` means that code and focused tests are complete.
11
+ - `[ ] ACTIVE` means that work is in progress.
12
+ - `[ ] VERIFY` means that code exists, but a required gate is open.
13
+ - `[ ] QUEUED` means that an active dependency must finish first.
14
+ - `[ ] EXTERNAL` means that completion needs a repository or service action.
15
+
16
+ ## P0: Telegram reliability
17
+
18
+ - [x] Trace the failing Telegram request from intake to final route.
19
+ - Evidence: The router aborts after two 30-second request windows.
20
+ - Evidence: The broker can still have an active or queued request.
21
+ - Evidence: The plain retry is skipped after the liveness abort.
22
+ - Required result: Telegram must not cancel healthy queued inference.
23
+ - [x] Compare Telegram transport with `AgenticRunner` transport.
24
+ - Compare endpoint selection.
25
+ - Compare native Ollama transport.
26
+ - Compare broker admission.
27
+ - Compare request timeout behavior.
28
+ - Compare stream inactivity behavior.
29
+ - Compare unary fallback behavior.
30
+ - Compare thinking suppression.
31
+ - Compare context sizing.
32
+ - Compare usage accounting.
33
+ - [x] Replace the 30-second router deadline.
34
+ - Do not count broker queue time as model failure.
35
+ - Use a progress-aware inactivity limit.
36
+ - Keep one bounded whole-request safety limit.
37
+ - Do not start a duplicate unary request after an abort.
38
+ - Preserve user cancellation.
39
+ - [x] Prevent duplicate inference after stream failure.
40
+ - Retry only for a transport or protocol incompatibility.
41
+ - Do not retry an aborted or timed-out generation as unary inference.
42
+ - Release each broker slot exactly once.
43
+ - [x] Make the host broker authoritative for capacity.
44
+ - Use the public broker endpoint at `http://127.0.0.1:11434`.
45
+ - Do not start a local Ollama pool for this endpoint.
46
+ - Preserve `think: false` and `num_ctx` on broker requests.
47
+ - Preserve host lane selection and model aliases.
48
+ - [ ] ACTIVE — Reduce router prompt and call amplification.
49
+ - Measure the silent-reflection prompt.
50
+ - Measure the attention-router prompt.
51
+ - Remove duplicate context.
52
+ - Keep required persona, relationship, and thread evidence.
53
+ - Avoid repair calls when no model token was returned.
54
+ - [x] Add Telegram timeout and retry regression tests.
55
+ - Test a 45-second first-token delay.
56
+ - Test a queued broker request.
57
+ - Test a slow active stream.
58
+ - Test an actual stalled stream.
59
+ - Test user cancellation.
60
+ - Test a protocol error that permits unary fallback.
61
+ - Test an abort that forbids unary fallback.
62
+ - [x] Run focused Telegram suites.
63
+ - [x] Build the CLI package.
64
+ - [ ] VERIFY — Run live Telegram route inference.
65
+ - Endpoint: `http://127.0.0.1:11434`.
66
+ - Model: `robit/ornith-1.5:9b`.
67
+ - Required GPU: a broker-selected A100 80 GB GPU.
68
+ - Forbidden GPU: the GT 1030.
69
+ - Required result: valid visible route JSON.
70
+ - Required result: nonzero generated token telemetry.
71
+ - Required result: no 30-second abort.
72
+
73
+ ## P0: Router empty-content failure
74
+
75
+ - [x] Separate Ollama transport detection from local pool ownership.
76
+ - [x] Use native `/api/chat` for broker-managed Ollama control requests.
77
+ - [x] Send `think: false` through the broker transport.
78
+ - [x] Send `num_ctx` through the broker transport.
79
+ - [x] Strip prior hidden-thinking blocks from model history.
80
+ - [x] Record JSON-mode and plain-mode outcomes separately.
81
+ - [x] Preserve exact backend errors in router diagnostics.
82
+ - [x] Skip repair when the backend returned no visible text.
83
+ - [x] Remove the premature Telegram liveness abort.
84
+ - [ ] VERIFY — Confirm that the route parser receives visible JSON live.
85
+
86
+ ## P0: Model broker and parallel inference
87
+
88
+ - [x] Confirm that the host broker is available.
89
+ - [x] Confirm that the parallel pool is enabled.
90
+ - [x] Confirm a maximum of three managed servers.
91
+ - [x] Confirm one in-flight request per managed lane.
92
+ - [x] Confirm that three A100 80 GB GPUs are selected.
93
+ - [x] Confirm that the GT 1030 is not selected.
94
+ - [x] Confirm that the 9B model is resident on an A100.
95
+ - [x] Confirm that no Ollama runner is resident on the GT 1030.
96
+ - [x] Confirm the exact model tag `robit/ornith-1.5:9b`.
97
+ - [x] Confirm model context length `262144`.
98
+ - [x] Confirm model capabilities for completion, vision, tools, and thinking.
99
+ - [ ] VERIFY — Confirm that Omnius can request broker capacity without bypass.
100
+ - [ ] VERIFY — Confirm parallel sub-agent requests on separate host lanes.
101
+ - [ ] VERIFY — Confirm that broker queue time remains visible to Telegram.
102
+ - [ ] EXTERNAL — Confirm the broker repository commit on `main`.
103
+ - [ ] EXTERNAL — Confirm the required broker service restart state.
104
+
105
+ ## P0: Live inference hardware gate
106
+
107
+ - [x] Read `/usr/local/share/ollama-unify/AGENTS.md`.
108
+ - [x] Run `docker gpu discover`.
109
+ - [x] Confirm public endpoint `http://127.0.0.1:11434`.
110
+ - [x] Confirm backend endpoint `http://127.0.0.1:11436`.
111
+ - [x] Inspect `/api/ps`.
112
+ - [x] Inspect `/api/tags` for the exact model.
113
+ - [x] Inspect `/api/show` for the exact model.
114
+ - [x] Inspect `nvidia-smi` GPU inventory.
115
+ - [x] Inspect `nvidia-smi` model process placement.
116
+ - [x] Confirm model runner PID `2199237` on an A100.
117
+ - [x] Confirm that no test runner uses the GT 1030.
118
+ - [ ] VERIFY — Send the first generated-token request.
119
+ - [ ] VERIFY — Inspect GPU placement during generation.
120
+ - [ ] VERIFY — Record response text, usage, timing, and graph validity.
121
+
122
+ ## P1: Ontology long-horizon work graph
123
+
124
+ - [x] Add a versioned operational-world schema.
125
+ - [x] Add strict work-node schemas.
126
+ - [x] Add strict relation schemas.
127
+ - [x] Add source-binding schemas.
128
+ - [x] Add evidence-reference schemas.
129
+ - [x] Add structured claim schemas.
130
+ - [x] Add first-class conflict schemas.
131
+ - [x] Add action-contract schemas.
132
+ - [x] Add world-patch schemas.
133
+ - [x] Add validation-result schemas.
134
+ - [x] Add immutable validation-receipt schemas.
135
+ - [x] Add bounded reasoning-slice schemas.
136
+ - [x] Export all schemas from `@omnius/schemas`.
137
+ - [x] Add a deterministic world reducer.
138
+ - [x] Reject stale base revisions.
139
+ - [x] Reject reused target revisions.
140
+ - [x] Reject duplicate patch targets.
141
+ - [x] Reject dangling references.
142
+ - [x] Reject duplicate semantic relations.
143
+ - [x] Reject invalid decomposition cycles.
144
+ - [x] Reject invalid temporal intervals.
145
+ - [x] Require evidence for verified relations and claims.
146
+ - [x] Preserve incompatible claims as conflicts.
147
+ - [x] Cascade node removal when a caller requests it.
148
+ - [x] Preserve full graph snapshots in revision history.
149
+ - [x] Emit deterministic graph and evidence hashes.
150
+ - [x] Persist operational-world state atomically.
151
+ - [x] Restore valid state at a task boundary.
152
+ - [x] Reject invalid persisted state.
153
+ - [x] Project the active objective.
154
+ - [x] Project todo hierarchy.
155
+ - [x] Project requirements.
156
+ - [x] Project acceptance criteria.
157
+ - [x] Project features, components, modules, and tasks.
158
+ - [x] Project source documents and sections.
159
+ - [x] Project target paths, symbols, documents, and external systems.
160
+ - [x] Project action nodes.
161
+ - [x] Project mutation nodes.
162
+ - [x] Project blocker nodes.
163
+ - [x] Project completion claims.
164
+ - [x] Project completion evidence.
165
+ - [x] Project trusted command receipts.
166
+ - [x] Preserve authority as explicit, adopted, or inferred.
167
+ - [x] Build target-focused graph slices.
168
+ - [x] Include supporting evidence.
169
+ - [x] Include refuting evidence.
170
+ - [x] Include open conflicts.
171
+ - [x] Preserve parent reference closure.
172
+ - [x] Preserve action-target closure.
173
+ - [x] Limit model-visible graph context.
174
+ - [x] Refresh the graph before each primary model turn.
175
+ - [x] Refresh the graph before each brute-force model turn.
176
+ - [x] Keep one current graph block in context.
177
+ - [x] Gate only explicit graph obligations.
178
+ - [x] Keep inferred graph content advisory.
179
+ - [x] Recheck graph authority on all terminal paths.
180
+ - [x] Document the implementation in `docs/ONTOLOGY-LONG-HORIZON-WORK-GRAPH.md`.
181
+ - [ ] VERIFY — Run live 9B graph decomposition inference.
182
+ - [ ] VERIFY — Parse the model patch with `WorldPatchSchema`.
183
+ - [ ] VERIFY — Apply the model patch with the deterministic reducer.
184
+ - [ ] VERIFY — Record a successful validation receipt.
185
+
186
+ ## P1: Todo ontology contract
187
+
188
+ - [x] Add `workKind`.
189
+ - [x] Add `requirementIds`.
190
+ - [x] Add `acceptanceIds`.
191
+ - [x] Add `sourceRefs`.
192
+ - [x] Add `targetRefs`.
193
+ - [x] Add typed action contracts.
194
+ - [x] Preserve all fields in the todo store.
195
+ - [x] Preserve all fields in todo tool input parsing.
196
+ - [x] Preserve all fields in no-change detection.
197
+ - [x] Export all new types.
198
+ - [x] Add persistence and update tests.
199
+
200
+ ## P1: Feature and completion authority
201
+
202
+ - [x] Invoke `verifyUnit` after accepted execution.
203
+ - [x] Fail the feature unit when verification returns false.
204
+ - [x] Fail the feature unit when verification throws.
205
+ - [x] Contain and persist verifier errors.
206
+ - [x] Prevent fallback completion without evidence.
207
+ - [x] Distinguish absent delivery manifests from invalid manifests.
208
+ - [x] Reject invalid authored delivery manifests.
209
+ - [x] Reject incomplete authored delivery manifests.
210
+ - [x] Require fresh verifier evidence after relevant mutations.
211
+ - [x] Keep frontier and inferred claim feedback advisory.
212
+ - [x] Add a bounded completion-hold escape.
213
+ - [x] Return `incomplete_verification` after repeated authoritative holds.
214
+ - [x] Apply the same fail-safe to alternate terminal paths.
215
+
216
+ ## P1: Inference visibility
217
+
218
+ - [x] Add a shell-style inference block.
219
+ - [x] Show elapsed inference time.
220
+ - [x] Show request kind, model, and session.
221
+ - [x] Show handling state before the first token.
222
+ - [x] Show thinking-token regions to the operator.
223
+ - [x] Show visible content-token regions to the operator.
224
+ - [x] Show streamed tool argument regions.
225
+ - [x] Show unary returned contracts before parsing.
226
+ - [x] Read usage from structured stream chunks.
227
+ - [x] Show an estimated generated-token count.
228
+ - [x] Add a read-mode control.
229
+ - [x] Expand all prior generated rows in read mode.
230
+ - [x] Keep thinking content out of Telegram replies.
231
+ - [x] Show broker queue admission as a separate phase.
232
+ - [x] Show time to first byte separately from queue time.
233
+ - [x] Stop showing successful `~0 tok` when provider usage is available.
234
+
235
+ ## P1: Clickable files, folders, and websites
236
+
237
+ - [x] Add one shared terminal-link utility.
238
+ - [x] Convert Markdown links to OSC 8 links.
239
+ - [x] Convert bare `http` and `https` URLs to OSC 8 links.
240
+ - [x] Convert absolute file paths to `file://` links.
241
+ - [x] Convert existing relative project paths to absolute `file://` links.
242
+ - [x] Remove line and column suffixes from the open target.
243
+ - [x] Keep line and column suffixes in visible text.
244
+ - [x] Link directories so the desktop file manager opens them.
245
+ - [x] Link files so the default file handler opens them.
246
+ - [x] Link websites so the default browser opens them.
247
+ - [x] Apply links to completed assistant Markdown.
248
+ - [x] Apply links to streamed assistant lines.
249
+ - [x] Apply links to Telegram diagnostics and sub-agent output.
250
+ - [x] Apply links to tool Markdown output that enters natural-language rendering.
251
+ - [x] Do not alter code blocks, commands, JSON, logs, or machine payloads.
252
+ - [x] Add terminal-link unit tests.
253
+ - [x] Add streaming-link regression tests.
254
+ - [x] Add Telegram-link regression tests.
255
+
256
+ ## P1: ASD-STE100 communication policy
257
+
258
+ - [x] Review ASD-STE100 Issue 9.
259
+ - [x] Add one shared STE communication policy.
260
+ - [x] Apply the policy to normal agent tiers.
261
+ - [x] Apply the policy to router prompts.
262
+ - [x] Apply the policy to Nexus requests.
263
+ - [x] Preserve code, JSON, commands, paths, identifiers, and quotations.
264
+ - [x] Preserve logs, tool output, and required machine formats.
265
+ - [x] Add prompt policy tests.
266
+ - [x] Update stale Nexus prompt tests.
267
+ - [ ] VERIFY — Review remaining dynamically generated tool instructions.
268
+ - [ ] VERIFY — Review remaining Telegram public prompts.
269
+ - [ ] VERIFY — Run a qualified human conformance review before certification.
270
+
271
+ ## P2: 2026 reliability practices
272
+
273
+ - [x] Use bounded intervention replay checkpoints.
274
+ - [x] Use evidence-grounded completion.
275
+ - [x] Use fresh post-mutation verification.
276
+ - [x] Use explicit authority boundaries.
277
+ - [x] Keep inferred scope advisory.
278
+ - [x] Use target-focused context slices.
279
+ - [x] Preserve contradictions instead of overwriting them.
280
+ - [x] Use deterministic reducers for model-proposed state.
281
+ - [x] Record immutable validation receipts.
282
+ - [x] Use bounded repeated-hold escape behavior.
283
+ - [ ] VERIFY — Recheck current 2026 primary literature before the final audit.
284
+ - [ ] VERIFY — Add exact citations to the final engineering review.
285
+
286
+ ## Verification record
287
+
288
+ - [x] Schema tests: 230 passed.
289
+ - [x] Todo-store tests: 39 passed.
290
+ - [x] Operational reducer tests: 9 passed.
291
+ - [x] Operational controller tests: 6 passed.
292
+ - [x] Operational runner test: 1 passed.
293
+ - [x] Feature-node tests: 7 passed.
294
+ - [x] Delivery coverage focused tests passed.
295
+ - [x] Workspace TypeScript builds passed.
296
+ - [x] Targeted Nexus tests passed.
297
+ - [x] Two full-suite timeout cases passed when run without worker contention.
298
+ - [x] Telegram transport, observability, link, and Bot API suites: 161 passed.
299
+ - [x] Native Ollama transport suite: 19 passed.
300
+ - [x] Model-broker focused suite: 6 passed.
301
+ - [x] Rerun Telegram focused suites after the timeout repair.
302
+ - [x] Rerun CLI typecheck and build after link support.
303
+ - [x] Rerun all workspace TypeScript builds after the transport repair.
304
+ - [ ] VERIFY — Run live Telegram inference.
305
+ - [ ] VERIFY — Run live ontology patch inference.
306
+
307
+ ## Closure rule
308
+
309
+ Do not close this workboard after a code-only result.
310
+
311
+ Close it only when these conditions are true:
312
+
313
+ 1. Telegram returns a valid route through the selected broker model.
314
+ 2. No healthy broker request fails at 30 seconds.
315
+ 3. Generated contract tokens are visible in the inference block.
316
+ 4. The operator can expand the complete inference transcript.
317
+ 5. Files, folders, and websites are clickable in natural-language output.
318
+ 6. The 9B model produces a valid ontology patch.
319
+ 7. The reducer accepts the patch and emits a receipt.
320
+ 8. Focused tests and workspace builds pass.
@@ -0,0 +1,351 @@
1
+ # Ontology Long-Horizon Work Graph
2
+
3
+ Date: 2026-08-28
4
+
5
+ ## Objective
6
+
7
+ Use an ontological graph to control large and long tasks.
8
+ Make each work item, relation, claim, and evidence item addressable.
9
+ Keep one canonical graph across planning, execution, verification, and completion.
10
+
11
+ ## Reference boundary
12
+
13
+ The [Ontology Workbench](https://robit-man.github.io/ontology/) is the documentation and reference implementation.
14
+ Its [raw source](https://github.com/robit-man/ontology/blob/main/index.html) defines the contracts and behavior.
15
+
16
+ Use the implementation as a contract reference.
17
+ Do not copy its browser and IndexedDB monolith into Omnius.
18
+
19
+ ## Implementation result
20
+
21
+ Omnius now has one versioned operational work graph across planning,
22
+ execution, evidence, and completion.
23
+
24
+ The implementation projects the existing todo and completion stores.
25
+ It does not add an independent planner or evidence store.
26
+
27
+ Implemented components:
28
+
29
+ - `packages/schemas/src/operational-world.ts` defines strict, versioned graph,
30
+ source, evidence, claim, conflict, action, patch, receipt, and reasoning-slice
31
+ contracts.
32
+ - `packages/orchestrator/src/operational-world/reducer.ts` validates and applies
33
+ immutable, revision-bound graph transactions.
34
+ - `packages/orchestrator/src/operational-world/workGraphProjection.ts` projects
35
+ objectives, requirements, work hierarchy, source documents and sections,
36
+ actions, mutations, targets, acceptance criteria, blockers, claims, and
37
+ completion evidence.
38
+ - `packages/orchestrator/src/operational-world/reasoningSlice.ts` selects a
39
+ bounded target neighborhood and preserves all required references.
40
+ - `packages/orchestrator/src/operational-world/persistence.ts` writes atomic
41
+ task-epoch snapshots with revision history and validation receipts.
42
+ - `packages/orchestrator/src/operational-world/controller.ts` owns projection,
43
+ persistence, model context, and explicit completion blockers.
44
+ - `AgenticRunner` refreshes the graph before each primary and brute-force model
45
+ turn. It exposes one current reasoning slice and rechecks explicit graph
46
+ closure at every terminal path.
47
+
48
+ The graph must join this chain:
49
+
50
+ ```text
51
+ objective
52
+ -> requirement
53
+ -> feature
54
+ -> component or module
55
+ -> task
56
+ -> artifact or mutation
57
+ -> claim
58
+ -> verification
59
+ -> evidence
60
+ ```
61
+
62
+ Relations must also represent dependencies, blockers, contradictions, and supersession.
63
+
64
+ ## Useful Ontology Workbench contracts
65
+
66
+ The reference separates four concerns:
67
+
68
+ - Type and schema definitions
69
+ - Mutable runtime instances
70
+ - Claims, evidence, and conflicts
71
+ - Objectives, plans, actions, approvals, and executions
72
+
73
+ The model proposes a revision-bound patch.
74
+ Deterministic code validates and applies the patch.
75
+ The code records an immutable revision receipt.
76
+
77
+ The reference also uses target-focused evidence collection.
78
+ It scans all target occurrences before it selects evidence.
79
+ It keeps varied semantic roles and document positions.
80
+ It also keeps supporting and contradicting evidence.
81
+
82
+ These contracts are more valuable than its first chunking algorithm.
83
+ Omnius already has stronger basic chunking, content hashes, staleness checks, and PDF coverage receipts.
84
+
85
+ ## Strong Omnius foundations
86
+
87
+ ### Work decomposition
88
+
89
+ - `todo-store.ts` has stable identifiers, parents, blockers, owners, dependencies, verifiers, and artifacts.
90
+ - `todoTruth.ts` derives hierarchy, open leaves, dependency state, and parent completion.
91
+ - `featurePlanner.ts` records paths, symbols, tests, evidence, questions, units, and return contracts.
92
+ - `featureNode.ts` provides recursive survey, plan, split, execute, verify, and eviction stages.
93
+
94
+ ### Completion and closure
95
+
96
+ - `completionLedger.ts` records claims, evidence roles, risks, critiques, unresolved items, and terminal receipts.
97
+ - `deliveryCoverage.ts` has versioned manifests and deterministic coverage evaluation.
98
+ - `integrationClosure.ts` already projects requirements, claims, paths, contracts, evidence, and blockers into a graph.
99
+ - `completion-evidence-gate.ts` requires independent evidence for high-risk claims.
100
+
101
+ ### Evidence and memory
102
+
103
+ - `evidenceLedger.ts` records content hashes, revisions, ranges, fidelity, mutations, and staleness.
104
+ - `contextMemoryLedger.ts` records authority, trust, temporal validity, relations, and dependency-closed transactions.
105
+ - `evidenceBranch.ts` validates selected ranges against presented windows and original source text.
106
+ - PDF receipts distinguish absence, incomplete coverage, truncation, and omitted pages.
107
+
108
+ ### Retrieval
109
+
110
+ - Hybrid retrieval combines lexical, vector, and graph candidates.
111
+ - The context assembler supports rank fusion, graph expansion, snippet packing, and request budgets.
112
+ - The memory ledger supports temporal and source-aware retrieval with explicit abstention.
113
+
114
+ ## Closed gaps
115
+
116
+ ### Canonical work identity
117
+
118
+ The projector gives each source record a stable content-derived graph identity.
119
+ Todo identifiers, completion evidence identifiers, claim identifiers, source
120
+ references, target references, and receipt references remain traceable in node
121
+ attributes or typed references.
122
+
123
+ ### Requirement identity
124
+
125
+ Todos now carry `workKind`, `requirementIds`, `acceptanceIds`, `sourceRefs`,
126
+ `targetRefs`, and a typed action contract. The todo tool schema, persistence,
127
+ no-op comparison, and exports preserve these fields.
128
+
129
+ ### Feature verification
130
+
131
+ `featureNode` now invokes `verifyUnit` after the final accepted executor result.
132
+ A false result or exception fails the node. The fallback path never changes an
133
+ unverified unit to complete.
134
+
135
+ ### Authoritative completion evidence
136
+
137
+ The active completion gate and final terminal fail-safe now reject open,
138
+ explicit requirements, acceptance criteria, blockers, and explicit claim
139
+ conflicts. They also reject invalid authored delivery manifests and stale
140
+ post-mutation verifier evidence.
141
+
142
+ Keep inferred work advisory.
143
+ Make explicit requirements and acceptance paths authoritative.
144
+
145
+ ### World transaction boundary
146
+
147
+ `WorldPatch` includes a graph identifier, base revision, target revision,
148
+ typed operations, author, rationale, and creation time. The reducer rejects
149
+ stale or reused revisions and emits an immutable validation receipt with graph
150
+ and referenced-evidence hashes.
151
+
152
+ ### First-class conflict objects
153
+
154
+ Structured claims include subject, predicate, object, valid time, authority,
155
+ confidence, evidence, and dependencies. The reducer deterministically
156
+ preserves overlapping incompatible claims in an open conflict group.
157
+
158
+ ### Target-focused reasoning slices
159
+
160
+ The graph slice starts from exact or lexical targets, expands a bounded
161
+ neighborhood, includes supporting and refuting evidence roles, retains claims
162
+ and conflicts, and restores parent and action-target closure after trimming.
163
+
164
+ ### Shared source bindings
165
+
166
+ The shared schema supports URI fragments, line and character ranges, pages,
167
+ sheets and rows, headings, tables, JSON pointers, fields, and temporal ranges.
168
+ It records source revision, optional hash, authority, freshness, read policy,
169
+ observation time, confidence, and evidence role.
170
+
171
+ ## Canonical WorkGraph contract
172
+
173
+ Use these node kinds:
174
+
175
+ - `objective`
176
+ - `requirement`
177
+ - `feature`
178
+ - `component`
179
+ - `module`
180
+ - `task`
181
+ - `acceptance`
182
+ - `symbol`
183
+ - `artifact`
184
+ - `mutation`
185
+ - `claim`
186
+ - `verification`
187
+ - `evidence`
188
+ - `conflict`
189
+ - `blocker`
190
+
191
+ Use these core relations:
192
+
193
+ - `decomposes_to`
194
+ - `part_of`
195
+ - `depends_on`
196
+ - `satisfies`
197
+ - `implements`
198
+ - `modifies`
199
+ - `produces`
200
+ - `verified_by`
201
+ - `evidenced_by`
202
+ - `contradicts`
203
+ - `blocked_by`
204
+ - `supersedes`
205
+
206
+ Each node and relation must have a stable identifier.
207
+ Each inferred item must record its authority.
208
+ An inferred item remains advisory until code or a user adopts it.
209
+
210
+ Each action node must define these fields when they apply:
211
+
212
+ - Target references
213
+ - Inputs
214
+ - Preconditions
215
+ - Expected mutations
216
+ - Side effects
217
+ - Required authority
218
+ - Required approval
219
+ - Risk
220
+ - Verification contract
221
+
222
+ ## Shared evidence contract
223
+
224
+ `SourceBinding` and `EvidenceRef` are implemented under `packages/schemas`.
225
+
226
+ The schema must include these fields:
227
+
228
+ - Evidence identifier
229
+ - Source identifier and URI
230
+ - Content hash and source revision
231
+ - Observation time and freshness
232
+ - Authority and confidence
233
+ - Typed locator and locator value
234
+ - Supporting or refuting polarity
235
+ - Coverage and truncation status
236
+ - State epoch
237
+
238
+ Use the same evidence identifier in retrieval, memory, claims, completion, and groundedness.
239
+ Validate each reference against the current source revision.
240
+
241
+ ## Revisioned world reducer
242
+
243
+ The pure reducer is implemented under
244
+ `packages/orchestrator/src/operational-world/`.
245
+ Keep `AgenticRunner`, context systems, and the TUI as consumers.
246
+
247
+ The model can propose only a `WorldPatch`.
248
+ The patch must include `patchId`, `baseRevision`, and typed operations.
249
+
250
+ The reducer must do these checks:
251
+
252
+ 1. Verify the base revision.
253
+ 2. Validate every runtime schema.
254
+ 3. Verify every node, relation, claim, and evidence reference.
255
+ 4. Verify expected file hashes and read versions.
256
+ 5. Reject duplicate identifiers and dangling relations.
257
+ 6. Reject invalid cycles and temporal intervals.
258
+ 7. Preserve incompatible claims as a conflict.
259
+ 8. Apply operations in a deterministic order.
260
+ 9. Emit an immutable patch and revision receipt.
261
+
262
+ Use `integrationClosure.ts` as the first graph adapter.
263
+ Do not make its bounded display neighborhood the authoritative validation universe.
264
+
265
+ ## Large-document evidence pipeline
266
+
267
+ Use a source-aware decomposition tree.
268
+ Each child shard must retain its parent and exact locator.
269
+
270
+ Select shard boundaries by content type:
271
+
272
+ - Keep prose headings with their paragraphs.
273
+ - Keep JSON paths and array ranges.
274
+ - Repeat table headers for each table shard.
275
+ - Keep PDF page markers.
276
+ - Keep spreadsheet sheet and row markers.
277
+
278
+ If one extraction fails, subdivide only that shard.
279
+ Preserve the failed shard as unresolved evidence.
280
+ Do not discard it.
281
+
282
+ For a named target, use this retrieval sequence:
283
+
284
+ 1. Resolve exact target entities.
285
+ 2. Scan all target occurrences.
286
+ 3. Build section-bounded evidence windows.
287
+ 4. Classify each window by semantic role and polarity.
288
+ 5. Keep earliest and latest relevant evidence.
289
+ 6. Keep early, middle, and late document coverage.
290
+ 7. Expand one hop to co-referenced entities.
291
+ 8. Include supporting and contradicting evidence.
292
+ 9. Trim background evidence before target evidence.
293
+ 10. Emit a typed coverage receipt.
294
+
295
+ Pass one validated `ReasoningSlice` to the reasoner and critic.
296
+ Reject unknown citations and omitted requested targets before model criticism.
297
+
298
+ ## Completion invariant
299
+
300
+ Use this rule for authoritative work:
301
+
302
+ > Complete an objective only when every explicit requirement and acceptance path reaches fresh successful evidence after the last relevant mutation.
303
+
304
+ Do not let a model-created node silently expand the user's required scope.
305
+ Keep each inferred edge advisory until adoption.
306
+
307
+ ## Completed correctness repairs
308
+
309
+ - `verifyUnit` runs during the feature-node verification stage.
310
+ - Exceptions and false verification results cannot create completion.
311
+ - Feature decomposition fields survive in the todo store and tool contract.
312
+ - Exact verifier commands require trusted receipts after relevant mutations.
313
+ - Explicit completion gaps hold `task_complete` and alternate terminal paths.
314
+ - Repeated holds terminate as `incomplete_verification`; they never report a
315
+ false success.
316
+ - Model context contains one current bounded reasoning slice instead of a full
317
+ unbounded graph dump.
318
+
319
+ ## Deployment state
320
+
321
+ ### Phase 1: Shared identity — complete
322
+
323
+ Add shared work, relation, source-binding, evidence, conflict, and revision schemas.
324
+ Project current stores into stable graph identifiers.
325
+
326
+ ### Phase 2: Revisioned world — complete
327
+
328
+ Patches, validation results, revisions, full snapshots, and receipts are
329
+ persisted atomically for each task epoch.
330
+
331
+ ### Phase 3: Retrieval and document evidence — integrated
332
+
333
+ The graph consumes current completion evidence and source references. Reasoning
334
+ slices include counterevidence, structural locators, coverage metadata, and
335
+ target neighborhoods without replacing the existing retrieval stores.
336
+
337
+ ### Phase 4: Authoritative explicit closure — complete
338
+
339
+ Gate only explicit requirement and acceptance paths.
340
+ Keep inferred paths advisory.
341
+ Require fresh evidence after each relevant mutation.
342
+
343
+ ### Phase 5: Parallel long-horizon execution
344
+
345
+ Schedule ready leaves whose dependency paths are satisfied.
346
+ Assign ownership and authority to each leaf.
347
+ Commit graph patches through the revisioned reducer.
348
+ Reconcile conflicts before dependent work begins.
349
+
350
+ This design lets Omnius decompose extreme complexity into durable ontological work.
351
+ It also keeps progress, evidence, and completion lossless across long sessions.