self-repair

Repairs failing Playwright test suites by fanning out one repair worker per red spec file.

5|2|Updated May 19, 2026
One-click install
npx skills add https://github.com/civitas-cerebrum/achilles --skill self-repair-civitas-cerebrum
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: self-repair
Source: https://github.com/civitas-cerebrum/achilles/tree/main/skills/self-repair
Command: npx skills add https://github.com/civitas-cerebrum/achilles --skill self-repair-civitas-cerebrum

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? When a Playwright E2E suite rots, manually triaging dozens of failing tests is slow and error-prone. This Skill autonomously baselines the suite, classifies failures as deterministic or flaky, and dispatches one repair worker per failing spec file until every test is green or carries a documented explanation. ## Core Features & Use Cases - Baseline and classification: Runs a discovery pass plus focused failure reruns to distinguish deterministic failures from flaky tests, respecting @known-defect tags. - Parallel per-file repair workers: Fans out one worker per red file following a gated pipeline (reproduce, evidence-analysis, context-probe, experiment, understand, fix, verify) with a one-way understand gate before any fix. - Audit-grade reporting: Writes report.md and schema-validated report.json under .achilles/self-repair/<run-id>/ with per-test outcomes, bug evidence bundles, and a complete NDJSON event log. - Use Case: After a nightly CI run turns red, run npm run test:repair to have each failing spec diagnosed and healed in parallel, with app bugs reported alongside slow-motion reproduction recordings instead of silently patched tests. ## Quick Start Ask the agent to self-repair the suite, or run npm run test:repair to launch the autonomous per-file repair pipeline.

Frequently Asked Questions about self-repair

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automatically repair a failing Playwright test suite?

Run npm run test:repair or ask the agent to self-repair the suite. The pipeline baselines the suite with a discovery run plus focused failure reruns, classifies each failure, then fans out one repair worker per red spec file until every test is green or explained.

What is the difference between self-repair and test-repair?

Self-repair is fan-out-first: each red file gets its own worker with its own context window, suited for unattended parallel runs. Test-repair is cluster-first, triaging failures that share one root cause inside a single session, which is preferable when one cause dominates.

Can self-repair handle flaky tests and known defects?

Yes. Mixed outcomes across baseline runs are classified as flaky-consistent or flaky-chaotic, and irreducible flake is quarantined with a ledger entry. Tests tagged @known-defect are excluded from repair and reported under their own outcome.

Does self-repair work with CI pipeline failures?

Yes. When triggered by a red CI run, it downloads the run's artifacts first, pins to the run's commit and dependency tree, and seeds each worker's brief with the actual failing traces and screenshots before running a local discovery pass.

When should I not use self-repair for a failing test?

Do not use it for a single failing test, which belongs to failure-diagnosis, or for in-session cluster-first triage, which belongs to test-repair. It also stops and reports on compile errors, infrastructure failures, and never deletes tests or adds .skip() calls.