claude-code-orchestrator-kit 1.4.0 → 1.4.15

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 (219) hide show
  1. package/.claude/agents/business/workers/lead-research-assistant.md +199 -0
  2. package/.claude/agents/database/workers/database-architect.md +3 -3
  3. package/.claude/agents/database/workers/supabase-auditor.md +7 -7
  4. package/.claude/agents/development/workers/code-reviewer.md +17 -2
  5. package/.claude/agents/frontend/workers/nextjs-ui-designer.md +30 -0
  6. package/.claude/agents/health/workers/bug-fixer.md +31 -2
  7. package/.claude/agents/health/workers/bug-hunter.md +0 -1
  8. package/.claude/agents/health/workers/dead-code-hunter.md +167 -75
  9. package/.claude/agents/health/workers/dead-code-remover.md +217 -66
  10. package/.claude/agents/health/workers/dependency-auditor.md +83 -24
  11. package/.claude/agents/health/workers/dependency-updater.md +0 -1
  12. package/.claude/agents/health/workers/security-scanner.md +0 -1
  13. package/.claude/agents/infrastructure/workers/deployment-engineer.md +446 -0
  14. package/.claude/agents/infrastructure/workers/infrastructure-specialist.md +2 -2
  15. package/.claude/agents/meta/workers/meta-agent-v3.md +22 -0
  16. package/.claude/agents/testing/workers/integration-tester.md +1 -1
  17. package/.claude/agents/testing/workers/test-writer.md +16 -0
  18. package/.claude/commands/health-bugs.md +14 -281
  19. package/.claude/commands/health-cleanup.md +14 -281
  20. package/.claude/commands/health-deps.md +14 -281
  21. package/.claude/commands/health-metrics.md +51 -709
  22. package/.claude/commands/health-reuse.md +14 -311
  23. package/.claude/commands/health-security.md +14 -281
  24. package/.claude/commands/push.md +17 -3
  25. package/.claude/commands/speckit.implement.md +0 -11
  26. package/.claude/commands/speckit.taskstoissues.md +95 -5
  27. package/.claude/commands/worktree.md +150 -0
  28. package/.claude/scripts/gates/check-bundle-size.sh +0 -0
  29. package/.claude/scripts/gates/check-coverage.sh +0 -0
  30. package/.claude/scripts/gates/check-security.sh +0 -0
  31. package/.claude/scripts/release.sh +469 -94
  32. package/.claude/skills/algorithmic-art/LICENSE.txt +202 -0
  33. package/.claude/skills/algorithmic-art/SKILL.md +405 -0
  34. package/.claude/skills/algorithmic-art/templates/generator_template.js +223 -0
  35. package/.claude/skills/algorithmic-art/templates/viewer.html +599 -0
  36. package/.claude/skills/artifacts-builder/LICENSE.txt +202 -0
  37. package/.claude/skills/artifacts-builder/SKILL.md +74 -0
  38. package/.claude/skills/artifacts-builder/scripts/bundle-artifact.sh +54 -0
  39. package/.claude/skills/artifacts-builder/scripts/init-artifact.sh +322 -0
  40. package/.claude/skills/artifacts-builder/scripts/shadcn-components.tar.gz +0 -0
  41. package/.claude/skills/bug-health-inline/SKILL.md +221 -0
  42. package/.claude/skills/bug-health-inline/references/worker-prompts.md +182 -0
  43. package/.claude/skills/canvas-design/LICENSE.txt +202 -0
  44. package/.claude/skills/canvas-design/SKILL.md +130 -0
  45. package/.claude/skills/canvas-design/canvas-fonts/ArsenalSC-OFL.txt +93 -0
  46. package/.claude/skills/canvas-design/canvas-fonts/ArsenalSC-Regular.ttf +0 -0
  47. package/.claude/skills/canvas-design/canvas-fonts/BigShoulders-Bold.ttf +0 -0
  48. package/.claude/skills/canvas-design/canvas-fonts/BigShoulders-OFL.txt +93 -0
  49. package/.claude/skills/canvas-design/canvas-fonts/BigShoulders-Regular.ttf +0 -0
  50. package/.claude/skills/canvas-design/canvas-fonts/Boldonse-OFL.txt +93 -0
  51. package/.claude/skills/canvas-design/canvas-fonts/Boldonse-Regular.ttf +0 -0
  52. package/.claude/skills/canvas-design/canvas-fonts/BricolageGrotesque-Bold.ttf +0 -0
  53. package/.claude/skills/canvas-design/canvas-fonts/BricolageGrotesque-OFL.txt +93 -0
  54. package/.claude/skills/canvas-design/canvas-fonts/BricolageGrotesque-Regular.ttf +0 -0
  55. package/.claude/skills/canvas-design/canvas-fonts/CrimsonPro-Bold.ttf +0 -0
  56. package/.claude/skills/canvas-design/canvas-fonts/CrimsonPro-Italic.ttf +0 -0
  57. package/.claude/skills/canvas-design/canvas-fonts/CrimsonPro-OFL.txt +93 -0
  58. package/.claude/skills/canvas-design/canvas-fonts/CrimsonPro-Regular.ttf +0 -0
  59. package/.claude/skills/canvas-design/canvas-fonts/DMMono-OFL.txt +93 -0
  60. package/.claude/skills/canvas-design/canvas-fonts/DMMono-Regular.ttf +0 -0
  61. package/.claude/skills/canvas-design/canvas-fonts/EricaOne-OFL.txt +94 -0
  62. package/.claude/skills/canvas-design/canvas-fonts/EricaOne-Regular.ttf +0 -0
  63. package/.claude/skills/canvas-design/canvas-fonts/GeistMono-Bold.ttf +0 -0
  64. package/.claude/skills/canvas-design/canvas-fonts/GeistMono-OFL.txt +93 -0
  65. package/.claude/skills/canvas-design/canvas-fonts/GeistMono-Regular.ttf +0 -0
  66. package/.claude/skills/canvas-design/canvas-fonts/Gloock-OFL.txt +93 -0
  67. package/.claude/skills/canvas-design/canvas-fonts/Gloock-Regular.ttf +0 -0
  68. package/.claude/skills/canvas-design/canvas-fonts/IBMPlexMono-Bold.ttf +0 -0
  69. package/.claude/skills/canvas-design/canvas-fonts/IBMPlexMono-OFL.txt +93 -0
  70. package/.claude/skills/canvas-design/canvas-fonts/IBMPlexMono-Regular.ttf +0 -0
  71. package/.claude/skills/canvas-design/canvas-fonts/IBMPlexSerif-Bold.ttf +0 -0
  72. package/.claude/skills/canvas-design/canvas-fonts/IBMPlexSerif-BoldItalic.ttf +0 -0
  73. package/.claude/skills/canvas-design/canvas-fonts/IBMPlexSerif-Italic.ttf +0 -0
  74. package/.claude/skills/canvas-design/canvas-fonts/IBMPlexSerif-Regular.ttf +0 -0
  75. package/.claude/skills/canvas-design/canvas-fonts/InstrumentSans-Bold.ttf +0 -0
  76. package/.claude/skills/canvas-design/canvas-fonts/InstrumentSans-BoldItalic.ttf +0 -0
  77. package/.claude/skills/canvas-design/canvas-fonts/InstrumentSans-Italic.ttf +0 -0
  78. package/.claude/skills/canvas-design/canvas-fonts/InstrumentSans-OFL.txt +93 -0
  79. package/.claude/skills/canvas-design/canvas-fonts/InstrumentSans-Regular.ttf +0 -0
  80. package/.claude/skills/canvas-design/canvas-fonts/InstrumentSerif-Italic.ttf +0 -0
  81. package/.claude/skills/canvas-design/canvas-fonts/InstrumentSerif-Regular.ttf +0 -0
  82. package/.claude/skills/canvas-design/canvas-fonts/Italiana-OFL.txt +93 -0
  83. package/.claude/skills/canvas-design/canvas-fonts/Italiana-Regular.ttf +0 -0
  84. package/.claude/skills/canvas-design/canvas-fonts/JetBrainsMono-Bold.ttf +0 -0
  85. package/.claude/skills/canvas-design/canvas-fonts/JetBrainsMono-OFL.txt +93 -0
  86. package/.claude/skills/canvas-design/canvas-fonts/JetBrainsMono-Regular.ttf +0 -0
  87. package/.claude/skills/canvas-design/canvas-fonts/Jura-Light.ttf +0 -0
  88. package/.claude/skills/canvas-design/canvas-fonts/Jura-Medium.ttf +0 -0
  89. package/.claude/skills/canvas-design/canvas-fonts/Jura-OFL.txt +93 -0
  90. package/.claude/skills/canvas-design/canvas-fonts/LibreBaskerville-OFL.txt +93 -0
  91. package/.claude/skills/canvas-design/canvas-fonts/LibreBaskerville-Regular.ttf +0 -0
  92. package/.claude/skills/canvas-design/canvas-fonts/Lora-Bold.ttf +0 -0
  93. package/.claude/skills/canvas-design/canvas-fonts/Lora-BoldItalic.ttf +0 -0
  94. package/.claude/skills/canvas-design/canvas-fonts/Lora-Italic.ttf +0 -0
  95. package/.claude/skills/canvas-design/canvas-fonts/Lora-OFL.txt +93 -0
  96. package/.claude/skills/canvas-design/canvas-fonts/Lora-Regular.ttf +0 -0
  97. package/.claude/skills/canvas-design/canvas-fonts/NationalPark-Bold.ttf +0 -0
  98. package/.claude/skills/canvas-design/canvas-fonts/NationalPark-OFL.txt +93 -0
  99. package/.claude/skills/canvas-design/canvas-fonts/NationalPark-Regular.ttf +0 -0
  100. package/.claude/skills/canvas-design/canvas-fonts/NothingYouCouldDo-OFL.txt +93 -0
  101. package/.claude/skills/canvas-design/canvas-fonts/NothingYouCouldDo-Regular.ttf +0 -0
  102. package/.claude/skills/canvas-design/canvas-fonts/Outfit-Bold.ttf +0 -0
  103. package/.claude/skills/canvas-design/canvas-fonts/Outfit-OFL.txt +93 -0
  104. package/.claude/skills/canvas-design/canvas-fonts/Outfit-Regular.ttf +0 -0
  105. package/.claude/skills/canvas-design/canvas-fonts/PixelifySans-Medium.ttf +0 -0
  106. package/.claude/skills/canvas-design/canvas-fonts/PixelifySans-OFL.txt +93 -0
  107. package/.claude/skills/canvas-design/canvas-fonts/PoiretOne-OFL.txt +93 -0
  108. package/.claude/skills/canvas-design/canvas-fonts/PoiretOne-Regular.ttf +0 -0
  109. package/.claude/skills/canvas-design/canvas-fonts/RedHatMono-Bold.ttf +0 -0
  110. package/.claude/skills/canvas-design/canvas-fonts/RedHatMono-OFL.txt +93 -0
  111. package/.claude/skills/canvas-design/canvas-fonts/RedHatMono-Regular.ttf +0 -0
  112. package/.claude/skills/canvas-design/canvas-fonts/Silkscreen-OFL.txt +93 -0
  113. package/.claude/skills/canvas-design/canvas-fonts/Silkscreen-Regular.ttf +0 -0
  114. package/.claude/skills/canvas-design/canvas-fonts/SmoochSans-Medium.ttf +0 -0
  115. package/.claude/skills/canvas-design/canvas-fonts/SmoochSans-OFL.txt +93 -0
  116. package/.claude/skills/canvas-design/canvas-fonts/Tektur-Medium.ttf +0 -0
  117. package/.claude/skills/canvas-design/canvas-fonts/Tektur-OFL.txt +93 -0
  118. package/.claude/skills/canvas-design/canvas-fonts/Tektur-Regular.ttf +0 -0
  119. package/.claude/skills/canvas-design/canvas-fonts/WorkSans-Bold.ttf +0 -0
  120. package/.claude/skills/canvas-design/canvas-fonts/WorkSans-BoldItalic.ttf +0 -0
  121. package/.claude/skills/canvas-design/canvas-fonts/WorkSans-Italic.ttf +0 -0
  122. package/.claude/skills/canvas-design/canvas-fonts/WorkSans-OFL.txt +93 -0
  123. package/.claude/skills/canvas-design/canvas-fonts/WorkSans-Regular.ttf +0 -0
  124. package/.claude/skills/canvas-design/canvas-fonts/YoungSerif-OFL.txt +93 -0
  125. package/.claude/skills/canvas-design/canvas-fonts/YoungSerif-Regular.ttf +0 -0
  126. package/.claude/skills/changelog-generator/SKILL.md +104 -0
  127. package/.claude/skills/cleanup-health-inline/SKILL.md +224 -0
  128. package/.claude/skills/code-reviewer/SKILL.md +209 -0
  129. package/.claude/skills/code-reviewer/references/code_review_checklist.md +103 -0
  130. package/.claude/skills/code-reviewer/references/coding_standards.md +103 -0
  131. package/.claude/skills/code-reviewer/references/common_antipatterns.md +103 -0
  132. package/.claude/skills/code-reviewer/scripts/code_quality_checker.py +114 -0
  133. package/.claude/skills/code-reviewer/scripts/pr_analyzer.py +114 -0
  134. package/.claude/skills/code-reviewer/scripts/review_report_generator.py +114 -0
  135. package/.claude/skills/content-research-writer/SKILL.md +538 -0
  136. package/.claude/skills/deps-health-inline/SKILL.md +227 -0
  137. package/.claude/skills/frontend-aesthetics/SKILL.md +51 -396
  138. package/.claude/skills/git-commit-helper/SKILL.md +203 -0
  139. package/.claude/skills/lead-research-assistant/SKILL.md +199 -0
  140. package/.claude/skills/reuse-health-inline/SKILL.md +248 -0
  141. package/.claude/skills/rollback-changes/SKILL.md +50 -524
  142. package/.claude/skills/run-quality-gate/SKILL.md +36 -346
  143. package/.claude/skills/security-health-inline/SKILL.md +224 -0
  144. package/.claude/skills/senior-devops/SKILL.md +209 -0
  145. package/.claude/skills/senior-devops/references/cicd_pipeline_guide.md +103 -0
  146. package/.claude/skills/senior-devops/references/deployment_strategies.md +103 -0
  147. package/.claude/skills/senior-devops/references/infrastructure_as_code.md +103 -0
  148. package/.claude/skills/senior-devops/scripts/deployment_manager.py +114 -0
  149. package/.claude/skills/senior-devops/scripts/pipeline_generator.py +114 -0
  150. package/.claude/skills/senior-devops/scripts/terraform_scaffolder.py +114 -0
  151. package/.claude/skills/senior-prompt-engineer/SKILL.md +226 -0
  152. package/.claude/skills/senior-prompt-engineer/references/agentic_system_design.md +80 -0
  153. package/.claude/skills/senior-prompt-engineer/references/llm_evaluation_frameworks.md +80 -0
  154. package/.claude/skills/senior-prompt-engineer/references/prompt_engineering_patterns.md +80 -0
  155. package/.claude/skills/senior-prompt-engineer/scripts/agent_orchestrator.py +100 -0
  156. package/.claude/skills/senior-prompt-engineer/scripts/prompt_optimizer.py +100 -0
  157. package/.claude/skills/senior-prompt-engineer/scripts/rag_evaluator.py +100 -0
  158. package/.claude/skills/setup-knip/SKILL.md +372 -0
  159. package/.claude/skills/systematic-debugging/CREATION-LOG.md +119 -0
  160. package/.claude/skills/systematic-debugging/SKILL.md +296 -0
  161. package/.claude/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
  162. package/.claude/skills/systematic-debugging/condition-based-waiting.md +115 -0
  163. package/.claude/skills/systematic-debugging/defense-in-depth.md +122 -0
  164. package/.claude/skills/systematic-debugging/find-polluter.sh +63 -0
  165. package/.claude/skills/systematic-debugging/root-cause-tracing.md +169 -0
  166. package/.claude/skills/systematic-debugging/test-academic.md +14 -0
  167. package/.claude/skills/systematic-debugging/test-pressure-1.md +58 -0
  168. package/.claude/skills/systematic-debugging/test-pressure-2.md +68 -0
  169. package/.claude/skills/systematic-debugging/test-pressure-3.md +69 -0
  170. package/.claude/skills/theme-factory/LICENSE.txt +202 -0
  171. package/.claude/skills/theme-factory/SKILL.md +59 -0
  172. package/.claude/skills/theme-factory/theme-showcase.pdf +0 -0
  173. package/.claude/skills/theme-factory/themes/arctic-frost.md +19 -0
  174. package/.claude/skills/theme-factory/themes/botanical-garden.md +19 -0
  175. package/.claude/skills/theme-factory/themes/desert-rose.md +19 -0
  176. package/.claude/skills/theme-factory/themes/forest-canopy.md +19 -0
  177. package/.claude/skills/theme-factory/themes/golden-hour.md +19 -0
  178. package/.claude/skills/theme-factory/themes/midnight-galaxy.md +19 -0
  179. package/.claude/skills/theme-factory/themes/modern-minimalist.md +19 -0
  180. package/.claude/skills/theme-factory/themes/ocean-depths.md +19 -0
  181. package/.claude/skills/theme-factory/themes/sunset-boulevard.md +19 -0
  182. package/.claude/skills/theme-factory/themes/tech-innovation.md +19 -0
  183. package/.claude/skills/ui-design-system/SKILL.md +32 -0
  184. package/.claude/skills/ui-design-system/scripts/design_token_generator.py +529 -0
  185. package/.claude/skills/ux-researcher-designer/SKILL.md +30 -0
  186. package/.claude/skills/ux-researcher-designer/scripts/persona_generator.py +508 -0
  187. package/.claude/skills/webapp-testing/LICENSE.txt +202 -0
  188. package/.claude/skills/webapp-testing/SKILL.md +96 -0
  189. package/.claude/skills/webapp-testing/examples/console_logging.py +35 -0
  190. package/.claude/skills/webapp-testing/examples/element_discovery.py +40 -0
  191. package/.claude/skills/webapp-testing/examples/static_html_automation.py +33 -0
  192. package/.claude/skills/webapp-testing/scripts/with_server.py +106 -0
  193. package/.gitignore +4 -0
  194. package/README.md +492 -1093
  195. package/README.ru.md +719 -0
  196. package/docs/Agents Ecosystem/AGENT-ORCHESTRATION.md +2 -2
  197. package/docs/{SPECKIT-GUIDE.md → COMMANDS-GUIDE.md} +252 -20
  198. package/docs/reports/skills/new-skills-analysis-2025-12.md +331 -0
  199. package/package.json +11 -3
  200. package/.claude/agents/health/orchestrators/bug-orchestrator.md +0 -1084
  201. package/.claude/agents/health/orchestrators/dead-code-orchestrator.md +0 -1064
  202. package/.claude/agents/health/orchestrators/dependency-orchestrator.md +0 -1064
  203. package/.claude/agents/health/orchestrators/reuse-orchestrator.md +0 -1112
  204. package/.claude/agents/health/orchestrators/security-orchestrator.md +0 -1064
  205. package/.claude/commands/worktree-cleanup.md +0 -382
  206. package/.claude/commands/worktree-create.md +0 -287
  207. package/.claude/commands/worktree-list.md +0 -239
  208. package/.claude/commands/worktree-remove.md +0 -339
  209. package/.claude/project-index.md +0 -75
  210. package/.claude/skills/load-project-context/SKILL.md +0 -89
  211. package/.claude/skills/resume-session/SKILL.md +0 -164
  212. package/.claude/skills/save-session-context/SKILL.md +0 -123
  213. package/.claude/templates/project-index.template.md +0 -67
  214. package/.claude/templates/session/context.template.md +0 -40
  215. package/.claude/templates/session/log.template.md +0 -72
  216. package/.github/BRANCH_PROTECTION.md +0 -137
  217. package/.github/workflows/build.yml +0 -70
  218. package/.github/workflows/deploy-staging.yml +0 -90
  219. package/.github/workflows/test.yml +0 -104
