Prospect

From mikeprasad/aria-knowledge · View interactive version

Prospect is an AI agent skill from the GitHub repository mikeprasad/aria-knowledge. Structured pre-mortem on a plan BEFORE execution: per-step risk verdicts (PROCEED/SHRINK/SPLIT/DEFER/KILL), evidence-sourcing pass, simpler-alternative discipline, growing failure-mode library. Triggers — "/aria-cowork:prospect", "pre-mortem this plan". (Cowork variant — namespaced-only.)

How to use this skill

Skill file

/prospect — Plan pre-mortem with risk enforcement (cowork variant)

Run a structured pre-mortem on a plan or approach that has been created but not yet executed. Forward-looking counterpart to /aria-cowork:retrospect. Produces a 10-section markdown report with per-step verdicts, risk status, action recommendations, and process pre-mortem when the plan-formation itself was thin. Writes findings to <knowledge_folder>/logs/prospect/ and runs aria's standard intake.

Cowork variant of aria-knowledge's /prospect. Output schema (10-section report shape, frontmatter, logs/prospect/ destination) byte-identical per #18a + #18g + #18h. Two input-discovery divergences:

Step 0.5 Active Knowledge Surfacing keeps the query-build → match → load → summarize procedure per #18c, but items 1–6 diverge from Claude Code: that port hands the shared ranking CLI references (a plan file or a commit range, never task text), and Cowork (no code execution, no shell) builds the query by hand and carries the canonical ranking paragraph verbatim instead (guarded byte-for-byte by tests/repros/surfacing-ranking-verbatim.sh). Evidence-Sourcing Pass (Step 3.5) ports byte-faithfully per #18e. Failure-mode pattern library reads/writes shared rules/prospect-patterns.md per #18i (cross-plugin compatible).

The discipline this enforces: before the first edit lands, every planned step gets named, its evidence base examined, its smallest viable version identified, and its action gated on the strength of the underlying hypothesis. Mirrors /retrospect's shape so the same review muscle works in both directions.

Runtime Gate (per ADR-094)

Canonical resolution: This is the Claude Cowork variant — namespaced-only. When both plugin-claude-code and plugin-claude-cowork are loaded in the same session (most common in Claude Desktop), bare /prospect resolves to aria-knowledge's variant — Code is the canonical owner of all 24 dual-port skills per ADR-094 §Part 1. To reach this skill, use the namespaced form: /aria-cowork:prospect. Do NOT match bare /prospect — that belongs to aria-knowledge.

Before Step 0 — runtime self-correction. Check whether the Bash tool is available in this session. If Bash IS available (you are running in Claude Code or another runtime with shell access), this invocation reached the wrong variant for the runtime. Do not ask — redirect. Announce it in one line, then use the Skill tool to invoke prospect with the same arguments the user provided, and do not run this skill's steps:

↪️ Redirecting to /prospect — you invoked the aria-cowork variant, but you are running in Claude Code or another runtime with shell access.

Behavior is largely the same in both runtimes; for the Code-native variant (includes Step 11 CODEMAP/STITCH surfacing, uses /tmp/ ledger for dedup), use /prospect (the aria-knowledge canonical).

