[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M77M7W61TG9TDFX53V4ZZXYW":3,"skill-same:01M77M7W61TG9TDFX53V4ZZXYW":57},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":29,"commitSha":30,"skillDirectory":31,"forksCount":32,"repositoryHtmlUrl":33,"repositoryHomepageUrl":6,"ownerHtmlUrl":34,"ownerBlogUrl":35,"ownerDescription":36,"updatedAt":37,"install":38,"resources":50},"01M77M7W61TG9TDFX53V4ZZXYW","devils-advocate",null,"Stress-test a plan or proposal adversarially before implementation: assumptions, evidence, failure scenarios, operational gotchas. Use when: 'devil's advocate', 'stress test', 'poke holes', 'what could go wrong', or before new dependencies, CI\u002Fbuild changes, or cross-module architecture. `incumbent` mode attacks the status quo: 'is there a better way now', 'should we still use X'. Not for code bugs or pre-PR verification.","melodic-software\u002Fclaude-code-plugins","melodic-software","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F58273638?v=4","01M77JVQTXNGKCE4MDFY2BC936","Melodic Software","01M77JVQVN9QDWKAH6W03ANP76",30,"MIT","https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fplanning\u002Fskills\u002Fdevils-advocate\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\ndescription: \"Stress-test a plan or proposal adversarially before implementation: assumptions, evidence, failure scenarios, operational gotchas. Use when: 'devil's advocate', 'stress test', 'poke holes', 'what could go wrong', or before new dependencies, CI\u002Fbuild changes, or cross-module architecture. `incumbent` mode attacks the status quo: 'is there a better way now', 'should we still use X'. Not for code bugs or pre-PR verification.\"\nargument-hint: \"[deep|shallow] [incumbent [target]|\u003Cplan text or file path>]\"\nuser-invocable: true\ndisable-model-invocation: false\nmetadata:\n  workflow-stage: plan\n  summary: Stress-test a plan or the incumbent approach adversarially\n---\n\n**Arguments.** `[deep|shallow] [incumbent [target]|\u003Cplan text or file path>]`. An optional leading\ndeep\u002Fshallow sets research depth; with no argument, work from conversation context.\n\n## Repository context. Gather first\n\nCollect these with **individual** Bash calls, one command per call, never combined:\n\n- Current branch, `git branch --show-current`\n- Recent commits, `git log --oneline -5`\n\nTreat a failure (not a repository, git unavailable) as an unknown value and carry on. Keep these as\nbody Bash calls, not pre-compute lines. How the harness runs a skill's injected commands:\n[How injected commands run](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fskills#how-injected-commands-run).\nWhy they stay separate: the [gather-block convention](https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fdocs\u002Fconventions\u002Fgather-block\u002FREADME.md#the-pre-compute-block-runs-as-one-shell-invocation),\n\"The pre-compute block runs as one shell invocation\".\n\n## Variables\n\nArguments: `$ARGUMENTS`\n\n## Purpose\n\nFind, before implementation, the problems that would cause rework: unchecked assumptions, bugs in\ndependencies, missing extensibility, no drift detection, no graceful degradation. Not a rubber\nstamp and no generic warnings: every finding is backed by evidence (a specific bug number, doc\nreference, code path, or logical argument). \"This might break\" without evidence is not a finding.\n\n`incumbent` mode applies the same discipline to the status quo. \"We already use it\" is evidence of\nwhat is, never proof it still fits: name the problem the incumbent actually solves, survey\nalternatives, and ask whether a better fit exists now, before a plan commits to keeping or\nreplacing it.\n\n## Fresh-context requirement\n\nDispatch the stress-test to a fresh-context sub-agent in two cases:\n\n- **Plan-review mode**, when the plan under review was produced in THIS context\u002Fsession: the\n  producing context shares the plan's blind spots and drifts toward approving its own work. When\n  invoked on an artifact this context did not author (a file, a plan from another session, a\n  diff), you are already the fresh pair of eyes. Proceed directly.\n- **`incumbent` mode**, always: any read of the incumbent you already hold is a digest. The\n  sub-agent invokes `\u002Fdiscovery:explore` via the Skill tool (if enabled, else explores directly)\n  on the incumbent itself (Alternatives Sweep, Step 1).\n\nThe dispatch prompt carries only WHAT to investigate (the plan artifact, or the incumbent's identity\nand location), never your conclusions: \"here is the target; go look yourself,\" not \"here is what I\nfound; confirm it.\" Where the verdict is high-stakes and correlated blind spots are the risk, prefer\na cross-vendor advisor **when one is enabled and set up** (for example the OpenAI Codex plugin, when\nits documented surface can take this artifact, invoked per its own docs), with the fresh-context\nsame-vendor sub-agent as the stated fallback, never a route to a command that may not resolve (per\n`docs\u002Fplugin-philosophy.md` \"Fresh-eyes checkpoints\" in the marketplace repository).\n\n## When to Use\n\n**Proactively (autonomous invocation):**\n\n- Before exiting plan mode on plans involving infrastructure, hooks, CI\u002FCD, build config, or\n  cross-cutting changes\n- Before presenting architecture decisions that affect multiple projects\n- Before proposing new conventions or enforcement mechanisms\n- When a plan has 3+ implementation steps and touches mechanisms with undocumented behavior\n\nSkip single-file edits and simple config changes with well-understood behavior, where prior\nresearch validation suffices. The trigger is complexity and blast radius, not every plan.\n\n**On request (user invocation):**\n\n- `\u002Fplanning:devils-advocate`. Review the plan currently being discussed\n- `\u002Fplanning:devils-advocate \u003Cfile-path>`. Review a plan from a file\n- `\u002Fplanning:devils-advocate \u003Cinline text>`. Review the provided text\n- `\u002Fplanning:devils-advocate incumbent \u003Ctarget>`. Stress-test the incumbent tool\u002Fapproach against\n  alternatives (target empty ⇒ take it from conversation context)\n- `\u002Fplanning:devils-advocate deep incumbent \u003Ctarget>`. Same, forcing the heaviest research tier;\n  the depth token is recognized only as the leading token, so `incumbent deep \u003Ctarget>` folds\n  \"deep\" into the target text\n\n## Input Resolution\n\nParse `$ARGUMENTS` in this order:\n\n1. **Depth token (optional).** If the first token is `deep` or `shallow`, consume it as the\n   research-depth override (see \"Research depth\") and continue with the rest.\n2. **Mode.** If the next token is `incumbent`, enter **`incumbent` mode**; the remainder identifies\n   the incumbent (a tool, library, approach, or module), or is empty to take it from the\n   conversation. Only this leading token selects the mode; the word elsewhere in a plan does not.\n3. **Plan-review mode (default).** Otherwise: a remainder that is a file path (ends in `.md`,\n   `.txt`, or `.json`) is read as the plan; inline text is the plan; empty means the most recent\n   plan, proposal, or design in the conversation.\n\nTo review an inline plan whose text legitimately *begins* with `incumbent`, `deep`, or `shallow`,\npass it as a file path so the leading word is not consumed as a token.\n\n**Interview answers (optional input).** When the caller supplies an interview ledger\n(`\u003Cmemory_dir>\u002F\u003Ctopic-slug>\u002Finterview-checklist.md`) or a Brief, read its `answered` register rows\nand locked decisions before Round 1. A mitigation that would replace one is still a valid finding,\nbut it names the answer it displaces (the `Supersedes` bullet under \"Findings\"): the user made that\ncall and the plan may not change it silently.\n\n### Research depth\n\nBoth modes default to **risk-scaled** research (Round 2's scale). A leading `deep` forces the\nheaviest tier: route load-bearing evaluations to `\u002Fdiscovery:research` with its `deep` token,\ninvoked via the Skill tool, if enabled. `shallow` restricts to codebase read\u002Fgrep with no external\nresearch. Depth is per invocation, not a stored setting.\n\n## Analysis Process\n\n**Mode branch.** Plan-review mode runs Rounds 1–4. `incumbent` mode runs the **Alternatives Sweep**\ninstead (it reuses Round 2's evidence discipline and Round 3's mitigation \u002F residual-risk format).\n\nStop early when a round produces no new critical or high findings, except Round 4, which runs\nwhenever its trigger matches regardless of how quiet Rounds 1-3 were.\n\n### Round 1: Assumption Identification\n\nExtract every assumption in the plan, explicit and implicit, as a table:\n\n| # | Assumption | Explicit? | Category | Risk if wrong |\n|---|-----------|-----------|----------|---------------|\n| 1 | `transcript_path` is in all hook stdin | Yes | API contract | Hooks can't track state |\n| 2 | Temp files survive session duration | Implicit | Platform | State lost mid-session |\n\n**Categories**: API contract, platform behavior, performance, security, extensibility, dependency\nstability, cross-platform, convention compliance\n\nIn plan-review mode, also check that the plan solves the Brief's `### Problem` and flag a goal that\ndrifts from it ([`${CLAUDE_PLUGIN_ROOT}\u002Fcontext\u002Fproblem-framing.md`](..\u002F..\u002Fcontext\u002Fproblem-framing.md)).\n\n### Round 2: Evidence Check\n\nVerify each assumption against evidence; mark one you could not confirm as unconfirmed and say where\nyou looked. Match research depth to risk:\n\n- **High risk**: deep multi-source research: official docs, issue trackers, and web search, with\n  the strongest capability available (`\u002Fdiscovery:research` via the Skill tool if enabled, a\n  research MCP server, or WebSearch\u002FWebFetch)\n- **Medium risk**: a targeted search or single authoritative doc fetch\n- **Low risk**: codebase grep\u002Fread\n\nCheck for:\n\n- **Known bugs** affecting the plan's mechanisms (search the relevant issue trackers)\n- **Undocumented behavior** the plan relies on\n- **Version-specific changes** that may have broken assumptions since training cutoff\n- **Cross-platform issues** (Windows\u002FGit Bash, macOS, Linux)\n- **Conflicts with the consuming project's conventions**: `CLAUDE.md` is already in context; also\n  read every rule file under `.claude\u002Frules\u002F`, path-scoped and unscoped alike, since neither\n  reliably reaches a plan review's context on its own\n\n| # | Assumption | Verified? | Evidence | Impact |\n|---|-----------|-----------|----------|--------|\n| 1 | `transcript_path` in stdin | YES | Official docs confirm base field | None. Assumption holds |\n| 2 | `if` field fires under skip-perms | NO | silently no-ops (known issue) | CRITICAL. Use explicit guards |\n\n**Incumbency-only support fails this check.** An assumption whose *only* backing is that the status\nquo already relies on it (\"we already use X\", no requirement, benchmark, or doc behind the original\nchoice) is unverified. It flows to a Round 3 finding whose **Mitigation names the follow-up**:\n`\u002Fplanning:devils-advocate incumbent \u003Ctarget>`. Suggest it; never auto-run it (one mode per\ninvocation). An assumption also backed by a requirement, benchmark, or doc is verified on that\nevidence.\n\n### Round 3: Failure Scenarios and Mitigations\n\nFor each unverified or partially verified assumption:\n\n1. **Failure scenario**: what specifically breaks and how\n2. **Blast radius**: what else is affected\n3. **Mitigation**: how to design around it\n4. **Graceful degradation**: what happens if the mitigation itself fails\n\nAlso check concerns the plan doesn't address:\n\n- **Extensibility**: what happens when new tools\u002Flanguages\u002Fecosystems are added?\n- **Drift detection**: how will we know when this goes stale?\n- **Configuration**: hardcoded values that should be externalizable?\n- **Testability**: how do we verify this works? Smoke tests? Integration tests?\n- **Maintenance**: who updates this when the ecosystem changes?\n- **Encapsulation**: is this in the right place?\n\n### Round 4: Operational Gotchas \u002F Failure-Mode Pitfalls\n\nSweep for operational traps the assumption-driven rounds miss. For each category, ask: *\"What's the\nworst-case scenario? Does the plan handle it or admit it as a known limitation?\"*\n\n| Category | Probe questions |\n|---|---|\n| **Edge-case semantics** | Empty input → no-op or \"set to empty\"? Missing file → fallback or error? Partial state → graceful or corrupt? Default-of-default when nothing's defined? |\n| **Multi-source interactions** | Composition order? Diamond inheritance (A→B and A→C, then merge)? Conflicting providers? Layer-skip semantics when one layer fully replaces? |\n| **Silent failure modes** | Parse fail → silent fallback to default? Invalid input → coerced or rejected? Errors swallowed? Hooks silently no-op on platform mismatch? |\n| **Divergent contexts** | CI vs local? Cloud (gitignored files invisible) vs interactive? Windows\u002FGit Bash vs Unix? Per-user vs per-machine state? Worktree vs main? |\n| **Mutable shared state** | Cache invalidation triggers? Race conditions on concurrent sessions? Mid-edit reload behavior? File-locking semantics? |\n| **Lifecycle \u002F migration** | Rename mechanism? Removal-deprecation pass? Stale references after partial upgrade? What happens if old + new coexist? |\n| **Bypass \u002F circumvent** | Can someone read past the contract? Skip the merger? Ignore the manifest? What if the contract isn't honored. Silent miscompute or visible error? |\n| **Path \u002F resource resolution** | Relative paths interpreted where? Glob ambiguity? Plugin-cache boundary? Worktree shared state? Cross-platform path-separator handling? |\n| **Schema drift** | Type changes between versions\u002Flayers? Contract changes? Version mismatches across producer\u002Fconsumer? Type-coercion vs error policy? |\n| **Ordering \u002F sequencing** | Multiple valid orderings. Which wins? Documented? Reproducible across runs? Stable under concurrent input? |\n| **Re-execution** | Started again straight after a clean finish, or while a previous start is still going: same result, or doubled work (two rows, two charges, two messages)? Stopped between any two of its writes: does the next start pick up, or trip over what was left? Mitigation: open every run with a reconciliation step that reads what already exists and acts only on the difference. Examples: upsert on a natural key instead of a blind insert; write to a temp path, then rename; a per-item done-marker the next run checks; build the to-do list from the destination's current contents, not a saved cursor. |\n\nFindings use Round 3's severity \u002F failure-scenario \u002F mitigation \u002F residual-risk format.\n\n**When to run Round 4:** plans involving multi-layer composition (config layering, plugin extension\npoints, hook chains, override mechanisms), or whose blast radius spans multiple contexts (local +\nCI + cloud). Skip it for single-context single-mechanism plans Round 3 already covers, except the\nRe-execution row: run that on any plan with a step that writes state and can run again (a scheduled\njob, a retry, a resumed run).\n\n### Alternatives Sweep (`incumbent` mode)\n\nEvery finding is backed by a specific bug number, doc reference, code path, or concrete logical\nargument, never training-data recall.\n\n1. **Explore the incumbent first-hand.** The fresh sub-agent (see Fresh-context requirement)\n   invokes `\u002Fdiscovery:explore` via the Skill tool (if the `discovery` plugin is installed; otherwise it explores\n   directly and the report says once that `discovery` would add a persisted exploration) on the\n   incumbent: what it is, where it is used,\n   what it is coupled to, and any recorded reason it was chosen. It receives the incumbent's\n   identity, never a parent conclusion about it.\n2. **Name the actual problem.** State what the incumbent solves, the real requirements, present and\n   plausible-future, before any alternative is on the table. Do not let the incumbent's shape\n   define the problem.\n3. **Survey the field.** Judge alternatives against those requirements on the preference ladder:\n   **native** (what the platform \u002F language \u002F framework provides) > **official \u002F authoritative** >\n   **vetted third-party** (well-maintained, known, safe, secure); an earlier rung wins when it\n   covers the requirements. Price each dependency's coupling: abandonment, a pricing pivot, a\n   license change, security posture, exit cost. The full selection discipline lives in\n   `\u002Fdiscipline:pick-for-the-problem` (apply it if enabled); this baseline is enough to run the\n   sweep without it. The seam between the two: that corrector is the light in-session nudge when\n   selection drift surfaces mid-conversation; this sweep is the formal, dispatched,\n   verdict-producing review to run before a plan commits to the incumbent.\n4. **\"Is there a better way now?\" Evidence, not memory.** Scale research to risk (Round 2) or the\n   depth token; route load-bearing evaluations to `\u002Fdiscovery:research` (with its `deep` token for\n   the heaviest tier), invoked via the Skill tool, if enabled. Look especially for what changed\n   since the incumbent was chosen: a new native capability, a shifted dependency, a since-published\n   better-fit option.\n5. **Verdict per candidate.** One of:\n   - **KEEP**. Re-derived from the problem and still the best fit; never switch for switching's\n     sake. An incumbent that audits clean is a clean finding. Say so.\n   - **MIGRATE**. A better-fit alternative exists; state the coupling price and the migration cost,\n     not just the upside.\n   - **RESEARCH**. The evaluation is load-bearing and unverified; route it (step 4), never a\n     verdict from recall.\n\n   Findings use Round 3's severity \u002F failure-scenario \u002F mitigation \u002F residual-risk format.\n\n**Scope guard.** Pre-implementation decision support (should the plan adopt or keep X versus an\nalternative), not a post-hoc audit of a running system's health or correctness.\n\n## Output Format\n\n**In `incumbent` mode**, the per-candidate **KEEP \u002F MIGRATE \u002F RESEARCH verdict** is the headline.\nThe Risk Summary and finding bullets still apply to the risks the sweep surfaces, with\n**Assumption** read as the claim under test (e.g. \"the incumbent still fits\" or \"alternative X is better-maintained\") and **Failure\nscenario** as the cost of the wrong call (keeping a worse-fit incumbent, or paying an unpriced\nmigration).\n\n### Risk Summary\n\n| Severity | Count | Action |\n|----------|-------|--------|\n| CRITICAL | N | Must fix before proceeding |\n| HIGH | N | Should fix; plan is fragile without |\n| MEDIUM | N | Consider fixing; acceptable risk if documented |\n| LOW | N | Note for future; no action needed now |\n\n### Findings (by severity)\n\nFor each finding:\n\n**[SEVERITY] Finding title**\n\n- **Assumption**: What was assumed\n- **Evidence**: What was found (with source. Bug number, doc URL, code path)\n- **Failure scenario**: What breaks\n- **Mitigation**: How to fix\n- **Residual risk**: What remains after mitigation\n- **Supersedes**: interview Q\u003CN> (\u003Cdisplaced answer>) (only when the mitigation replaces a user answer)\n- **New external effect**: \u003Cremote write, irreversible action, or externally visible artifact> (only when the mitigation adds one)\n\n### Revised Plan Recommendations\n\nIf critical or high findings exist, present specific plan modifications:\n\n- What to change and why\n- What to add (new steps, new checks, new graceful degradation)\n- What to remove (mechanisms that don't work)\n\nIn `incumbent` mode, this is the KEEP \u002F MIGRATE \u002F RESEARCH verdict with its coupling price and, for\na MIGRATE, the migration cost.\n\n### Suggested Next Steps\n\nSuggest the follow-ups the findings call for:\n\n- Verifying the changes end-to-end (`\u002Fverification:confirm` if enabled) if code changes were\n  involved\n- Targeted research (`\u002Fdiscovery:research` if enabled, or the strongest research capability\n  available) if critical assumptions remain unverified\n- The Alternatives Sweep on any incumbent a Round 2 finding flagged as supported only by\n  incumbency (the finding's Mitigation names the invocation)\n- Filing deferred research or monitoring items in the project's work-item tracker\n  (`\u002Fwork-items:track` if enabled)\n\n## What This Skill Does NOT Do\n\n- **Does not block execution**. It advises, the user decides\n- **Does not replace code review**. It reviews plans, not code (use your code-review tooling for\n  code)\n- **Does not do exhaustive security analysis**. Design-level risks, not vulnerability scanning\n  (use dedicated security tools for that)\n- **Does not generate generic warnings** (see Purpose)\n- **Does not audit a running system's health**. `incumbent` mode is a pre-implementation\n  keep-or-replace decision, not a runtime performance \u002F correctness audit\n\n## Next\n\n\u002Fplanning:plan takes the verified findings back into the plan before the user approves it.\n\n## Workflow position\n\nRuns between `\u002Fplanning:plan`'s plan formulation and user approval: ... → `\u002Fplanning:plan` →\n**stress-test (this skill)** → targeted research iteration if needed → user approval → execute.\n","**Arguments.** `[deep|shallow] [incumbent [target]|\u003Cplan text or file path>]`. An optional leading\ndeep\u002Fshallow sets research depth; with no argument, work from conversation context.\n\n## Repository context. Gather first\n\nCollect these with **individual** Bash calls, one command per call, never combined:\n\n- Current branch, `git branch --show-current`\n- Recent commits, `git log --oneline -5`\n\nTreat a failure (not a repository, git unavailable) as an unknown value and carry on. Keep these as\nbody Bash calls, not pre-compute lines. How the harness runs a skill's injected commands:\n[How injected commands run](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fskills#how-injected-commands-run).\nWhy they stay separate: the [gather-block convention](https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fdocs\u002Fconventions\u002Fgather-block\u002FREADME.md#the-pre-compute-block-runs-as-one-shell-invocation),\n\"The pre-compute block runs as one shell invocation\".\n\n## Variables\n\nArguments: `$ARGUMENTS`\n\n## Purpose\n\nFind, before implementation, the problems that would cause rework: unchecked assumptions, bugs in\ndependencies, missing extensibility, no drift detection, no graceful degradation. Not a rubber\nstamp and no generic warnings: every finding is backed by evidence (a specific bug number, doc\nreference, code path, or logical argument). \"This might break\" without evidence is not a finding.\n\n`incumbent` mode applies the same discipline to the status quo. \"We already use it\" is evidence of\nwhat is, never proof it still fits: name the problem the incumbent actually solves, survey\nalternatives, and ask whether a better fit exists now, before a plan commits to keeping or\nreplacing it.\n\n## Fresh-context requirement\n\nDispatch the stress-test to a fresh-context sub-agent in two cases:\n\n- **Plan-review mode**, when the plan under review was produced in THIS context\u002Fsession: the\n  producing context shares the plan's blind spots and drifts toward approving its own work. When\n  invoked on an artifact this context did not author (a file, a plan from another session, a\n  diff), you are already the fresh pair of eyes. Proceed directly.\n- **`incumbent` mode**, always: any read of the incumbent you already hold is a digest. The\n  sub-agent invokes `\u002Fdiscovery:explore` via the Skill tool (if enabled, else explores directly)\n  on the incumbent itself (Alternatives Sweep, Step 1).\n\nThe dispatch prompt carries only WHAT to investigate (the plan artifact, or the incumbent's identity\nand location), never your conclusions: \"here is the target; go look yourself,\" not \"here is what I\nfound; confirm it.\" Where the verdict is high-stakes and correlated blind spots are the risk, prefer\na cross-vendor advisor **when one is enabled and set up** (for example the OpenAI Codex plugin, when\nits documented surface can take this artifact, invoked per its own docs), with the fresh-context\nsame-vendor sub-agent as the stated fallback, never a route to a command that may not resolve (per\n`docs\u002Fplugin-philosophy.md` \"Fresh-eyes checkpoints\" in the marketplace repository).\n\n## When to Use\n\n**Proactively (autonomous invocation):**\n\n- Before exiting plan mode on plans involving infrastructure, hooks, CI\u002FCD, build config, or\n  cross-cutting changes\n- Before presenting architecture decisions that affect multiple projects\n- Before proposing new conventions or enforcement mechanisms\n- When a plan has 3+ implementation steps and touches mechanisms with undocumented behavior\n\nSkip single-file edits and simple config changes with well-understood behavior, where prior\nresearch validation suffices. The trigger is complexity and blast radius, not every plan.\n\n**On request (user invocation):**\n\n- `\u002Fplanning:devils-advocate`. Review the plan currently being discussed\n- `\u002Fplanning:devils-advocate \u003Cfile-path>`. Review a plan from a file\n- `\u002Fplanning:devils-advocate \u003Cinline text>`. Review the provided text\n- `\u002Fplanning:devils-advocate incumbent \u003Ctarget>`. Stress-test the incumbent tool\u002Fapproach against\n  alternatives (target empty ⇒ take it from conversation context)\n- `\u002Fplanning:devils-advocate deep incumbent \u003Ctarget>`. Same, forcing the heaviest research tier;\n  the depth token is recognized only as the leading token, so `incumbent deep \u003Ctarget>` folds\n  \"deep\" into the target text\n\n## Input Resolution\n\nParse `$ARGUMENTS` in this order:\n\n1. **Depth token (optional).** If the first token is `deep` or `shallow`, consume it as the\n   research-depth override (see \"Research depth\") and continue with the rest.\n2. **Mode.** If the next token is `incumbent`, enter **`incumbent` mode**; the remainder identifies\n   the incumbent (a tool, library, approach, or module), or is empty to take it from the\n   conversation. Only this leading token selects the mode; the word elsewhere in a plan does not.\n3. **Plan-review mode (default).** Otherwise: a remainder that is a file path (ends in `.md`,\n   `.txt`, or `.json`) is read as the plan; inline text is the plan; empty means the most recent\n   plan, proposal, or design in the conversation.\n\nTo review an inline plan whose text legitimately *begins* with `incumbent`, `deep`, or `shallow`,\npass it as a file path so the leading word is not consumed as a token.\n\n**Interview answers (optional input).** When the caller supplies an interview ledger\n(`\u003Cmemory_dir>\u002F\u003Ctopic-slug>\u002Finterview-checklist.md`) or a Brief, read its `answered` register rows\nand locked decisions before Round 1. A mitigation that would replace one is still a valid finding,\nbut it names the answer it displaces (the `Supersedes` bullet under \"Findings\"): the user made that\ncall and the plan may not change it silently.\n\n### Research depth\n\nBoth modes default to **risk-scaled** research (Round 2's scale). A leading `deep` forces the\nheaviest tier: route load-bearing evaluations to `\u002Fdiscovery:research` with its `deep` token,\ninvoked via the Skill tool, if enabled. `shallow` restricts to codebase read\u002Fgrep with no external\nresearch. Depth is per invocation, not a stored setting.\n\n## Analysis Process\n\n**Mode branch.** Plan-review mode runs Rounds 1–4. `incumbent` mode runs the **Alternatives Sweep**\ninstead (it reuses Round 2's evidence discipline and Round 3's mitigation \u002F residual-risk format).\n\nStop early when a round produces no new critical or high findings, except Round 4, which runs\nwhenever its trigger matches regardless of how quiet Rounds 1-3 were.\n\n### Round 1: Assumption Identification\n\nExtract every assumption in the plan, explicit and implicit, as a table:\n\n| # | Assumption | Explicit? | Category | Risk if wrong |\n|---|-----------|-----------|----------|---------------|\n| 1 | `transcript_path` is in all hook stdin | Yes | API contract | Hooks can't track state |\n| 2 | Temp files survive session duration | Implicit | Platform | State lost mid-session |\n\n**Categories**: API contract, platform behavior, performance, security, extensibility, dependency\nstability, cross-platform, convention compliance\n\nIn plan-review mode, also check that the plan solves the Brief's `### Problem` and flag a goal that\ndrifts from it ([`${CLAUDE_PLUGIN_ROOT}\u002Fcontext\u002Fproblem-framing.md`](..\u002F..\u002Fcontext\u002Fproblem-framing.md)).\n\n### Round 2: Evidence Check\n\nVerify each assumption against evidence; mark one you could not confirm as unconfirmed and say where\nyou looked. Match research depth to risk:\n\n- **High risk**: deep multi-source research: official docs, issue trackers, and web search, with\n  the strongest capability available (`\u002Fdiscovery:research` via the Skill tool if enabled, a\n  research MCP server, or WebSearch\u002FWebFetch)\n- **Medium risk**: a targeted search or single authoritative doc fetch\n- **Low risk**: codebase grep\u002Fread\n\nCheck for:\n\n- **Known bugs** affecting the plan's mechanisms (search the relevant issue trackers)\n- **Undocumented behavior** the plan relies on\n- **Version-specific changes** that may have broken assumptions since training cutoff\n- **Cross-platform issues** (Windows\u002FGit Bash, macOS, Linux)\n- **Conflicts with the consuming project's conventions**: `CLAUDE.md` is already in context; also\n  read every rule file under `.claude\u002Frules\u002F`, path-scoped and unscoped alike, since neither\n  reliably reaches a plan review's context on its own\n\n| # | Assumption | Verified? | Evidence | Impact |\n|---|-----------|-----------|----------|--------|\n| 1 | `transcript_path` in stdin | YES | Official docs confirm base field | None. Assumption holds |\n| 2 | `if` field fires under skip-perms | NO | silently no-ops (known issue) | CRITICAL. Use explicit guards |\n\n**Incumbency-only support fails this check.** An assumption whose *only* backing is that the status\nquo already relies on it (\"we already use X\", no requirement, benchmark, or doc behind the original\nchoice) is unverified. It flows to a Round 3 finding whose **Mitigation names the follow-up**:\n`\u002Fplanning:devils-advocate incumbent \u003Ctarget>`. Suggest it; never auto-run it (one mode per\ninvocation). An assumption also backed by a requirement, benchmark, or doc is verified on that\nevidence.\n\n### Round 3: Failure Scenarios and Mitigations\n\nFor each unverified or partially verified assumption:\n\n1. **Failure scenario**: what specifically breaks and how\n2. **Blast radius**: what else is affected\n3. **Mitigation**: how to design around it\n4. **Graceful degradation**: what happens if the mitigation itself fails\n\nAlso check concerns the plan doesn't address:\n\n- **Extensibility**: what happens when new tools\u002Flanguages\u002Fecosystems are added?\n- **Drift detection**: how will we know when this goes stale?\n- **Configuration**: hardcoded values that should be externalizable?\n- **Testability**: how do we verify this works? Smoke tests? Integration tests?\n- **Maintenance**: who updates this when the ecosystem changes?\n- **Encapsulation**: is this in the right place?\n\n### Round 4: Operational Gotchas \u002F Failure-Mode Pitfalls\n\nSweep for operational traps the assumption-driven rounds miss. For each category, ask: *\"What's the\nworst-case scenario? Does the plan handle it or admit it as a known limitation?\"*\n\n| Category | Probe questions |\n|---|---|\n| **Edge-case semantics** | Empty input → no-op or \"set to empty\"? Missing file → fallback or error? Partial state → graceful or corrupt? Default-of-default when nothing's defined? |\n| **Multi-source interactions** | Composition order? Diamond inheritance (A→B and A→C, then merge)? Conflicting providers? Layer-skip semantics when one layer fully replaces? |\n| **Silent failure modes** | Parse fail → silent fallback to default? Invalid input → coerced or rejected? Errors swallowed? Hooks silently no-op on platform mismatch? |\n| **Divergent contexts** | CI vs local? Cloud (gitignored files invisible) vs interactive? Windows\u002FGit Bash vs Unix? Per-user vs per-machine state? Worktree vs main? |\n| **Mutable shared state** | Cache invalidation triggers? Race conditions on concurrent sessions? Mid-edit reload behavior? File-locking semantics? |\n| **Lifecycle \u002F migration** | Rename mechanism? Removal-deprecation pass? Stale references after partial upgrade? What happens if old + new coexist? |\n| **Bypass \u002F circumvent** | Can someone read past the contract? Skip the merger? Ignore the manifest? What if the contract isn't honored. Silent miscompute or visible error? |\n| **Path \u002F resource resolution** | Relative paths interpreted where? Glob ambiguity? Plugin-cache boundary? Worktree shared state? Cross-platform path-separator handling? |\n| **Schema drift** | Type changes between versions\u002Flayers? Contract changes? Version mismatches across producer\u002Fconsumer? Type-coercion vs error policy? |\n| **Ordering \u002F sequencing** | Multiple valid orderings. Which wins? Documented? Reproducible across runs? Stable under concurrent input? |\n| **Re-execution** | Started again straight after a clean finish, or while a previous start is still going: same result, or doubled work (two rows, two charges, two messages)? Stopped between any two of its writes: does the next start pick up, or trip over what was left? Mitigation: open every run with a reconciliation step that reads what already exists and acts only on the difference. Examples: upsert on a natural key instead of a blind insert; write to a temp path, then rename; a per-item done-marker the next run checks; build the to-do list from the destination's current contents, not a saved cursor. |\n\nFindings use Round 3's severity \u002F failure-scenario \u002F mitigation \u002F residual-risk format.\n\n**When to run Round 4:** plans involving multi-layer composition (config layering, plugin extension\npoints, hook chains, override mechanisms), or whose blast radius spans multiple contexts (local +\nCI + cloud). Skip it for single-context single-mechanism plans Round 3 already covers, except the\nRe-execution row: run that on any plan with a step that writes state and can run again (a scheduled\njob, a retry, a resumed run).\n\n### Alternatives Sweep (`incumbent` mode)\n\nEvery finding is backed by a specific bug number, doc reference, code path, or concrete logical\nargument, never training-data recall.\n\n1. **Explore the incumbent first-hand.** The fresh sub-agent (see Fresh-context requirement)\n   invokes `\u002Fdiscovery:explore` via the Skill tool (if the `discovery` plugin is installed; otherwise it explores\n   directly and the report says once that `discovery` would add a persisted exploration) on the\n   incumbent: what it is, where it is used,\n   what it is coupled to, and any recorded reason it was chosen. It receives the incumbent's\n   identity, never a parent conclusion about it.\n2. **Name the actual problem.** State what the incumbent solves, the real requirements, present and\n   plausible-future, before any alternative is on the table. Do not let the incumbent's shape\n   define the problem.\n3. **Survey the field.** Judge alternatives against those requirements on the preference ladder:\n   **native** (what the platform \u002F language \u002F framework provides) > **official \u002F authoritative** >\n   **vetted third-party** (well-maintained, known, safe, secure); an earlier rung wins when it\n   covers the requirements. Price each dependency's coupling: abandonment, a pricing pivot, a\n   license change, security posture, exit cost. The full selection discipline lives in\n   `\u002Fdiscipline:pick-for-the-problem` (apply it if enabled); this baseline is enough to run the\n   sweep without it. The seam between the two: that corrector is the light in-session nudge when\n   selection drift surfaces mid-conversation; this sweep is the formal, dispatched,\n   verdict-producing review to run before a plan commits to the incumbent.\n4. **\"Is there a better way now?\" Evidence, not memory.** Scale research to risk (Round 2) or the\n   depth token; route load-bearing evaluations to `\u002Fdiscovery:research` (with its `deep` token for\n   the heaviest tier), invoked via the Skill tool, if enabled. Look especially for what changed\n   since the incumbent was chosen: a new native capability, a shifted dependency, a since-published\n   better-fit option.\n5. **Verdict per candidate.** One of:\n   - **KEEP**. Re-derived from the problem and still the best fit; never switch for switching's\n     sake. An incumbent that audits clean is a clean finding. Say so.\n   - **MIGRATE**. A better-fit alternative exists; state the coupling price and the migration cost,\n     not just the upside.\n   - **RESEARCH**. The evaluation is load-bearing and unverified; route it (step 4), never a\n     verdict from recall.\n\n   Findings use Round 3's severity \u002F failure-scenario \u002F mitigation \u002F residual-risk format.\n\n**Scope guard.** Pre-implementation decision support (should the plan adopt or keep X versus an\nalternative), not a post-hoc audit of a running system's health or correctness.\n\n## Output Format\n\n**In `incumbent` mode**, the per-candidate **KEEP \u002F MIGRATE \u002F RESEARCH verdict** is the headline.\nThe Risk Summary and finding bullets still apply to the risks the sweep surfaces, with\n**Assumption** read as the claim under test (e.g. \"the incumbent still fits\" or \"alternative X is better-maintained\") and **Failure\nscenario** as the cost of the wrong call (keeping a worse-fit incumbent, or paying an unpriced\nmigration).\n\n### Risk Summary\n\n| Severity | Count | Action |\n|----------|-------|--------|\n| CRITICAL | N | Must fix before proceeding |\n| HIGH | N | Should fix; plan is fragile without |\n| MEDIUM | N | Consider fixing; acceptable risk if documented |\n| LOW | N | Note for future; no action needed now |\n\n### Findings (by severity)\n\nFor each finding:\n\n**[SEVERITY] Finding title**\n\n- **Assumption**: What was assumed\n- **Evidence**: What was found (with source. Bug number, doc URL, code path)\n- **Failure scenario**: What breaks\n- **Mitigation**: How to fix\n- **Residual risk**: What remains after mitigation\n- **Supersedes**: interview Q\u003CN> (\u003Cdisplaced answer>) (only when the mitigation replaces a user answer)\n- **New external effect**: \u003Cremote write, irreversible action, or externally visible artifact> (only when the mitigation adds one)\n\n### Revised Plan Recommendations\n\nIf critical or high findings exist, present specific plan modifications:\n\n- What to change and why\n- What to add (new steps, new checks, new graceful degradation)\n- What to remove (mechanisms that don't work)\n\nIn `incumbent` mode, this is the KEEP \u002F MIGRATE \u002F RESEARCH verdict with its coupling price and, for\na MIGRATE, the migration cost.\n\n### Suggested Next Steps\n\nSuggest the follow-ups the findings call for:\n\n- Verifying the changes end-to-end (`\u002Fverification:confirm` if enabled) if code changes were\n  involved\n- Targeted research (`\u002Fdiscovery:research` if enabled, or the strongest research capability\n  available) if critical assumptions remain unverified\n- The Alternatives Sweep on any incumbent a Round 2 finding flagged as supported only by\n  incumbency (the finding's Mitigation names the invocation)\n- Filing deferred research or monitoring items in the project's work-item tracker\n  (`\u002Fwork-items:track` if enabled)\n\n## What This Skill Does NOT Do\n\n- **Does not block execution**. It advises, the user decides\n- **Does not replace code review**. It reviews plans, not code (use your code-review tooling for\n  code)\n- **Does not do exhaustive security analysis**. Design-level risks, not vulnerability scanning\n  (use dedicated security tools for that)\n- **Does not generate generic warnings** (see Purpose)\n- **Does not audit a running system's health**. `incumbent` mode is a pre-implementation\n  keep-or-replace decision, not a runtime performance \u002F correctness audit\n\n## Next\n\n\u002Fplanning:plan takes the verified findings back into the plan before the user approves it.\n\n## Workflow position\n\nRuns between `\u002Fplanning:plan`'s plan formulation and user approval: ... → `\u002Fplanning:plan` →\n**stress-test (this skill)** → targeted research iteration if needed → user approval → execute.\n",{"metadata":24,"description":7,"argument-hint":27,"user-invocable":28,"disable-model-invocation":20},{"summary":25,"workflow-stage":26},"Stress-test a plan or the incumbent approach adversarially","plan","[deep|shallow] [incumbent [target]|\u003Cplan text or file path>]",true,"main","d0e68c3f36b92a1d6381f0ba0060d7a0b8b886c5","plugins\u002Fplanning\u002Fskills\u002Fdevils-advocate",7,"https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins","https:\u002F\u002Fgithub.com\u002Fmelodic-software","https:\u002F\u002Fmelodicsoftware.com","Independent software studio building developer tools, automation, and application services, with roots in music.","2026-11-15 05:15:06",{"source":8,"skillName":5,"commands":39,"prompt":49,"zipAvailable":28},[40,43,46],{"tool":41,"command":42},"npx","npx skills add melodic-software\u002Fclaude-code-plugins --skill devils-advocate",{"tool":44,"command":45},"bunx","bunx skills add melodic-software\u002Fclaude-code-plugins --skill devils-advocate",{"tool":47,"command":48},"pnpm","pnpm dlx skills add melodic-software\u002Fclaude-code-plugins --skill devils-advocate","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fplanning\u002Fskills\u002Fdevils-advocate\u002FSKILL.md",[51],{"path":52,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":55,"sourceHtmlUrl":56},"evals\u002Fevals.json","REFERENCE","参考文档",11584,"https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fplanning\u002Fskills\u002Fdevils-advocate\u002Fevals\u002Fevals.json",[58,65,72,79,84,91],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":19},"01M7DYYDG31B9YX7N9MB9QW2GW","track","Backlog reads through the bound tracker: search open and closed items, view one item with its comments and state history. Use when another skill searches or reads tracker items.","https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fsession-flow\u002Fevals\u002Frecall-still-reports-reopened-bug\u002Fwork-items-stub\u002Fskills\u002Ftrack\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M7DYXVBAVG3NV30PA7GKW9Q6","reviewer-media","Reviewer media for one pull request: decides whether it needs a narrated walkthrough, builds the storyboard from \u002Freview:explain-change's digest, has \u002Fexplainer-video:produce render it and hands the manifest to \u002Fsource-control:pull-request media. Use when asked for 'reviewer media', 'a walkthrough video for this PR', 'a produced video of this change', or when pull-request ready or monitor hands a PR over.","https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Freview\u002Fskills\u002Freviewer-media\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":19},"01M7DYRZ5YD44AMYH26YR25GZ8","route","Model and effort per agent role (orchestrator, worker, verifier, retrieval) for a multi-agent run, resolved through the bundled defaults and the user, team and personal override config layers into fenced JSON with single-agent and fan-out variants and the layer behind each value. Use when asked 'which model for the subagents', 'route the roles' or 'model routing', or before a skill passes a role's model on a spawn.","https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fdiscovery\u002Fevals\u002Fex-model-pin-without-override\u002Fmulti-agent-stub\u002Fskills\u002Froute\u002FSKILL.md",[],[],{"skillNo":80,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M7DYRTVT4FWTGDJY0HCCFJMZ","https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fdiscovery\u002Fevals\u002Fex-model-override-from-route\u002Fmulti-agent-stub\u002Fskills\u002Froute\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M7DYNZC8PNW3T27V2ADKECKJ","principles","Module-design vocabulary for architecture findings, and the checks built on it. Use when: 'what is a deep module', 'what is a seam', 'deep vs shallow module', 'what is the deletion test', 'leverage and locality', 'module design vocabulary', 'which word do we use for X in architecture findings'. Scanning a codebase for friction is \u002Farchitecture:improve.","https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Farchitecture\u002Fskills\u002Fprinciples\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":19},"01M7DYNMCZNEWBFHV9KTSS6H60","write","Structured five-field bug report (title, steps to reproduce, expected vs actual, justified severity, suggested fix location) from an informal description, read-only. Use when the user names a defect they observed, or asks for one written up ('report a bug', 'file a bug', 'write this up as a bug').","https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Farchitecture\u002Fevals\u002Fdeepening-defect-goes-to-bugs-write\u002Fbugs-stub\u002Fskills\u002Fwrite\u002FSKILL.md",[],[]]