@@ -6,25 +6,16 @@ allowed-tools: Bash, Read
6
6
 
7
7
  # Run Quality Gate
8
8
 
9
- Execute validation commands as quality gates with configurable blocking/non-blocking behavior and structured error reporting.
9
+ Execute validation commands as quality gates with structured error reporting.
10
10
 
11
11
  ## When to Use
12
12
 
13
- - Type-check validation in pre-flight or quality gates
14
- - Build validation before releases
15
- - Test execution as quality gate
16
- - Lint validation for code quality
17
- - Custom validation commands
13
+ - Type-check, build, test, lint validation
18
14
  - Orchestrator phase validation
19
15
  - Worker self-validation
20
16
 
21
- ## Instructions
17
+ ## Input
22
18
 
23
- ### Step 1: Receive Gate Configuration
24
-
25
- Accept gate configuration as input.
26
-
27
- **Expected Input**:
28
19
  ```json
29
20
  {
30
21
  "gate": "type-check|build|tests|lint|custom",
@@ -33,76 +24,29 @@ Accept gate configuration as input.
33
24
  }
34
25
  ```
35
26
 
36
- **Parameters**:
37
- - `gate`: Type of quality gate to run (required)
38
- - `blocking`: Whether failure should stop workflow (default: true)
39
- - `custom_command`: Command to run when gate="custom" (required for custom gates)
40
-
41
- ### Step 2: Map Gate to Command
42
-
43
- Determine command to execute based on gate type.
44
-
45
- **Gate Commands**:
46
- - `type-check` → `pnpm type-check`
47
- - `build` → `pnpm build`
48
- - `tests` → `pnpm test`
49
- - `lint` → `pnpm lint`
50
- - `custom` → Use `custom_command` parameter
51
-
52
- **Validation**:
53
- - If gate="custom", `custom_command` must be provided
54
- - Command must be valid shell command
55
-
56
- ### Step 3: Execute Command
57
-
58
- Run command via Bash tool with timeout.
59
-
60
- **Execution Parameters**:
61
- - Timeout: 300000ms (5 minutes)
62
- - Capture stdout and stderr
63
- - Record exit code
64
- - Track execution duration
27
+ ## Gate Commands
65
28
 
