claude-code-orchestrator-kit 1.4.1 → 1.4.16

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 (240) hide show
  1. package/.claude/agents/business/workers/lead-research-assistant.md +199 -0
  2. package/.claude/agents/database/workers/api-builder.md +8 -0
  3. package/.claude/agents/database/workers/database-architect.md +11 -3
  4. package/.claude/agents/database/workers/supabase-auditor.md +7 -7
  5. package/.claude/agents/database/workers/supabase-fixer.md +825 -0
  6. package/.claude/agents/database/workers/supabase-realtime-optimizer.md +1086 -0
  7. package/.claude/agents/database/workers/supabase-storage-optimizer.md +1187 -0
  8. package/.claude/agents/development/workers/code-reviewer.md +17 -2
  9. package/.claude/agents/development/workers/code-structure-refactorer.md +771 -0
  10. package/.claude/agents/development/workers/judge-specialist.md +3275 -0
  11. package/.claude/agents/development/workers/langgraph-specialist.md +1343 -0
  12. package/.claude/agents/development/workers/stage-pipeline-specialist.md +1173 -0
  13. package/.claude/agents/frontend/workers/fullstack-nextjs-specialist.md +10 -0
  14. package/.claude/agents/frontend/workers/nextjs-ui-designer.md +30 -0
  15. package/.claude/agents/health/workers/bug-fixer.md +31 -3
  16. package/.claude/agents/health/workers/bug-hunter.md +0 -1
  17. package/.claude/agents/health/workers/dead-code-hunter.md +167 -75
  18. package/.claude/agents/health/workers/dead-code-remover.md +217 -66
  19. package/.claude/agents/health/workers/dependency-auditor.md +83 -24
  20. package/.claude/agents/health/workers/dependency-updater.md +0 -1
  21. package/.claude/agents/health/workers/security-scanner.md +0 -1
  22. package/.claude/agents/infrastructure/workers/bullmq-worker-specialist.md +748 -0
  23. package/.claude/agents/infrastructure/workers/deployment-engineer.md +446 -0
  24. package/.claude/agents/infrastructure/workers/infrastructure-specialist.md +2 -2
  25. package/.claude/agents/infrastructure/workers/rag-specialist.md +799 -0
  26. package/.claude/agents/infrastructure/workers/server-hardening-specialist.md +1128 -0
  27. package/.claude/agents/integrations/workers/lms-integration-specialist.md +866 -0
  28. package/.claude/agents/meta/workers/meta-agent-v3.md +22 -0
  29. package/.claude/agents/testing/workers/integration-tester.md +1 -1
  30. package/.claude/agents/testing/workers/test-writer.md +16 -0
  31. package/.claude/commands/health-bugs.md +14 -281
  32. package/.claude/commands/health-cleanup.md +14 -281
  33. package/.claude/commands/health-deps.md +14 -281
  34. package/.claude/commands/health-metrics.md +51 -709
  35. package/.claude/commands/health-reuse.md +14 -311
  36. package/.claude/commands/health-security.md +14 -281
  37. package/.claude/commands/push.md +17 -3
  38. package/.claude/commands/speckit.implement.md +0 -11
  39. package/.claude/commands/supabase-performance-optimizer.md +73 -0
  40. package/.claude/commands/ultra-think.md +158 -0
  41. package/.claude/commands/worktree.md +150 -0
  42. package/.claude/scripts/gates/check-bundle-size.sh +0 -0
  43. package/.claude/scripts/gates/check-coverage.sh +0 -0
  44. package/.claude/scripts/gates/check-security.sh +0 -0
  45. package/.claude/scripts/release.sh +469 -94
  46. package/.claude/skills/algorithmic-art/LICENSE.txt +202 -0
  47. package/.claude/skills/algorithmic-art/SKILL.md +405 -0
  48. package/.claude/skills/algorithmic-art/templates/generator_template.js +223 -0
  49. package/.claude/skills/algorithmic-art/templates/viewer.html +599 -0
  50. package/.claude/skills/artifacts-builder/LICENSE.txt +202 -0
  51. package/.claude/skills/artifacts-builder/SKILL.md +74 -0
  52. package/.claude/skills/artifacts-builder/scripts/bundle-artifact.sh +54 -0
  53. package/.claude/skills/artifacts-builder/scripts/init-artifact.sh +322 -0
  54. package/.claude/skills/artifacts-builder/scripts/shadcn-components.tar.gz +0 -0
  55. package/.claude/skills/bug-health-inline/SKILL.md +221 -0
  56. package/.claude/skills/bug-health-inline/references/worker-prompts.md +182 -0
  57. package/.claude/skills/canvas-design/LICENSE.txt +202 -0
  58. package/.claude/skills/canvas-design/SKILL.md +130 -0
  59. package/.claude/skills/canvas-design/canvas-fonts/ArsenalSC-OFL.txt +93 -0
  60. package/.claude/skills/canvas-design/canvas-fonts/ArsenalSC-Regular.ttf +0 -0
  61. package/.claude/skills/canvas-design/canvas-fonts/BigShoulders-Bold.ttf +0 -0
  62. package/.claude/skills/canvas-design/canvas-fonts/BigShoulders-OFL.txt +93 -0
  63. package/.claude/skills/canvas-design/canvas-fonts/BigShoulders-Regular.ttf +0 -0
  64. package/.claude/skills/canvas-design/canvas-fonts/Boldonse-OFL.txt +93 -0
  65. package/.claude/skills/canvas-design/canvas-fonts/Boldonse-Regular.ttf +0 -0
  66. package/.claude/skills/canvas-design/canvas-fonts/BricolageGrotesque-Bold.ttf +0 -0
  67. package/.claude/skills/canvas-design/canvas-fonts/BricolageGrotesque-OFL.txt +93 -0
  68. package/.claude/skills/canvas-design/canvas-fonts/BricolageGrotesque-Regular.ttf +0 -0
  69. package/.claude/skills/canvas-design/canvas-fonts/CrimsonPro-Bold.ttf +0 -0
  70. package/.claude/skills/canvas-design/canvas-fonts/CrimsonPro-Italic.ttf +0 -0
  71. package/.claude/skills/canvas-design/canvas-fonts/CrimsonPro-OFL.txt +93 -0
  72. package/.claude/skills/canvas-design/canvas-fonts/CrimsonPro-Regular.ttf +0 -0
  73. package/.claude/skills/canvas-design/canvas-fonts/DMMono-OFL.txt +93 -0
  74. package/.claude/skills/canvas-design/canvas-fonts/DMMono-Regular.ttf +0 -0
  75. package/.claude/skills/canvas-design/canvas-fonts/EricaOne-OFL.txt +94 -0
  76. package/.claude/skills/canvas-design/canvas-fonts/EricaOne-Regular.ttf +0 -0
  77. package/.claude/skills/canvas-design/canvas-fonts/GeistMono-Bold.ttf +0 -0
  78. package/.claude/skills/canvas-design/canvas-fonts/GeistMono-OFL.txt +93 -0
  79. package/.claude/skills/canvas-design/canvas-fonts/GeistMono-Regular.ttf +0 -0
  80. package/.claude/skills/canvas-design/canvas-fonts/Gloock-OFL.txt +93 -0
  81. package/.claude/skills/canvas-design/canvas-fonts/Gloock-Regular.ttf +0 -0
  82. package/.claude/skills/canvas-design/canvas-fonts/IBMPlexMono-Bold.ttf +0 -0
  83. package/.claude/skills/canvas-design/canvas-fonts/IBMPlexMono-OFL.txt +93 -0
  84. package/.claude/skills/canvas-design/canvas-fonts/IBMPlexMono-Regular.ttf +0 -0
  85. package/.claude/skills/canvas-design/canvas-fonts/IBMPlexSerif-Bold.ttf +0 -0
  86. package/.claude/skills/canvas-design/canvas-fonts/IBMPlexSerif-BoldItalic.ttf +0 -0
  87. package/.claude/skills/canvas-design/canvas-fonts/IBMPlexSerif-Italic.ttf +0 -0
  88. package/.claude/skills/canvas-design/canvas-fonts/IBMPlexSerif-Regular.ttf +0 -0
  89. package/.claude/skills/canvas-design/canvas-fonts/InstrumentSans-Bold.ttf +0 -0
  90. package/.claude/skills/canvas-design/canvas-fonts/InstrumentSans-BoldItalic.ttf +0 -0
  91. package/.claude/skills/canvas-design/canvas-fonts/InstrumentSans-Italic.ttf +0 -0
  92. package/.claude/skills/canvas-design/canvas-fonts/InstrumentSans-OFL.txt +93 -0
  93. package/.claude/skills/canvas-design/canvas-fonts/InstrumentSans-Regular.ttf +0 -0
  94. package/.claude/skills/canvas-design/canvas-fonts/InstrumentSerif-Italic.ttf +0 -0
  95. package/.claude/skills/canvas-design/canvas-fonts/InstrumentSerif-Regular.ttf +0 -0
  96. package/.claude/skills/canvas-design/canvas-fonts/Italiana-OFL.txt +93 -0
  97. package/.claude/skills/canvas-design/canvas-fonts/Italiana-Regular.ttf +0 -0
  98. package/.claude/skills/canvas-design/canvas-fonts/JetBrainsMono-Bold.ttf +0 -0
  99. package/.claude/skills/canvas-design/canvas-fonts/JetBrainsMono-OFL.txt +93 -0
  100. package/.claude/skills/canvas-design/canvas-fonts/JetBrainsMono-Regular.ttf +0 -0
  101. package/.claude/skills/canvas-design/canvas-fonts/Jura-Light.ttf +0 -0
  102. package/.claude/skills/canvas-design/canvas-fonts/Jura-Medium.ttf +0 -0
  103. package/.claude/skills/canvas-design/canvas-fonts/Jura-OFL.txt +93 -0
  104. package/.claude/skills/canvas-design/canvas-fonts/LibreBaskerville-OFL.txt +93 -0
  105. package/.claude/skills/canvas-design/canvas-fonts/LibreBaskerville-Regular.ttf +0 -0
  106. package/.claude/skills/canvas-design/canvas-fonts/Lora-Bold.ttf +0 -0
  107. package/.claude/skills/canvas-design/canvas-fonts/Lora-BoldItalic.ttf +0 -0
  108. package/.claude/skills/canvas-design/canvas-fonts/Lora-Italic.ttf +0 -0
  109. package/.claude/skills/canvas-design/canvas-fonts/Lora-OFL.txt +93 -0
  110. package/.claude/skills/canvas-design/canvas-fonts/Lora-Regular.ttf +0 -0
  111. package/.claude/skills/canvas-design/canvas-fonts/NationalPark-Bold.ttf +0 -0
  112. package/.claude/skills/canvas-design/canvas-fonts/NationalPark-OFL.txt +93 -0
  113. package/.claude/skills/canvas-design/canvas-fonts/NationalPark-Regular.ttf +0 -0
  114. package/.claude/skills/canvas-design/canvas-fonts/NothingYouCouldDo-OFL.txt +93 -0
  115. package/.claude/skills/canvas-design/canvas-fonts/NothingYouCouldDo-Regular.ttf +0 -0
  116. package/.claude/skills/canvas-design/canvas-fonts/Outfit-Bold.ttf +0 -0
  117. package/.claude/skills/canvas-design/canvas-fonts/Outfit-OFL.txt +93 -0
  118. package/.claude/skills/canvas-design/canvas-fonts/Outfit-Regular.ttf +0 -0
  119. package/.claude/skills/canvas-design/canvas-fonts/PixelifySans-Medium.ttf +0 -0
  120. package/.claude/skills/canvas-design/canvas-fonts/PixelifySans-OFL.txt +93 -0
  121. package/.claude/skills/canvas-design/canvas-fonts/PoiretOne-OFL.txt +93 -0
  122. package/.claude/skills/canvas-design/canvas-fonts/PoiretOne-Regular.ttf +0 -0
  123. package/.claude/skills/canvas-design/canvas-fonts/RedHatMono-Bold.ttf +0 -0
  124. package/.claude/skills/canvas-design/canvas-fonts/RedHatMono-OFL.txt +93 -0
  125. package/.claude/skills/canvas-design/canvas-fonts/RedHatMono-Regular.ttf +0 -0
  126. package/.claude/skills/canvas-design/canvas-fonts/Silkscreen-OFL.txt +93 -0
  127. package/.claude/skills/canvas-design/canvas-fonts/Silkscreen-Regular.ttf +0 -0
  128. package/.claude/skills/canvas-design/canvas-fonts/SmoochSans-Medium.ttf +0 -0
  129. package/.claude/skills/canvas-design/canvas-fonts/SmoochSans-OFL.txt +93 -0
  130. package/.claude/skills/canvas-design/canvas-fonts/Tektur-Medium.ttf +0 -0
  131. package/.claude/skills/canvas-design/canvas-fonts/Tektur-OFL.txt +93 -0
  132. package/.claude/skills/canvas-design/canvas-fonts/Tektur-Regular.ttf +0 -0
  133. package/.claude/skills/canvas-design/canvas-fonts/WorkSans-Bold.ttf +0 -0
  134. package/.claude/skills/canvas-design/canvas-fonts/WorkSans-BoldItalic.ttf +0 -0
  135. package/.claude/skills/canvas-design/canvas-fonts/WorkSans-Italic.ttf +0 -0
  136. package/.claude/skills/canvas-design/canvas-fonts/WorkSans-OFL.txt +93 -0
  137. package/.claude/skills/canvas-design/canvas-fonts/WorkSans-Regular.ttf +0 -0
  138. package/.claude/skills/canvas-design/canvas-fonts/YoungSerif-OFL.txt +93 -0
  139. package/.claude/skills/canvas-design/canvas-fonts/YoungSerif-Regular.ttf +0 -0
  140. package/.claude/skills/changelog-generator/SKILL.md +104 -0
  141. package/.claude/skills/cleanup-health-inline/SKILL.md +224 -0
  142. package/.claude/skills/code-reviewer/SKILL.md +209 -0
  143. package/.claude/skills/code-reviewer/references/code_review_checklist.md +103 -0
  144. package/.claude/skills/code-reviewer/references/coding_standards.md +103 -0
  145. package/.claude/skills/code-reviewer/references/common_antipatterns.md +103 -0
  146. package/.claude/skills/code-reviewer/scripts/code_quality_checker.py +114 -0
  147. package/.claude/skills/code-reviewer/scripts/pr_analyzer.py +114 -0
  148. package/.claude/skills/code-reviewer/scripts/review_report_generator.py +114 -0
  149. package/.claude/skills/content-research-writer/SKILL.md +538 -0
  150. package/.claude/skills/deps-health-inline/SKILL.md +227 -0
  151. package/.claude/skills/frontend-aesthetics/SKILL.md +51 -396
  152. package/.claude/skills/git-commit-helper/SKILL.md +203 -0
  153. package/.claude/skills/lead-research-assistant/SKILL.md +199 -0
  154. package/.claude/skills/reuse-health-inline/SKILL.md +248 -0
  155. package/.claude/skills/rollback-changes/SKILL.md +50 -524
  156. package/.claude/skills/run-quality-gate/SKILL.md +36 -346
  157. package/.claude/skills/security-health-inline/SKILL.md +224 -0
  158. package/.claude/skills/senior-architect/SKILL.md +209 -0
  159. package/.claude/skills/senior-architect/references/architecture_patterns.md +755 -0
  160. package/.claude/skills/senior-architect/references/system_design_workflows.md +749 -0
  161. package/.claude/skills/senior-architect/references/tech_decision_guide.md +612 -0
  162. package/.claude/skills/senior-architect/scripts/architecture_diagram_generator.py +114 -0
  163. package/.claude/skills/senior-architect/scripts/dependency_analyzer.py +114 -0
  164. package/.claude/skills/senior-architect/scripts/project_architect.py +114 -0
  165. package/.claude/skills/senior-devops/SKILL.md +209 -0
  166. package/.claude/skills/senior-devops/references/cicd_pipeline_guide.md +103 -0
  167. package/.claude/skills/senior-devops/references/deployment_strategies.md +103 -0
  168. package/.claude/skills/senior-devops/references/infrastructure_as_code.md +103 -0
  169. package/.claude/skills/senior-devops/scripts/deployment_manager.py +114 -0
  170. package/.claude/skills/senior-devops/scripts/pipeline_generator.py +114 -0
  171. package/.claude/skills/senior-devops/scripts/terraform_scaffolder.py +114 -0
  172. package/.claude/skills/senior-prompt-engineer/SKILL.md +226 -0
  173. package/.claude/skills/senior-prompt-engineer/references/agentic_system_design.md +80 -0
  174. package/.claude/skills/senior-prompt-engineer/references/llm_evaluation_frameworks.md +80 -0
  175. package/.claude/skills/senior-prompt-engineer/references/prompt_engineering_patterns.md +80 -0
  176. package/.claude/skills/senior-prompt-engineer/scripts/agent_orchestrator.py +100 -0
  177. package/.claude/skills/senior-prompt-engineer/scripts/prompt_optimizer.py +100 -0
  178. package/.claude/skills/senior-prompt-engineer/scripts/rag_evaluator.py +100 -0
  179. package/.claude/skills/setup-knip/SKILL.md +372 -0
  180. package/.claude/skills/systematic-debugging/CREATION-LOG.md +119 -0
  181. package/.claude/skills/systematic-debugging/SKILL.md +296 -0
  182. package/.claude/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
  183. package/.claude/skills/systematic-debugging/condition-based-waiting.md +115 -0
  184. package/.claude/skills/systematic-debugging/defense-in-depth.md +122 -0
  185. package/.claude/skills/systematic-debugging/find-polluter.sh +63 -0
  186. package/.claude/skills/systematic-debugging/root-cause-tracing.md +169 -0
  187. package/.claude/skills/systematic-debugging/test-academic.md +14 -0
  188. package/.claude/skills/systematic-debugging/test-pressure-1.md +58 -0
  189. package/.claude/skills/systematic-debugging/test-pressure-2.md +68 -0
  190. package/.claude/skills/systematic-debugging/test-pressure-3.md +69 -0
  191. package/.claude/skills/theme-factory/LICENSE.txt +202 -0
  192. package/.claude/skills/theme-factory/SKILL.md +59 -0
  193. package/.claude/skills/theme-factory/theme-showcase.pdf +0 -0
  194. package/.claude/skills/theme-factory/themes/arctic-frost.md +19 -0
  195. package/.claude/skills/theme-factory/themes/botanical-garden.md +19 -0
  196. package/.claude/skills/theme-factory/themes/desert-rose.md +19 -0
  197. package/.claude/skills/theme-factory/themes/forest-canopy.md +19 -0
  198. package/.claude/skills/theme-factory/themes/golden-hour.md +19 -0
  199. package/.claude/skills/theme-factory/themes/midnight-galaxy.md +19 -0
  200. package/.claude/skills/theme-factory/themes/modern-minimalist.md +19 -0
  201. package/.claude/skills/theme-factory/themes/ocean-depths.md +19 -0
  202. package/.claude/skills/theme-factory/themes/sunset-boulevard.md +19 -0
  203. package/.claude/skills/theme-factory/themes/tech-innovation.md +19 -0
  204. package/.claude/skills/ui-design-system/SKILL.md +32 -0
  205. package/.claude/skills/ui-design-system/scripts/design_token_generator.py +529 -0
  206. package/.claude/skills/ux-researcher-designer/SKILL.md +30 -0
  207. package/.claude/skills/ux-researcher-designer/scripts/persona_generator.py +508 -0
  208. package/.claude/skills/webapp-testing/LICENSE.txt +202 -0
  209. package/.claude/skills/webapp-testing/SKILL.md +96 -0
  210. package/.claude/skills/webapp-testing/examples/console_logging.py +35 -0
  211. package/.claude/skills/webapp-testing/examples/element_discovery.py +40 -0
  212. package/.claude/skills/webapp-testing/examples/static_html_automation.py +33 -0
  213. package/.claude/skills/webapp-testing/scripts/with_server.py +106 -0
  214. package/.gitignore +4 -0
  215. package/README.md +492 -1093
  216. package/README.ru.md +719 -0
  217. package/docs/Agents Ecosystem/AGENT-ORCHESTRATION.md +2 -2
  218. package/docs/COMMANDS-GUIDE.md +0 -15
  219. package/docs/reports/skills/new-skills-analysis-2025-12.md +331 -0
  220. package/package.json +11 -3
  221. package/.claude/agents/health/orchestrators/bug-orchestrator.md +0 -1084
  222. package/.claude/agents/health/orchestrators/dead-code-orchestrator.md +0 -1064
  223. package/.claude/agents/health/orchestrators/dependency-orchestrator.md +0 -1064
  224. package/.claude/agents/health/orchestrators/reuse-orchestrator.md +0 -1112
  225. package/.claude/agents/health/orchestrators/security-orchestrator.md +0 -1064
  226. package/.claude/commands/worktree-cleanup.md +0 -382
  227. package/.claude/commands/worktree-create.md +0 -287
  228. package/.claude/commands/worktree-list.md +0 -239
  229. package/.claude/commands/worktree-remove.md +0 -339
  230. package/.claude/project-index.md +0 -75
  231. package/.claude/skills/load-project-context/SKILL.md +0 -89
  232. package/.claude/skills/resume-session/SKILL.md +0 -164
  233. package/.claude/skills/save-session-context/SKILL.md +0 -123
  234. package/.claude/templates/project-index.template.md +0 -67
  235. package/.claude/templates/session/context.template.md +0 -40
  236. package/.claude/templates/session/log.template.md +0 -72
  237. package/.github/BRANCH_PROTECTION.md +0 -137
  238. package/.github/workflows/build.yml +0 -70
  239. package/.github/workflows/deploy-staging.yml +0 -90
  240. package/.github/workflows/test.yml +0 -104
