/brewcode:start skill reads agent assignments from the phase table
+ and launches the corresponding agents via Task API.
+handoff means "re-read TASK.md", not "new session".
+/brewcode:start for finalization
+ or set the task status to finished/failed/cancelled.
+Install dependencies: brew, coreutils, jq, optionally grepai.
+Analyze the project and generate adapted templates.
+Parallel codebase research, SPEC.md creation.
+Phase generation, quorum review, requirements tracing.
+Launch the task with infinite context and automatic handoff.
+text-optimize, text-human, standards-review,
+ secrets-scan, skills, and agents can be used
+ independently of the core cycle -- they require no prior setup.
+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.
+/brewcode:convention to extract reference classes and patterns
+ from the written code. Results go into .claude/convention/
+ and help future tasks follow established conventions.
+
+ The discover.sh script finds all markdown files in the scope
+ and determines their type: skill, agent, rule, config, or doc.
+ Files without frontmatter tags are added automatically.
+
+ The index-ops.sh stale script identifies stale entries based on the configured interval
+ (INTERVAL_DAYS from config). New and stale files enter the processing queue.
+
+ For each file in the queue, a bd-auto-sync-processor agent (sonnet model) is launched.
+ Agents run in parallel (up to PARALLEL_AGENTS concurrently).
+ Each agent analyzes the code, compares it with the current document content, and applies changes.
+
+ Updated files receive a new date in the INDEX. Failed files remain stale for a retry. + A summary report is generated: discovered, queued, updated, unchanged, errors. +
++ The script determines whether pip packages and system dependencies for the target engine are installed. +
++ If dependencies are missing, you are offered to install the current engine, + switch to an alternative (if available), or cancel. +
+
+ With user consent, the check_deps.sh install script installs
+ all required packages. If installation fails, conversion is aborted.
+
+ The Explore agent cross-references all memory files against CLAUDE.md and .claude/rules/*.md.
+ It finds entries that already exist in rules or conflict with CLAUDE.md (CLAUDE.md takes priority).
+ It shows a duplicates table and asks for confirmation: "Remove all", "Review each", or "Skip".
+
+ Remaining entries are classified by target location.
+ Global rules are moved to ~/.claude/rules/,
+ project rules to .claude/rules/,
+ architectural decisions to the project CLAUDE.md.
+ Facts and patterns useful across sessions stay in memory.
+
+ Remaining entries are compressed for token savings: prose is converted to table rows, + related entries are merged, verbose descriptions are replaced with imperative one-liners, + example lists are reduced to a pattern plus one example. A preview with estimated savings is shown. +
+
+ The reviewer agent checks the final state: broken file references,
+ conflicts with CLAUDE.md, invalid markdown. Broken references are fixed automatically.
+ Orphaned memory files (not referenced from MEMORY.md) are detected and proposed for deletion.
+
Run the commands from the section above. Restart Claude Code after installation.
+In your terminal, run:
+claude plugin list
+ You should see brewcode and brewdoc in the list.
Inside a Claude Code session, run:
+/brewcode:install
+ This skill checks for and installs brew, jq, and coreutils. Optionally installs ollama and grepai for semantic search.
+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.
+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.
/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: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/