Pack Availability Guard
Before telling the user to run a skill from another project-local pack, check .agents/project.json.enabled_packs. If the target pack is not enabled, recommend npx skillpacks install <pack> from the project shell, instead of the target skill. Global skills are always valid. Skills from this same pack are valid because the current skill is already running from that pack.
User Flow Map
Invoke as $user-flow-map.
Use this skill after positioning and before UX/UI/prototype work when a product, feature, or goal sequence needs concrete user-flow structure: entry points, screens/routes, actions, decisions, branches, states, failure paths, handoffs, and low-fidelity wireframe notes. Treat the output as the root of a wireframe tree: each mapped user flow can fan out into $ux-variations [flow], where the team explores alternate ways users can progress through that specific flow before any one variation is promoted into $ui-interview.
This skill does not create polished UI, visual styling, production specs, or runnable prototypes. Keep layout and styling out of scope except for wireframe-level structural notes such as "summary panel beside task list" or "confirmation step before destructive action." Do not flatten the tree into a single UI requirements path; preserve named user flows as branch roots for downstream variation work.
Process
0. Product-Path Scope Resolution
Resolve research scope by product path before using code or app structure as a hint:
- If
$ARGUMENTS names a non-archived research/{slug}/ directory or a product-path ID whose scope_path points there, use that path. Treat {slug} as the product/app name, not the ICP, audience, or segment label.
- If
$ARGUMENTS names only research/_archive/{slug}/ or a manifest entry with status: archived or legacy status: abandoned, stop and warn that the path is archived; do not write or update scoped outputs there.
- Read
research/.progress.yaml when present. Normalize legacy active_path to active_paths on read and write back active_paths on manifest updates. Treat legacy abandoned as archived; exclude archived, abandoned, deferred, revisit_candidate, promoted, and any scope_path under research/_archive/ from active target selection.
- If active product paths exist in the manifest, use those paths. If multiple active paths exist, ask which one to target unless this skill explicitly supports cross-path output.
- If no active manifest target exists, list non-archived product directories under
research/, excluding research/_archive/ and dot directories. Auto-select only when exactly one exists; ask when multiple exist.
- If no product directories exist, use flat
research/ single-product mode.
- Detect monorepo/app/package structure only as a secondary hint. Suggest creating a missing
research/{slug}/ product path when code clearly exposes an app, but do not require code or monorepo detection before using research/{slug}/.
When product path {slug} is active, read and write research under research/{slug}/, pre-prototype design artifacts under design/{slug}/, finalized post-prototype implementation specs under specs/{slug}/, and treat top-level research/*.md and design/*.md files as flat-mode documents or cross-path summaries.
0b. Design Flow Tree Manifest
Use design/flow-tree.schema.json as the machine-readable contract for the pre-prototype product-design tree.
- Product-path mode writes one scoped manifest at
design/{slug}/flow-tree-{topic}.yaml.
- Flat mode writes one scoped manifest at
design/flow-tree-{topic}.yaml.
- Initialize the manifest when writing the flow map. Set
schema_version: v0.1, mode, topic, product_path when scoped, route: [user-flow-map, ux-variations, ui-interview, prototype, consolidate-variations, spec-interview], source_artifacts, and one branches[] entry per named user-flow branch.
- Track user-flow, UX-variation, UI review, and approve/reject/retry decision state only in the design manifest. Do not write UX branch state to
research/.progress.yaml; that file remains product-path/product-line tracking.
- Reference all pre-prototype design artifacts from the manifest using repo-relative paths.
1. Resolve Context
Read available evidence before asking deep questions:
.agents/project.json, AGENTS.md, CLAUDE.md, README.md, and relevant task docs.
research/idea-brief.md, research/icp.md, research/competitive-analysis.md, research/journey-map.md, research/positioning.md, and product-path-scoped equivalents.
- Existing
design/, including design/user-flow-*.md, design/ui-requirements-*.md, design/ui-*.md, design/ux-variations-*.md, product-path-scoped equivalents, and design/**/flow-tree-*.yaml.
- Existing
specs/ only as finalized post-prototype implementation context.
- Existing route files, component files, app shells, navigation config, screenshots, wireframes, mockups, and design artifacts when present.
If research/positioning.md is missing for a business-product flow, recommend $positioning first. If product-design is not enabled, recommend npx skillpacks install product-design from the project shell.
2. Flow Assumptions Checkpoint
Before deep probing, present a concise Flow Assumptions Checkpoint inline as the final message text of its own turn — never only as mid-turn text in a turn that ends with a tool or command call — then ask the user to confirm, correct, or flag it in the next turn. Tag each assumption with [from idea], [from research], [from positioning], [from journey], [from spec], [from codebase], [from artifact], or [inferred].
Cover:
- Persona, role, and goal.
- Entry points and triggers.
- First success or completion condition.
- Happy path sequence.
- Alternate paths and branch points.
- Decisions the user or system must make.
- Screens/routes likely required.
- Actions per screen.
- States to represent: empty, loading, error, partial, success, permission-denied, offline, validation, and edge states.
- Failure and recovery paths.
- Cross-role, cross-device, external-system, or manual handoffs.
- Flow boundaries and explicit non-goals.
Do not proceed until the user has reviewed the checkpoint. If the user confirms it as-is, continue. If they correct an assumption, carry the correction into both deliverables.
3. Map The Flow
Build the flow map at workflow level, not visual-design level:
- Define the primary persona, goal, success condition, and triggering context.
- List every entry point and precondition.
- Write the happy path as ordered steps with the screen/route used by each step.
- List alternate paths, including optional setup, skip paths, backtracking, cancellation, save-for-later, review/edit, and escalation.
- List decision points and branch rules. Distinguish user decisions, system decisions, permissions decisions, and external/manual decisions.
- Create a screen/route inventory with purpose, inputs, outputs, source evidence, and downstream destination.
- For each screen, list required actions, available navigation, disabled/blocked rules, validation rules, and state coverage.
- Map failures and recovery: invalid input, no data, permissions, lost connection, backend failure, timeouts, interrupted work, and contradictory user choices.
- Map handoffs across roles, devices, systems, documents, notifications, approvals, payments, support, or manual operations.
- Add low-fidelity wireframe notes for each screen: rough regions, primary/secondary content, key controls, data groupings, progressive disclosure, and fixed/sticky elements only when structurally necessary.
4. Coverage Checkpoint
Before writing deliverables, present a Flow Coverage Checkpoint inline as the final message text of its own turn (never only as mid-turn text before a tool or command call):
- Persona and goal covered.
- Entry points covered.
- Happy path covered.
- Branches and decision points covered.
- Screen/route inventory covered.
- Actions per screen covered.
- Required states covered.
- Failure/recovery paths covered.
- Handoffs covered.
- Wireframe-level notes covered.
- Layout/styling non-goals preserved.
In the next turn, ask whether any flow branch, state, or handoff is missing before writing.
Deliverables
Write:
design/user-flow-[topic].md in flat mode or design/{slug}/user-flow-[topic].md in product-path mode.
design/user-flow-[topic]-interview.md in flat mode or design/{slug}/user-flow-[topic]-interview.md in product-path mode.
design/flow-tree-[topic].yaml in flat mode or design/{slug}/flow-tree-[topic].yaml in product-path mode.
The user-flow spec must include:
- Scope, source evidence, and assumptions checkpoint.
- Persona, goal, and success condition.
- Entry points and preconditions.
- Happy path.
- Alternate paths and branches.
- Decision-point table.
- Screen/route inventory.
- Per-screen action/state matrix.
- Failure and recovery paths.
- Handoffs and external/manual dependencies.
- Low-fidelity wireframe notes per screen.
- Open questions, risks, and explicit non-goals.
- Downstream handoff choices for
$ux-variations [specific-user-flow].
- Flow-tree manifest branch IDs and artifact references.
The interview log must include:
- Evidence consulted.
- The Flow Assumptions Checkpoint and user corrections.
- Questions asked, options presented, recommendations, and user responses.
- Flow Coverage Checkpoint and remaining gaps.
After approved files are written, present this handoff choice instead of auto-running or auto-invoking the next skill:
- Stop here so the user can clear context and run
$ux-variations [specific-user-flow] in a fresh session.
- Continue immediately in this session with
$ux-variations [specific-user-flow] for the first unresolved user-flow branch.
If the user chooses to continue immediately, the next skill must still execute its own required interaction gates. user-flow-map approval authorizes the wireframe-tree root and provides source evidence; it does not approve any UX variation branch, visual mockup, UI proposal, or implementation path, and it does not count as ui-interview interview completion.
Alignment Page
When this skill produces durable deliverables (research, specs, plans, reports, prototypes, or any document output), build a full-depth HTML alignment page following ALIGNMENT-PAGE.md in this skill's directory. Output: alignment/user-flow-map-{topic}.html.
Archive-First Replacement Policy
- Before replacing or substantively rewriting an existing canonical research/design/spec document (
research/**/*.md, design/**/*.md, specs/**/*.md, or docs/specifications/**/*.md), copy the current file to docs/history/archive/YYYY-MM-DD/HHMMSS/<original-relative-path>.
- Preserve the archived snapshot exactly as it existed before the change; do not edit the archived copy after creating it.
- After the archive snapshot exists, write the updated document to the original canonical path.
- Report both the archive path and the updated canonical path in the final output.
- New files do not need archive snapshots. Append-only updates do not need archive snapshots unless an existing section is regenerated or rewritten.
Constraints
- Keep this skill before UX variation, UI layout, and prototype work in the AFPS route.
- Do not produce high-fidelity mockups, component styling, color palettes, design systems, production architecture, database schemas, or implementation plans.
- Do not collapse branches or states into generic "standard flow" language. Name each branch/state or mark it explicitly out of scope.
- Do not route directly to
$ui-interview from an approved flow map unless the user explicitly bypasses variation exploration for a named flow. The normal route is $user-flow-map -> $ux-variations [specific-user-flow] -> $ui-interview [specific-ux-variation].
- Do not write pre-prototype flow maps to
specs/. design/ is the canonical home for flow maps, UX variation plans, UI branch packets, branch decisions, mockup references, and flow-tree manifests.
- Do not auto-run or auto-invoke downstream skills after approval. Present the stop/clear-context versus continue-now choice, and preserve the next skill's required gates either way.
- When recommending a skill from another pack, verify pack availability through
.agents/project.json.enabled_packs.
Default Shipping Contract
Follow the shared shipping contract convention in CLAUDE.md.
1---2name: user-flow-map-83description: Turn a high-level product concept, positioned goal, or goal sequence into screen flow structure with entry points, decisions/actions/states, branches, failure paths, and low-fidelity wireframe guidance before UI/spec/prototype work4---5
6## Pack Availability Guard
7
8Before telling the user to run a skill from another project-local pack, check `.agents/project.json.enabled_packs`. If the target pack is not enabled, recommend `npx skillpacks install <pack>` from the project shell, instead of the target skill. Global skills are always valid. Skills from this same pack are valid because the current skill is already running from that pack.
9
10# User Flow Map
11
12Invoke as `$user-flow-map`.
13
14Use this skill after positioning and before UX/UI/prototype work when a product, feature, or goal sequence needs concrete user-flow structure: entry points, screens/routes, actions, decisions, branches, states, failure paths, handoffs, and low-fidelity wireframe notes. Treat the output as the root of a wireframe tree: each mapped user flow can fan out into `$ux-variations [flow]`, where the team explores alternate ways users can progress through that specific flow before any one variation is promoted into `$ui-interview`.
15
16This skill does not create polished UI, visual styling, production specs, or runnable prototypes. Keep layout and styling out of scope except for wireframe-level structural notes such as "summary panel beside task list" or "confirmation step before destructive action." Do not flatten the tree into a single UI requirements path; preserve named user flows as branch roots for downstream variation work.
17
18## Process
19
20### 0. Product-Path Scope Resolution
21
22Resolve research scope by product path before using code or app structure as a hint:
23
241. If `$ARGUMENTS` names a non-archived `research/{slug}/` directory or a product-path ID whose `scope_path` points there, use that path. Treat `{slug}` as the product/app name, not the ICP, audience, or segment label.
252. If `$ARGUMENTS` names only `research/_archive/{slug}/` or a manifest entry with `status: archived` or legacy `status: abandoned`, stop and warn that the path is archived; do not write or update scoped outputs there.
263. Read `research/.progress.yaml` when present. Normalize legacy `active_path` to `active_paths` on read and write back `active_paths` on manifest updates. Treat legacy `abandoned` as `archived`; exclude `archived`, `abandoned`, `deferred`, `revisit_candidate`, `promoted`, and any `scope_path` under `research/_archive/` from active target selection.
274. If active product paths exist in the manifest, use those paths. If multiple active paths exist, ask which one to target unless this skill explicitly supports cross-path output.
285. If no active manifest target exists, list non-archived product directories under `research/`, excluding `research/_archive/` and dot directories. Auto-select only when exactly one exists; ask when multiple exist.
296. If no product directories exist, use flat `research/` single-product mode.
307. Detect monorepo/app/package structure only as a secondary hint. Suggest creating a missing `research/{slug}/` product path when code clearly exposes an app, but do not require code or monorepo detection before using `research/{slug}/`.
31
32When product path `{slug}` is active, read and write research under `research/{slug}/`, pre-prototype design artifacts under `design/{slug}/`, finalized post-prototype implementation specs under `specs/{slug}/`, and treat top-level `research/*.md` and `design/*.md` files as flat-mode documents or cross-path summaries.
33
34### 0b. Design Flow Tree Manifest
35
36Use `design/flow-tree.schema.json` as the machine-readable contract for the pre-prototype product-design tree.
37
38- Product-path mode writes one scoped manifest at `design/{slug}/flow-tree-{topic}.yaml`.
39- Flat mode writes one scoped manifest at `design/flow-tree-{topic}.yaml`.
40- Initialize the manifest when writing the flow map. Set `schema_version: v0.1`, `mode`, `topic`, `product_path` when scoped, `route: [user-flow-map, ux-variations, ui-interview, prototype, consolidate-variations, spec-interview]`, `source_artifacts`, and one `branches[]` entry per named user-flow branch.
41- Track user-flow, UX-variation, UI review, and approve/reject/retry decision state only in the design manifest. Do not write UX branch state to `research/.progress.yaml`; that file remains product-path/product-line tracking.
42- Reference all pre-prototype design artifacts from the manifest using repo-relative paths.
43
44### 1. Resolve Context
45
46Read available evidence before asking deep questions:
47
48- `.agents/project.json`, `AGENTS.md`, `CLAUDE.md`, `README.md`, and relevant task docs.
49- `research/idea-brief.md`, `research/icp.md`, `research/competitive-analysis.md`, `research/journey-map.md`, `research/positioning.md`, and product-path-scoped equivalents.
50- Existing `design/`, including `design/user-flow-*.md`, `design/ui-requirements-*.md`, `design/ui-*.md`, `design/ux-variations-*.md`, product-path-scoped equivalents, and `design/**/flow-tree-*.yaml`.
51- Existing `specs/` only as finalized post-prototype implementation context.
52- Existing route files, component files, app shells, navigation config, screenshots, wireframes, mockups, and design artifacts when present.
53
54If `research/positioning.md` is missing for a business-product flow, recommend `$positioning` first. If `product-design` is not enabled, recommend `npx skillpacks install product-design` from the project shell.
55
56### 2. Flow Assumptions Checkpoint
57
58Before deep probing, present a concise **Flow Assumptions Checkpoint** inline as the final message text of its own turn — never only as mid-turn text in a turn that ends with a tool or command call — then ask the user to confirm, correct, or flag it in the next turn. Tag each assumption with `[from idea]`, `[from research]`, `[from positioning]`, `[from journey]`, `[from spec]`, `[from codebase]`, `[from artifact]`, or `[inferred]`.
59
60Cover:
61
62- Persona, role, and goal.
63- Entry points and triggers.
64- First success or completion condition.
65- Happy path sequence.
66- Alternate paths and branch points.
67- Decisions the user or system must make.
68- Screens/routes likely required.
69- Actions per screen.
70- States to represent: empty, loading, error, partial, success, permission-denied, offline, validation, and edge states.
71- Failure and recovery paths.
72- Cross-role, cross-device, external-system, or manual handoffs.
73- Flow boundaries and explicit non-goals.
74
75Do not proceed until the user has reviewed the checkpoint. If the user confirms it as-is, continue. If they correct an assumption, carry the correction into both deliverables.
76
77### 3. Map The Flow
78
79Build the flow map at workflow level, not visual-design level:
80
811. Define the primary persona, goal, success condition, and triggering context.
822. List every entry point and precondition.
833. Write the happy path as ordered steps with the screen/route used by each step.
844. List alternate paths, including optional setup, skip paths, backtracking, cancellation, save-for-later, review/edit, and escalation.
855. List decision points and branch rules. Distinguish user decisions, system decisions, permissions decisions, and external/manual decisions.
866. Create a screen/route inventory with purpose, inputs, outputs, source evidence, and downstream destination.
877. For each screen, list required actions, available navigation, disabled/blocked rules, validation rules, and state coverage.
888. Map failures and recovery: invalid input, no data, permissions, lost connection, backend failure, timeouts, interrupted work, and contradictory user choices.
899. Map handoffs across roles, devices, systems, documents, notifications, approvals, payments, support, or manual operations.
9010. Add low-fidelity wireframe notes for each screen: rough regions, primary/secondary content, key controls, data groupings, progressive disclosure, and fixed/sticky elements only when structurally necessary.
91
92### 4. Coverage Checkpoint
93
94Before writing deliverables, present a **Flow Coverage Checkpoint** inline as the final message text of its own turn (never only as mid-turn text before a tool or command call):
95
96- Persona and goal covered.
97- Entry points covered.
98- Happy path covered.
99- Branches and decision points covered.
100- Screen/route inventory covered.
101- Actions per screen covered.
102- Required states covered.
103- Failure/recovery paths covered.
104- Handoffs covered.
105- Wireframe-level notes covered.
106- Layout/styling non-goals preserved.
107
108In the next turn, ask whether any flow branch, state, or handoff is missing before writing.
109
110## Deliverables
111
112Write:
113
114- `design/user-flow-[topic].md` in flat mode or `design/{slug}/user-flow-[topic].md` in product-path mode.
115- `design/user-flow-[topic]-interview.md` in flat mode or `design/{slug}/user-flow-[topic]-interview.md` in product-path mode.
116- `design/flow-tree-[topic].yaml` in flat mode or `design/{slug}/flow-tree-[topic].yaml` in product-path mode.
117
118The user-flow spec must include:
119
120- Scope, source evidence, and assumptions checkpoint.
121- Persona, goal, and success condition.
122- Entry points and preconditions.
123- Happy path.
124- Alternate paths and branches.
125- Decision-point table.
126- Screen/route inventory.
127- Per-screen action/state matrix.
128- Failure and recovery paths.
129- Handoffs and external/manual dependencies.
130- Low-fidelity wireframe notes per screen.
131- Open questions, risks, and explicit non-goals.
132- Downstream handoff choices for `$ux-variations [specific-user-flow]`.
133- Flow-tree manifest branch IDs and artifact references.
134
135The interview log must include:
136
137- Evidence consulted.
138- The Flow Assumptions Checkpoint and user corrections.
139- Questions asked, options presented, recommendations, and user responses.
140- Flow Coverage Checkpoint and remaining gaps.
141
142After approved files are written, present this handoff choice instead of auto-running or auto-invoking the next skill:
143
1441. Stop here so the user can clear context and run `$ux-variations [specific-user-flow]` in a fresh session.
1452. Continue immediately in this session with `$ux-variations [specific-user-flow]` for the first unresolved user-flow branch.
146
147If the user chooses to continue immediately, the next skill must still execute its own required interaction gates. `user-flow-map` approval authorizes the wireframe-tree root and provides source evidence; it does not approve any UX variation branch, visual mockup, UI proposal, or implementation path, and it does not count as `ui-interview` interview completion.
148
149## Alignment Page
150
151When this skill produces durable deliverables (research, specs, plans, reports, prototypes, or any document output), build a full-depth HTML alignment page following `ALIGNMENT-PAGE.md` in this skill's directory. Output: `alignment/user-flow-map-{topic}.html`.
152
153## Archive-First Replacement Policy
154
155- Before replacing or substantively rewriting an existing canonical research/design/spec document (`research/**/*.md`, `design/**/*.md`, `specs/**/*.md`, or `docs/specifications/**/*.md`), copy the current file to `docs/history/archive/YYYY-MM-DD/HHMMSS/<original-relative-path>`.
156- Preserve the archived snapshot exactly as it existed before the change; do not edit the archived copy after creating it.
157- After the archive snapshot exists, write the updated document to the original canonical path.
158- Report both the archive path and the updated canonical path in the final output.
159- New files do not need archive snapshots. Append-only updates do not need archive snapshots unless an existing section is regenerated or rewritten.
160
161## Constraints
162
163- Keep this skill before UX variation, UI layout, and prototype work in the AFPS route.
164- Do not produce high-fidelity mockups, component styling, color palettes, design systems, production architecture, database schemas, or implementation plans.
165- Do not collapse branches or states into generic "standard flow" language. Name each branch/state or mark it explicitly out of scope.
166- Do not route directly to `$ui-interview` from an approved flow map unless the user explicitly bypasses variation exploration for a named flow. The normal route is `$user-flow-map` -> `$ux-variations [specific-user-flow]` -> `$ui-interview [specific-ux-variation]`.
167- Do not write pre-prototype flow maps to `specs/`. `design/` is the canonical home for flow maps, UX variation plans, UI branch packets, branch decisions, mockup references, and flow-tree manifests.
168- Do not auto-run or auto-invoke downstream skills after approval. Present the stop/clear-context versus continue-now choice, and preserve the next skill's required gates either way.
169- When recommending a skill from another pack, verify pack availability through `.agents/project.json.enabled_packs`.
170
171## Default Shipping Contract
172
173Follow the shared shipping contract convention in CLAUDE.md.