Brewcode Overview

Install prompt

If Claude refuses to run the commands, paste the prompt below directly into the chat.
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

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.

Install the entire suite:

Install prompt

If Claude refuses to run the commands, paste the prompt below directly into the chat.
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.

Brewcode is a plugin for Claude Code that turns single sessions into an infinite task pipeline with automatic context handoff between sessions. The name is a nod to brewing: skills (recipes) define what to brew, agents (brewers) do the work, and hooks (processes) manage the lifecycle.

Key Features

♾️

Infinite context

Automatic knowledge transfer between sessions via KNOWLEDGE.jsonl and the handoff mechanism. Tasks continue after compaction without losing progress.

πŸ“Ÿ

13 skills (recipes)

Full cycle: from project analysis (/brewcode:setup) to task execution (/brewcode:start) and code review (/brewcode:standards-review).

πŸ‘₯

12+ agents (brewers)

Specialized agents: developer, tester, reviewer, architect, skill-creator, agent-creator, and coordinators.

βš™οΈ

8 hooks (processes)

Lifecycle hooks for context management: knowledge injection, grepai integration, exit blocking when a task is still active.

πŸ”

Semantic search

Integration with grepai β€” AI-powered code search via Ollama + bge-m3. Auto-start, reminders, configurator.

πŸ›‘οΈ

Code quality

Standards-review, convention analysis. Rules are automatically synced to .claude/rules/.

πŸ‘₯

Dynamic teams

Create project-specific agent teams (5-20) with self-selection, performance tracking, and automatic tuning.

Architecture

Brewcode works as a layer on top of Claude Code through the hook system. The plugin has no external runtime β€” all context is managed through built-in Claude Code events.

                         Brewcode Plugin
  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
  β”‚                                                          β”‚
  β”‚   Skills (recipes)            Agents (brewers)           β”‚
  β”‚   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”         β”‚
  β”‚   β”‚ setup, spec  β”‚          β”‚ developer, tester β”‚         β”‚
  β”‚   β”‚ plan, start  β”‚ ──────>  β”‚ reviewer, architectβ”‚         β”‚
  β”‚   β”‚ convention,. β”‚          β”‚ + dynamic teams   β”‚         β”‚
  β”‚   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜         β”‚
  β”‚          β”‚                          β”‚                     β”‚
  β”‚          v                          v                     β”‚
  β”‚   Hooks (processes)           Templates + Knowledge      β”‚
  β”‚   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”         β”‚
  β”‚   β”‚ session-startβ”‚          β”‚ PLAN.md.template  β”‚         β”‚
  β”‚   β”‚ pre-task     β”‚ <──────> β”‚ KNOWLEDGE.jsonl   β”‚         β”‚
  β”‚   β”‚ pre-compact  β”‚          β”‚ SPEC.md.template  β”‚         β”‚
  β”‚   β”‚ stop         β”‚          β”‚ artifacts/        β”‚         β”‚
  β”‚   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜         β”‚
  β”‚                                                          β”‚
  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Task execution flow

PLAN.md --> phases (phases/) --> agents execute --> hooks manage
   β”‚                               β”‚                     β”‚
   β”‚  Phase Registry               β”‚  Task API           β”‚  SessionStart
   β”‚  (phase table)                β”‚  (create/update)    β”‚  PreToolUse
   β”‚                               β”‚                     β”‚  PostToolUse
   v                               v                     β”‚  PreCompact
artifacts/{P}-{N}{T}/          KNOWLEDGE.jsonl            β”‚  Stop
{AGENT}_output.md              (knowledge accumulation)   v
                                                    handoff (auto)

Plugin structure

brewcode/
β”œβ”€β”€ .claude-plugin/
β”‚   └── plugin.json                    # Plugin manifest
β”œβ”€β”€ hooks/
β”‚   β”œβ”€β”€ hooks.json                     # Binding 8 hooks to events
β”‚   β”œβ”€β”€ session-start.mjs              # Session initialization
β”‚   β”œβ”€β”€ grepai-session.mjs             # Auto-start grepai watch
β”‚   β”œβ”€β”€ pre-task.mjs                   # Knowledge injection into agents
β”‚   β”œβ”€β”€ grepai-reminder.mjs            # grepai reminder
β”‚   β”œβ”€β”€ post-task.mjs                  # Session binding, 2-step protocol
β”‚   β”œβ”€β”€ pre-compact.mjs               # Knowledge compaction, handoff
β”‚   β”œβ”€β”€ stop.mjs                       # Exit blocking
β”‚   β”œβ”€β”€ forced-eval.mjs                # Skill activation (84%)
β”‚   └── lib/
β”‚       β”œβ”€β”€ utils.mjs                  # I/O, lock files, configuration
β”‚       └── knowledge.mjs             # KNOWLEDGE.jsonl operations
β”œβ”€β”€ agents/                            # 12 agents
β”‚   β”œβ”€β”€ developer.md                   # Feature implementation (opus)
β”‚   β”œβ”€β”€ tester.md                      # Testing (sonnet)
β”‚   β”œβ”€β”€ reviewer.md                    # Code review (opus)
β”‚   β”œβ”€β”€ architect.md                   # Architecture (opus)
β”‚   β”œβ”€β”€ skill-creator.md               # Skill creation (opus)
β”‚   β”œβ”€β”€ agent-creator.md               # Agent creation (opus)
β”‚   β”œβ”€β”€ hook-creator.md                # Hook creation (opus)
β”‚   β”œβ”€β”€ bash-expert.md                 # Bash scripts (opus)
β”‚   β”œβ”€β”€ bc-coordinator.md              # Task coordinator (haiku)
β”‚   β”œβ”€β”€ bc-knowledge-manager.md        # Knowledge manager (haiku)
β”‚   β”œβ”€β”€ bc-grepai-configurator.md      # grepai configurator (opus)
β”‚   └── bc-rules-organizer.md          # Rules organizer (sonnet)
β”œβ”€β”€ skills/                            # 13 skills
β”‚   β”œβ”€β”€ setup/                         # Project analysis, templates
β”‚   β”œβ”€β”€ spec/                          # Specification creation
β”‚   β”œβ”€β”€ plan/                          # Plan creation
β”‚   β”œβ”€β”€ start/                         # Task execution
β”‚   β”œβ”€β”€ convention/                    # Convention analysis
β”‚   β”œβ”€β”€ rules/                         # Rule extraction
β”‚   β”œβ”€β”€ grepai/                        # Semantic search
β”‚   β”œβ”€β”€ teardown/                      # Cleanup
β”‚   β”œβ”€β”€ standards-review/              # Standards review
β”‚   β”œβ”€β”€ skills/                        # Skill management
β”‚   β”œβ”€β”€ agents/                        # Agent management
β”‚   β”œβ”€β”€ teams/                         # Dynamic agent teams
β”‚   └── e2e/                           # E2E testing orchestration
└── templates/                         # Rule templates

