Flow

From eddiebelaval/squire · View interactive version

Flow is an AI agent skill from the GitHub repository eddiebelaval/squire. Interactive interview to map and document user flows before building. Two modes — inventory (Stage 3) and deep-dive (Stage 5+).

How to use this skill

Skill file

Flow Discovery

Core Workflows

Workflow 1: Primary Action

  1. Analyze the input and context
  2. Validate prerequisites are met
  3. Execute the core operation
  4. Verify the output meets expectations
  5. Report results

Interactive interview system that maps user flows BEFORE building features. This skill enforces the rule: no feature gets built without a signed-off flow spec.

Two modes serve two pipeline stages:

| Mode | Pipeline Stage | Purpose | Output |

|------|---------------|---------|--------|

| Inventory | Stage 3 (Architecture) | Map ALL flows in the product | Flow inventory doc + HTML flow map |

| Deep Dive | Stage 5+ (Feature Blocks) | Detail ONE flow before building it | Flow spec + HTML flow diagram |

CRITICAL RULES

  1. NEVER skip the interview. Do not fill in flow details from assumptions or inference. Every field comes from Eddie's answers.
  2. Use AskUserQuestion for structured choices. Use natural conversation for open-ended descriptions.
  3. Generate BOTH outputs. Every run produces a markdown doc AND an HTML visualization.
  4. Stop building if a flow is missing. If you're about to implement a feature and realize no flow spec exists, run /flow deep-dive FIRST.

Mode 1: Flow Inventory (Stage 3)

When: Starting a new project or entering Stage 3 (Architecture Sketch).

Goal: Identify every user flow in the product and how they connect.

Duration: 15-30 minute interview.

Interview Process

Step 1 — Identify User Types

Ask Eddie using AskUserQuestion:

Step 2 — Map Entry Points

Ask Eddie:

Step 3 — List Every Flow

Walk through the product systematically. For each area, ask:

Cover these categories (adapt to the product):

Step 4 — Prioritize

Ask Eddie using AskUserQuestion:

Step 5 — Map Connections

Ask Eddie:

Output Generation

  1. Markdown: Fill in prep-templates/flow-discovery.md and save to workspace/prep/flow-discovery.md
  2. HTML: Generate an interactive flow map using /visualize and save to ~/Development/artifacts/[project]/flow-map.html
  3. Report: Summarize the inventory — total flows, critical count, deferred count, any gaps identified

Mode 2: Deep Dive (Stage 5+)

When: About to build a specific feature. MUST happen before any code for that feature.

Goal: Document every detail of ONE user flow so it can be built exactly right.

Duration: 10-20 minutes per flow (complex flows may take longer).

Interview Process

Run through all 9 categories below. For each, use AskUserQuestion for structured choices and conversation for open-ended descriptions.

Category 1: Context

Category 2: Entry Conditions

Category 3: Steps (THE CORE — spend the most time here)

For each step in the flow, ask:

Keep asking "and then what?" until Eddie says the flow is complete.

Use AskUserQuestion to confirm branching:

Category 4: States

Ask about each state explicitly:

Category 5: Decision Points

Category 6: Permissions

Category 7: Edge Cases

Walk through each explicitly:

Category 8: Responsive

Category 9: Exit

Output Generation

  1. Markdown: Fill in doc-templates/flow-spec.md and save to workspace/prep/flows/flow-[slug].md
  2. HTML: Generate a step-by-step flow diagram using /visualize and save to ~/Development/artifacts/[project]/flow-[slug].html
  3. Checklist: Confirm all sections are filled — flag any gaps for follow-up

Quick Reference

| Command | Action |

|---------|--------|

| /flow | Choose between inventory and deep-dive mode |

| /flow inventory | Run Stage 3 flow inventory interview |

| /flow deep-dive | Run Stage 5+ per-feature flow interview |

| /flow check | Audit current project — which flows have specs, which don't |

| /flow list | Show all documented flows for current project |

Pipeline Integration

Stage 3 Gate Addition

Flow inventory MUST exist before passing Stage 3. Checkpoint question:

"Are all user flows identified and mapped?"

Stage 5 Gate Addition

Each feature MUST have a flow spec before building. Checkpoint:

"Does this feature have an approved flow spec?"

Stage 8 Gate Addition

All flow specs MUST match the built implementation. Checkpoint:

"Do the actual flows match the documented flow specs?"

Red Flags (Stop and Interview)

Anti-Patterns

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.