PLUGIN brewcode / Skills
On this page
e2e — manage E2E tests
Installs five project-tuned e2e-* agents, then writes BDD scenarios and autotests with a review cycle. A 3-reviewer quorum checks the result.
Run /brewcode:e2e install before create, update, review or rules. With fewer than 3 e2e-* agents the skill stops and says “Run /brewcode:e2e install first.”; status never stops and reports the gap instead.
Quick reference
| Field | Value |
|---|---|
| Command | /brewcode:e2e |
| Arguments | [prompt] [status|install|create|update|review|rules] — one free-form EN/RU prompt; the mode word may sit anywhere in it |
| No-arg default | status when 3 or more e2e-* agents exist, install otherwise |
| Rejected verbs | uninstall, purge, upgrade, enable, disable — exit 1, no fallback to install |
| Model | opus |
| Project rules file | .claude/e2e/e2e-rules.md (= config.rulesPath) |
When to use
| Goal | Command |
|---|---|
| First time: analyze project, create 5 agents, generate rules | /brewcode:e2e install |
| BDD scenarios + autotests for a new feature | /brewcode:e2e create "checkout flow with Stripe" |
| Sync existing scenarios after code changes | /brewcode:e2e update "add negative auth scenarios" |
| Quorum review of scenario and test quality | /brewcode:e2e review "focus on assertion quality" |
| Refresh E2E rules (framework update, new patterns) | /brewcode:e2e rules "add async messaging patterns" |
| Read-only infrastructure health check | /brewcode:e2e status |
Example
/brewcode:e2e install
/brewcode:e2e create "user registration with email verification"
/brewcode:e2e review
install writes the agents, .claude/e2e/e2e-rules.md and .claude/e2e/config.json. create asks you to approve the scenario list, writes the tests and ends with a report: Detection, Results, Next Steps.
Modes
| Mode | What happens |
|---|---|
install | Explore agents analyze the project; agent-creator spawns 5 e2e agents in 2 batches; e2e-architect + WebSearch + e2e-reviewer generate rules |
create | Define scope, scenario-analyst writes BDD, 3-round review, you approve, automation-tester writes tests, compile smoke check |
update | Locate artifacts, apply changes via the matching e2e agent, 3-round review, summary with diff |
review | Split scope, 3 parallel reviewers per part, 2/3 quorum, cross-agent re-check, report with fix proposals |
rules | Load .claude/e2e/e2e-rules.md, WebSearch + architect analysis, reviewer validates the diff, rewrite the same file |
status | Read-only: agent count, config, artifact counts, freshness against the running skill’s CONTENT_VERSION |
Those six are the entire mode set. To remove the setup, delete .claude/agents/e2e-*.md and .claude/e2e/ by hand.
Flow
- Parse arguments
The prompt goes to
detect-mode.sh -on stdin; an explicit mode word wins, else EN/RU keywords decide. APLANblock is printed first. An unsupported verb printsERROR:and stops. - Load references
Reads
references/mode-{MODE}.mdplus the baselinee2e-rules.mdande2e-architecture.md. A missing reference is a hard stop. - Check prerequisites
Every mode except
installandstatusneeds at least 3e2e-*agents in.claude/agents/. - Discover and build
3-5 Explore agents map the target area;
scenario-analystwrites Gherkin,automation-testerconverts approved scenarios to autotests. - Review, max 3 rounds
A different agent reviews every artifact. After the third round, unresolved issues go to you through
AskUserQuestion.
Delegation
Each fan-out is one subagent per bounded unit (one feature’s tests or one review part), all spawned in one message with the six-field brief. Full table: Delegation.
Rules live in your repo #
install step S6 merges the plugin’s base rules with the [WEB] and [PROJECT] findings accepted in S5 and writes .claude/e2e/e2e-rules.md. config.rulesPath points there, every generated e2e-* agent loads it before doing anything, and rules mode rewrites the same file. Nothing is written back into the plugin.
A generated .claude/agents/e2e-*.md is not plugin-owned, so ${CLAUDE_PLUGIN_ROOT} is not substituted inside it, and an absolute cache path embeds the plugin version and dies at the next update. A repo-relative file survives updates, uninstall, clone and CI. Agents and rules mode stop if it is missing and never fall back to the plugin copy.
Technical details #
Mode detection. Keywords scored by detect-mode.sh: set up, add tests, sync tests, status, create, update, review, rules. A tie resolves to status, or between two mutating modes to the keyword that comes first. Rejected verbs print ERROR:e2e has no <verb> mode and exit 1.
Tools. Read, Write, Edit, Glob, Grep, Bash, Agent, AskUserQuestion, Skill, WebSearch, WebFetch. After each install batch you may opt in to a brewtools:text-optimize pass (medium --allow-dirty); it is skipped and reported when brewtools is unavailable. rules mode can export a condensed copy to .claude/rules/e2e-conventions.md.
Agents created by install
| Agent | Model | Role |
|---|---|---|
e2e-architect | opus | Defines patterns, creates rules and conventions |
e2e-scenario-analyst | opus | Writes BDD scenarios from system analysis |
e2e-automation-tester | opus | Converts approved scenarios to autotests |
e2e-manual-tester | sonnet | Verifies system via UI/API, finds exploratory bugs |
e2e-reviewer | opus | READ-ONLY: quality, rule compliance, coverage |
Each agent opens with a Rules Loading Protocol (read .claude/e2e/e2e-rules.md, stop if absent) and an Etalon-first line: find the closest well-built existing test in the repo and take its principles. Agents, config.json and e2e-rules.md carry a metadata stamp (doc_type, version, content_version, generated_by, last_updated); status compares content_version for staleness.
Test architecture layers: Test Classes, Steps, Verification, Data, Support, Config.
Quorum (review mode): 2-3 reviewers flag the same issue = confirmed and fixed; 1 reviewer = unconfirmed, noted, not auto-fixed; all 3 clean = clean.
Error handling
| Condition | Action |
|---|---|
| Unsupported verb | detect-mode.sh exits 1; the ERROR: line is reported verbatim |
| Rules file, agents or config missing | Stop: “Run /brewcode:e2e install first” |
| Review cycle limit (3) reached | AskUserQuestion with remaining issues |
| Compilation fails after fix | Report to user, suggest manual intervention |
| Agent refuses task | Re-assign to a colleague, max 2 retries |
teams-setup skill
Companion skill for spawning and coordinating multi-agent teams.
GitHub source
SKILL.md, mode references, detect-mode.sh, architecture reference.
brewcode overview
All 9 skills, agents and hooks in one place.
Update: /brewtools:plugin-update, /reload-plugins, then /brewcode:setup-status upgrade - FAQ