@civitas-cerebrum/achilles

中文文档
0.1.9发布于 2026/11/09MITCommonJS构建来源已验证近 30 天下载 2773

Autonomous quality-assurance methodology: harness-neutral agent skills and agent definitions, return-shape schemas and a Playwright reporter, with a Claude Code plugin adapter (delegate_qa, /achilles, the orchestrator and its experts).

原始使用文档
文档目录12 节
  1. Quick start
  2. What you can ask for
  3. What lands in your repo
  4. How it works
  5. Tools that come with it
  6. Install
  7. Run the suite in CI
  8. Under the hood
  9. What Achilles is not
  10. Upgrading from 0.1.7 or a 0.2.0 branch install
  11. Contributing
  12. License

Achilles

Point your coding agent at a web app. Get back a Playwright suite you own.

NPM Version License: MIT Node 20+

Achilles is a QA team that lives inside your agent. Hand it a URL and it maps the app, writes the tests, hunts for bugs, and has every piece of work checked by a reviewer that did not write it. What lands in your repo is plain Playwright: specs that run with npx playwright test, no agent required.

It also takes the jobs nobody wants: a red suite after a refactor, a ticket that needs proof before it closes, a flaky test that fails one run in ten.

you    /achilles onboard this project; the app runs at http://localhost:3000, login is in .env
       RUNNING  run 2026-11-01-a7c3   (you keep working, progress shows in the status line)

       ... inspector maps 9 journeys, author writes them, reviewer re-runs every one ...

       DONE  41 specs across 9 journeys, all green on 3 consecutive runs
             2 app bugs reported with reproductions (tests/e2e/docs/adversarial-findings.md)
             secrets moved to .env, committed in 6 commits

An illustration of the flow; real counts depend on your app.

Quick start

You need Node 20+, a web app with a reachable URL, and Claude Code 2.1.287+ (or pi).

npm i -D @civitas-cerebrum/achilles   # registers the Claude Code plugin in place, fetches Chromium

Restart Claude Code, then ask:

/achilles onboard this project; the app runs at http://localhost:3000

That's it. On npm 11+, if npm lists Achilles under blocked install scripts, run npm install-scripts approve @civitas-cerebrum/achilles and install again. Other ways to install are below.

What you can ask for

SayAchilles runsYou get
/achilles onboard this projectonboard, zero to suite in eight phasesScaffold, happy paths, a journey map, deep coverage, a bug hunt, a secrets sweep and a report
/achilles write a test: a guest can't check out with an empty cartauthor-scenarioOne durable, reviewed test
/achilles map the user journeysmap-journeystests/e2e/docs/journey-map.md, prioritised by business impact
/achilles expand coverage on checkoutexpand-coverageFive passes per journey: variants, errors, edge cases, adversarial probes
/achilles try to break the apphunt-bugsA findings ledger and a reproduction spec per bug
/achilles the checkout suite is red since yesterday, repair itrepair-suiteHeals with stability evidence; real app bugs reported, never papered over
/achilles verify PROJ-123 on this branchverify-changeDiff review, an evidence bundle, new tests and a negative control proving they can fail

Specialist skills join in when the work calls for them: API contract tests, database assertions, k6 performance tests, red-teaming AI features, inert test-attribute selectors, test-data lifecycle, bug reports, and a summary deck for stakeholders.

What lands in your repo

Ordinary Playwright specs on @civitas-cerebrum/element-interactions, with selectors kept in one page repository instead of scattered through the tests:

// tests/e2e/checkout.spec.ts
import { test } from '../fixtures/base';

test('a signed-in shopper can check out a single item', async ({ steps }) => {
  await steps.navigateTo('/products/veggie-wrap');
  await steps.click('addToCart', 'ProductPage');
  await steps.click('checkoutButton', 'CartPage');
  await steps.verifyText('orderStatus', 'ConfirmationPage', 'Order placed');
});
// tests/e2e/page-repository.json
{ "pages": [{ "name": "CartPage", "elements": [
  { "elementName": "checkoutButton", "selector": { "role": "button", "name": "Checkout" } }
]}]}

The tests run in CI like any other suite. Achilles is only needed to write and repair them.

How it works

