claude-code-orchestrator-kit 1.0.0

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 (130) hide show
  1. package/.claude/agents/database/workers/api-builder.md +155 -0
  2. package/.claude/agents/database/workers/database-architect.md +193 -0
  3. package/.claude/agents/database/workers/supabase-auditor.md +1070 -0
  4. package/.claude/agents/development/workers/code-reviewer.md +968 -0
  5. package/.claude/agents/development/workers/cost-calculator-specialist.md +683 -0
  6. package/.claude/agents/development/workers/llm-service-specialist.md +999 -0
  7. package/.claude/agents/development/workers/skill-builder-v2.md +480 -0
  8. package/.claude/agents/development/workers/typescript-types-specialist.md +649 -0
  9. package/.claude/agents/development/workers/utility-builder.md +582 -0
  10. package/.claude/agents/documentation/workers/technical-writer.md +152 -0
  11. package/.claude/agents/frontend/workers/fullstack-nextjs-specialist.md +206 -0
  12. package/.claude/agents/frontend/workers/visual-effects-creator.md +159 -0
  13. package/.claude/agents/health/orchestrators/bug-orchestrator.md +1045 -0
  14. package/.claude/agents/health/orchestrators/dead-code-orchestrator.md +1045 -0
  15. package/.claude/agents/health/orchestrators/dependency-orchestrator.md +1045 -0
  16. package/.claude/agents/health/orchestrators/security-orchestrator.md +1045 -0
  17. package/.claude/agents/health/workers/bug-fixer.md +525 -0
  18. package/.claude/agents/health/workers/bug-hunter.md +649 -0
  19. package/.claude/agents/health/workers/dead-code-hunter.md +446 -0
  20. package/.claude/agents/health/workers/dead-code-remover.md +437 -0
  21. package/.claude/agents/health/workers/dependency-auditor.md +379 -0
  22. package/.claude/agents/health/workers/dependency-updater.md +436 -0
  23. package/.claude/agents/health/workers/security-scanner.md +700 -0
  24. package/.claude/agents/health/workers/vulnerability-fixer.md +524 -0
  25. package/.claude/agents/infrastructure/workers/infrastructure-specialist.md +156 -0
  26. package/.claude/agents/infrastructure/workers/orchestration-logic-specialist.md +1260 -0
  27. package/.claude/agents/infrastructure/workers/qdrant-specialist.md +503 -0
  28. package/.claude/agents/infrastructure/workers/quality-validator-specialist.md +984 -0
  29. package/.claude/agents/meta/workers/meta-agent-v3.md +503 -0
  30. package/.claude/agents/research/workers/problem-investigator.md +507 -0
  31. package/.claude/agents/research/workers/research-specialist.md +423 -0
  32. package/.claude/agents/testing/workers/accessibility-tester.md +813 -0
  33. package/.claude/agents/testing/workers/integration-tester.md +188 -0
  34. package/.claude/agents/testing/workers/mobile-fixes-implementer.md +252 -0
  35. package/.claude/agents/testing/workers/mobile-responsiveness-tester.md +180 -0
  36. package/.claude/agents/testing/workers/performance-optimizer.md +262 -0
  37. package/.claude/agents/testing/workers/test-writer.md +800 -0
  38. package/.claude/commands/health-bugs.md +297 -0
  39. package/.claude/commands/health-cleanup.md +297 -0
  40. package/.claude/commands/health-deps.md +297 -0
  41. package/.claude/commands/health-metrics.md +747 -0
  42. package/.claude/commands/health-security.md +297 -0
  43. package/.claude/commands/push.md +21 -0
  44. package/.claude/commands/speckit.analyze.md +184 -0
  45. package/.claude/commands/speckit.checklist.md +294 -0
  46. package/.claude/commands/speckit.clarify.md +178 -0
  47. package/.claude/commands/speckit.constitution.md +78 -0
  48. package/.claude/commands/speckit.implement.md +182 -0
  49. package/.claude/commands/speckit.plan.md +87 -0
  50. package/.claude/commands/speckit.specify.md +250 -0
  51. package/.claude/commands/speckit.tasks.md +137 -0
  52. package/.claude/commands/translate-doc.md +95 -0
  53. package/.claude/commands/worktree-cleanup.md +382 -0
  54. package/.claude/commands/worktree-create.md +287 -0
  55. package/.claude/commands/worktree-list.md +239 -0
  56. package/.claude/commands/worktree-remove.md +339 -0
  57. package/.claude/schemas/base-plan.schema.json +82 -0
  58. package/.claude/schemas/bug-plan.schema.json +71 -0
  59. package/.claude/schemas/dead-code-plan.schema.json +71 -0
  60. package/.claude/schemas/dependency-plan.schema.json +74 -0
  61. package/.claude/schemas/security-plan.schema.json +71 -0
  62. package/.claude/scripts/gates/check-bundle-size.sh +47 -0
  63. package/.claude/scripts/gates/check-coverage.sh +67 -0
  64. package/.claude/scripts/gates/check-security.sh +46 -0
  65. package/.claude/scripts/release.sh +740 -0
  66. package/.claude/settings.local.json +21 -0
  67. package/.claude/settings.local.json.example +20 -0
  68. package/.claude/skills/calculate-priority-score/SKILL.md +229 -0
  69. package/.claude/skills/calculate-priority-score/scoring-matrix.json +83 -0
  70. package/.claude/skills/extract-version/SKILL.md +228 -0
  71. package/.claude/skills/format-commit-message/SKILL.md +189 -0
  72. package/.claude/skills/format-commit-message/template.md +64 -0
  73. package/.claude/skills/format-markdown-table/SKILL.md +202 -0
  74. package/.claude/skills/format-markdown-table/examples.md +84 -0
  75. package/.claude/skills/format-todo-list/SKILL.md +222 -0
  76. package/.claude/skills/format-todo-list/template.json +30 -0
  77. package/.claude/skills/generate-changelog/SKILL.md +258 -0
  78. package/.claude/skills/generate-changelog/commit-mapping.json +47 -0
  79. package/.claude/skills/generate-report-header/SKILL.md +228 -0
  80. package/.claude/skills/generate-report-header/template.md +66 -0
  81. package/.claude/skills/parse-error-logs/SKILL.md +286 -0
  82. package/.claude/skills/parse-error-logs/patterns.json +26 -0
  83. package/.claude/skills/parse-git-status/SKILL.md +164 -0
  84. package/.claude/skills/parse-package-json/SKILL.md +151 -0
  85. package/.claude/skills/parse-package-json/schema.json +43 -0
  86. package/.claude/skills/render-template/SKILL.md +245 -0
  87. package/.claude/skills/rollback-changes/SKILL.md +582 -0
  88. package/.claude/skills/rollback-changes/changes-log-schema.json +101 -0
  89. package/.claude/skills/run-quality-gate/SKILL.md +404 -0
  90. package/.claude/skills/run-quality-gate/gate-mappings.json +97 -0
  91. package/.claude/skills/validate-plan-file/SKILL.md +327 -0
  92. package/.claude/skills/validate-plan-file/schema.json +35 -0
  93. package/.claude/skills/validate-report-file/SKILL.md +256 -0
  94. package/.claude/skills/validate-report-file/schema.json +67 -0
  95. package/.env.example +49 -0
  96. package/.github/BRANCH_PROTECTION.md +137 -0
  97. package/.github/workflows/build.yml +70 -0
  98. package/.github/workflows/claude-code-review.yml +255 -0
  99. package/.github/workflows/claude.yml +79 -0
  100. package/.github/workflows/deploy-staging.yml +90 -0
  101. package/.github/workflows/test.yml +104 -0
  102. package/.gitignore +116 -0
  103. package/CLAUDE.md +137 -0
  104. package/LICENSE +72 -0
  105. package/README.md +1098 -0
  106. package/docs/ARCHITECTURE.md +746 -0
  107. package/docs/Agents Ecosystem/AGENT-ORCHESTRATION.md +568 -0
  108. package/docs/Agents Ecosystem/AI-AGENT-ECOSYSTEM-README.md +658 -0
  109. package/docs/Agents Ecosystem/ARCHITECTURE.md +606 -0
  110. package/docs/Agents Ecosystem/QUALITY-GATES-SPECIFICATION.md +1315 -0
  111. package/docs/Agents Ecosystem/REPORT-TEMPLATE-STANDARD.md +1324 -0
  112. package/docs/Agents Ecosystem/spec-kit-comprehensive-updates.md +478 -0
  113. package/docs/FAQ.md +572 -0
  114. package/docs/MIGRATION-GUIDE.md +542 -0
  115. package/docs/PERFORMANCE-OPTIMIZATION.md +494 -0
  116. package/docs/ROADMAP.md +439 -0
  117. package/docs/TUTORIAL-CUSTOM-AGENTS.md +2041 -0
  118. package/docs/USE-CASES.md +706 -0
  119. package/index.js +96 -0
  120. package/mcp/.mcp.base.json +21 -0
  121. package/mcp/.mcp.frontend.json +29 -0
  122. package/mcp/.mcp.full.json +67 -0
  123. package/mcp/.mcp.local.example.json +7 -0
  124. package/mcp/.mcp.local.json +7 -0
  125. package/mcp/.mcp.n8n.json +45 -0
  126. package/mcp/.mcp.supabase-full.json +35 -0
  127. package/mcp/.mcp.supabase-only.json +28 -0
  128. package/package.json +78 -0
  129. package/postinstall.js +71 -0
  130. package/switch-mcp.sh +101 -0
