PLUGIN brewcode / Skills

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

FieldValue
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 defaultstatus when 3 or more e2e-* agents exist, install otherwise
Rejected verbsuninstall, purge, upgrade, enable, disable — exit 1, no fallback to install
Modelopus
Project rules file.claude/e2e/e2e-rules.md (= config.rulesPath)

When to use

GoalCommand
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

ModeWhat happens
installExplore agents analyze the project; agent-creator spawns 5 e2e agents in 2 batches; e2e-architect + WebSearch + e2e-reviewer generate rules
createDefine scope, scenario-analyst writes BDD, 3-round review, you approve, automation-tester writes tests, compile smoke check
updateLocate artifacts, apply changes via the matching e2e agent, 3-round review, summary with diff
reviewSplit scope, 3 parallel reviewers per part, 2/3 quorum, cross-agent re-check, report with fix proposals
rulesLoad .claude/e2e/e2e-rules.md, WebSearch + architect analysis, reviewer validates the diff, rewrite the same file
statusRead-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

  1. Parse arguments

    The prompt goes to detect-mode.sh - on stdin; an explicit mode word wins, else EN/RU keywords decide. A PLAN block is printed first. An unsupported verb prints ERROR: and stops.

  2. Load references

    Reads references/mode-{MODE}.md plus the baseline e2e-rules.md and e2e-architecture.md. A missing reference is a hard stop.

  3. Check prerequisites

    Every mode except install and status needs at least 3 e2e-* agents in .claude/agents/.

  4. Discover and build

    3-5 Explore agents map the target area; scenario-analyst writes Gherkin, automation-tester converts approved scenarios to autotests.

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

AgentModelRole
e2e-architectopusDefines patterns, creates rules and conventions
e2e-scenario-analystopusWrites 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: 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

ConditionAction
Unsupported verbdetect-mode.sh exits 1; the ERROR: line is reported verbatim
Rules file, agents or config missingStop: “Run /brewcode:e2e install first”
Review cycle limit (3) reachedAskUserQuestion with remaining issues
Compilation fails after fixReport to user, suggest manual intervention
Agent refuses taskRe-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