your session ──/achilles──▶ orchestrator ──brief──▶ inspector     drives the live app, gathers evidence
     ▲                         │   ▲                author        writes specs and the page repository
     │                         │   └──report────── reviewer      fresh instance, verifies, never edits
     │                         │                    reproducer    decides whether a suspected defect is a bug
     └────── one verdict ──────┘                    doc-writer    maps, reports, decks
  • Your session stays yours. The work runs in a separate orchestrator agent in the background. You get RUNNING and a run id at once, and one hand-back at the end: DONE, DONE_WITH_CONCERNS, NEEDS_CONTEXT or BLOCKED.
  • Nobody marks their own homework. Every unit of work is checked by a fresh reviewer before the run moves on. An author cannot approve, and a reviewer cannot edit.
  • No questions mid-run. If Achilles needs something from you, it commits what it has, writes a resume file and asks everything at once. Answer in the chat and it picks up where it stopped; /achilles resume <run-id> works after a crash too.
  • Bugs are reported, not worked around. A suspected app bug never becomes the expected result: the test keeps the correct assertion, is tagged @known-defect and points at the finding, with its evidence.
  • The finder does not confirm. Before a suspected defect becomes a sentinel or a ticket, a fresh reproducer decides from the criteria, the live app and the source whether it is a bug, real only in the source, a spec question or intended. On Claude Code a defect filing or a sign-off without that verdict is refused.
  • Guardrails, not handcuffs. On Claude Code eight hooks watch the Achilles agents. They advise by default and block only what can't be undone: force pushes, rm -rf outside the project, bypassed commit checks, credentials in committed files, sign-off without a reviewer receipt.

The full contract is in skills/achilles-orchestrator/SKILL.md, and the design thinking in Agentic Shift-Left.

Tools that come with it

CommandWhat it's for
npx achilles-mutateProves your tests can fail. Injects the broken state an acceptance criterion forbids and reports CAUGHT, WRONG-TEST, SURVIVED, VOID or UNCHECKED. --calibrate checks every probe can answer both ways; --repeat 3 controls for flake. Needs a noop mutation and an E2E_MUTATION_* hook in the page fixture.
npx achilles-show <spec>Replays a spec headed and slowed down (slowMo 1500) with video and trace, and saves an mp4 to show-recordings/<timestamp>/ (webm without ffmpeg).
npx achilles-self-repairUnattended repair. Baselines the suite, separates flake from real failures, sends one claude -p worker per red spec file and verifies each heal. The scaffold wires it as npm run test:repair.
npx achilles-selector-evidenceCaptures live evidence (count, outline, screenshot) for one page-repository entry.
npx achilles-videoPlays a JSON storyboard into a captioned reproduction video (.webm and .mp4): an off-camera login, one caption per step at a readable pace, an evidence page with the decisive text highlighted, expected and actual. Writes a manifest with step timings, expectations and a decode check.
npx achilles-scenario-lintLints #### <ID> — <title> scenario blocks against your project's factory rules.

There's also a Playwright reporter that remembers. It keeps a local history of every test, so a failure shows up as failed 6 of last 10 runs, and it copies each failing attempt's evidence. It never fails a run.

reporter: [['list'], ['html', { open: 'never' }], ['@civitas-cerebrum/achilles/reporter']],

History lives in .achilles/history/tests.ndjson and per-attempt evidence in .achilles/runs/<runId>/. Set ACHILLES_REPORTER=off to disable it.

Install

WhereCommandNotes
Any project, npmnpm i -D @civitas-cerebrum/achillesRegisters the plugin in .claude/settings.local.json (-g: ~/.claude/settings.json), loaded in place from node_modules; nothing is copied. Fetches Chromium for live inspection.
Claude Code, marketplaceclaude plugin marketplace add civitas-cerebrum/achilles then claude plugin install achilles@achillesA user-level plugin for every project. The CLIs and reporter still come from the npm package.
pipi install npm:@civitas-cerebrum/achillesSkills plus the pi extension: delegate_qa, /achilles and expert mode, each expert in its own pi process. See docs/harness/pi.md.

Restart Claude Code after installing. To uninstall, run claude plugin uninstall achilles or delete the achilles entries postinstall added to the settings file.

Switches
SwitchEffect
ACHILLES_DISABLE=1 in the shellThe adapter passes every event through for new sessions; the tools say it is off
ACHILLES_SKIP_CLAUDE_REGISTRATION=1 at installDon't register the plugin with Claude Code
ACHILLES_SKIP_PI_REGISTRATION=1 at installDon't install the package into pi
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 at installSkip the Chromium fetch
achilles-factory-rules.json in the project rootOpt into the factory content rules; no file, no rules

A failed install step prints a warning and the install still succeeds. The full table, including reporter and CLI variables, is in docs/harness/claude-code.md.

Run the suite in CI

The scaffold writes playwright.config.ts, the specs, fixtures, a setup file and a test:repair script, but no CI workflow, because CI doesn't need Achilles. A starting point:

