Update Workflow Explorer
Audit workflow-explorer.html and sync its flowchart data with the actual command/skill/agent source files.
Step 0: Determine Scope
Check $ARGUMENTS for user-provided context about what changed.
- Context given (e.g. "I just updated the implementation skill") → narrow to affected flowchart keys using the source mapping below
- No context → full audit of all 24 flowchart keys
- Ambiguous → ASK user to confirm scope before proceeding
Step 1: Read Source Files
For each in-scope flowchart key, read its source file(s) and extract the logical flow: steps, gates, decisions, loops, conditional branches, outputs.
Source Mapping
| Key |
Source Files |
research |
commands/workflow/start-research.md |
discussion |
commands/workflow/start-discussion.md |
specification |
commands/workflow/start-specification.md |
planning |
commands/workflow/start-planning.md |
implementation |
commands/workflow/start-implementation.md |
review |
commands/workflow/start-review.md |
skill-research |
skills/technical-research/SKILL.md |
skill-discussion |
skills/technical-discussion/SKILL.md |
skill-specification |
skills/technical-specification/SKILL.md + skills/technical-specification/references/steps/*.md |
skill-planning |
skills/technical-planning/SKILL.md + skills/technical-planning/references/steps/*.md |
skill-implementation |
skills/technical-implementation/SKILL.md + skills/technical-implementation/references/steps/*.md |
skill-review |
skills/technical-review/SKILL.md + agents/review-task-verifier.md |
start-feature |
commands/start-feature.md |
link-deps |
commands/link-dependencies.md |
status |
commands/workflow/status.md |
view-plan |
commands/workflow/view-plan.md |
migrate |
commands/migrate.md |
planning-phase-designer |
agents/planning-phase-designer.md |
planning-task-designer |
agents/planning-task-designer.md |
planning-task-author |
agents/planning-task-author.md |
planning-dependency-grapher |
agents/planning-dependency-grapher.md |
implementation-task-executor |
agents/implementation-task-executor.md |
implementation-task-reviewer |
agents/implementation-task-reviewer.md |
review-task-verifier |
agents/review-task-verifier.md |
Use parallel reads (Task tool with Explore agents or multiple Read calls) to gather sources efficiently.
Step 2: Read Current Flowchart Data
Read workflow-explorer.html and extract the 6 data structures for each in-scope key:
phases[key] — metadata (steps, desc, scenarios, detailHTML)
FLOWCHARTS[key] — nodes + connections
FLOWCHART_DESCS[key] — summary, body, meta
OVERVIEW_* — only if phases were added/removed/renamed
SOURCE_MAP[key] — repo-relative path to source file (update when files are renamed)
SKILL_NEXT_PHASE[key] — next-phase navigation for skill flowcharts
Step 3: Compare and Report
For each key, compare source logic against current flowchart data. Report per key:
- MATCH — no drift detected
- DRIFT — specific differences (added/removed steps, renamed concepts, changed gates, altered flow)
- MISSING — flowchart key exists in sources but not in explorer (or vice versa)
Present findings to the user and STOP. Wait for confirmation of which changes to apply before proceeding.
Step 4: Apply Updates
For each confirmed change, update the following in workflow-explorer.html:
FLOWCHARTS[key].nodes and .connections
FLOWCHART_DESCS[key] summary, body, meta
phases[key] desc, steps count, detailHTML (if affected)
OVERVIEW_* (only if phases added/removed)
Data Conventions
Follow the conventions documented in the file header (lines 1-41):
Node shapes:
pill — start/end nodes (w:150, h:40)
diamond — decision/routing nodes (w:110-130, h:110-130)
stop — hard-cornered terminal nodes for STOP/BLOCK (w:150-180, h:40, rx:3)
- rect (default) — action step nodes (w:180-200, h:44)
Connection types:
yes — green (positive branch from diamond)
no — red (negative branch from diamond)
transition — orange dashed (phase/context transitions)
backloop — gray dashed (retry/loop-back flows)
Color conventions (type-based, NOT phase-based — use CSS vars):
var(--action) sky blue — primary work steps (validate, extract, etc.)
var(--agent) cyan — agent invocation nodes (with optional skillLink to agent flowchart)
var(--text-dim) gray — utility/support steps (read existing, load format, etc.)
var(--ask) purple — user-interaction nodes
var(--routing) amber — decision diamonds (all diamonds use this)
var(--gate) red — STOP/BLOCK terminal nodes (hard-cornered stop shape), cache refresh
var(--discovery) green — discovery script execution
var(--skill) orange — skill invocation pills (with skillLink)
var(--next) blue — next-phase navigation nodes (rect, command color, same shape as agent nodes)
var(--accent) blue — entry points, migrations, git commits
var(--{phase}) phase color — END output artifacts only (keeps phase identity)
Node properties:
skillLink — on nodes that should navigate to a skill or agent flowchart on click
desc — tooltip text describing what the node does
Next-phase nodes (skill flowcharts only):
- Every skill flowchart except
skill-review has a next rect node at the end
- Node:
{ id: 'next', label: 'Invoke /start-{phase}', desc: '...', w: 200, h: 44, color: 'var(--next)', bg: 'var(--next-bg)', skillLink: NEXT_PHASE_KEY }
- Connection:
{ from: 'end', to: 'next', type: 'transition' }
- All next nodes use consistent command blue (
var(--next)) regardless of target phase
SKILL_NEXT_PHASE mapping must stay in sync
SOURCE_MAP maintenance:
- When source files are renamed or new flowchart keys are added, update
SOURCE_MAP accordingly
SOURCE_MAP maps flowchart keys to repo-relative file paths for the markdown viewer
Step 5: Validate and Verify
After applying updates:
- Check all connection
from/to values reference valid node IDs in the same flowchart
- Check for orphaned nodes (not referenced by any connection as source or target, excluding
start nodes)
- Remind user to open
workflow-explorer.html in browser for visual verification
1---2name: update-workflow-explorer3description: Audit and update workflow-explorer.html flowcharts to match the current codebase logic. Reads all command, skill, and agent source files, compares against the 4 data structures in the HTML file, reports drift, and applies updates. Use when workflow logic has changed and the explorer needs syncing.4---5
6# Update Workflow Explorer
7
8Audit `workflow-explorer.html` and sync its flowchart data with the actual command/skill/agent source files.
9
10## Step 0: Determine Scope
11
12Check `$ARGUMENTS` for user-provided context about what changed.
13
14- **Context given** (e.g. "I just updated the implementation skill") → narrow to affected flowchart keys using the source mapping below
15- **No context** → full audit of all 24 flowchart keys
16- **Ambiguous** → ASK user to confirm scope before proceeding
17
18## Step 1: Read Source Files
19
20For each in-scope flowchart key, read its source file(s) and extract the logical flow: steps, gates, decisions, loops, conditional branches, outputs.
21
22### Source Mapping
23
24| Key | Source Files |
25|---|---|
26| `research` | `commands/workflow/start-research.md` |
27| `discussion` | `commands/workflow/start-discussion.md` |
28| `specification` | `commands/workflow/start-specification.md` |
29| `planning` | `commands/workflow/start-planning.md` |
30| `implementation` | `commands/workflow/start-implementation.md` |
31| `review` | `commands/workflow/start-review.md` |
32| `skill-research` | `skills/technical-research/SKILL.md` |
33| `skill-discussion` | `skills/technical-discussion/SKILL.md` |
34| `skill-specification` | `skills/technical-specification/SKILL.md` + `skills/technical-specification/references/steps/*.md` |
35| `skill-planning` | `skills/technical-planning/SKILL.md` + `skills/technical-planning/references/steps/*.md` |
36| `skill-implementation` | `skills/technical-implementation/SKILL.md` + `skills/technical-implementation/references/steps/*.md` |
37| `skill-review` | `skills/technical-review/SKILL.md` + `agents/review-task-verifier.md` |
38| `start-feature` | `commands/start-feature.md` |
39| `link-deps` | `commands/link-dependencies.md` |
40| `status` | `commands/workflow/status.md` |
41| `view-plan` | `commands/workflow/view-plan.md` |
42| `migrate` | `commands/migrate.md` |
43| `planning-phase-designer` | `agents/planning-phase-designer.md` |
44| `planning-task-designer` | `agents/planning-task-designer.md` |
45| `planning-task-author` | `agents/planning-task-author.md` |
46| `planning-dependency-grapher` | `agents/planning-dependency-grapher.md` |
47| `implementation-task-executor` | `agents/implementation-task-executor.md` |
48| `implementation-task-reviewer` | `agents/implementation-task-reviewer.md` |
49| `review-task-verifier` | `agents/review-task-verifier.md` |
50
51Use parallel reads (Task tool with Explore agents or multiple Read calls) to gather sources efficiently.
52
53## Step 2: Read Current Flowchart Data
54
55Read `workflow-explorer.html` and extract the 6 data structures for each in-scope key:
56
571. **`phases[key]`** — metadata (steps, desc, scenarios, detailHTML)
582. **`FLOWCHARTS[key]`** — nodes + connections
593. **`FLOWCHART_DESCS[key]`** — summary, body, meta
604. **`OVERVIEW_*`** — only if phases were added/removed/renamed
615. **`SOURCE_MAP[key]`** — repo-relative path to source file (update when files are renamed)
626. **`SKILL_NEXT_PHASE[key]`** — next-phase navigation for skill flowcharts
63
64## Step 3: Compare and Report
65
66For each key, compare source logic against current flowchart data. Report per key:
67
68- **MATCH** — no drift detected
69- **DRIFT** — specific differences (added/removed steps, renamed concepts, changed gates, altered flow)
70- **MISSING** — flowchart key exists in sources but not in explorer (or vice versa)
71
72**Present findings to the user and STOP. Wait for confirmation of which changes to apply before proceeding.**
73
74## Step 4: Apply Updates
75
76For each confirmed change, update the following in `workflow-explorer.html`:
77
78- `FLOWCHARTS[key].nodes` and `.connections`
79- `FLOWCHART_DESCS[key]` summary, body, meta
80- `phases[key]` desc, steps count, detailHTML (if affected)
81- `OVERVIEW_*` (only if phases added/removed)
82
83### Data Conventions
84
85Follow the conventions documented in the file header (lines 1-41):
86
87**Node shapes:**
88- `pill` — start/end nodes (w:150, h:40)
89- `diamond` — decision/routing nodes (w:110-130, h:110-130)
90- `stop` — hard-cornered terminal nodes for STOP/BLOCK (w:150-180, h:40, rx:3)
91- rect (default) — action step nodes (w:180-200, h:44)
92
93**Connection types:**
94- `yes` — green (positive branch from diamond)
95- `no` — red (negative branch from diamond)
96- `transition` — orange dashed (phase/context transitions)
97- `backloop` — gray dashed (retry/loop-back flows)
98
99**Color conventions (type-based, NOT phase-based — use CSS vars):**
100- `var(--action)` sky blue — primary work steps (validate, extract, etc.)
101- `var(--agent)` cyan — agent invocation nodes (with optional `skillLink` to agent flowchart)
102- `var(--text-dim)` gray — utility/support steps (read existing, load format, etc.)
103- `var(--ask)` purple — user-interaction nodes
104- `var(--routing)` amber — decision diamonds (all diamonds use this)
105- `var(--gate)` red — STOP/BLOCK terminal nodes (hard-cornered `stop` shape), cache refresh
106- `var(--discovery)` green — discovery script execution
107- `var(--skill)` orange — skill invocation pills (with `skillLink`)
108- `var(--next)` blue — next-phase navigation nodes (rect, command color, same shape as agent nodes)
109- `var(--accent)` blue — entry points, migrations, git commits
110- `var(--{phase})` phase color — END output artifacts only (keeps phase identity)
111
112**Node properties:**
113- `skillLink` — on nodes that should navigate to a skill or agent flowchart on click
114- `desc` — tooltip text describing what the node does
115
116**Next-phase nodes (skill flowcharts only):**
117- Every skill flowchart except `skill-review` has a `next` rect node at the end
118- Node: `{ id: 'next', label: 'Invoke /start-{phase}', desc: '...', w: 200, h: 44, color: 'var(--next)', bg: 'var(--next-bg)', skillLink: NEXT_PHASE_KEY }`
119- Connection: `{ from: 'end', to: 'next', type: 'transition' }`
120- All next nodes use consistent command blue (`var(--next)`) regardless of target phase
121- `SKILL_NEXT_PHASE` mapping must stay in sync
122
123**SOURCE_MAP maintenance:**
124- When source files are renamed or new flowchart keys are added, update `SOURCE_MAP` accordingly
125- `SOURCE_MAP` maps flowchart keys to repo-relative file paths for the markdown viewer
126
127## Step 5: Validate and Verify
128
129After applying updates:
130
1311. Check all connection `from`/`to` values reference valid node IDs in the same flowchart
1322. Check for orphaned nodes (not referenced by any connection as source or target, excluding `start` nodes)
1333. Remind user to open `workflow-explorer.html` in browser for visual verification