Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 26 additions & 1 deletion .planning/PROJECT.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,27 @@ declared native workbench, Rust execution-host migration and independent R oracl
The initial execution scope is contract alignment and the first independently
verifiable Pi-boundary slice, not a claim that the whole milestone is ready.

## Owner direction, 2026-11-10

The owner widened the target: replace every remaining Pi dependency, migrate the
core itself to Rust, and keep existing extensions working. The end state is a Rust
core that is the single writer, with Node reduced to an extension host. The staging
rules below still apply to every step toward it. Plan:
`packages/coding-agent/docs/omk-2-rust-core.md`. Survey:
`packages/coding-agent/docs/harness-survey-2026-11.md`.

Decided the same day: 2.0.0 ships at stage K5; extensions run on Node in a host
process; the Rust terminal UI takes the look of the OpenTUI status panel header.
The `omk+pi` adapter is kept and moves entirely to Rust; the Rust core supports
Linux, macOS and Windows at parity with the Node core on each.
Contract: `specs/120-rust-core/spec.md`.

The owner then delegated the 41 remaining decisions. They are recorded by ID in
`specs/120-rust-core/decisions.md`. The release now depends on Phase 2, Phase 4 as
limited, Phase 7 and Phase 6; the desktop workbench, the terminal observation phase
and the rest of the execution-host ownership follow 2.0.0. Still needing the owner:
the K1 dependency review bundle and the wire cost threshold.

## Current baseline

- Published/workspace version: 1.5.10; do not change it before release gates.
Expand All @@ -28,7 +49,11 @@ diff from the baseline. Do not regenerate catalogs or unrelated baselines.

- OMK owns its extension, tool, provider, state and permission contracts.
- Production starts with the current Node owner; migrate execution boundaries to
Rust only after authority, settlement and recovery acceptance.
Rust only after authority, settlement and recovery acceptance. Since 2026-11-10
the declared end state is a Rust-owned core; this bullet governs how each
boundary gets there, not whether it does.
- Extensions are a preserved surface. A core change that breaks the documented
extension API needs a tested mapping or an owner-approved exception.
- TUI/native views project observations and submit explicit intents; rendering
must not acquire execution authority.
- R is a development/acceptance oracle, never part of the production agent loop.
Expand Down
31 changes: 24 additions & 7 deletions .planning/REQUIREMENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@ to that source of truth; they are not a replacement specification framework.
- [ ] **V2-DESKTOP-01**: Native workbench uses reviewed dependencies and real runtime observations; graph edits do not manufacture authority.
- [ ] **V2-PLATFORM-01**: Verify installation, upgrade, input, reconnect, recovery and rollback on every claimed desktop platform.
- [ ] **V2-RELEASE-01**: All milestone gates and constitution release conditions pass before lockstep versioning and separately authorized publication.
- [ ] **V2-RUSTCORE-01**: Contracts, providers, agent loop, sessions and built-in tools run in Rust with fixture parity against the TypeScript reference; headless modes are served by the Rust core behind an explicit selection, with verified rollback. (added 2026-11-10)
- [ ] **V2-EXTHOST-01**: Existing extensions run unchanged through a versioned extension-host wire; the conformance corpus compares event order, tool calls, results, session entries and rendered lines, and counts blocked cases. (added 2026-11-10)
- [ ] **V2-PIZERO-01**: The default binary and its declarations resolve, alias and require no Pi package, verified on packaged artifacts; any compatibility adapter is opt-in and outside the core. (added 2026-11-10)
- [ ] **V2-PICOMPAT-01**: The `omk+pi` adapter stays an explicit opt-in and is owned by Rust: tables defined once in the contract crate, manifest resolution and doctor in Rust, and a host that applies a generic specifier map and names no Pi package. (added 2026-11-10)
- [ ] **V2-RUSTPLAT-01**: The headless Rust core passes its gates natively on Linux, macOS and Windows, at parity with the Node core's per-platform behavior including refusals; a platform with no run is a failure. (added 2026-11-10)
- [ ] **V2-RUSTUI-01**: The Rust terminal UI preserves input, IME, images, keybindings and extension-rendered components, in the OpenTUI status panel header look, verified on real terminals. (added 2026-11-10; after 2.0.0)
- [ ] **V2-FLIP-01**: The Rust core becomes the default and the Node core is removed only after every subsystem's acceptance suite passes against the Rust owner. (added 2026-11-10; after 2.0.0)

Decision IDs in the table below refer to `specs/120-rust-core/decisions.md`. A
requirement moved after 2.0.0 is still required; it no longer gates that release.

