Interactive fix mode - address swarm findings one by one
Fixes issues found by swarm agents in manual or automatic mode with progress tracking.
/plugin marketplace add arevlo/claude-code-workflows/plugin install arevlo-swarm@claude-code-workflowsFix issues found by swarm agents. Choose between manual mode (one at a time) or automatic mode (fix all).
/fix [--critical] [--file <path>] [--agent <name>] [--auto]
Arguments:
--critical - Only show P0/HIGH priority issues (default)--file <path> - Only show issues in specific file--agent <name> - Only show issues from specific agent--auto - Skip mode selection and run automatic mode directlyLoad swarm findings:
.claude/swarm/reports/Build issue queue:
Issue queue (6 total):
1. [P0] main.ts:56-57 - Unhandled async message handler
2. [P0] collector.ts:225 - Page load failures in global mode
3. [P0] index.ts:6-19 - DOM elements without null checks
4. [HIGH] main.ts:44-46 - Unsafe SceneNode assertion
5. [HIGH] collector.ts:147 - Untyped boundVariables cast
6. [HIGH] index.ts:206 - No runtime validation for messages
Ask for fix mode (unless --auto flag provided):
Use AskUserQuestion tool:
{
"questions": [{
"question": "How would you like to fix these 6 issues?",
"header": "Fix Mode",
"options": [
{"label": "Manual (Recommended)", "description": "Review and fix issues one at a time with options to skip"},
{"label": "Automatic", "description": "Fix all issues automatically, show summary at end"}
],
"multiSelect": false
}]
}
If "Manual": Continue to step 4 (interactive mode) If "Automatic": Jump to step 8 (automatic mode)
[MANUAL MODE] Present first issue:
┌─────────────────────────────────────────────────────────┐
│ ISSUE 1/6 [P0] │
│ │
│ Unhandled async message handler │
│ File: main.ts:56-57 │
│ Agent: silent-hunter │
│ │
│ Problem: │
│ Async handler lacks try/catch. Errors will silently │
│ fail and break message flow. │
│ │
│ Current code: │
│ ```typescript │
│ onmessage = async (msg) => { │
│ await processMessage(msg); │
│ } │
│ ``` │
└─────────────────────────────────────────────────────────┘
[MANUAL MODE] Ask user how to proceed:
Use AskUserQuestion tool:
{
"questions": [{
"question": "How would you like to handle this issue?",
"header": "Action",
"options": [
{"label": "Fix it (Recommended)", "description": "Claude will implement the fix and show you the diff"},
{"label": "Skip", "description": "Move to next issue without fixing"},
{"label": "View file", "description": "Open and read the file for more context"},
{"label": "Exit fix mode", "description": "Stop fixing, return to normal mode"}
],
"multiSelect": false
}]
}
[MANUAL MODE] Based on response:
If "Fix it":
Fixed: main.ts:56-57
- onmessage = async (msg) => {
- await processMessage(msg);
- }
+ onmessage = async (msg) => {
+ try {
+ await processMessage(msg);
+ } catch (error) {
+ console.error('Message handler error:', error);
+ figma.notify('Error processing message', { error: true });
+ }
+ }
[1/6 complete] Next issue? [Y/n]
If "Skip":
If "View file":
If "Exit fix mode":
[MANUAL MODE] Continue until queue empty or user exits
[AUTOMATIC MODE] Process all issues:
When automatic mode is selected (or --auto flag used):
┌─────────────────────────────────────────────────────────┐
│ AUTOMATIC FIX MODE │
│ │
│ Processing 6 issues... │
└─────────────────────────────────────────────────────────┘
For each issue in the queue:
[1/6] Fixing: main.ts:56-57 - Unhandled async...During processing, show progress updates:
[1/6] ✓ Fixed: main.ts:56-57 - Unhandled async message handler
[2/6] ✓ Fixed: collector.ts:225 - Page load failures in global mode
[3/6] ✗ Failed: index.ts:6-19 - Could not determine safe fix
[4/6] ✓ Fixed: main.ts:44-46 - Unsafe SceneNode assertion
[5/6] ✓ Fixed: collector.ts:147 - Untyped boundVariables cast
[6/6] ✓ Fixed: index.ts:206 - No runtime validation for messages
Handling failures:
Show completion summary:
Manual mode summary:
┌─────────────────────────────────────────────────────────┐
│ FIX MODE COMPLETE (Manual) │
│ │
│ Fixed: 4 issues │
│ Skipped: 2 issues │
│ │
│ Files modified: │
│ - main.ts (2 fixes) │
│ - collector.ts (1 fix) │
│ - index.ts (1 fix) │
│ │
│ Skipped issues saved to: │
│ .claude/swarm/skipped.md │
│ │
│ Run tests to verify fixes: npm test │
└─────────────────────────────────────────────────────────┘
Automatic mode summary:
┌─────────────────────────────────────────────────────────┐
│ FIX MODE COMPLETE (Automatic) │
│ │
│ ✓ Fixed: 5 issues │
│ ✗ Failed: 1 issue │
│ │
│ Files modified: │
│ - main.ts (2 fixes) │
│ - collector.ts (2 fixes) │
│ - index.ts (1 fix) │
│ │
│ Failed issues (require manual review): │
│ - index.ts:6-19 - DOM elements without null checks │
│ Reason: Multiple DOM operations, unclear scope │
│ │
│ Failed issues saved to: │
│ .claude/swarm/failed.md │
│ │
│ Run tests to verify fixes: npm test │
└─────────────────────────────────────────────────────────┘
any with proper types?.)??)Manual mode (recommended for most cases):
Automatic mode:
--auto flag to skip the mode selection prompt.claude/swarm/skipped.md.claude/swarm/failed.md