Repository navigation
Refine Ratatui skill guidance and evaluation integrity #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
58 commits
Select commit
Hold shift + click to select a range
a343a25
Refine skill guidance and make eval trials honest
programmersd21 be28c2c
Fix evaluation edge cases and refine project guidance
programmersd21 5fc270b
Correct evaluation harness activation assertion
programmersd21 f9df71a
Make design guidance contextual and evidence-aware
programmersd21 108945e
Record skill selection expectations in evaluation results
programmersd21 046ebcb
Assert skill hash only for injected trials
programmersd21 1eeef87
Add honest human review and isolated trial summaries
programmersd21 de04c97
Document portable skill installation across coding agents
programmersd21 6fc7c2f
Clarify client installation and compatibility claims
programmersd21 0b346ee
Fix directory preview and help interaction edge cases
programmersd21 04b6fae
Format directory preview implementation
programmersd21 29fcf2d
Make incomplete evaluation trials impossible to overlook
programmersd21 a2045af
Isolate evaluation agent environments and capture tool events
programmersd21 8842ee2
Randomize paired evaluation order and record suite metadata
programmersd21 639ba65
Add functional negative-trigger acceptance
programmersd21 1a522e8
Test real skill activation telemetry and run negative acceptance
programmersd21 a6cadf1
Record structured skill activation evidence in trials
programmersd21 f0defdc
Capture bounded format and build check logs for each eval
programmersd21 44ecb6a
Verify skill activation and baseline isolation in eval reports
programmersd21 c9e43ff
Deduplicate and correct activation telemetry tests
programmersd21 00c73e4
Add Betamax interaction coverage and Ratatui evidence map
programmersd21 954bdaa
Correct workflow expressions and delegated telemetry assertion
programmersd21 421b443
Make directory preview cancellable during scans
programmersd21 b80c59e
Add cancellable background worker for selected previews
programmersd21 1f64f65
Keep preview completion visible without blocking terminal input
programmersd21 1b0f0e4
Adapt state and rendering tests for asynchronous previews
programmersd21 8be66e8
Test background directory previews with 50k entries
programmersd21 023a3a3
Use explicit byte slices in large preview fixture
programmersd21 57dccac
Format async preview worker and fix terminal help tape
programmersd21 d736f5f
Wait for background binary preview in render test
programmersd21 dcf6e3b
Fix background preview worker Clippy findings
programmersd21 ec663b0
Apply Rustfmt and isolate custom OpenCode config
programmersd21 138bbcf
Separate historical smoke tests from pending paired evaluation
programmersd21 66923b6
Exercise terminal resize in Betamax tape and retain failures
programmersd21 d1fbe55
Use Betamax Escape key syntax
programmersd21 1d50f84
fix deprecated Ratatui fixture API
programmersd21 3f830b8
document safe skill replacement installs
programmersd21 0aada91
align README with skill workflow
programmersd21 64905ed
define skill directory in command examples
programmersd21 378b182
seed the task-specific selection regression fixture
programmersd21 2156bbd
isolate Rustup and bound acceptance checks
programmersd21 19c8702
prevent false-complete evaluation summaries
programmersd21 842199c
retain Betamax terminal checkpoints as artifacts
programmersd21 cf8c584
make README installation replace existing skill copies
programmersd21 1b4ab12
test the task-specific seeded regression fixture
programmersd21 447d5bb
seed actual selection reset bug in eval fixture
programmersd21 5fd0177
cover suite completeness and activation telemetry regressions
programmersd21 f7770c5
tighten README version guidance
programmersd21 205e587
assert fixture contains the actual selection reset
programmersd21 50acecb
repair fixture harness regression test
programmersd21 b304674
restore fixture harness test structure
programmersd21 9906a15
rebuild harness regression tests cleanly
programmersd21 d56c55b
write valid suite metadata in regression test
programmersd21 36e40e9
simplify expected-incomplete suite assertions
programmersd21 982f04c
make model evaluations explicitly optional
programmersd21 3c1703f
clarify evaluations are optional research
programmersd21 d5fe4aa
make evaluation tooling optional in audit
programmersd21 431b2d3
remove evaluation as a contribution gate
programmersd21 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| name: Betamax | ||
|
|
||
| on: | ||
| pull_request: | ||
|
|
||
| permissions: {} | ||
|
|
||
| concurrency: | ||
| group: betamax-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| render: | ||
| runs-on: ubuntu-24.04 | ||
| timeout-minutes: 15 | ||
| permissions: | ||
| contents: read | ||
| env: | ||
| CARGO_TARGET_DIR: ${{ github.workspace }}/target | ||
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - uses: dtolnay/rust-toolchain@6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772 | ||
| with: | ||
| toolchain: stable | ||
|
|
||
| - name: Build dirview | ||
| run: cargo build --manifest-path skills/ratatui/templates/dirview/Cargo.toml | ||
|
|
||
| - name: Run terminal interaction tape | ||
| uses: joshka/betamax-action@bc6fa6bfb5e20dd342b588601f4e1a945661d5fe | ||
| with: | ||
| tapes: tapes/**/*.tape | ||
| formats: gif,png | ||
| extra-outputs: target/betamax/dirview-*.png | ||
|
|
||
| - name: Upload terminal state checkpoints | ||
| if: always() | ||
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 | ||
| with: | ||
| name: betamax-terminal-checkpoints | ||
| path: target/betamax/*.json | ||
| if-no-files-found: warn | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,52 +1,25 @@ | ||
| # Building ratatui apps | ||
| # Building Ratatui applications | ||
|
|
||
| For any Rust terminal UI task, follow `skills/ratatui/SKILL.md`. It is the | ||
| full process; this file is the short version for agents that read `AGENTS.md` | ||
| instead of loading skills. | ||
| Use `skills/ratatui/SKILL.md` when creating, modifying, debugging, or reviewing a Rust terminal UI built with Ratatui. | ||
|
|
||
| ## Which workflow | ||
| ## Workflow | ||
|
|
||
| - **New application:** follow steps 1-5 in full, including the design brief | ||
| and the template. | ||
| - **Existing application:** skip the design brief unless the layout archetype | ||
| changes. Inspect the existing code first. Make the smallest change. Preserve | ||
| existing dependencies and patterns. Do not copy the template. | ||
| - Inspect the repository, manifest, lockfile, source, and tests first. | ||
| - For a new application, choose an architecture that fits its complexity. | ||
| - For an existing application, preserve established patterns and make a targeted change. | ||
| - Use `skills/ratatui/templates/dirview/` as an example when its structure fits. It is not a mandatory starter. | ||
| - Do not apply this guidance to non-Ratatui or non-TUI tasks. | ||
|
|
||
| ## Before writing code | ||
| ## Engineering | ||
|
|
||
| 1. **Research.** Run `$SKILL_DIR/scripts/crate-versions.sh <crates>` for the | ||
| newest stable version and minimum Rust version of every dependency. Read the | ||
| ratatui `CHANGELOG.md` and `BREAKING-CHANGES.md` for that version. Never | ||
| write ratatui code, versions or feature flags from memory. If an API is | ||
| uncertain, compile a ten-line program that calls it. | ||
| 2. **Design brief (new apps only).** State the layout archetype, one ANSI | ||
| accent color, density, modes and keys, and what each empty, error and | ||
| too-small state shows, justified from the app's data. | ||
|
|
||
| ## Building | ||
|
|
||
| - New apps: start from `skills/ratatui/templates/dirview/` and copy its | ||
| structure: `action`, `keymap`, `state` (no terminal types), `ui` (no side | ||
| effects), `theme` (the only file naming colors). Rename the crate reference | ||
| in `main.rs` to match your package name. | ||
| - Existing apps: do not copy the template. Read the existing code first. | ||
| - One key table drives input, footer hints and the `?` help. | ||
| - Everything visible works. No fake data, decorative panels or dead keys. | ||
| - Measure text with `unicode-width`, sanitize untrusted text, draw only visible | ||
| rows. | ||
| - Colors by role, 16 ANSI by default, respect `NO_COLOR`, no forced background, | ||
| no emoji. | ||
| - If handling terminal events directly, declare a compatible direct `crossterm` dependency and import from `crossterm::event`. Verify `cargo tree -d` has no duplicate versions. | ||
| - No `.unwrap()` outside tests, no swallowed errors, no TODOs, comments say why. | ||
| - Verify APIs against the Ratatui version resolved by the project. | ||
| - Avoid unnecessary dependencies and version changes. | ||
| - Keep rendering responsive; move genuinely expensive work out of the draw path. | ||
| - Handle terminal resizing, input, and relevant empty or error states. | ||
| - Prefer state and behavior tests; use `TestBackend` for relevant rendering checks. | ||
| - Use PTY, VHS, Betamax, or equivalent integration tests when real terminal behavior is in scope. | ||
| - Treat architecture and visual conventions as context-dependent unless correctness requires them. | ||
|
|
||
| ## Done means | ||
|
|
||
| See `skills/ratatui/SKILL.md` section 4 (Verify) for the canonical checklist. | ||
| Do not duplicate it here. | ||
|
|
||
| Also read the rendered screens as text at several sizes | ||
| (`skills/ratatui/templates/dirview/examples/dump.rs`). Report what was built, | ||
| the versions used, what passed, and anything you could not check. | ||
|
|
||
| More detail: `skills/ratatui/references/` (`research-checklist.md`, | ||
| `ux-principles.md`, `slop-tells.md`). | ||
| Run checks appropriate to the workspace and changed packages. Report exactly what ran, what passed, and what remains unverified. See `skills/ratatui/SKILL.md` for the detailed workflow and references. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,92 @@ | ||
| # Agent compatibility | ||
|
|
||
| `skills/ratatui/` is the canonical skill source in this repository. It follows the open Agent Skills directory format: one directory containing `SKILL.md` and optional `references/`, `scripts/`, and template assets. | ||
|
|
||
| Do not maintain separate copies of the instructions for each agent. Install the same canonical directory at the discovery path for the client you use. | ||
|
|
||
| ## Project-level discovery paths | ||
|
|
||
| | Agent | Project-level path | Notes | | ||
| |---|---|---| | ||
| | OpenAI Codex | `.agents/skills/ratatui/` | Codex also supports user-level `~/.agents/skills/ratatui/`. | | ||
| | Claude Code | `.claude/skills/ratatui/` | Claude Code also supports `~/.claude/skills/ratatui/`. | | ||
| | Cursor | `.agents/skills/ratatui/` or `.cursor/skills/ratatui/` | Cursor also recognizes Claude and Codex skill directories. | | ||
| | Google Antigravity | `.agents/skills/ratatui/` | Shared workspace path for Antigravity IDE and CLI. | | ||
| | OpenCode | `.opencode/skills/ratatui/` | OpenCode also discovers `.agents/skills/` and `.claude/skills/` as compatibility locations. | | ||
|
|
||
| The shared `.agents/skills/ratatui/` path is the simplest project-level choice when using Codex, Cursor, Antigravity, and OpenCode together. Claude Code currently uses its own `.claude/skills/` project path, so install a copy there as well when Claude Code is part of the workflow. | ||
|
|
||
| ## Global discovery paths | ||
|
|
||
| | Agent | User-level path | | ||
| |---|---| | ||
| | OpenAI Codex | `~/.agents/skills/ratatui/` | | ||
| | Claude Code | `~/.claude/skills/ratatui/` | | ||
| | Cursor | `~/.agents/skills/ratatui/` or `~/.cursor/skills/ratatui/` | | ||
| | Google Antigravity | `~/.gemini/config/skills/ratatui/` | | ||
| | OpenCode | `~/.config/opencode/skills/ratatui/` | | ||
|
|
||
| OpenCode additionally accepts global compatibility directories `~/.agents/skills/` and `~/.claude/skills/`. | ||
|
|
||
| ## Install from this repository | ||
|
|
||
| Run these commands from the root of the cloned `ratatui-skill` repository. Replace `/path/to/project` with the root of the project where you want the skill available. | ||
|
|
||
| ### Shared location | ||
|
|
||
| For Codex, Cursor, Antigravity, and OpenCode: | ||
|
|
||
| ```bash | ||
| mkdir -p /path/to/project/.agents/skills | ||
| rm -rf /path/to/project/.agents/skills/ratatui | ||
| cp -a skills/ratatui /path/to/project/.agents/skills/ratatui | ||
|
programmersd21 marked this conversation as resolved.
Resolved
|
||
| ``` | ||
|
|
||
| ### Claude Code | ||
|
|
||
| ```bash | ||
| mkdir -p /path/to/project/.claude/skills | ||
| rm -rf /path/to/project/.claude/skills/ratatui | ||
| cp -a skills/ratatui /path/to/project/.claude/skills/ratatui | ||
| ``` | ||
|
|
||
| ### OpenCode native location | ||
|
|
||
| ```bash | ||
| mkdir -p /path/to/project/.opencode/skills | ||
| rm -rf /path/to/project/.opencode/skills/ratatui | ||
| cp -a skills/ratatui /path/to/project/.opencode/skills/ratatui | ||
| ``` | ||
|
|
||
| ### Global install | ||
|
|
||
| For a user-level install, replace the project directory above with the global path from the tables. For example, Codex: | ||
|
|
||
| ```bash | ||
| mkdir -p ~/.agents/skills | ||
| rm -rf ~/.agents/skills/ratatui | ||
| cp -a skills/ratatui ~/.agents/skills/ratatui | ||
| ``` | ||
|
|
||
| Avoid maintaining multiple copies of the same skill in overlapping discovery directories for one agent unless you intentionally want to test precedence or overrides. Some clients load more than one source and resolve duplicate skill names using product-specific precedence rules. | ||
|
|
||
| ## What "compatible" means | ||
|
|
||
| There are separate levels of compatibility: | ||
|
|
||
| 1. **Format-compatible:** the directory contains the standard `SKILL.md` frontmatter and supporting files. | ||
| 2. **Discovery-documented:** the agent's official documentation lists the installation path. | ||
| 3. **Runtime-tested:** the skill has been installed in that product and verified to appear, trigger, load references, and run its scripts. | ||
|
|
||
| This repository uses the standard skill directory format and documents the official discovery paths linked below. The paths are not a claim that every listed client has been smoke-tested with this repository. Live discovery, trigger behavior, reference loading, and script execution still need product-by-product validation. | ||
|
|
||
| The skill's portable content is shared. Product-specific features, invocation controls, and context-loading behavior may differ. | ||
|
|
||
| ## Official documentation | ||
|
|
||
| - [OpenAI Codex skill locations and configuration](https://learn.chatgpt.com/docs/build-skills) and [OpenAI's skill-based OSS maintenance workflow](https://developers.openai.com/blog/skills-agents-sdk) | ||
| - [Claude Code skills](https://code.claude.com/docs/en/skills) | ||
| - [Cursor Agent Skills](https://cursor.com/docs/skills) | ||
| - [Google Antigravity agent skills](https://antigravity.google/docs/skills) | ||
| - [OpenCode skills](https://opencode.ai/docs/skills/) | ||
| - [Agent Skills specification](https://agentskills.io/specification) | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.