## Traceability

Expand All @@ -26,11 +36,18 @@ to that source of truth; they are not a replacement specification framework.
| V2-CORE-01 | Phase 2 | Pending |
| V2-MIGRATE-01 | Phase 2 | Pending |
| V2-API-01 | Phase 2 | Pending |
| V2-UI-01 | Phase 3 | Pending |
| V2-UI-02 | Phase 3 | Pending |
| V2-R-01 | Phase 4 | Pending |
| V2-RECOVERY-01 | Phase 4 | Pending |
| V2-HOST-01 | Phase 5 | Pending |
| V2-DESKTOP-01 | Phase 5 | Pending |
| V2-PLATFORM-01 | Phase 6 | Pending |
| V2-UI-01 | Phase 3 | Pending, after 2.0.0 (D2) |
| V2-UI-02 | Phase 3 | Pending, after 2.0.0 (D2) |
| V2-R-01 | Phase 4 | Pending, limited to policies ported in K0 to K5 (D3) |
| V2-RECOVERY-01 | Phase 4 | Pending, limited to policies ported in K0 to K5 (D3) |
| V2-HOST-01 | Phase 5 | Pending; remainder after 2.0.0 (D4) |
| V2-DESKTOP-01 | Phase 5 | Pending, after 2.0.0 (D1) |
| V2-PLATFORM-01 | Phase 6 | Pending, after 2.0.0 for the desktop application (D1) |
| V2-RELEASE-01 | Phase 6 | Pending |
| V2-RUSTCORE-01 | Phase 7 | Pending |
| V2-EXTHOST-01 | Phase 7 | Pending |
| V2-PIZERO-01 | Phase 7 | Pending |
| V2-PICOMPAT-01 | Phase 7 | Pending |
| V2-RUSTPLAT-01 | Phase 7 | Pending |
| V2-RUSTUI-01 | Phase 8 | Pending, after 2.0.0 |
| V2-FLIP-01 | Phase 8 | Pending, after 2.0.0 |
96 changes: 88 additions & 8 deletions .planning/ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,53 @@ The constitution and existing specifications remain authoritative.

- [x] **Phase 1: Pi-independent core boundary** (completed 2026-11-05)
- [ ] **Phase 2: Native extensions and explicit migration**
- [ ] **Phase 3: Observation ownership and TUI redesign**
- [ ] **Phase 4: Independent R parity and recovery**
- [ ] **Phase 5: Native workbench and Rust host slices**
- [ ] **Phase 3: Observation ownership and TUI redesign** (after 2.0.0, merged into K6; decision D2)
- [ ] **Phase 4: Independent R parity and recovery** (limited to policies ported in K0 to K5; decision D3)
- [ ] **Phase 5: Native workbench and Rust host slices** (remainder after 2.0.0; decisions D1, D4)
- [ ] **Phase 6: Platform and milestone release acceptance**
- [ ] **Phase 7: Rust core through headless candidate** (added 2026-11-10; required for 2.0.0)
- [ ] **Phase 8: Rust terminal UI, remaining subsystems and default flip** (added 2026-11-10; after 2.0.0)

Phases 7 and 8 were added by the owner's 2026-11-10 direction: replace every
remaining Pi dependency, migrate the core to Rust, keep extensions working. They
keep their numbers out of execution order so existing phase references stay valid.
The plan is `packages/coding-agent/docs/omk-2-rust-core.md`; stage names K0 to K8
come from it. The contract for Phase 7 is `specs/120-rust-core/spec.md`.

Owner decisions, 2026-11-10: 2.0.0 ships at K5, so Phase 7 gates the release and
Phase 8 follows it. Extensions run on Node in a host process. The Rust terminal UI
takes the look of the OpenTUI status panel header. The `omk+pi` adapter is kept and
moves entirely to Rust. The Rust core supports Linux, macOS and Windows.

The owner then delegated 41 further decisions. `specs/120-rust-core/decisions.md`
records them by ID. D1 to D4 change this index: 2.0.0 depends on Phase 2, Phase 4
as limited, Phase 7 and Phase 6. Phases 3, 5 and 8 follow the release. No phase was
renumbered, checked off or deleted.

### Research-backed execution order, 2026-11-12

K0/T012 is locally complete under the owner's explicit I1 G0 baseline change.
The four empty skill markers remain suppressed; request/RPC/archive bytes stay
unchanged. `sh specs/120-rust-core/verify-k0.sh` passes, and `npm run check` now
compares fresh contracts. This is not green overall CI or K5 platform acceptance.

