Derives user flows for UI features as mermaid flowcharts with happy path, error branches, screen inventory (SCR-NN), and coverage table. Works from a user story or PRD, asking "what can go wrong" for error branches.
Ships in sdlc. 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.
Draws how the user moves through a UI feature: one mermaid flowchart per user goal (happy
path + the error branches), the screen inventory (SCR-NN — the id contract screens details
next), and a coverage table that shows where every story sentence, failure or acceptance criterion
ended up. The artifact is always markdown + mermaid, whatever docs/design/design-system.md
picks as the drawing tool: flows are about movement between screens, not about their look.
Two modes (plus extra instructions in the command), one skill — degrade, don't refuse. The intent comes from the input ladder in
../_shared/design-line.md §3:
docs/features/<slug>/PRD.md exists: one flow per UI-touching §4 user story,
one branch per relevant §5 AC. Same coverage rules as complete-sequence-diagrams.story.md, design-spec.md,
idea-brief.md, or inline). The happy path comes from the story's sentences (S-N); the error
branches come from the «what can go wrong» question (W-NN); anything inferred without
confirmation is derived (D-NN) and listed under ## Assumptions./sdlc:ux-flows chat <text> while PRD.md exists). The source stays the base; the text adds
instructions the source does not have: narrow to one story, add failures, screens or
constraints. Each item is N-NN (from the invocation) and gets its branch, screen or note and a
coverage row, per ../_shared/design-line.md §3 «Text in the
invocation». With no source at all, the text is the story (S-N).Each diagram is confirmed in prose, never as raw mermaid →
../_shared/diagram-presentation.md; parse-validated per
../_shared/mermaid-check.md; questions per
../_shared/ask-style.md; confirm-vs-proceed per
../_shared/interview-depth.md.
Whoever owns the user experience (PM, designer, or the solo developer). In full mode the PM confirms
each flow matches a real user story; the Tech Lead flags flows that imply architecture (they become
architecture-design input, not decisions here).
<slug> — kebab-case feature slug.../_shared/design-line.md §3):
PRD.md → design-spec.md → story.md → idea-brief.md → inline story → ask for 3–5 sentences.
Only a missing intent stops the skill; a missing PRD never does.N-NN
(design-line §3); never a replacement for the source.docs/design/design-system.md — the platform posture. Absent → not a block: assume
the posture the code suggests, and recommend /sdlc:design-system in the handoff.CONTEXT.md — canonical role names for the actors.--depth=easy|medium|hard, else interview_depth from .claude/sdlc.local.md, else
medium. This skill does not open its own depth question.Resolve the intent + read. Walk the input ladder and record the source used. Story given
inline, no source 1–4 found and no docs/features/<slug>/story.md yet → write it verbatim from
./templates/story.md to docs/features/<slug>/story.md first, so the
next skills read the same words. Number the story's sentences S-1…S-n. Read
docs/design/design-system.md (posture; note its absence) and CONTEXT.md if present. In full
mode read PRD §1, §4 (which user stories touch a UI?) and §5.
Text in the command next to the source → split it into items and number them N-01…:
a narrowing (which story or goal), an added failure, an added screen, a constraint. A narrowing
limits which stories get flows; the rest stay listed as out of scope by the command, not
dropped. An item that contradicts the source (an AC, a story sentence) → one AskUserQuestion
per ../_shared/ask-style.md: «Лишити як у джерелі (Recommended)» /
«Зробити як у команді»; whatever is picked, record the decision under ## Assumptions and, when the source is
the PRD, add the contradiction to the handoff as a PRD gap for /sdlc:clarify-prd. No question
channel → follow the source and record the contradiction the same way.
Draft the happy path(s). Full mode: one flow per UI-touching §4 user story (only the ones an
N-NN narrowing keeps, when the command gave one); a backend-only
story is listed as out of scope with one line, not drawn. Story mode: one flow per distinct user
goal in the story (usually one). Name every screen the flow visits and give it an SCR-NN id.
Ask «what can go wrong» — story mode always; full mode at hard, and at any depth when the
command text asks to think about failures (for failures the ACs missed). An added failure from
the command is already N-NN: it is not offered again as an option. One AskUserQuestion,
multiSelect: true, built per ../_shared/design-line.md §4: the
drafted happy path in one sentence as context, up to 4 failures most likely for this story
as options, «Other» for the rest; every step that calls the server gets its own failure
candidate, and when they do not fit into 4 options a second question follows. Each picked item
becomes W-NN (source: the user's answer) and gets a branch. In the
same call, only if the canon is absent or the story implies a different platform, add a second
question to confirm the posture. No question channel (headless / claude -p) → derive
one failure per server-calling step plus the story's likely ones yourself as D-NN, and
continue per §5 of the same file.
Write + confirm each flow — prose, never raw mermaid. Bootstrap
./templates/ux-flows.md → docs/features/<slug>/ux-flows.md on the
first flow (Read the template, Write the file; never cp from the plugin's folder); write each flow as soon as it is drafted. Validate it parses per
../_shared/mermaid-check.md. When the real parser could not run
(no mmdc, no permission for npx), say so in the handoff in one line and name what checked it
instead («mermaid: npx not permitted — structural lint per mermaid-check.md»); never report a
parse that did not run. Then describe it in plain words —
the happy path and every branch. medium/hard: one AskUserQuestion per flow with the
4-state actions («Прийняти» / «Виправити» / «Винести у відкрите питання» / «Викинути»); on
«Виправити» regenerate that one flow (one round, second answer final). easy or no question
channel: write + one-line summary into ## Assumptions and proceed.
On the canvas there are no transitions between screens: say in the prose that the drawing tool
will show these screens as static frames left to right, and the clickable flow lives in code;
/sdlc:screens also draws this flow as a board «Flow · » from this mermaid (a diagram of
the sequence, drawn arrows, still no transitions in pen.dev).
Inventory + coverage. Fill the screen inventory (SCR-NN, purpose, entry, exit, and which
branches land on it — the states screens will draw). Fill the coverage table: one row per
story sentence S-N and per W-NN (story mode) or per §5 AC (full mode), plus one row per
N-NN item from the command in either mode, each pointing to the flow/branch/screen that shows
it, or an explicit N/A: <reason>. Every row carries its provenance
token per ../_shared/design-line.md §3. Stamp frontmatter
input: (prd / design-spec / story / idea-brief) and updated_at.
Structural self-check — re-read the file from disk and verify 5 items (count with
Read / Grep, never a composed $(…) command):
(1) every UI-touching §4 user story (full mode) or every story sentence (story mode) is shown by a
flow or marked out of scope;
(2) every SCR id used in a flow exists in the inventory, and every inventory row appears in ≥1 flow;
(3) every §5 AC / every W-NN / every N-NN from the command appears in the coverage table with
a flow/branch/screen or an explicit N/A, and every contradiction with the source is recorded
under ## Assumptions (and, with a PRD source, in the handoff as a PRD gap);
(4) every mermaid block parses (by the parser, or by the fallback the handoff names);
(5) every branch and coverage row has a provenance token, and every D-NN / derived item is
listed under ## Assumptions.
Fix and re-check at most 2 cycles; surface anything unresolved — never silently.
Propose the commit + handoff. Propose ux-flows: <slug> ux-flows.md (with story.md when
this run created it). Unresolved self-check item → no commit, say why. Then emit the
stage-handoff block per ../_shared/handoff.md — What I did
(mode + input source + «and N items from the command» when there were some, N flows, N screens,
N W / N D / N N items, the PRD gaps for /sdlc:clarify-prd, N assumptions,
«self-check: 5/5 pass», how the mermaid was checked (the parser, or the named fallback), the
proposed commit; + «docs/design/design-system.md absent — run
/sdlc:design-system» when it was) + Review (docs/features/<slug>/ux-flows.md) + Run next:
/clear, then /sdlc:prepare-design-spec <slug>; in full mode with no sad.md yet,
↳ or /sdlc:architecture-design <slug> with docs/features/<slug>/ux-flows.md named in the
prompt as target-surface evidence (it does not read the file on its own yet).
docs/features/<slug>/ux-flows.md exists: platform decisions, the SCR-NN inventory, one flow per
UI-touching user story / story goal (happy path + error branches), the coverage table.W-NN) or are visibly
derived (D-NN) and listed under ## Assumptions; nothing pretends to be an acceptance criterion.N-NN with its branch, screen or note and
a coverage row; the source was not replaced; every contradiction was asked (or, headless,
followed the source), recorded under ## Assumptions and, with a PRD source, handed off as a
PRD gap.easy / headless); every mermaid
block parses.screens.D-NN, not W-NN
and never AC-NN.screens.architecture-design.diagram-presentation.md exists to kill.screens flow board are a drawn diagram, not transitions../templates/ux-flows.md — output scaffold; inline comments are the
generation contract../templates/story.md — the short user story, written when it came inline.../_shared/design-line.md — input ladder, provenance tokens, the
«what can go wrong» question, headless rule, file layout.../_shared/diagram-presentation.md ·
../_shared/mermaid-check.md — confirm-in-prose + parse-validation./sdlc:ux-flows chat Як користувач Threads Premium, після взаємного метчу я хочу
одразу написати людині в застосунку, а не переходити в Threads. Чат відкривається з вікна метчу.
Я бачу, що моє повідомлення доставлене, і бачу відповідь без перезавантаження сторінки.
Story mode (no PRD): the text is the story. Expected outputs: docs/features/chat/story.md,
docs/features/chat/ux-flows.md.
/sdlc:ux-flows chat лише історія про перше повідомлення після метчу; подумай, що буде, коли
мережа зникне посеред відправки, і додай екран, де видно, що людина вже прочитала
Full mode with docs/features/chat/PRD.md present: the PRD is the base (its US and ACs give the
flows and branches); the text adds N-01 (narrow to the first-message story; the other stories
are listed as out of scope by the command), N-02 (a send failure on a lost network, which also
triggers the «what can go wrong» question at any depth) and N-03 (a «read» screen the PRD does
not have). Each N-NN gets a coverage row; if N-03 contradicts an AC (say, the PRD forbids read
receipts), one question decides and the contradiction goes to the handoff as a PRD gap for
/sdlc:clarify-prd. Expected output: docs/features/chat/ux-flows.md (no story.md).
What SKILL.md sets; muted values are Claude Code's defaults
inherithighThree short reads, in order
/sdlc:ux-flowsfrom sdlc
npx claudepluginhub genkovich/sdlc --plugin sdlc24 skills in this plugin
/api-forgeUse to derive the API contract for a feature — an OpenAPI 3.1 document at docs/features/{slug}/contracts/openapi.yaml plus a drift/sync report (api-sync-report.md with an explicit Verdict: PASS | PASS (with deferrals) | FAIL and a 5-point drift checklist), the right contract artifact per surface (events.md for async, cli.md for CLI, public-api.md for library/SDK), and — on the HTTP path, first run only — a baseline .claude/rules/openapi.md so later code follows the same API conventions. Triggers on "api for {slug}", "openapi for {slug}", "API contract for {slug}", "lock the interface for {slug}", "events for {slug}", "/sdlc:api-forge {slug}", "контракт API для {slug}", "OpenAPI для {slug}", "опиши ендпоінти". The contract is never hand-written: it is a derived function of data-model.md (typed fields + constraints), sad.md §6 sequence diagrams (error branches, async actors), and PRD.md acceptance criteria. Hard gate: docs/features/{slug}/PRD.md. data-model.md is recommended but optional — without it the skill runs in scenario B (PRD + sequences only) and fills unresolved_origins in the sync report. Renamed from define-api in v3.3.0; the legacy name is kept as a deprecation wrapper.
/architecture-designUse to produce a Software Architecture Document for a feature — Arc42 12 sections + C4 L1/L2 inline + ADRs spawned on a blast-radius gate — once PRD.md and CONTEXT.md exist. The feature's target surface(s) are chosen here (the first §4 decision → SAD frontmatter target_surfaces, read by every downstream stage). Drafts §1–§12 in-memory, batch-validates each section Socratically (4-state machine), spawns an ADR only when a decision crosses the blast-radius threshold (irreversible / multi-module / has legitimate alternatives), writes each resolved section + its ADRs atomically, then runs a clean-context critic before finalizing. Brownfield: reads docs/architecture-map.md (re-scans only if absent/stale). Triggers on "architecture for {slug}", "design architecture for {slug}", "SAD for {slug}", "arc42 for {slug}", "C4 context+container for {slug}", "/sdlc:architecture-design {slug}", "спроектуй архітектуру {slug}", "SAD для {slug}", "архітектурний документ {slug}". Hard-refuse if docs/features/{slug}/PRD.md is missing. Triggers: /sdlc:architecture-design {slug}. Output: docs/features/{slug}/sad.md + adr/NNNN-*.md./break-tasksUse to break a designed feature into atomic, ≤1-day tasks with a dependency graph, a per-task Definition of Done, and a machine-readable tasks.json that the implement-tasks engine consumes. Triggers on "task breakdown for {slug}", "break down tasks for {slug}", "tasks for {slug}", "plan the work for {slug}", "sprint plan for {feature}", "stage 13 for {slug}", "/sdlc:break-tasks {slug}". Reads PRD.md + sad.md + Accepted ADRs (+ data-model + openapi if present), writes docs/features/{slug}/tasks/{_epic,tracker,<task>}.md AND docs/features/{slug}/tasks/tasks.json. Tracker export to any issue tracker is optional and tool-neutral. Hard-refuses if PRD.md or sad.md or an Accepted ADR is missing. Stories LINK to upstream artefacts (PRD AC §, SAD §6, data-model, openapi), they do not duplicate them.
/clarify-prdUse to run an ambiguity sweep over a written PRD.md and close every under-specified point before glossary or architecture proceeds — so two engineers can't reasonably build different things from the same PRD. Triggers on "/sdlc:clarify-prd {slug}", "clarify {slug}", "find ambiguities in {slug}", "is the PRD ready", "sharpen the PRD", "прояснити PRD", "знайди неоднозначності {slug}", "чи готова специфікація". Re-reads the PRD, dispatches a clean-context devil's-advocate subagent to list where the PRD forks, then for each ambiguity runs AskUserQuestion to RESOLVE it (tighten §1/§5/§6 in place) or DEFER it (→ §8 Open questions with owner+due). Output: an updated docs/features/{slug}/PRD.md with every ambiguity resolved or deferred — none dangling. Hard-refuse if PRD.md is missing./classify-sizeUse to classify a feature into XS/S/M/L/XL and write docs/features/{slug}/.size so later skills know how much of each artifact to produce. Triggers on "classify size", "feature size", "is this XS or M for {slug}", "size {slug}", "/sdlc:classify-size {slug}", "класифікуй розмір {slug}", "який розмір фічі", "XS чи M". Asks four AskUserQuestion (PR count / time / new module-API-migration / breaking changes), maps to a size class via the shared size matrix, confirms with the user, and writes the one-line .size file. Syncs with PRD.md frontmatter feature_size: if present (warns on conflict). Output: docs/features/{slug}/.size + (opt.) PRD frontmatter update./complete-sequence-diagramsUse to add Mermaid sequenceDiagram blocks to the SAD's runtime view (sad.md §6) — one per critical flow, showing how a request moves between generic participants with happy + error paths. Triggers on "complete sequences for {slug}", "sequence diagram for {slug}", "draw the runtime flow", "add a sequence to the SAD", "/sdlc:complete-sequence-diagrams {slug}", "діаграми послідовності {slug}", "sequence для {slug}", "намалюй потік {slug}". Reads sad.md §5 for participants, drafts each flow from templates/seq-flow.md with generic participants, walks them Socratically one flow at a time, writes confirmed blocks into sad.md §6 — they inform data-model indexes downstream — and closes with the US/AC → flow coverage table written as the last block of §6 (`### Coverage: US/AC → flows`). Hard-refuse if sad.md is missing → run /sdlc:architecture-design first. Single-flow mode: /sdlc:complete-sequence-diagrams {slug} --flow {name}.Other plugins' skills for the same job