Target project structure

After running /brewcode:setup and /brewcode:start, the following appears in your project:

{PROJECT}/
└── .claude/
    └── tasks/
        β”œβ”€β”€ cfg/
        β”‚   β”œβ”€β”€ brewcode.config.json    # Plugin configuration
        β”‚   └── brewcode.state.json     # Execution state
        β”œβ”€β”€ templates/                  # Adapted templates
        β”‚   β”œβ”€β”€ PLAN.md.template
        β”‚   β”œβ”€β”€ SPEC.md.template
        β”‚   └── phase*.template
        β”œβ”€β”€ logs/
        β”‚   └── brewcode.log            # Hook log
        β”œβ”€β”€ sessions/
        β”‚   └── {session_id}.info       # Session information
        └── {TS}_{NAME}_task/           # Task directory
            β”œβ”€β”€ PLAN.md                 # Execution plan
            β”œβ”€β”€ SPEC.md                 # Specification
            β”œβ”€β”€ KNOWLEDGE.jsonl         # Accumulated knowledge
            β”œβ”€β”€ phases/                 # Phase files
            β”‚   β”œβ”€β”€ 1-create-entity.md
            β”‚   β”œβ”€β”€ 1V-verify-entity.md
            β”‚   └── FR-final-review.md
            β”œβ”€β”€ artifacts/              # Agent reports
            β”‚   β”œβ”€β”€ FINAL.md
            β”‚   └── {P}-{N}{T}/
            β”œβ”€β”€ backup/                 # Backups
            └── .lock                   # Session lock file

Components in detail

13 skills (recipes) cover the full task lifecycle. See Skills for details.

GroupSkillsPurpose
Core cyclesetup, spec, plan, startTask creation and execution
Qualitystandards-review, convention, rulesCode analysis and review
DynamicteamsAgent team creation and management
Testinge2eE2E testing orchestration with BDD scenarios
Utilitiesgrepai, teardown, skills, agentsTools and configuration

12+ agents (brewers) with different models and specializations. See the Agents section for details.

RoleAgentsModel
Implementationdeveloper, tester, architectopus/sonnet
Reviewrevieweropus
Creationskill-creator, agent-creator, hook-creatoropus
Optimizationbash-expertopus
Coordinationbc-coordinator, bc-knowledge-manager, bc-grepai-configurator, bc-rules-organizerhaiku/sonnet/opus

8 hooks (processes) manage the lifecycle through Claude Code events. See the Hooks section for details.

EventHooksPurpose
UserPromptSubmitforced-evalSkill activation
SessionStartsession-start, grepai-sessionInitialization
PreToolUsepre-task, grepai-reminderContext injection
PostToolUsepost-taskSession binding
PreCompactpre-compactKnowledge handoff
StopstopExit blocking
  1. Project setup/brewcode:setup

    Install prerequisites (Phase 0), analyze the project and generate adapted templates.

  2. Specification/brewcode:spec

    Parallel codebase research, SPEC.md creation.

  3. Plan/brewcode:plan

    Phase generation, quorum review, requirements tracing.

  4. Execution/brewcode:start

    Launch the task with infinite context and automatic handoff.

  5. Team Creation (optional)/brewcode:teams

    Create a project-specific agent team with trace system. Agents auto-integrate with spec/plan/start.

Next steps

Check Skills for detailed descriptions of all 13 skills, or go to Workflow for a deep dive into the full task execution cycle.

πŸš€

Latest Release

Download, changelog, and installation instructions.

πŸ“–

Installation Guide

Full setup, update, and troubleshooting instructions.

πŸ”—

View on GitHub

Source code, README, and configuration files.