enforce-rules-for-ui-tests
Skill51k starsChanged 2 days agoMITView on GitHub
Decide how to verify AIRI UI work, and stop large DOM-driven component tests. Use whenever you add, change, review, or plan tests for a Vue page, component, layout, settings page, dialog, or UI flow, or when you consider `vitest-browser-vue`, `@vue/test-utils`, `render(...)`, `page.getBy...`, or a `*.browser.test.ts` file for UI. Also use when you fix a UI bug, iterate on a design, or must prove that a UI change works, even if the user does not mention tests.
Adopted by
Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data
Who's talking about moeru-ai/airi
- Ian Li“Project AIRI - AI waifu / virtual characters”YouTube · Sep 7, 2025 · 30k views
- Github Updates“Airi Self hosted you owned Grok Companion (All You need to Know)”YouTube · Mar 7, 2026 · 9.5k views
- Skillmdpro“Project AIRI - Open Source AI VTuber That Plays Games (Neuro-sama Alternative)”YouTube · Mar 28, 2026 · 8.4k views
- GitHub Daily Trend AI Podcast“GitHub - moeru-ai/airi: 💖🧸 Self hosted, you owned Grok Companion, a container of souls of waifu...”YouTube · Aug 21, 2025 · 7k views
- Alex Hitt“Airi GitHub Overview: From Browser Chat Limits to a Self-Hosted Avatar Engine”YouTube · Jul 29, 2026 · 2.3k views
The biggest 5 of 96 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 96
Talked about on GitHub, Bluesky, YouTube, Hacker News and the web (96 times).
On GitHub · 50
- May 9, 2026fix: correctly clean request body — moeru-ai/xsai2 reactions
- Nov 9, 2025Railway self-deployment issues — groupultra/telegram-search2 reactions
- Jun 22, 2026Integrate shared voice input session into desktop stage — Neko-233/airi1 reaction
- Apr 1, 2026test(node): add regression test for `EADDRINUSE` handling — h3js/crossws1 reaction · 2 comments
- Jun 27, 2025airi: init at 0.7.0 — NixOS/nixpkgs1 reaction · 4 comments
45 more on GitHub
- Nov 13, 2026agent-skills.github.moeru-ai.airi: 0.15.2 → 0.15.4 — sudosubin/agents.nix0 reactions
- Nov 9, 2026agent-skills.github.moeru-ai.airi: 0.15.1 → 0.15.2 — sudosubin/agents.nix0 reactions
- Nov 7, 2026Port AIRI Android capabilities into native NEXUS — mechy007/Nexus0 reactions
- Nov 4, 2026agent-skills.github.moeru-ai.airi: 0.15.0 → 0.15.1 — sudosubin/agents.nix0 reactions
- Nov 4, 2026agent-skills.github.moeru-ai.airi: 0.14.1 → 0.15.0 — sudosubin/agents.nix0 reactions
- Nov 1, 2026fix(deps): update dependency @proj-airi/ui to v0.14.1 — nekomeowww/iconify-inspector0 reactions · 1 comment
- Oct 30, 2026agent-skills.github.moeru-ai.airi: 0.14.0 → 0.14.1 — sudosubin/agents.nix0 reactions
- Oct 30, 2026agent-skills.github.moeru-ai.airi: 0.13.1 → 0.14.0 — sudosubin/agents.nix0 reactions
- Oct 29, 2026agent-skills.github.moeru-ai.airi: 0.13.0 → 0.13.1 — sudosubin/agents.nix0 reactions
- Oct 27, 2026agent-skills.github.moeru-ai.airi: 0.12.0 → 0.13.0 — sudosubin/agents.nix0 reactions
- Oct 23, 2026agent-skills.github.moeru-ai.airi: 0.11.3 → 0.12.0 — sudosubin/agents.nix0 reactions
- Oct 13, 2026fix(stage-tamagotchi): follow the cursor from DOM pointer events on Wayland — Somme4096/airi-tiny0 reactions
- Oct 11, 2026[下一版讨论] 参考 AIRI 增强角色演出:表情动作、口型与语音时序 — SlimeBoyOwO/LingChat0 reactions · 2 comments
- Oct 9, 2026最初の縦切り: 根拠付き履歴から一晩の反省会を再生できる居酒屋デモを作る — ryoryo34/agent-izakaya0 reactions
- Oct 9, 2026[Candidate] moeru-ai/airi/.agents/skills/agent-browser - agent-browser — ProSkillsMD/proskills0 reactions · 1 comment
- Oct 5, 2026Staleness report — csells/awesome-jarvis0 reactions · 5 comments
- Sep 30, 2026agent-skills.github.moeru-ai.airi: init at 0.11.3 — sudosubin/agents.nix0 reactions
- Sep 23, 2026feat(stage-ui): add cloud sync switches for providers and chats — lulu0119/airi0 reactions · 1 comment
- Sep 21, 2026`github-agents-or-bots` does not work on some pages of `apache/shardingsphere` — luoling8192/github-automated-contributors0 reactions · 2 comments
- Sep 19, 2026fix(electron): isolate IPC for bound window contexts — moeru-ai/eventa0 reactions
- Sep 5, 2026fix: verify airi clone pin after checkout — davins56/Anima-Protocol0 reactions · 7 comments
- Aug 28, 2026チャットをもっと楽しくしたい — omohikane/saku0 reactions · 2 comments
- Aug 4, 2026feat(cubism2): add verified Core provisioning for Vite — proj-airi/unplugin-live2d-sdk0 reactions
- Aug 4, 2026chore(deps): bump the production-dependencies group across 1 directory with 6 updates — bryce-seefieldt/portfolio-app0 reactions · 1 comment
- Jul 29, 2026🔥 GitHub Trending AI 早报 · 2026-07-30 · Top 6 项目 — happydog-intj/ai-xiaohongshu-daily0 reactions
- Jul 29, 2026🔥 GitHub Trending AI 早报 · 2026-07-30 · Top 6 项目 — Mystery406/ai-xiaohongshu-daily0 reactions
- Jul 29, 2026🔥 GitHub Trending AI 晚报 · 2026-07-29 · Top 6 项目 — Mystery406/ai-xiaohongshu-daily0 reactions
- Jul 29, 2026🔥 GitHub Trending AI 晚报 · 2026-07-29 · Top 6 项目 — happydog-intj/ai-xiaohongshu-daily0 reactions
- Jul 29, 2026Github trending [moeru-ai/airi] 开源AI虚拟角色容器 — web1992/github-trending0 reactions
- Jul 28, 2026🔥 GitHub Trending AI 早报 · 2026-07-29 · Top 6 项目 — happydog-intj/ai-xiaohongshu-daily0 reactions
- Jul 28, 2026🔥 GitHub Trending AI 早报 · 2026-07-29 · Top 6 项目 — Mystery406/ai-xiaohongshu-daily0 reactions
- Jul 28, 2026🔥 GitHub Trending AI 晚报 · 2026-07-28 · Top 6 项目 — Mystery406/ai-xiaohongshu-daily0 reactions
- Jul 28, 2026🔥 GitHub Trending AI 晚报 · 2026-07-28 · Top 6 项目 — happydog-intj/ai-xiaohongshu-daily0 reactions
- Jul 28, 2026Github trending [moeru-ai/airi] AI虚拟伴侣开源灵魂容器 — web1992/github-trending0 reactions
- Jul 27, 2026🔥 GitHub Trending AI 早报 · 2026-07-28 · Top 3 项目 — happydog-intj/ai-xiaohongshu-daily0 reactions
- Jul 27, 2026🔥 GitHub Trending AI 早报 · 2026-07-28 · Top 3 项目 — Mystery406/ai-xiaohongshu-daily0 reactions
- Jul 27, 2026🔥 GitHub Trending AI 晚报 · 2026-07-27 · Top 4 项目 — Mystery406/ai-xiaohongshu-daily0 reactions
- Jul 27, 2026🔥 GitHub Trending AI 晚报 · 2026-07-27 · Top 4 项目 — happydog-intj/ai-xiaohongshu-daily0 reactions
- Jul 22, 2026chore(deps): bump the production-dependencies group with 5 updates — bryce-seefieldt/portfolio-app0 reactions · 2 comments
- Jul 19, 2026fix(deps): update dependency @proj-airi/ui to v0.11.3 — nekomeowww/iconify-inspector0 reactions · 1 comment
- Jul 16, 2026GitHub trending [moeru-ai/airi] 开源复现Neuro-sama — web1992/github-trending0 reactions
- Jul 15, 2026🔥 GitHub Trending AI 早报 · 2026-07-16 · Top 8 项目 — happydog-intj/ai-xiaohongshu-daily0 reactions
- Jul 15, 2026🔥 GitHub Trending AI 早报 · 2026-07-16 · Top 8 项目 — Mystery406/ai-xiaohongshu-daily0 reactions
- Jul 15, 2026🔥 GitHub Trending AI 晚报 · 2026-07-15 · Top 8 项目 — Mystery406/ai-xiaohongshu-daily0 reactions
- Jul 15, 2026🔥 GitHub Trending AI 晚报 · 2026-07-15 · Top 8 项目 — happydog-intj/ai-xiaohongshu-daily0 reactions
On Bluesky · 32
- Feb 26, 2026I love how one of the devs literally has a trans flag pfp github.com/moeru-ai/airi — @claire.on-her.computer11 likes and reposts · 3 replies
- Jul 18, 2026🚀 Skyrocketing! 🚀 (200+ new stars) 📦 moeru-ai / airi ⭐ 42,791 (+402) 🗒 TypeScript 💖🧸 Self hosted, you-owned Grok Companion, a… — @github-trending-js.bsky.social5 likes and reposts · 1 reply
- Jul 31, 2026🚀 Skyrocketing! 🚀 (200+ new stars) 📦 moeru-ai / airi ⭐ 46,117 (+372) 🗒 TypeScript 💖🧸 Self hosted, you-owned Grok Companion, a… — @github-trending-js.bsky.social2 likes and reposts · 1 reply
- Jul 27, 2026今日のGitHubトレンド moeru-ai/airi Project AIRIは、Neuro-samaに触発され、AIワイフやバーチャルキャラクターを現実世界に具現化するための器を再現するプロジェクトです。… — @dailygithubtrends.bsky.social2 likes and reposts
- Jul 13, 2026📦 moeru-ai / airi ⭐ 41,668 (+57) 🗒 TypeScript 💖🧸 Self hosted, you-owned Grok Companion, a container of souls of waifu, cyber livings to… — @github-trending-js.bsky.social2 likes and reposts
27 more on Bluesky
- May 31, 2026セルフホスト可能なLLMベースのバーチャルキャラクター。LLMはクラウドサービスもローカルLLMも各種サポート。 — @matsuu.bsky.social2 likes and reposts
- Apr 8, 2026🚀 Skyrocketing! 🚀 (200+ new stars) 📦 moeru-ai / airi ⭐ 37,443 (+255) 🗒 TypeScript 💖🧸 Self hosted, you-owned Grok Companion, a… — @github-trending-js.bsky.social2 likes and reposts · 1 reply
- Mar 8, 2026This is Japan. — @halka.jp2 likes and reposts
- Mar 3, 2026🎉 Celebrating! 🎉 (500+ new stars) 📦 moeru-ai / airi ⭐ 21,939 (+842) 🗒 TypeScript 💖🧸 Self hosted, you-owned Grok Companion, a… — @github-trending.bsky.social2 likes and reposts · 1 reply
- Oct 26, 2026📦 moeru-ai / airi ⭐ 50,703 (+59) 🗒 TypeScript 💖🧸 Self hosted, you-owned Grok Companion, a container of souls of waifu, cyber livings to… — @github-trending-js.bsky.social1 likes and repost
- Sep 19, 2026🚀 GitHub Intelligence Drop CLI-Anything (Python • 🟢) ⭐ 49.6K → https://github.com/HKUDS/CLI-Anything airi (TypeScript • 🟢) ⭐ 49.3K →… — @githubfeed.bsky.social1 likes and repost
- Aug 23, 2026📦 moeru-ai / airi ⭐ 48,262 (+49) 🗒 TypeScript 💖🧸 Self hosted, you-owned Grok Companion, a container of souls of waifu, cyber livings to… — @github-trending-js.bsky.social1 likes and repost
- Aug 12, 2026Ninguém até hoje ter feito um desses assistentes de IA usando homens bara é sexismo, don't @ me github.com/moeru-ai/airi — @phalkmin.me1 likes and repost
- Jul 28, 2026🎉 Celebrating! 🎉 (500+ new stars) 📦 moeru-ai / airi ⭐ 43,710 (+554) 🗒 TypeScript 💖🧸 Self hosted, you-owned Grok Companion, a… — @github-trending-js.bsky.social1 likes and repost · 1 reply
- Jun 8, 2026📦 moeru-ai / airi ⭐ 40,816 (+43) 🗒 TypeScript 💖🧸 Self hosted, you-owned Grok Companion, a container of souls of waifu, cyber livings to… — @github-trending-js.bsky.social1 likes and repost
- Jun 8, 2026真面目にいうと、これにらいかちゃのモデル使ったらいい感じ動いてくれそう github.com/moeru-ai/airi — @lokxii.bsky.social1 likes and repost · 1 reply
- May 25, 2026📦 moeru-ai / airi ⭐ 39,555 (+32) 🗒 TypeScript 💖🧸 Self hosted, you-owned Grok Companion, a container of souls of waifu, cyber livings to… — @github-trending.bsky.social1 likes and repost
- Mar 29, 2026🚀 Skyrocketing! 🚀 (200+ new stars) 📦 moeru-ai / airi ⭐ 36,176 (+213) 🗒 TypeScript 💖🧸 Self hosted, you-owned Grok Companion, a… — @github-trending.bsky.social1 likes and repost · 1 reply
- Mar 29, 2026🚀 Skyrocketing! 🚀 (200+ new stars) 📦 moeru-ai / airi ⭐ 36,176 (+213) 🗒 TypeScript 💖🧸 Self hosted, you-owned Grok Companion, a… — @github-trending-js.bsky.social1 likes and repost · 1 reply
- Mar 7, 2026💎 Hidden Gem! 💎 (1000+ new stars) 📦 moeru-ai / airi ⭐ 30,357 (+1,362) 🗒 TypeScript 💖🧸 Self hosted, you-owned Grok Companion, a… — @github-trending-js.bsky.social1 likes and repost · 1 reply
- Feb 27, 2026🚀 Skyrocketing! 🚀 (200+ new stars) 📦 moeru-ai / airi ⭐ 17,889 (+229) 🗒 TypeScript 💖🧸 Self hosted, you-owned Grok Companion, a… — @github-trending.bsky.social1 likes and repost · 1 reply
- Feb 27, 2026🚀 Skyrocketing! 🚀 (200+ new stars) 📦 moeru-ai / airi ⭐ 17,889 (+229) 🗒 TypeScript 💖🧸 Self hosted, you-owned Grok Companion, a… — @github-trending-js.bsky.social1 likes and repost · 1 reply
- Feb 10, 2026found this today: github.com/moeru-ai/airi - 17k stars, open source Neuro-sama recreation. self-hosted AI VTuber that plays Minecraft AND… — @viridian.vampuppy.systems1 likes and repost
- Oct 31, 2025github.com/moeru-ai/airi — @heimusu.bsky.social1 likes and repost
- Aug 24, 2025今日のGitHubトレンド moeru-ai/airi このリポジトリは「Project AIRI」として、AIバーチャルキャラクター「Neuro-sama」の再構築を目的としています。… — @dailygithubtrends.bsky.social1 likes and repost
- Aug 21, 2025「AIRI」は、Web技術を多用してAIキャラクターを開発するプロジェクトらしい。ゲームプレイや会話も可能なAIを、ブラウザやデスクトップで動かせるのが特徴で、VTuberのような存在を誰でも手軽に作れる可能性があるかもしれない。 yug1224 starred… — @yug1224.com1 likes and repost
- Aug 20, 2025🚀 Skyrocketing! 🚀 (200+ new stars) 📦 moeru-ai / airi ⭐ 3,123 (+387) 🗒 Vue 💖🧸 Self hosted, you owned Grok Companion, a container of… — @github-trending.bsky.social1 likes and repost
- Jul 15, 2025Show HN: Recreation of Neuro-sama for a year, alternative of Grok Companion This is the project we've worked for over a year, gaining… — @llms.activitypub.awakari.com.ap.brid.gy1 likes and repost
- Sep 28, 2026🚀 Skyrocketing! 🚀 (200+ new stars) 📦 moeru-ai / airi ⭐ 49,672 (+216) 🗒 TypeScript 💖🧸 Self hosted, you-owned Grok Companion, a… — @github-trending-js.bsky.social0 likes and reposts · 1 reply
- Jul 27, 2026🎉 Celebrating! 🎉 (500+ new stars) 📦 moeru-ai / airi ⭐ 43,710 (+554) 🗒 TypeScript 💖🧸 Self hosted, you-owned Grok Companion, a… — @github-trending.bsky.social0 likes and reposts · 1 reply
- Mar 3, 2026🎉 Celebrating! 🎉 (500+ new stars) 📦 moeru-ai / airi ⭐ 21,939 (+842) 🗒 TypeScript 💖🧸 Self hosted, you-owned Grok Companion, a… — @github-trending-js.bsky.social0 likes and reposts · 1 reply
- Aug 24, 2025💎 Hidden Gem! 💎 (1000+ new stars) 📦 moeru-ai / airi ⭐ 8,795 (+1,317) 🗒 Vue 💖🧸 Self hosted, you owned Grok Companion, a container of… — @github-trending.bsky.social0 likes and reposts · 1 reply
On YouTube · 10
- Sep 7, 2025Project AIRI - AI waifu / virtual characters — Ian Li30k views · 21 comments
- Mar 7, 2026Airi Self hosted you owned Grok Companion (All You need to Know) — Github Updates9.5k views · 13 comments
- Mar 28, 2026Project AIRI - Open Source AI VTuber That Plays Games (Neuro-sama Alternative) — Skillmdpro8.4k views · 8 comments
- Aug 21, 2025GitHub - moeru-ai/airi: 💖🧸 Self hosted, you owned Grok Companion, a container of souls of waifu... — GitHub Daily Trend AI Podcast7k views · 8 comments
- Jul 29, 2026Airi GitHub Overview: From Browser Chat Limits to a Self-Hosted Avatar Engine — Alex Hitt2.3k views
5 more on YouTube
- Sep 29, 2026One AI Chats on Discord While Playing Minecraft? moeru-ai/airi Hands-On Test — DevCovery1.5k views
- Mar 8, 2026Let AI Play Minecraft with You! airi Hands-on Tutorial — Deploy a Game-playing AI Companion in 3... — DevCovery1.5k views · 3 comments
- Aug 14, 2026Project AIRI: A Self-Hosted AI Companion Experience | moeru-ai/airi — What's this repo1.1k views
- Sep 29, 2026一個 AI 同時聊 Discord 又玩 Minecraft?moeru-ai/airi 實測 — GitCovery467 views
- Oct 4, 2026Airi AI Companion – Self‑Hosted, User‑Owned Grok Bot for Voice Chat, Minecraft & Factorio — Next Horizon317 views · 3 comments
On Hacker News · 3
- Jul 15, 2025Show HN: Recreation of Neuro-sama for a year, alternative of Grok Companion10 points · 3 comments
- Jul 17, 2025The Open Source xAI Ani that's next level3 points · 1 comment
- Aug 21, 2025Airi: Digital Companion1 point
On the web · 1
- Oct 11, 2026moeru-ai/airi · 깃밥 — gitbap.com
In this repository41 other files it gives its agents.
- AGENTS.mdAGENTS.md
- server/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- server/CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- agent-browser-electronSkill
- agent-browserSkill
- analyze-io-tracesSkill
- create-prSkill
- design-audio-visualizationsSkill
- enforce-rules-for-fontsSkill
- enforce-rules-for-i18nSkill
- enforce-rules-for-pinia-syncedSkill
- enforce-rules-for-render-loopsSkill
- enforce-rules-for-typescriptSkill
- enforce-rules-for-ui-componentsSkill
- enforce-rules-for-unocssSkill
- enforce-rules-for-vitestSkill
- eventaSkill
- piniaSkill
- pnpmSkill
- release-note-writerSkill
- simple-englishSkill
- stage-tamagotchi-godot-csharpSkill
- tsdownSkill
- unocssSkill
- upload-github-attachmentSkill
- use-agent-browser-for-airiSkill
- use-agent-browser-with-input-fileSkill
- use-vishot-for-airiSkill
- use-vishotSkill
- use-vishot-with-capacitorSkill
- use-vishot-with-electronSkill
- use-vishot-with-input-fileSkill
- use-vishot-with-webSkill
- vue-best-practicesSkill
- vueSkill
- vue-testing-best-practicesSkill
- vueuse-functionsSkill
- web-design-guidelinesSkill
- xsaiSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. About 0 are common, 7 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 31
When a change is in more than one row, split it.
- Distinctive: line 39
Do not render a whole page or a business component in a test to assert on text, element counts, class names, or child components.
- Very specific: line 40
Do not mock fetch, the router, the auth store, and i18n only to mount a page.
- Distinctive: line 41
Do not assert on page layout through the DOM, for example the order of sections or a computed style, when a capture shows it.
- Very specific: line 42
Do not add a *.browser.test.ts file for a settings page, a dialog, or a panel that has no complex calculation.
- Very specific: line 47
Add or update a Histoire story in packages/stage-ui for each state: loading, empty, error, and ready.
- Very specific: line 49
Use agent-browser to click through the flow and to read the DOM while you develop.
- Very specific: line 50
When a state or a flow needs a check again later, add a reusable scenario to the matching packages/scenarios-* package.
- Very specific: line 56
Put it in the packages/scenarios-* package of its runtime.
- Very specific: line 60
Do not put private data in fixtures.
- Distinctive: line 61
Update the README of the package when you add a scenario that other agents can run.
- Distinctive: line 70
Keep a regression check that guards a real bug.
- Distinctive: line 71
Do not rewrite unrelated test files only for this rule.
- Distinctive: line 77
Do a story, a capture, or a scenario show each changed UI state?
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Enforce AIRI UI Test Rules
AIRI verifies most UI work by looking at it, not by DOM assertions. Use Histoire stories, Vishot captures, screen recordings, and agent-browser to iterate on a UI. Keep automated tests for logic, for primitives, and for calculations that a person cannot check by eye.
Why
A Vitest browser test or a Vue component test that renders a page and asserts on elements acts as an end-to-end test. Such a test has these problems:
- It mocks the router, Pinia, i18n, and the network, so it tests a fake app.
- It locks the DOM structure, the text, and the class names. Each design iteration breaks it, and the agent spends the iteration on test repair.
- It is slow, and it does not show whether the UI looks right.
A story or a capture shows the real result. A reviewer can check it in seconds and find problems that no assertion names, down to pixel alignment.
Choose the verification
| Change | Verification |
| Business logic, a store, a composable, a formatter, or a data mapping | A unit test without a DOM. Move the logic out of the component first when necessary. |
Layout, style, text, page composition, or a page flow in apps/*, packages/stage-pages, or packages/stage-ui | No DOM test. Use a Histoire story, a Vishot capture or a recording, and agent-browser. |
A primitive in packages/ui | A component test is allowed. Test the public contract: props, emits, slots, keyboard, focus, and ARIA. For a position or collision bug, for example a popup outside the viewport, a browser test that measures the geometry is allowed. |
| Three.js, canvas, WebGL, or shader rendering | A test is allowed. Prefer a test of the pure calculation. Use browser mode when the real platform API is necessary. |
| Complex animation, layout, position, geometry, or hit-test calculation | A test of the pure function with explicit inputs. Use browser mode only when the calculation needs real layout. |
| A bug fix in a complex UI calculation or an animation | A regression test that pins the calculation. Obey the reproduction rules of enforce-rules-for-vitest. |
When a change is in more than one row, split it. Test the logic part. Check the visual part by eye.
In the allowed rows, also add a story or a capture. A test pins the calculation. A story shows the result.
Avoid
These rules apply to business pages and business components. The allowed rows in the table above are exceptions.
- Do not render a whole page or a business component in a test to assert on text, element counts, class names, or child components.
- Do not mock
fetch, the router, the auth store, and i18n only to mount a page. - Do not assert on page layout through the DOM, for example the order of sections or a computed style, when a capture shows it.
- Do not add a
*.browser.test.tsfile for a settings page, a dialog, or a panel that has no complex calculation.
Do instead
- Move the logic out of the component into a pure function or a composable. Unit test it.
- Add or update a Histoire story in
packages/stage-uifor each state: loading, empty, error, and ready. Use fixture data. Stories are interactive, and you can compare them pixel to pixel. - Capture the result with
use-vishot. Record the screen when the behavior is motion or a sequence. - Use
agent-browserto click through the flow and to read the DOM while you develop. - When a state or a flow needs a check again later, add a reusable scenario to the matching
packages/scenarios-*package.
Reusable scenarios
A scenario is a small Playwright or Vishot script that brings the app to a named state and captures it.
- Put it in the
packages/scenarios-*package of its runtime. Example:packages/scenarios-stage-tamagotchi-electron/src/scenarios. - Give it a stable name for the surface and the state, for example
settings-connection. - Make it deterministic: fixed viewport, locale, theme, and fixture data. Wait for a ready condition, not only a delay.
- Reuse the helpers of the package. Do not copy a helper into a new scenario.
- Do not put private data in fixtures. Use
example.comand similar reserved values. - Update the README of the package when you add a scenario that other agents can run.
Refactor progressively
Some existing tests render pages and assert on elements. Reduce them over time.
- In a change that touches such a test, move each logic assertion to a unit test of the extracted function.
- Replace the remaining layout and text checks with a story or a scenario.
- Then remove the DOM test. Tell the reviewer which story, scenario, or unit test covers each removed check.
- Keep a regression check that guards a real bug. Do not delete an assertion only to make a test pass.
- Do not rewrite unrelated test files only for this rule. List them as follow-up work.
Review checklist
- Does each new DOM test belong to
packages/ui, to a renderer, or to a complex calculation? - Did the author move logic out of the component and unit test it?
- Do a story, a capture, or a scenario show each changed UI state?
- Does each removed test have a named replacement?
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