66
- **Tools Used**: Bash
29
+ | Gate | Command |
30
+ |------|---------|
31
+ | type-check | `pnpm type-check` |
32
+ | build | `pnpm build` |
33
+ | tests | `pnpm test` |
34
+ | lint | `pnpm lint` |
35
+ | custom | `custom_command` value |
67
36
 
68
- ### Step 4: Parse Exit Code and Output
69
-
70
- Determine if gate passed based on exit code.
71
-
72
- **Pass/Fail Logic**:
73
- - Exit code 0 → Passed
74
- - Exit code non-zero → Failed
75
-
76
- **Extract Errors**:
77
- Look for error patterns in output:
78
- - Lines containing "error"
79
- - Lines containing "failed"
80
- - Lines containing "✗"
81
- - TypeScript error codes (TS####)
82
- - Stack traces
83
-
84
- ### Step 5: Determine Action
85
-
86
- Calculate action based on result and blocking flag.
87
-
88
- **Action Logic**:
89
- ```
90
- IF exit_code == 0:
91
- action = "continue"
92
- passed = true
93
- ELSE:
94
- IF blocking == true:
95
- action = "stop"
96
- ELSE:
97
- action = "warn"
98
- passed = false
99
- ```
37
+ ## Process
100
38
 
101
- ### Step 6: Return Structured Result
39
+ 1. **Map gate to command** - Validate custom_command if gate="custom"
40
+ 2. **Execute via Bash** - Timeout: 5 minutes, capture stdout/stderr
41
+ 3. **Parse result** - Exit code 0 = passed, non-zero = failed
42
+ 4. **Extract errors** - Lines with "error", "failed", TS#### codes
43
+ 5. **Determine action**:
44
+ - Passed → action="continue"
45
+ - Failed + blocking → action="stop"
46
+ - Failed + non-blocking → action="warn"
102
47
 
103
- Return complete quality gate result.
48
+ ## Output
104
49
 
105
- **Expected Output**:
106
50
  ```json
107
51
  {
108
52
  "gate": "type-check",
@@ -117,288 +61,34 @@ Return complete quality gate result.
117
61
  }
118
62
  ```
119
63
 
120
- **Output Fields**:
121
- - `gate`: Gate type that was run
122
- - `passed`: Whether gate passed (boolean)
123
- - `blocking`: Whether gate was blocking
124
- - `action`: Action to take (continue|stop|warn)
125
- - `errors`: Array of error messages extracted
126
- - `exit_code`: Command exit code
127
- - `duration_ms`: Execution time in milliseconds
128
- - `command`: Actual command executed
129
- - `timestamp`: ISO-8601 timestamp of execution
130
-
131
- ## Error Handling
132
-
133
- - **Timeout (5 minutes)**: Return failed with timeout error
134
- - **Missing custom_command**: Return error requesting custom_command
135
- - **Invalid gate type**: Return error listing valid gates
136
- - **Command not found**: Return failed with command not found error
137
- - **Empty output but non-zero exit**: Return failed with generic error
138
-
139
64
  ## Examples
140
65
 
141
- ### Example 1: Blocking Type-Check that Passes
142
-
143
- **Input**:
144
- ```json
145
- {
146
- "gate": "type-check",
147
- "blocking": true
148
- }
149
- ```
150
-
151
- **Command Output**:
152
- ```
153
- $ pnpm type-check
154
- ✓ No type errors found
155
- Done in 2.3s
156
- ```
157
-
158
- **Output**:
159
- ```json
160
- {
161
- "gate": "type-check",
162
- "passed": true,
163
- "blocking": true,
164
- "action": "continue",
165
- "errors": [],
166
- "exit_code": 0,
167
- "duration_ms": 2345,
168
- "command": "pnpm type-check",
169
- "timestamp": "2025-10-18T14:30:00Z"
170
- }
171
- ```
172
-
173
- ### Example 2: Blocking Build that Fails (Should Stop)
174
-
175
- **Input**:
176
- ```json
177
- {
178
- "gate": "build",
179
- "blocking": true
180
- }
181
- ```
182
-
183
- **Command Output**:
184
- ```
185
- $ pnpm build
186
- ✗ Build failed
187
- ERROR in src/app.ts
188
- Module not found: Error: Can't resolve 'missing-module'
189
- exit code: 1
190
- ```
191
-
192
- **Output**:
193
- ```json
194
- {
195
- "gate": "build",
196
- "passed": false,
197
- "blocking": true,
198
- "action": "stop",
199
- "errors": [
200
- "ERROR in src/app.ts",
201
- "Module not found: Error: Can't resolve 'missing-module'"
202
- ],
203
- "exit_code": 1,
204
- "duration_ms": 5432,
205
- "command": "pnpm build",
206
- "timestamp": "2025-10-18T14:30:05Z"
207
- }
208
- ```
209
-
210
- ### Example 3: Non-Blocking Lint that Fails (Should Warn)
211
-
212
- **Input**:
213
- ```json
214
- {
215
- "gate": "lint",
216
- "blocking": false
217
- }
218
- ```
219
-
220
- **Command Output**:
221
- ```
222
- $ pnpm lint
223
- ✗ 12 problems (8 errors, 4 warnings)
224
- src/utils.ts:10:5 - error - Missing semicolon
225
- src/app.ts:25:1 - warning - Prefer const over let
226
- exit code: 1
227
- ```
228
-
229
- **Output**:
230
- ```json
231
- {
232
- "gate": "lint",
233
- "passed": false,
234
- "blocking": false,
235
- "action": "warn",
236
- "errors": [
237
- "src/utils.ts:10:5 - error - Missing semicolon",
238
- "src/app.ts:25:1 - warning - Prefer const over let"
239
- ],
240
- "exit_code": 1,
241
- "duration_ms": 1234,
242
- "command": "pnpm lint",
243
- "timestamp": "2025-10-18T14:30:07Z"
244
- }
245
- ```
246
-
247
- ### Example 4: Custom Command Example
248
-
249
- **Input**:
250
- ```json
251
- {
252
- "gate": "custom",
253
- "blocking": true,
254
- "custom_command": "pnpm validate-schemas"
255
- }
256
- ```
257
-
258
- **Command Output**:
259
- ```
260
- $ pnpm validate-schemas
261
- ✓ All schemas valid
262
- exit code: 0
263
- ```
264
-
265
- **Output**:
266
- ```json
267
- {
268
- "gate": "custom",
269
- "passed": true,
270
- "blocking": true,
271
- "action": "continue",
272
- "errors": [],
273
- "exit_code": 0,
274
- "duration_ms": 876,
275
- "command": "pnpm validate-schemas",
276
- "timestamp": "2025-10-18T14:30:08Z"
277
- }
278
- ```
279
-
280
- ### Example 5: Timeout Example
281
-
282
- **Input**:
283
- ```json
284
- {
285
- "gate": "tests",
286
- "blocking": true
287
- }
288
- ```
289
-
290
- **Output** (after 5 minutes):
66
+ **Blocking gate passes**:
291
67
  ```json
292
- {
293
- "gate": "tests",
294
- "passed": false,
295
- "blocking": true,
296
- "action": "stop",
297
- "errors": [
298
- "Command timed out after 300000ms (5 minutes)"
299
- ],
300
- "exit_code": -1,
301
- "duration_ms": 300000,
302
- "command": "pnpm test",
303
- "timestamp": "2025-10-18T14:35:00Z"
304
- }
68
+ { "gate": "type-check", "blocking": true }
69
+ → { "passed": true, "action": "continue", "errors": [] }
305
70
  ```
306
71
 
307
- ### Example 6: Command Not Found
308
-
309
- **Input**:
72
+ **Blocking gate fails** (stops workflow):
310
73
  ```json
311
- {
312
- "gate": "build",
313
- "blocking": true
314
- }
74
+ { "gate": "build", "blocking": true }
75
+ → { "passed": false, "action": "stop", "errors": ["Module not found: missing-module"] }
315
76
  ```
316
77
 
317
- **Command Output**:
318
- ```
319
- bash: pnpm: command not found
320
- exit code: 127
321
- ```
322
-
323
- **Output**:
78
+ **Non-blocking gate fails** (warns only):
324
79
  ```json
325
- {
326
- "gate": "build",
327
- "passed": false,
328
- "blocking": true,
329
- "action": "stop",
330
- "errors": [
331
- "bash: pnpm: command not found"
332
- ],
333
- "exit_code": 127,
334
- "duration_ms": 45,
335
- "command": "pnpm build",
336
- "timestamp": "2025-10-18T14:30:09Z"
337
- }
80
+ { "gate": "lint", "blocking": false }
81
+ → { "passed": false, "action": "warn", "errors": ["Missing semicolon"] }
338
82
  ```
339
83
 
340
- ## Validation
341
-
342
- - [ ] Maps all standard gate types to correct commands
343
- - [ ] Executes commands with 5 minute timeout
344
- - [ ] Captures exit code correctly
345
- - [ ] Extracts errors from output
346
- - [ ] Determines action correctly based on blocking flag
347
- - [ ] Records execution duration
348
- - [ ] Handles timeout gracefully
349
- - [ ] Validates custom_command when gate="custom"
350
- - [ ] Returns structured JSON output
351
-
352
- ## Integration with Agents
353
-
354
- ### Orchestrator Usage
355
-
356
- ```markdown
357
- ## Quality Gate: Type Check
358
-
359
- Use run-quality-gate Skill with gate="type-check" and blocking=true.
360
-
361
- If action="stop", halt workflow and report failure.
362
- If action="continue", proceed to next phase.
363
- ```
364
-
365
- ### Worker Self-Validation
366
-
367
- ```markdown
368
- ## Step 5: Self-Validation
369
-
370
- Use run-quality-gate Skill to validate changes:
371
- 1. Run type-check (blocking=true)
372
- 2. Run build (blocking=true)
373
- 3. Run tests (blocking=false)
374
-
375
- If any blocking gate returns action="stop", rollback changes.
376
- ```
377
-
378
- ### Quality Gates Orchestrator
379
-
380
- ```markdown
381
- ## Phase 2: Execute Quality Gates
382
-
383
- For each gate in [type-check, build, tests, lint]:
384
- result = run-quality-gate(gate, blocking=true)
385
-
386
- if result.action == "stop":
387
- HALT and report failure
388
-
389
- if result.action == "warn":
390
- LOG warning and continue
391
- ```
392
-
393
- ## Supporting Files
84
+ ## Error Handling
394
85
 
395
- - `gate-mappings.json`: Gate command mappings and configurations (see below)
86
+ - **Timeout (5 min)**: Return failed with timeout error
87
+ - **Missing custom_command**: Return error
88
+ - **Command not found**: Return failed with exit_code=127
396
89
 
397
90
  ## Notes
398
91
 
399
- - Timeout is fixed at 5 minutes to prevent indefinite hangs
400
- - Error extraction is best-effort (may not capture all errors)
401
- - Custom commands must be valid shell commands
402
- - Exit code 0 always means success regardless of output
403
- - Non-zero exit code always means failure
92
+ - Exit code 0 always = success regardless of output
404
93
  - Blocking flag only affects action, not passed status
94
+ - Error extraction is best-effort
@@ -0,0 +1,224 @@
1
+ ---
2
+ name: security-health-inline
3
+ description: Inline orchestration workflow for security vulnerability detection and remediation. Provides step-by-step phases for security-scanner detection, priority-based fixing with vulnerability-fixer, and verification cycles.
4
+ version: 2.0.0
5
+ ---
6
+
7
+ # Security 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": "Security scan", "status": "in_progress", "activeForm": "Scanning for vulnerabilities"},
37
+ {"content": "Fix critical vulnerabilities", "status": "pending", "activeForm": "Fixing critical vulnerabilities"},
38
+ {"content": "Fix high priority vulnerabilities", "status": "pending", "activeForm": "Fixing high vulnerabilities"},
39
+ {"content": "Fix medium priority vulnerabilities", "status": "pending", "activeForm": "Fixing medium vulnerabilities"},
40
+ {"content": "Fix low priority vulnerabilities", "status": "pending", "activeForm": "Fixing low vulnerabilities"},
41
+ {"content": "Verification scan", "status": "pending", "activeForm": "Verifying fixes"}
42
+ ]
43
+ ```
44
+
45
+ ---
46
+
47
+ ## Phase 2: Detection
48
+
49
+ **Invoke security-scanner** via Task tool:
50
+
51
+ ```
52
+ subagent_type: "security-scanner"
53
+ description: "Detect all vulnerabilities"
54
+ prompt: |
55
+ Scan the entire codebase for security vulnerabilities:
56
+ - SQL injection
57
+ - XSS vulnerabilities
58
+ - Authentication/authorization issues
59
+ - RLS policy violations
60
+ - Hardcoded secrets
61
+ - Insecure dependencies
62
+ - Categorize by priority (critical/high/medium/low)
63
+
64
+ Generate: security-scan-report.md
65
+
66
+ Return summary with vulnerability counts per priority.
67
+ ```
68
+
69
+ **After security-scanner returns**:
70
+ 1. Read `security-scan-report.md`
71
+ 2. Parse vulnerability counts by priority
72
+ 3. If zero vulnerabilities → skip to Final Summary
73
+ 4. Update TodoWrite: mark detection complete
74
+
75
+ ---
76
+
77
+ ## Phase 3: Quality Gate (Detection)
78
+
79
+ Run inline validation:
80
+
81
+ ```bash
82
+ pnpm type-check
83
+ pnpm build
84
+ ```
85
+
86
+ - If both pass → proceed to fixing
87
+ - If fail → report to user, exit
88
+
89
+ ---
90
+
91
+ ## Phase 4: Fixing Loop
92
+
93
+ **For each priority** (critical → high → medium → low):
94
+
95
+ 1. **Check if vulnerabilities exist** for this priority
96
+ - If zero → skip to next priority
97
+
98
+ 2. **Update TodoWrite**: mark current priority in_progress
99
+
100
+ 3. **Invoke vulnerability-fixer** via Task tool:
101
+ ```
102
+ subagent_type: "vulnerability-fixer"
103
+ description: "Fix {priority} vulnerabilities"
104
+ prompt: |
105
+ Read security-scan-report.md and fix all {priority} priority vulnerabilities.
106
+
107
+ For each vulnerability:
108
+ 1. Backup file before editing
109
+ 2. Implement fix
110
+ 3. Log change to .tmp/current/changes/security-changes.json
111
+
112
+ Generate/update: security-fixes-implemented.md
113
+
114
+ Return: count of fixed vulnerabilities, count of failed fixes.
115
+ ```
116
+
117
+ 4. **Quality Gate** (inline):
118
+ ```bash
119
+ pnpm type-check
120
+ pnpm build
121
+ ```
122
+
123
+ - If FAIL → report error, suggest rollback, exit
124
+ - If PASS → continue
125
+
126
+ 5. **Update TodoWrite**: mark priority complete
127
+
128
+ 6. **Repeat** for next priority
129
+
130
+ ---
131
+
132
+ ## Phase 5: Verification
133
+
134
+ After all priorities fixed:
135
+
136
+ 1. **Update TodoWrite**: mark verification in_progress
137
+
138
+ 2. **Invoke security-scanner** (verification mode):
139
+ ```
140
+ subagent_type: "security-scanner"
141
+ description: "Verification scan"
142
+ prompt: |
143
+ Re-scan codebase after fixes.
144
+ Compare with previous security-scan-report.md.
145
+
146
+ Report:
147
+ - Vulnerabilities fixed (count)
148
+ - Vulnerabilities remaining (count)
149
+ - New vulnerabilities introduced (count)
150
+ ```
151
+
152
+ 3. **Decision**:
153
+ - If vulnerabilities_remaining == 0 → Final Summary
154
+ - If iteration < 3 AND vulnerabilities_remaining > 0 → Go to Phase 2
155
+ - If iteration >= 3 → Final Summary with remaining vulnerabilities
156
+
157
+ ---
158
+
159
+ ## Phase 6: Final Summary
160
+
161
+ Generate summary for user:
162
+
163
+ ```markdown
164
+ ## Security Health Check Complete
165
+
166
+ **Iterations**: {count}/3
167
+ **Status**: {SUCCESS/PARTIAL}
168
+
169
+ ### Results
170
+ - Found: {total} vulnerabilities
171
+ - Fixed: {fixed} ({percentage}%)
172
+ - Remaining: {remaining}
173
+
174
+ ### By Priority
175
+ - Critical: {fixed}/{total}
176
+ - High: {fixed}/{total}
177
+ - Medium: {fixed}/{total}
178
+ - Low: {fixed}/{total}
179
+
180
+ ### Validation
181
+ - Type Check: {status}
182
+ - Build: {status}
183
+
184
+ ### Artifacts
185
+ - Detection: `security-scan-report.md`
186
+ - Fixes: `security-fixes-implemented.md`
187
+ ```
188
+
189
+ ---
190
+
191
+ ## Error Handling
192
+
193
+ **If quality gate fails**:
194
+ ```
195
+ Rollback available: .tmp/current/changes/security-changes.json
196
+
197
+ To rollback:
198
+ 1. Read changes log
199
+ 2. Restore files from .tmp/current/backups/
200
+ 3. Re-run workflow
201
+ ```
202
+
203
+ **If worker fails**:
204
+ - Report error to user
205
+ - Suggest manual intervention
206
+ - Exit workflow
207
+
208
+ ---
209
+
210
+ ## Key Differences from Old Approach
211
+
212
+ | Old (Orchestrator Agent) | New (Inline Skill) |
213
+ |--------------------------|-------------------|
214
+ | 9+ orchestrator calls | 0 orchestrator calls |
215
+ | ~1400 lines (cmd + agent) | ~150 lines |
216
+ | Context reload each call | Single session context |
217
+ | Plan files for each phase | Direct execution |
218
+ | ~10,000+ tokens overhead | ~500 tokens |
219
+
220
+ ---
221
+
222
+ ## Worker Prompts
223
+
224
+ See `references/worker-prompts.md` for detailed prompts.