Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
42c0f51
feat(session-port): route claude/codex through SessionAgentTask (squa…
BlackKeyZ Jul 6, 2026
8523a9e
fix(session-port): gate codex model and claude permission-mode agains…
BlackKeyZ Jul 6, 2026
37a6c54
fix(session-port): close four ACP parity gaps on claude/codex
BlackKeyZ Jul 7, 2026
fbf626d
Merge remote-tracking branch 'origin/main' into feat/session-port
BlackKeyZ Jul 7, 2026
4e9cfe0
fix(session-port): emit empty-turn diagnostic tip on claude/codex
BlackKeyZ Jul 7, 2026
6ee5685
fix(session-port): broadcast CatalogUpdated so model picker fills async
BlackKeyZ Jul 7, 2026
3365ba0
fix(session-port): make claude/codex permission modes verbatim-equiva…
BlackKeyZ Jul 8, 2026
2565a13
fix(session-port): classify Detached as crash to restore ACP disconne…
BlackKeyZ Jul 8, 2026
9603ade
docs(agents): add no-guessing rule for agent-CLI behavior claims
BlackKeyZ Jul 8, 2026
79f9538
Merge remote-tracking branch 'origin/main' into feat/session-port
BlackKeyZ Jul 8, 2026
e9a0d5b
fix(session): preload cold-start catalog from persisted handshake
BlackKeyZ Jul 9, 2026
87e6ee9
fix(session): serve backend-seeded current model/mode in cold-start p…
BlackKeyZ Jul 9, 2026
a8b7dd2
fix(session): terminate claude turn on process exit without stdout EOF
BlackKeyZ Jul 9, 2026
b39d619
fix(session): surface per-model reasoning effort as a config option
BlackKeyZ Jul 10, 2026
8c6a789
fix(session): push slash commands when the catalog arrives
BlackKeyZ Jul 10, 2026
35641ee
fix(session): wire codex reasoning-effort setter via thread/settings/…
BlackKeyZ Jul 10, 2026
e3775bc
feat(claude): surface ultracode as an effort level for xhigh-capable …
BlackKeyZ Jul 10, 2026
cda8584
Merge remote-tracking branch 'origin/main' into feat/session-port
BlackKeyZ Jul 10, 2026
caa7d1f
style: apply rustfmt to session_agent/claude/codex_conn
BlackKeyZ Jul 10, 2026
ad3a362
Merge origin/main (release 0.1.45 #596, WIP team manual teammate mana…
BlackKeyZ Jul 10, 2026
2dcf6d8
fix(session): close three session-port seam degradations (codex read-…
BlackKeyZ Jul 13, 2026
1d9e4b7
test(session): track aionui-session claude wire fixtures used by incl…
BlackKeyZ Jul 13, 2026
71e72d0
Merge origin/main (#608 normalize Codex full-access mode) into feat/s…
BlackKeyZ Jul 13, 2026
33097df
test(session): fix flaky pump_tests subscribe-vs-pump race
BlackKeyZ Jul 13, 2026
a9b5607
Merge remote-tracking branch 'origin/main' into feat/session-port
Jul 14, 2026
00819f0
Merge remote-tracking branch 'origin/main' into feat/session-port
Jul 14, 2026
b6b7796
Merge remote-tracking branch 'origin/main' into feat/session-port
Jul 14, 2026
ecb7faa
chore: apply auto-fixes (fmt + clippy)
Jul 14, 2026
138bf5a
Merge remote-tracking branch 'origin/main' into feat/session-port
Jul 15, 2026
68649f2
Merge remote-tracking branch 'origin/main' into feat/session-port
Jul 15, 2026
32eb964
Merge remote-tracking branch 'origin/main' into feat/session-port
BlackKeyZ Jul 16, 2026
ee018de
fix(session): close tool calls left open at turn end as canceled
Jul 16, 2026
5ae5b00
fix(session): seed codex resume current_mode in catalog vocabulary
Jul 16, 2026
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
46 changes: 46 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,52 @@ Project-specific rules and conventions for AI assistants and contributors.

## High-Priority Rules

### NEVER guess an agent CLI's behavior — only assert what an approved source proves

Absolutely forbidden: inferring, guessing, or "reasoning about likely behavior" of any agent CLI
(claude, codex, gemini, opencode, hermes, aionrs, …) — its wire protocol, message shapes, field
semantics, timing, defaults, or capabilities — from a CLI's name, a plausible mental model, prior
training knowledge, or how you *think* it probably works. Every claim about an agent CLI's behavior
MUST be backed by one of these approved sources, cited explicitly by path:

1. **Captured real data** — actual sampled wire traffic under
`~/aion/protocols/samples/` (e.g. `codex-cli/<ver>/`, `claude-cli/<ver>/`, `codex-acp/`,
`opencode/`, `capture/`). This is ground truth for what the CLI actually emitted.
2. **The ACP library source** — `agent-client-protocol` (main crate + `agent-client-protocol-schema`),
vendored at `~/.cargo/registry/src/*/agent-client-protocol-*` — for the canonical ACP wire types
and semantics we translate to.
3. **An official adapter's code** — the codex `app-server` machine-generated JSON schema under
`~/aion/protocols/samples/codex-cli/<ver>/schema-full/` (ground truth from the codex binary
itself), the official claude-code / claude-code-acp adapter source, or an equivalent
first-party adapter — for inferring a CLI's contract from the reference implementation.

Additional reliable sources, when a claim can be grounded in them: **the CLI binary's own
`--help` / self-describing schema output** (run it and read it), and **our own passing
integration/live-e2e fixtures** that were recorded against the real CLI (not hand-authored
mocks). If none of these can substantiate a claim, the honest answer is "not yet verified —
need a capture/schema", and the next step is to capture or read a source — NOT to guess.

When you state any agent-CLI behavior, cite the source inline: `verified: samples/codex-cli/0.137.0/schema-full/ClientRequest.json`
or `verified: agent-client-protocol-schema-0.12.0/src/session.rs`. A claim with no such citation
is a guess and violates this rule. This is a non-negotiable, standing constraint — it outranks
convenience and applies to every statement, plan, commit message, and design doc.

### Do NOT state a claim as fact until you have verified it in the code yourself

This rule exists because of a repeated, costly failure mode: forming a confident conclusion from a *proxy* for the truth instead of the truth itself, then reporting it to the user as fact. Concrete instances that must never recur:

- **Trusting a sub-agent's conclusion without checking its evidence.** A spawned agent reported "the frontend has NO question renderer; the break is in the frontend." That was false — the frontend renders whatever `options[]` the backend sends; the real bug was the backend hard-coding `[Allow, Reject]` options for an AskUserQuestion. The conclusion was relayed to the user verbatim. **A sub-agent's report is a lead, not a fact. Before you repeat any load-bearing claim from an agent, open the cited file:line and confirm it says what the agent said.**
- **Declaring equivalence/correctness from a thin test.** A frame-by-frame A/B was run with one trivial prompt ("Reply PONG") that only exercised `start/text/finish`, then "core turn flow is equivalent" was declared. The prompt never triggered tool-output streaming, subagents, plans, permissions, AskUserQuestion, or mode-switch — where all the real divergences were. **A green result on inputs that don't exercise the behavior is not evidence about that behavior. Before claiming a class of behavior works, confirm your test actually produces that class of event.**

Enforced behaviors:
1. **Cite from primary source.** Any claim about what code does must be backed by a file you (this agent) have read this session — not a sub-agent's summary, not memory, not inference from names. Sub-agent findings must be spot-checked against the code before being surfaced.
2. **Verify the negative before asserting absence.** Never say "X has no Y / feature Z doesn't exist / the frontend can't do this" until you have grepped for it AND read the relevant handler. Absence is a strong claim; a single missed file falsifies it (e.g. `sideQuestion.ts`, `MessageAcpPermission` rendering dynamic `options[]`).
3. **Match the test to the claim.** When verifying behavior, the test input must exercise the exact events/paths the claim covers. Trivial/happy-path inputs prove only the trivial path. When you cannot exercise a path, say so explicitly rather than implying it passed.
4. **Trace to the break, don't guess the layer.** For a cross-layer bug (backend→wire→frontend), follow the actual data through every link and locate where it diverges from expected. Do not attribute the break to a layer by plausibility.
5. **Calibrate language to evidence.** Say "verified: <file:line>", "not yet checked", or "a sub-agent claims X (unverified)". Never launder an unverified lead into a flat assertion.

See also the standing discipline in the root `AGENTS.md` / memory `aioncore-verification-blindspot-g6`: self-consistent-all-green ≠ correct — verify outward (against a real agent) AND against the old/reference implementation, not just against your own happy path.

### Do NOT add fields to `AcpAgentManager` unless every alternative is exhausted

`AcpAgentManager` (in `crates/aionui-ai-agent/src/acp_agent.rs`) is already large and carries multiple overlapping state holders (e.g. `runtime_snapshot`, `state`, `preferred_mode`, `config`). New fields tend to duplicate semantics that `AcpRuntimeSnapshot` or `AcpState` already model, which fragments the source of truth and makes resume/new paths diverge.
Expand Down
112 changes: 112 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ members = [
"crates/aionui-api-types",
"crates/aionui-realtime",
"crates/aionui-runtime",
"crates/aionui-process",
"crates/aionui-session",
"crates/aionui-auth",
"crates/aionui-system",
"crates/aionui-file",
Expand Down Expand Up @@ -37,6 +39,8 @@ aionui-db = { path = "crates/aionui-db" }
aionui-api-types = { path = "crates/aionui-api-types" }
aionui-realtime = { path = "crates/aionui-realtime" }
aionui-runtime = { path = "crates/aionui-runtime" }
aionui-process = { path = "crates/aionui-process" }
aionui-session = { path = "crates/aionui-session" }
aionui-auth = { path = "crates/aionui-auth" }
aionui-system = { path = "crates/aionui-system" }
aionui-file = { path = "crates/aionui-file" }
Expand Down Expand Up @@ -180,6 +184,7 @@ http-body-util = "0.1"
# Testing
tempfile = "3"
wiremock = "0.6"
proptest = "1"

# Random
getrandom = "0.2"
Expand Down
2 changes: 2 additions & 0 deletions crates/aionui-ai-agent/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ aionui-runtime.workspace = true
aionui-extension.workspace = true
aionui-api-types.workspace = true
aionui-team-prompts.workspace = true
aionui-session.workspace = true
aionui-process.workspace = true
aionui-system.workspace = true
axum.workspace = true
base64.workspace = true
Expand Down
Loading
Loading