e2e — manage E2E tests
Caution
Before using create, update, review, rules, or status — run /brewcode:e2e setup first. The skill checks for at least 3 e2e-* agents and stops with a clear message if they are missing.
Tip
Review cycles are capped at 3 iterations (MAX_CYCLES=3). If issues remain after the third pass, the skill surfaces them to you via AskUserQuestion — you decide whether to continue or accept as-is.
Quick reference
| Field | Value |
|---|---|
| Command | /brewcode:e2e |
| Arguments | setup | create [prompt] | update [prompt] | review [prompt] | rules [prompt] | status |
| Model | opus |
| Tools | Read, Write, Edit, Glob, Grep, Bash, Task, AskUserQuestion, Skill, WebSearch, WebFetch |
When to use
| Goal | Command |
|---|---|
| First time — analyze project, create 5 agents, generate rules | /brewcode:e2e setup |
| Write 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" |
| Multi-agent quorum review of scenario/test quality | /brewcode:e2e review "focus on assertion quality" |
| Refresh E2E rules (frameworks update, new patterns) | /brewcode:e2e rules "add async messaging patterns" |
| Read-only infrastructure health check | /brewcode:e2e status |
Examples
Java / JUnit 5 — full setup and first scenario:
/brewcode:e2e setup
/brewcode:e2e create "user registration with email verification"
/brewcode:e2e review
Python / pytest — scenario then rules update:
/brewcode:e2e setup
/brewcode:e2e create "checkout flow with Stripe payments"
/brewcode:e2e rules "add async messaging patterns"
JS / Playwright — create then patch:
/brewcode:e2e setup
/brewcode:e2e create "login and dashboard navigation"
/brewcode:e2e update "add negative scenarios to auth"
Modes
| Mode | What happens |
|---|---|
setup | 3-5 Explore agents analyze the project; agent-creator spawns 5 specialized e2e agents in 2 batches; architect + WebSearch + reviewer generate rules; config saved to .claude/e2e/config.json |
create | Prerequisite check → define scope (from prompt or AskUser) → scenario-analyst writes BDD → 3-round review cycle → user approves → automation-tester writes tests → compile smoke check |
update | Locate existing artifacts → apply changes via the appropriate e2e agent → 3-round review cycle → summary with diff |
review | Split scope into parts → 3 parallel reviewers per part → quorum (2/3 consensus) → cross-agent re-check of confirmed findings → report with fix proposals |
rules | Load current rules → WebSearch + architect analysis → reviewer validates diff → optional export to .claude/rules/ |
status | Read-only: count e2e-* agents, show config (stack, framework, paths), artifact counts, freshness dates |
Flow
- Parse arguments
Script
detect-mode.shextracts MODE and optional PROMPT from$ARGUMENTS. The skill stops immediately if the script fails. - Load mode reference
Reads
references/mode-{MODE}.mdplus the sharede2e-rules.mdande2e-architecture.mdfiles. Missing reference = hard stop with a clear message. - Prerequisite check
All modes except
setupandstatusverify at least 3e2e-*agents exist in.claude/agents/. If not, the skill instructs you to runsetupfirst. - Discovery phase
3-5 Explore agents analyze the target area in parallel — source structure, existing tests, framework conventions, API contracts.
- Core work — BDD to autotest
scenario-analystproduces Gherkin scenarios;automation-testerconverts approved scenarios to framework-specific autotests;e2e-architectenforces the layered test architecture (Test Classes → Steps → Verification → Data → Support → Config). - Review cycle (max 3 rounds)
A different agent reviews every artifact against the rules. Confirmed findings (2/3 quorum in review mode) get cross-checked before fixing. After 3 rounds, unresolved issues surface to you.
- User approval + summary
AskUserQuestionat every key decision point (scope, scenario list, final diff). Output: structured report with Detection → Results → Next Steps.
Internals
Agents created by setup
| Agent | Model | Role |
|---|---|---|
e2e-architect | opus | Defines patterns, creates rules and conventions |
e2e-scenario-analyst | opus | Writes detailed 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: reviews quality, rule compliance, coverage |
Test architecture layers (stack-agnostic)
| Layer | Purpose | Example |
|---|---|---|
| Test Classes | Domain-specific, parameterized | CheckoutE2ETest extends BasePaymentE2E |
| Steps | Business-language reusable steps | givenUserIsAuthorized("admin") |
| Verification | Strict assertion steps | thenOrderStatusIs(COMPLETED) |
| Data | Test data generation via API | createTestUser(role: "buyer") |
| Support | Technical integration utilities | KafkaSupport, DatabaseSupport |
| Config | Environment settings | Credentials, endpoints, timeouts |
Quorum rules (review mode)
| Agreement | Classification |
|---|---|
| 2-3 reviewers flag same issue | Confirmed finding — fixed |
| Only 1 reviewer flags | Unconfirmed — noted, not auto-fixed |
| All 3 agree clean | Clean |
Error handling
| Condition | Action |
|---|---|
| Rules file missing | Stop — “Re-install plugin” |
| Agents missing (non-setup/status) | Stop — “Run /brewcode:e2e setup first” |
| Config missing (non-setup) | Stop — “Run /brewcode:e2e setup 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 colleague, max 2 retries |
teams skill
Companion skill for spawning and coordinating multi-agent teams — same orchestration patterns used by e2e internally.
Source on GitHub
SKILL.md, mode reference files, detect-mode.sh, and architecture reference.
brewcode overview
Full plugin overview — all 13 skills, agents, and hooks in one place.
Updating plugins
/brewtools:plugin-update to check and update the brewcode plugin suite in one command.
See the FAQ for details.