scenario-decomposer·authoring·active

Scenario Decomposer

Breaks a normalized requirement into happy paths, edge cases, and negative paths. Anchors edge cases on real boundaries — timing, encoding, concurrency, exhaustion.

TARAcursorclaude-codetrigger · agent
Scenario Decomposer
Takes the normalized intent graph fromRequirement Parser and breaks it into a set of independently-testable scenarios — happy paths first, then edges anchored on real boundaries.
When this skill fires
·Immediately afterRequirement Parser completes
·On re-author requests when the engineer expands or narrows the requirement scope
Decomposition strategy
The decomposer doesn't try to be exhaustive — it tries to be non-overlapping. Two scenarios that exercise the same code path are a smell; one of them is dropped or merged.
Happy paths
For each contract, exactly one happy-path scenario covers the canonical success case. No edge data, no near-miss timing.
Edge cases
Edge cases are anchored on four boundary classes:
·Timing — race conditions, deadline-just-missed, retry windows
·Encoding — Unicode, very long inputs, mixed scripts, emoji in identifiers
·Concurrency — same actor from multiple sessions, conflicting writes, lock contention
·Exhaustion — quota hit, pool drained, retry budget consumed
Negative paths
Negative scenarios cover *intentional* misuse — invalid inputs, expired tokens, unauthorized access. They're tagged [NEGATIVE] so EVAN knows to assert on rejection rather than success.
What it produces
A scenario list, where each entry has:
·A short imperative title
·A tag ([HAPPY], [EDGE], [NEGATIVE])
·The actor + contract + side-effects subset it covers
·A rationale (one sentence — why this scenario earned its slot)
Why the rationale matters
The rationale is what makesScenario Decomposer auditable. When an engineer reviews TARA's output, they see why each scenario exists, not just that it does. Scenarios without rationales get pruned.
Example
Input contract:Login with rate limiting + lockout
Output scenarios:
·Successful login with valid credentials [HAPPY] — establishes the canonical path
·Failed login increments attempt counter [HAPPY] — verifies the counter is the source of truth
·Account locks after 5 failed attempts [EDGE] — boundary test on the threshold
·Concurrent login attempts from different IPs [EDGE] — concurrency boundary
·SQL injection in email field [NEGATIVE] — input validation