Post-K0 work is refined in spec 121 and
`packages/coding-agent/docs/harness-roadmap-2026-11.md`, with primary-source
research, existing implementation mapping, measurable promotion/rollback gates
and per-stage K1–K8 deliverables. Existing phase numbers and release dependencies
are preserved. The execution order is:

1. H1 historical-checkpoint labels and H2 repeat-result audits: implemented locally,
no claimed model-performance gain or installed-runtime activation.
2. K1 B1 dependency review bundle and H3/H7 synthetic recovery/security corpora.
3. First K1 provider recorder, then independent Rust replay after bundle approval.
4. Freeze held-out tasks, model/conditions, trial isolation, analysis and dollar cap.
5. Test one H4 context, H5 delegation or H6 evaluator candidate at a time; H8 removes
scaffolding that no longer pays for itself. No default-on promotion without evidence.

The broader user request does not authorize external model spend without a cap,
new Rust dependencies without B1 review, workflow edits, publication or a second
scheduler. Pending studies remain pending, not hidden inside completed K0 work.

### Phase 1: Pi-independent core boundary

Expand All @@ -37,35 +80,72 @@ owned resources, and verify OMK's extension/provider/tool API across artifacts.
contract and visual/input behavior on native TUI, OpenTUI and tmux surfaces.
**Depends on:** Phase 2.
**Requirements:** V2-UI-01, V2-UI-02
**Release:** After 2.0.0. Its work merges into stage K6 (decision D2).

### Phase 4: Independent R parity and recovery

**Goal:** Expand required finite oracle slices and verify ownership, budget and
settlement behavior at real runtime entry points.
**Depends on:** Phase 2.
**Requirements:** V2-R-01, V2-RECOVERY-01
**Release:** Gates 2.0.0 only for the policies stages K0 to K5 port (decision D3).

### Phase 5: Native workbench and Rust host slices

**Goal:** Reuse existing observation prototypes, resolve dependency obligations,
and migrate execution ownership only at verified boundaries.
**Depends on:** Phase 3, Phase 4.
**Requirements:** V2-HOST-01, V2-DESKTOP-01
**Release:** Slices H1 to H2i stay as delivered. Grant ledger and scheduler
ownership moves to stage K7, and the desktop workbench follows 2.0.0 (decisions D1,
D4).

### Phase 6: Platform and milestone release acceptance

**Goal:** Verify actual installations and rollback on claimed platforms, close
documentation gaps, then follow the constitution's milestone release procedure.
**Depends on:** Phase 5.
**Requirements:** V2-PLATFORM-01, V2-RELEASE-01
**Depends on:** Phase 2, Phase 4 as limited, Phase 7. Phases 3, 5 and 8 are not
dependencies (decisions D1 to D4).
**Requirements:** V2-RUSTPLAT-01 for the headless core, V2-RELEASE-01.
V2-PLATFORM-01 covers the desktop application and follows 2.0.0.

### Phase 7: Rust core through headless candidate

**Goal:** Stages K0 to K5. One Rust contract crate with generated TypeScript types,
providers, agent loop and sessions, built-in tools, the extension-host wire with
the existing loader as its client, and print/JSON/RPC/ACP served by the Rust core
behind an explicit selection, on Linux, macOS and Windows. Pi-zero on packaged
artifacts. Compatibility tables, manifest dialect and doctor owned by Rust.
**Depends on:** Phase 1 and the accepted Phase 2 native-loader/API boundary,
not full Phase 2 closure. That closure joins at K5/Phase 6; making it a K0
prerequisite would block the already completed contract stage on later Pi-zero
work. K0 is locally complete. J1 permits only temporary resolution and review;
the concurrent K1 lane now records scoped B1 adoption in `k1-adoption.json` under
spec 120, with graph/build/replay validation still separate from approval.
G1 clipboard review and the source-implemented G2 aliases are separate Pi-zero units. Phase 4's independent oracle
applies to each numeric policy as it is ported.
**Requirements:** V2-RUSTCORE-01, V2-EXTHOST-01, V2-PIZERO-01, V2-PICOMPAT-01,
V2-RUSTPLAT-01

### Phase 8: Rust terminal UI, remaining subsystems and default flip

**Goal:** Stages K6 to K8, after the 2.0.0 release. Rust terminal UI in the OpenTUI
header look with extension compositing, the remaining subsystems including the
grant ledger and scheduler that Phase 5 leaves on Node, then the default flip and
removal of the Node core. The K6 spec owns the `DESIGN.md` change from square
hairline frames.
**Depends on:** Phase 5, Phase 7.
**Requirements:** V2-RUSTUI-01, V2-FLIP-01

