Skip to content

Commit 288fbac

Browse files
raifdmuellerclaude
andcommitted
feat: add System Use Cases and Supplementary Specs to workflow
Step 4 now builds the specification in layers: - 4a: Actor-Goal List (scope discovery, unchanged) - 4b: Persona Use Cases (Cockburn Fully Dressed, User Goal level) - 4c: System Use Cases (technical interfaces: API, CLI, events) - 4d: Supplementary Specs (Entity Model, State Machines, DTOs) Updated: EN + DE workflow pages, Cheat Sheet, Specification contract. Aligned with Martinelli's AIUP distinction between Business and System Use Case Specifications. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent b4c911d commit 288fbac

3 files changed

Lines changed: 130 additions & 12 deletions

File tree

docs/spec-driven-workflow.adoc

Lines changed: 64 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,10 @@ Write a PRD based on our discussion. Save it as src/docs/specs/prd.adoc.
205205

206206
=== Step 4: Create Detailed Specification
207207

208+
Step 4 builds the specification in layers: from scope discovery (Actor-Goal List) through persona-level use cases to technical system specifications and supplementary models.
209+
210+
==== Step 4a: Discover Scope with the Actor-Goal List
211+
208212
Start by discovering scope with an ⚓ link:#/anchor/cockburn-use-cases[*Actor-Goal List*]:
209213

210214
[source]
@@ -216,11 +220,14 @@ is achieved?" — if yes, it's a User Goal. If not, it's a Subfunction
216220
(extract only when reused). Save as src/docs/specs/actor-goal-list.adoc.
217221
----
218222

219-
Then generate the full specification from the Actor-Goal List:
223+
==== Step 4b: Persona Use Cases
224+
225+
Generate use cases at User Goal level from the Actor-Goal List.
226+
These describe what actors want to achieve and how the system responds -- in prose, at a level that stakeholders can review.
220227

221228
[source]
222229
----
223-
Create a detailed specification from the PRD and Actor-Goal List.
230+
Create Persona Use Cases from the PRD and Actor-Goal List.
224231
For each User Goal, write a Use Case in Cockburn's Fully Dressed format:
225232
- Primary Actor and Stakeholders & Interests
226233
- Trigger, Preconditions
@@ -257,6 +264,50 @@ These criteria become the foundation for TDD later.
257264

258265
Activity Diagrams define flows, error paths, and edge cases visually — the AI can follow them during implementation to cover all branches, not just the happy path.
259266

267+
==== Step 4c: System Use Cases
268+
269+
Derive System Use Cases from the Persona Use Cases.
270+
Where Persona Use Cases describe what actors want, System Use Cases describe what the system does at its technical boundaries -- API endpoints, CLI commands, events, file formats.
271+
272+
[source]
273+
----
274+
Derive System Use Cases from the Persona Use Cases.
275+
For each system interface (API endpoint, CLI command, event, file format):
276+
- Trigger and Preconditions (technical: HTTP method, auth token, system state)
277+
- Input: format, validation rules, constraints
278+
- Processing: steps the system performs (reference Business Rules)
279+
- Output: response format, status codes, payload schema
280+
- Error responses: codes, messages, recovery hints
281+
- Non-functional: performance budget, rate limits, timeouts
282+
Use EARS syntax (When/While/If/Shall) for individual requirements
283+
where applicable. Save as src/docs/specs/system-use-cases.adoc.
284+
----
285+
286+
System Use Cases bridge the gap between stakeholder-facing Persona Use Cases and implementation.
287+
They are the input the AI needs to generate correct API handlers, CLI parsers, and event processors without guessing at technical details.
288+
289+
Simon Martinelli's https://unifiedprocess.ai/[AI Unified Process] calls this the move from Business Use Cases to System Use Case Specifications -- the same distinction at a different granularity.
290+
291+
==== Step 4d: Supplementary Specifications
292+
293+
Not every requirement fits into a use case.
294+
Create supplementary specifications as needed based on the project type:
295+
296+
[source]
297+
----
298+
Based on the Use Cases, create supplementary specifications:
299+
- Entity Model: entities, attributes, relationships, constraints (as PlantUML ERD)
300+
- State Machines: for entities with lifecycle behavior (as PlantUML state diagrams)
301+
- Interface Contracts: DTOs and schemas at system boundaries
302+
- Validation Rules: cross-cutting rules not tied to a single use case
303+
Save in src/docs/specs/.
304+
----
305+
306+
Which supplementary specs you need depends on the project.
307+
A CLI tool may only need an Entity Model.
308+
A web application typically needs all four.
309+
The AI will ask if something is missing during implementation -- that feedback loop (Step 8) catches gaps early.
310+
260311
== Phase 2: Architecture
261312

