LearnNewsExamplesServices
Frontmatter
id17500
titleExtract AgentOS into a plane-separated repository
stateOpen
labels
epicairefactoringarchitecturebuildagent-os
assignees[]
createdAtAug 21, 2026, 10:03 PM
updatedAtAug 25, 2026, 10:37 PM
githubUrlhttps://github.com/neomjs/neo/issues/17500
authorneo-gpt-emmy
commentsCount24
parentIssuenull
subIssues
17502 Record the C′ AgentOS extraction topology
17525 Build the zero-residue AgentOS extraction inventory
17533 Exercise the isolated AgentOS plane boundary before relocation
16202 Neural Link recorder writes the host graph; its data belongs in the container
17627 Container-plane projection owner over a source-neutral corpus mirror
17631 Reconcile out-of-AgentOS consumers before relocation
17640 Scaffold neomjs/neo-agent-brain: dev branch, labels, provenance shell
17699 Disposition every AgentOS-touching workflow before the cut
17701 Transfer one relationship-bearing issue as the tracker canary
17702 Pure family resolution pulls Memory Core config into Edge imports
17704 A resolved SourceRegistry call remains in the computed-edge ledger
17705 Script-plane ledgers report stale authority but CI exits green
17707 Split proof consumes module custody across unrelated inventory surfaces
17718 Fleet seat plans confuse AgentOS runtime and target roots
17786 Execute the Agent OS repository cut
subIssuesCompleted14
subIssuesTotal15
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]

Extract AgentOS into a plane-separated repository

Open Backlog/active-chunk-18 epicairefactoringarchitecturebuildagent-os
neo-gpt-emmy
neo-gpt-emmy commented on Aug 21, 2026, 10:03 PM

Context

This Epic graduates the bounded first-wave decision from D#17489, not the long-term topology in D#17247.

The operator-set target is a one-week extraction wave. Release sequencing is now settled: the Agent OS repository cut and Engine-only onboarding proof precede the v13.2 Engine release. The extraction is a release prerequisite, not optional post-release cleanup. Current source makes the urgency measurable:

  • root package.json: 115 scripts, 81 named ai:*;
  • ai/scripts: 157 module files arranged by activity rather than Cloud/Edge realm;
  • 3 live Engine→Brain build imports;
  • 19 workflow files carrying 69 ai/scripts/ references;
  • a 63-opener migration census with unclassified residue;
  • an existing extraction prototype covering 751 files and 1,512 import references.

This needs an Epic because the outcome crosses package custody, executable-plane isolation, seat bootstrap, build/CI, tracker migration, release sequencing, and a repository cutover. No single PR can deliver that outcome truthfully.

The Problem

Neo's Engine repository currently collapses three different authorities into one root:

  • Body versus Brain ownership;
  • Docker Cloud versus Host Edge execution;
  • installed runtime root versus the target checkout an agent is working on.

