Now inviting automation leaders: publish your playbook as a skill, under your own name. Publish yours →
Automation Skills
All skills/Workflow architect/Active-workflow-discovery
Reference · Workflow architect

Active-workflow-discovery

Part of Workflow architect. Install the skill and your agent reads this page when it needs the depth.

Interviewer — Active Workflow Discovery

This is the core of workflow-architect's active workflow discovery mode. It runs a structured but adaptive conversation with the user to discover how they work.

State Model

The interview builds a structured representation of the user's workflow. State is stored via the memory tool with the prefix workflow-architect:state: so it survives across turns.

state:
  entry_points: []          # How sessions start
  phases: []                # Distinct phases discovered
    - name: string
      description: string
      typical_tools: []
      typical_openers: []   # What user says to enter this phase
      typical_exits: []     # What user says to leave this phase
  branching: []             # Decisions and what drives them
  pain_points: []
  exit_criteria: []         # How sessions end
  archetype: null           # Best match from workflow-archetypes
  convergence_score: 0      # 0.0 to 1.0 — enough to generate bundle?

Question Progression

The interview follows a branching script. Each answer feeds the state model and determines the next probe. Do not ask all questions sequentially — adapt based on what the user has already told you.

Phase 1: Session Opener (1-2 questions)

Start broad. The goal is to understand the user's self-model of their workflow.

Agent: "Walk me through a typical session from the very start.
        What's the first thing you do when you open this agent?"

User:  "I usually check my task list, see what's urgent, and jump into the
        most pressing issue."

Agent: [Records entry point: "check task list, prioritize by urgency"]
       [Probes for structure: "After that initial triage — what happens
        next? Does the session settle into a rhythm?"]

Alternative openers (pick one based on the user's stated context):

Phase 2: Phase Discovery (2-4 questions)

Probe for distinct modes or stages. Listen for transition language.

Key probes (use as follow-ups, not a checklist):

Branching detection — listen for these signals:

When you hear a branching signal, probe it:

User:  "If there are open PRs assigned to me, I review those first.
        Otherwise I look at my kanban board."
Agent: [Records branching signal: "pending PRs → review mode,
        otherwise → kanban triage"]
       "Got it. After you finish the PR review — what's the signal
        that tells you you're done with that and ready to move on?"

Phase 3: Tool & Context Probe (2-3 questions)

Map tools, context needs, and environmental patterns.

Phase 4: Pain Point & Flow Probe (1-2 questions)

The most valuable output of this skill is identifying where the workflow breaks down. Be patient here — users often haven't articulated this.

Phase 5: Exit & Rhythm Probe (1-2 questions)

Phase 6: Convergence Check

After each answer, evaluate whether you have enough to generate a useful bundle.

Minimum convergence criteria:

Convergence scoring:

Criteria met Score contribution
3+ phases 0.3
Entry points known 0.15
Branching signals found 0.2
Tools mapped to 2+ phases 0.15
Exit criteria known 0.1
Pain points identified 0.1

When convergence score >= 0.6, present a summary to the user:

"I think I have enough to generate your workflow bundle. Here's what
I've mapped out so far:

[Summary of phases, branching, tools, and pain points]

Does this look like an accurate picture of how you work?
If yes, I'll generate the bundle. If not, tell me what I got wrong
and I'll refine it."

If the user confirms, return to the parent and load skills/bundle-builder/SKILL.md and follow its instructions to generate the output bundle.

If the user corrects or refines, update the state and re-check convergence.

State Persistence

Use the memory tool to persist state across turns:

memory(action='add', target='memory',
       content='workflow-architect:state:entry_points=["check task list, prioritize"]')

Use a known key prefix per dimension so the bundle-builder can read all state entries:

Key Value type
workflow-architect:state:entry_points JSON array
workflow-architect:state:phases JSON array of phase objects
workflow-architect:state:branching JSON array of signal objects
workflow-architect:state:pain_points JSON array
workflow-architect:state:exit_criteria JSON array
workflow-architect:state:convergence_score Float 0-1
workflow-architect:state:archetype String or null

Important: On the final turn (after bundle generation), clean up these memory entries so they don't pollute future sessions:

memory(action='remove', target='memory',
       old_text='workflow-architect:state:')

The bundle-builder sub-skill handles reading all workflow-architect:state:* entries from memory and writing the output bundle files.

Archetype Matching

After each answer, check the shared references/workflow-archetypes.md file to see if the user's answers match a known archetype. If they do, note it in state and use it to seed better follow-up questions (e.g., "For a morning triage workflow, people often have a 'stale items bucket' — do you have something like that?")

When not to use

Do not use this skill for passive observation (load the observer instead), or when the user prefers you to infer from what they already did rather than be interrogated. It is for active, interactive discovery only.

Publish your skill

Copy this prompt into Claude Code, Codex or any agent. It walks you through your first skill in about 20 minutes, with you as the author.

Click to copy.