262313
=== Step 5: Create arc42 Architecture Documentation
@@ -480,9 +531,17 @@ The essential one-liners for each phase, with the Semantic Anchors they activate
480531
|`Write a PRD based on our discussion. Save as src/docs/specs/prd.adoc. Follow Strunk & White.`
481532
|link:#/anchor/plain-english-strunk-white[Strunk & White]
482533

483-
|Specification
484-
|`Create a detailed spec with Use Cases (Trigger, Main Flow, Alternative Flows, Postconditions, Business Rules), Activity Diagrams (all paths), and Gherkin acceptance criteria.`
485-
|link:#/anchor/gherkin[Gherkin]
534+
|Persona Use Cases
535+
|`Create Persona Use Cases in Cockburn's Fully Dressed format (Actor, Trigger, Main Flow, Extensions, Postconditions, Business Rules). Add Activity Diagrams and Gherkin acceptance criteria.`
536+
|link:#/anchor/cockburn-use-cases[Cockburn], link:#/anchor/gherkin[Gherkin]
537+
538+
|System Use Cases
539+
|`Derive System Use Cases from Persona Use Cases. For each interface: input/validation, processing, output/status codes, error responses. EARS syntax where applicable.`
540+
|link:#/anchor/ears-requirements[EARS]
541+
542+
|Supplementary Specs
543+
|`Create Entity Model (PlantUML ERD), State Machines, Interface Contracts (DTOs), Validation Rules as needed.`
544+
|{empty}--
486545

487546
|Architecture
488547
|`Create arc42 docs with PlantUML C4 diagrams based on the spec. Save in src/docs/arc42/.`

docs/spec-driven-workflow.de.adoc

Lines changed: 64 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,10 @@ Write a PRD based on our discussion. Save it as src/docs/specs/prd.adoc.
215215

216216
=== Schritt 4: Detaillierte Spezifikation erstellen
217217

218+
Schritt 4 baut die Spezifikation in Schichten auf: von der Scope-Ermittlung (Actor-Goal-Liste) über Use Cases auf Persona-Ebene bis zu technischen System-Spezifikationen und ergänzenden Modellen.
219+
220+
==== Schritt 4a: Scope mit der Actor-Goal-Liste ermitteln
221+
218222
Zuerst den Scope mit einer ⚓ link:#/anchor/cockburn-use-cases[*Actor-Goal-Liste*] entdecken:
219223

220224
[source]
@@ -226,11 +230,14 @@ is achieved?" — if yes, it's a User Goal. If not, it's a Subfunction
226230
(extract only when reused). Save as src/docs/specs/actor-goal-list.adoc.
227231
----
228232

229-
Dann aus der Actor-Goal-Liste die vollständige Spezifikation generieren:
233+
==== Schritt 4b: Persona Use Cases
234+
235+
Use Cases auf User-Goal-Ebene aus der Actor-Goal-Liste generieren.
236+
Diese beschreiben, was Akteure erreichen wollen und wie das System reagiert — in Prosa, auf einem Abstraktionsniveau, das Stakeholder reviewen können.
230237