A flat move of ai/** would preserve the ambiguity in a new repository. A two-repository first wave would add another tracker, release, CI institution, and standing cross-repository contract before the internal plane boundary is proven. Leaving the mixed root in place keeps the Engine package difficult to adopt as exactly the Engine.

The migration must therefore remove AgentOS from the Engine without creating an Engine→AgentOS dependency, without giving Edge transitive access to durable-store packages, and without breaking sessions whose cwd remains an Engine checkout.

Intended Solution Shape

Create one new repository for the first wave; its concrete name is selected only after the required registry/in-market naming sweep. Package topology is plane-owned by construction:

  • the repository root is the Host-Edge package surface and exposes Edge-only scripts;
  • cloud/ is an independently installed nested package owning Docker services, databases, durable state, ingestion, migration, backup, and compaction;
  • npm workspaces are forbidden—the ancestor-hoist falsifier is the reason;
  • shared/ may exist only if the inventory proves a genuinely cross-plane population of pure modules; it contains no drivers, durable-store packages, host capabilities, or ambient config authority.

AgentOS consumes the published Engine package for Neo, Core, Data, State, and the class system. Engine never imports AgentOS and carries no Agent OS dependencies or devDependencies. src/ai/** remains Engine-owned as the Body-side Neural Link contract/client. Engine Whitebox tests use that Engine-owned contract/client against an externally provisioned Agent OS runtime pinned by CI/Fleet outside the Engine package graph.

Runtime and target authority remain separate: Fleet promotes its existing two-root workspace primitive into explicit agentosRuntimeRoot and targetRepoRoot. Neural Link's MCP executable and Bridge spawn from agentosRuntimeRoot; GitHub Workflow binds Git/worktree/project truth to targetRepoRoot; the harness cwd stays in the target Engine checkout. Generated-seat proof uses different directories, swaps them as negative controls, and proves either omitted binding fails loud without recovering from process.cwd(). Existing ignored seat configs are re-materialized and read back at cutover.

Cloud/Edge isolation is mechanical:

  • root Edge and nested Cloud installs resolve independently, with no workspace hoist;
  • plane manifests enumerate launchable entrypoints;
  • {disk} ⊖ {authority} = ∅ proves population completeness;
  • an isolated Edge package artifact/install has no parent dependency tree or workspace hoist;
  • the existing static closure and runtime package-denial instruments run over the same population, with a named Cloud positive control;
  • variable-computed dynamic imports are eliminated or registry-dispositioned.

The exact inventory/membership reconciliation and the temporary C′ paired-gate exercise are the Epic's first two blocking proofs. Per the explicit criteria-timing amendment at DC_kwDODSospM4BFFq_, both receipts must be linked here before any relocation leaf starts.

Wave-one custody is deliberately narrow: apps, learn/agentos, resources/content, Portal/SEO/tree inputs, and the minimal Engine-facing contributor surface remain Engine. Open AgentOS tickets convert only after labels are provisioned and a canary transfer verifies redirects, labels, and relationships. A named cut window and in-flight-lane ledger disposition every open ai/ PR and claimed lane before the Engine deletion PR opens.

Graduation Provenance

[DIVERGENCE_FOLDED @ DC_kwDODSospM4BFFYX]

[GRADUATION_PROPOSED @ body 2026-08-21T20:00:23Z]

STEP_BACK: DC_kwDODSospM4BFFaK — 5 pass, 3 acknowledgment partials, 0 blockers.

Author signal: DC_kwDODSospM4BFFaq.

Post-graduation authority correction: DC_kwDODSospM4BFFq_ explicitly amends criteria 2/3 timing and folds the Edge-root / nested-Cloud / no-workspaces invariant; repository naming remains unresolved.

Post-graduation OQ5/release correction: Euclid's source-bound tightening is folded in the author response: runtime root owns Agent OS executable/Bridge resolution; target root owns GitHub Workflow checkout truth; generated-seat roots differ and swap/omit controls fail loud; existing ignored configs re-materialize. Operator sequence is explicit: cut + Engine-only onboarding proof before v13.2.

Post-graduation consumer correction: Vega's out-of-ai/ population is folded with the author correction: no Engine Agent OS devDependency; Engine-only and cross-repository Whitebox tiers are distinct; custody follows test/hook subject; one successor reconciles every consumer edge before relocation.

Signal Ledger

Family Signal Anchor Disposition
GPT / author [AUTHOR_SIGNAL] by @neo-gpt-emmy body 2026-08-21T20:00:23Z / DC_kwDODSospM4BFFaq current
Claude / non-author [GRADUATION_APPROVED] by @neo-opus-vega Epic review IC_kwDODSospM8AAAABQHA4IQ / corrected authority DC_kwDODSospM4BFFq_ current — timing and root correction explicitly revalidated

Family-keyed quorum is current: the GPT author signal and Claude non-author approval both bind the corrected timing/root authority. This authorizes incremental leaf creation under the blocking proofs; it does not bypass any leaf's own ticket-intake, evidence, or relationship gates.

Unresolved Dissent

No architectural dissent remains after the independent Epic Review revalidated the corrected authority. Repository naming remains unresolved until the registry/in-market sweep; neither neomjs/agentos nor neomjs/brain is selected.

Unresolved Liveness

  • Kimi family: benched 2026-08-17, no signal and none obtainable while benched. (Corrected 2026-08-24: this row read "roster-active" — true when written, false after the flatrate was cancelled following an unannounced ~3-5x provider allowance reduction.) K3 is open-weights, so the seats are unhosted rather than retired: re-poll if viable K3 capacity returns from any host before the first implementation PR. Do not hold a graduation waiting on this family — an absent signal here is unobtainable, not declined.
  • Gemini family: operator-benched. Re-poll on operator reactivation.

No-signal is archived as liveness, never counted as consent.

Discussion Criteria Mapping

Discussion criterion Epic covenant
C′ topology one repository (name unresolved); root = Host Edge package, cloud/ = independent nested package, no npm workspaces; conditional pure shared/ only if inventory-proven
Exact inventory every executable, root command, workflow reference, config authority, and custody decision is the first blocking Epic proof; receipt linked before any relocation leaf
Membership + denial reconciled plane manifests, isolated Edge artifact, static closure, runtime denial, Cloud positive control, and computed-import disposition form the paired second blocking proof before relocation
Engine continuity Engine-only build/unit/component/non-Neural-Link E2E tiers load without Agent OS; the separate Whitebox tier uses an externally provisioned Agent OS runtime with distinct runtime/target roots, Engine-owned client/contract code, swap/omit controls, and no package-graph dependency
Dependency direction AgentOS→published Engine only; zero Engine dependencies / devDependencies edges to Agent OS; explicit Neural Link compatibility contract and pre-relocation out-of-AgentOS consumer-edge reconciliation
History/provenance no historical neomjs/neo SHA changes; new-repository provenance is decided before copying
Consumer preservation apps and published learn/content/Portal surfaces stay Engine; pure UI/contract specs stay, AgentOS-owned tests move or become served-contract integration, named Brain hooks move, and leaf 11 materializes ignored target artifacts
Tracker cutover labels first; one canary transfer; then bulk conversion
Cutover safety named cut window and in-flight PR/lane ledger
Governance required ADR, STEP_BACK receipts, signal ledger, timing/root correction DC_kwDODSospM4BFFq_, naming disposition, and explicit non-disposition of D#17247

The native parent-child relationship graph—not this body—will own the evolving leaf set. Each linked leaf must remain one-PR deliverable and carry its own acceptance criteria and Contract Ledger.

The independent Epic Review carries the initial dependency/leaf map and entry-seeded closeout matrix. They are extension and closeout aids, not a duplicated sub registry: native child relationships remain canonical, and epic-resolution reconciles the most recent matrix-shaped artifact.

Decision Record

Required: a new ADR records the folded Edge-root / nested-Cloud / no-workspaces C′ topology, conditional neutral-shared contract, resolved repository name, plane membership authority, one-way Engine dependency, the distinct agentosRuntimeRoot / targetRepoRoot contract with swap/omit controls and resident re-materialization, migration provenance, release-before-v13.2 sequencing, and retirement/revalidation triggers. ADR drafting cannot freeze a repository name before the naming sweep.

Decision Record impact

Depends on ADR 0039's Cloud/Edge executable-closure semantics and preserves ADR 0019's AiConfig SSOT during realm disposition. It neither amends nor graduates D#17247.

Structure Evidence

The mandatory full ai:structure-map -- --files --loc invocation currently exceeds Node's maximum string size. Scoped invocations succeeded for the owning surfaces:

  • ai/mcp: six server roots plus shared transport/auth substrate;
  • ai/scripts: the complete 157-file realm-blind script population;
  • ai/services/fleet: 64 files, including the two-root provisioning and managed MCP descriptor authorities.

The failed full-map command is recorded as tooling friction, not treated as empty structure evidence.

Out of Scope

  • graduating, narrowing, or closing D#17247;
  • extracting Core or src/ai/**;
  • moving Fleet Manager UI or other apps in wave one;
  • moving learn/agentos, Portal/content custody, or SEO/tree inputs in wave one;
  • changing database ownership away from Docker Cloud;
  • splitting Cloud and Edge into separate repositories in this wave;
  • another neomjs/neo history rewrite;
  • reversing the operator-set release sequence: the Agent OS cut and Engine-only onboarding proof precede the v13.2 Engine release.

Avoided Traps

  • Flat git mv ai/: relocates the mixed topology instead of separating it.
  • Two repositories immediately: adds standing institutional tax before the internal boundary proves independent cadence.
  • Manifest omission as isolation proof: workspace hoisting can make undeclared Cloud packages resolvable from Edge.
  • Epic-first discovery: the exact inventory and bounded gate exercise remain pre-move evidence, not work deferred until after relocation starts.
  • Moving published guides with executables: breaks Engine Portal, SEO, tree, and source crosslinks inside the one-week window.
  • Bulk issue transfer first: loses milestone/label/relationship semantics without a canary.
  • Silent cutover: strands open PRs and active lanes against paths that disappear.
  • Copied workflow authority: every workflow must move, pin-fetch the extracted runtime, or retire; copying preserves parallel owners.
  • Mirrored code without mirrored guards: moving or inlining code must carry every lint-registry obligation it already participates in (retry bounds, atomic writes, fixed sleeps).
  • Import-only census: subprocess, spawn, exec, and command strings are executable crossings too; an import-only inventory misses them.
  • First-occurrence witnesses: migration checks must anchor the occurrence carrying the property, not an earlier prose/docblock copy of the same needle.

Related

Source: D#17489. Long-term authority: D#17247. Executable closure: D#16652 / ADR 0039. Existing seams: #17239, #17421. Bounded extraction precedent: Epic #17238.

Origin Session ID: 7287162e-14b1-44ca-b7d5-a2854211828f

Retrieval Hint: query_raw_memories("D#17489 C-prime AgentOS extraction plane manifests runtime root target root one-week")

tobiu referenced in commit e834470 - "fix(test): cancel graph-projection timers across spec files (#17754) (#17755) on Aug 25, 2026, 11:49 AM