Edge case exploration. 12 dimensions, scored by likelihood x impact. Runnable tests for HIGH+.
From godmodenpx claudepluginhub arbazkhan971/godmodeThis skill uses the workspace's default tool permissions.
Designs and optimizes AI agent action spaces, tool definitions, observation formats, error recovery, and context for higher task completion rates.
Enables AI agents to execute x402 payments with per-task budgets, spending controls, and non-custodial wallets via MCP tools. Use when agents pay for APIs, services, or other agents.
Compares coding agents like Claude Code and Aider on custom YAML-defined codebase tasks using git worktrees, measuring pass rate, cost, time, and consistency.
/godmode:scenario, "edge cases", "failure modes"Read spec, plan, and code. Trace the data flow:
Input -> Validation -> Transform -> Logic -> Persist
-> Side Effects -> Response
For each stage list:
Print: [scenario:read] Feature: {name} | {N} calls | {N} mutations | {N} side effects | {N} boundaries
Entry points: API routes, CLI, UI events, cron, queues
Dependencies: services, DBs, caches, third-party APIs
Data shapes: input schemas, output schemas, models
For EACH dimension, generate 2-5 specific scenarios. Every scenario MUST reference a code path (file:line).
| # | Dimension | What to explore |
|---|---|---|
| 1 | Invalid Input | SQL injection, XSS, >64KB strings |
| 2 | Boundary | 0, -1, MAX_INT+1, empty, null |
| 3 | Concurrency | Race conditions, double-submit |
| 4 | Network | Timeout, partial response, DNS |
| 5 | Data Integrity | Orphans, constraint violations |
| 6 | Auth | Expired tokens, privilege escalation |
| 7 | Time | Timezone, DST, leap seconds, TTL |
| 8 | Scale | 10x load, large payloads, N+1 |
| 9 | Failure | Crash mid-write, OOM, disk full |
| 10 | Migration | Schema change, data backfill |
| 11 | User Error | Double-click, back button, paste |
| 12 | Config | Missing env var, wrong region |
IF dimension truly N/A: one-sentence justification. "N/A" alone is not acceptable.
CRITICAL: Score >= 20 (e.g., L=5 x I=4)
HIGH: Score 12-19
MEDIUM: Score 6-11
LOW: Score 1-5
Minimum valid score is 1. Zero is invalid.
IF scenario covers <80% of edge cases: add more. WHEN risk score >7: escalate to team lead.
Sort by score descending. Within same score:
DIMENSION | SCENARIO | L | I | SCORE
Invalid Input | SQL injection search | 4 | 5 | 20
Concurrency | Race on balance | 3 | 5 | 15
For every scenario scored 12+:
# Detect test framework
ls package.json pytest.ini Cargo.toml 2>/dev/null
cat package.json 2>/dev/null | grep -E "vitest|jest|mocha"
# Run generated tests
npx vitest run tests/scenarios/ 2>&1
tests/scenarios/{feature}.scenario.test.{ext}test_cmd -- tests/scenarios/{feature}.scenario.test.{ext}
BUG_FOUNDScenario Analysis: {feature}
{total} scenarios across 12 dimensions
{critical} CRITICAL | {high} HIGH | {medium} MEDIUM
{tests} tests generated | {bugs} bugs found
File: .godmode/scenario-log.tsv
timestamp feature dimension scenario L I score severity test_file code_ref status
Status: TEST_PASS, TEST_FAIL, BUG_FOUND, NO_TEST
KEEP if: test is valid AND uses real code paths
AND follows ARRANGE/ACT/ASSERT
DISCARD if: syntax errors after 2 fixes
OR references nonexistent code
On discard: log as NO_TEST. No stub tests.
STOP when FIRST of:
- All 12 dimensions explored AND HIGH+ have tests
- 3 consecutive dimensions produce 0 HIGH+ scenarios
- >5 test generation failures with no output