231238
[source]
232239
----
233-
Create a detailed specification from the PRD and Actor-Goal List.
240+
Create Persona Use Cases from the PRD and Actor-Goal List.
234241
For each User Goal, write a Use Case in Cockburn's Fully Dressed format:
235242
- Primary Actor and Stakeholders & Interests
236243
- Trigger, Preconditions
@@ -267,6 +274,50 @@ Diese Kriterien werden später die Grundlage für TDD.
267274

268275
Activity Diagrams definieren Abläufe, Fehlerpfade und Randfälle visuell — die KI kann ihnen bei der Implementierung folgen, um alle Zweige abzudecken, nicht nur den Happy Path.
269276

277+
==== Schritt 4c: System Use Cases
278+
279+
System Use Cases aus den Persona Use Cases ableiten.
280+
Wo Persona Use Cases beschreiben, was Akteure wollen, beschreiben System Use Cases, was das System an seinen technischen Schnittstellen tut — API-Endpunkte, CLI-Befehle, Events, Dateiformate.
281+
282+
[source]
283+
----
284+
Derive System Use Cases from the Persona Use Cases.
285+
For each system interface (API endpoint, CLI command, event, file format):
286+
- Trigger and Preconditions (technical: HTTP method, auth token, system state)
287+
- Input: format, validation rules, constraints
288+
- Processing: steps the system performs (reference Business Rules)
289+
- Output: response format, status codes, payload schema
290+
- Error responses: codes, messages, recovery hints
291+
- Non-functional: performance budget, rate limits, timeouts
292+
Use EARS syntax (When/While/If/Shall) for individual requirements
293+
where applicable. Save as src/docs/specs/system-use-cases.adoc.
294+
----
295+
296+
System Use Cases schließen die Lücke zwischen stakeholder-orientierten Persona Use Cases und der Implementierung.
297+
Sie sind der Input, den die KI braucht, um korrekte API-Handler, CLI-Parser und Event-Prozessoren zu generieren, ohne technische Details zu erraten.
298+
299+
Simon Martinellis https://unifiedprocess.ai/[AI Unified Process] nennt das den Übergang von Business Use Cases zu System Use Case Specifications — dieselbe Unterscheidung auf anderer Granularitätsebene.
300+
301+
==== Schritt 4d: Ergänzende Spezifikationen
302+
303+
Nicht jede Anforderung passt in einen Use Case.
304+
Ergänzende Spezifikationen je nach Projekttyp erstellen:
305+
306+
[source]
307+
----
308+
Based on the Use Cases, create supplementary specifications:
309+
- Entity Model: entities, attributes, relationships, constraints (as PlantUML ERD)
310+
- State Machines: for entities with lifecycle behavior (as PlantUML state diagrams)
311+
- Interface Contracts: DTOs and schemas at system boundaries
312+
- Validation Rules: cross-cutting rules not tied to a single use case
313+
Save in src/docs/specs/.
314+
----
315+
316+
Welche ergänzenden Specs man braucht, hängt vom Projekt ab.
317+
Ein CLI-Tool braucht vielleicht nur ein Entity Model.
318+
Eine Webanwendung braucht typischerweise alle vier.
319+
Die KI fragt nach, wenn etwas fehlt — der Feedback-Loop (Schritt 8) fängt Lücken früh auf.
320+
270321
== Phase 2: Architektur
271322

272323
=== Schritt 5: arc42-Architekturdokumentation erstellen
@@ -497,9 +548,17 @@ Die wichtigsten Einzeiler pro Phase mit den Semantic Anchors, die sie aktivieren
497548
|`Write a PRD based on our discussion. Save as src/docs/specs/prd.adoc. Follow Strunk & White.`
498549
|link:#/anchor/plain-english-strunk-white[Strunk & White]
499550