⛔ The redirect is unconditional — every mode including auto, and no opt-out. Reaching this variant under that condition is always a mis-invocation, so there is nothing for the user to decide. Design record: docs/superpowers/specs/2026-08-28-runtime-gate-auto-redirect-design.md (D2 auto-redirect, D3 no escape hatch, D6 announce-don't-swap-silently).

If Bash is NOT available (normal Cowork runtime), proceed to Step 0.

When to use

If code has already been written/committed (even in-session), use /retrospect instead — that pivots from forward-looking to backward-looking validation.

Step 0: Inputs & Mode Detection

Parse the invocation arguments. The first positional argument is the scope keyword; subsequent positional arguments are scope-specific. Six scopes plus a no-args default:

| Scope | Trigger | Backward-compat flag (still accepted) | Plan source |

|---|---|---|---|

| plan (default) | /prospect plan or /prospect | (was the no-arg default) | Current conversation's articulated plan — combine the active TodoWrite list, the most recent assistant plan/approach message, and any in-session plan file Claude has written. If ambiguous, ask user "Which of these is the plan you want me to pre-mortem?" with a short list. |

| session | /prospect session | --session | Synonym for plan. Reserved for cases where the user wants to emphasize "everything articulated this conversation" rather than a single plan artifact. |

| todos | /prospect todos | --todos | Just the active TodoWrite list — a thin mode for quick checks |

| file | /prospect file <path> | --plan <path> | Read the markdown file at <path> as the plan |

| linear | /prospect linear <id> | --linear <id> | Read the ticket's Technical Intake (and Product Intake for goal context) via Linear MCP. If MCP unavailable, ask user to paste. |

| branch | /prospect branch <name> | --branch <name> | Uncommitted/unpushed local changes on the branch — git diff <main-branch>...<name> — treated as a plan-in-progress (NOT shipped yet) |

Argument parsing rules:

After mode detection, gather:

  1. Goal — Ask the user: "What is this plan supposed to accomplish? (One sentence is fine.)" If they don't reply, fall back to the plan's first heading or stated objective.
  2. Tickets — Scan plan text/commits/branch name with regex \b([A-Z]{2,}-\d+)\b for Linear-style ticket IDs. If found AND Linear MCP is available, fetch each ticket's Product/Technical Intake + acceptance criteria to use as the goal-anchor in §4.6. If Linear MCP is unavailable, note "ticket context unavailable" but continue.
  3. Pre-execution evidence — Ask the user: "For each step in this plan, do you have evidence the step is necessary and that the underlying assumption is correct? (✅ measured / ⚠ inferred / ❌ contradicted / ❓ untested)" Show the per-step list and accept inline replies. If user can't supply evidence for any step, mark those ❓ — those steps will resolve to DEFER unless §4.7 produces supporting hypothesis confidence.

If scope is branch (or invoked via --branch) and the diff is non-trivial (>50 LOC across >3 files), warn: "Branch already has substantive code — consider /retrospect range main..HEAD instead, which is calibrated for already-written changes." Continue if user confirms.

Step 0.5: Active Knowledge Surfacing

If the user's config (<knowledge_folder>/aria-config.md) has active_knowledge_surfacing: true (default as of v2.15.0), surface relevant tagged knowledge BEFORE Steps 1-3 so loaded files inform pattern selection and evidence sourcing. If the field is false, skip this step entirely (note Active surfacing: disabled in the Anchor block).

Algorithm:

  1. Build query. Combine, separated by spaces: the Goal sentence from Step 0; the plan's first heading or the first 3 TodoWrite items; any detected Linear ticket IDs (e.g., LINEAR-123); the file basename if scope is file; the branch name if scope is branch.

2–6. Rank and select. This runtime cannot run code, so apply the shared ranking by hand. (a) Read <knowledge_folder>/index.md (resolve <knowledge_folder> from the config's knowledge_folder field) and take the ### tagname headers under ## Tag Index as the vocabulary; ignore ## Other Tags (the freeform tier). (b) Lowercase the query, strip punctuation to spaces, dedupe to a word set, and match words to tag names by exact equality — no substring, no fuzzy. A word also matches through an alias: a ## Known Tags line of the form tag [aliases: a, b] makes a and b count as tag (first definition wins). (c) Gather the - path — description lines under each matched tag and dedupe by path. When projects_enabled: true and projects_list is non-empty (both in <knowledge_folder>/aria-config.md), each tag listed there is a configured project tag and also carries every index line whose path starts with projects/<tag>/. (d) Rank, fire and cap with this paragraph, which is the canonical ranking copied verbatim — do not paraphrase it: <!-- surfacing-ranking:start -->Rank the candidate files: (1) a file carrying a matched project tag first; (2) then files carrying more of the matched tags; (3) then files whose path or index description contains more of the task's own words (lowercase, length over 2, common words dropped); (4) then authored files before files under logs/; (5) then the file whose rarest matched tag has the fewest files; (6) then index order. Fire when 2 or more tags match, or when 1 matched tag is a configured project. Keep the top 5.<!-- surfacing-ranking:end --> A configured project tag is a tag listed in projects_list, counted only when projects_enabled: true (a disabled or empty list means no project tags). If the firing rule does not hold, note Active surfacing: 0 matches (below threshold) in the Anchor block and skip to Step 1.

  1. Ledger filter (best-effort, cowork-fallback to in-memory). aria-knowledge reads the ledger from the file named by ledger= in its ARIA CONFIG line — a file in its private per-user state directory, keyed on the session id and written by aria-knowledge's hooks (T-1/T-2/T-3/PostCompact) to track files already surfaced this session. Cowork has no hook layer that pre-populates this ledger or emits that line, AND Cowork's sandbox may not reach that directory. If an ARIA CONFIG line with a ledger= path did reach this session, try it opportunistically with Read; if the file exists and reads cleanly, drop already-listed paths. ⛔ Never guess by picking the newest file matching the ledger glob — that is the most recently modified ledger on the MACHINE, i.e. another live session's whenever yours is absent or not newest, and a foreign ledger DROPS files never surfaced to this session. If no ledger= path is available (or it reads none) OR the Read fails OR no ledger exists, fall back to in-skill in-memory dedup: maintain a list of files already loaded earlier in THIS skill's invocation (i.e., across all of Step 0.5), and skip re-reading any path that appears twice — and say so in the surfacing block (Ledger: none for this session — in-memory dedup only), so an unfiltered load never reads as a filtered one. The fallback is per-invocation, not per-session — cross-skill dedup is best-effort only in cowork. The ledger records paths RELATIVE to <knowledge_folder>, the same form the index lists them in and (in Claude Code) the CLI prints them in, so compare paths against ledger lines exactly as printed; do not resolve them first.
  1. Read matched files. For each remaining path (up to 5), resolve it against <knowledge_folder> to an absolute path before Read (the tool needs an absolute path; paths come relative), then Read the full file into context.
  1. Summarize. Before Step 1's Anchor Block, emit a 3-line surfacing block:

```

Active Knowledge Surfacing:

Tags matched: <tag1> <tag2> ...

Files loaded: <N> (<file1>, <file2>, ...)

Relevance: <one sentence per file: why this informs the prospect>

```

  1. Carry-forward. These loaded files become input to Step 2 (Load Pattern Libraries — past prospects/retros tagged with the same topic may already catalog the relevant patterns) and Step 3.5 (Evidence-Sourcing Pass — they may already validate or falsify assumptions in the plan, converting ⚠/❓ to ✅/❌ before the verdict round).
  1. Tracked artifacts surfacing — SKIPPED in cowork per #18f + ADR-005. aria-knowledge surfaces CODEMAP directory + STITCH file for the plan's project as Step 11 (CODEMAP staleness-checked against codemap_staleness_threshold_days; STITCH against stitch_staleness_threshold_days; ledger-deduped via the per-session ledger named by ledger= in ARIA CONFIG, never a guessed path). Cowork excludes /codemap + /stitch skills per ADR-005, so this step is dropped entirely. The Step 9 surfacing block does NOT add the "Tracked artifacts: ..." 4th line in cowork. Plan-quality verdict in cowork doesn't depend on codebase-structure validation — if a plan needs CODEMAP-grounded analysis, run aria-knowledge's /prospect from Claude Code.

Step 1: Print the Anchor Block

Before producing any verdict, emit the anchor so the rest of the report can be traced to inputs:

Anchor:
  Goal:    <stated goal>
  Mode:    <plan | session | todos | file | linear | branch>
  Source:  <plan file path | TodoWrite snapshot | Linear-id | branch-name | session messages>
  Scope:   <step count, files-to-touch estimate, repos-affected>
  Tickets: <LINEAR-123 (Acceptance: ...), LINEAR-456 (...) | (none) | (unavailable)>
  Evidence: <user-supplied per-step evidence table | (untested)>

Step 2: Load Pattern Libraries

Read the canonical pattern library at <knowledge_folder>/rules/retrospect-patterns.md (resolved per <knowledge_folder>/aria-config.md knowledge_folder). The retrospect pattern library is intentionally shared — most failure-mode patterns (theory-driven refactor, scope creep, abstraction-first, etc.) apply forward as well as backward.

If a <knowledge_folder>/rules/prospect-patterns.md file exists, also load that (forward-only patterns may emerge over time and be catalogued separately). Do not require it.

If the plan is detected to belong to a known project (file paths or ticket IDs match a configured projects_list[<tag>].project_root), additionally read <knowledge_folder>/projects/<tag>/retrospect-patterns.md if it exists, and <knowledge_folder>/projects/<tag>/prospect-patterns.md if it exists.

Hold all loaded pattern lists in context for use in §4.4 (Failure-Mode Pattern Check). Do not run pattern detection yet — this step is just loading.

Step 3: Enumerate Steps & Preliminary Triage

For the loaded plan, enumerate each step. A step is one of:

Number them #1, #2, … in execution order. For each step, capture:

If a step has no identifiable underlying assumption (it's pure execution, e.g., "rename file"), write "Mechanical — no hypothesis." Mechanical steps default to ✅ Pre-validated and skip Step 3.5.

Command receipts. Every command the plan hands to someone else carries a receipt, written in this order:

  1. $ <command>
  2. expected: — what a correct run prints or exits, written before running it (a receipt with no declared expectation is a printout, not a check);
  3. exit <n> and the first output line, from actually running it — or not run: <reason>.

not run is the expected answer for a command that changes something outside the machine (push, deploy, writes to shared data); Step 3.5.2's read-only limit is unchanged. A handed-over command with neither exit nor not run is an unverified assumption: its step's Preliminary Risk? is at least ⚠ — never ✅.

After preliminary triage, list every step whose Preliminary Risk? is ⚠ Theory-driven, ❓ Unsupported, or 🚫 Unverifiable-yet — these are the candidates for Step 3.5's evidence-sourcing pass. ❌ Falsified steps skip Step 3.5 (they go directly to KILL in §4.3 unless the user contests the falsification).

Step 3.5: Evidence-Sourcing Pass

For each candidate from Step 3 (every step with Preliminary Risk? of ⚠ / ❓ / 🚫), attempt to upgrade or falsify the risk by sourcing evidence. The goal: convert as many ⚠/❓/🚫 to ✅ or ❌ as possible before §4.3 emits final verdicts and §4.10 surfaces residual asks.

This step can be skipped with the --no-source flag (e.g., for a quick pass where the user just wants the structural review). When skipped, all Preliminary Risk? values pass through to §4.3 unchanged and §4.10 lists every gap as NOT-ATTEMPTED.

3.5.1: Generate the Evidence Question

For each candidate step, name the single most decisive question whose answer would upgrade the Risk? to ✅ Pre-validated or ❌ Falsified. Format:

Step #N: <description>
  Preliminary Risk?:  <⚠/❓/🚫 with sub-tag>
  Decisive question:  <one-line — "what would change this verdict?">
  Answer source:      AUTO-SOURCEABLE | USER-INPUT | MIXED
  Sourcing plan:      <one-line — what tool/lookup/ask will be used>

Source categorization:

| Category | Means | Examples |

|---|---|---|

| AUTO-SOURCEABLE | The skill can answer it itself with available tools | Codebase reads (Read/Grep/Glob), git log/diff/blame, public web docs (WebFetch/WebSearch), Bash probes (curl, gh, grep on logs), MCP queries that don't require new credentials (e.g., supabase__list_tables, linear__get_issue if MCP is connected) |

| USER-INPUT | Requires Mike's judgment, local-only knowledge, or a decision he hasn't made yet | Acceptance criteria interpretation, scope/priority calls, choosing between viable design options, info that lives only in his head (a conversation with a teammate, a constraint he hasn't documented) |

| MIXED | Auto-sourceable to narrow the option space, then user picks | "Grep finds 3 candidate canonical-nav definitions; ask user which is current" |

Inherited claims first. A claim the plan inherited — from a handoff, ticket, earlier doc or memory, not measured this session — is an evidence candidate ahead of everything else: give it a decisive question first, and check it against the system before the report repeats it.

If a step has multiple decisive questions, list them as 3.5.1.a, 3.5.1.b, etc., and run each through 3.5.2 / 3.5.3 independently.

3.5.2: Auto-Source What's Accessible

For each AUTO-SOURCEABLE (or the auto-portion of MIXED) question, execute the sourcing plan and record findings. Permissible tools:

Record findings in this format:

Step #N — sourcing result:
  Question:           <repeat decisive question>
  Tool used:          <Read | Grep | WebFetch <url> | Bash <command> | mcp__<server>__<tool>>
  Finding:            <one-paragraph factual summary, with file:line citations or URL anchors>
  Verdict:            UPGRADED-TO-✅ | UPGRADED-TO-❌ | NO-MOVEMENT-CAPABILITY | NO-MOVEMENT-STRUCTURAL | INCONCLUSIVE
  New Risk?:          <new tag, or unchanged if either NO-MOVEMENT>

⛔ A no-movement verdict MUST pick one of the two, and the distinction is not cosmetic. The two respond to a better model in opposite directions, so pooling them makes the aggregate uninterpretable — a rising resolution rate can then be a shift in premise mix rather than any gain in capability.

| Verdict | Means | Test |

|---|---|---|

| NO-MOVEMENT-CAPABILITY | You attempted it and could not settle it — ran out of search paths, time-boxed out, sources disagreed, the trace got too deep | A more capable or less time-constrained pass could plausibly settle this from the same inputs. |

| NO-MOVEMENT-STRUCTURAL | The answer does not exist in reachable inputs — needs code executed, a package installed, live/production data, a device, or a named human's decision | No amount of reasoning settles it. Something must happen in the world first. |

⚠ Do not infer the category from the residual's Attempt status label after the fact. Measured 2026-08-22 on 5 such entries: 3 were mislabelled — carrying ATTEMPTED-FAILED while describing an on-device recording, an npm pack, and an SSH read of a live box. Classify at the moment you stop, when you still know why you stopped.

⚑ There is a third case worth naming when you hit it: the premise's subject does not exist (you searched correctly and the thing it asks about is absent at this commit). That is NO-MOVEMENT-STRUCTURAL with a note — not a capability failure, and a positive control on the search is required before claiming it.

Constraints:

3.5.3: Surface USER-INPUT Asks

For each USER-INPUT question (and the user-portion of MIXED), pause the pre-mortem and surface the ask using the format below. Default to ONE ask at a time unless the user requests a batch. This is a synchronous barrier — do not proceed until the user responds or explicitly chooses Skip.

Standard ask format:

[ASK #M of K] Step #N — <step description>

Why this matters:
  <one-line — what changes about Step #N's verdict if we know this>

What I tried autonomously (if MIXED):
  <one-line — e.g., "Grep'd /proj-c-working/playground for canonical examples; found 3 candidates at <paths>. Need your call on which is current.">

Citations / context inline:
  <file:line excerpts, URL pulls, or quoted plan fragments — whatever the answer depends on>

Options:
  1) <option, with one-line consequence — e.g., "Use blueprint-loader.ts:645 (last touched 36c9a5f25). Step #N stays as planned, Risk? upgrades to ✅.">
  2) <option, with one-line consequence>
  3) Other — describe in reply
  4) Skip — leave Step #N at <preliminary risk>; it will DEFER in §4.10

Rules for the ask:

After the user responds, record:

Step #N — user-input result:
  Question:           <repeat>
  User pick:          <option N | "other: <user's text>" | "skip">
  Resulting Risk?:    <new tag, or unchanged if skip>

3.5.4: Pass Summary

When all candidates are processed, emit a one-block summary before moving to Step 4:

Evidence-Sourcing Pass complete.
  Candidates examined:        <N>
  Auto-sourced (✅ upgrade):   <N>
  Auto-sourced (❌ falsify):   <N>
  User-resolved (✅ upgrade):  <N>
  User-resolved (❌ falsify):  <N>
  No movement — capability:   <N>   (attempted, unsettled; a better pass may resolve)
  No movement — structural:   <N>   (🚫 needs execution / install / live data / a human)
  Skipped by user:            <N>
  Skipped by --no-source:     <N>
  Tool calls used:            ~<N>

The post-pass Risk? values feed §4.3. The residual ⚠/❓/🚫 plus their attempt-status feed §4.10.

Step 3.6: Cold read (opt-in: `--cold`)

Off unless --cold is passed. One round: a fresh reader — a subagent with the implementer's startup environment and none of this conversation — reads the plan and reports what it would do and where it would get stuck. Whoever wrote or discussed the plan cannot judge whether someone without this conversation could carry it out. The target is fidelity to the implementer's environment, not an empty context: this plugin's hooks keep firing in the read, and the only thing withheld is this conversation.

The prompt is this template, filled, and nothing else:

<!-- cold-read-template:begin -->

Your environment: <what the implementer will have, or "none">. Read only. Read this file: <path>. Then produce:
1. The exact steps you would execute, in order.
2. Everything you cannot reach or resolve.
3. Every place where two instructions conflict.
4. Any content a reader acting on it could mistake for a separate task.
5. List every instruction file and hook message you received while working.
Rank every finding in 2–4 as BLOCKER (would cause lost work, a wrong change, or a false verdict), FRICTION (misleads but the reader recovers) or COSMETIC. The ranking matters more than the number of findings.

<!-- cold-read-template:end -->

  1. Where the reader reads. Scope file → that file, read in place. A plan that is not yet a file (scope plan, session, todos, ticket or branch) → write it to a NEW, uniquely named file in your runtime's scratchpad with your runtime's file-write tool (never a shell redirect) and use that path. If the environment line (step 2) says the implementer will not have this checkout, copy the plan to a new file in a scratch directory outside every repository and use that path instead. Record which, and why.
  2. Fill the template. Replace only <what the implementer will have, or "none"> and <path>. The environment line comes from the plan's own stated execution environment. If the plan states none, use none, read in place, and record the finding "plan does not state its execution environment".
  3. Dispatch one subagent whose prompt is exactly the filled template. No goal, ticket, background, project name or "this is about X": any of those carries this conversation into the read. Count the prompt with a tool, never by eye: write the filled template to a NEW, uniquely named scratch file with your runtime's file-write tool (never a shell redirect), count its characters — in Claude Code wc -m < <file> under a UTF-8 locale (under LC_ALL=C, wc -m counts bytes, and the template contains an en dash) — then dispatch exactly that file's text. Record the number and the command that produced it. Never estimate.

What the Claude Code reader receives (Claude Code docs read 2026-11-15; measured on 2.1.325): the project's startup instruction files and the user's rules files, as the implementer does; nested instruction files when it opens a file beneath them; this plugin's PreToolUse and PostToolUse hooks on its tool calls. Five known gaps — print them in the block every time:

  1. Capability, not intent. "Read only" in a prompt constrains nothing; the reader has a shell. Run git status --porcelain in the repository before the dispatch and after it returns. Any difference is a finding and flags the round. git status cannot see writes outside the repository; say so in the block.
  2. Findings are leads. Check each finding against the plan before it counts, and mark it confirmed or refuted (with the refutation). A confirmed BLOCKER sets that step's §4.3 Action to something other than PROCEED, and §4.8's overall verdict cannot be PROCEED while one stands. Compare the reader's item-5 list with what the implementer would load and name any difference.
  3. Report. §4.8 prints the Cold read block: round number; subagent type (and why, if the fallback was used); where the plan was read (in place, or a scratch copy and why); the environment line used; findings by rank, each confirmed or refuted; the git status before/after result; the item-5 list compared with the implementer's expected set; the five known gaps; the dispatched prompt's character count — the number counted in step 3 plus the command that produced it, never an estimate.

Step 4: Produce the 10-Section Pre-Mortem Report

Render a markdown document with the 10 sections below in order. Each section heading uses ### N. <title> format. Sections that don't apply to the current scope are emitted with a one-line "N/A: <reason>" — never silently skipped.

4.1. Section 1 — Anchor & Inputs

Re-emit the anchor block from Step 1, verbatim, as Section 1 of the report. This makes the report self-contained when read outside the chat.

4.2. Section 2 — Plan-Specificity Gate

For each step from Step 3, ask: is the step concrete enough that an implementer could execute it without further design decisions?

Acceptable evidence of concreteness:

If a step is still goal-stage ("improve performance," "clean up the auth flow," "make it work"), mark it 🌫 Under-specified in this section. Under-specified steps do NOT receive a Risk? status in §4.3 — instead, they're flagged here and their action defaults to DEFER-PENDING-DESIGN.

If the entire plan is under-specified, emit "STOP: plan is goal-stage. Run /distill to convert to executable spec, then re-run /prospect." and skip remaining sections.

4.3. Section 3 — Per-Step Verdict

For each step from Step 3 that passed §4.2 (concrete or partially concrete), emit a horizontal-rule-separated block with these fields. Mirror the formatting style of /retrospect's per-fix verdict.

Required fields:

Optional fields:

Render each step as a block, not a wide table:

Step #N: <description>
Concreteness:        <tag>
Necessary?:          <YES/NO/UNCLEAR> — <reason>
Smallest version:    <description>
Maintenance cost:    <description>
Risk?:               <status>  (post-Step-3.5)
Evidence sourced (optional): <one-line with citation>
Action:              <action>
Rule cite (optional): <rule>
────────────────────────────────────────

Hard rule: A step's Action cannot be PROCEED unless its Risk? status is ✅ Pre-validated, OR ⚠ Theory-driven WITH an explicit one-line "Acceptable risk because: <reason>" appended to the Action line. ❌ Falsified → KILL. ❓ Unsupported → DEFER. 🚫 Unverifiable-yet → SHRINK (smallest version that produces evidence). 🌫 Under-specified → DEFER-PENDING-DESIGN.

Two more hard rules: a step with a confirmed cold-read BLOCKER (Step 3.6) cannot be PROCEED. A step that depends on an unanswered row of the plan's "Decisions only the human can make" table is DEFER, citing the row.

The theory-driven carve-out exists because every plan is theory-driven by definition — you're imagining, not measuring. The carve-out forces the planner to name the risk rather than block all forward motion.

4.4. Section 4 — Failure-Mode Pattern Check

Run the plan against all loaded pattern libraries from Step 2. Detection is judgment-based — read each pattern's "Detection cues" and assess whether the plan, hypotheses, or session transcript exhibits them.

Patterns from retrospect-patterns.md apply forward in their prospective form. For example:

For each pattern hit, emit:

[PATTERN] <pattern-name> (source: rules/retrospect-patterns.md | rules/prospect-patterns.md | projects/<proj>/...)
  Evidence: <what in the plan/transcript triggered the hit>
  Counter-discipline: <one-line reminder of the pattern's counter-discipline>

If no patterns hit, emit: "No catalogued failure-mode patterns detected. (See §9 for novel patterns.)"

4.5. Section 5 — Cross-Step Tally

Emit raw counts only — no interpretation in v1.

Tally:
  Steps planned:                     <N>
  Pre-validated (✅):                 <N>   (post-Step-3.5)
  Theory-driven (⚠):                  <N>   (post-Step-3.5)
  Falsified (❌):                     <N>   (post-Step-3.5)
  Unsupported (❓):                   <N>   (post-Step-3.5)
  Unverifiable-yet (🚫):              <N>   (post-Step-3.5)
  Under-specified (🌫):               <N>
  Theory-driven refactors:           <N>
  Tied to Linear acceptance:         <N>
  Discovered-during-planning:        <N>
  Pattern hits this run:             <N>

Evidence-Sourcing Pass:
  Candidates examined:               <N>
  Auto-sourced (✅ upgrade):          <N>
  Auto-sourced (❌ falsify):          <N>
  User-resolved (✅ upgrade):         <N>
  User-resolved (❌ falsify):         <N>
  No movement — capability:          <N>
  No movement — structural:          <N>
  Skipped by user:                   <N>
  Skipped by --no-source:            <N>

A "theory-driven refactor" is a step that proposes rewriting working code based on a hypothesis rather than a confirmed bug location or measurement. Discovered-during-planning means a step the plan added beyond the original goal (often surfaces scope creep).

Interpretation of these counts is left to §4.6, §4.7, and §4.9.

4.6. Section 6 — Frame Check

Four questions, in order. Answer each in 1–2 sentences with the supporting evidence.

  1. Is the problem statement right? Does the plan target the user's actual problem, or has it drifted to an adjacent problem during planning?
  2. Is the bug/feature correctly scoped? Single goal, or has the plan accreted multiple goals presenting as one?
  3. Is the success signal stated? When the plan finishes, what observable evidence will indicate it worked? If you can't state it, you can't validate it after.
  1. What in-flight work edits the files this plan touches, and does each unit ship before or after it? Instruments: recent commits on other branches and worktrees touching the same paths, and open handoffs naming them. "None found" names the instrument used.

If the answer to #1 is "no," explicitly note: "Re-frame triggered. Hold all steps targeting the drifted problem statement pending re-frame discussion. Return to the original goal."

If the answer to #3 is "no," explicitly note: "No success signal stated. Add a measurable post-execution check before any step PROCEEDs."

4.7. Section 7 — Diagnosis Confidence

List the driving hypotheses behind the plan (only run this section if any step's post-Step-3.5 Risk? is ⚠ Theory-driven, ❓ Unsupported, or §4.6 #1 triggered re-frame). For each hypothesis:

Hypothesis: <one-line statement of what the plan assumes is true>
  Used by steps: <#1, #3, #5>
  Evidence FOR:    <observations consistent with this hypothesis — INCLUDE Step 3.5 sourced findings with citations>
  Evidence AGAINST: <observations inconsistent — INCLUDE Step 3.5 sourced findings>
  Sourcing attempted: <YES (see Step 3.5 result for steps #N) | NO (auto-sourcing skipped or not categorized as auto-sourceable)>
  Confidence:      LOW / MEDIUM / HIGH
  To upgrade to ✅: <specific signal to look for — feeds §4.10>

Evidence FOR/AGAINST must integrate any findings from Step 3.5's sourcing pass. If Step 3.5 produced a finding that moved the step to ⚠ Theory-driven (e.g., single-source-inferred upgrade from ❓), cite that finding here as soft Evidence FOR. If Step 3.5 produced a contradicting finding that the user contested or overrode, note both perspectives.

Hypotheses that the plan-formation conversation OR Step 3.5 already ruled out (alternative explanations considered and discarded) are listed separately under "Hypotheses ruled out during planning or sourcing" with one-line reasons and source citations where applicable. This is learning, not waste — captures what was considered AND what evidence retired it.

If all steps are ✅ Pre-validated and §4.6 didn't trigger, this section emits "N/A: all steps pre-validated."

4.8. Section 8 — Action Verdict

Per step, the action determined in §4.3. Render as a clear list:

Action verdict:
  Step #1: <ACTION>  — <one-line reason>
  Step #2: <ACTION>  — <one-line reason>
  ...

For SHRINK actions, provide the exact smaller-scope description (from §4.3's "Smallest version"). For SPLIT actions, provide the proposed sub-step breakdown with a checkpoint between sub-steps. For DEFER actions, name the specific evidence/decision needed first. For KILL actions, give the one-line rationale and confirm there's no orphaned downstream step that depended on it.

End with an Overall verdict in 1–3 sentences: PROCEED / PROCEED-WITH-CHANGES / HOLD / KILL. PROCEED-WITH-CHANGES means at least one step requires SHRINK or SPLIT before any execution. HOLD means at least one step is DEFER and blocks downstream steps. The overall verdict cannot be PROCEED while a confirmed cold-read BLOCKER stands.

With --cold, print the Cold read block (Step 3.6) after the overall verdict:

Cold read (round <N>):
  Subagent type:     <type, and why if the fallback was used | not run — <reason>>
  Plan read:         <in place: <path> | scratch copy: <path> — <why>>
  Environment line:  <as filled>
  Prompt chars:      <N>  (<the count command, e.g. wc -m < <file>>; the filled template only)
  git status:        <unchanged | changed: <paths>>  (cannot see writes outside the repository)
  Findings:          BLOCKER <n> · FRICTION <n> · COSMETIC <n>
    - <rank> <finding> — confirmed | refuted: <why>
  Item 5 vs implementer: <the reader's list> — differs from the expected set by: <difference | none>
  Known gaps:        (a) auto memory · (b) own system prompt · (c) SubagentStart hooks · (d) startup files follow the working directory · (e) no SessionStart hook output

4.9. Section 9 — Process Pre-mortem

What the plan-formation process should have done differently. Format per item:

What planning produced:    <observed plan shape>
What it should produce:    <better plan shape>
Trigger condition:         <how to detect this situation in the future>
Pattern reference:         <pattern-name from library | (novel)>

Examples of plan-formation issues this section catches:

If a behavior matches an existing pattern in the library, cite it. If a behavior is novel, prompt the user:

"Identified a new plan-formation failure pattern: <pattern-name>. Add to:

1) Canonical (rules/prospect-patterns.md — creates if missing) — applies project-agnostic

2) Project-specific (projects/<proj>/prospect-patterns.md)

3) No — surface in this report only

Choose: "

If user chooses 1 or 2, append a new entry to the corresponding file using the same "Pattern entry format" defined in rules/retrospect-patterns.md. The new entry's "First identified" field is today's date and the current prospect's filename.

4.10. Section 10 — Pre-Execution Evidence Ask (Residual)

Anti-speculation barrier. This section lists ONLY the residual evidence asks — the questions Step 3.5 either could not source autonomously, the user deferred, or were not attempted. Items resolved during Step 3.5 (✅ upgrades or ❌ falsifications) DO NOT appear here — they're recorded in §4.3 (Evidence sourced field), §4.7 (Evidence FOR/AGAINST), and §4.5 (Evidence-Sourcing Pass tally).

For each remaining ⚠/❓/🚫 step, emit the residual ask with its attempt-status:

Before Step #N can PROCEED (Hypothesis A: <short label>):
  Attempt status:    NOT-ATTEMPTED | ATTEMPTED-FAILED | DEFERRED-BY-USER | SKIPPED-BY--no-source
  Why residual:      <one-line — e.g., "Auto-source attempted via WebFetch <url>; doc was 404. Demoted to USER-INPUT.">
  What's needed:     - <specific check 1 — file read, log query, schema inspection, decision required, etc.>
                     - <specific check 2>
                     - <add a unique [<TAG>-PRE] marker in the planned change so post-execution validation is possible>
  Who can resolve:   <USER | AUTOMATED-RETRY-LATER | EXTERNAL-PARTY <name>>

Attempt-status meanings:

If all steps are ✅ Pre-validated post-Step-3.5, emit: "N/A: all steps pre-validated (Step 3.5 closed all gaps). Proceed to execution."

If Step 3.5 was skipped via --no-source, prefix every entry with "(Sourcing pass skipped — re-run /prospect without --no-source to attempt autonomous resolution.)"

End the section with this verbatim warning when any DEFER or HOLD action exists:

Do not begin execution until at least one item in this section is satisfied for each DEFER step. If execution is started without new evidence, the eventual /retrospect will mark those steps unvalidated. Plan accordingly.

Step 5: Risk Status Taxonomy (reference)

When assigning Risk? in §4.3, choose one of the 5 statuses below. Under-specified (🌫) is a precondition gate handled in §4.2, not a status.

| Status | Definition | Required sub-tag (in report) |

|---|---|---|

| ✅ Pre-validated | Evidence already supports the planned step's underlying assumption | Evidence type: log/measurement \| reproduction-then-confirm \| code-read-and-traced \| existing-test-coverage. "Plausible argument" is not evidence. |

| ⚠ Theory-driven | Plan rests on a hypothesis that's reasonable but unmeasured | Sub-tag: single-source-inferred \| analogous-system-reasoning \| documentation-claim-untested |

| ❌ Falsified | Known evidence contradicts the planned step's assumption | Sub-tag: prior-attempt-failed \| evidence-shows-otherwise \| documented-anti-pattern |

| ❓ Unsupported | No evidence yet, but the skill can describe the specific check that would gather it | (none) |

| 🚫 Unverifiable-yet | Cannot be validated until execution begins (requires running the change to know) | (none) |

When emitting a Risk? value, always include the required sub-tag where applicable. Examples:

Step 6: Write Outputs

After Step 4 produces the report, write outputs to the configured destinations:

Always

Default

Prepend a structured YAML frontmatter block to the report before writing. Schema:

```yaml


type: prospect

date: <YYYY-MM-DD>

scope: <plan | session | todos | file | linear | branch>

goal: <one-line stated goal from §4.1 Anchor>

tickets: [<LINEAR-123>, <LINEAR-456>] # empty list if none

steps_count: <N>

model: <model executing this gate, e.g. claude-opus-5 — or unrecorded if unknown>

effort: unrecorded # always — Cowork has no Bash; the effort level is not readable here

sourcing_pass:

candidates: <N>

upgraded_validated: <N>

upgraded_falsified: <N>

no_movement: <N> # pooled total; MUST equal the two fields below

no_movement_capability: <N> # attempted, could not settle — a better model may resolve it

no_movement_structural: <N> # 🚫 needs execution / install / live data / a named human

patterns_hit: [<pattern-name-1>, <pattern-name-2>] # from §4.4; empty list if none

overall_verdict: <PROCEED | PROCEED-WITH-CHANGES | HOLD | KILL> # from §4.8

related: [<paths to overlapping prior runs — see below>]

tags: [prospect, <scope>, <project-tag-if-detected>, <pattern-tag-if-applicable>]


```

effort: is always unrecorded here. Cowork has no Bash; the effort level is not readable here, and you cannot see your own effort setting (self-reported values disagreed with the harness record on 24% of 140 matched logs). Write unrecorded, never a guess.

related auto-detection (Q1.2=1, ticket-based): Before writing, glob <knowledge_folder>/logs/prospect/*.md AND <knowledge_folder>/logs/retrospect/*.md for files whose frontmatter tickets: array shares at least one ticket ID with the current report's tickets. Record their paths (relative to <knowledge_folder>/) in the related: array. If no tickets in the current report, leave related: empty. Only the most recent 10 are kept if many overlap (cap on bloat).

tags: field: always includes prospect and the scope keyword. Add a project tag when the plan is detected to belong to a configured project (commits/files match a projects_list[<tag>].project_root). Add pattern-name tags for any §4.4 hits. These tags make the file discoverable via /index and /context (per Q1.3=1 — /index extends its scan to logs/{prospect,retrospect}/).

Project-scoped intake goes to projects/<proj>/; agnostic intake goes to the shared knowledge tree. Follow the standard aria intake confirmation flow (suggest, user reviews, write on approval).

Opt-in

Pattern library write-backs

If §4.9 produced a novel pattern and the user approved adding it, the pattern entry is written to either:

Pattern write-backs are separate from intake — they go directly to the patterns file, not through backlog review.

Step 7: Soft-Suggest Trigger Logic (Claude-side judgment)

When the skill is not directly invoked, Claude monitors user messages and the conversation state for cues that suggest a pre-mortem is warranted. When detected AND the current session has produced a multi-step plan with no execution yet, Claude offers — never auto-executes — /prospect.

Cues (non-exhaustive, judgment-based):

Standard offer (paraphrase as appropriate):

"Before you start: this plan has <N> steps and at least one rests on an unmeasured hypothesis. Want me to run /prospect first? It'll force a per-step risk check + smallest-version pass before any code lands. Cheap insurance against a /retrospect later."

Cue weight is judgment, not regex. When the cue is faint, just acknowledge and proceed. When the cue is clear, offer. Never auto-execute from a cue — always ask.

This logic is the forward-looking twin of /retrospect's pushback-as-cue pattern — they share the same trigger surface but fire at opposite ends of the development cycle.

Over-build lens (opt-in: `--lens=overbuild`)

Off unless --lens=overbuild is passed. When on, after the standard per-step pass, check each PLANNED step against rules/overbuild-patterns.md:

  1. Load the ladder + smells.
  2. For each step, find the lowest ladder rung that would resolve its need. If the step proposes a higher rung than necessary (e.g. adds a dependency where a one-liner works), it fails that rung.
  3. A failing step yields a SHRINK verdict (existing vocabulary) citing the failed rung + the concrete leaner alternative; an unnecessary step yields KILL. A step whose smaller form cannot be named is NOT flagged.
  4. Findings fold into §4.3 per-step verdicts (the Action becomes SHRINK/KILL with the over-build reason) — no separate section needed, since prospect is already per-step.

Forward counterpart of /retrospect --lens=overbuild; same rubric, applied to a plan instead of a diff.

Step 8: Validation Gates

Before finalizing the pre-mortem, verify:

  1. Anchor printed? §4.1 must contain Goal, Mode, Source, Scope, Tickets, Evidence lines.
  2. Plan-specificity gate run? §4.2 must address every step from Step 3.
  3. Evidence-Sourcing Pass run (or explicitly skipped)? Step 3.5 must have addressed every preliminary ⚠/❓/🚫 candidate from Step 3 — each must end with one of: UPGRADED-TO-✅ / UPGRADED-TO-❌ / NO-MOVEMENT / INCONCLUSIVE / DEFERRED-BY-USER / SKIPPED-BY--no-source. No silent skips. The pass summary (Step 3.5.4) must be emitted.
  4. Per-step verdicts complete? Every step has all required fields (Concreteness, Necessary?, Smallest version, Maintenance cost, Risk?, Action). Risk? values reflect post-Step-3.5 state. Missing field = incomplete report.
  5. Risk hard rule respected? No step has Action: PROCEED unless post-Step-3.5 Risk? is ✅ Pre-validated, OR ⚠ Theory-driven WITH explicit "Acceptable risk because: …" appended. Verify before emitting.
  6. Pattern check ran? §4.4 must reference all loaded pattern libraries (canonical retrospect + canonical prospect if exists + project-specific if applicable).
  7. Tally consistent? Counts in §4.5's risk-status block must match the per-step data in §4.3 (post-Step-3.5). Counts in §4.5's Evidence-Sourcing Pass block must match Step 3.5.4's summary.
  8. Hypotheses present when needed? §4.7 is required if any step is post-Step-3.5 ⚠ Theory-driven, ❓ Unsupported, or §4.6 #1 triggered re-frame. Evidence FOR/AGAINST must integrate Step 3.5 findings where applicable.
  9. Action verdict complete? §4.8 must have an action for every step in §4.3, plus an Overall verdict.
  10. Residual evidence asks correctly scoped? §4.10 must list ONLY residual items (NOT-ATTEMPTED / ATTEMPTED-FAILED / DEFERRED-BY-USER / SKIPPED-BY--no-source). Items resolved by Step 3.5 (✅ upgrades or ❌ falsifications) must NOT appear in §4.10. Cross-check: every §4.10 entry's step must have post-Step-3.5 Risk? of ⚠/❓/🚫.
  11. Outputs written? Confirm the persistent log was written to disk and intake suggestions were surfaced.
  1. Cold read accounted for? With --cold, Step 3.6 ran and §4.8 printed its Cold read block, or the report printed Cold read: not run — <reason>.

If any check fails, self-correct once. If self-correction can't close the gap (e.g., the user must supply evidence), surface the gap explicitly in the report rather than silently skipping.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.