2026-02-28 10:53:52 +00:00
# Brewcode
2026-01-27 10:38:34 +00:00
2026-06-29 19:25:28 +01:00
> Infinite task execution plugin for Claude Code -- automatic context handoff, multi-agent workflows, knowledge persistence.
2026-01-27 10:38:34 +00:00
2026-04-06 10:09:49 +01:00
| Field | Value |
|-------|-------|
2026-08-16 21:31:16 +01:00
| Version | 6.1.4 |
2026-08-08 19:11:07 +01:00
| Skills | 9 |
2026-08-08 15:52:18 +01:00
| Agents | 5 |
2026-08-15 09:26:24 +01:00
| Hooks | 4 |
2026-04-06 10:09:49 +01:00
| Model | opus |
2026-02-28 10:53:52 +00:00
2026-04-10 15:34:57 +01:00
## Install
Paste this into a Claude Code session:
```
Execute these commands in this session, one by one, show full output for each, do not skip any:
1. claude plugin marketplace add https://github.com/kochetkov-ma/claude-brewcode
2. claude plugin install brewcode@claude-brewcode
After install, run `/reload-plugins` (or `exit` + `claude`).
```
<details>
<summary>Or install the whole suite</summary>
```
Execute these commands in this Claude Code session, one by one, show full output for each, do not skip any, do not summarize:
1. claude plugin marketplace add https://github.com/kochetkov-ma/claude-brewcode
2. claude plugin install brewcode@claude-brewcode
3. claude plugin install brewdoc@claude-brewcode
4. claude plugin install brewtools@claude-brewcode
5. claude plugin install brewui@claude-brewcode
After all commands succeed, run `/reload-plugins`. If `/reload-plugins` is unavailable, tell me to type `exit` and run `claude` again. Run the commands now.
```
</details>
Update anytime with `/brewtools:plugin-update` .
2026-04-06 10:09:49 +01:00
## Overview
2026-01-27 10:38:34 +00:00
2026-06-29 20:09:24 +01:00
Brewcode turns single Claude Code sessions into an infinite task pipeline. Claude Code's native auto-compaction preserves the working context, and brewcode hooks re-inject plugin state on each session so the task runs to completion regardless of how many compaction cycles occur.
2026-06-29 19:25:28 +01:00
2026-08-08 19:11:07 +01:00
Skills cover semantic code search, multi-agent review, convention analysis, e2e orchestration, project rules, and meta-tooling for skills, agents and teams. The shipped agents are specialists only -- implementation, testing, review and architecture roles are generated per project by `/brewcode:teams-setup` .
2026-01-27 10:38:34 +00:00
2026-04-06 10:09:49 +01:00
## Installation
2026-03-05 17:52:26 +00:00
``` bash
2026-04-06 10:09:49 +01:00
# Marketplace (recommended)
2026-03-05 17:52:26 +00:00
claude plugin marketplace add https://github.com/kochetkov-ma/claude-brewcode
claude plugin install brewcode@claude-brewcode
2026-04-06 10:09:49 +01:00
# Already installed? Update
2026-03-05 17:52:26 +00:00
claude plugin marketplace update claude-brewcode
claude plugin update brewcode@claude-brewcode
2026-04-06 10:09:49 +01:00
# Dev mode (no install)
claude --plugin-dir ./brewcode
2026-03-05 17:52:26 +00:00
```
2026-01-27 10:38:34 +00:00
## Quick Start
``` bash
2026-08-08 19:11:07 +01:00
/brewcode:setup-status # What is installed in this project, and what to run next
/brewcode:superreview-setup # Generate a project-tailored deep-review skill
2026-01-27 10:38:34 +00:00
```
2026-04-06 10:09:49 +01:00
## Skills
2026-01-27 10:38:34 +00:00
2026-08-08 19:11:07 +01:00
A `-setup` suffix marks a skill that **installs a mechanism you use afterwards instead of the skill ** --
`/brewcode:superreview-setup` emits a project-local `/superreview` , `/brewcode:teams-setup` writes agents you
then delegate to. Recurring tools you invoke over and over (`agents` , `rules` , `skills` , `convention` , `e2e` )
keep bare names.
Setup skills draw their modes from one vocabulary, in this order:
```
status | install | upgrade | enable | disable | uninstall | purge
```
No arguments = `status` when the mechanism is installed, `install` when it is not. The one exception is
`/brewcode:semble-setup` , which **always ** defaults to `status` , so a bare invocation can never start a
machine-level package install.
2026-08-09 10:55:33 +01:00
Every `-setup` skill implements the full canonical set: `status | install | upgrade | enable | disable |
uninstall | purge` . Skill-specific extras come after it, never in place of it (`semble-setup` : `reindex |
optimize | resume` ; `/brewcode:teams-setup` keeps a `[name]` positional after the canonical modes).
2026-08-08 19:11:07 +01:00
2026-04-06 10:09:49 +01:00
| Skill | Purpose |
|-------|---------|
2026-08-08 19:11:07 +01:00
| [`/brewcode:setup-status` ](skills/setup-status/README.md ) | Read-only cross-plugin dashboard: which setup skills are installed, stale, partial or missing here, with the exact command to run for each. Runs no setup itself |
| [`/brewcode:superreview-setup` ](skills/superreview-setup/README.md ) | Generate a project-tailored deep-review skill: `QUICK` (default, `intent-guard` + mechanical gates) or `EXTENDED` (adds domain-expert fan-out, scope discipline, adversarial validation) depth, read from your prompt |
2026-08-27 16:44:44 +02:00
| [`/brewcode:teams-setup` ](skills/teams-setup/README.md ) | Dynamic agent team creation, management, and tracking. New teams get one review-only `intent-guard` ; upgrades preserve a legacy roster with none instead of adding it |
2026-08-27 14:52:58 +02:00
| [`/brewcode:semble-setup` ](skills/semble-setup/README.md ) | Semantic code search setup: installs the pinned semble_code MCP, shared content-variant cache, semble-first rule + hooks, agent migration |
2026-06-29 19:25:28 +01:00
| [`/brewcode:convention` ](skills/convention/README.md ) | Extract etalon classes, patterns, architecture into convention docs and rules |
2026-06-30 20:04:35 +01:00
| [`/brewcode:rules` ](skills/rules/README.md ) | Prompt-driven rules management: status, create, improve, review |
2026-08-02 14:50:35 +01:00
| [`/brewcode:skills` ](skills/skills/README.md ) | Prompt-driven skill management: status, create, improve, sync, review |
| [`/brewcode:agents` ](skills/agents/README.md ) | Prompt-driven agent management: status, create, improve, sync, review |
2026-08-08 19:11:07 +01:00
| [`/brewcode:e2e` ](skills/e2e/README.md ) | E2E testing orchestration with BDD scenarios and quorum review. `install` writes the project's rules to `.claude/e2e/e2e-rules.md` ; modes are `status \| install \| create \| update \| review \| rules` |
> **Run setups one at a time.** Each one is an interactive generator that fans out subagents and asks real
> questions; two in a session degrade each other. `/brewcode:setup-status` tells you what is missing and prints
> the command -- you run it yourself, ideally in a fresh session.
2026-06-29 19:25:28 +01:00
2026-08-08 19:11:07 +01:00
> **Note:** `/brewcode:superreview-setup` emits a self-contained, project-local deep-review skill tailored to your stack.
2026-08-08 15:03:35 +01:00
> It always makes sure the project HAS domain experts (creating the missing ones via `agent-creator`), always emits
> `.claude/agents/intent-guard.md`, then wires the emitted skill to the project's real gates, rules and scope
> baseline (task + issue + recorded decisions). The EMITTED skill then resolves depth per run from your prompt:
> `QUICK` (default) = intent-guard + mechanical gates; `EXTENDED` = the full domain-expert fan-out, scope passes
> and adversarial validation.
2026-01-27 10:38:34 +00:00
v3.4.14: brewtools plugin, teams skill, mode switcher, hook-creator v2.1.89+
brewtools (new plugin):
- text-optimize, text-human, secrets-scan skills + text-optimizer agent
- BT_PLUGIN_ROOT injection via session-start hook
brewcode:
- /brewcode:teams — dynamic agent team creation/management
- Mode Switcher system (modes/, getActiveMode(), hooks injection)
- plan: Dynamic Agent Resolution from .claude/teams/ roster
- skills: Step 2.5 mode-switcher detection
- skill-creator: Mode Switcher pattern docs
- hook-creator: v2.1.89+ (PermissionDenied event, defer, 26 events)
- removed: text-optimize, text-human, secrets-scan → brewtools
- convention P5: fallback when brewtools not installed
2026-04-02 08:22:13 +01:00
## Agents
2026-04-06 10:09:49 +01:00
| Agent | Model | Purpose |
|-------|-------|---------|
2026-08-02 14:50:35 +01:00
| [skill-creator ](agents/skill-creator.md ) | inherit | Creates and improves Claude Code skills |
| [agent-creator ](agents/agent-creator.md ) | inherit | Creates and improves Claude Code agents |
| [hook-creator ](agents/hook-creator.md ) | inherit | Creates and debugs Claude Code hooks |
| [bash-expert ](agents/bash-expert.md ) | inherit | Creates sh/bash scripts for Mac/Linux |
| bc-rules-organizer | haiku | Internal: spawned by /brewcode:rules |
2026-06-29 19:25:28 +01:00
2026-08-27 16:44:44 +02:00
> **No generic agents:** brewcode ships specialists only. Implementation, testing, review and architecture
> work goes to project-specific agents generated with `/brewcode:teams-setup install`. New teams add exactly
> one review-only `intent-guard` outside the 5-20 domain count. Existing teams without that role retain an
> explicit `intent_guard_policy=required|legacy-absent`: new teams use `required`, while upgrade preserves
> `legacy-absent` and never adds the role.
> **Generated profiles:** shared acceptance, routing, tracing, return, scope-fit and colleague rules live
> once in `team.md`. Each domain agent contains exactly six ordered sections: Mission, Owned surfaces,
> Exclusions, Must-load references, Unique invariants and Unique verification. Claude Code discovers
> `.claude/agents/*.md`; Codex uses native `.codex/agents/*.toml`, with no YAML-in-TOML guidance. Project
> Dusk deliberately remains 13 members: `task-tracker` is not a team member and
> `Intent guard: legacy-absent` means no `intent-guard` row or profile.
2026-08-02 14:50:35 +01:00
2026-04-06 10:09:49 +01:00
## Architecture
2026-01-27 10:38:34 +00:00
```
2026-04-06 10:09:49 +01:00
brewcode/
+-- .claude-plugin/plugin.json # Plugin manifest
2026-08-15 09:26:24 +01:00
+-- hooks/ # 4 lifecycle hooks
2026-06-30 20:04:35 +01:00
| +-- session-start.mjs # SessionStart: version-check, plan-symlink, permission_mode
2026-08-15 09:26:24 +01:00
| +-- role-recall.mjs # SessionStart (compact): re-inject [ROLE]/[SPLIT]/[BRANCH] after compaction
| +-- compact-recall.mjs # SessionStart (compact): re-anchor plan/intent + task graph
2026-08-02 14:50:35 +01:00
| +-- forced-eval.mjs # UserPromptSubmit: manager-role + split-discipline reminder
2026-06-30 20:04:35 +01:00
| +-- hooks.json # Event bindings
2026-08-15 09:26:24 +01:00
| +-- lib/reminder.mjs # Shared [ROLE]/[SPLIT]/[BRANCH] text (forced-eval + role-recall)
2026-06-30 20:04:35 +01:00
| +-- lib/utils.mjs # Shared utilities
2026-08-05 20:24:42 +01:00
+-- agents/ # 5 agents
2026-08-08 19:11:07 +01:00
+-- skills/ # 9 skills
2026-04-06 10:09:49 +01:00
+-- templates/ # Rule templates
2026-01-27 10:38:34 +00:00
```
2026-04-06 10:09:49 +01:00
## Hook Lifecycle
2026-01-27 10:38:34 +00:00
2026-04-06 10:09:49 +01:00
| Hook | Event | Purpose |
|------|-------|---------|
2026-06-30 20:04:35 +01:00
| session-start | SessionStart | Version-check, plan-symlink, permission_mode tag |
2026-08-15 09:26:24 +01:00
| role-recall | SessionStart (matcher `compact` ) | Re-injects the same [ROLE]/[SPLIT]/[BRANCH] reminder after auto-compaction, which has no prompt for forced-eval to fire on |
| compact-recall | SessionStart (matcher `compact` ) | Re-anchors plan/intent + task graph from this session's transcript only; ladder plan-file -> plan-missing -> plan-in-summary -> intent, appends [TASKS] when a TaskCreate is found |
2026-08-08 15:52:18 +01:00
| forced-eval | UserPromptSubmit | Manager-role + split-discipline + branch reminder, 3 lines via additionalContext (9K bound) |
2026-01-27 10:38:34 +00:00
2026-06-29 19:25:28 +01:00
## Task Structure
```
.claude/tasks/{TS}_{NAME}_task/
2026-08-08 15:52:18 +01:00
SPEC.md # Specification (research results from the project /task-spec skill)
2026-06-29 19:25:28 +01:00
```
2026-08-09 08:18:53 +01:00
## Artifact metadata
Every artifact a `-setup` skill installs into your project carries the same four fields, so you can
tell at a glance what wrote a file and which plugin version it was written at.
| Field | Values | Where |
|-------|--------|-------|
| `doc_type` | `llm` \| `user` \| `skip` -- unquoted | `.md` frontmatter only, never JSON |
| `version` | `"X.Y.Z"` -- plugin version at install time | all carriers |
| `generated_by` | `"<plugin>:<skill>"` | all carriers |
| `last_updated` | `"YYYY-MM-DD"` | all carriers except a byte-copied `.mjs` /`.sh` /`.md` |
A byte-copied asset omits `last_updated` : the value would be the release date,
identical in the plugin file and the copy, so rewriting it on every build would churn bytes and
defeat the `cmp` drift check that mechanism exists for. The four keys always sit after the file's
own keys, in that order. JSON artifacts carry the same three snake_case keys at top level (no
`doc_type` ) in every writing mode. Five carriers exist: JSON keys, `.md` frontmatter, a
`// brewcode-meta:` / `# brewcode-meta:` one-liner on line 2 of a byte-copied `.mjs` /`.sh` , a header
table in `team.md` , and `<!-- brewcode-meta: ... -->` on line 1 of a byte-copied `.md` . Versions
2026-08-10 17:43:39 +01:00
always come from `.claude-plugin/plugin.json` , never hardcoded, never `unknown` . `/brewcode:setup-status` reads these back across all eleven `-setup` skills and flags any
2026-08-09 08:18:53 +01:00
artifact running on an older version than the installed plugin.
2026-08-16 15:18:22 +01:00
## Test suites
| Suite | Checks | Covers |
|-------|--------|--------|
| `agents/tests/suite-creator-contract.mjs` | 27 | Pins what `hook-creator` , `agent-creator` and `skill-creator` teach about the Claude Code hook/subagent API |
| `hooks/tests/` | 68 | `session-start.mjs` |
| `skills/teams-setup/tests/` | 65 | `toggle-team.sh` / `verify-team.sh` |
| `skills/semble-setup/tests/` | 7 suites | core, agents, hooks, integration, project, status, telemetry |
2026-01-27 10:38:34 +00:00
## Documentation
2026-04-06 10:09:49 +01:00
Full docs: [doc-claude.brewcode.app/brewcode/overview ](https://doc-claude.brewcode.app/brewcode/overview/ )
2026-01-27 10:38:34 +00:00
2026-04-06 10:09:49 +01:00
| Resource | Link |
|----------|------|
| Skills reference | [Skills ](https://doc-claude.brewcode.app/brewcode/skills/ ) |
| Agents reference | [Agents ](https://doc-claude.brewcode.app/brewcode/agents/ ) |
| Hooks reference | [Hooks ](https://doc-claude.brewcode.app/brewcode/hooks/ ) |
2026-06-29 19:25:28 +01:00
| Workflow | [Workflow ](https://doc-claude.brewcode.app/brewcode/workflow/ ) |
2026-04-06 10:09:49 +01:00
| Release Notes | [RELEASE-NOTES.md ](../RELEASE-NOTES.md ) |
2026-01-27 10:38:34 +00:00
Author: Maksim Kochetkov | License: MIT