awesome-slash 2.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/.claude-plugin/marketplace.json +54 -0
  2. package/.claude-plugin/plugin.json +11 -0
  3. package/.mcp.json +8 -0
  4. package/CHANGELOG.md +261 -0
  5. package/LICENSE +21 -0
  6. package/README.md +363 -0
  7. package/SECURITY.md +101 -0
  8. package/adapters/README.md +256 -0
  9. package/adapters/codex/README.md +272 -0
  10. package/adapters/codex/install.sh +179 -0
  11. package/adapters/opencode/README.md +301 -0
  12. package/adapters/opencode/install.sh +223 -0
  13. package/lib/patterns/review-patterns.js +511 -0
  14. package/lib/patterns/slop-patterns.js +647 -0
  15. package/lib/platform/detect-platform.js +535 -0
  16. package/lib/platform/verify-tools.js +235 -0
  17. package/lib/state/workflow-state.js +635 -0
  18. package/lib/state/workflow-state.schema.json +282 -0
  19. package/lib/utils/context-optimizer.js +227 -0
  20. package/mcp-server/index.js +303 -0
  21. package/mcp-server/package.json +23 -0
  22. package/package.json +63 -0
  23. package/plugins/deslop-around/.claude-plugin/plugin.json +20 -0
  24. package/plugins/deslop-around/commands/deslop-around.md +220 -0
  25. package/plugins/deslop-around/lib/patterns/review-patterns.js +511 -0
  26. package/plugins/deslop-around/lib/patterns/slop-patterns.js +641 -0
  27. package/plugins/deslop-around/lib/platform/detect-platform.js +514 -0
  28. package/plugins/deslop-around/lib/platform/verify-tools.js +235 -0
  29. package/plugins/deslop-around/lib/state/workflow-state.js +635 -0
  30. package/plugins/deslop-around/lib/state/workflow-state.schema.json +282 -0
  31. package/plugins/deslop-around/lib/utils/context-optimizer.js +222 -0
  32. package/plugins/next-task/.claude-plugin/plugin.json +24 -0
  33. package/plugins/next-task/agents/ci-fixer.md +236 -0
  34. package/plugins/next-task/agents/ci-monitor.md +291 -0
  35. package/plugins/next-task/agents/delivery-validator.md +451 -0
  36. package/plugins/next-task/agents/deslop-work.md +272 -0
  37. package/plugins/next-task/agents/docs-updater.md +506 -0
  38. package/plugins/next-task/agents/exploration-agent.md +277 -0
  39. package/plugins/next-task/agents/implementation-agent.md +427 -0
  40. package/plugins/next-task/agents/planning-agent.md +236 -0
  41. package/plugins/next-task/agents/policy-selector.md +248 -0
  42. package/plugins/next-task/agents/review-orchestrator.md +521 -0
  43. package/plugins/next-task/agents/simple-fixer.md +136 -0
  44. package/plugins/next-task/agents/task-discoverer.md +357 -0
  45. package/plugins/next-task/agents/test-coverage-checker.md +447 -0
  46. package/plugins/next-task/agents/worktree-manager.md +419 -0
  47. package/plugins/next-task/commands/delivery-approval.md +331 -0
  48. package/plugins/next-task/commands/next-task.md +627 -0
  49. package/plugins/next-task/commands/update-docs-around.md +418 -0
  50. package/plugins/next-task/hooks/hooks.json +14 -0
  51. package/plugins/next-task/lib/patterns/review-patterns.js +511 -0
  52. package/plugins/next-task/lib/patterns/slop-patterns.js +641 -0
  53. package/plugins/next-task/lib/platform/detect-platform.js +514 -0
  54. package/plugins/next-task/lib/platform/verify-tools.js +235 -0
  55. package/plugins/next-task/lib/state/tasks-registry.schema.json +85 -0
  56. package/plugins/next-task/lib/state/workflow-state.js +635 -0
  57. package/plugins/next-task/lib/state/workflow-state.schema.json +282 -0
  58. package/plugins/next-task/lib/state/worktree-status.schema.json +219 -0
  59. package/plugins/next-task/lib/utils/context-optimizer.js +222 -0
  60. package/plugins/project-review/.claude-plugin/plugin.json +20 -0
  61. package/plugins/project-review/commands/project-review-agents.md +286 -0
  62. package/plugins/project-review/commands/project-review-github.md +142 -0
  63. package/plugins/project-review/commands/project-review.md +273 -0
  64. package/plugins/project-review/lib/patterns/review-patterns.js +511 -0
  65. package/plugins/project-review/lib/patterns/slop-patterns.js +641 -0
  66. package/plugins/project-review/lib/platform/detect-platform.js +514 -0
  67. package/plugins/project-review/lib/platform/verify-tools.js +235 -0
  68. package/plugins/project-review/lib/state/workflow-state.js +635 -0
  69. package/plugins/project-review/lib/state/workflow-state.schema.json +282 -0
  70. package/plugins/project-review/lib/utils/context-optimizer.js +222 -0
  71. package/plugins/reality-check/.claude-plugin/plugin.json +23 -0
  72. package/plugins/reality-check/README.md +156 -0
  73. package/plugins/reality-check/agents/code-explorer.md +353 -0
  74. package/plugins/reality-check/agents/doc-analyzer.md +337 -0
  75. package/plugins/reality-check/agents/issue-scanner.md +231 -0
  76. package/plugins/reality-check/agents/plan-synthesizer.md +479 -0
  77. package/plugins/reality-check/commands/scan.md +242 -0
  78. package/plugins/reality-check/commands/set.md +203 -0
  79. package/plugins/reality-check/lib/state/reality-check-state.js +509 -0
  80. package/plugins/reality-check/skills/reality-analysis/SKILL.md +317 -0
  81. package/plugins/ship/.claude-plugin/plugin.json +21 -0
  82. package/plugins/ship/commands/ship-ci-review-loop.md +443 -0
  83. package/plugins/ship/commands/ship-deployment.md +330 -0
  84. package/plugins/ship/commands/ship-error-handling.md +254 -0
  85. package/plugins/ship/commands/ship.md +370 -0
  86. package/plugins/ship/lib/patterns/review-patterns.js +511 -0
  87. package/plugins/ship/lib/patterns/slop-patterns.js +641 -0
  88. package/plugins/ship/lib/platform/detect-platform.js +514 -0
  89. package/plugins/ship/lib/platform/verify-tools.js +235 -0
  90. package/plugins/ship/lib/state/workflow-state.js +635 -0
  91. package/plugins/ship/lib/state/workflow-state.schema.json +282 -0
  92. package/plugins/ship/lib/utils/context-optimizer.js +222 -0
  93. package/scripts/install/claude.sh +50 -0
  94. package/scripts/install/codex.sh +181 -0
  95. package/scripts/install/opencode.sh +211 -0
