Write a Use Case Specification
Purpose
Describe one actor goal as a complete, step-by-step interaction with the system, including every way it can branch or fail, so that designers, developers and testers share one precise behavioral model.
When to use
- An interaction has many alternate or exception paths that stories alone would scatter.
- Several actors or external systems take turns within one goal.
- A contract, vendor or regulated context requires a formal behavioral description.
When not to use
- Behavior is simple and the team works from backlog items. Use
user-story with acceptance-criteria.
- A whole system's behavior across many functions is needed. Use
frd-writing.
- Only message order between systems matters. Use
sequence-flow.
Inputs
Required:
- The actor goal (use case name) and a description of how it happens today or should happen.
Optional, improves quality:
- Business rules, process models, screen sketches, integration descriptions, known failure cases, the organization's use case template.
If the goal or the basic flow is missing, ask for it. Ask at most 5 blocking questions at a time; keep the rest as open questions.
Process
- Name the use case as the primary actor's goal: verb + object ("Return purchased item"). Set level (user goal or subfunction) and scope (which system is the black box).
- List the primary actor, supporting actors (people and systems) and stakeholders with their interest in the outcome.
- Define the trigger, preconditions (what the system guarantees before start) and guarantees: minimal guarantee (true even on failure, e.g. audit record) and success guarantee.
- Write the main success scenario as 5-12 numbered steps, each "actor does / system does", in the actor's language and without UI detail.
- For every step ask "what else can happen here?" and write alternate flows (valid variations) as
3a, 3b with the condition, steps and where they rejoin or end.
- Write exception flows for failures: invalid data, rule violation, timeout or unavailable external system, cancellation, concurrent change. State the end state of each.
- Reference business rules by ID instead of embedding them; list new rules found and mark inferred ones
[ASSUMPTION].
- Add special requirements that apply only to this use case (response time, audit, accessibility) and data touched.
- Check that the main scenario delivers the success guarantee and every branch ends in a defined state.
- List open questions with owners.
- If the goal continues, suggest
error-scenario-catalog for detailed failure handling, business-rules-catalog for the rules, or sequence-flow for system interactions.
Output format
# UC-<nn> <Goal name>
| Field | Value |
|---|---|
| Level / Scope | <user goal / subfunction> · <system> |
| Primary actor | ... |
| Supporting actors | ... |
| Stakeholders and interests | ... |
| Trigger | ... |
| Preconditions | ... |
| Minimal guarantee | ... |
| Success guarantee | ... |
## Main Success Scenario
1. ...
## Alternate Flows
- 3a. <condition>: 3a1 ... → rejoins at step 4
## Exception Flows
- 5x. <failure>: ... → ends with <state>
## Business Rules Referenced
## Special Requirements and Data
## Assumptions and Open Questions
Quality checklist
Common pitfalls
- Writing the use case as a screen walkthrough ("clicks OK"). Describe intent and system response; leave controls to design.
- Stuffing branches into the main scenario with "if". Keep the main scenario linear and move every condition to an extension.
- Use cases at the wrong level ("Log in" as a user goal). Treat such steps as subfunctions referenced from goal-level use cases.
Example
Input: "Customer returns an item in store; card purchases are refunded to the card, missing receipts are handled somehow."
Excerpt of output:
Main success scenario:
- Customer presents the item and receipt to the clerk.
- Clerk identifies the sale by receipt number.
- System shows the sale and the items eligible for return under BR-12.
- Clerk selects the item and return reason.
- System calculates the refund and requests card refund from the payment provider.
- System records the return and prints the return slip.
Alternate flows:
- 1a. No receipt: clerk searches by card used
[ASSUMPTION]; if no sale is found, see open question 1.
Exception flows:
- 5x. Payment provider unavailable: system records the return as "Refund pending" and retries
[TBD: retry policy]; the customer receives a pending slip.
Open question 1: Is a refund without receipt allowed, and as store credit? — Retail operations
1---2name: use-case-spec3description: "Writes a use case specification with goal, primary and supporting actors, stakeholders' interests, trigger, preconditions, minimal and success guarantees, a numbered main success scenario, and alternate and exception flows keyed to the steps they branch from. Use when an interaction has many branches, several actors or system-to-system steps, or when asked for a 'use case', 'UC spec' or 'fully dressed use case'."4license: MIT5metadata:6 source: https://skillmd.com/skills/muratdincer/use-case-spec7 version: "1.0.0"8 language: en9 category: 01-business-analysis10 role: business-analyst11 area: documentation12 title: "Write a use case specification"13 related: "frd-writing, user-story, business-rules-catalog, error-scenario-catalog, sequence-flow"14 prompt: "Write the use case for 'Return a purchased item in store' with card refunds and missing receipts."15---1617# Write a Use Case Specification1819## Purpose20Describe one actor goal as a complete, step-by-step interaction with the system, including every way it can branch or fail, so that designers, developers and testers share one precise behavioral model.2122## When to use23- An interaction has many alternate or exception paths that stories alone would scatter.24- Several actors or external systems take turns within one goal.25- A contract, vendor or regulated context requires a formal behavioral description.2627## When not to use28- Behavior is simple and the team works from backlog items. Use `user-story` with `acceptance-criteria`.29- A whole system's behavior across many functions is needed. Use `frd-writing`.30- Only message order between systems matters. Use `sequence-flow`.3132## Inputs33Required:34- The actor goal (use case name) and a description of how it happens today or should happen.3536Optional, improves quality:37- Business rules, process models, screen sketches, integration descriptions, known failure cases, the organization's use case template.3839If the goal or the basic flow is missing, ask for it. Ask at most 5 blocking questions at a time; keep the rest as open questions.4041## Process421. Name the use case as the primary actor's goal: verb + object ("Return purchased item"). Set level (user goal or subfunction) and scope (which system is the black box).432. List the primary actor, supporting actors (people and systems) and stakeholders with their interest in the outcome.443. Define the trigger, preconditions (what the system guarantees before start) and guarantees: minimal guarantee (true even on failure, e.g. audit record) and success guarantee.454. Write the main success scenario as 5-12 numbered steps, each "actor does / system does", in the actor's language and without UI detail.465. For every step ask "what else can happen here?" and write alternate flows (valid variations) as `3a`, `3b` with the condition, steps and where they rejoin or end.476. Write exception flows for failures: invalid data, rule violation, timeout or unavailable external system, cancellation, concurrent change. State the end state of each.487. Reference business rules by ID instead of embedding them; list new rules found and mark inferred ones `[ASSUMPTION]`.498. Add special requirements that apply only to this use case (response time, audit, accessibility) and data touched.509. Check that the main scenario delivers the success guarantee and every branch ends in a defined state.5110. List open questions with owners.5211. If the goal continues, suggest `error-scenario-catalog` for detailed failure handling, `business-rules-catalog` for the rules, or `sequence-flow` for system interactions.5354## Output format55```markdown56# UC-<nn> <Goal name>57| Field | Value |58|---|---|59| Level / Scope | <user goal / subfunction> · <system> |60| Primary actor | ... |61| Supporting actors | ... |62| Stakeholders and interests | ... |63| Trigger | ... |64| Preconditions | ... |65| Minimal guarantee | ... |66| Success guarantee | ... |6768## Main Success Scenario691. ...70## Alternate Flows71- 3a. <condition>: 3a1 ... → rejoins at step 472## Exception Flows73- 5x. <failure>: ... → ends with <state>74## Business Rules Referenced75## Special Requirements and Data76## Assumptions and Open Questions77```7879## Quality checklist80- [ ] The name is an actor goal, and the main scenario achieves it in 5-12 steps.81- [ ] Every step names who acts; no UI layout or technical detail appears.82- [ ] Every alternate and exception flow references its step, condition and end or rejoin point.83- [ ] Failures of external systems and timeouts are covered.84- [ ] Minimal guarantee holds on every exception path.85- [ ] Rules are referenced by ID; inferred rules are labeled `[ASSUMPTION]`.86- [ ] All checks pass; if any fails, revise the output and re-run this checklist before answering.8788## Common pitfalls89- Writing the use case as a screen walkthrough ("clicks OK"). Describe intent and system response; leave controls to design.90- Stuffing branches into the main scenario with "if". Keep the main scenario linear and move every condition to an extension.91- Use cases at the wrong level ("Log in" as a user goal). Treat such steps as subfunctions referenced from goal-level use cases.9293## Example94Input: "Customer returns an item in store; card purchases are refunded to the card, missing receipts are handled somehow."9596Excerpt of output:97Main success scenario:981. Customer presents the item and receipt to the clerk.992. Clerk identifies the sale by receipt number.1003. System shows the sale and the items eligible for return under BR-12.1014. Clerk selects the item and return reason.1025. System calculates the refund and requests card refund from the payment provider.1036. System records the return and prints the return slip.104105Alternate flows:106- 1a. No receipt: clerk searches by card used `[ASSUMPTION]`; if no sale is found, see open question 1.107Exception flows:108- 5x. Payment provider unavailable: system records the return as "Refund pending" and retries `[TBD: retry policy]`; the customer receives a pending slip.109110Open question 1: Is a refund without receipt allowed, and as store credit? — Retail operations