chat-modelisted
Install: claude install-skill martinappberg/chimaera
# Working on chat mode (Tier B structured agents)
Chat mode drives coding-agent CLIs through their **structured** protocols instead
of a PTY, and renders the result in a rich UI. It spans three places — read the
AGENTS.md that governs the part you're touching first, they are the fast map:
- Engine: [`crates/chimaera-agent/AGENTS.md`](../../../crates/chimaera-agent/AGENTS.md)
— drivers, journal, registry, event model. Wire facts:
[`PROTOCOL.md`](../../../crates/chimaera-agent/PROTOCOL.md).
- Server glue: [`crates/chimaera-server/AGENTS.md`](../../../crates/chimaera-server/AGENTS.md)
— `chat.rs`, the WS/REST seams, the lifecycle locks.
- UI: [`web-ui/src/lib/chat/AGENTS.md`](../../../web-ui/src/lib/chat/AGENTS.md)
— the store reducer, the socket, the components.
## The end-to-end path (know it before you change it)
```
child stdio ─▶ driver (claude.rs/codex.rs) ─▶ AgentEvent ─▶ ChatManager pump
│ seq + journal + broadcast
ws.rs /ws/chat/{id} ◀── ChatManager::attach (replay+live) ──┤
│ ready(head) → batch replay → live ev │
▼ │
chatWs.ts ─▶ store.apply (reducer) ─▶ ChatView │
▲ │
socket.send(AgentCommand) ─▶ ws.rs ─▶ ChatManager::command ─┘─▶ driver ─▶ child stdin
```
The **seq number is the contract** end to end: assigned once in
`Journ