vc-scenario — Edge Case & Scenario Explorer
Output style: Follow process/development-protocols/communication-standards.md — answer-first, plain language, no unexplained jargon, TL;DR on long responses.
Decompose any feature or code path across 12 dimensions to surface edge cases, risks, and test targets before implementation begins.
Mode Selection
Choose a mode before generating scenarios. Default is Simple unless a trigger condition applies.
Simple Mode (default)
Generates edge cases from the plan description, checklist item, or approach text provided in the prompt. No subagent spawned.
Use when:
- The checklist item is self-contained and clearly described
- Blast radius is narrow (1–2 files, single package)
- No auth, billing, schema, or external API surface is touched
- Speed matters and hypothetical coverage is sufficient
Deep Mode
Spawns a research subagent to read the actual source before generating scenarios. Scenarios reference real variable names, real function signatures, and real failure modes visible in the code rather than hypothetical ones.
Trigger conditions (any one):
- Checklist item modifies an auth, billing, schema, or external API surface
- Blast radius spans 3+ files or 2+ packages
- The plan marks the item as
HIGH_RISK
- Caller explicitly requests deep mode
Deep mode subagent steps:
- Reads the actual source files being modified (from plan Touchpoints)
- Locates and reads existing test files for those files (via grep for import paths or describe blocks)
- Reads any Public Contracts affected (from plan's Public Contracts section)
- Returns: real function signatures, actual data shapes, existing test coverage gaps, real failure modes visible in the code
The orchestrator then generates scenarios using the research output.
Output quality difference
| Mode |
Example scenario |
| Simple |
"What if the input is null?" |
| Deep |
"What if creditBalance.available is 0 but creditBalance.pending is positive — does deductCredits(amount) check available-only or available + pending?" |
Simple mode surfaces generic edge cases quickly. Deep mode surfaces scenarios that are only discoverable by reading the actual implementation.
When to Use
- Before implementing complex or stateful features
- Before writing tests (generates test targets)
- Risk assessment during planning or code review
- API design review — surface contract edge cases early
When NOT to Use
- Trivial single-line changes or cosmetic UI tweaks
- Already well-tested, stable code with no recent modifications
- Pure configuration changes with no logic paths
12 Decomposition Dimensions
Not all 12 apply to every feature. Identify relevant dimensions first, then generate scenarios only for those.
| # |
Dimension |
What to Look For |
| 1 |
User Types |
admin, guest, banned, new user, power user, bot/scraper |
| 2 |
Input Extremes |
empty, null, max length, unicode, special chars, SQL/script injection |
| 3 |
Timing |
concurrent access, race conditions, timeout, slow network, retry storms |
| 4 |
Scale |
0 items, 1 item, 1M items, pagination boundary, cursor wrap |
| 5 |
State Transitions |
first use, mid-flow abort, resume after crash, partial completion |
| 6 |
Environment |
mobile/low-end CPU, no JS, screen reader, proxy/VPN, different timezone/locale |
| 7 |
Error Cascades |
DB down, API timeout, disk full, OOM, network partition, partial write |
| 8 |
Authorization |
expired token, wrong role, shared/public link, CORS, CSRF, privilege escalation |
| 9 |
Data Integrity |
duplicate entries, orphan references, encoding mismatch, concurrent schema migration |
| 10 |
Integration |
webhook replay, API version mismatch, third-party outage, contract drift |
| 11 |
Compliance |
GDPR deletion request, audit logging gap, data retention, accidental PII exposure |
| 12 |
Business Logic |
edge pricing (zero/negative), coupon stacking, refund after partial delivery, free tier limits |
Workflow
Step 0 — Select mode using the Mode Selection rules above.
Simple mode:
- Parse feature description or checklist item from the prompt
- Filter dimensions — mark which of the 12 apply; skip irrelevant ones explicitly
- Generate 3–5 scenarios per relevant dimension
- Categorize severity — Critical / High / Medium / Low
- Output as structured table (see format below)
- Summarize total scenario count by severity
Deep mode:
- Spawn research subagent — pass Touchpoints, Public Contracts, and checklist item text
- Subagent returns real function signatures, data shapes, coverage gaps, visible failure modes
- Filter dimensions using research output to remove inapplicable ones
- Generate 3–5 scenarios per relevant dimension, referencing actual variable/function names
- Categorize severity — Critical / High / Medium / Low
- Output as structured table annotated with source evidence (file + line where relevant)
- Summarize total scenario count by severity
Severity Criteria
| Level |
Meaning |
| Critical |
Data loss, security breach, auth bypass, silent corruption |
| High |
Feature broken for a subset of users, data inconsistency |
| Medium |
Degraded UX, recoverable error not surfaced to user |
| Low |
Minor visual glitch, non-blocking warning |
Output Format
## Scenario Report: [target]
Dimensions analyzed: [list]
Dimensions skipped: [list + reason]
| # | Dimension | Scenario | Severity | Expected Behavior |
|---|-----------|----------|----------|-------------------|
| 1 | Input Extremes | Empty string for required name field | High | Return 400 with field error |
| 2 | Authorization | Expired JWT accessing protected route | Critical | Redirect to login, invalidate session |
| 3 | Timing | Two users submit same form simultaneously | High | Idempotency key or conflict error |
### Summary
- Critical: N
- High: N
- Medium: N
- Low: N
- Total: N scenarios across X dimensions
Integration with Other Skills
| Next Step |
Skill |
How |
| Generate test cases from scenarios |
vc-test |
Pass scenario table as input context |
| Inform implementation plan risks |
generate-plan / plan-agent |
Paste Critical/High rows into risk assessment |
| Deep persona debate on top risks |
vc-predict |
Feed Critical scenarios as the change proposal |
Example Invocations
# Simple mode (default — self-contained, narrow blast radius)
/vc-scenario src/api/payment.ts
/vc-scenario "User registration with OAuth providers"
/vc-scenario src/middleware/auth.ts
# Deep mode (auto-triggered: billing surface, 3+ files)
/vc-scenario "Deduct credits on model usage — touches CreditBalance, CreditTransaction, usage-sync.ts"
# Deep mode (explicit request)
/vc-scenario --deep "Add multi-tenancy to the database layer"
1---2name: vc-scenario3description: Generate comprehensive edge cases and test scenarios by decomposing features across 12 dimensions. Use before implementation or testing to catch issues early.4---56# vc-scenario — Edge Case & Scenario Explorer78> **Output style:** Follow `process/development-protocols/communication-standards.md` — answer-first, plain language, no unexplained jargon, TL;DR on long responses.910Decompose any feature or code path across 12 dimensions to surface edge cases, risks, and test targets before implementation begins.1112## Mode Selection1314Choose a mode before generating scenarios. Default is Simple unless a trigger condition applies.1516### Simple Mode (default)1718Generates edge cases from the plan description, checklist item, or approach text provided in the prompt. No subagent spawned.1920**Use when:**21- The checklist item is self-contained and clearly described22- Blast radius is narrow (1–2 files, single package)23- No auth, billing, schema, or external API surface is touched24- Speed matters and hypothetical coverage is sufficient2526### Deep Mode2728Spawns a research subagent to read the actual source before generating scenarios. Scenarios reference real variable names, real function signatures, and real failure modes visible in the code rather than hypothetical ones.2930**Trigger conditions (any one):**31- Checklist item modifies an auth, billing, schema, or external API surface32- Blast radius spans 3+ files or 2+ packages33- The plan marks the item as `HIGH_RISK`34- Caller explicitly requests deep mode3536**Deep mode subagent steps:**371. Reads the actual source files being modified (from plan Touchpoints)382. Locates and reads existing test files for those files (via grep for import paths or describe blocks)393. Reads any Public Contracts affected (from plan's Public Contracts section)404. Returns: real function signatures, actual data shapes, existing test coverage gaps, real failure modes visible in the code4142The orchestrator then generates scenarios using the research output.4344### Output quality difference4546| Mode | Example scenario |47|------|-----------------|48| Simple | "What if the input is null?" |49| Deep | "What if `creditBalance.available` is 0 but `creditBalance.pending` is positive — does `deductCredits(amount)` check `available`-only or `available + pending`?" |5051Simple mode surfaces generic edge cases quickly. Deep mode surfaces scenarios that are only discoverable by reading the actual implementation.5253---5455## When to Use5657- Before implementing complex or stateful features58- Before writing tests (generates test targets)59- Risk assessment during planning or code review60- API design review — surface contract edge cases early6162## When NOT to Use6364- Trivial single-line changes or cosmetic UI tweaks65- Already well-tested, stable code with no recent modifications66- Pure configuration changes with no logic paths6768---6970## 12 Decomposition Dimensions7172Not all 12 apply to every feature. Identify relevant dimensions first, then generate scenarios only for those.7374| # | Dimension | What to Look For |75|---|-----------|------------------|76| 1 | **User Types** | admin, guest, banned, new user, power user, bot/scraper |77| 2 | **Input Extremes** | empty, null, max length, unicode, special chars, SQL/script injection |78| 3 | **Timing** | concurrent access, race conditions, timeout, slow network, retry storms |79| 4 | **Scale** | 0 items, 1 item, 1M items, pagination boundary, cursor wrap |80| 5 | **State Transitions** | first use, mid-flow abort, resume after crash, partial completion |81| 6 | **Environment** | mobile/low-end CPU, no JS, screen reader, proxy/VPN, different timezone/locale |82| 7 | **Error Cascades** | DB down, API timeout, disk full, OOM, network partition, partial write |83| 8 | **Authorization** | expired token, wrong role, shared/public link, CORS, CSRF, privilege escalation |84| 9 | **Data Integrity** | duplicate entries, orphan references, encoding mismatch, concurrent schema migration |85| 10 | **Integration** | webhook replay, API version mismatch, third-party outage, contract drift |86| 11 | **Compliance** | GDPR deletion request, audit logging gap, data retention, accidental PII exposure |87| 12 | **Business Logic** | edge pricing (zero/negative), coupon stacking, refund after partial delivery, free tier limits |8889---9091## Workflow9293**Step 0 — Select mode** using the Mode Selection rules above.9495**Simple mode:**96971. **Parse** feature description or checklist item from the prompt982. **Filter dimensions** — mark which of the 12 apply; skip irrelevant ones explicitly993. **Generate 3–5 scenarios** per relevant dimension1004. **Categorize severity** — Critical / High / Medium / Low1015. **Output** as structured table (see format below)1026. **Summarize** total scenario count by severity103104**Deep mode:**1051061. **Spawn research subagent** — pass Touchpoints, Public Contracts, and checklist item text1072. **Subagent returns** real function signatures, data shapes, coverage gaps, visible failure modes1083. **Filter dimensions** using research output to remove inapplicable ones1094. **Generate 3–5 scenarios** per relevant dimension, referencing actual variable/function names1105. **Categorize severity** — Critical / High / Medium / Low1116. **Output** as structured table annotated with source evidence (file + line where relevant)1127. **Summarize** total scenario count by severity113114### Severity Criteria115116| Level | Meaning |117|-------|---------|118| **Critical** | Data loss, security breach, auth bypass, silent corruption |119| **High** | Feature broken for a subset of users, data inconsistency |120| **Medium** | Degraded UX, recoverable error not surfaced to user |121| **Low** | Minor visual glitch, non-blocking warning |122123---124125## Output Format126127```128## Scenario Report: [target]129130Dimensions analyzed: [list]131Dimensions skipped: [list + reason]132133| # | Dimension | Scenario | Severity | Expected Behavior |134|---|-----------|----------|----------|-------------------|135| 1 | Input Extremes | Empty string for required name field | High | Return 400 with field error |136| 2 | Authorization | Expired JWT accessing protected route | Critical | Redirect to login, invalidate session |137| 3 | Timing | Two users submit same form simultaneously | High | Idempotency key or conflict error |138139### Summary140- Critical: N141- High: N142- Medium: N143- Low: N144- Total: N scenarios across X dimensions145```146147---148149## Integration with Other Skills150151| Next Step | Skill | How |152|-----------|-------|-----|153| Generate test cases from scenarios | `vc-test` | Pass scenario table as input context |154| Inform implementation plan risks | `generate-plan` / `plan-agent` | Paste Critical/High rows into risk assessment |155| Deep persona debate on top risks | `vc-predict` | Feed Critical scenarios as the change proposal |156157---158159## Example Invocations160161```162# Simple mode (default — self-contained, narrow blast radius)163/vc-scenario src/api/payment.ts164/vc-scenario "User registration with OAuth providers"165/vc-scenario src/middleware/auth.ts166167# Deep mode (auto-triggered: billing surface, 3+ files)168/vc-scenario "Deduct credits on model usage — touches CreditBalance, CreditTransaction, usage-sync.ts"169170# Deep mode (explicit request)171/vc-scenario --deep "Add multi-tenancy to the database layer"172```