Arguments. [deep|shallow] [incumbent [target]|<plan text or file path>]. An optional leading
deep/shallow sets research depth; with no argument, work from conversation context.
Variables
Arguments: $ARGUMENTS
Purpose
Find, before implementation, the problems that would cause rework: unchecked assumptions, bugs in
dependencies, missing extensibility, no drift detection, no graceful degradation. Not a rubber
stamp and no generic warnings: every finding is backed by evidence (a specific bug number, doc
reference, code path, or logical argument). "This might break" without evidence is not a finding.
incumbent mode applies the same discipline to the status quo. "We already use it" is evidence of
what is, never proof it still fits: name the problem the incumbent actually solves, survey
alternatives, and ask whether a better fit exists now, before a plan commits to keeping or
replacing it.
Fresh-context requirement
Dispatch the stress-test to a fresh-context sub-agent in two cases:
- Plan-review mode, when the plan under review was produced in this context/session: the
producing context shares the plan's blind spots and drifts toward approving its own work. When
invoked on an artifact this context did not author (a file, a plan from another session, a
diff), you are already the fresh pair of eyes. Proceed directly.
incumbentmode, always: any read of the incumbent you already hold is a digest. The
sub-agent invokes /discovery:explore (if enabled) via the Skill tool (otherwise explores directly)
on the incumbent itself (Alternatives Sweep, Step 1).
The dispatch prompt carries only what to investigate (the plan artifact, or the incumbent's identity
and location), never your conclusions: "here is the target; go look yourself," not "here is what I
found; confirm it." Where the verdict is high-stakes and correlated blind spots are the risk, prefer
a cross-vendor advisor when one is enabled and set up (for example the OpenAI Codex plugin, when
its documented surface can take this artifact, invoked per its own docs), with the fresh-context
same-vendor sub-agent as the stated fallback, never a route to a command that may not resolve (per
docs/plugin-philosophy.md "Fresh-eyes checkpoints" in the marketplace repository).
When to Use
Proactively (autonomous invocation):
- Before exiting plan mode on plans involving infrastructure, hooks, CI/CD, build config, or
cross-cutting changes
- Before presenting architecture decisions that affect multiple projects
- Before proposing new conventions or enforcement mechanisms
- When a plan has 3+ implementation steps and touches mechanisms with undocumented behavior
Skip single-file edits and simple config changes with well-understood behavior, where prior
research validation suffices. The trigger is complexity and blast radius, not every plan.
On request (user invocation):
/planning:devils-advocate. Review the plan currently being discussed/planning:devils-advocate <file-path>. Review a plan from a file/planning:devils-advocate <inline text>. Review the provided text/planning:devils-advocate incumbent <target>. Stress-test the incumbent tool/approach against
alternatives (target empty ⇒ take it from conversation context)
/planning:devils-advocate deep incumbent <target>. Same, forcing the heaviest research tier;
the depth token is recognized only as the leading token, so incumbent deep <target> folds
"deep" into the target text
Input Resolution
Parse $ARGUMENTS in this order:
- Depth token (optional). If the first token is
deeporshallow, consume it as the
research-depth override (see "Research depth") and continue with the rest.
- Mode. If the next token is
incumbent, enterincumbentmode; the remainder identifies
the incumbent (a tool, library, approach, or module), or is empty to take it from the
conversation. Only this leading token selects the mode; the word elsewhere in a plan does not.
- Plan-review mode (default). Otherwise: a remainder that is a file path (ends in
.md,
.txt, or .json) is read as the plan; inline text is the plan; empty means the most recent
plan, proposal, or design in the conversation.
To review an inline plan whose text legitimately begins with incumbent, deep, or shallow,
pass it as a file path so the leading word is not consumed as a token.
Interview answers (optional input). When the caller supplies an interview ledger
(<memory_dir>/<topic-slug>/interview-checklist.md) or a Brief, read its answered register rows
and locked decisions before Round 1. A mitigation that would replace one is still a valid finding,
but it names the answer it displaces (the Supersedes bullet under "Findings"): the user made that
call and the plan may not change it silently.
Research depth
Both modes default to risk-scaled research (Round 2's scale). A leading deep forces the
heaviest tier: route load-bearing evaluations to /discovery:research (if enabled) with its deep token,
invoked via the Skill tool. shallow restricts to codebase read/grep with no external
research. Depth is per invocation, not a stored setting.
Analysis Process
Mode branch. Plan-review mode runs Rounds 1–4. incumbent mode runs the Alternatives Sweep
instead (it reuses Round 2's evidence discipline and Round 3's mitigation / residual-risk format).
Stop early when a round produces no new critical or high findings, except Round 4, which runs
whenever its trigger matches regardless of how quiet Rounds 1-3 were.
Round 1: Assumption Identification
Extract every assumption in the plan, explicit and implicit, as a table:
| # | Assumption | Explicit? | Category | Risk if wrong |
|---|-----------|-----------|----------|---------------|
| 1 | transcript_path is in all hook stdin | Yes | API contract | Hooks can't track state |
| 2 | Temp files survive session duration | Implicit | Platform | State lost mid-session |
Categories: API contract, platform behavior, performance, security, extensibility, dependency
stability, cross-platform, convention compliance
In plan-review mode, also check that the plan solves the Brief's ### Problem and flag a goal that