/sdlc-documentation:09-use-case-modelingfrom sdlc-documentation
Specifies actor-goal use cases with preconditions, main flow, alternatives, exceptions, postconditions, and trace links for requirements engineering.
Ships in sdlc-documentation. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Use-case model and specifications is the next lifecycle deliverable.user-story-generation when that neighbouring route owns the decision or deliverable.| Artefact | Source or provider | Required? | Behaviour when missing |
|---|---|---|---|
| Actors, goals, system context, business rules, requirements, and failure cases | Stakeholders, context models, and requirements evidence | Yes | Stop the affected step, name the missing source, and return only a qualified gap record. |
Use-case model and specifications.| Artefact | Consumer | Acceptance condition |
|---|---|---|
| Use-case model and specifications | SRS, UX, design, testing, and traceability | Required sections are populated, source links resolve, and every material requirement or decision has an observable review or test oracle. |
| Evidence | Reviewer | Acceptance condition |
|---|---|---|
Source, decision, trace, and validation record for Use-case model and specifications | Requirements quality reviewer | Inputs used, decisions made, checks run, failures, and unassessed items are explicit. |
Read and search are required. Editing is allowed only when the request authorises creation or repair of the named requirements artefact. Publishing, production mutation, destructive action, spending, and certification require explicit authority.
Fallback: if a required file, reviewer, standard source, network check, renderer, or execution capability is unavailable, return the narrowest useful qualified result and mark the affected check not assessed; never convert an unassessed check into a pass.
| Choice or condition | Action | Failure or risk avoided |
|---|---|---|
| A use case has no actor goal, observable postcondition, or exception path | Return it for completion before deriving requirements. | Narratives that cannot drive design or acceptance tests. |
| Required inputs and test oracles are complete | Continue through the existing workflow and record evidence. | A deliverable whose acceptance cannot be reproduced. |
| A mandatory source or owner is missing | Stop the affected branch and issue a qualified gap record. | Fabricated context or unauthorised decisions. |
Use-case model and specifications and its acceptance checks.Use-case model and specifications from assumed context. Fix: cite the project source or mark the scope blocked.user-story-generation without routing the decision. Fix: hand off the named input and preserve trace links.not assessed and state the release consequence.This skill runs after Phase 05 (Feature Decomposition). It transforms functional requirements from SRS Section 3.2 into a complete use case model that includes actor classification, use case diagrams, fully-dressed use case descriptions, and activity diagrams for complex workflows. The output conforms to UML 2.5.1 notation standards and IEEE 29148-2018 behavioral requirements guidance.
05-feature-decomposition has produced Section 3.2 in SRS_Draft.md.| Attribute | Value |
|---|---|
| Inputs | projects/<ProjectName>/_context/features.md, projects/<ProjectName>/_context/business_rules.md, projects/<ProjectName>/_context/stakeholder_register.md (optional), projects/<ProjectName>/<phase>/<document>/SRS_Draft.md (Sections 3.1-3.2) |
| Output | projects/<ProjectName>/<phase>/<document>/Use_Case_Model.md |
| Tone | Technical, precise, active voice with stimulus-response pairs |
| Standards | UML 2.5.1, IEEE 29148-2018, IEEE 830-1998 Clause 5.3.1 |
| File | Location | Required | Purpose |
|---|---|---|---|
SRS_Draft.md | projects/<ProjectName>/<phase>/<document>/SRS_Draft.md | Required | Sections 3.1 (System Features) and 3.2 (Functional Requirements) |
features.md | projects/<ProjectName>/_context/features.md | Required | Feature list with user story triggers and acceptance criteria |
business_rules.md | projects/<ProjectName>/_context/business_rules.md | Recommended | Business rules referenced by use cases |
stakeholder_register.md | projects/<ProjectName>/_context/stakeholder_register.md | Optional | Stakeholder roles for actor identification |
| File | Location | Description |
|---|---|---|
Use_Case_Model.md | projects/<ProjectName>/<phase>/<document>/Use_Case_Model.md | Complete use case model with diagrams, descriptions, and traceability |
Follow these nine steps in order. Do not skip or reorder.
Read SRS_Draft.md (Sections 3.1 and 3.2), features.md, and business_rules.md from the specified locations. Optionally read stakeholder_register.md. Log the absolute path of each file read. Halt execution if SRS_Draft.md or features.md is missing.
Analyze the input files to identify all actors that interact with or have interest in the system.
Two complementary actor taxonomies are available. Choose based on project type:
Option A — Cockburn's 3-Class Model (use for software-centric systems):
| Actor Type | Definition | Identification Method |
|---|---|---|
| Primary | Directly initiates or interacts with a use case to achieve a goal | Stakeholder list review, user story "As a..." clauses |
| Supporting | Provides a service to the system during use case execution | System boundary analysis, integration point review |
| Offstage | Has an interest in the use case outcome but does not directly interact | Regulatory review, business rule owner analysis |
Option B — Whitten & Bentley's 4-Class Model (use for enterprise/business information systems):
| Actor Type | Definition | Identification Method |
|---|---|---|
| Primary Business Actor | Receives measurable value from the use case without initiating it | Who benefits? Who is the beneficiary? |
| Primary System Actor | Directly initiates or triggers the use case event | Who starts the interaction? Who clicks "submit"? |
| External Server Actor | Responds to a request from a use case (provides a service) | What external systems or roles respond to requests? |
| External Receiver Actor | Receives output/value from the use case but is not a primary actor | Who else gets a report, notification, or deliverable? |
Guidance: Use Option B when the system is an enterprise business application (ERP, CRM, HR, billing, approval workflows) where the distinction between "who benefits" and "who initiates" is critical for correct workflow design. Use Option A for simpler or software-product contexts.
Temporal Actors: When the system has scheduled or time-triggered processes (nightly batch jobs, billing cycles, session expiry, automated reminders), model time as a Temporal Actor. Document: Temporal Actor: System Clock — initiates [Use Case Name] at [schedule/frequency]. Temporal actors are positioned outside the system boundary like other actors.
Actor Generalization: Apply actor generalization where two or more actors share common behaviors. Use an inheritance arrow from the specialized actor to the general actor. Document the generalization hierarchy. Distinguish human actors from system actors explicitly.
Extract use cases from Section 3.2 functional requirements. Each use case shall represent a user-goal-level interaction (not subfunction level). Apply these rules:
UC-[NNN] (e.g., UC-001, UC-002).Produce a system-level use case diagram using Mermaid notation or structured text-based UML. The diagram shall include:
<<include>>)<<extend>>)<<depends on>>) between use cases that have development sequencing dependencies — use case B cannot be built until use case A is complete. This relationship aids sprint planning and release sequencing.For each use case identified in Step 3, produce a fully-dressed description using this template:
### UC-[NNN]: [Use Case Name]
| Field | Value |
|-------|-------|
| **UC-ID** | UC-[NNN] |
| **Name** | [Verb-Noun Name] |
| **Primary Actor** | [Actor Name] |
| **Stakeholders & Interests** | [List each stakeholder and their interest] |
| **Preconditions** | [Conditions that must be true before execution] |
| **Success Guarantee** | [System state after successful completion] |
| **Minimal Guarantee** | [System state guaranteed even on failure] |
| **Priority** | [Critical / High / Medium / Low] |
| **Frequency of Use** | [e.g., 500 times/day, Weekly, On-demand] |
| **Trigger** | [Event or action that initiates this use case] |
#### Main Success Scenario
1. The [Actor] [performs action].
2. The system shall [respond with action].
3. The [Actor] [performs next action].
4. The system shall [respond with next action].
...
[N]. The system shall [confirm completion / display result].
#### Alternative Flows
**[Step]a. [Condition]:**
1. The system shall [alternative action].
2. [Resume at step N / End use case].
**[Step]b. [Different Condition]:**
1. The system shall [alternative action].
2. [Resume at step N / End use case].
#### Exception Flows
**[Step]a. [Error Condition]:**
1. The system shall [log the error / display error message].
2. The system shall [recovery action].
3. [Resume at step N / Abort use case].
#### Business Rules
- BR-[NNN]: [Referenced business rule from business_rules.md]
#### Data Requirements
- [List data entities read, created, updated, or deleted]
#### Assumptions
- [List assumptions made by the analyst that affect this use case — e.g., "Assumes single currency; multi-currency not in scope"]
#### Implementation Constraints
- [Technical constraints that bound implementation choices — e.g., "Must use existing OAuth 2.0 provider", "Response time shall not exceed 2 seconds on 3G connection"]
#### Open Issues
- [Unresolved questions flagged for stakeholder review]
Writing guidelines for use case steps:
For each use case that involves two or more actors, decision logic, or parallel activities, produce a Mermaid activity diagram. The diagram shall include:
Use this Mermaid flowchart pattern for activity diagrams:
flowchart TD
subgraph Actor1["Actor 1"]
A1[Action 1]
end
subgraph Actor2["Actor 2"]
A2[Action 2]
end
A1 --> D1{Decision?}
D1 -->|Yes| A2
D1 -->|No| A3[Alternative Action]
Generate activity diagrams only for complex workflows. Simple CRUD operations do not require activity diagrams.
Construct a traceability matrix mapping every Section 3.2 functional requirement to at least one use case. Use this format:
| Requirement ID | Requirement Description | Use Case ID | Use Case Name | Coverage |
|---|---|---|---|---|
| FR-3.2.1.3-001 | [Description] | UC-001 | [Name] | Full / Partial |
Flag any functional requirement that has no corresponding use case with [TRACE-FAIL: FR-[ID] has no use case coverage].
Perform these validation checks:
[V&V-FAIL: Actor "[Name]" has no associated use case].business_rules.md that relates to a functional requirement shall appear in at least one use case description.Assemble the complete use case model and write it to projects/<ProjectName>/<phase>/<document>/Use_Case_Model.md.
The generated Use_Case_Model.md shall contain the following sections:
# Use Case Model: [Project Name]
- **Date:** [YYYY-MM-DD]
- **Version:** [X.Y]
- **Standard:** UML 2.5.1, IEEE 29148-2018
## 1. Actor Catalog
### 1.1 Actor Summary
| Actor | Type | Description | Generalization |
|-------|------|-------------|----------------|
### 1.2 Actor Generalization Hierarchy
[Diagram or structured list]
## 2. Use Case Diagram
[Mermaid diagram or text-based UML]
## 3. Use Case Descriptions
### UC-001: [Name]
[Fully-dressed template per Step 5]
...
## 4. Activity Diagrams
### AD-001: [Workflow Name]
[Mermaid activity diagram per Step 6]
...
## 5. Traceability Matrix
[Table per Step 7]
## 6. Validation Summary
[Results of Step 8 checks]
## 7. Open Issues
[Consolidated list of unresolved items]
| Pitfall | Remedy |
|---|---|
| One use case per requirement (too granular) | Group related requirements under user-goal-level use cases |
| UI details in main success scenario | Reference interface specifications; keep flows technology-neutral |
| Missing alternative and exception flows | Every decision point in the main flow shall have at least one alternative |
| Actors without use cases | Remove orphan actors or identify missing use cases |
| Untraceable requirements | Every FR in Section 3.2 shall map to at least one UC |
| Vague preconditions | State concrete, verifiable conditions with data state |
Use_Case_Model.md exists in projects/<ProjectName>/<phase>/<document>/[TRACE-FAIL] or [V&V-FAIL] tags remain unresolved| Direction | Skill | Relationship |
|---|---|---|
| Upstream | 05-feature-decomposition | Provides Section 3.2 functional requirements |
| Upstream | 04-interface-specification | Provides Section 3.1 system features |
| Downstream | 06-logic-modeling | Consumes use case flows for state and decision modeling |
| Downstream | 08-semantic-auditing | Audits use case traceability and completeness |
<<depends on>>references/use-case-template.md -- Complete fully-dressed use case template with examplesreferences/activity-diagram-guide.md -- Activity diagram construction and Mermaid syntaxreferences/actor-classification.md -- Actor identification and classification techniquesREADME.md -- Quick-start guide for this skillWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub peterbamuhigire/chwezi-sdlc-documentation --plugin sdlc-documentation160 skills in this plugin
/01-deployment-guideUse when producing or updating deployment guide for release prerequisites, migration choreography, verification, rollback, and ownership. Use runbook for the neighbouring concern; this skill owns the named document contract and its acceptance evidence./01-high-level-designUse when approved requirements need a system-level architecture with boundaries, components, critical flows, deployment topology and ADRs, or an as-built design must be recovered from existing code; use system-overview for orientation, low-level-design for module internals, and infrastructure-design for infrastructure depth./01-initialize-srsUse when writing a new SRS (software requirements specification) for a business system or module: create the Waterfall SRS workspace, IEEE structure, identifiers and source context; use context-engineering next for boundaries and actors.Other plugins' skills for the same job