ck:scenario — Edge Case & Scenario Explorer
Decompose any feature or code path across 12 dimensions to surface edge cases, risks, and test targets before implementation begins.
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
- Read target file(s) or parse feature description from argument
- 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
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 |
ck:test |
Pass scenario table as input context |
| Inform implementation plan risks |
ck:plan |
Paste Critical/High rows into risk assessment |
| Deep persona debate on top risks |
ck:predict |
Feed Critical scenarios as the change proposal |
Example Invocations
/ck:scenario src/api/payment.ts
/ck:scenario "User registration with OAuth providers"
/ck:scenario src/middleware/auth.ts
/ck:scenario "Add multi-tenancy to the database layer"
1---2name: ck-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# ck:scenario — Edge Case & Scenario Explorer78Decompose any feature or code path across 12 dimensions to surface edge cases, risks, and test targets before implementation begins.910## When to Use1112- Before implementing complex or stateful features13- Before writing tests (generates test targets)14- Risk assessment during planning or code review15- API design review — surface contract edge cases early1617## When NOT to Use1819- Trivial single-line changes or cosmetic UI tweaks20- Already well-tested, stable code with no recent modifications21- Pure configuration changes with no logic paths2223---2425## 12 Decomposition Dimensions2627Not all 12 apply to every feature. Identify relevant dimensions first, then generate scenarios only for those.2829| # | Dimension | What to Look For |30|---|-----------|------------------|31| 1 | **User Types** | admin, guest, banned, new user, power user, bot/scraper |32| 2 | **Input Extremes** | empty, null, max length, unicode, special chars, SQL/script injection |33| 3 | **Timing** | concurrent access, race conditions, timeout, slow network, retry storms |34| 4 | **Scale** | 0 items, 1 item, 1M items, pagination boundary, cursor wrap |35| 5 | **State Transitions** | first use, mid-flow abort, resume after crash, partial completion |36| 6 | **Environment** | mobile/low-end CPU, no JS, screen reader, proxy/VPN, different timezone/locale |37| 7 | **Error Cascades** | DB down, API timeout, disk full, OOM, network partition, partial write |38| 8 | **Authorization** | expired token, wrong role, shared/public link, CORS, CSRF, privilege escalation |39| 9 | **Data Integrity** | duplicate entries, orphan references, encoding mismatch, concurrent schema migration |40| 10 | **Integration** | webhook replay, API version mismatch, third-party outage, contract drift |41| 11 | **Compliance** | GDPR deletion request, audit logging gap, data retention, accidental PII exposure |42| 12 | **Business Logic** | edge pricing (zero/negative), coupon stacking, refund after partial delivery, free tier limits |4344---4546## Workflow47481. **Read** target file(s) or parse feature description from argument492. **Filter dimensions** — mark which of the 12 apply; skip irrelevant ones explicitly503. **Generate 3–5 scenarios** per relevant dimension514. **Categorize severity** — Critical / High / Medium / Low525. **Output** as structured table (see format below)536. **Summarize** total scenario count by severity5455### Severity Criteria5657| Level | Meaning |58|-------|---------|59| **Critical** | Data loss, security breach, auth bypass, silent corruption |60| **High** | Feature broken for a subset of users, data inconsistency |61| **Medium** | Degraded UX, recoverable error not surfaced to user |62| **Low** | Minor visual glitch, non-blocking warning |6364---6566## Output Format6768```69## Scenario Report: [target]7071Dimensions analyzed: [list]72Dimensions skipped: [list + reason]7374| # | Dimension | Scenario | Severity | Expected Behavior |75|---|-----------|----------|----------|-------------------|76| 1 | Input Extremes | Empty string for required name field | High | Return 400 with field error |77| 2 | Authorization | Expired JWT accessing protected route | Critical | Redirect to login, invalidate session |78| 3 | Timing | Two users submit same form simultaneously | High | Idempotency key or conflict error |7980### Summary81- Critical: N82- High: N83- Medium: N84- Low: N85- Total: N scenarios across X dimensions86```8788---8990## Integration with Other Skills9192| Next Step | Skill | How |93|-----------|-------|-----|94| Generate test cases from scenarios | `ck:test` | Pass scenario table as input context |95| Inform implementation plan risks | `ck:plan` | Paste Critical/High rows into risk assessment |96| Deep persona debate on top risks | `ck:predict` | Feed Critical scenarios as the change proposal |9798---99100## Example Invocations101102```103/ck:scenario src/api/payment.ts104/ck:scenario "User registration with OAuth providers"105/ck:scenario src/middleware/auth.ts106/ck:scenario "Add multi-tenancy to the database layer"107```