omnius 1.0.991 → 1.0.993

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 (57) hide show
  1. package/.aiwg/addons/omnius-docs/README.md +3 -0
  2. package/.aiwg/addons/omnius-docs/skills/omnius-task-graph/SKILL.md +42 -0
  3. package/dist/_types/execution/native-memory-view-provider.d.ts +5 -1
  4. package/dist/_types/execution/nol/worker-assets.d.ts +2 -0
  5. package/dist/_types/memory/immutableEvidenceStore.d.ts +4 -1
  6. package/dist/_types/memory/memoryCapability.d.ts +2 -0
  7. package/dist/_types/memory/structuredMemoryStore.d.ts +3 -1
  8. package/dist/_types/orchestrator/admin-task-inspection.d.ts +27 -0
  9. package/dist/_types/orchestrator/agenticRunner.d.ts +30 -11
  10. package/dist/_types/orchestrator/completionFinalization.d.ts +19 -1
  11. package/dist/_types/orchestrator/contentAddressedArtifactStore.d.ts +1 -4
  12. package/dist/_types/orchestrator/historicalToolObservation.d.ts +36 -0
  13. package/dist/_types/orchestrator/interruption-lifecycle.d.ts +3 -0
  14. package/dist/_types/orchestrator/model-facing-metadata.d.ts +2 -0
  15. package/dist/_types/orchestrator/native-provider-delivery.d.ts +3 -0
  16. package/dist/_types/orchestrator/semanticVerification.d.ts +8 -1
  17. package/dist/_types/orchestrator/structured-memory-extraction-worker.d.ts +1 -0
  18. package/dist/_types/orchestrator/successful-procedure-memory.d.ts +7 -0
  19. package/dist/_types/orchestrator/task-recall-review-evidence.d.ts +37 -0
  20. package/dist/_types/orchestrator/taskRequirementReview.d.ts +3 -0
  21. package/dist/_types/orchestrator/taskSemanticAdmission.d.ts +9 -0
  22. package/dist/_types/orchestrator/taskWorkPlan.d.ts +4 -1
  23. package/dist/api/py-embed.js +3 -0
  24. package/dist/assets/nol-task-memory-promotion-worker.py +240 -0
  25. package/dist/index.js +2 -2
  26. package/dist/library.d.ts +1 -0
  27. package/dist/library.js +22725 -20138
  28. package/dist/memory-maintenance-worker.js +4255 -4252
  29. package/dist/nol/task-memory-promotion.d.ts +240 -0
  30. package/dist/omni-setup-worker.js +3 -0
  31. package/dist/postinstall-daemon.cjs +3 -0
  32. package/dist/preinstall.cjs +5 -0
  33. package/dist/tui/native/worker.js +40 -1
  34. package/dist/update-worker-runtime.js +24374 -8901
  35. package/dist/update-worker.js +35 -9
  36. package/docs/DISCOVERY.json +675 -1
  37. package/docs/DISCOVERY.md +17 -0
  38. package/docs/guides/system-tray.md +6 -0
  39. package/docs/reference/slash-commands.md +59 -2
  40. package/docs/reference/task-observability.md +27 -0
  41. package/docs/work-orders/WO-behavioral-memory-graph-20261123.md +122 -0
  42. package/docs/work-orders/WO-native-agent-collaboration-20261124.md +96 -0
  43. package/docs/work-orders/WO-telegram-admin-command-and-artifact-20261124.md +117 -0
  44. package/docs/work-orders/WO-telegram-ellipsis-and-stale-release-20261124.md +129 -0
  45. package/docs/work-orders/WO-telegram-live-worker-view-20261124.md +114 -0
  46. package/docs/work-orders/WO-telegram-long-horizon-continuity-20261123.md +43 -0
  47. package/docs/work-orders/WO-telegram-model-source-and-broker-capacity-20261124.md +68 -0
  48. package/docs/work-orders/WO-telegram-quick-reply-and-admin-progress-20261125.md +80 -0
  49. package/docs/work-orders/WO-update-publish-provenance-20261125.md +79 -0
  50. package/docs/work-orders/WO-verified-update-transaction-20261124.md +46 -0
  51. package/docs/work-orders/human-memory-task-recall/README.md +57 -0
  52. package/docs/work-orders/human-memory-task-recall/WO-01-task-board.md +320 -0
  53. package/docs/work-orders/human-memory-task-recall/WO-02-consolidation.md +95 -0
  54. package/docs/work-orders/human-memory-task-recall/WO-03-promotion.md +226 -0
  55. package/docs/work-orders/human-memory-task-recall/WO-04-qualification.md +580 -0
  56. package/npm-shrinkwrap.json +2 -2
  57. package/package.json +8 -3