@@ -0,0 +1,221 @@
1
+ ---
2
+ name: bug-health-inline
3
+ description: Inline orchestration workflow for automated bug detection and fixing. Provides step-by-step phases for bug-hunter detection, priority-based fixing with bug-fixer, and verification cycles.
4
+ version: 2.0.0
5
+ ---
6
+
7
+ # Bug Health Check (Inline Orchestration)
8
+
9
+ You ARE the orchestrator. Execute this workflow directly without spawning a separate orchestrator agent.
10
+
11
+ ## Workflow Overview
12
+
13
+ ```
14
+ Detection → Validate → Fix by Priority → Verify → Repeat if needed
15
+ ```
16
+
17
+ **Max iterations**: 3
18
+ **Priorities**: critical → high → medium → low
19
+
20
+ ---
21
+
22
+ ## Phase 1: Pre-flight
23
+
24
+ 1. **Setup directories**:
25
+ ```bash
26
+ mkdir -p .tmp/current/{plans,changes,backups}
27
+ ```
28
+
29
+ 2. **Validate environment**:
30
+ - Check `package.json` exists
31
+ - Check `type-check` and `build` scripts exist
32
+
33
+ 3. **Initialize TodoWrite**:
34
+ ```json
35
+ [
36
+ {"content": "Bug detection", "status": "in_progress", "activeForm": "Detecting bugs"},
37
+ {"content": "Fix critical bugs", "status": "pending", "activeForm": "Fixing critical bugs"},
38
+ {"content": "Fix high priority bugs", "status": "pending", "activeForm": "Fixing high bugs"},
39
+ {"content": "Fix medium priority bugs", "status": "pending", "activeForm": "Fixing medium bugs"},
40
+ {"content": "Fix low priority bugs", "status": "pending", "activeForm": "Fixing low bugs"},
41
+ {"content": "Verification scan", "status": "pending", "activeForm": "Verifying fixes"}
42
+ ]
43
+ ```
44
+
45
+ ---
46
+
47
+ ## Phase 2: Detection
48
+
49
+ **Invoke bug-hunter** via Task tool:
50
+
51
+ ```
52
+ subagent_type: "bug-hunter"
53
+ description: "Detect all bugs"
54
+ prompt: |
55
+ Scan the entire codebase for bugs:
56
+ - Run type-check and build
57
+ - Check for security vulnerabilities
58
+ - Find dead code and debug statements
59
+ - Categorize by priority (critical/high/medium/low)
60
+
61
+ Generate: bug-hunting-report.md
62
+
63
+ Return summary with bug counts per priority.
64
+ ```
65
+
66
+ **After bug-hunter returns**:
67
+ 1. Read `bug-hunting-report.md`
68
+ 2. Parse bug counts by priority
69
+ 3. If zero bugs → skip to Final Summary
70
+ 4. Update TodoWrite: mark detection complete
71
+
72
+ ---
73
+
74
+ ## Phase 3: Quality Gate (Detection)
75
+
76
+ Run inline validation:
77
+
78
+ ```bash
79
+ pnpm type-check
80
+ pnpm build
81
+ ```
82
+
83
+ - If both pass → proceed to fixing
84
+ - If fail → report to user, exit
85
+
86
+ ---
87
+
88
+ ## Phase 4: Fixing Loop
89
+
90
+ **For each priority** (critical → high → medium → low):
91
+
92
+ 1. **Check if bugs exist** for this priority
93
+ - If zero → skip to next priority
94
+
95
+ 2. **Update TodoWrite**: mark current priority in_progress
96
+
97
+ 3. **Invoke bug-fixer** via Task tool:
98
+ ```
99
+ subagent_type: "bug-fixer"
100
+ description: "Fix {priority} bugs"
101
+ prompt: |
102
+ Read bug-hunting-report.md and fix all {priority} priority bugs.
103
+
104
+ For each bug:
105
+ 1. Backup file before editing
106
+ 2. Implement fix
107
+ 3. Log change to .tmp/current/changes/bug-changes.json
108
+
109
+ Generate/update: bug-fixes-implemented.md
110
+
111
+ Return: count of fixed bugs, count of failed fixes.
112
+ ```
113
+
114
+ 4. **Quality Gate** (inline):
115
+ ```bash
116
+ pnpm type-check
117
+ pnpm build
118
+ ```
119
+
120
+ - If FAIL → report error, suggest rollback, exit
121
+ - If PASS → continue
122
+
123
+ 5. **Update TodoWrite**: mark priority complete
124
+
125
+ 6. **Repeat** for next priority
126
+
127
+ ---
128
+
129
+ ## Phase 5: Verification
130
+
131
+ After all priorities fixed:
132
+
133
+ 1. **Update TodoWrite**: mark verification in_progress
134
+
135
+ 2. **Invoke bug-hunter** (verification mode):
136
+ ```
137
+ subagent_type: "bug-hunter"
138
+ description: "Verification scan"
139
+ prompt: |
140
+ Re-scan codebase after fixes.
141
+ Compare with previous bug-hunting-report.md.
142
+
143
+ Report:
144
+ - Bugs fixed (count)
145
+ - Bugs remaining (count)
146
+ - New bugs introduced (count)
147
+ ```
148
+
149
+ 3. **Decision**:
150
+ - If bugs_remaining == 0 → Final Summary
151
+ - If iteration < 3 AND bugs_remaining > 0 → Go to Phase 2
152
+ - If iteration >= 3 → Final Summary with remaining bugs
153
+
154
+ ---
155
+
156
+ ## Phase 6: Final Summary
157
+
158
+ Generate summary for user:
159
+
160
+ ```markdown
161
+ ## Bug Health Check Complete
162
+
163
+ **Iterations**: {count}/3
164
+ **Status**: {SUCCESS/PARTIAL}
165
+
166
+ ### Results
167
+ - Found: {total} bugs
168
+ - Fixed: {fixed} ({percentage}%)
169
+ - Remaining: {remaining}
170
+
171
+ ### By Priority
172
+ - Critical: {fixed}/{total}
173
+ - High: {fixed}/{total}
174
+ - Medium: {fixed}/{total}
175
+ - Low: {fixed}/{total}
176
+
177
+ ### Validation
178
+ - Type Check: {status}
179
+ - Build: {status}
180
+
181
+ ### Artifacts
182
+ - Detection: `bug-hunting-report.md`
183
+ - Fixes: `bug-fixes-implemented.md`
184
+ ```
185
+
186
+ ---
187
+
188
+ ## Error Handling
189
+
190
+ **If quality gate fails**:
191
+ ```
192
+ Rollback available: .tmp/current/changes/bug-changes.json
193
+
194
+ To rollback:
195
+ 1. Read changes log
196
+ 2. Restore files from .tmp/current/backups/
197
+ 3. Re-run workflow
198
+ ```
199
+
200
+ **If worker fails**:
201
+ - Report error to user
202
+ - Suggest manual intervention
203
+ - Exit workflow
204
+
205
+ ---
206
+
207
+ ## Key Differences from Old Approach
208
+
209
+ | Old (Orchestrator Agent) | New (Inline Skill) |
210
+ |--------------------------|-------------------|
211
+ | 9+ orchestrator calls | 0 orchestrator calls |
212
+ | ~1400 lines (cmd + agent) | ~150 lines |
213
+ | Context reload each call | Single session context |
214
+ | Plan files for each phase | Direct execution |
215
+ | ~10,000+ tokens overhead | ~500 tokens |
216
+
217
+ ---
218
+
219
+ ## Worker Prompts
220
+
221
+ See `references/worker-prompts.md` for detailed prompts.
@@ -0,0 +1,182 @@
1
+ # Worker Prompts for Bug Health Check
2
+
3
+ ## Bug Hunter - Detection
4
+
5
+ ```
6
+ subagent_type: "bug-hunter"
7
+ description: "Detect all bugs"
8
+ prompt: |
9
+ Execute comprehensive bug detection scan.
10
+
11
+ ## Scan Categories
12
+ 1. **Static Analysis**: Run `pnpm type-check` and `pnpm build`
13
+ 2. **Security**: SQL injection, XSS, hardcoded credentials
14
+ 3. **Performance**: O(n²) loops, memory leaks, missing pagination
15
+ 4. **Debug Code**: console.log, TODO/FIXME, temp variables
16
+ 5. **Dead Code**: commented blocks, unused imports, unreachable code
17
+
18
+ ## Output
19
+ Generate `bug-hunting-report.md` with structure:
20
+
21
+ ```markdown
22
+ # Bug Hunting Report
23
+
24
+ **Generated**: {timestamp}
25
+ **Status**: {PASSED/FAILED}
26
+
27
+ ## Summary
28
+ - Critical: {count}
29
+ - High: {count}
30
+ - Medium: {count}
31
+ - Low: {count}
32
+
33
+ ## Critical Issues
34
+ ### BUG-001: {title}
35
+ - **File**: `path/to/file.ts:123`
36
+ - **Category**: Security/Crash/Data Loss
37
+ - **Description**: {description}
38
+ - **Fix**: {suggestion}
39
+
40
+ ## High Priority Issues
41
+ [same format]
42
+
43
+ ## Medium Priority Issues
44
+ [same format]
45
+
46
+ ## Low Priority Issues
47
+ [same format]
48
+
49
+ ## Validation Results
50
+ - Type Check: {PASSED/FAILED}
51
+ - Build: {PASSED/FAILED}
52
+ ```
53
+
54
+ Return summary: "Found X bugs (Y critical, Z high, ...)"
55
+ ```
56
+
57
+ ---
58
+
59
+ ## Bug Hunter - Verification
60
+
61
+ ```
62
+ subagent_type: "bug-hunter"
63
+ description: "Verification scan"
64
+ prompt: |
65
+ Re-scan codebase after bug fixes.
66
+
67
+ ## Tasks
68
+ 1. Run full detection scan (same as initial)
69
+ 2. Compare with previous `bug-hunting-report.md`
70
+ 3. Identify:
71
+ - Bugs that were fixed
72
+ - Bugs that remain
73
+ - New bugs introduced by fixes
74
+
75
+ ## Output
76
+ Overwrite `bug-hunting-report.md` with new scan results.
77
+
78
+ Return summary:
79
+ - "Verification complete: X bugs fixed, Y remaining, Z new"
80
+ - Include recommendation: ITERATE or COMPLETE
81
+ ```
82
+
83
+ ---
84
+
85
+ ## Bug Fixer - By Priority
86
+
87
+ ```
88
+ subagent_type: "bug-fixer"
89
+ description: "Fix {priority} bugs"
90
+ prompt: |
91
+ Fix all {priority} priority bugs from bug-hunting-report.md.
92
+
93
+ ## Protocol
94
+ For EACH bug:
95
+
96
+ 1. **Read** bug details from report
97
+ 2. **Backup** file before editing:
98
+ ```bash
99
+ cp {file} .tmp/current/backups/{sanitized-path}.backup
100
+ ```
101
+ 3. **Log** change to `.tmp/current/changes/bug-changes.json`:
102
+ ```json
103
+ {
104
+ "files_modified": [{
105
+ "path": "path/to/file.ts",
106
+ "backup": ".tmp/current/backups/path-to-file.ts.backup",
107
+ "bug_id": "BUG-001",
108
+ "reason": "Fix description"
109
+ }]
110
+ }
111
+ ```
112
+ 4. **Fix** the bug using Edit tool
113
+ 5. **Validate** after each fix: `pnpm type-check`
114
+
115
+ ## Output
116
+ Update `bug-fixes-implemented.md`:
117
+
118
+ ```markdown
119
+ # Bug Fixes Report
120
+
121
+ **Priority**: {priority}
122
+ **Timestamp**: {timestamp}
123
+
124
+ ## Fixed
125
+ - [x] BUG-001: {description} → Fixed in `file.ts:123`
126
+ - [x] BUG-002: {description} → Fixed in `other.ts:45`
127
+
128
+ ## Failed
129
+ - [ ] BUG-003: {description} → Reason: {why failed}
130
+
131
+ ## Summary
132
+ - Fixed: X/{total}
133
+ - Failed: Y/{total}
134
+
135
+ ## Rollback
136
+ Changes log: `.tmp/current/changes/bug-changes.json`
137
+ ```
138
+
139
+ Return: "Fixed X/{total} {priority} bugs"
140
+ ```
141
+
142
+ ---
143
+
144
+ ## Inline Quality Gate
145
+
146
+ Execute directly (no Task tool):
147
+
148
+ ```bash
149
+ # Type check
150
+ pnpm type-check
151
+ # Exit code 0 = PASS, non-zero = FAIL
152
+
153
+ # Build
154
+ pnpm build
155
+ # Exit code 0 = PASS, non-zero = FAIL
156
+ ```
157
+
158
+ **Decision Logic**:
159
+ - Both PASS → continue workflow
160
+ - Any FAIL → stop, report error, suggest rollback
161
+
162
+ ---
163
+
164
+ ## Rollback Protocol
165
+
166
+ If validation fails after fixes:
167
+
168
+ ```bash
169
+ # Read changes log
170
+ cat .tmp/current/changes/bug-changes.json
171
+
172
+ # For each modified file, restore from backup
173
+ cp .tmp/current/backups/{file}.backup {original-path}
174
+
175
+ # For each created file, delete
176
+ rm {created-file-path}
177
+ ```
178
+
179
+ Or use skill:
180
+ ```
181
+ Use rollback-changes Skill with changes_log_path=.tmp/current/changes/bug-changes.json
182
+ ```
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.