Assumptions
Purpose
Identify the conditions a change silently depends on in order to work safely
in production.
Produce a structured ledger of:
- hidden assumptions, phrased as conditions that must hold
- repository evidence, with a file and line locator where available
- failure modes
- existing safeguards
- falsification tests
- recommended controls
- status, evidence confidence, and priority
This is not a generic code review. Do not report vague concerns.
Core standard
Only report an assumption when you can provide all of the following:
- The assumption stated as a falsifiable condition (what must hold, not
what the current code does — see "Phrasing assumptions as conditions"
below).
- Direct evidence from code, tests, configuration, schema, documentation,
or the Git diff, with a file path and line range when the tooling
available can produce one. If a line range is unavailable, cite the
file path and the symbol (function, route, migration file) instead.
Never present a claim as repository evidence without a locator.
- A concrete consequence if the assumption is false.
- Existing safeguards, or an explicit statement that none were found. A
"none found" statement must name the scope that was searched (files,
directories, or symbols) — see "Search boundary for absence claims"
below. Do not write "none found" without saying where you looked.
- A practical falsification test or verification step.
- A status label: Protected, Partially protected, Unprotected, or Unknown
(see "Status vs. evidence confidence" below).
- An evidence confidence label: High, Medium, or Low.
- A priority: P0, P1, P2, or P3.
Status vs. evidence confidence
These are two different questions and must not be collapsed into one label.
- Status answers: does the repository protect against this condition
failing? Values:
Protected (a safeguard was found and it appears to
fully address the risk), Partially protected (a safeguard exists but
has a gap), Unprotected (no safeguard was found in the searched
scope), Unknown (the reviewed scope doesn't contain enough
information to tell).
- Evidence confidence answers: how solid is the evidence behind that
status call? Values:
High (direct, unambiguous code/config/test
evidence), Medium (reasonable inference from related code, but not a
direct observation of the behavior in question), Low (thin or
indirect evidence; flag this rather than rounding up to Medium).
Do not label a status Protected or Unprotected as "Verified" — that
conflates whether a safeguard exists with whether the underlying
production behavior (e.g. "the gateway never retries") is actually
guaranteed. A status can have High evidence confidence while the broader
real-world claim it implies is still not fully knowable from the repo
alone; say so in "Unknowns and boundaries" rather than overstating the
status label.
Phrasing assumptions as conditions
Phrase each assumption as the condition that must hold, not as a
description of what the current code appears to do. This keeps the
Assumption column stable even as Status changes across reviews.
| Weaker phrasing (avoid) |
Stronger phrasing (use) |
| "Refund processing is idempotent per request." |
"Duplicate refund requests are prevented or safely deduplicated." |
| "The migration fully completes before any worker runs." |
"New worker code remains safe before, during, and after the schema transition." |
| "The client can always tell whether the refund succeeded." |
"A caller can reliably determine the outcome after a response interruption." |
Search boundary for absence claims
"None found" is only meaningful if it states where the search happened.
Write it as:
None found in src/refunds/, db/schema.sql, and tests/refunds/retry.test.ts;
queue configuration was not inspected.
not as a bare "None found." An unqualified absence claim reads as
complete when it may only reflect a partial search.
If evidence is insufficient to call a status Protected or Unprotected,
use Unknown and pair it with a concrete verification step rather than
guessing. An Unknown status is not a defect — it is a task for someone
with runtime or operational knowledge the repository doesn't contain.
Investigation procedure
Determine scope.
Map the changed behavior.
- Identify entry points, callers, data reads/writes, side effects, external
calls, queues, caches, feature flags, authorization checks, and tests.
- Inspect adjacent code needed to understand the behavior.
Identify implied conditions.
Look for assumptions about (category tag in brackets):
- input validity and nullability
[input]
- data shape and historical records
[input]
- uniqueness and ownership
[security] [concurrency]
- ordering, time, and expiry
[concurrency]
- concurrency and atomicity
[concurrency]
- retries, duplicate delivery, and idempotency
[concurrency] [failure]
- partial failure and recovery
[failure]
- dependency availability and response behavior
[failure]
- migration, rollout, rollback, and version compatibility
[deploy]
- configuration and feature flags
[deploy]
- scale, pagination, and resource bounds
[failure]
- authorization, tenancy, and secrets
[security]
- observability and repair
[failure]
When a mode flag is given (see Modes), only pursue categories tagged
for that mode; skip the rest unless evidence for an in-scope category
surfaces an unavoidable out-of-scope risk (mention it briefly under
Unknowns rather than opening a full ledger entry for it).
Search for evidence.
- Read relevant tests, migrations, schemas, configuration, and documentation.
- Search for validation, database constraints, idempotency keys, locks,
retries, fallbacks, timeouts, metrics, alerts, and recovery paths.
- Do not assume a safeguard is absent until relevant nearby code has been
inspected.
Rank findings.
- P0: security breach, irreversible corruption, duplicate financial action,
or unsafe migration likely to fail rollout.
- P1: meaningful user impact under plausible production conditions.
- P2: a real risk that requires verification, documentation, or follow-up.
- P3: low-impact observation or weak-evidence hypothesis.
Produce the ledger.
- Prioritize high-evidence-confidence, high-impact findings.
- Include no more than 10 entries by default.
- If more than 10 valid findings exist, keep all P0 and P1 findings
first (never drop a P0 to make room for a lower-priority item), then
fill remaining slots with the highest-priority P2/P3 findings. State
the count of findings omitted and their priorities so the user knows
what was cut.
- Prefer concise evidence over a broad speculative checklist.
Offer next steps.
- Do not change code unless the user asks.
- If asked to fix findings, address one ledger entry at a time and add a
regression or falsification test where practical, using the test
framework, file layout, and naming conventions already present in
the repository rather than introducing a new one.
Required output format
# Assumptions: <scope>
**Scope:** <files, branch comparison, symbol, or feature analyzed>
**Overall risk:** <Low | Medium | High>
**Release blockers:** <count, or none found>
## Executive summary
<2-5 sentences describing the most important assumptions, evidence quality,
and recommended immediate action.>
## Ledger
| Priority | Assumption | Evidence | If false | Status | Falsification test | Recommended action | Evidence confidence |
|---|---|---|---|---|---|---|---|
Evidence must include a file path and line range when available (or file
path and symbol if a line range can't be produced). Status must be one of
Protected / Partially protected / Unprotected / Unknown, and must state
the search scope when reporting no safeguard was found.
## Existing safeguards
- <Only safeguards actually found in the repository.>
## Required verification before release
- [ ] <Specific verification, test, or operational check.>
## Unknowns and boundaries
- <Important runtime behavior that cannot be confirmed from repository
evidence.>
Terminology
- Assumption: A condition that must hold for the behavior to be safe or
correct, phrased as the condition itself (see "Phrasing assumptions as
conditions" above) — not as a description of what the code currently
appears to do.
- Status — Protected: A safeguard was found in the searched scope and
it appears to fully address the risk.
- Status — Partially protected: A safeguard exists but has an
identifiable gap (e.g. covers one call site but not another).
- Status — Unprotected: No safeguard was found within the stated
search scope.
- Status — Unknown: The reviewed scope doesn't contain enough
information to assign Protected, Partially protected, or Unprotected.
Pair this with a concrete verification step, not a guess.
- Evidence confidence — High: Direct, unambiguous evidence from code,
tests, schema, or config.
- Evidence confidence — Medium: Reasonable inference from related
code, without directly observing the behavior in question.
- Evidence confidence — Low: Thin or indirect evidence. Flag it as Low
rather than rounding up.
- Falsification test: A test or procedure designed to show whether the
assumption fails.
Status and evidence confidence are independent: a Protected status can
carry Low evidence confidence if the safeguard was only inferred, not
directly observed. Never substitute one label for the other, and never use
"Verified" as a stand-in for either — it conflates whether a safeguard
exists with whether the broader real-world claim is guaranteed.
What this skill must not do
- Invent business rules that do not appear in the repository or request.
- Treat every missing validation as a bug.
- Claim production behavior without evidence.
- Generate a generic "possible edge cases" checklist.
- Recommend sweeping refactors before identifying the actual risk.
- Automatically modify production-sensitive code without explicit approval.
- Label a concern "critical" merely because it sounds scary.
- Confuse an unknown external behavior with a verified flaw.
Modes
| Command |
Purpose |
Categories in scope |
/assumptions-scan |
Analyze the current diff or requested scope. |
All |
/assumptions-scan <file or symbol> |
Analyze one code path, module, endpoint, worker, or function. |
All |
/assumptions-scan --deploy |
Focus on migrations, rollouts, flags, version overlap, rollback, and compatibility. |
[deploy] |
/assumptions-scan --failure |
Focus on retries, partial failure, dependencies, timeouts, queues, and recovery. |
[failure] |
/assumptions-scan --concurrency |
Focus on races, duplicate delivery, locking, atomicity, and idempotency. |
[concurrency] |
/assumptions-scan --security |
Focus on identity, authorization, tenancy, secrets, trust boundaries, and data exposure. |
[security] |
/assumptions-scan --tests |
Produce falsification tests only. |
All (filtering happens on output, not investigation) |
/assumptions-scan --compact |
Produce a short PR-ready ledger. |
All (filtering happens on output, not investigation) |
Category tags match the ones used in step 3 of the Investigation
procedure. A mode restricts which categories are investigated; it does
not change the Core standard — every reported finding still needs
evidence with a locator, a consequence, a falsification test or
verification step, a status label, an evidence confidence label, and a
priority.
The /assumptions-scan ... notation above names the mode, not a
registered slash command — whether it becomes an actual slash command
depends on the host. Treat it as shorthand for "invoke Assumptions in
this mode," e.g. "Use Assumptions in deploy mode for this migration" and
/assumptions-scan --deploy refer to the same request.
--tests output format
Skip the full ledger. For each finding that would otherwise appear,
output only:
### <Priority> — <Assumption, one line>
**Falsification test:** <concrete steps or test code>
**Proves:** <what a pass/fail result tells you>
Order findings P0 first. Omit Evidence, Status, and Recommended action —
those belong in the full ledger, not this mode.
--compact output format
Produce the same investigation and the same Core standard, but render
only:
# Assumptions: <scope> (compact)
**Overall risk:** <Low | Medium | High> · **Release blockers:** <count>
| Priority | Assumption | If false | Falsification test |
|---|---|---|---|
Limit to the P0 and P1 rows; summarize P2/P3 findings, if any, as a
single trailing line ("N additional lower-priority findings omitted —
run without --compact for the full ledger").
1---2name: assumptions-23description: Generate an evidence-backed Assumptions ledger for a Git diff, feature, endpoint, worker, migration, or code path. Use when reviewing a change, asking what could break, preparing a release, finding edge cases, assessing deployment safety, analyzing retries or concurrency, or designing failure-focused tests.4---56# Assumptions78## Purpose910Identify the conditions a change silently depends on in order to work safely11in production.1213Produce a structured ledger of:14- hidden assumptions, phrased as conditions that must hold15- repository evidence, with a file and line locator where available16- failure modes17- existing safeguards18- falsification tests19- recommended controls20- status, evidence confidence, and priority2122This is not a generic code review. Do not report vague concerns.2324## Core standard2526Only report an assumption when you can provide all of the following:27281. The assumption stated as a falsifiable condition (what must hold, not29 what the current code does — see "Phrasing assumptions as conditions"30 below).312. Direct evidence from code, tests, configuration, schema, documentation,32 or the Git diff, with a file path and line range when the tooling33 available can produce one. If a line range is unavailable, cite the34 file path and the symbol (function, route, migration file) instead.35 Never present a claim as repository evidence without a locator.363. A concrete consequence if the assumption is false.374. Existing safeguards, or an explicit statement that none were found. A38 "none found" statement must name the scope that was searched (files,39 directories, or symbols) — see "Search boundary for absence claims"40 below. Do not write "none found" without saying where you looked.415. A practical falsification test or verification step.426. A status label: Protected, Partially protected, Unprotected, or Unknown43 (see "Status vs. evidence confidence" below).447. An evidence confidence label: High, Medium, or Low.458. A priority: P0, P1, P2, or P3.4647### Status vs. evidence confidence4849These are two different questions and must not be collapsed into one label.5051- **Status** answers: *does the repository protect against this condition52 failing?* Values: `Protected` (a safeguard was found and it appears to53 fully address the risk), `Partially protected` (a safeguard exists but54 has a gap), `Unprotected` (no safeguard was found in the searched55 scope), `Unknown` (the reviewed scope doesn't contain enough56 information to tell).57- **Evidence confidence** answers: *how solid is the evidence behind that58 status call?* Values: `High` (direct, unambiguous code/config/test59 evidence), `Medium` (reasonable inference from related code, but not a60 direct observation of the behavior in question), `Low` (thin or61 indirect evidence; flag this rather than rounding up to Medium).6263Do not label a status `Protected` or `Unprotected` as "Verified" — that64conflates whether a safeguard exists with whether the underlying65production behavior (e.g. "the gateway never retries") is actually66guaranteed. A status can have High evidence confidence while the broader67real-world claim it implies is still not fully knowable from the repo68alone; say so in "Unknowns and boundaries" rather than overstating the69status label.7071### Phrasing assumptions as conditions7273Phrase each assumption as the condition that must hold, not as a74description of what the current code appears to do. This keeps the75Assumption column stable even as Status changes across reviews.7677| Weaker phrasing (avoid) | Stronger phrasing (use) |78|---|---|79| "Refund processing is idempotent per request." | "Duplicate refund requests are prevented or safely deduplicated." |80| "The migration fully completes before any worker runs." | "New worker code remains safe before, during, and after the schema transition." |81| "The client can always tell whether the refund succeeded." | "A caller can reliably determine the outcome after a response interruption." |8283### Search boundary for absence claims8485"None found" is only meaningful if it states where the search happened.86Write it as:8788```89None found in src/refunds/, db/schema.sql, and tests/refunds/retry.test.ts;90queue configuration was not inspected.91```9293not as a bare "None found." An unqualified absence claim reads as94complete when it may only reflect a partial search.9596If evidence is insufficient to call a status `Protected` or `Unprotected`,97use `Unknown` and pair it with a concrete verification step rather than98guessing. An `Unknown` status is not a defect — it is a task for someone99with runtime or operational knowledge the repository doesn't contain.100101## Investigation procedure1021031. Determine scope.104 - If a Git repository and uncommitted changes exist, inspect the current diff.105 - Otherwise use the file, symbol, feature description, or user question.106 - State exactly what was analyzed.107 - **Empty scope:** if no diff exists and no file, symbol, or question was108 given, ask the user what to analyze rather than guessing or scanning109 the entire repository.110 - **Oversized scope:** if the diff or requested scope spans more files111 than can be read carefully (as a guide, more than ~15 changed files),112 do not sample arbitrarily. Instead, identify the highest-risk113 subset (new endpoints, migrations, auth/payment code, concurrency-114 sensitive paths) and state explicitly which files were excluded and115 why, so the user can request a follow-up pass on the rest.116 - **Two-stage output for oversized scope:** before producing the117 ledger, output a short review plan naming the high-risk paths118 selected for this pass and the paths excluded, e.g.:119 ```120 ## Review plan121122 High-risk paths selected:123 - New payment endpoint124 - Migration125126 Excluded for this pass:127 - UI-only files128 - Generated client files129 ```130 Then produce the ledger for the selected paths only. This makes the131 scoping decision visible before any conclusions are drawn from it.1321332. Map the changed behavior.134 - Identify entry points, callers, data reads/writes, side effects, external135 calls, queues, caches, feature flags, authorization checks, and tests.136 - Inspect adjacent code needed to understand the behavior.1371383. Identify implied conditions.139 Look for assumptions about (category tag in brackets):140 - input validity and nullability `[input]`141 - data shape and historical records `[input]`142 - uniqueness and ownership `[security]` `[concurrency]`143 - ordering, time, and expiry `[concurrency]`144 - concurrency and atomicity `[concurrency]`145 - retries, duplicate delivery, and idempotency `[concurrency]` `[failure]`146 - partial failure and recovery `[failure]`147 - dependency availability and response behavior `[failure]`148 - migration, rollout, rollback, and version compatibility `[deploy]`149 - configuration and feature flags `[deploy]`150 - scale, pagination, and resource bounds `[failure]`151 - authorization, tenancy, and secrets `[security]`152 - observability and repair `[failure]`153154 When a mode flag is given (see Modes), only pursue categories tagged155 for that mode; skip the rest unless evidence for an in-scope category156 surfaces an unavoidable out-of-scope risk (mention it briefly under157 Unknowns rather than opening a full ledger entry for it).1581594. Search for evidence.160 - Read relevant tests, migrations, schemas, configuration, and documentation.161 - Search for validation, database constraints, idempotency keys, locks,162 retries, fallbacks, timeouts, metrics, alerts, and recovery paths.163 - Do not assume a safeguard is absent until relevant nearby code has been164 inspected.1651665. Rank findings.167 - P0: security breach, irreversible corruption, duplicate financial action,168 or unsafe migration likely to fail rollout.169 - P1: meaningful user impact under plausible production conditions.170 - P2: a real risk that requires verification, documentation, or follow-up.171 - P3: low-impact observation or weak-evidence hypothesis.1721736. Produce the ledger.174 - Prioritize high-evidence-confidence, high-impact findings.175 - Include no more than 10 entries by default.176 - If more than 10 valid findings exist, keep all P0 and P1 findings177 first (never drop a P0 to make room for a lower-priority item), then178 fill remaining slots with the highest-priority P2/P3 findings. State179 the count of findings omitted and their priorities so the user knows180 what was cut.181 - Prefer concise evidence over a broad speculative checklist.1821837. Offer next steps.184 - Do not change code unless the user asks.185 - If asked to fix findings, address one ledger entry at a time and add a186 regression or falsification test where practical, using the test187 framework, file layout, and naming conventions already present in188 the repository rather than introducing a new one.189190## Required output format191192```193# Assumptions: <scope>194195**Scope:** <files, branch comparison, symbol, or feature analyzed>196**Overall risk:** <Low | Medium | High>197**Release blockers:** <count, or none found>198199## Executive summary200201<2-5 sentences describing the most important assumptions, evidence quality,202and recommended immediate action.>203204## Ledger205206| Priority | Assumption | Evidence | If false | Status | Falsification test | Recommended action | Evidence confidence |207|---|---|---|---|---|---|---|---|208209Evidence must include a file path and line range when available (or file210path and symbol if a line range can't be produced). Status must be one of211Protected / Partially protected / Unprotected / Unknown, and must state212the search scope when reporting no safeguard was found.213214## Existing safeguards215216- <Only safeguards actually found in the repository.>217218## Required verification before release219220- [ ] <Specific verification, test, or operational check.>221222## Unknowns and boundaries223224- <Important runtime behavior that cannot be confirmed from repository225 evidence.>226```227228## Terminology229230- **Assumption:** A condition that must hold for the behavior to be safe or231 correct, phrased as the condition itself (see "Phrasing assumptions as232 conditions" above) — not as a description of what the code currently233 appears to do.234- **Status — Protected:** A safeguard was found in the searched scope and235 it appears to fully address the risk.236- **Status — Partially protected:** A safeguard exists but has an237 identifiable gap (e.g. covers one call site but not another).238- **Status — Unprotected:** No safeguard was found within the stated239 search scope.240- **Status — Unknown:** The reviewed scope doesn't contain enough241 information to assign Protected, Partially protected, or Unprotected.242 Pair this with a concrete verification step, not a guess.243- **Evidence confidence — High:** Direct, unambiguous evidence from code,244 tests, schema, or config.245- **Evidence confidence — Medium:** Reasonable inference from related246 code, without directly observing the behavior in question.247- **Evidence confidence — Low:** Thin or indirect evidence. Flag it as Low248 rather than rounding up.249- **Falsification test:** A test or procedure designed to show whether the250 assumption fails.251252Status and evidence confidence are independent: a `Protected` status can253carry `Low` evidence confidence if the safeguard was only inferred, not254directly observed. Never substitute one label for the other, and never use255"Verified" as a stand-in for either — it conflates whether a safeguard256exists with whether the broader real-world claim is guaranteed.257258## What this skill must not do259260- Invent business rules that do not appear in the repository or request.261- Treat every missing validation as a bug.262- Claim production behavior without evidence.263- Generate a generic "possible edge cases" checklist.264- Recommend sweeping refactors before identifying the actual risk.265- Automatically modify production-sensitive code without explicit approval.266- Label a concern "critical" merely because it sounds scary.267- Confuse an unknown external behavior with a verified flaw.268269## Modes270271| Command | Purpose | Categories in scope |272|---|---|---|273| `/assumptions-scan` | Analyze the current diff or requested scope. | All |274| `/assumptions-scan <file or symbol>` | Analyze one code path, module, endpoint, worker, or function. | All |275| `/assumptions-scan --deploy` | Focus on migrations, rollouts, flags, version overlap, rollback, and compatibility. | `[deploy]` |276| `/assumptions-scan --failure` | Focus on retries, partial failure, dependencies, timeouts, queues, and recovery. | `[failure]` |277| `/assumptions-scan --concurrency` | Focus on races, duplicate delivery, locking, atomicity, and idempotency. | `[concurrency]` |278| `/assumptions-scan --security` | Focus on identity, authorization, tenancy, secrets, trust boundaries, and data exposure. | `[security]` |279| `/assumptions-scan --tests` | Produce falsification tests only. | All (filtering happens on output, not investigation) |280| `/assumptions-scan --compact` | Produce a short PR-ready ledger. | All (filtering happens on output, not investigation) |281282Category tags match the ones used in step 3 of the Investigation283procedure. A mode restricts which categories are investigated; it does284not change the Core standard — every reported finding still needs285evidence with a locator, a consequence, a falsification test or286verification step, a status label, an evidence confidence label, and a287priority.288289The `/assumptions-scan ...` notation above names the mode, not a290registered slash command — whether it becomes an actual slash command291depends on the host. Treat it as shorthand for "invoke Assumptions in292this mode," e.g. "Use Assumptions in deploy mode for this migration" and293`/assumptions-scan --deploy` refer to the same request.294295### `--tests` output format296297Skip the full ledger. For each finding that would otherwise appear,298output only:299300```301### <Priority> — <Assumption, one line>302303**Falsification test:** <concrete steps or test code>304**Proves:** <what a pass/fail result tells you>305```306307Order findings P0 first. Omit Evidence, Status, and Recommended action —308those belong in the full ledger, not this mode.309310### `--compact` output format311312Produce the same investigation and the same Core standard, but render313only:314315```316# Assumptions: <scope> (compact)317318**Overall risk:** <Low | Medium | High> · **Release blockers:** <count>319320| Priority | Assumption | If false | Falsification test |321|---|---|---|---|322```323324Limit to the P0 and P1 rows; summarize P2/P3 findings, if any, as a325single trailing line ("N additional lower-priority findings omitted —326run without `--compact` for the full ledger").