@@ -0,0 +1,320 @@
1
+ # WO-01 Project task board and resumption context
2
+
3
+ Status — implemented and verified with deterministic fixtures and live Telegram board evidence. The integrated gate is tracked in [WO-04](WO-04-qualification.md).
4
+
5
+ ## User outcome
6
+
7
+ An operator can inventory a project's active, parked and historical work from
8
+ CLI and Telegram, see recorded decisions, evidence and next action, and return to
9
+ a known task without guessing from old message text or marking old work live.
10
+ Telegram results remain inside the authorized actor, chat and topic boundary.
11
+
12
+ ## Entry points and ownership
13
+
14
+ Own new board support and tests under `packages/cli`, TUI/router and command
15
+ registration changes for this feature, the Telegram bridge board integration,
16
+ and any focused changes in `packages/execution/src/tools/workboard.ts` or
17
+ `packages/memory/src/projectShelf.ts`. Tell the integrator before any shared
18
+ package barrel edit. The integrator alone adds memory policy runtime wiring.
19
+ Declare a board API and the definitive CLI and Telegram commands to the
20
+ integrator as soon as chosen.
21
+
22
+ Read these first.
23
+
24
+ - `docs/reference/task-observability.md` and `docs/reference/work-queue.md`.
25
+ - `packages/execution/src/tools/workboard.ts` around path lookup,
26
+ workboard loading/receipts and `workboard_show`. A file named active.json
27
+ is a durable snapshot name. Live status requires an actual attached run.
28
+ - `packages/memory/src/projectShelf.ts` working set, attachment and
29
+ reinstatement methods. Current production code creates and switches shelves.
30
+ - `packages/cli/src/tui/telegram-bridge.ts` around
31
+ `telegramShelfReinstatement`, `setTelegramOpenTask`, scoped owner validation,
32
+ retained task contexts, and admin command dispatch.
33
+ - `packages/cli/src/tui/interactive.ts` terminal session and existing command
34
+ dispatch. Reuse `/resume` and existing steering and pivot semantics.
35
+
36
+ Use existing durable board, queue, session, and Telegram records as truth.
37
+ A bounded projection may be cached, but completion remains receipt-derived.
38
+ Persist a scoped working set at a meaningful change of objective or checkpoint.
39
+ Populate it with accepted goal, explicit public notes or decisions, blocker,
40
+ next action, and trustworthy file or receipt references when available. Apply
41
+ Telegram scope checks before querying or reinstating. Migrate or tolerate
42
+ existing boards and shelves. A source permission may bar showing an item on a
43
+ different surface even when the workspace is shared. Avoid an unbounded
44
+ directory or transcript scan and expose partial results explicitly.
45
+
46
+ ## Acceptance and evidence
47
+
48
+ - CLI and authorized Telegram can open a bounded project inventory with status,
49
+ stable task locator, and last trusted progress. Historic board snapshots
50
+ never appear live from their filename alone.
51
+ - A switch A → B → A across fresh process/restart restores A's distinct next
52
+ action and evidence. Recorded decision and receipt linkage survive. Steering
53
+ augments A. Status leaves A intact. An explicit pivot creates a distinct
54
+ owner. Exchange the runnable scenario with the integrator.
55
+ - Fixtures prove zero cross-workspace, chat, topic, or actor disclosures and
56
+ no permission escalation through a lookup ID. Old, malformed or unavailable
57
+ source records remain distinguishable from zero rows.
58
+ - Record implementation paths, command invocations, counts and residual gaps
59
+ here. Tell the integrator what changed in generated docs.
60
+
61
+ ## Implementation
62
+
63
+ - `omnius tasks --repo <workspace>` lists the local workspace inventory. Use
64
+ `omnius tasks show <task-id> --repo <workspace>` for details and append
65
+ `--json` for programmatic output.
66
+ - Native TUI commands are `/tasks`, `/tasks show <task-id>`, and
67
+ `/tasks switch <task-id>`. Switch reopens the exact retained objective and
68
+ restores its containing conversation through the existing session navigator
69
+ when required. The next human request follows existing admission review.
70
+ `/resume` still resumes the exact interrupted run.
71
+ - Telegram uses those same slash commands with the numeric admin's native
72
+ message in the owning chat and topic. Switch can park an idle predecessor and
73
+ select a retained task for native continuation review. The reply stays in the
74
+ original topic with automatic media dispatch disabled and links inert.
75
+ - `packages/cli/src/tui/project-task-board.ts` projects scoped shelves, queue
76
+ state, workboard events and run ledgers. `ProjectShelfStore` stores bounded
77
+ checkpoints and a scoped selection in `.omnius/task-board.sqlite`. The
78
+ existing exact TUI authority remains in `.omnius/context/tui-objectives`
79
+ with per-objective checkpoints under `tasks/`. Telegram retains execution
80
+ and historical ownership in its conversation records. Live status requires
81
+ a matching attached runner. Completion requires the linked ledger's
82
+ terminal receipt. Reinstatement supplies historical evidence references to
83
+ the existing fresh-request admission boundary.
84
+
85
+ ## Verification
86
+
87
+ `pnpm --filter omnius test tests/project-task-board.test.ts tests/tui-task-continuation.test.ts tests/command-registry.test.ts`
88
+ passed 34 tests across three files. The five new board fixtures cover the
89
+ same-conversation A → B → A switch, two linked run receipts, accepted steering,
90
+ read-only status, distinct pivot identity, archive versus attached-run status,
91
+ workspace/actor/chat/topic lookup isolation, truncation, malformed sources,
92
+ and the native Telegram command path over an isolated restart. The Telegram
93
+ test uses raw Bot API-shaped messages with a mocked send operation.
94
+
95
+ Adding `tests/telegram-native-intake-state-context.test.ts` yielded 42
96
+ passing tests across four files. The existing global-shelf regression in
97
+ `tests/telegram-native-update-adoption.test.ts` now checks scoped native
98
+ intake reinstatement. Its focused invocation passed with one test run.
99
+ `pnpm exec tsc -b packages/memory packages/cli --pretty false` and
100
+ `git diff --check` also passed.
101
+
102
+ The guarded board pilot exposed two checkpoint projection gaps. The board
103
+ now reopens only the exact note IDs emitted by the matching runner's
104
+ session-bound working-notes tool, including explicit next actions and
105
+ blockers. It links validated native file reads through their ledger evidence
106
+ IDs and paths. The typed observation does not require the newer
107
+ `progressClass` field. The three-file CLI suite passed 36 tests after both
108
+ regressions were added, and a fresh CLI TypeScript build passed.
109
+
110
+ An attached task must settle before switching execution context. A legacy
111
+ board without a provable owner is unavailable. The inventory displays at
112
+ most 10 tasks and reports partial source coverage. The native terminal also
113
+ reads the current session's queued requests.
114
+
115
+ The archived Telegram continuation fixture exercises exact native reply
116
+ ownership, the original envelope and ledger, and rollback across persistent
117
+ stores. When a continuation loses its owner before start or its old ledger
118
+ changes during commit, fresh readers retain the original parked task and its
119
+ checkpoint. A successful commit keeps the original task, input and epoch and
120
+ links the accepted correction as an amendment.
121
+
122
+ The integrated CLI verification passed all 91 tests across six files,
123
+ including nine project task board tests and 22 Telegram update-adoption
124
+ tests. All 23 existing native method-admission fixtures passed. Eight
125
+ selected production requirement fixtures checked exact native evidence,
126
+ cold ownership, preserved receipts, and reviewed replacement. Three
127
+ isolated Bot API transport fixtures also passed.
128
+
129
+ An isolated Telegram run with live PI-adapted E03 parked Alpha and Beta with
130
+ their own file observations and next actions and switched A → B → A in a
131
+ fresh bridge process. Its correction failed at the independent method review.
132
+ The private report SHA-256 is
133
+ `73d4f631c7718fdcbbe39904050fab9c0e0a0afa9d5293024d8d659ef0290a2e`.
134
+ A later focused run restored the archived Alpha and acknowledged the native
135
+ selection, then ended during model review of the correction. The durable
136
+ intake records dispatch of that correction. No correction acknowledgement
137
+ or same-owner adoption was recorded. Its interrupted report SHA-256 is
138
+ `e0e355388a13fece787c3c7a23ff194d6379e077189304440bf87c353aa6685e`.
139
+
140
+ A subsequent full live run parked both owners with separate file reads and
141
+ working notes, restored A → B → A across two bridge lifetimes, and passed
142
+ read-only status and foreign actor/topic isolation. Alpha's correction was
143
+ held before independent review because the model's native proposal failed
144
+ effects and source-basis validation. Gamma received a distinct task owner and
145
+ read `gamma.txt`. Broker admission timeouts prevented a final Bot API
146
+ acknowledgement before the 480-second deadline. The private report SHA-256
147
+ is `615f37d63508027fe240aec59229da3b7ab491d535b60703d480cc414ccc6e98`.
148
+
149
+ The same run exposed a stale checkpoint projection when selecting an older
150
+ retained task. The command now displays the authenticated task's parked
151
+ status after creating its operator hold. All nine board tests passed with
152
+ assertions for that status before and after a bridge restart.
153
+
154
+ On the rebuilt bridge, the captured Alpha reopened as parked and the
155
+ read-only and isolation checks passed again. Two guarded correction
156
+ proposals returned HTTP 200 with a 6,400-token ceiling and failed the same
157
+ native proposal validation before the critic. The next explicit pivot was
158
+ held when its structured response repeated an unfinished output cycle.
159
+ The private report SHA-256 is
160
+ `21399c05a35e515e61e9b9845e8472d0ba50d79eb00e55dfd6750ca744284dc3`.
161
+
162
+ In the guarded diagnostic, the retained planner chose Alpha's original
163
+ owner but every requirement cited the new correction. The independent
164
+ critic accepted the proposal. Archive admission held the request because
165
+ its required original source basis was missing. The synthetic proposal
166
+ and review bodies have SHA-256 values
167
+ `62c2b555c1145541525aafc49ee9d4a190665f6bcf486223bbef21e901066713`
168
+ and `4f9191433c7ad0763c9448f2cbed321ae0bbdac668ebcd2c62cbfe9d17b5fa50`.
169
+ The retained review now receives the exact original and current source
170
+ requirements and uses its bounded repair for a missing basis. The same
171
+ checks run again at archive admission. The board and native method suites
172
+ passed all 32 tests. One fixture reproduces the current-only proposal,
173
+ verifies its bounded repair and independently reviews both exact inputs.
174
+
175
+ The diagnostic run separately admitted a new Gamma owner and observed the
176
+ exact file read. Its planner also proposed a workspace mutation for the
177
+ task switch. Independent completion withheld the final reply because no
178
+ such mutation was authorized or observed. Its private report SHA-256 is
179
+ `ed7709f1923095cd0e87dc21e74c6062795bc28cb49af21e77d3892b546a7fe2`.
180
+
181
+ The next guarded run separated two malformed correction proposals.
182
+ Reopening the exact synthetic message bytes in the compiled parser showed
183
+ that the first cited a method source absent from its linked requirements and
184
+ the retry omitted the visible-response effect. Gamma's proposal and critic
185
+ both selected a genuine replacement with only observation and reply effects.
186
+ The final outcome lacked the exact prior task citation. The repaired joint
187
+ path now binds that citation from the current host packet after independent
188
+ review, and the planner's method and response guidance applies when a task
189
+ is present. The CPU fixture admits the exact scope and rejects missing or
190
+ foreign scopes. The failed live report SHA-256 is
191
+ `4ee1aa63a23cd9e1988e5262ca1dc5cb18296f3c7e965e47ac351a6c3a6b7481`.
192
+
193
+ The refreshed build passed all 683 native requirement cases and all nine
194
+ board cases. Two existing lean-intake failures and 19 reviewed-execution
195
+ fixture failures reproduced in the same cases on clean base `030ca513`.
196
+
197
+ The rebuilt live bridge accepted the correction under Alpha's original
198
+ task ID, original input and epoch. Its board showed the exact revised next
199
+ action and linked the original run. The original ledger matched the
200
+ preserved bytes. Completion review held the reply while the runner added
201
+ two todos for the same action. The isolated driver was stopped before a
202
+ final acknowledgement, and durable intake fenced automatic replacement.
203
+ The partial receipt SHA-256 is
204
+ `d61e88d0d42a299ed7f5094892db664b696f586f1e8c48c4719680692dc7e69a`.
205
+
206
+ The explicit approval-wait exercise independently retained both native
207
+ inputs and recorded the requested todo. The runner read `alpha.txt` before
208
+ approval and added the todo a second time. The fixture stopped the runner
209
+ through the isolated Bot API and received no correction acknowledgement.
210
+ Read-only status and scope isolation passed. The separate Gamma switch
211
+ created a distinct owner, read `gamma.txt`, and received acknowledgement
212
+ 9116. The live report and approval-wait evidence have SHA-256 values
213
+ `b2c7a075cea69fb51ea61eb75f2fafc7abddf34e26c3d8ddd55761d71732534c`
214
+ and `a090cdf549037f7599c7ef99e7246aa14d3e6209d450ff77931654c558ef8af2`.
215
+
216
+ An expressly approved file-read correction exposed a bounded repair issue.
217
+ The first projection omitted the original basis while declaring observation
218
+ and a visible reply. Its repair bound both exact native inputs and omitted
219
+ every effect. The planner now receives the first structurally parsed draft
220
+ and its effect union during a source-basis repair. The host checks the
221
+ frozen task, native scope and declared effects before independent review.
222
+ The regression verifies that dropping or changing effects reaches no critic
223
+ and that an exact repair still receives independent review. This prior live
224
+ run passed the separate Gamma pivot and scope checks. Its report SHA-256 is
225
+ `8fb61061f0e8acf0860d20bce98a16aff063fc714dcf91beaf79025ed5942093`.
226
+
227
+ The next repair attempted to preserve the first draft's effects and still
228
+ dropped its observation. The host now requests only source ranges for
229
+ existing requirement IDs. It applies those citations to the original
230
+ draft, parses the full result, checks both original and correction sources
231
+ and submits the full proposal to the independent critic. CPU coverage
232
+ rejects missing, foreign and out-of-range source edits and attempts to
233
+ change the draft's owner, effects or methods. The private live report
234
+ SHA-256 is
235
+ `d60877164c393d8338e3c8b4b853c9650dd4857b60ac274293fe9b255f81b736`.
236
+
237
+ With that repair, Alpha accepted the revised objective under its original
238
+ owner and independently reviewed both source inputs. The run read
239
+ `alpha.txt` and produced the requested reply. Delivery was held because the
240
+ provider operation retained the original message identity while the admin
241
+ activity panel belonged to the correction. Recovery also lacked the
242
+ accepted native review and work proposal in the durable task. The bridge
243
+ now validates the exact current panel owner separately from original
244
+ provider routing and persists both accepted review inputs. The targeted
245
+ board and admin activity suites passed 36 tests. The separate Gamma pivot
246
+ and read-only scope checks passed in the live run. Its report SHA-256 is
247
+ `ad0854e7cefbd2b978ce66c80b295271797d44178395ac63633034f7bbd46af3`.
248
+
249
+ The following live run kept the same Alpha board row, native task, original
250
+ input and epoch and linked the original run without changing its ledger.
251
+ The correction run made one successful `alpha.txt` call/result pair and
252
+ left the file unchanged. The isolated Bot API acknowledged the exact
253
+ two-line reply once as message 9112. The durable terminal operation retained
254
+ original input 200. The completed panel and consumed intake belonged to
255
+ correction input 312. Execution recorded an incomplete-verification receipt
256
+ before the provider acknowledgement. The independent evidence SHA-256 is
257
+ `c0c243c2b4f7a8cdd52fd73c733d104a46d7f667c877151e6e369aa85099dc29`.
258
+
259
+ The harness waited for Alpha to remain open after it had retired on
260
+ delivery. Its board row still held the exact correction and original run.
261
+ The next build checkpoints historical status at that fulfillment fence.
262
+ The existing verified ledger criterion still governs completed status. All
263
+ nine board tests passed, including the new historical disposition assertion
264
+ for the retained correction. The harness now checks the settled board row,
265
+ original ledger bytes, exact current intake, delivery operation and panel
266
+ ownership.
267
+
268
+ The rebuilt bridge reopened Alpha and passed the read-only status and
269
+ scope isolation checks. Gamma received acknowledgement 9114 under a
270
+ distinct owner after reading its own file. The independent critic held
271
+ Alpha's correction because the planner named `file_read` in a method unit
272
+ while its requirements omitted the explicit instruction to read the file
273
+ now. The next fixture gives the authorized read its own sentence and
274
+ requires one actual `file_read` call with a successful result before
275
+ accepting the exact reply. The failed report SHA-256 is
276
+ `310a4fcc9d3bb44532eab6bee15ddc4199b628af90ff676f0bddd647ec6d4042`.
277
+
278
+ The next correction passed native admission and ran under the same Alpha
279
+ owner. Its completion critic held the reply because the request specified
280
+ one read and the available evidence did not prove a complete operation
281
+ count. A recovery run read Alpha again. The isolated bridge drained without
282
+ a final correction acknowledgement. The evidence SHA-256 is
283
+ `66458fdbd5e566248b1d0ddddabbbf7de513f2816134f2653b7a65bb7300131d`.
284
+ The harness counts the exact settled run's read calls and successful
285
+ results directly from the runtime audit. Two subsequent joint planning
286
+ drafts each failed the declared requirement, effect and source validation.
287
+ The same run passed scoped status and the separate Gamma pivot with
288
+ acknowledgement 9115. Its report SHA-256 is
289
+ `b5292e16a6dd01ee39c116ffff05ba84b4209a785a0be2b1b384fb556ade2159`.
290
+
291
+ The concise correction passed joint intake and its critic. The first
292
+ retained draft omitted the prior reply effect and the second restored
293
+ it with the correct task and read obligation, but still missed the
294
+ original source citation. The bridge now allows one source-only repair
295
+ after either of two full drafts. The parser and independent critic
296
+ still require the complete reconstructed proposal. The deterministic
297
+ fixture verifies the valid effect-incomplete first draft, the bounded
298
+ repair after the second and the independent review. All 36 board and
299
+ admin activity tests passed. The failed live report and successful
300
+ separate Gamma acknowledgement 9114 are sealed under SHA-256
301
+ `a7c2e91d330f623317b9ee4b36d315c8907d9d23c029d178d08e82e3f971576a`.
302
+
303
+ The rebuilt bridge passed all four focused board stages in one lifetime.
304
+ It reopened Alpha from the real parked custody of the earlier A → B → A
305
+ run. The second retained draft received one source-only repair and passed
306
+ independent intent and method review. The correction kept Alpha's board
307
+ row, native task ID, original input and epoch and linked the byte-identical
308
+ original ledger. The exact correction run read `alpha.txt` once and
309
+ preserved its bytes. The completion critic rejected an extra label and the
310
+ runner corrected the reply using that same read. The isolated Bot API
311
+ acknowledged the exact two-line reply once as message 9112. The delivered
312
+ operation retained original input 200, the panel and consumed intake
313
+ belonged to correction input 312, and the board row became historical.
314
+ Read-only status preserved the board and task owners. Foreign actor and
315
+ topic checks disclosed no task data. The explicit Gamma pivot created a
316
+ different owner at input 316, read `gamma.txt` and received acknowledgement
317
+ 9116. The bridge exited cleanly. The final report SHA-256 is
318
+ `daad856814940d4c1e0f8bc736efb141b053f70ed61431c0bf932632922db0df`.
319
+
320
+ End-to-end qualification continues in [WO-04](WO-04-qualification.md).
@@ -0,0 +1,95 @@
1
+ # WO-02 Selective encoding and coordinated memory consolidation
2
+
3
+ Status — memory package implemented and verified with deterministic fixtures.
4
+ Live CLI and Telegram qualification remains with WO-04.
5
+
6
+ ## User outcome
7
+
8
+ Use task and event context to store a new experience in the right place. Keep
9
+ novel experiences recoverable. Merge supported recurring knowledge with exact
10
+ episode provenance. Suppress competing recall reversibly, retaining source
11
+ access and explicit contradictions.
12
+
13
+ ## Ownership and entry points
14
+
15
+ Own the implementation and tests under `packages/memory`, excluding
16
+ `projectShelf.ts`. Coordinate shared exports in `packages/memory/src/index.ts`
17
+ with the integrator. The integrator owns CLI, Telegram and orchestrator call
18
+ sites. Send proposed typed entry points for ingestion, background maintenance
19
+ and scope-bound cue retrieval before wiring so the integrator can implement the
20
+ adapters while you implement the package.
21
+
22
+ Read `episodeStore.ts`, `structuredMemoryStore.ts`, `hybridMemoryRetriever.ts`,
23
+ `memorySourceResolver.ts`, `sleepConsolidation.ts`, `maintenance.ts` under
24
+ `packages/memory/src`. Reuse stable episode IDs and admissible source spans.
25
+ Read the existing human-memory work orders, especially HMR-02 and HMR-04.
26
+ The DM's reference spec is at
27
+ `../../telegram_test/brain-memory-spec/INDEX.md` relative to the repository
28
+ root in the adjacent worktree layout. Its four modules illustrate interfaces
29
+ and contain incomplete store writes. Do not transplant placeholders.
30
+
31
+ - Gate memory writes into supported fast consolidation, held episode, or
32
+ exclusion from derived memory. A low similarity score alone cannot drop a
33
+ novel admissible episode. Preserve the canonical source and authority.
34
+ Calibrate with positive, contradictory and novel deterministic fixtures.
35
+ - Vary actual encoding work with schema evidence and expose reason/cost
36
+ counters. State which budget is measured. Omit private model reasoning.
37
+ - Bind each consolidation batch to scope, exact source revisions, and
38
+ observed semantic readiness. Protect simultaneous writers with store-native
39
+ transactions, idempotency and version checks. An interrupted or rejected
40
+ phase leaves recoverable evidence. Replaying a committed batch yields no
41
+ duplicate semantic version. Write provenance to the production store.
42
+ - Apply bounded, reversible suppression to the active recall projection.
43
+ Scope and applicability take priority. Exact source retrieval remains
44
+ reachable. Surface a conflicting correction or current instruction; no
45
+ persisted guess takes the place of an authoritative instruction.
46
+ - Coordinate with WO-03 on the shape of stable, scope-bound promotion
47
+ candidates. Provide evidence and maturity criteria, never update weights
48
+ from the memory engine.
49
+
50
+ ## Acceptance and evidence
51
+
52
+ - Fixtures verify correct tags, held unknowns and scoped exact recall of all
53
+ seeded admissible originals. Test schema fit, novelty, corrections, stale
54
+ candidates, partial coverage and reactivation by explicit source cue.
55
+ - Duplicate events and concurrent or restarted consolidation produce one
56
+ semantic version for the same evidence. Failed and interrupted phases leave
57
+ zero partial semantic commits. Every accepted derived record expands to the
58
+ precise verified original.
59
+ - Show an actual encoding-cost difference by branch, and the suppressed count
60
+ plus exact-source recovery. Include the deterministic test path and result
61
+ counts. Give the integrator the observable admission, phase and retrieval
62
+ receipts for both live surfaces.
63
+
64
+ ## Implementation and verification
65
+
66
+ - `TaskRecallMemory.openShared` uses the existing immutable evidence and
67
+ structured memory stores. An existing native source keeps its document ID,
68
+ session scope, content hash, version and exact byte spans. Host authorization
69
+ supplies the owner scope and task identity. An omitted task filter searches
70
+ across tasks in that owner scope. Each consolidation stays within one task.
71
+ - `ingest` reports admission, schema fit, replay and cue-encoding work. Novel
72
+ admissible sources stay available through exact episode cues. In the matched
73
+ fixture, cue extraction processed 49 UTF-8 bytes and six terms, compared with
74
+ 138 bytes and 17 terms for the held branch. Both branches wrote one exact
75
+ evidence chunk. These counters measure cue extraction and evidence writes.
76
+ - `stageConsolidation` records the observed semantic base and scoped source
77
+ revisions. `commitConsolidation` rechecks the evidence and settles the batch
78
+ atomically with its semantic version and native provenance. One simultaneous
79
+ two-connection run produced one replayed admission, two originals, one
80
+ committed batch and one semantic version.
81
+ - `retrieve` reports bounded coverage and the suppressed count. The duplicate
82
+ fixture suppressed two covered episodes in normal recall and recovered both
83
+ originals by exact cue. A competing user correction remains visible and
84
+ prevents suppression for that claim. Promotion candidates require three
85
+ current independently observed procedure sources and revalidate on lookup.
86
+ - A live CLI pilot exposed a ranking error when two records shared a cue term.
87
+ Normal recall now ranks eligible originals by matched cues and scores
88
+ compact claims against their own key and body. A correction stays attached
89
+ to the relevance of its claim group. The regression covers the Mulberry
90
+ original, Tamarind consolidation, Cedar correction, and exact source reopening.
91
+ - `pnpm --filter @omnius/memory build` passed. The package suite passed
92
+ 840 tests with 88 skipped across 73 files. All 15 cases passed in
93
+ [task-recall-memory.test.ts](../../../packages/memory/tests/task-recall-memory.test.ts),
94
+ including source revocation, exact recall after restart, rollback under a
95
+ controlled settlement failure, and native source versions across sessions.
@@ -0,0 +1,226 @@
1
+ # WO-03 Evidence-bound promotion into a model adapter
2
+
3
+ Status — live qualification, activation, and exact rollback passed on the separately approved Qwen3.5-4B.
4
+
5
+ ## User outcome
6
+
7
+ Promote a verified reusable procedure through an explicit, inspectable
8
+ parametric candidate workflow. A compatible adapter must come from actual
9
+ training and pass held-out recall and unrelated-behavior checks before
10
+ activation. Preserve the base model and make rollback observable.
11
+
12
+ ## Ownership and sources
13
+
14
+ Own new promotion files in `packages/orchestrator/src/nol` or
15
+ `packages/cli/src/nol`, their focused tests and any existing NOL-specific
16
+ adapter seam needed for them. Coordinate generic exports, model profile
17
+ loading, and runner call sites with the integrator before edits. Coordinate
18
+ candidate eligibility and scope with WO-02.
19
+
20
+ Start at `packages/orchestrator/src/nol/sleep-replay.ts` and
21
+ `.aiwg/wo-memory-context-program/SLEEP-weight-consolidation.md`. Follow the
22
+ existing NOL artifact custody and PEFT runtime under `packages/cli/src/nol`
23
+ and the worker assets in `packages/execution`. Reuse the authorized
24
+ adapter, artifact hashing, and fenced model execution path where possible.
25
+ A replay plan by itself contains no trained parameters.
26
+
27
+ Keep source identity, known authorization for intentional training, scoped
28
+ eligibility, resolved model identity and request bounds in the plan. Exclude
29
+ secrets, private transcripts and unverified episode interpretations. Prefer
30
+ synthetic fixtures for training and evaluation. Reject stale model identities
31
+ and expose unavailable backend capability. Keep training, qualification and
32
+ activation as explicit states. Use a genuine training worker and retain
33
+ evidence of the resulting compatible adapter. Existing approved operator
34
+ controls determine activation and rollback. Implement the integration seams
35
+ and deterministic tests without loading an inference or training model.
36
+ The integrator owns GPU preflight and live runs.
37
+
38
+ ## Acceptance and evidence
39
+
40
+ - Ineligible memories yield zero training invocations. Same source versions and
41
+ split produce the same plan ID. Holdout and train examples are disjoint.
42
+ - An explicitly eligible synthetic candidate can drive a compatible training
43
+ backend and produce a separately hashed adapter artifact. Invalid or missing
44
+ outputs, failed training and failed evaluation leave the base service intact.
45
+ - Qualification demonstrates improvement on a predeclared held-out target
46
+ and no regression on pinned contamination and unrelated-behavior controls.
47
+ Rollback returns the runtime to the exact base/previous adapter identity.
48
+ - Document supported model family, bindings, launch command, positive and
49
+ negative test counts, and gaps here. Hand back the artifact receipt schema.
50
+
51
+ ## Operator workflow
52
+
53
+ The headless command uses the current project root, the local operator UID, and
54
+ that project's existing `.omnius/context-memory.db`. It opens the memory store
55
+ read-only and derives the same scope as local TUI task recall. `candidates`
56
+ prints only candidate IDs, evidence digests, and occurrence counts. The current
57
+ Telegram context remains governed by its own authenticated scope.
58
+
59
+ ```sh
60
+ omnius memory-promotion candidates
61
+ omnius memory-promotion probe ./promotion-probe.json
62
+ omnius memory-promotion plan ./promotion-profile.json
63
+ omnius memory-promotion train ./promotion-profile.json PLAN_ID
64
+ omnius memory-promotion evaluate ./promotion-profile.json PLAN_ID
65
+ omnius memory-promotion status ./promotion-profile.json PLAN_ID
66
+ omnius memory-promotion activate ./promotion-profile.json PLAN_ID REVISION
67
+ omnius memory-promotion infer ./promotion-profile.json "Operator test prompt"
68
+ omnius memory-promotion rollback ./promotion-profile.json ACTIVE_REVISION
69
+ ```
70
+
71
+ The probe and profile JSON files must be private and owned by the local
72
+ operator. The CPU-only probe takes absolute `pythonPath` and
73
+ `dependencyLockPath`. Pass a real absolute `checkpointRoot` to also produce a
74
+ sealed `model` and `binding`. It accepts `modelId` and `contextLimit`
75
+ overrides. Configure `omnius.task-memory-promotion-profile.v1` with the
76
+ probe's `model`, `binding`, and `runtimeBuild`, the three absolute paths,
77
+ the current `candidateId`, and `gpu` with an exact `gpuUuid` and
78
+ `requestedMiB`. Set `bounds` with `rank`, `targetSiteIds`, `epochs`,
79
+ `maxSteps`, `maxInputTokens`, `maxOutputTokens`, `maxAdapterBytes`,
80
+ `timeoutMs`, `learningRate`, and `seed`. Target IDs come from the model
81
+ manifest's BF16 MLP parameter sites.
82
+
83
+ The `curriculum` uses `omnius.task-memory-promotion-curriculum.v1`, the
84
+ candidate ID and its `evidenceDigest`, `origin: "operator_authored_synthetic"`,
85
+ and `reviewed: "credential_and_transcript_free"`. Each case has `id`,
86
+ `family`, `template`, `split`, `prompt`, and `expected`. Declare ancestry
87
+ and known duplicates through optional `parents` and `nearDuplicates`. Each
88
+ split must have at least one case. Training gets `training` and `rehearsal`.
89
+ Evaluation gets `recall`, `contamination`, and `unrelated`. Commit the
90
+ declared split by reviewing and using the resulting plan ID. Exact native
91
+ evidence is rechecked before every stage and material operation. Private
92
+ episodes and transcripts are never copied into the synthetic examples.
93
+
94
+ The worker supports the unquantized BF16 dense Transformers Qwen3.5-4B
95
+ Safetensors checkpoint and reviewed PEFT 0.21.2. A valid checkpoint is a
96
+ complete prepared real-file tree. Hugging Face cache symlink snapshots require
97
+ staging. The worker is offline and launcher-owned. It verifies the base
98
+ files, tokenizer, runtime build, dependency lock, and GPU placement before
99
+ optimization or generation. Its optimizer updates only unmerged LoRA factors.
100
+ The runtime uses a fixed broker reservation, and the worker applies the
101
+ reservation's allocator budget after checking the zero-token load.
102
+
103
+ A qualification compares greedy baseline and candidate responses against
104
+ the predeclared held-out labels. It requires an improved absolute recall
105
+ case count, preservation of every recall case the base gets right, and exact
106
+ expected responses on every contamination and unrelated-behavior control in
107
+ both runs. The selection uses an expected revision and is private to this
108
+ operator route. `infer` exercises the exact selected candidate or base.
109
+ Rollback returns the previous qualified adapter or the pinned base and
110
+ reports the resulting identity. The main Omnius serving endpoint is outside
111
+ this route.
112
+
113
+ ## Artifact receipt
114
+
115
+ `omnius.task-memory-promotion-artifact.v1` carries `planId`,
116
+ `baseModelDigest`, `bindingDigest`, `trainingDigest`, `workerSha256`,
117
+ completed optimizer `steps`, and actual CUDA `placement`. It contains
118
+ `config` and `weights` CAS references and an independent SHA-256 for every
119
+ serialized F32 factor. The artifact receipt itself has a separate SHA-256.
120
+ `omnius.task-memory-promotion-qualification.v1` pins that receipt and the
121
+ held-out digest, with each case's applicability, outcome, and response
122
+ hashes and the aggregate recall comparison. The project state persists
123
+ authorization-relevant plan identity, artifact and evaluation receipts, and
124
+ versioned selection. Plan receipts and status contain no model response
125
+ text, optimizer state, or raw episodic records.
126
+
127
+ ## Verification
128
+
129
+ 23 passing focused cases cover five positive workflow and custody checks
130
+ and 18 rejection and isolation checks. The workflow tests use a local
131
+ real memory database and synthetic adapter fixtures. A separate test drives
132
+ the actual framed Python worker through startup and shutdown with CUDA
133
+ hidden, checks that no model framework was imported, and verifies that
134
+ training and generation reject an unplaced worker. The CLI typecheck and 11 worker asset and package inventory checks passed.
135
+ CPU inspection of the cached Qwen3.5-4B-Base confirmed the required layout
136
+ and target names. The live qualification used a private, fully hashed
137
+ snapshot and an isolated Python installation with the reviewed PEFT
138
+ distribution.
139
+
140
+ ## Live qualification evidence
141
+
142
+ The operator separately approved Qwen3.5-4B-Base for this training run.
143
+ The CLI and Telegram qualification used the PI-adapted E03 Ollama model.
144
+ The E03 release lineage preserves its original 28-shard BF16 text checkpoint,
145
+ a separate PI LoRA, and the merged Q8_0 GGUF. The retained E03 source has 64
146
+ layers, hidden size 5120 and the `Qwen3_5ForCausalLM` layout. This trainer
147
+ admission supports the 32-layer Qwen3.5-4B Transformers layout.
148
+
149
+ The first scoped zero-token load caught a mismatch between the full
150
+ on-disk inventory and BF16 runtime parameter dtypes. The probe now seals
151
+ the supported BF16 MLP sites, while preserving the full checkpoint file
152
+ hashes. The re-probe reported 96 sites and the same six file hashes. The
153
+ operative model manifest is
154
+ `d296cf1b46b574d58f3041273aa3a0e9c938de5dd895fd153629633b6a3af156`.
155
+ The isolated runtime build is
156
+ `a4f6a0defee023dd73879327228d556981ff1095a6c52801d1ffdf0f93fc6899`.
157
+
158
+ Three distinct synthetic command invocations produced passing independent
159
+ verification receipts, each committed to its native terminal record and
160
+ reopened through successful-procedure memory before candidate admission.
161
+ The first plan `dead2286fcdd40f22e214e1cb984de8d97e72e93c160813c0d2e9f5f541557db`
162
+ froze 14 training and rehearsal cases, three recall cases, and four controls.
163
+
164
+ Every workload used an active broker-owned 20,000 MiB reservation on A100
165
+ GPU1 `GPU-170a99ee-850f-2182-1050-4e8d3c87b6b0`. Preflight checked the
166
+ actual worker's visibility before load and PID residency after load.
167
+ An awaited host callback held each worker until the placement was reported.
168
+ PIDs 1749108, 1775908, and 1790945 covered training, baseline evaluation,
169
+ and adapted evaluation. While training held the selection's write
170
+ transaction, a concurrent status saw the base at revision zero and a
171
+ concurrent activation failed with SQLite contention. All three workers
172
+ retired and released their leases. Independent SHA-256 verification of
173
+ all six checkpoint files passed after training.
174
+
175
+ Native training completed 70 optimizer steps and produced 16 separately
176
+ hashed F32 factors. The 3,016,968-byte weights have SHA-256
177
+ `d91502f65e6b8953ce198b701c54b0e21e5a105c80895fcac4829fbb1236a02d`.
178
+ The adapter receipt is
179
+ `df6369861e19a86191004e270d7b143170481338cf52c0e784b015390f8a5ac0`.
180
+ Recall improved from 0/3 to 3/3, and controls regressed from 4/4 to 0/4.
181
+ All seven candidate responses had the exact same learned-word hash.
182
+ Qualification
183
+ `9f7a68610a2e37bfeef47daf8be37c37990ead4d4964ce93df7e4db47e0e9f59`
184
+ failed. Explicit activation was denied, with the base still selected at
185
+ revision zero.
186
+
187
+ A second plan
188
+ `ea87e79d50bd71145452bee22af3e9c79a2b06aa0ed566043025f4fb833bac7e`
189
+ preregistered a lower learning rate and rank, 20 interleaved varied rehearsal
190
+ cases alongside 10 positive cases, and preserved the original seven
191
+ held-out cases plus four fresh cases under the same qualification gate.
192
+ The private preregistration SHA-256 is
193
+ `acbb91dfb5ec49613f221b7f931710a247d77f0343f070315562b6c206ce9210`.
194
+
195
+ The rehearsal run completed 90 native optimizer steps. It produced 12
196
+ verified F32 factors and 1,132,224 bytes of adapter weights. The weights
197
+ SHA-256 is
198
+ `1daffa842e26efe3a726acf61668717e357d541bd5931fb39fd91be7f52b9f37`.
199
+ Its adapter receipt is
200
+ `9b9d370900f0911447189b77882513050b248261857959699a40e30456f336f4`.
201
+ Training PID 1826872 and evaluation PIDs 1853398 and 1866662 each passed
202
+ the independent GPU1 check and released their scoped lease. The baseline
203
+ scored 0/5 on recall and the rehearsal candidate scored 5/5. On the three
204
+ contamination and three unrelated cases, both scored 6/6 and their
205
+ response digests matched exactly for each case. This qualified the
206
+ synthetic rehearsal adapter under receipt
207
+ `1b461d909cbe961cf255cea2fad9b088c002c69fde794eaf9d21b3263d01769e`.
208
+
209
+ A stale selection revision was rejected. Explicit activation selected the
210
+ qualified adapter at revision 1. A fresh PID 1884929 served that exact
211
+ candidate and returned `violet` on the selected recall case. Rollback
212
+ returned the original base binding and model digest at revision 2. Fresh
213
+ PID 1902567 returned the original baseline answer `incident` to the same
214
+ prompt. Both live responses matched their held-out evaluation hashes.
215
+ All seven overlapping baseline responses also matched across both
216
+ evaluation runs. The isolated route finished on the base.
217
+
218
+ The final independent audit rehashed all eight CAS references and checked
219
+ eight dedicated placement acknowledgements and clean worker exits.
220
+ Broker and NVIDIA telemetry showed zero remaining promotion leases or
221
+ workers and no GPU1 quarantine. The evidence is retained at
222
+ `/media/roko/sdb1/omnius-task-recall-qualification.C5YypS/promotion-v2-evidence`.
223
+ The final verification file SHA-256 is
224
+ `d7f3dd2311a1d420fea3b69476395adcab15b0e87ff6b512dbbcc18b84e888bd`.
225
+ These measurements cover the declared synthetic cases and the isolated
226
+ Qwen3.5-4B binding.