AI Unified Process core - stack-agnostic requirements, entity model, and use cases
91
92%
Does it follow best practices?
Impact
91%
1.18xAverage score across 14 eval scenarios
Low
Low-risk findings worth noting
This document is the single normative definition of the use case
specification format shared by the AI Unified Process skills
(/use-case-spec, /reverse-engineer) and the AI Unified Process Studio
structured editor. The Studio parser
(UseCaseSpecificationDocument.java) is the executable reference for the
structural rules; the skills add content rules on top. The bundled
validator (scripts/validate_use_case.py) checks both:
**Use Case ID:** line).One file per use case. Sections in this order (Studio reorders them to this order on save):
# Use Case: <name>
## Overview
**Use Case ID:** UC-XXX
**Use Case Name:** <name>
**Primary Actor:** <roles> (one or more, comma-separated)
**Secondary Actors:** <roles> (optional)
**Goal:** <one sentence>
**Trigger:** <event that starts the use case> (optional)
**Status:** <status value>
**Requirements:** [FR-001, NFR-004, C-003](../requirements.md) (optional)
## Preconditions
- <bullet items>
## Main Success Scenario
1. <numbered steps, starting at 1, no gaps>
## Alternative Flows
### A1: <flow name>
**Trigger:** <condition> (step N)
**Flow:**
1. <numbered steps>
2. Use case continues at step N. / Use case ends.
## Postconditions
### Success Postconditions
- <bullet items>
### Failure Postconditions
- <bullet items>
## Business Rules
### BR-XXX: <rule name>
<free-text description>### Failure Postconditions (German ### Fehlerfall) keeps its heading for
compatibility but holds the minimum guarantees: statements that must hold
for every unsuccessful termination of the use case, such as "No reservation is
created". A system reaction to the failure (an error message) belongs in the
alternative flow, not here.
The structure is identical in English and German; only headings, field labels, status values and the rule prefix differ. The language is detected from the document (majority of matching headings/labels; ties and empty files are English) and preserved on save.
| Element | English | German |
|---|---|---|
| Title prefix | # Use Case: | # Use Case: (same) |
| Overview | ## Overview | ## Übersicht |
| ID field | **Use Case ID:** | **Use-Case-ID:** |
| Name field | **Use Case Name:** | **Use-Case-Name:** |
| Primary actor | **Primary Actor:** | **Primärer Akteur:** |
| Secondary actors | **Secondary Actors:** | **Sekundäre Akteure:** |
| Goal | **Goal:** | **Ziel:** |
| Use case trigger | **Trigger:** (Overview) | **Auslösendes Ereignis:** (reads **Trigger:** too) |
| Status | **Status:** | **Status:** (same) |
| Requirements | **Requirements:** | **Anforderungen:** |
| Preconditions | ## Preconditions | ## Vorbedingungen |
| Main scenario | ## Main Success Scenario | ## Hauptablauf |
| Alternative flows | ## Alternative Flows | ## Alternativabläufe |
| Flow trigger field | **Trigger:** | **Auslöser:** (reads **Trigger:** too) |
| Flow field | **Flow:** | **Ablauf:** |
| Postconditions | ## Postconditions | ## Nachbedingungen |
| Success subsection | ### Success Postconditions | ### Erfolgsfall |
| Failure subsection | ### Failure Postconditions | ### Fehlerfall |
| Business rules | ## Business Rules | ## Geschäftsregeln |
| Rule prefix | BR | GR (reads BR too) |
Status values (either language is readable in any document):
| English | German |
|---|---|
| Draft | Entwurf |
| Reviewed | Geprüft |
| Approved | Genehmigt |
| Implemented | Implementiert |
| Tested | Getestet |
| Done | Abgeschlossen |
| Obsolete | Obsolet |
# Use Case: <name> or an
id-style title # UC-XXX: <name> matching the id grammar
[SB]?UC-[A-Za-z0-9_-]+ (so SUC-, BUC-, UC-013a, UC-2-1 are
valid ids). Studio rewrites id-style titles to the canonical prefix
on save.## Overview section must exist and carry the
five mandatory fields: ID, Name, Primary Actor, Goal, Status.
Secondary Actors, Trigger and Requirements are optional. Primary
Actor holds one role or a comma-separated list of roles; the label
stays singular (**Primary Actor:**, **Primärer Akteur:**) in
both cases.✅ Implemented (2025-07-11) and Approved — 🚧 partial read as
Implemented and Approved; In Progress is invalid.- ). Anything else that is not a placeholder paragraph (see
tolerances) is unexpected content.1. ,
unindented). Wrapped continuation lines are joined into their item.### heading followed by a
trigger line (**Trigger:** / **Auslöser:**), the flow field line
(**Flow:** / **Ablauf:**) and at least one numbered step. A flow
missing any of the three is incomplete. Plain prose inside a flow is
unexpected content (markup paragraphs are notes — see tolerances).### heading followed by
free-text description lines.These come from Studio's pass-through rules (UC-010 BR-011, FR-072) and tolerant-read rule (UC-020 BR-003); generators should still emit the canonical form, but validators must accept:
**Priorität:** Hoch) — kept
verbatim.## Suchkriterien)
anywhere between template sections — kept verbatim at their anchor._None — the page is static._) standing in for the content of an
empty template section. Next to real content it is unexpected.**, _, * or >) before the trigger, between trigger
and flow field, or after the steps. They are read as the note of the
flow; a note never substitutes for trigger or steps.**Trigger:** in German documents (written back as
**Auslöser:**). In the Overview of a German document it is read as
the use case trigger, whose canonical label is
**Auslösendes Ereignis:** — deliberately not **Auslöser:**, which
names the condition of an alternative flow.BR- rule labels in German documents (written back as GR-).Studio rewrites these without asking; a generator that produces them creates diffs on the first Studio save:
A1…) and rule (BR-001…) numbers are positional:
Studio renumbers them gaplessly on save.The /use-case-spec skill additionally requires:
The Overview names the use case trigger — the event that starts the use
case (an actor's request, a point in time, a message from an external
system). The line is optional so that older documents stay valid, and
the skill writes it for every new document. The validator warns when a
present trigger is empty, references a step ((step N) belongs to
alternative-flow triggers), or repeats a precondition word for word.
Whether it is really an event and not a state is judged by
/spec-review.
All five template sections and both postcondition subsections exist.
The use case id matches [SB]?UC-[A-Za-z0-9_-]+ and the filename
starts with the id (canonical: UC-XXX-<kebab-case-name>.md).
The main scenario has steps numbered 1..n without gaps.
Alternative flows document every meaningful alternative or exception
condition of a main-scenario step. A use case without one states this
with an italic placeholder (_None — …_) instead of an invented flow;
the validator warns (NO_ALTERNATIVE_FLOWS) only when the section is
empty without a placeholder. Each trigger names its main-scenario
step as (step N) / (Schritt N); each flow's last step ends with
Use case continues at step N. or Use case ends. (German: Der Use Case wird bei Schritt N fortgesetzt. / Der Use Case endet.).
Success and failure postconditions are non-empty (an explicit italic
placeholder such as _None — …_ counts as a deliberate statement).
Business rule headings carry a BR-XXX: / GR-XXX: label, numbered
BR-001, BR-002, … without gaps within the document.
No implementation-level terms in steps (SMTP, email server, JWT, token, bcrypt, hash, salt, SHA, SQL, SELECT, INSERT).
BR-XXX ids are scoped to their use case: every document numbers
its rules from BR-001, and the same id may appear in other documents.
This matches Studio, which renumbers rules per document on save. A rule
referenced from another document is qualified with the use case id
("UC-005 BR-002"), never by the bare rule id.
python3 scripts/validate_use_case.py [--strict] docs/use_cases/UC-*.mdExit 0 when clean; 1 on any ERROR (with --strict also on any WARN);
--self-test runs the built-in fixtures. Newly generated documents must
pass --strict. Pre-existing hand-written documents must at minimum be
ERROR-free, or Studio cannot open them in the structured editor.