/sdlc-documentation:06-requirements-patternsfrom sdlc-documentation
Guides creation of pattern-based requirement models including decision tables, state transitions, and CRUD matrices. Use when expressing complex behaviour in requirements analysis.
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.
Pattern-based requirement models is the next lifecycle deliverable.business-rules-analysis when that neighbouring route owns the decision or deliverable.| Artefact | Source or provider | Required? | Behaviour when missing |
|---|---|---|---|
| Analysed requirements, rules, states, actors, data concepts, and exceptions | Requirements analysis and domain owners | Yes | Stop the affected step, name the missing source, and return only a qualified gap record. |
Pattern-based requirement models.| Artefact | Consumer | Acceptance condition |
|---|---|---|
| Pattern-based requirement models | SRS authoring, 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 Pattern-based requirement models | 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 |
|---|---|---|
| Behaviour depends on combinations of conditions | Use a complete decision table and check missing or conflicting rows. | Prose that hides rule gaps. |
| 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. |
Pattern-based requirement models and its acceptance checks.Pattern-based requirement models from assumed context. Fix: cite the project source or mark the scope blocked.business-rules-analysis without routing the decision. Fix: hand off the named input and preserve trace links.not assessed and state the release consequence.This skill applies structured specification patterns to requirements that are too complex for simple "shall" statements. Decision tables formalize multi-condition business logic, state transition diagrams capture entity lifecycle behavior, and CRUD matrices map data access permissions across roles. The output provides implementation-ready pattern artifacts that reduce ambiguity and ensure completeness.
| Attribute | Value |
|---|---|
| Inputs | projects/<ProjectName>/_context/features.md, business_rules.md; projects/<ProjectName>/<phase>/<document>/requirements_analysis_report.md |
| Output | projects/<ProjectName>/<phase>/<document>/requirements_patterns.md |
| Tone | Technical, precise, tabular; no narrative ambiguity |
| Standards | IEEE 830-1998 Section 5.3.1, IEEE 29148-2018, Wiegers Practices 10-12 |
| File | Location | Required | Purpose |
|---|---|---|---|
| features.md | projects/<ProjectName>/_context/features.md | Yes | Feature descriptions with behavioral requirements |
| business_rules.md | projects/<ProjectName>/_context/business_rules.md | Yes | Business logic requiring pattern formalization |
| requirements_analysis_report.md | projects/<ProjectName>/<phase>/<document>/requirements_analysis_report.md | No | Classified and prioritized requirements |
| File | Location | Description |
|---|---|---|
| requirements_patterns.md | projects/<ProjectName>/<phase>/<document>/requirements_patterns.md | Decision tables, state diagrams, and CRUD matrices for complex requirements |
Follow these steps in order. Halt and notify the user if a required input file is missing.
Read features.md and business_rules.md from projects/<ProjectName>/_context/. Optionally read requirements_analysis_report.md from projects/<ProjectName>/<phase>/<document>/ if available. Log every file path read.
For each complex requirement, determine the appropriate pattern using these criteria:
| Pattern | Select When | Example Trigger |
|---|---|---|
| Decision Table | Multiple conditions produce different outcomes | Discount calculation with tiers |
| State Transition | An entity moves through defined lifecycle states | Order status: Draft > Submitted > Approved |
| CRUD Matrix | Multiple roles interact with multiple entities differently | Admin vs. User vs. Guest permissions |
Assign each complex requirement to exactly one primary pattern. If a requirement spans multiple patterns (e.g., a state transition with role-based permissions), produce one artifact per pattern and cross-reference them.
For each requirement assigned to the Decision Table pattern:
[INCOMPLETE-RULE].Decision Table Format:
| Conditions / Rules | R1 | R2 | R3 | R4 |
|---|---|---|---|---|
| Condition 1 | T | T | F | F |
| Condition 2 | T | F | T | F |
| Actions | ||||
| Action A | X | X | ||
| Action B | X | X |
Each decision table SHALL include:
See references/decision-tables.md for construction techniques and simplification methods.
For each requirement assigned to the State Transition pattern:
[UNDEFINED-TRANSITION].stateDiagram-v2
[*] --> Draft
Draft --> Submitted : submit [all fields valid]
Submitted --> Approved : approve [manager review complete]
Submitted --> Rejected : reject [manager review complete]
Rejected --> Draft : revise
Approved --> [*]
State Transition Table Format:
| Current State | Event | Guard | Next State | Action |
|---|---|---|---|---|
| Draft | submit | all fields valid | Submitted | notify_reviewer() |
| Submitted | approve | manager review complete | Approved | notify_requester() |
Each state model SHALL include:
See references/state-transition-modeling.md for modeling techniques and validation methods.
For each set of entities and roles requiring access control definition:
[NO-CREATE][NO-DELETE][NO-READ]CRUD Matrix Format:
| Entity / Role | Admin | Manager | User | Guest |
|---|---|---|---|---|
| Customer | CRUD | CRU | R | - |
| Order | CRUD | CRUD | CRU | - |
| Product | CRUD | CRU | R | R |
| Report | CRUD | CR | R | - |
Each CRUD matrix SHALL include:
See references/crud-matrix.md for matrix construction and gap analysis techniques.
Perform a cross-pattern completeness check:
Flag all validation failures with the appropriate tag and document remediation steps.
Write the completed patterns to projects/<ProjectName>/<phase>/<document>/requirements_patterns.md using the output format below. Log summary statistics: total decision tables, state models, CRUD matrices, and validation issues found.
The generated requirements_patterns.md SHALL contain the following sections:
# Requirements Patterns: [Project Name]
## 1. Document Information
## 2. Pattern Summary
### 2.1 Pattern Selection Rationale
### 2.2 Coverage Statistics
## 3. Decision Tables
### 3.1 [DT-001: Description]
### 3.2 [DT-002: Description]
## 4. State Transition Models
### 4.1 [STM-001: Entity Lifecycle]
### 4.2 [STM-002: Entity Lifecycle]
## 5. CRUD Matrices
### 5.1 [CRUD-001: Subsystem Access Control]
## 6. Cross-Pattern Validation
## 7. Completeness Report
## 8. Recommendations and Next Steps
## 9. Appendix: Standards Traceability
| Direction | Skill | Relationship |
|---|---|---|
| Upstream | 02-requirements-engineering/fundamentals/during/04-* | Consumes classified requirements |
| Upstream | 02-requirements-engineering/fundamentals/during/05-* | Consumes entity catalog for CRUD matrices |
| Downstream | 02-requirements-engineering/fundamentals/during/07-* | Feeds pattern artifacts to validation |
| Downstream | 02-requirements-engineering/waterfall/05-* | Feeds into SRS feature decomposition |
| Downstream | 02-requirements-engineering/waterfall/06-* | Feeds state models to logic modeling |
| Standard | Governs |
|---|---|
| IEEE 830-1998 | Requirements specification patterns and completeness |
| IEEE 29148-2018 | Requirement expression and behavioral modeling |
| Wiegers Ch.10-12 | Decision tables, state models, and specification patterns |
references/decision-tables.md -- Decision table construction and completeness checkingreferences/state-transition-modeling.md -- State machine specification and Mermaid syntaxreferences/crud-matrix.md -- CRUD matrix construction and RBAC integrationWhat 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./01-prd-generationUse when converting approved discovery evidence into a traceable PRD with objectives, prioritised features, success measures, constraints, and release scope; use vision-statement for the strategic north star and lean-canvas while assumptions still need testing./01-sprint-planningUse when preparing a sprint goal, evidence-based team capacity, selected backlog, task breakdown, and delivery risks. Use definition-of-ready to admit individual items and definition-of-done to judge completed increments./01-stakeholder-analysisUse when identifying and classifying stakeholders, influence, interests, decision rights, and communication needs before elicitation; use elicitation-toolkit to gather requirements from them.Other plugins' skills for the same job