@@ -0,0 +1,404 @@
1
+ ---
2
+ name: run-quality-gate
3
+ description: Execute quality gate validation with configurable blocking behavior. Use when running type-check, build, tests, lint, or custom validation commands in orchestrators or workers to enforce quality standards.
4
+ allowed-tools: Bash, Read
5
+ ---
6
+
7
+ # Run Quality Gate
8
+
9
+ Execute validation commands as quality gates with configurable blocking/non-blocking behavior and structured error reporting.
10
+
11
+ ## When to Use
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
18
+ - Orchestrator phase validation
19
+ - Worker self-validation
20
+
21
+ ## Instructions
22
+
23
+ ### Step 1: Receive Gate Configuration
24
+
25
+ Accept gate configuration as input.
26
+
27
+ **Expected Input**:
28
+ ```json
29
+ {
30
+ "gate": "type-check|build|tests|lint|custom",
31
+ "blocking": true,
32
+ "custom_command": "pnpm custom-validate"
33
+ }
34
+ ```
35
+
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
65
+
66
+ **Tools Used**: Bash
67
+
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
+ ```
100
+
101
+ ### Step 6: Return Structured Result
102
+
103
+ Return complete quality gate result.
104
+
105
+ **Expected Output**:
106
+ ```json
107
+ {
108
+ "gate": "type-check",
109
+ "passed": true,
110
+ "blocking": true,
111
+ "action": "continue",
112
+ "errors": [],
113
+ "exit_code": 0,
114
+ "duration_ms": 2345,
115
+ "command": "pnpm type-check",
116
+ "timestamp": "2025-10-18T14:30:00Z"
117
+ }
118
+ ```
119
+
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
+ ## Examples
140
+
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):
291
+ ```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
+ }
305
+ ```
306
+
307
+ ### Example 6: Command Not Found
308
+
309
+ **Input**:
310
+ ```json
311
+ {
312
+ "gate": "build",
313
+ "blocking": true
314
+ }
315
+ ```
316
+
317
+ **Command Output**:
318
+ ```
319
+ bash: pnpm: command not found
320
+ exit code: 127
321
+ ```
322
+
323
+ **Output**:
324
+ ```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
+ }
338
+ ```
339
+
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
394
+
395
+ - `gate-mappings.json`: Gate command mappings and configurations (see below)
396
+
397
+ ## Notes
398
+
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
404
+ - Blocking flag only affects action, not passed status
@@ -0,0 +1,97 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Quality Gate Mappings",
4
+ "description": "Configuration for quality gate commands and behavior",
5
+ "gates": {
6
+ "type-check": {
7
+ "command": "pnpm type-check",
8
+ "description": "TypeScript type checking validation",
9
+ "typical_duration_ms": 2000,
10
+ "error_patterns": [
11
+ "error TS\\d+",
12
+ "Type '.+' is not assignable",
13
+ "Cannot find"
14
+ ]
15
+ },
16
+ "build": {
17
+ "command": "pnpm build",
18
+ "description": "Production build validation",
19
+ "typical_duration_ms": 10000,
20
+ "error_patterns": [
21
+ "ERROR in",
22
+ "Module not found",
23
+ "Build failed",
24
+ "Compilation error"
25
+ ]
26
+ },
27
+ "tests": {
28
+ "command": "pnpm test",
29
+ "description": "Test suite execution",
30
+ "typical_duration_ms": 30000,
31
+ "error_patterns": [
32
+ "FAIL",
33
+ "Tests failed",
34
+ "Expected:",
35
+ "Received:",
36
+ "● "
37
+ ]
38
+ },
39
+ "lint": {
40
+ "command": "pnpm lint",
41
+ "description": "Code linting validation",
42
+ "typical_duration_ms": 3000,
43
+ "error_patterns": [
44
+ "error -",
45
+ "warning -",
46
+ "✗ \\d+ problems"
47
+ ]
48
+ },
49
+ "custom": {
50
+ "command": null,
51
+ "description": "Custom validation command (user-provided)",
52
+ "typical_duration_ms": null,
53
+ "error_patterns": [
54
+ "error",
55
+ "failed",
56
+ "✗"
57
+ ]
58
+ }
59
+ },
60
+ "actions": {
61
+ "continue": {
62
+ "description": "Gate passed, continue workflow",
63
+ "recommendation": "Proceed to next phase"
64
+ },
65
+ "stop": {
66
+ "description": "Gate failed and is blocking, halt workflow",
67
+ "recommendation": "Fix errors before proceeding"
68
+ },
69
+ "warn": {
70
+ "description": "Gate failed but is non-blocking, log warning",
71
+ "recommendation": "Note warning and continue, address later"
72
+ }
73
+ },
74
+ "exit_codes": {
75
+ "0": {
76
+ "meaning": "Success",
77
+ "passed": true
78
+ },
79
+ "1": {
80
+ "meaning": "General error",
81
+ "passed": false
82
+ },
83
+ "127": {
84
+ "meaning": "Command not found",
85
+ "passed": false
86
+ },
87
+ "-1": {
88
+ "meaning": "Timeout or internal error",
89
+ "passed": false
90
+ }
91
+ },
92
+ "timeout": {
93
+ "milliseconds": 300000,
94
+ "description": "5 minutes maximum execution time",
95
+ "rationale": "Prevents indefinite hangs while allowing slow test suites"
96
+ }
97
+ }