500-
|Spezifikation
501-
|`Create a detailed spec with Use Cases (Trigger, Main Flow, Alternative Flows, Postconditions, Business Rules), Activity Diagrams (all paths), and Gherkin acceptance criteria.`
502-
|link:#/anchor/gherkin[Gherkin]
551+
|Persona Use Cases
552+
|`Create Persona Use Cases in Cockburn's Fully Dressed format (Actor, Trigger, Main Flow, Extensions, Postconditions, Business Rules). Add Activity Diagrams and Gherkin acceptance criteria.`
553+
|link:#/anchor/cockburn-use-cases[Cockburn], link:#/anchor/gherkin[Gherkin]
554+
555+
|System Use Cases
556+
|`Derive System Use Cases from Persona Use Cases. For each interface: input/validation, processing, output/status codes, error responses. EARS syntax where applicable.`
557+
|link:#/anchor/ears-requirements[EARS]
558+
559+
|Ergänzende Specs
560+
|`Create Entity Model (PlantUML ERD), State Machines, Interface Contracts (DTOs), Validation Rules as needed.`
561+
|{empty}--
503562

504563
|Architektur
505564
|`Create arc42 docs with PlantUML C4 diagrams based on the spec. Save in src/docs/arc42/.`

website/public/data/contracts.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
"description": "What we mean when we say 'spec'",
77
"descriptionDe": "Was wir meinen, wenn wir 'Spec' sagen",
88
"anchors": ["cockburn-use-cases", "gherkin", "bdd-given-when-then", "ears-requirements"],
9-
"template": "When we talk about a \"specification\" or \"spec\", we mean:\n- Use Cases in Cockburn's Fully Dressed format (Primary Actor, Trigger, Main Success Scenario, Extensions, Postconditions) at User Goal level, with Business Rules (BR-IDs)\n- Activity Diagrams for all flows (not just the happy path)\n- Acceptance criteria in Gherkin format (Given/When/Then)\n- Individual requirements in EARS syntax where applicable (When/While/If/Shall)",
10-
"templateDe": "Wenn wir von einer \"Spezifikation\" oder \"Spec\" sprechen, meinen wir:\n- Use Cases im Cockburn Fully Dressed Format (Primary Actor, Trigger, Main Success Scenario, Extensions, Nachbedingungen) auf User-Goal-Ebene, mit Geschäftsregeln (BR-IDs)\n- Activity Diagrams für alle Abläufe (nicht nur der Happy Path)\n- Akzeptanzkriterien im Gherkin-Format (Given/When/Then)\n- Einzelanforderungen in EARS-Syntax wo passend (When/While/If/Shall)",
9+
"template": "When we talk about a \"specification\" or \"spec\", we mean:\n- Persona Use Cases in Cockburn's Fully Dressed format (Primary Actor, Trigger, Main Success Scenario, Extensions, Postconditions) at User Goal level, with Business Rules (BR-IDs)\n- System Use Cases for each technical interface (API endpoint, CLI command, event, file format): input/validation, processing, output/status codes, error responses\n- Activity Diagrams for all flows (not just the happy path)\n- Acceptance criteria in Gherkin format (Given/When/Then)\n- Individual requirements in EARS syntax where applicable (When/While/If/Shall)\n- Supplementary Specifications as needed: Entity Model, State Machines, Interface Contracts, Validation Rules",
10+
"templateDe": "Wenn wir von einer \"Spezifikation\" oder \"Spec\" sprechen, meinen wir:\n- Persona Use Cases im Cockburn Fully Dressed Format (Primary Actor, Trigger, Main Success Scenario, Extensions, Nachbedingungen) auf User-Goal-Ebene, mit Geschäftsregeln (BR-IDs)\n- System Use Cases für jede technische Schnittstelle (API-Endpunkt, CLI-Befehl, Event, Dateiformat): Input/Validierung, Verarbeitung, Output/Statuscodes, Fehlerantworten\n- Activity Diagrams für alle Abläufe (nicht nur der Happy Path)\n- Akzeptanzkriterien im Gherkin-Format (Given/When/Then)\n- Einzelanforderungen in EARS-Syntax wo passend (When/While/If/Shall)\n- Ergänzende Spezifikationen nach Bedarf: Entity Model, State Machines, Interface Contracts, Validierungsregeln",
1111
"category": "requirements"
1212
},
1313
{

0 commit comments

Comments
 (0)