

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
1# crates/tui — agent guidance23Scope: the TUI, the runtime engine embedded in it, and everything a user sees.4Read the repo-root `AGENTS.md` first. Current flakes and known debt are in5the `codewhale-ops` repo, not here.67## The shell grammar (do not regress it)89The default shell is the underwater system (`src/tui/underwater.rs`, `ocean.rs`,10`widgets/`, `views/`). Its contract:1112- **One owner per fact.** Route/mode/permission/context live in the header;13 Tasks/To-do in the top strip; receipts and the single live row in the14 transcript; phase/cost/detail keys in the footer. Never restate a fact in a15 second place.16- **One live row.** Settled receipts are still; only the active row and the17 footer phase mark move. Decorative motion exists only in empty idle water and18 stops the instant the user types or anything needs attention.19- **Phase is typed.** `ShellPhase::from_app` derives idle/typing/working/20 waiting/approval/done/failed from real app state. Never invent state in a21 renderer; never compare English strings to detect state — use the enums.22- **Treatment is typed.** `OceanTreatment` (ombre/flat/classic) parses once from23 settings. Every treatment keeps ambient life; appearance and motion24 (`low_motion`, `fancy_animations`) are independent axes.25- **Footer notices go through the toast system** (`push_status_toast` /26 `active_status_toast`), never the legacy `status_message` sink: toasts carry27 level + TTL, errors hold sticky, acknowledgements expire.28- **Compact tiers shed chrome, not content.** At small sizes a room drops29 titles/captions/spacers before the object the user opened it to manipulate,30 and bodies budget from the footer's *wrapped* height (`wrapped_footer_lines` /31 `action_footer_lines`).32- **Rows are objects.** Anything selectable has a hitbox recorded at render33 time, keyboard + mouse parity, and visible focus. Destructive controls arm34 before they fire.3536## Localization3738Every user-visible string goes through `tr(locale, MessageId::…)` — no hardcoded39English in render paths. Glyphs (`▸ · ▾ ─`), key names (`Enter`, `Alt+?`), and40commands (`/fleet setup`) are composed in code, never embedded in translations.41Adding a string is a four-part change: see `locales/AGENTS.md`.4243## Verification4445```sh46cargo test -p codewhale-tui --lib --locked # library unit suite47cargo test -p codewhale-tui --tests --locked # every crates/tui/tests/ target48cargo clippy --workspace --all-targets --locked -- -D warnings49```5051Narrower reruns of the slow acceptance targets, once `--tests` has told you52which one moved:5354```sh55cargo test -p codewhale-tui --test pty qa_pty --locked56cargo test -p codewhale-tui --test pty release_runtime_qa --locked57cargo test -p codewhale-tui --test pty terminal_matrix_qa --locked58```5960**`--lib` and `--tests` are disjoint target sets.** `crates/tui/tests/` holds61two dozen process-level acceptance targets that a `--lib` run never compiles,62let alone executes, so a green `cargo test -p codewhale-tui --bin codewhale-tui`63says nothing about them. `adaptive_evidence_acceptance` sat red across two64releases for exactly that reason: every routine command anyone ran was a unit-only65run, and only `cargo test --workspace` reached it. Run both, or run the66workspace gate.6768Run clippy with `--all-targets`: `--bin` alone skips test targets and lets lints69reach CI.7071Real-terminal QA gotchas, learned the hard way:7273- The local tmux **server** may carry `NO_COLOR=1` and `TERM=dumb` from old VHS74 runs — launch panes with `env -u NO_COLOR` or all color QA silently lies. tmux75 also force-enables the low-motion overlay; prove full motion with76 `TMUX`/`TMUX_PANE` removed.77- Scripted PTY input: one Enter on the slash menu both accepts the highlighted78 match and runs it. A scripted second Enter lands *inside* whatever modal just79 opened. Send one key, wait, capture.80- Judge motion from repeated captures diffed over time, never single81 screenshots. Layout gates: 40x12, 60x16, 80x24, 100x32, 140x40.82- `CODEWHALE_TUI_DEBUG=1` writes per-frame diff sizes to83 `~/.codewhale/logs/tui-render.log`. Streaming should be tens of cells per84 frame; a multi-thousand-cell frame is only acceptable on a genuine layout85 transition.86
One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| Hmbown/CodeWhaleAGENTS.md · 41k | AGENTS.md | buildtestagent-behaviour | 77/100 | 8 days ago | |
| Hmbown/CodeWhaleCLAUDE.md · 41k | CLAUDE.md | agent-behaviour | 16/100 | 12 days ago | |
| Hmbown/CodeWhalecrates/tui/locales/AGENTS.md · 41k | AGENTS.md | styleagent-behaviour | 43/100 | 12 days ago | |
| Hmbown/CodeWhaleweb/AGENTS.md · 41k | AGENTS.md | buildtestdo-notagent-behaviour | 66/100 | 12 days ago |
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| TryGhost/Ghoste2e/AGENTS.md · 55k | AGENTS.md | setupteststylearch+2 | 100/100 | today | |
| mui/material-uiAGENTS.md · 99k | AGENTS.md | setupbuildtestlint-format+9 | 100/100 | 14 days ago | |
| code-yeongyu/oh-my-openagentpackages/web/AGENTS.md · 68k | AGENTS.md | setupbuildtestlint-format+6 | 100/100 | 13 days ago | |
| aaif-goose/gooseAGENTS.md · 53k | AGENTS.md | setupbuildtestlint-format+7 | 100/100 | 8 days ago | |
| deepseek-ai/deepseek-harnessnative/landlock-run/AGENTS.md · 104k | AGENTS.md | setupteststylearch+3 | 100/100 | today | |
| duckduckgo/content-scope-scriptsspecial-pages/AGENTS.md · 70 | AGENTS.md | buildteststylearch+3 | 100/100 | 14 days ago | |
| n8n-io/n8npackages/@n8n/agents/AGENTS.md · 201k | AGENTS.md | buildteststylearch+3 | 100/100 | 14 days ago | |
| elastic/elasticsearchx-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/AGENTS.md · 78k | AGENTS.md | buildtestlint-formatstyle+2 | 100/100 | 14 days ago |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/hmbown-codewhale-crates-tui-agents)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.