Self-healing QA for the coding-agent era. Your tests have nine lives.
Project description
🐾 9lives
Your tests have nine lives. Self-healing QA for the coding-agent era, by QualityMax.
Your coding agent shipped a change and your Playwright test went red? Don't rewrite it — resurrect it:
9l heal login.spec.ts
9l runs the test, classifies the failure, and heals it in tiers:
- Tier 1 — offline, free, instant. Selector drifted? 9lives finds the element again from the failure-time page snapshot (text, testid, id, class, aria-label) and rewrites the locator. No LLM, no network, no account.
- Tier 2 — the subscription you already pay for. Structural change? 9lives shells out to your installed coding-agent CLI — Claude Code (
claude -p), Codex (codex exec), or OpenCode (opencode run) — so your existing subscription does the thinking. No API key to mint, nothing to configure: if the CLI is logged in, healing works. (Prefer raw API?ANTHROPIC_API_KEY/OPENAI_API_KEYwork too.) - Always a diff, never a surprise. Healed code is shown as a unified diff and applied only when you approve (or
--yesin CI).
Install
curl -sL 9lives.run | sh
pip install 9lives # or: uv tool install 9lives
Requires Node.js ≥ 18 (Playwright itself runs on Node). Check your setup with 9l doctor.
Commands
9l run <spec> # run a spec locally; screenshots/videos/traces in .9lives/
9l heal <spec> # run → heal → re-run → diff → apply on confirm
9l heal <spec> --yes # CI mode: apply automatically, exit code tells the story
9l doctor # environment check
Works inside an existing Playwright project (uses your package.json) or on a bare .spec.ts file (scaffolds an ephemeral project automatically). All commands accept multiple specs/globs.
In CI: the GitHub Action
- uses: quality-max/9lives/action@v1
with:
specs: "tests/**/*.spec.ts"
anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }}
commit-healed: "true"
Runs on your runner, heals with your key, posts a 🐾 report comment on the PR, and can commit healed specs straight back to the branch. See action/.
BYO everything
- Your subscription: an installed
claude/codex/opencodeCLI is auto-detected and used for Tier 2, so the subscription you already use for coding can heal tests too. - Or your key:
ANTHROPIC_API_KEY/OPENAI_API_KEY. Force a choice withNINELIVES_PROVIDER(claude-code,codex,opencode,anthropic,openai) andNINELIVES_MODEL. - Your runner: everything executes on your machine or your CI. Nothing leaves it, nothing phones home.
- No account. Ever, for anything in this tool.
Security & trust boundary
Tier 1 healing is fully offline and never sends anything anywhere.
Tier 2 builds its prompt from the failing test plus the page snapshot captured at failure. If you heal tests against a site you don't control, that page content becomes model input. In subscription mode it is handed to your local coding-agent CLI (claude / codex / opencode), which can run tools — so a hostile page could attempt prompt injection against your agent. 9lives runs the CLI in an empty scratch directory to limit blast radius, but if you heal against untrusted targets, force plain API mode (no agent tools) with:
NINELIVES_PROVIDER=anthropic # or openai
Roadmap
9l check— map your git diff to affected user flows, run/generate targeted tests: "did my agent break anything?"9lives-action— GitHub Action that posts the QA report on PRs, healed commits included9l gen <url>— crawl a live app and generate a starter test suite
Status
v0.1 prototype — built by QualityMax for local, BYO self-healing Playwright workflows. MIT licensed.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file 9lives-0.1.2.tar.gz.
File metadata
- Download URL: 9lives-0.1.2.tar.gz
- Upload date:
- Size: 34.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2289b64ce828973fc8af68c1943c95c6fd37d31c56e69836bc23cb817bae0922
|
|
| MD5 |
54d9d1e120b1ca76c276fd64bfac7a86
|
|
| BLAKE2b-256 |
0aefeba5f5aebaa87c0b30a10ec410021bb901b354373834c1a9ed074083e051
|
Provenance
The following attestation bundles were made for 9lives-0.1.2.tar.gz:
Publisher:
release.yml on Quality-Max/9lives
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
9lives-0.1.2.tar.gz -
Subject digest:
2289b64ce828973fc8af68c1943c95c6fd37d31c56e69836bc23cb817bae0922 - Sigstore transparency entry: 2132453568
- Sigstore integration time:
-
Permalink:
Quality-Max/9lives@9ad53ccc68a787afbab5f39637d83d8a10909568 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/Quality-Max
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@9ad53ccc68a787afbab5f39637d83d8a10909568 -
Trigger Event:
push
-
Statement type:
File details
Details for the file 9lives-0.1.2-py3-none-any.whl.
File metadata
- Download URL: 9lives-0.1.2-py3-none-any.whl
- Upload date:
- Size: 30.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b97cf5bb35416c5856b4d5eb39bccc5c630846f764c2e71d1b0bdaf1531c3ddc
|
|
| MD5 |
f0d856c1520d632623edeaff5d53207e
|
|
| BLAKE2b-256 |
2d5e1eeb4768e2ce00e6bf49a4bf92866a31a8ef4fe6720fb7624c8bdfcea098
|
Provenance
The following attestation bundles were made for 9lives-0.1.2-py3-none-any.whl:
Publisher:
release.yml on Quality-Max/9lives
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
9lives-0.1.2-py3-none-any.whl -
Subject digest:
b97cf5bb35416c5856b4d5eb39bccc5c630846f764c2e71d1b0bdaf1531c3ddc - Sigstore transparency entry: 2132453630
- Sigstore integration time:
-
Permalink:
Quality-Max/9lives@9ad53ccc68a787afbab5f39637d83d8a10909568 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/Quality-Max
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@9ad53ccc68a787afbab5f39637d83d8a10909568 -
Trigger Event:
push
-
Statement type: