building-tests
Installation
SKILL.md
Building Tests
Setup
| Item | Kind | Required | When | Done when | How |
|---|---|---|---|---|---|
| Node.js 22+ | user | required | All | node --version reports 22 or later |
https://nodejs.org |
| Root path | ask | required | Create | test-contract.md → Resolve tests root finds a root | Ask for the folder (default tests/); missing or empty → use it, else ask for another path; recorded as the root's location |
| Root marker | static | required | Create | <tests-root>/index.md carries test-contract.md → Author signature |
Write index.md from assets/index.md |
| Stack config | ask | required | Create | <tests-root>/index.md frontmatter has backend, health, and surfaces filled |
Fill per test-contract.md → Index frontmatter from package scripts and app config; ask for what the code leaves empty; recorded in index.md frontmatter |
| Framework skill per surface | user | required | Create, Update, Run | For every surfaces id in index.md, a skill teaching that surface's framework is found per test-contract.md → Discover framework skill |
Install a general-purpose skill for the framework: npx skills add <owner>/<repo> --skill <name>; it must teach framework mechanics only, not test structure |
| Surface runtimes | user | required | Create, Update, Run | Every surface's requires command in index.md succeeds |
Per the framework's docs, e.g. npx playwright install chromium; Maestro CLI, Java 17, and a booted emulator with the dev client installed |
| Runner | static | required | Create, Update, Run | <tests-root>/runner/ matches assets/runner/ |
Copy everything in assets/runner/ to <tests-root>/runner/ |
| Package | static | required | Create | <tests-root>/package.json exists |
Copy assets/package.json and assets/gitignore (as .gitignore) into the root; name the package per the workspace's convention |
| Install | auto | required | Create, Update, Run | <tests-root>/node_modules/ exists and package.json did not change in this run |
Add the root to the workspace globs when a workspace file exists, then install with the project's package manager |
| Standing rule | auto | required | Create | Root AGENTS.md has the line |
Add - When a change alters a user flow, a backend state, or a route, run the building-tests Update recipe in the same work. to root AGENTS.md (create when missing) and to root CLAUDE.md when it exists without importing AGENTS.md; skip a file that has it |