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
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Lina — agent guide

- Read [POLICY.md](POLICY.md) for development, CI, merge and release authority; [CONTRIBUTING.md](CONTRIBUTING.md) is the contribution entry point. Keep repository rules here, not in global client settings.
- Engine work follows the [Moirai engine design](docs/MOIRAI_ENGINE.md): three judgment modules with distinct objectives (Clotho: future outcomes, Lachesis: desire and learned preference, Atropos: adopted intentions), Moirai arbitration under a declared policy, Host ownership of records and handoff, and existing owners keeping their sources. The design is confirmed but not implemented; it is not evidence of orchestration, circuit learning or qualification.
- Engine work follows the [Moirai engine design](docs/MOIRAI_ENGINE.md): three judgment modules with distinct objectives (Clotho: future outcomes, Lachesis: desire and learned preference, Atropos: adopted intentions), Moirai arbitration under a declared policy, Host ownership of records and handoff, and existing owners keeping their sources. F1 common contracts are implemented; product integration remains planned, and this is not evidence of orchestration, circuit learning or qualification.
- Bun workspace; `bun test` / `bun run typecheck` / `bun run lint` from the root.
- Strict TS (see tsconfig.json), Biome, no default exports.
- Current runtime execution is Codex: `lina-codex` owns its RPC adapter and OpenCodex owns provider routing. The confirmed engine design (D13, D21) selects Senpi as the cognition backend, `omo app-server` as the development-task execution backend behind the existing `TaskManager` contract, and Senpi native provider accounts instead of OpenCodex; Codex CLI and OpenCodex are retired only when the F1–F4 roadmap lands that switch, not through ad-hoc edits. `lina-runtime/src/host.ts` contains Lina-owned contracts; do not introduce an engine SDK dependency into channels or memory.
- Codex owns current and planned cognition/task execution: `lina-codex` owns the RPC adapter and TaskManager contract; OpenCodex owns provider routing. Moirai D22 supersedes the Senpi/OMO migration in D13/D21. Preserve Codex/OpenCodex and existing data. `lina-runtime/src/host.ts` contains Lina-owned contracts; do not introduce an engine SDK dependency into channels or memory.
- Discord layering: `discord.js` only in `discord/gateway-source.ts`; `lina-channels` never imports `lina-runtime`. QA scripts under `scripts/qa/` are exempt from the discord.js restriction.
- Every behavior change starts with a failing test; tests await signals, never sleep.
- Runtime artifacts (`.lina-sessions`, `data/memory`, `data/notepad.md`) are gitignored.
2 changes: 1 addition & 1 deletion docs/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Lina owns persistent agent conversations, persona and memory, task coordination and the user interface. Codex is the execution engine; OpenCodex owns provider routing. The current execution and configuration contract is [CODEX_RUNTIME](CODEX_RUNTIME.md). [Product plans](PLANNING.md) distinguish current behavior from proposed UI, desktop, history and world features.

The agent core is the [Moirai engine](MOIRAI_ENGINE.md): three judgment modules with distinct objectives (Clotho: future outcomes, Lachesis: desire and learned preference via a MaleCNS mushroom-body subcircuit, Atropos: adopted intentions and continuity), Moirai arbitration under a declared per-catalog policy, and a Host that validates, records and hands off to existing owners. Its selected cognition backend is Senpi; development tasks move to `omo app-server` behind the existing TaskManager contract, and provider accounts, model listing and usage move to Senpi native (`account/*`, `model/list`), retiring Codex CLI and OpenCodex once the F1–F4 roadmap lands that switch (D21). [030](plans/context-engines/030_moirai_refactor_plan.md) keeps engine activity behind the ordinary conversation and replaces user-composed backend/model settings with maintainer-qualified presets. The [R0 QA probe](plans/context-engines/031_moirai_r0_evidence.md) exercises four persistent native threads separately from the product. Engine implementation, preset enforcement and the new conversation boundary remain planned; the Codex execution and model APIs described below still apply to the current runtime.
The agent core is the [Moirai engine](MOIRAI_ENGINE.md): three judgment modules with distinct objectives (Clotho: future outcomes, Lachesis: desire and learned preference via a MaleCNS mushroom-body subcircuit, Atropos: adopted intentions and continuity), Moirai arbitration under a declared per-catalog policy, and a Host that validates, records and hands off to existing owners. Its current and selected cognition/task backend is Codex, with the existing lina-codex RPC adapter and TaskManager. OpenCodex retains provider accounts, routing, model listing and usage ownership. D22 supersedes the Senpi/OMO migration in D13/D21. F1 judgment contracts are implemented; D23 adds bounded prose preparation and policy revision 2 while retaining historical revision-1 replay. [030](plans/context-engines/030_moirai_refactor_plan.md) keeps engine activity behind the ordinary conversation and replaces user-composed backend/model settings with maintainer-qualified presets. The [R0 QA probe](plans/context-engines/031_moirai_r0_evidence.md) exercises four persistent native threads separately from the product. Product mechanism integration, preset enforcement and the new conversation boundary remain planned; the Codex execution and model APIs described below still apply to the current runtime.

```text
browser -> same-origin gateway -> Lina agent/task controller
Expand Down
Loading
Loading