This file is the operating map for agents working in this repo. Keep product
framing in README.md, durable architecture in docs/, and usage guidance in
skills/termviz/SKILL.md.
src/bin/termviz.rsandsrc/bin/tvz.rs: binary entrypoints.src/cli.rs: CLI dispatch and command behavior.src/profile.rs: input profile detection and option resolution.src/input/: input sniffing and loading.src/asset/: raster/SVG asset metadata and decoding boundaries.src/plot/: plot parsing, model, stream, table, and histogram logic.src/render/: terminal rendering and protocol backends.src/viewer/: interactive viewer behavior.src/viewer/plot/: plot viewer state, atlas/cache, events, hover, and chrome.src/tui.rsandsrc/tui/: TUI shell and chrome/frame rendering.docs/INDEX.md: maintainer navigation.docs/architecture.md: module boundaries and product constraints.docs/testing.md: test organization and PTY/protocol coverage.docs/visual-verification.md: recording and contact-sheet workflow.docs/releasing.md: release and packaging process.skills/termviz/SKILL.md: concise agent-facing usage guide.
- Keep
termvizviewer-first and terminal-first. - Keep stdout valid and scriptable; hide terminal escape sequences behind TTY detection or explicit flags.
- Do not decode or render whole large assets just to draw the first screen.
- Prefer metadata-first loading, tile readback, bounded plot windows, temporary files, and explicit preloading.
- Keep image decoding separate from terminal rendering.
- Keep plot data parsing separate from plot scene/raster rendering.
- Add terminal protocols as backend implementations, not product branches.
- If whole-file parsing or whole-image decoding is required, make that tradeoff explicit in CLI help or docs.
- Unknown task: read
README.md,docs/INDEX.md, then the matching doc below. - Architecture, module boundaries, terminal protocols, plot model, or asset
loading: read
docs/architecture.md. - TUI rendering, screenshots, recordings, or visual demos: read
docs/visual-verification.md. - Test organization, protocol coverage, selector behavior, or PTY smoke: read
docs/testing.md. - Release, packaging, crates.io, npm, GitHub Releases, or version tags: read
docs/releasing.md. - User-facing usage, install steps, CLI flags, or export behavior: check
skills/termviz/SKILL.mdas well asREADME.md.
- Run
cargo fmt. - Run
cargo test. - Run
cargo clippy --all-targets -- -D warningswhen Clippy is available. - After implementing a user-facing command or viewer behavior, run the exact command path, or the closest faithful fixture command, before reporting completion.
- For TUI changes, run the built CLI under a real PTY such as
scriptand verify draw, resize, scroll, and quit behavior. - For visual TUI or block-rendering changes, create PTY recording artifacts with
scripts/record-pty-demo.sh, inspect keyframes orcontact-sheet.png, and keep the path in the handoff. - For Kitty or pixel-protocol visual changes, create real emulator recording
artifacts with
scripts/record-emulator-demo.sh, inspect frames orcontact-sheet.png, and keep the path in the handoff. - For terminal protocol changes, verify protocol output does not appear on redirected stdout unless explicitly requested.
- For protocol renderer or viewer changes, cover every explicit protocol at the
appropriate test layer; keep
autotests focused on selector behavior. - For large-file behavior, add or update benchmark scripts before claiming the implementation is bounded.
- CLI flags, install steps, or user-visible behavior: update
README.md. - User-facing usage patterns: update
skills/termviz/SKILL.md. - Architecture, module boundary, protocol, or artifact policy: update
docs/architecture.md. - Test strategy or coverage requirements: update
docs/testing.md. - Visual verification workflow: update
docs/visual-verification.md. - Release, packaging, or artifact policy: update
docs/releasing.md. - User-facing behavior, packaging, or release process: update
CHANGELOG.md.
- Use Conventional Commits with a body.
- Keep release notes current before tagging.
- Do not revert unrelated user changes.