/brewcode:setup.
+ Verifies .claude/tasks/templates/SPEC.md.template exists. Missing template means /brewcode:setup has not run — the skill stops here rather than writing a spec into the wrong structure.
Verifies .claude/tasks/templates/SPEC.md.template exists. Missing template means the project structure is not initialized — the skill stops here rather than writing a spec into the wrong structure.
The skill checks for SPEC.md.template in .claude/tasks/templates/.
- If the template is missing, you need to run /brewcode:setup first.
Determines the input type: text description, path to a requirements file, or reference
- from .claude/TASK.md. Supports the -n (--noask) flag for autonomous mode.
3-5 questions via AskUserQuestion across categories: Scope (what's in/out),
- Constraints (libraries, compatibility), Edge cases (concurrency, null inputs).
- Skipped in -n mode.
If requirements cover more than 3 independent areas or are estimated at 12+ phases -- - a split is suggested. If accepted, only the first part gets a SPEC.
-5-10 agents are launched in a single message (in parallel). - Each agent analyzes its area: Controllers, Services, DB/Repos, Tests, Config, Docs.
-Task(subagent_type="developer", prompt="Analyze services...")
Task(subagent_type="tester", prompt="Analyze test patterns...")
Task(subagent_type="reviewer", prompt="Analyze quality...")
Task(subagent_type="Explore", prompt="Find library docs...")
- Agent results are merged with deduplication. A task directory
- .claude/tasks/{TS}_{NAME}_task/ and SPEC.md file are created from the template.
Reviewer checks: completeness, consistency, feasibility, risks. - Fix loop: continues while critical/major issues exist (max 3 iterations).
-The manager writes the agent report to artifacts/{P}-{N}{T}/{AGENT}_output.md
The coordinator reads the report from disk, extracts 3-10 knowledge entries into KNOWLEDGE.jsonl, - and updates the Phase Status table.
-The pre-compact.mjs hook detects the approaching limit.
Deduplication, stale entry removal, trimming to maxEntries.
-A special entry in KNOWLEDGE.jsonl captures the current state: which phase was executing, - what was done, what remains.
-Task status is set to handoff.
Auto-compact summarizes the context. Session ID does not change.
-The /brewcode:start skill calls TaskList(),
- reads PLAN.md, and continues from the current phase. The lock file remains valid.
CLAUDE_AUTOCOMPACT_PCT_OVERRIDE variable can only shift the trigger threshold
- earlier (values below 93%), but cannot increase the buffer.
-.claude/convention/
- and help future tasks follow established conventions.
-Inside a Claude Code session, run:
-/brewcode:setup
- Setup automatically checks and installs prerequisites (brew, jq, coreutils) as Phase 0 before analyzing your project. Optionally installs ollama and grepai for semantic search.
+/brewcode:spec
+ Spec runs parallel codebase research and a refinement loop to produce a SPEC.md. For semantic search, run /brewcode:grepai setup, which checks/installs prerequisites (brew, ollama, grepai CLI) and self-installs its hooks.
Open Claude Code in your project root and run:
-/brewcode:setup
- What happens: the skill analyzes your project structure, tech stack, - test frameworks, and existing agents. It generates tailored templates based on the analysis.
-Result:
-.claude/tasks/templates/PLAN.md.template -- plan template.claude/tasks/templates/SPEC.md.template -- specification template.claude/tasks/cfg/brewcode.config.json -- configuration.claude/skills/brewcode-review/ -- tailored code review skillThis step runs once per project.
+ Install brewcodeAdd the plugin from the marketplace and install it into your Claude Code session:
+claude plugin marketplace add https://github.com/kochetkov-ma/claude-brewcode
+claude plugin install brewcode@claude-brewcode
+ This step runs once per machine. Reload with /reload-plugins if already inside a session.
Describe the task in plain text or point to a requirements file:
/brewcode:spec "Implement JWT authorization with role-based access"
Or from a file:
/brewcode:spec ./docs/requirements/auth.md
- What happens: the plugin launches 5-10 research agents in parallel.
- The agents analyze the codebase, find related code, dependencies, and patterns.
- Then it asks clarifying questions (use the -n flag for autonomous mode without questions).
Result: a SPEC.md file -- a structured specification with project context.
What happens: the skill launches 5-10 research agents in parallel.
+ They analyze the codebase, locate related code, dependencies, and patterns,
+ then ask clarifying questions (use the -n flag for autonomous mode without questions).
Result: a SPEC.md file — a structured specification with full project context.
/brewcode:plan
- What happens: a phased execution plan is generated from SPEC.md. - Each phase contains specific steps, expected artifacts, and completion criteria.
-Result: a PLAN.md file -- a plan with phases, ready for execution.
/brewcode:grepai setup
+ What happens: checks and installs Ollama and the CLI if missing, builds a vector
+ index of your codebase using the bge-m3 embedding model, and self-installs grepai hooks
+ into the project.
Result: all subsequent Claude Code sessions can query the project semantically — + faster and more precise context retrieval for every agent working on the spec.
/brewcode:start
- What happens: Brewcode begins executing the plan phase by phase. - Agents work on the task, recording knowledge in KNOWLEDGE.jsonl. - When context reaches ~90%, the PreCompact hook fires: - knowledge is compressed, handoff state is written, and the session continues automatically.
-Result: the task runs to completion regardless of how many compaction cycles occur.
- All artifacts are saved in `.claude/tasks/
/brewcode:superreview
+ What happens: analyzes your codebase and conventions, then generates a
+ project-tailored quorum review skill that merges code review and standards checking
+ into one reusable skill installed locally at .claude/skills/.
Result: a custom review skill ready to invoke any time you need a deep, + project-aware code review.
+/brewcode:teams
+ Generates 5-20 project-specific agents with self-selection logic and performance tracking. + Skip this step if the default agent set is sufficient for your project.