PLUGIN brewtools / Skills
On this page
Manager Setup — opt-in HARD delegation wall
sonnet hard wall project only user-invokedView README on GitHub (opens in a new tab)
Manager Setup installs a guard into your project that blocks Write, Edit and mutating Bash in the main chat, so Claude has to delegate the hands-on work to subagents. It is opt-in, per project, and off until you arm it.
Quick reference
| Field | Value |
|---|---|
| Command | /brewtools:manager-setup |
| Arguments | [prompt] [status|install|upgrade|enable|disable|uninstall|purge] [level strict|balanced] [--unattended] |
| Model | sonnet |
| Scope | Project only; the wall has no global scope |
| Default | status with no argument |
What it does
The skill installs a self-contained PreToolUse guard into the project and registers it once in the personal, gitignored .claude/settings.local.json. A state.json flag decides at run time whether the guard is armed. While armed, the main session can read, search, plan, track tasks and delegate; every edit, write and mutating command goes to a subagent. Subagents keep full freedom.
On Claude Code 2.1.233 and later, install and upgrade also set env.CLAUDE_CODE_ENABLE_TODO_TOOLS="1" in .claude/settings.local.json, so TaskCreate, TaskUpdate, TaskGet and TaskList stay available. The key is written only when no settings layer already sets it; an explicit 0, false or empty value is kept and reported as kept off. uninstall keeps the key; purge removes it only when this skill added it (todoToolsAdded in state.json).
When to use
| Situation | What to type |
|---|---|
| Enforce delegation for a whole project session | /brewtools:manager-setup install |
| Run one task under the wall, then auto-revert | refactor payment service in hard mode |
| Run a task as Manager, wall untouched | build release plan as manager |
| Check current state | /brewtools:manager-setup status |
| Pick up the guard after a plugin update | /brewtools:manager-setup upgrade |
Commands
Canonical order, shared by every -setup skill: status | install | upgrade | enable | disable | uninstall | purge, then level <strict|balanced>. No argument = status.
| Command | What it does |
|---|---|
status | Wall state, task-tools state, codewords pointer, override files. A leftover state.json alone is not an install: status recommends install, never upgrade |
install | Install the guard; asks to confirm arming unless your prompt already said “enable the hard wall”. Declining installs it disarmed |
upgrade | Re-copy the guard and off-switch CLI, backfill what an older install lacks, preserve hard/level |
enable / disable | Arm an installed wall / disarm it (state flip only, registration stays) |
uninstall | Deregister and delete the copied guard. State, overrides and the task-tools key are kept |
purge | uninstall + delete state and helpers. The only destructive action |
level <strict|balanced> | balanced = read-only Bash allowed; strict = all Bash denied |
Under --unattended, upgrade skips with nothing written when no wall is installed and never arms one; see how the flag works.
on, off and reset are not commands; as free text they route to enable, disable, purge. There is no edit command; change codeword text in the placeholders mod.
Codewords live in a mod
The codewords ++m, ++a, ++rr, ++r and +++ are provided by the brewmod-placeholders mod, not by this skill. The mod needs Claude Code 2.1.301+: run claude update, then restart Claude Code (type exit, then run claude), then claude plugin install brewmod-placeholders@claude-brewcode. The mod reads override files under .claude/brewtools/manager/prompts/; status lists them.
The wall in action
With the wall ON, Claude in the main chat cannot edit files, write, or run mutating commands. Subagents can do anything. Drop the wall with /brewtools:manager-setup disable.
You ask fix the bug in payment.ts. Claude tries Edit and is denied with an explanation and the exit command.
- Main session: delegate
Claude spawns a developer subagent with the task.
- Subagent: do the work
The subagent edits
payment.tsand runs the tests; every tool is allowed inside a subagent. - Main session: integrate
Claude reads the result and reports back without touching the file.
| In the MAIN chat (wall ON) | Allowed? |
|---|---|
| Read, search, plan, delegate (Agent) | Yes |
| Edit / Write files | No — delegate |
| Mutating commands | No — delegate (read-only Bash allowed at balanced) |
| Anything inside a subagent | Yes |
The guard is a strict binary allowlist with exec-flag vetting. It fails closed on an unparseable payload, a missing or corrupt state.json, an unknown MCP tool token and a missing guard with onFailure: "block".
Technical: how the HARD wall works #
Install-once and state gate
install copies hardmode-guard.mjs to <cwd>/.claude/brewtools/manager/hardmode-guard.mjs and registers a PreToolUse * entry in <cwd>/.claude/settings.local.json. upgrade re-copies it without duplicates and without touching the arm state. Settings are watched, so the change applies live (/hooks confirms). install also copies lib/manager-state.mjs to <cwd>/.claude/brewtools/manager/manager-state.mjs, the off-switch CLI (get / set hard=<bool> level=<strict|balanced> mcpAllow=<mcp__srv__tool[,...]|> [--cwd DIR]), at a fixed path because resolving the plugin root needs shell operators the armed wall denies.
The guard reads state.json on every call. When hard !== true it exits immediately; disable only flips state.hard=false. uninstall is two Bash calls: the bare disarm first, then the deregistration.
The registration carries onFailure: "block" (Claude Code 2.1.295+; older versions ignore it and fail open). If the registered script is missing (the .claude/brewtools/ tree deleted by hand, the project moved), every tool call fails with blocking because onFailure is "block", Read included, even with the wall disabled. Recovery is outside the session: delete the brewtools-manager-guard entry from .claude/settings.local.json; settings are watched, so it drops live. Remove the wall with disable or uninstall, never by deleting files.
agent_id linchpin
The PreToolUse payload carries agent_id / agent_type only for subagent-internal calls. The guard denies mutations only when agent_id is absent, including for a session started with claude --agent <name>. The field is undocumented: re-verify on each major Claude Code upgrade.
Tool buckets
| Bucket | Tools | Main session |
|---|---|---|
| ALWAYS-ALLOW | read: Read, Grep, Glob, LSP - delegate: Agent, Task, Skill, Workflow, ListAgents, SendMessage, SubagentHandback - worktrees: EnterWorktree, ExitWorktree - plan: EnterPlanMode, ExitPlanMode - discovery: ToolSearch, WaitForMcpServers - track: TaskCreate, TaskUpdate, TaskList, TaskGet, TodoWrite, ReportFindings - timers: CronCreate, CronList, CronDelete, ScheduleWakeup - TaskStop, ListMcpResourcesTool, ReadMcpResourceTool, AskUserQuestion | Allowed |
| ALWAYS-BLOCK | Write, Edit, NotebookEdit, WebFetch, Artifact, every unlisted tool, MCP-write tools | Denied |
| LEVEL-gated | Bash, Monitor, WebSearch, MCP-read tools | Decided by level |
strict vs balanced
| Aspect | strict | balanced (default) |
|---|---|---|
Bash, Monitor | All denied | Allowlist classifier: inspection only |
| Allowed binaries | — | ls cat pwd which head tail wc date whoami basename dirname realpath test [ jq echo grep rg find git gh node, bare names only (/bin/ls, VAR=x ls, env ls never match) |
WebSearch | OFF | ON |
| MCP-read | Only mcp__semble_code__* search tools | Read-shaped names plus the mcpAllow state key |
| MCP-write | Denied | Denied |
Any >, <, $(...) or backtick denies the whole command. env is absent on purpose: it is a universal exec wrapper.
Exec-flag vetting
An unlisted binary is denied by default. For listed binaries the guard denies a fixed set of known exec and write flags (below); it does not allowlist flags, so an unknown flag on rg, grep or find passes, and ls, cat, jq and similar accept any arguments.
| Binary | Vetted how |
|---|---|
git | status/log/diff/show/rev-parse/describe bare; remote -v; tag -l; stash list; branch bare or listing flags only. -c, --config-env, --exec-path, --upload-pack, --receive-pack, --ext-diff, -C, --output, --textconv deny on any subcommand |
gh | Positional read verbs only: list, view, status |
grep / rg | Denied on --pre, --pre-glob, --hostname-bin, --search-zip, -z |
find | Denied on -exec, -execdir, -ok, -okdir, -delete, -fprint, -fprint0, -fprintf, -fls |
node | Only node --check <file> |
The guard also denies the main session on an unparseable payload, a missing or corrupt state.json, and an internal error. Only two pass-throughs remain: the manager was never installed in this project, and a genuine subagent call.
Off-switch safety
Exactly one Bash shape survives an armed wall, at every level:
node <ABS project root>/.claude/brewtools/manager/manager-state.mjs set hard=falsedisable runs precisely that (Skill is always allowed). The command must start with node , be the only segment (no &&, ||, ;, |, &), carry no $, backtick, >, <, no evaluator flag (-e, --eval, -p, --print, --input-type, -r/--require, --import, --loader, --experimental-loader), and the script node executes, resolved with realpath, must be the helper installed in this project or the plugin’s own hooks/lib/manager-state.mjs. Appending && echo or a BT_ROOT= prelude makes the guard deny it. The remaining tokens must be the helper’s CLI. To repair a false MCP denial at balanced, quote the value: set 'mcpAllow=mcp__semble_code__*,mcp__github__get_file' (replaces the list; set 'mcpAllow=' clears it). Anything else: delegate to a subagent.
Installed the wall before v5.0.0? Run /brewtools:manager-setup upgrade once: the disarm command needs the project-local manager-state.mjs, otherwise it fails with Cannot find module. If the wall is armed, delegate the upgrade to a subagent.
Version and ownership
Writes to state.json stamp version, content_version, generated_by ("brewtools:manager-setup") and last_updated; upgrade refreshes them and preserves hard and level. setup-status reads content_version first. If the plugin version cannot be resolved, writeState deletes the version key and warns instead of aborting, so a user is never locked behind an armed wall.
Technical: scopes, state and natural-language prompts #
| Thing | Scope | Files |
|---|---|---|
Wall flags {"{"}hard, level{"}"} | Project only | <cwd>/.claude/brewtools/manager/state.json |
| Registration and guard | Project only | <cwd>/.claude/settings.local.json, hardmode-guard.mjs, manager-state.mjs in <cwd>/.claude/brewtools/manager/ |
Informational mode | Project state, then global | same state.json, else <config dir>/manager/state.json (CLAUDE_CONFIG_DIR, default ~/.claude) |
| Codeword overrides | Not managed here | prompts/<mode>.md under the project and global manager dirs: listed by status, kept by uninstall and purge |
<cwd> is CLAUDE_PROJECT_DIR, else the git top level. Defaults: hard: false, level: "balanced", mode: "full". Wall enforcement reads project state only; --scope global is ignored. The project .claude/ is a protected path, so the skill writes through bundled Node helpers via Bash.
Free text resolves to a command (Russian too; ambiguity triggers AskUserQuestion):
| Phrase | Resolves to |
|---|---|
install manager, install the wall | install |
update the guard | upgrade |
enable manager, manager on, arm wall | enable |
turn off manager, manager off, disarm wall | disable |
remove hook, uninstall | uninstall |
reset, restore defaults, remove everything | purge |
level strict, strict mode, level balanced, balanced mode | level <name> |
manager status | status |
<task> in hard mode | hard-one-shot: confirm, arm, run, auto-disarm (even on failure) |
<task> as manager | manager-run: Manager role, wall untouched; the full contract is the mod’s ++m block |
Expected status output (wall off) #
# Manager -- status
## Codewords
codewords: provided by brewmod-placeholders (Claude Code 2.1.301+) -- ++m, ++a, ++rr, ++r, +++.
Install: claude plugin install brewmod-placeholders@claude-brewcode
Overrides: <legacy override paths, one per line, or "none found">
## HARD wall (this project) -- registered=no armed=OFF level=balanced (state source: default)
State version: <none> plugin: <X.Y.Z>
## Task graph (TaskCreate/TaskUpdate/TaskGet/TaskList) -- <ON|OFF|UNKNOWN>
Exit: node <ABS project root>/.claude/brewtools/manager/manager-state.mjs set hard=false Prompt placeholders
The brewmod-placeholders mod: ++m / ++rr / ++r / ++a / +++ codewords and /placeholders.
Task Board Setup
Domain methodology, work plans and session anti-drift timers.
Setup Status
Dashboard across every -setup skill; upgrade brings the stale ones current.
Brewtools overview
Every brewtools skill and agent.
Update: /brewtools:plugin-update, /reload-plugins, then /brewcode:setup-status upgrade - FAQ