update-workflow-explorer
npx skills add https://github.com/leeovery/claude-technical-workflows --skill update-workflow-explorer
Agent 安装分布
Skill 文档
Update Workflow Explorer
Audit workflow-explorer.html and sync its flowchart data with the actual command/skill/agent source files.
Step 0: Determine Scope
0a: Check for explicit context
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
- Ambiguous â ASK user to confirm scope before proceeding
If explicit context was given, skip 0b and proceed to Step 1 with the narrowed scope.
0b: Detect git context
If no explicit context was given, check the git state:
- Branch check â run
git branch --show-current. If not onmain/master, note the feature branch name. - Changed files â run
git diff main --name-only(branch changes) andgit diff --name-only+git diff --cached --name-only(uncommitted/staged changes). Combine into a single list of changed files. - Cross-reference â match changed files against the source mapping below. Identify which flowchart keys are affected.
If changed source files are detected, present findings to the user:
I’m on branch
{branch}with changes to these source files:
{file}â flowchart key(s):{key}- …
Options:
- Scope to these changes â audit only the affected flowchart keys (recommended if this branch represents all recent work)
- Full audit â audit all flowchart keys regardless of git state
Wait for user confirmation before proceeding.
If no changed source files are detected (on main with clean tree), proceed with a full audit.
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 + connectionsFLOWCHART_DESCS[key]â summary, body, metaOVERVIEW_*â only if phases were added/removed/renamedSOURCE_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].nodesand.connectionsFLOWCHART_DESCS[key]summary, body, metaphases[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 optionalskillLinkto agent flowchart)var(--text-dim)gray â utility/support steps (read existing, load format, etc.)var(--ask)purple â user-interaction nodesvar(--routing)amber â decision diamonds (all diamonds use this)var(--gate)red â STOP/BLOCK terminal nodes (hard-corneredstopshape), cache refreshvar(--discovery)green â discovery script executionvar(--skill)orange â skill invocation pills (withskillLink)var(--next)blue â next-phase navigation nodes (rect, command color, same shape as agent nodes)var(--accent)blue â entry points, migrations, git commitsvar(--{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 clickdescâ tooltip text describing what the node does
Next-phase nodes (skill flowcharts only):
- Every skill flowchart except
skill-reviewhas anextrect 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_PHASEmapping must stay in sync
SOURCE_MAP maintenance:
- When source files are renamed or new flowchart keys are added, update
SOURCE_MAPaccordingly SOURCE_MAPmaps flowchart keys to repo-relative file paths for the markdown viewer
Step 5: Validate and Verify
After applying updates:
- Check all connection
from/tovalues reference valid node IDs in the same flowchart - Check for orphaned nodes (not referenced by any connection as source or target, excluding
startnodes) - Remind user to open
workflow-explorer.htmlin browser for visual verification