Prompt Injection

UserPromptSubmit 5 codewords · 6 prompt modes

Type a standalone codeword to add its operating instructions for that turn. The plugin’s manager-prompt.mjs hook returns additionalContext; your original prompt, including the codeword, remains unchanged. The optional manager hard wall is installed separately.

Typed placeholders with a preview

The brewmod-placeholders mod (Claude Code 2.1.292+) provides the same codewords as typed placeholders, with highlight, typeahead and a preview band above the prompt. The injected text is byte-identical. With both installed, each block is injected once, and brewtools works alone too. See Prompt placeholders.

Quick reference

TriggerSelected prompt modeBehavior
++mfull, or planmode in verified Plan modeDelegate bounded work, track dependencies, integrate evidence; add task-graph planning in Plan mode
++aarchitectDesign against existing architecture, conventions, and reusable patterns
++rrreview-regressionRegression-focused review and double-check
++rreview-doubleReview and independent double-check; skipped when ++rr is also present
+++cron-plan, only in verified Plan modePlan task-specific session anti-drift scheduling for execution

Alphabetic codewords are case-insensitive. Manager, architecture, and review are independent groups; ++rr wins over ++r. A standalone +++ is independent of ++m and requires the hook payload’s permission_mode to equal plan. Embedded words and longer plus sequences do not activate the tokens.

When combined, blocks are emitted in this order: cron planning, manager, architecture, then the selected review contract. The hook is codeword-only: an armed hard wall injects no prompt block; its deny messages explain themselves.

Example

++m ++a fix the login flow

The model receives Manager and architecture context alongside the original message. Manager instructions require bounded delegated units, owners and real dependencies, evidence review, and a final simplification task after all implementation is written. Architecture instructions require following existing project patterns and the closest well-built counterpart.

How it works

  1. Detect tokens and permission mode

    The hook runs on UserPromptSubmit. It finds standalone codewords and selects plan-aware Manager or Plan-only cron instructions using the permission-mode payload.

  2. Resolve each prompt block

    Project override, global override, then plugin default: the first available source wins independently for each of the six modes.

  3. Return additional context

    The hook emits selected text through additionalContext without rewriting your message. Combined blocks are bounded to 9,000 characters, with a truncation marker if needed. An error returns an empty hook result.

  4. Return nothing without a codeword

    With no active codeword the hook returns an empty result, whether or not the hard wall is armed. Prompts that start with a subagent delivery tag (task-notification, or agent-message from=) are skipped.

Plan-only anti-drift instructions

While already in Plan mode, type:

+++ plan the migration and task tracking

This works without ++m and without installing the hard wall. It requires a read-only plan to include task methodology, base work units and graph reconciliation, a complete unique task-specific tick prompt, and a future execution step through task-board.

During authorized execution, the main session’s task-board flow reconciles one session timer per active top-level task, hourly by default or at your requested cadence. Child work units use their parent’s timer. Planning itself writes no files and creates or deletes no timers.

The planned tick rereads the goal, shared/task methodology, anti-drift instructions, task/spec records, and user corrections. It collects concise active-agent evidence, reconciles statuses, dependencies, counts, and remaining work, and rebuilds the graph. Retain every unfinished node and the latest ten completed nodes; preserve older completion evidence in task records before pruning graph rows. Check drift against acceptance evidence, correct deviations within scope, and advance the next authorized unblocked step.

The report uses at most five short lines: local time/timezone, delivered tick number and elapsed time; 🟢 achievements; 🔵 remaining work and next action; 🔴 present problems, blockers, or questions; ⚪ drift verdict. Omit empty rows; keep full evidence in task records.

Task-board records the prompt, scheduling state, and stop rule and verifies stopping on completion or cancellation. Missing tools are reported as a scheduling gap. Timers belong to the session; due time does not guarantee exact receipt or delivery after session closure. Outside verified Plan mode, +++ adds no cron instruction; other codewords still add their own context.

Planning instructions do not create a timer

The codeword adds a requirement to the execution plan. Actual creation, reconciliation, and verified cleanup belong to the main session’s task-board flow.

Prompt sources and customization

PrioritySource
Project.claude/brewtools/manager/prompts/<mode>.md
Global<config dir>/manager/prompts/<mode>.md (CLAUDE_CONFIG_DIR, default ~/.claude)
Pluginskills/manager-setup/references/<mode>.md

The resolver supports full, planmode, cron-plan, architect, review-double, and review-regression. Fenced prompt blocks are extracted in order; an unfenced file uses its complete trimmed text. Overrides live outside the plugin cache and can therefore retain older wording after an update.

Use /brewtools:manager-setup status to inspect effective sources and /brewtools:manager-setup edit to prepare an override. Purge removes owned overrides and wall state according to the skill’s removal contract.

Other operating context

Brewcode’s prompt and session hooks can supply operating context independently of these codewords. See Brewcode hooks. Teams and agent generation also add the closest-counterpart rule for agents that write code, scripts, schemas, or infrastructure.

These are Claude Code product contracts. Codex uses separate native instructions and tools; the plugin’s Claude hooks do not configure Codex runtime state.

⚙️

Manager Setup

Inspect prompt sources, customize text, and configure the optional hard wall.
📈

Task Board Setup

Methodology, work units, graph reconciliation, and session timers.
🧠

Plan-mode effort mod

Raises the main loop’s effort while Claude Code is in plan mode.
📄

Brewtools overview

All brewtools skills and agents.
🔗

Hook source

Token detection, context order, and payload gating.

Updating plugins

Use /brewtools:plugin-update to check and update the brewcode plugin suite in one command. See the FAQ for details.