integration-test-validator
Skill3 starsChanged 5 months agoMITView on GitHub
Audits PABX backend integration tests (apps/backend/__tests__/integration/) against the integration-test-writer rules, producing a compliance report with a PASS/FAIL/PASS WITH WARNINGS verdict, per-violation severity, and fix suggestions. Read-only — never writes or fixes tests. Dispatched by the evaluator to confirm a corrected integration test conforms before resuming evaluation, or run directly by a user.
In this repository23 other files it gives its agents.
- architecture-analyzerSkill
- claude-switch-accountSkill
- coupling-mapSkill
- deep-analyzerSkill
- e2e-test-validatorSkill
- e2e-test-writerSkill
- evaluatorSkill
- fix-runnerSkill
- gate-builderSkill
- handoff-writerSkill
- implement-featureSkill
- integration-test-writerSkill
- monorepo-unit-test-validatorSkill
- monorepo-unit-test-writerSkill
- pabx-design-systemSkill
- pabx-e2e-test-validatorSkill
- pabx-e2e-test-writerSkill
- playwright-cliSkill
- prd-writerSkill
- qa-preflightSkill
- spec-writerSkill
- unit-test-validatorSkill
- unit-test-writerSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 41
Check EVERY rule from ../integration-test-writer/references/pabx-rules.md:
- Very specific: line 49
every not measurable or pre-existing N+1 outcome holds against the code, and no other reason is used.
- Distinctive: line 50
every growth test meets every Q rule.
- Distinctive: line 56
Do not skip rules after finding criticals.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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
Integration Test Validator (PABX)
Audit integration test files to ensure they comply with every rule the
integration-test-writer enforces. Read-only: produce a compliance report; never modify
test/production files, never execute tests (static analysis only).
Project scope: PABX backend. The full rule set is in
../integration-test-writer/references/pabx-rules.md— validate against it.
Scope: apps/backend/__tests__/integration/.
INPUT
test_file_path(required) — test file or directory.checklist_file_path(optional) — the.test.mdfor coverage cross-reference.target_file_or_endpoint(optional) — the controller/endpoint under test.severity_filter(optional) —critical|major|minor(default: all).
OUTPUT
A compliance report (English): summary counts, overall verdict (PASS = 0 critical + 0
major; PASS WITH WARNINGS = 0 critical, some major/minor; FAIL = ≥1 critical), each violation
([SEVERITY] Rule-ID, location, description, expected, found, fix), coverage analysis, and
positive findings. When dispatched by the evaluator, the verdict is the signal it consumes.
EXECUTION STEPS (3 Phases)
Phase 1 — Structural Analysis
Inventory describe/it/hooks/helpers. Map checklist ↔ tests and endpoint ↔ tests (if provided).
Identify every data-creation point and every cleanup point (try-finally, afterEach,
afterAll, direct deletes). Note imports.
Phase 2 — Rule-by-Rule Validation
Check EVERY rule from ../integration-test-writer/references/pabx-rules.md:
- Language & Naming [CRITICAL] — English only; descriptive names; no double blank lines.
- Test Structure [MAJOR] — AAA; independence; deterministic;
setupTestDatabase/cleanupTestDatabase/supertest/appfile pattern; no prod modification. - Data Cleanup [CRITICAL] —
try-finallyper data-creating test;try-catchinsidefinally; FK order (audit_logs→users_permissions/user_permissions_group→group_permissions→permissions→users→dr_agent→dr_domain); only test-created data; no data left behind; ≥2 cleanup levels. - Execution Setup [MAJOR] — E1–E3 of
pabx-rules.md:setupTestDatabase()inbeforeAlland the token fromgenerateToken;cleanupTestDatabase()inafterAll; correct imports. - Coverage [MAJOR] — CRUD, auth/authorization, validation errors, not-found, edge cases, security (SQLi/XSS), checklist alignment.
Query growth [CRITICAL] — "Query growth" in
pabx-rules.md, by its rule ids. Cite the id of each violated Q rule instead of paraphrasing it. Check:- each endpoint in the section's scope has exactly one recorded outcome in the checklist;
- every
not measurableorpre-existing N+1outcome holds against the code, and no other reason is used; - every growth test meets every Q rule.
Check only what the dispatch targets. In a suite written or expanded from a checklist, that means the checklist's endpoints. When confirming a correction, it means only the tests the writer wrote or changed. A growth test missing for an endpoint outside that target is not a violation: legacy suites have none.
- Forbidden Practices [CRITICAL] — no prod modification; no external data scripts; no pre-existing-data removal; no afterEach-only cleanup for created data; no Portuguese.
- API Behavior [MINOR] — status assertions; response-body assertions; correct HTTP methods;
Authorizationheader on authenticated requests.
Do not skip rules after finding criticals. State which were skipped and why.
Phase 3 — Compliance Report
Emit the full report per OUTPUT. Verdict is derived strictly from the counts.
RULES
Always:
- Validate against
../integration-test-writer/references/pabx-rules.md; check every rule. - Give exact line/block locations and a concrete fix per violation; report positives. Output in English.
- Derive the verdict strictly from severity counts.
Never:
- Modify any test or production file (read-only). Execute the tests. Mark PASS with any CRITICAL. Produce partial reports.
Edge Cases
- Empty test file: CRITICAL. Missing
setupTestDatabase/imports: report each individually. - Data created without
try-finally: CRITICAL (F4). Wrong FK cleanup order: CRITICAL (C3). - Directory input: one report per file + a summary.
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.