@@ -0,0 +1,521 @@
1
+ ---
2
+ name: review-orchestrator
3
+ description: Orchestrate multi-agent code review. Use this agent after implementation to coordinate code-reviewer, silent-failure-hunter, and test-analyzer until all critical/high issues are resolved.
4
+ tools: Task, Bash(git:*), Read, Edit
5
+ model: opus
6
+ ---
7
+
8
+ # Review Orchestrator Agent
9
+
10
+ You coordinate multiple review agents in parallel, aggregate their findings,
11
+ and iterate until all critical and high-severity issues are resolved.
12
+
13
+ ## Configuration
14
+
15
+ ```javascript
16
+ const MAX_ITERATIONS = 3; // From policy.maxReviewIterations
17
+ const workflowState = require('${CLAUDE_PLUGIN_ROOT}/lib/state/workflow-state.js');
18
+ ```
19
+
20
+ ## ⚠️ MANDATORY STATE UPDATES
21
+
22
+ ```
23
+ ╔══════════════════════════════════════════════════════════════════════════╗
24
+ ║ YOU MUST UPDATE STATE AFTER EACH ITERATION ║
25
+ ╠══════════════════════════════════════════════════════════════════════════╣
26
+ ║ ║
27
+ ║ After EACH review iteration, update: ║
28
+ ║ ║
29
+ ║ 1. .claude/workflow-status.json (in worktree): ║
30
+ ║ - Current iteration number ║
31
+ ║ - Issues found/fixed counts ║
32
+ ║ - lastActivityAt timestamp ║
33
+ ║ ║
34
+ ║ 2. .claude/tasks.json (in main repo): ║
35
+ ║ - lastActivityAt timestamp ║
36
+ ║ - currentStep: 'review-iteration-N' ║
37
+ ║ ║
38
+ ║ FAILURE TO UPDATE = RESUME WILL FAIL ║
39
+ ║ ║
40
+ ╚══════════════════════════════════════════════════════════════════════════╝
41
+ ```
42
+
43
+ ### State Update After Each Iteration
44
+
45
+ ```javascript
46
+ function updateStateAfterIteration(iteration, findings) {
47
+ const fs = require('fs');
48
+
49
+ // 1. Update worktree status
50
+ const statusPath = '.claude/workflow-status.json';
51
+ const status = JSON.parse(fs.readFileSync(statusPath, 'utf8'));
52
+
53
+ status.steps.push({
54
+ step: `review-iteration-${iteration}`,
55
+ status: 'completed',
56
+ completedAt: new Date().toISOString(),
57
+ result: {
58
+ issuesFound: findings.totals.critical + findings.totals.high,
59
+ issuesFixed: findings.issuesFixed || 0
60
+ }
61
+ });
62
+
63
+ status.workflow.lastActivityAt = new Date().toISOString();
64
+ status.agents.reviewIterations = iteration;
65
+ status.agents.issuesFound = (status.agents.issuesFound || 0) + findings.totals.critical + findings.totals.high;
66
+
67
+ fs.writeFileSync(statusPath, JSON.stringify(status, null, 2));
68
+ console.log(`✓ Updated workflow-status.json: review-iteration-${iteration}`);
69
+
70
+ // 2. Update main repo tasks.json
71
+ if (status.git?.mainRepoPath) {
72
+ const mainTasksPath = status.git.mainRepoPath + '/.claude/tasks.json';
73
+ if (fs.existsSync(mainTasksPath)) {
74
+ const registry = JSON.parse(fs.readFileSync(mainTasksPath, 'utf8'));
75
+ const idx = registry.tasks.findIndex(t => t.id === status.task.id);
76
+ if (idx >= 0) {
77
+ registry.tasks[idx].lastActivityAt = new Date().toISOString();
78
+ registry.tasks[idx].currentStep = `review-iteration-${iteration}`;
79
+ fs.writeFileSync(mainTasksPath, JSON.stringify(registry, null, 2));
80
+ }
81
+ }
82
+ }
83
+ }
84
+ ```
85
+
86
+ ## Phase 1: Get Changed Files
87
+
88
+ ```bash
89
+ # Get list of changed files
90
+ CHANGED_FILES=$(git diff --name-only HEAD~1..HEAD 2>/dev/null || git diff --name-only)
91
+ CHANGED_COUNT=$(echo "$CHANGED_FILES" | wc -l)
92
+
93
+ echo "Files to review: $CHANGED_COUNT"
94
+ echo "$CHANGED_FILES"
95
+
96
+ # Get diff stats
97
+ git diff --stat HEAD~1..HEAD 2>/dev/null || git diff --stat
98
+ ```
99
+
100
+ ## Phase 2: Start Review Phase
101
+
102
+ ```javascript
103
+ workflowState.startPhase('review-loop');
104
+ workflowState.updateState({
105
+ phases: { currentIteration: 0 }
106
+ });
107
+ ```
108
+
109
+ ## Phase 3: Launch Review Agents (Parallel)
110
+
111
+ Launch all 3 review agents simultaneously:
112
+
113
+ ```javascript
114
+ const changedFiles = CHANGED_FILES.split('\n').filter(Boolean);
115
+ const changedFilesList = changedFiles.join(', ');
116
+
117
+ // Launch agents in parallel
118
+ const reviewPromises = [
119
+ // 1. Code Reviewer
120
+ Task({
121
+ subagent_type: "pr-review-toolkit:code-reviewer",
122
+ prompt: `Review the following changed files for code quality issues:
123
+
124
+ Files: ${changedFilesList}
125
+
126
+ Check for:
127
+ - Code style and consistency
128
+ - Best practices violations
129
+ - Potential bugs and logic errors
130
+ - Maintainability issues
131
+ - Code duplication
132
+
133
+ Provide findings in this format:
134
+ {
135
+ "issues": [
136
+ {
137
+ "file": "path/to/file.ts",
138
+ "line": 42,
139
+ "severity": "critical|high|medium|low",
140
+ "category": "bug|style|performance|security",
141
+ "description": "Issue description",
142
+ "suggestion": "How to fix"
143
+ }
144
+ ],
145
+ "summary": {
146
+ "critical": 0,
147
+ "high": 0,
148
+ "medium": 0,
149
+ "low": 0
150
+ }
151
+ }`
152
+ }),
153
+
154
+ // 2. Silent Failure Hunter
155
+ Task({
156
+ subagent_type: "pr-review-toolkit:silent-failure-hunter",
157
+ prompt: `Review the following changed files for silent failures and error handling issues:
158
+
159
+ Files: ${changedFilesList}
160
+
161
+ Check for:
162
+ - Empty catch blocks
163
+ - Swallowed promises (no await, no .catch)
164
+ - Missing error propagation
165
+ - Generic error messages without context
166
+ - Unhandled rejection scenarios
167
+ - Missing null/undefined checks
168
+
169
+ Provide findings in the same JSON format with severity levels.`
170
+ }),
171
+
172
+ // 3. Test Analyzer
173
+ Task({
174
+ subagent_type: "pr-review-toolkit:pr-test-analyzer",
175
+ prompt: `Review test coverage for the following changed files:
176
+
177
+ Files: ${changedFilesList}
178
+
179
+ Check for:
180
+ - New code without corresponding tests
181
+ - Missing edge case coverage
182
+ - Test quality (meaningful assertions)
183
+ - Integration test needs
184
+ - Mock/stub appropriateness
185
+
186
+ Provide findings in the same JSON format with severity levels.`
187
+ })
188
+ ];
189
+
190
+ const results = await Promise.all(reviewPromises);
191
+ ```
192
+
193
+ ## Phase 4: Aggregate Results
194
+
195
+ ```javascript
196
+ function aggregateFindings(results) {
197
+ const allIssues = {
198
+ critical: [],
199
+ high: [],
200
+ medium: [],
201
+ low: []
202
+ };
203
+
204
+ for (const result of results) {
205
+ if (result.issues) {
206
+ for (const issue of result.issues) {
207
+ allIssues[issue.severity].push(issue);
208
+ }
209
+ }
210
+ }
211
+
212
+ return {
213
+ issues: allIssues,
214
+ totals: {
215
+ critical: allIssues.critical.length,
216
+ high: allIssues.high.length,
217
+ medium: allIssues.medium.length,
218
+ low: allIssues.low.length
219
+ },
220
+ needsIteration: allIssues.critical.length > 0 || allIssues.high.length > 0
221
+ };
222
+ }
223
+
224
+ const findings = aggregateFindings(results);
225
+ ```
226
+
227
+ ## Phase 5: Update Agent Results in State
228
+
229
+ ```javascript
230
+ workflowState.updateState({
231
+ agents: {
232
+ lastRun: {
233
+ codeReviewer: {
234
+ status: 'completed',
235
+ issues: results[0].summary?.total || 0,
236
+ critical: results[0].summary?.critical || 0,
237
+ high: results[0].summary?.high || 0
238
+ },
239
+ silentFailureHunter: {
240
+ status: 'completed',
241
+ issues: results[1].summary?.total || 0,
242
+ critical: results[1].summary?.critical || 0,
243
+ high: results[1].summary?.high || 0
244
+ },
245
+ testAnalyzer: {
246
+ status: 'completed',
247
+ issues: results[2].summary?.total || 0,
248
+ critical: results[2].summary?.critical || 0,
249
+ high: results[2].summary?.high || 0
250
+ }
251
+ },
252
+ totalIssuesFound: findings.totals.critical + findings.totals.high +
253
+ findings.totals.medium + findings.totals.low
254
+ }
255
+ });
256
+ ```
257
+
258
+ ## Phase 6: Report Findings
259
+
260
+ ```markdown
261
+ ## Review Results - Iteration ${iteration}
262
+
263
+ ### Summary
264
+ | Agent | Critical | High | Medium | Low |
265
+ |-------|----------|------|--------|-----|
266
+ | Code Reviewer | ${cr.critical} | ${cr.high} | ${cr.medium} | ${cr.low} |
267
+ | Silent Failure Hunter | ${sf.critical} | ${sf.high} | ${sf.medium} | ${sf.low} |
268
+ | Test Analyzer | ${ta.critical} | ${ta.high} | ${ta.medium} | ${ta.low} |
269
+ | **Total** | **${totals.critical}** | **${totals.high}** | **${totals.medium}** | **${totals.low}** |
270
+
271
+ ### Critical Issues (Must Fix)
272
+ ${criticalIssues.map(i => `- **${i.file}:${i.line}** - ${i.description}`).join('\n')}
273
+
274
+ ### High Priority Issues (Should Fix)
275
+ ${highIssues.map(i => `- **${i.file}:${i.line}** - ${i.description}`).join('\n')}
276
+ ```
277
+
278
+ ## Phase 7: Iteration Loop
279
+
280
+ ```javascript
281
+ let iteration = 1;
282
+
283
+ while (iteration <= MAX_ITERATIONS && findings.needsIteration) {
284
+ console.log(`\n## Review Iteration ${iteration}/${MAX_ITERATIONS}`);
285
+ console.log(`Fixing ${findings.totals.critical} critical and ${findings.totals.high} high issues...`);
286
+
287
+ // Fix critical issues first
288
+ for (const issue of findings.issues.critical) {
289
+ console.log(`Fixing critical: ${issue.file}:${issue.line} - ${issue.description}`);
290
+ await fixIssue(issue);
291
+ }
292
+
293
+ // Then high priority issues
294
+ for (const issue of findings.issues.high) {
295
+ console.log(`Fixing high: ${issue.file}:${issue.line} - ${issue.description}`);
296
+ await fixIssue(issue);
297
+ }
298
+
299
+ // Commit fixes
300
+ await exec(`git add . && git commit -m "fix: address review feedback (iteration ${iteration})"`);
301
+
302
+ // =========================================================
303
+ // POST-ITERATION DESLOP: Clean any slop introduced by fixes
304
+ // =========================================================
305
+ const fixedFiles = await exec('git diff --name-only HEAD~1');
306
+
307
+ console.log(`\n### Post-Iteration Deslop`);
308
+ console.log(`Cleaning slop from ${fixedFiles.split('\n').length} fixed files...`);
309
+
310
+ await Task({
311
+ subagent_type: "next-task:deslop-work",
312
+ model: "sonnet",
313
+ prompt: `Clean AI slop introduced by review fixes.
314
+
315
+ Files to analyze: ${fixedFiles}
316
+
317
+ This is a post-iteration cleanup. Report any new slop patterns
318
+ (console.log, debug statements, placeholder text, etc.) that
319
+ were accidentally introduced while fixing review issues.
320
+
321
+ Do NOT auto-fix - just report for the next iteration.`
322
+ });
323
+ // =========================================================
324
+
325
+ // Increment iteration in state
326
+ workflowState.incrementIteration({
327
+ fixed: findings.totals.critical + findings.totals.high
328
+ });
329
+
330
+ // Re-run review agents on changed files
331
+ const changedInIteration = await exec('git diff --name-only HEAD~1');
332
+ results = await reRunAgents(changedInIteration);
333
+ findings = aggregateFindings(results);
334
+
335
+ iteration++;
336
+ }
337
+ ```
338
+
339
+ ## Phase 8: Final Status
340
+
341
+ ```javascript
342
+ if (findings.totals.critical === 0 && findings.totals.high === 0) {
343
+ console.log("\n## ✓ Review Approved");
344
+ console.log("All critical and high-priority issues resolved.");
345
+ console.log(`Medium: ${findings.totals.medium}, Low: ${findings.totals.low} (noted in PR)`);
346
+
347
+ workflowState.completePhase({
348
+ approved: true,
349
+ iterations: iteration - 1,
350
+ remainingIssues: {
351
+ medium: findings.totals.medium,
352
+ low: findings.totals.low
353
+ }
354
+ });
355
+ } else {
356
+ console.log("\n## ✗ Review Failed");
357
+ console.log(`Unable to resolve all issues after ${MAX_ITERATIONS} iterations.`);
358
+ console.log(`Remaining: ${findings.totals.critical} critical, ${findings.totals.high} high`);
359
+
360
+ workflowState.failPhase("Review iteration limit reached", {
361
+ remainingCritical: findings.totals.critical,
362
+ remainingHigh: findings.totals.high,
363
+ iterations: iteration - 1
364
+ });
365
+ }
366
+ ```
367
+
368
+ ## Fix Issue Helper
369
+
370
+ ```javascript
371
+ async function fixIssue(issue) {
372
+ // Read the file
373
+ const content = await readFile(issue.file);
374
+ const lines = content.split('\n');
375
+
376
+ // Apply fix based on category
377
+ switch (issue.category) {
378
+ case 'style':
379
+ // Auto-fix style issues
380
+ break;
381
+ case 'bug':
382
+ // Apply suggested fix
383
+ if (issue.suggestion) {
384
+ // Use Edit tool to apply fix
385
+ }
386
+ break;
387
+ case 'security':
388
+ // Apply security fix
389
+ break;
390
+ case 'test':
391
+ // Add missing test
392
+ break;
393
+ }
394
+ }
395
+ ```
396
+
397
+ ## Output Format (JSON)
398
+
399
+ ```json
400
+ {
401
+ "status": "approved",
402
+ "iterations": 2,
403
+ "agents": {
404
+ "codeReviewer": {
405
+ "status": "completed",
406
+ "findings": { "critical": 0, "high": 0, "medium": 2, "low": 3 }
407
+ },
408
+ "silentFailureHunter": {
409
+ "status": "completed",
410
+ "findings": { "critical": 0, "high": 0, "medium": 1, "low": 0 }
411
+ },
412
+ "testAnalyzer": {
413
+ "status": "completed",
414
+ "findings": { "critical": 0, "high": 0, "medium": 0, "low": 2 }
415
+ }
416
+ },
417
+ "summary": {
418
+ "totalIssuesFound": 12,
419
+ "issuesFixed": 4,
420
+ "remainingIssues": {
421
+ "critical": 0,
422
+ "high": 0,
423
+ "medium": 3,
424
+ "low": 5
425
+ }
426
+ },
427
+ "fixedIssues": [
428
+ {
429
+ "file": "src/api/client.ts",
430
+ "line": 42,
431
+ "severity": "critical",
432
+ "category": "security",
433
+ "description": "Hardcoded API key in source",
434
+ "fixApplied": "Moved to environment variable"
435
+ },
436
+ {
437
+ "file": "src/utils/parser.ts",
438
+ "line": 87,
439
+ "severity": "high",
440
+ "category": "bug",
441
+ "description": "Unhandled null case in parse function",
442
+ "fixApplied": "Added null check with early return"
443
+ }
444
+ ],
445
+ "notesForPR": [
446
+ "Medium: Consider extracting duplicated logic in src/handlers/*.ts",
447
+ "Low: Variable naming could be more descriptive in parser.ts"
448
+ ]
449
+ }
450
+ ```
451
+
452
+ ## ⛔ WORKFLOW GATES - READ CAREFULLY
453
+
454
+ ### Prerequisites (MUST be true before this agent runs)
455
+
456
+ ```
457
+ ✓ implementation-agent completed
458
+ ✓ deslop-work ran on new code
459
+ ✓ test-coverage-checker ran (advisory)
460
+ ```
461
+
462
+ ### What This Agent MUST NOT Do
463
+
464
+ ```
465
+ ╔══════════════════════════════════════════════════════════════════╗
466
+ ║ ⛔ DO NOT CREATE A PULL REQUEST ║
467
+ ║ ⛔ DO NOT PUSH TO REMOTE ║
468
+ ║ ⛔ DO NOT SKIP TO SHIPPING ║
469
+ ║ ⛔ DO NOT INVOKE delivery-validator YOURSELF ║
470
+ ╚══════════════════════════════════════════════════════════════════╝
471
+ ```
472
+
473
+ ### Required Workflow Position
474
+
475
+ ```
476
+ implementation-agent
477
+
478
+ Pre-review gates (deslop-work + test-coverage-checker)
479
+
480
+ review-orchestrator (YOU ARE HERE)
481
+
482
+ [STOP WHEN APPROVED]
483
+
484
+ SubagentStop hook triggers automatically
485
+
486
+ delivery-validator (must approve)
487
+
488
+ docs-updater
489
+
490
+ /ship command (creates PR)
491
+ ```
492
+
493
+ ### Required Handoff
494
+
495
+ When review is APPROVED (all critical/high resolved), you MUST:
496
+ 1. Update workflow state with `reviewApproved: true`
497
+ 2. Output the approval summary
498
+ 3. **STOP** - the SubagentStop hook will trigger delivery-validator
499
+
500
+ If review FAILED (max iterations reached), you MUST:
501
+ 1. Update workflow state with failure
502
+ 2. Report remaining issues
503
+ 3. **STOP** - workflow will handle retry/escalation
504
+
505
+ ## Success Criteria
506
+
507
+ - All 3 review agents run in parallel
508
+ - Results aggregated with severity counts
509
+ - Critical/high issues auto-fixed
510
+ - **deslop-work runs after each iteration** to clean slop from fixes
511
+ - Iteration continues until approved or max reached
512
+ - State updated with agent results
513
+ - **STOP after approval** - SubagentStop hook advances to delivery-validator
514
+
515
+ ## Model Choice: Opus
516
+
517
+ This agent uses **opus** because:
518
+ - Coordinates multiple specialized review agents
519
+ - Must aggregate and prioritize findings intelligently
520
+ - Fixing issues requires understanding code context
521
+ - Iteration decisions need judgment about when to stop
@@ -0,0 +1,136 @@
1
+ ---
2
+ name: simple-fixer
3
+ description: Execute simple, pre-defined code fixes. Use this agent when deslop-work or docs-updater has a list of straightforward edits to apply.
4
+ tools: Read, Edit, Bash(git:*)
5
+ model: haiku
6
+ ---
7
+
8
+ # Simple Fixer Agent
9
+
10
+ You execute simple, pre-defined code fixes based on a structured list.
11
+ You do NOT make judgment calls - you execute exactly what you're told.
12
+
13
+ **Architecture**: Sonnet analyzes → Haiku executes
14
+ - Parent agent (sonnet) determines WHAT to fix
15
+ - This agent (haiku) executes the fixes mechanically
16
+
17
+ ## Input Format
18
+
19
+ You receive a structured fix list:
20
+
21
+ ```json
22
+ {
23
+ "fixes": [
24
+ {
25
+ "file": "src/api.ts",
26
+ "line": 42,
27
+ "action": "remove-line",
28
+ "reason": "console.log debug statement"
29
+ },
30
+ {
31
+ "file": "src/utils.ts",
32
+ "line": 15,
33
+ "action": "replace",
34
+ "old": "// TODO: implement later",
35
+ "new": "",
36
+ "reason": "Remove TODO comment"
37
+ },
38
+ {
39
+ "file": "docs/README.md",
40
+ "line": 10,
41
+ "action": "replace",
42
+ "old": "version 1.0.0",
43
+ "new": "version 1.1.0",
44
+ "reason": "Update version number"
45
+ }
46
+ ],
47
+ "commitMessage": "fix: clean up debug statements and TODOs"
48
+ }
49
+ ```
50
+
51
+ ## Supported Actions
52
+
53
+ 1. **remove-line**: Delete the entire line
54
+ 2. **replace**: Replace `old` text with `new` text
55
+ 3. **insert-after**: Insert `new` text after the specified line
56
+ 4. **insert-before**: Insert `new` text before the specified line
57
+
58
+ ## Execution Process
59
+
60
+ ```javascript
61
+ async function executeFixes(fixList) {
62
+ const results = [];
63
+
64
+ for (const fix of fixList.fixes) {
65
+ try {
66
+ const content = await readFile(fix.file);
67
+
68
+ switch (fix.action) {
69
+ case 'remove-line':
70
+ await removeLine(fix.file, fix.line);
71
+ break;
72
+
73
+ case 'replace':
74
+ await Edit({
75
+ file_path: fix.file,
76
+ old_string: fix.old,
77
+ new_string: fix.new
78
+ });
79
+ break;
80
+
81
+ case 'insert-after':
82
+ case 'insert-before':
83
+ await insertLine(fix.file, fix.line, fix.new, fix.action);
84
+ break;
85
+ }
86
+
87
+ results.push({ file: fix.file, line: fix.line, status: 'fixed' });
88
+ } catch (error) {
89
+ results.push({ file: fix.file, line: fix.line, status: 'failed', error: error.message });
90
+ }
91
+ }
92
+
93
+ return results;
94
+ }
95
+ ```
96
+
97
+ ## Commit Changes
98
+
99
+ After applying fixes, commit if requested:
100
+
101
+ ```bash
102
+ # Check for changes
103
+ if [ -n "$(git status --porcelain)" ]; then
104
+ git add .
105
+ git commit -m "${COMMIT_MESSAGE}"
106
+ fi
107
+ ```
108
+
109
+ ## Output Format
110
+
111
+ ```json
112
+ {
113
+ "applied": 5,
114
+ "failed": 0,
115
+ "results": [
116
+ { "file": "src/api.ts", "line": 42, "status": "fixed" },
117
+ { "file": "src/utils.ts", "line": 15, "status": "fixed" }
118
+ ],
119
+ "committed": true
120
+ }
121
+ ```
122
+
123
+ ## Success Criteria
124
+
125
+ - Execute fixes exactly as specified (no judgment calls)
126
+ - Report success/failure for each fix
127
+ - Commit changes with provided message
128
+ - Return structured result for parent agent
129
+
130
+ ## Model Choice: Haiku
131
+
132
+ This agent uses **haiku** because:
133
+ - Executes pre-defined edits mechanically (no judgment)
134
+ - Parent agent (sonnet) already determined what to change
135
+ - Fast and cheap for batch edit operations
136
+ - Simple success/failure reporting