# .github/workflows/e2e.yml
name: e2e
on: [pull_request]
jobs:
  e2e:
    runs-on: ubuntu-latest
    env:
      ACHILLES_SKIP_CLAUDE_REGISTRATION: "1"
      PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1"
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with: { node-version: 20 }
      - run: npm ci
      - run: npx playwright install --with-deps chromium
      - run: npx playwright test --reporter=junit
        env:
          # the secrets sweep moved credentials into .env (gitignored); pass them here
          E2E_USER: ${{ secrets.E2E_USER }}

Rename the variables to match your .env. The commands are Playwright's own; this recipe hasn't been run against an onboarded project in this release.

Under the hood

The 16 skills: one orchestrator with seven workflows, and 15 expert skills
SkillRoleWhat it does
achilles-orchestratorcontrollerRouting, preflight, dispatch and hand-back contracts, the verification bar, state and commit discipline
↳ workflows/author-scenario.mdone scenarioOne durable test from a scenario, URL, bundle or fix request
↳ workflows/onboard.mdzero to suiteScaffold, groundwork, happy paths, journey map, coverage, bug hunt, secrets sweep, report
↳ workflows/map-journeys.mddiscoverytests/e2e/docs/journey-map.md from inspectors driving the app section by section
↳ workflows/expand-coverage.mdcoverageFive passes per journey (standard, breadth, depth); adversarial ledger, residual risk
↳ workflows/hunt-bugs.mdadversarialProbe every journey (live or static); findings ledger and reproduction specs
↳ workflows/repair-suite.mdrepairOne failing test, a batch, or unattended npm run test:repair; stability evidence, quarantine ledger
↳ workflows/verify-change.mdchange QAA ticket, PR or branch: diff review, evidence bundle, durable tests, negative control, verify note
test-composerauthorThe full variant set for one journey
bug-discoveryauthorAdversarial probing of one journey or page set
failure-diagnosisauthorEvidence-based triage of a failing test, local or from CI
evidence-captureauthorOne spec with per-step screenshots, video, trace, HAR and console, frozen as a redacted bundle
contract-testingauthorStatus, schema, error-envelope and header assertions for every steps.api* call
database-testingauthorRow, cell, column and transaction assertions for steps.sql*
performance-testingauthork6 load, stress, spike, soak and breakpoint tests with SLO thresholds
agents-vs-agentsauthorRed-teaming, guardrail, bias and prompt-injection tests for AI features
selector-developmentauthorOne inert test attribute per element, with an eight-step inertness proof
secrets-sweepauthorCredentials, keys, PII and URLs moved out of the suite into .env
test-data-conventionsauthor (companion)Where a scenario's data comes from, who creates it, who cleans it up
journey-mappinginspector, doc-writerThe per-section inspection brief and the map author's rules
reviewreviewerComposition judge, in-loop reviewer and phase gate
defect-confirmationreproducerOne suspected defect reproduced independently; the verdict is the standard defect evidence
qa-reportingdoc-writerWork summary deck and test catalogue
bug-reportdoc-writerA pre-filled tracker ticket from evidence and a reproduction

Framework references (the Steps API, stages protocol, composition standards, selector evidence, browser protocol) live under skills/achilles-orchestrator/references/.