## Progress

| Phase | Status | Evidence |
|---|---|---|
| 1 | Complete | Final goal verification 4/4, all three review findings resolved, 266 targeted tests and root check passed. |
| 2 | Native default and combined artifact gates passed; phase closure remains open | Node/Bun/types/source acceptance passed for candidate `019d076c…`; exact-origin revalidation and current package fingerprint match passed. Native default is `omk`, explicit compatibility remains. Remaining spec-108 criteria are separate. See [acceptance](phases/02-native-extensions-and-explicit-migration/02-ACCEPTANCE-20261108.md). |
| 2 | Historical native-default artifact pass; current candidate acceptance and phase closure open | Node/Bun/types/source acceptance and exact-origin revalidation passed for frozen candidate `019d076c…` on 2026-11-08, not today's changed source. Native default is `omk`, explicit compatibility remains. Fresh receipts, clipboard replacement and D5b change splitting remain required; D5a waived tokens-per-turn. See [acceptance](phases/02-native-extensions-and-explicit-migration/02-ACCEPTANCE-20261108.md). |
| 3 | Not started | Existing TUI observations are not native visual acceptance. |
| 4 | Partial finite mathematical acceptance | Existing R 4.4.3 ran 6,566 host-budget traces and TS/R/Rust DAG/allocation acceptance. Sixty oracle/negative-control tests passed without skips. Broader policy and recovery gates remain open. |
| 5 | Bounded H1–H2g source acceptance, native supervision/reconnect opt-in and explicit GC | Rust supervises Linux commands and publishes durable execution-record prefixes. Coordinator/CLI reconnect preserves original writer/verifier grants, candidates, generation and phase budgets. Explicit native-record GC keeps recoverable/unprovable records and retires only independently proven terminal data; interrupted deletion is retryable. Node retains authority, scheduling and publication. Native snapshots stream with bounded state. Start/revocation provenance survives compaction for retained grants; dropped-grant recovery, witness retention, DAG/scripted-agent/session reconnect, desktop and full Rust ownership remain incomplete. See [H1](RUST-HOST-01-RESULT.md), [H2b](RUST-HOST-02B-RESULT.md), [H2c](RUST-HOST-02C-RESULT.md), [H2d](RUST-HOST-02D-RESULT.md), [H2e](RUST-HOST-02E-RESULT.md), [H2f](RUST-HOST-02F-RESULT.md), [H2g](RUST-HOST-02G-RESULT.md) and [stream results](WORKBENCH-STREAM-01-RESULT.md). |
| 6 | Not started | Version remains 1.5.10. |
| 5 | Bounded H1–H2i source acceptance, native supervision/reconnect opt-in and explicit GC | Rust supervises Linux commands and publishes durable execution-record prefixes. Coordinator/CLI reconnect preserves original writer/verifier grants, candidates, generation and phase budgets. Explicit native-record GC keeps recoverable/unprovable records and retires only independently proven terminal data; interrupted deletion is retryable. Node retains authority, scheduling and publication. Native snapshots stream with bounded state. Start/revocation provenance and recoverable settled grants survive compaction; Rust enforces original boot-bound phase caps after parent loss. Dropped-grant recovery, native authorization revocation, witness retention, DAG/scripted-agent/session reconnect, desktop and full Rust ledger/scheduler ownership remain incomplete. See [H1](RUST-HOST-01-RESULT.md), [H2b](RUST-HOST-02B-RESULT.md), [H2c](RUST-HOST-02C-RESULT.md), [H2d](RUST-HOST-02D-RESULT.md), [H2e](RUST-HOST-02E-RESULT.md), [H2f](RUST-HOST-02F-RESULT.md), [H2g](RUST-HOST-02G-RESULT.md), [H2h](RUST-HOST-02H-RESULT.md), [H2i](RUST-HOST-02I-RESULT.md) and [stream results](WORKBENCH-STREAM-01-RESULT.md). |
| 6 | Not started | Workspace version is 1.5.11 at the 2026-11-12 source checkpoint; no release performed. |
| 7 | K0 locally complete; first K1 unit in progress, not accepted | T012/I1 and local K0 gate pass. A separate K1 lane is adding the first provider unit and records scoped B1 adoption; current graph/build/replay validation is not complete. No Rust agent runtime is selected. T011 results are historical, not K5 platform acceptance. |
| 8 | Planned, not started | After 2.0.0. Depends on Phase 5 and Phase 7. |
Loading
Loading