agentleFS
WardLuWardLu/skills/test-scope-routing/SKILL.md

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.

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
  1. Very specific:

    Read the applicable AGENTS.md, CLAUDE.md, CONTRIBUTING.md, and test-scope documentation.

    line 16
  2. Very specific:

    Use project-defined commands and prerequisites.

    line 19
  3. Distinctive:

    Check whether a command starts a database, browser, production connection, deployment, or other external state before running it.

    line 20
  4. Distinctive:

    Treat project documentation as the authority for exact commands and boundaries.

    line 22
  5. Distinctive:

    If a requirement is materially ambiguous, resolve the spec or decision first.

    line 34
  6. Distinctive:

    Use semantic tiers. Projects may rename or combine them, but the responsibilities must remain distinct.

    line 38
  7. Distinctive:

    Do not run every tier merely because a command is convenient.

    line 57
  8. Distinctive:

    Before composing or recommending shortcuts:

    line 61
  9. Very specific:

    Do not assume verify means full regression.

    line 64
  10. Distinctive:

    Prefer a test-file, project, tag, or related-test selector for local iteration when supported.

    line 65
  11. Very specific:

    Treat a command named fast as only a label.

    line 66
  12. Distinctive:

    Keep local database checks local and follow the project’s migration/control-plane rules.

    line 67
  13. Distinctive:

    Keep CI and release gates appropriately complete even when local iteration is targeted.

    line 69
  14. Distinctive:

    Do not describe a change as fully verified from an exit code, HTTP 200, empty output, pending CI check, or unit coverage percentage alone.

    line 82
  15. Distinctive:

    Keep this skill framework-level: risk classification, tier responsibilities, command inspection, and evidence reporting.

    line 86
  16. Distinctive:

    Keep project-specific facts in the project’s test-scope and contribution documents: exact commands, path mappings, thresholds, …

    line 87
  17. Distinctive:

    Keep one-off audits and handoffs as task records, not as the permanent global source of truth.

    line 88

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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:

  1. Read the applicable AGENTS.md, CLAUDE.md, CONTRIBUTING.md, and test-scope documentation.
  2. Inspect package.json, Makefiles, task runners, test configuration, CI workflows, and release workflows.
  3. Identify the repository, branch, worktrees, submodules, and uncommitted changes. Preserve changes that are outside the request.
  4. Use project-defined commands and prerequisites. Do not invent a global command name or assume that verify, fast, or full has a standard meaning.
  5. 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.

TierResponsibilityTypical scope
L0 staticSyntax, formatting, repository policy, static assets, and documentation constraintsDocs, copy, low-risk CSS, static configuration
L1 fastDeterministic local logic and state behaviorUtilities, models, reducers, controllers, rule calculations
L2 targeted UIUser-visible rendering and interaction in the affected journeyNavigation, forms, settings, offline UI, PWA, accessibility-sensitive flows
L3 integrationExternal boundaries and data correctnessDatabase schema/RLS, functions, auth, sync, export, deletion, network errors
L4 fullMerge, release, or high-risk system boundaryFull 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 verify means 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 fast as 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:

  1. Scope and acceptance conditions.
  2. Selected tier(s) and the exact command(s) run.
  3. Results, including counts and relevant artifacts when available.
  4. Tiers not run and the reason.
  5. Environment blockers, flaky tests, or unverified production behavior.
  6. 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.