Write or refactor Mistral Vibe tests with proper decoupling. Use when adding behavior coverage, testing ports/adapters, replacing brittle mocks, creating fakes, adding characterization tests before refactors, or changing tests under tests/ for vibe/core, vibe/app_server, vibe/acp, tools, config, sessions, skills, hooks, MCP, or setup.
74
93%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Use this skill to make Vibe architecture testable, not just well-shaped. Tests should protect observable behavior while allowing internals to move.
Test behavior through stable boundaries. Do not couple tests to private methods, internal call choreography, or temporary structure.
If a refactor changes no observable behavior but breaks many tests, the tests are probably coupled to implementation details.
| Code area | Preferred test boundary |
|---|---|
| Core use cases and services | Public function/class API, typed events, model outputs, persisted state |
| Tools | Owning app-server capability contract, typed invocation/results, permissions and user-facing errors; BaseTool.invoke/run for retained BaseTool implementations |
| LLM/backend orchestration | Native Unified Runtime through serialized app-server RPCs, with deterministic fake completion/discovery services |
| Config | Pydantic model validation, layer merge outputs, migration results |
| Sessions | Runtime session operations, durability/recovery and app-server projections; JSONL/metadata only for the supported read-only historical importer |
Terminal UI (vibe/cli-rust) | Rust unit tests for pure logic, client-e2e scenarios and goldens for rendering and interaction (see vibe/cli-rust/AGENTS.md) |
Onboarding wizard (vibe-acp --setup) | Textual snapshots, rendered user-visible state |
| ACP | ACP session updates and protocol-facing content, not core internals |
Prefer in-memory implementations and fake adapters that implement real contracts.
tests/stubs/ and name them Fake*.When code is hard to test:
Prefer "make it testable" refactors first: isolate I/O, extract pure functions, introduce ports/adapters where useful, or move construction out of business logic.
pytest + pytest-asyncio + pytest-textual-snapshot (onboarding only) + respx.tests/conftest.py (config_dir, tmp_working_directory) for config/home/working-directory isolation.@pytest.mark.asyncio.respx.ANN and PLR ruff rules (see per-file-ignores).uv run pytest tests/app_server/backend_contract) and the affected app-server/ACP tests. Preserve original snapshot scenarios when adapting fixtures to the Unified Runtime.After Python test/code changes, run:
uv run ruff format .
uv run ruff check --fix .Then run the targeted tests:
uv run pytest <test-path-or-node-id>Run uv run pyright when signatures, models, protocols, or shared contracts changed.
mistralai/mistral-vibe
63d0e8f
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.