test-scope-routing
Skill1 starsChanged 2 months agoMITView on GitHub
Route validation by changed boundaries and risk, choosing the smallest sufficient checks for code, docs, UI, data, auth, sync, build, security, and release work. Use when deciding test commands, reducing unnecessary full-suite runs, auditing test layering, or documenting what was and was not verified.
In this repository7 other files it gives its agents.
The file
Show its rules and text
We split this skill into the rules it gives an agent
17 rules. About 0 are common, 13 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈13
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 16
Read the applicable AGENTS.md, CLAUDE.md, CONTRIBUTING.md, and test-scope documentation.
- Very specific: line 19
Use project-defined commands and prerequisites.
- Distinctive: line 20
Check whether a command starts a database, browser, production connection, deployment, or other external state before running it.
- Distinctive: line 22
Treat project documentation as the authority for exact commands and boundaries.
- Distinctive: line 34
If a requirement is materially ambiguous, resolve the spec or decision first.
- Distinctive: line 38
Use semantic tiers. Projects may rename or combine them, but the responsibilities must remain distinct.
- Distinctive: line 57
Do not run every tier merely because a command is convenient.
- Distinctive: line 61
Before composing or recommending shortcuts:
- Very specific: line 64
Do not assume verify means full regression.
- Distinctive: line 65
Prefer a test-file, project, tag, or related-test selector for local iteration when supported.
- Very specific: line 66
Treat a command named fast as only a label.
- Distinctive: line 67
Keep local database checks local and follow the project’s migration/control-plane rules.
- Distinctive: line 69
Keep CI and release gates appropriately complete even when local iteration is targeted.
- Distinctive: line 82
Do not describe a change as fully verified from an exit code, HTTP 200, empty output, pending CI check, or unit coverage percentage alone.
- Distinctive: line 86
Keep this skill framework-level: risk classification, tier responsibilities, command inspection, and evidence reporting.
- Distinctive: line 87
Keep project-specific facts in the project’s test-scope and contribution documents: exact commands, path mappings, thresholds, …
- Distinctive: line 88
Keep one-off audits and handoffs as task records, not as the permanent global source of truth.
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 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
Test Scope Routing
Choose validation from the changed surface and risk. Keep the local feedback loop small, while reserving complete regression and release gates for merge, release, and high-risk boundaries.
For compact routing examples, read references/usage-examples.md when needed.
Establish the project contract
Before selecting commands:
- Read the applicable
AGENTS.md,CLAUDE.md,CONTRIBUTING.md, and test-scope documentation. - Inspect
package.json, Makefiles, task runners, test configuration, CI workflows, and release workflows. - Identify the repository, branch, worktrees, submodules, and uncommitted changes. Preserve changes that are outside the request.
- Use project-defined commands and prerequisites. Do not invent a global command name or assume that
verify,fast, orfullhas a standard meaning. - Check whether a command starts a database, browser, production connection, deployment, or other external state before running it.
Treat project documentation as the authority for exact commands and boundaries. This skill supplies the routing method, not project-specific command names.
Write a small spec first
For behavior changes, record before implementation:
- in-scope behavior and explicit non-goals;
- user-observable acceptance conditions;
- affected code, UI, data, permission, offline, conflict, error, and compatibility boundaries;
- the smallest validation tier and any additional tiers;
- checks intentionally not run and why.
If a requirement is materially ambiguous, resolve the spec or decision first. For a behavior change, add a focused failing test when practical, then implement the smallest change.
Select the smallest sufficient tier
Use semantic tiers. Projects may rename or combine them, but the responsibilities must remain distinct.
| Tier | Responsibility | Typical scope |
| L0 static | Syntax, formatting, repository policy, static assets, and documentation constraints | Docs, copy, low-risk CSS, static configuration |
| L1 fast | Deterministic local logic and state behavior | Utilities, models, reducers, controllers, rule calculations |
| L2 targeted UI | User-visible rendering and interaction in the affected journey | Navigation, forms, settings, offline UI, PWA, accessibility-sensitive flows |
| L3 integration | External boundaries and data correctness | Database schema/RLS, functions, auth, sync, export, deletion, network errors |
| L4 full | Merge, release, or high-risk system boundary | Full build, security, dependency, complete E2E, database, release, and production checks |
Route by the union of touched boundaries:
- Documentation-only changes normally need L0 or no executable test when the project has no documentation checker.
- Pure logic changes need L1; use a related-test or explicit-test-file route when the project supports it.
- UI changes need L1 only when logic is affected, plus the smallest relevant L2 journey.
- Auth, synchronization, data lifecycle, schema, RLS, or server-function changes need the relevant L1 and L3 checks. Do not treat a UI test as permission or database evidence.
- Dependency, build, Service Worker, CSP, public-resource, or release changes need the project’s L4 checks.
- Merge, release, and explicitly high-risk changes require L4 even when lower tiers already passed.
Do not run every tier merely because a command is convenient. Do add tiers when the change crosses a boundary. If no targeted check exists, report the gap as unverified instead of hiding it behind an unrelated full suite.
Inspect command composition
Before composing or recommending shortcuts:
- Expand each command and identify nested checks. Avoid running the same unit, coverage, build, or E2E suite twice.
- Do not assume
verifymeans full regression. Confirm whether it excludes database, functions, E2E, or production probes. - Prefer a test-file, project, tag, or related-test selector for local iteration when supported.
- Treat a command named
fastas only a label; verify whether it runs all unit tests or only impacted tests. - Keep local database checks local and follow the project’s migration/control-plane rules. Never substitute a production write for validation.
- Separate code failure, flaky behavior, missing dependency, unavailable Docker/browser, missing environment variables, and missing production URL. Environment blockage is not a passing test.
- Keep CI and release gates appropriately complete even when local iteration is targeted.
Record evidence
In the task or PR, record:
- Scope and acceptance conditions.
- Selected tier(s) and the exact command(s) run.
- Results, including counts and relevant artifacts when available.
- Tiers not run and the reason.
- Environment blockers, flaky tests, or unverified production behavior.
- Remaining merge or release gates.
Do not describe a change as fully verified from an exit code, HTTP 200, empty output, pending CI check, or unit coverage percentage alone. State the actual boundary covered and the boundary that remains unverified.
Keep the global and project layers separate
- Keep this skill framework-level: risk classification, tier responsibilities, command inspection, and evidence reporting.
- Keep project-specific facts in the project’s test-scope and contribution documents: exact commands, path mappings, thresholds, environments, browser/database prerequisites, and release exceptions.
- Keep one-off audits and handoffs as task records, not as the permanent global source of truth.
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.

