magi-code 0.80.0

Repository-aware CLI coding agent for terminal work
Documentation
# Transcript cards agent guide

## Where to look

| Task | Location |
| --- | --- |
| Shared facade and display limits | `mod.rs` |
| Card types and transcript/activity conversion | `projection.rs` |
| Span cache, subagent grouping, tool adapters | `projection/` |
| Wrapped visual lines and visible windows | `visual_lines.rs`, `visual_lines/` |
| Display cells to source-text copy positions | `copy_mapping.rs` |
| Selection-aware orchestration | `../transcript_projection.rs` |

## Local contracts

- Card types live in `projection.rs`; `mod.rs` reexports the shared surface. Keep implementation children private to their owning module.
- Preserve source/activity ids for navigation and cache identity without turning cards into session records.
- Wrapping must respect grapheme boundaries and terminal display columns. Copy mapping must agree with visual wrapping, including narrow panes.
- Window visible history and reuse cached projections rather than rebuilding every card per frame.
- Use shared rendering roles and tool adapters. Both visible and copied text must be sanitized/redacted; copy must not reveal hidden metadata or control sequences.
- Main-transcript images reserve fixed non-copyable rows after card text. Preserve source row indices when clipping; do not resize the remaining fragment when its top scrolls away. Activity/subagent viewers remain text-only.
- Projection must not mutate source transcript rows. Cache reuse must still let final events rebuild meaningful content after dropped previews.
- Keep selection orchestration outside card primitives and runtime/provider/session decisions outside this directory.