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

FieldValue
Command/brewcode:e2e
Argumentssetup | create [prompt] | update [prompt] | review [prompt] | rules [prompt] | status
Modelopus
ToolsRead, Write, Edit, Glob, Grep, Bash, Task, AskUserQuestion, Skill, WebSearch, WebFetch

When to use

GoalCommand
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

ModeWhat happens
setup3-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
createPrerequisite check → define scope (from prompt or AskUser) → scenario-analyst writes BDD → 3-round review cycle → user approves → automation-tester writes tests → compile smoke check
updateLocate existing artifacts → apply changes via the appropriate e2e agent → 3-round review cycle → summary with diff
reviewSplit scope into parts → 3 parallel reviewers per part → quorum (2/3 consensus) → cross-agent re-check of confirmed findings → report with fix proposals
rulesLoad current rules → WebSearch + architect analysis → reviewer validates diff → optional export to .claude/rules/
statusRead-only: count e2e-* agents, show config (stack, framework, paths), artifact counts, freshness dates

Flow

  1. Parse arguments

    Script detect-mode.sh extracts MODE and optional PROMPT from $ARGUMENTS. The skill stops immediately if the script fails.

  2. Load mode reference

    Reads references/mode-{MODE}.md plus the shared e2e-rules.md and e2e-architecture.md files. Missing reference = hard stop with a clear message.

  3. Prerequisite check

    All modes except setup and status verify at least 3 e2e-* agents exist in .claude/agents/. If not, the skill instructs you to run setup first.

  4. Discovery phase

    3-5 Explore agents analyze the target area in parallel — source structure, existing tests, framework conventions, API contracts.

  5. Core work — BDD to autotest

    scenario-analyst produces Gherkin scenarios; automation-tester converts approved scenarios to framework-specific autotests; e2e-architect enforces the layered test architecture (Test Classes → Steps → Verification → Data → Support → Config).

  6. 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.

  7. User approval + summary

    AskUserQuestion at every key decision point (scope, scenario list, final diff). Output: structured report with Detection → Results → Next Steps.

Internals

Agents created by setup

AgentModelRole
e2e-architectopusDefines patterns, creates rules and conventions
e2e-scenario-analystopusWrites detailed BDD scenarios from system analysis
e2e-automation-testeropusConverts approved scenarios to autotests
e2e-manual-testersonnetVerifies system via UI/API, finds exploratory bugs
e2e-revieweropusREAD-ONLY: reviews quality, rule compliance, coverage

Test architecture layers (stack-agnostic)

LayerPurposeExample
Test ClassesDomain-specific, parameterizedCheckoutE2ETest extends BasePaymentE2E
StepsBusiness-language reusable stepsgivenUserIsAuthorized("admin")
VerificationStrict assertion stepsthenOrderStatusIs(COMPLETED)
DataTest data generation via APIcreateTestUser(role: "buyer")
SupportTechnical integration utilitiesKafkaSupport, DatabaseSupport
ConfigEnvironment settingsCredentials, endpoints, timeouts

Quorum rules (review mode)

AgreementClassification
2-3 reviewers flag same issueConfirmed finding — fixed
Only 1 reviewer flagsUnconfirmed — noted, not auto-fixed
All 3 agree cleanClean

Error handling

ConditionAction
Rules file missingStop — “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) reachedAskUserQuestion with remaining issues
Compilation fails after fixReport to user, suggest manual intervention
Agent refuses taskRe-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

Use /brewtools:plugin-update to check and update the brewcode plugin suite in one command. See the FAQ for details.