The six agents and what each may touch
AgentRoleScope
achilles-orchestratorcontrollerRoutes the task, writes briefs and run state under .achilles/runs/<run>/, dispatches experts, reads their reports, commits landed work. Never opens a browser, never writes a spec
achilles-inspectorlooks firstDrives the live app in its own browser session; writes evidence and proposals, never a spec or the page repository
achilles-authorwrites testsOwns tests/** and the page repository; proves its work with the runner
achilles-reviewerfresh eyesVerifies on disk and in the running app, writes a verdict, never edits what it reviews; a new instance per review
achilles-reproducerconfirms defectsReproduces one suspected defect without reading the suite or earlier reports; returns bug, real-in-source, spec-ambiguity or not-a-bug; a new instance per defect
achilles-doc-writerdocumentsTurns reports and evidence into docs under docs/** and tests/e2e/docs/**; no code, no commits

Nesting is main session → orchestrator → expert, and stops there. Exact tool lists are in the agent files under agents/ and in docs/harness/claude-code.md.

The eight hooks (Claude Code)

One TypeScript module acting on the six Achilles agents only. It advises by default; a deny is kept for irreversible or dangerous actions and always names the action to take instead.

  1. Bash judge. Denies commit bypass flags, AI attribution in commits, PRs, issues and comments, k6 runs over the VU, duration, allowlist or production limits, git push --force, rm -rf outside the project, and credential shapes in committed files. Advises on commit grammar and protected paths, and fills in a missing playwright-cli -s=<slug>.
  2. Pipeline ledger model. Advises on phase skips, approvals without an envelope and missing deliverables; keeps an integrity hash.
  3. Sign-off, defect filing and outbound text. Denies an AI signature in a ticket, comment, page or chat message (agent framing gets a note). Advises on a tracker transition to done, or a published PR, without the reviewer's receipt and evidence bundle; denies it while the bundle holds a live credential or while a defect it reports has no reproducer's verdict. Denies a bug or rework filing made before the run searched the tracker for an existing ticket, or that cites no defect the reproducer confirmed as a bug.
  4. Dispatch discipline. Advises on brief shape, concurrency and reviewers that aren't fresh.
  5. Return review. Validates each expert's return against its schema.
  6. Spec hygiene. Denies an AI signature in a report document. Advises on test ids, import boundaries, the evidence floor for diagnosis edits, and factory rules when the project opts in.
  7. Selector development. Denies any frontend edit on a selector brief other than one added inert test attribute.
  8. Reporting. Archives run artifacts, closes each expert's browser sessions and adds a run summary to the hand-back.

The contract the module implements is docs/harness/claude-code.md.

What Achilles is not

  • Not a hosted service. No runner, no dashboard; everything runs on your machine or your CI.
  • Not native mobile. "Mobile variants" are viewport emulation in Playwright.
  • Not runtime self-healing. Repair happens in an agent session or through achilles-self-repair; a CI run never asks a model to retry a step.
  • Not enforced outside Claude Code. On pi the skills state the same rules; keeping them is the operator's job.
  • Not benchmarked yet. Detection rate, cost and duration haven't been measured and published. Onboarding dispatches many subagents and uses a large share of a plan's usage window.

Upgrading from 0.1.7 or a 0.2.0 branch install

Earlier versions copied hooks, skills and agents into .claude/. 0.1.8 copies nothing, and the old copies keep running until you remove them:

  1. With the old package still installed, run npx achilles-uninstall --project (and --global if you used -g). 0.1.x had no uninstaller; skip to step 2.
  2. Delete what's left by hand, and remove the hooks entries in .claude/settings.json that point into .claude/hooks/.
  3. Install 0.1.8, restart Claude Code, and drop ACHILLES_PROTOCOL, KERNEL_MANDATE, CIVITAS_SKIP_HOOK_INSTALL and CIVITAS_SKIP_JQ_INSTALL from shells and CI.
  4. Replace the old slash commands (/onboarding, /coverage-expansion, /test-repair, …) with /achilles <task>.

The exact file list for step 2 is in the CHANGELOG.

Contributing

See CONTRIBUTING.md for the methodology/adapter split, commit conventions (no AI attribution trailers), the doc lint and the PR checklist. npm test runs every suite: schemas, doc lint, CLIs, reporter and adapter.

License

MIT

版本与发布记录

@civitas-cerebrum/achilles 共发布 10 个版本,首次发布于 2026/05/20;过去 12 个月发布了 10 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.1.9latest2026/11/09今天
0.1.82026/11/028 天前
0.1.72026/08/122 个月前
0.1.62026/08/112 个月前
0.1.52026/08/102 个月前
0.1.42026/08/063 个月前

关于 @civitas-cerebrum/achilles 的常见问题

@civitas-cerebrum/achilles 是什么?

Autonomous quality-assurance methodology: harness-neutral agent skills and agent definitions, return-shape schemas and a Playwright reporter, with a Claude Code plugin adapter (delegate_qa, /achilles, the orchestrator and its experts).

如何安装 @civitas-cerebrum/achilles?

在项目目录运行 npm install @civitas-cerebrum/achilles,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 achilles-show、achilles-video、achilles-mutate、achilles-self-repair、achilles-scenario-lint、achilles-selector-evidence,可以用 npx achilles-show 直接运行。

@civitas-cerebrum/achilles 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/civitas-cerebrum__achilles 是否存在。

@civitas-cerebrum/achilles 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@civitas-cerebrum/achilles 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=20。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@civitas-cerebrum/achilles 可以商用吗?

@civitas-cerebrum/achilles 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@civitas-cerebrum/achilles 的下载量有多少?

根据 npm 官方下载统计,@civitas-cerebrum/achilles 在 2026/10/10 – 2026/11/08 这 30 天内被下载 2,773 次,日均约 92 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@civitas-cerebrum/achilles 还在维护吗?

最新版本 0.1.9 发布于 2026/11/09(今天);至今共发布 10 个版本,其中过去 12 个月发布了 10 个;首次发布于 2026/05/20。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。