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
package/docs/FAQ.md ADDED
@@ -0,0 +1,572 @@
1
+ # ❓ Frequently Asked Questions
2
+
3
+ ## Table of Contents
4
+
5
+ - [General Questions](#general-questions)
6
+ - [MCP Configuration](#mcp-configuration)
7
+ - [Agents & Workflows](#agents--workflows)
8
+ - [Development](#development)
9
+ - [Troubleshooting](#troubleshooting)
10
+
11
+ ---
12
+
13
+ ## General Questions
14
+
15
+ ### What is Claude Code Orchestrator Kit?
16
+
17
+ Claude Code Orchestrator Kit is a comprehensive automation framework for Claude Code that provides:
18
+ - 33+ specialized AI agents for various development tasks
19
+ - 19+ slash commands for common workflows
20
+ - 15+ reusable skills (utility functions)
21
+ - 6 optimized MCP server configurations
22
+ - Quality gates and health monitoring
23
+
24
+ It transforms Claude Code from a conversational assistant into a powerful orchestration system for professional development workflows.
25
+
26
+ ---
27
+
28
+ ### Who is this for?
29
+
30
+ This kit is designed for:
31
+ - **Professional developers** building production applications with Claude Code
32
+ - **Teams** that need standardized workflows and quality gates
33
+ - **Projects** requiring automated testing, security audits, and dependency management
34
+ - **Anyone** who wants to supercharge their Claude Code experience
35
+
36
+ ---
37
+
38
+ ### Do I need to know how to code to use this?
39
+
40
+ **Basic usage**: No coding required for using existing agents and slash commands.
41
+
42
+ **Advanced usage**: Understanding of TypeScript, Node.js, and Git helps for:
43
+ - Creating custom agents
44
+ - Modifying MCP configurations
45
+ - Extending the system
46
+
47
+ ---
48
+
49
+ ### Is this compatible with existing Claude Code projects?
50
+
51
+ **Yes!** The kit is designed to be added to existing projects:
52
+
53
+ 1. Copy `.claude/` directory to your project
54
+ 2. Merge with existing agents (if any)
55
+ 3. Configure MCP servers
56
+ 4. Start using slash commands
57
+
58
+ See [MIGRATION-GUIDE.md](./MIGRATION-GUIDE.md) for detailed instructions.
59
+
60
+ ---
61
+
62
+ ## MCP Configuration
63
+
64
+ ### When should I use BASE vs FULL MCP config?
65
+
66
+ **Use BASE (~600 tokens)** for:
67
+ - Daily development work
68
+ - Code reviews and refactoring
69
+ - Reading and understanding code
70
+ - Simple bug fixes
71
+ - Working with limited context window
72
+
73
+ **Use FULL (~5000 tokens)** for:
74
+ - Complex workflows requiring multiple integrations
75
+ - Database + UI + automation in single session
76
+ - Intensive development sessions (2+ hours)
77
+ - Working with multiple external services
78
+
79
+ **Rule of thumb**: Start with BASE (80% of use cases), upgrade to specialized configs only when needed.
80
+
81
+ ---
82
+
83
+ ### How do I know which MCP config to use?
84
+
85
+ Use this decision tree:
86
+
87
+ ```
88
+ Need database work?
89
+ ├─ Yes → SUPABASE or SUPABASE-FULL
90
+ └─ No → Continue
91
+
92
+ Need workflow automation (n8n)?
93
+ ├─ Yes → N8N
94
+ └─ No → Continue
95
+
96
+ Need UI/UX work (Playwright, ShadCN)?
97
+ ├─ Yes → FRONTEND
98
+ └─ No → Continue
99
+
100
+ Need multiple integrations at once?
101
+ ├─ Yes → FULL
102
+ └─ No → BASE
103
+ ```
104
+
105
+ See [PERFORMANCE-OPTIMIZATION.md](./PERFORMANCE-OPTIMIZATION.md) for token usage comparison.
106
+
107
+ ---
108
+
109
+ ### How do I switch between MCP configurations?
110
+
111
+ ```bash
112
+ # Interactive menu
113
+ ./switch-mcp.sh
114
+
115
+ # Select option 1-6 based on your needs
116
+ # Then restart Claude Code
117
+ ```
118
+
119
+ The script copies the selected config to `.mcp.json` and restarts automatically loads it.
120
+
121
+ ---
122
+
123
+ ### What if I need custom MCP servers?
124
+
125
+ 1. Create new config file: `mcp/.mcp.custom.json`
126
+ 2. Add your MCP servers
127
+ 3. Update `switch-mcp.sh` to include your config
128
+ 4. Use environment variables for secrets (`.env.local`)
129
+
130
+ Example:
131
+ ```json
132
+ {
133
+ "mcpServers": {
134
+ "my-custom-server": {
135
+ "command": "npx",
136
+ "args": ["-y", "my-mcp-server"],
137
+ "env": {
138
+ "API_KEY": "${MY_CUSTOM_API_KEY}"
139
+ }
140
+ }
141
+ }
142
+ }
143
+ ```
144
+
145
+ ---
146
+
147
+ ### Why are environment variables not loading?
148
+
149
+ **Common issues:**
150
+
151
+ 1. **File doesn't exist**: Ensure `.env.local` is present
152
+ ```bash
153
+ cp .env.example .env.local
154
+ ```
155
+
156
+ 2. **Wrong format**: Don't use quotes around values
157
+ ```bash
158
+ # ✅ Correct
159
+ SUPABASE_PROJECT_REF=abc123xyz
160
+
161
+ # ❌ Wrong
162
+ SUPABASE_PROJECT_REF="abc123xyz"
163
+ ```
164
+
165
+ 3. **Not restarted**: Environment variables load on Claude Code startup
166
+ - Fully quit and restart Claude Code (not just reload)
167
+
168
+ 4. **Special characters**: Escape special chars in values
169
+ ```bash
170
+ PASSWORD=my\$ecret\!pass
171
+ ```
172
+
173
+ ---
174
+
175
+ ## Agents & Workflows
176
+
177
+ ### What's the difference between an Agent and a Skill?
178
+
179
+ | Aspect | Agent | Skill |
180
+ |--------|-------|-------|
181
+ | **Invocation** | Via Task tool | Via Skill tool |
182
+ | **Context** | Isolated context window | Caller's context |
183
+ | **Purpose** | Multi-step workflows | Single utility function |
184
+ | **Size** | Any size | <100 lines logic |
185
+ | **State** | Stateful, tracks progress | Stateless, pure function |
186
+ | **Reports** | Generates reports | Returns data directly |
187
+ | **Examples** | bug-hunter, security-scanner | parse-git-status, validate-plan-file |
188
+
189
+ **Rule of thumb**:
190
+ - Agent = autonomous workflow that needs coordination
191
+ - Skill = reusable utility that can be called from anywhere
192
+
193
+ ---
194
+
195
+ ### What's the difference between Orchestrator and Worker?
196
+
197
+ **Orchestrator**:
198
+ - Coordinates multi-phase workflows
199
+ - Creates plan files for workers
200
+ - Validates worker outputs at quality gates
201
+ - Manages iterations (e.g., max 3 cycles)
202
+ - Does NOT invoke workers directly (violates PD-1)
203
+ - Examples: bug-orchestrator, security-orchestrator
204
+
205
+ **Worker**:
206
+ - Executes specific tasks from plan files
207
+ - Generates structured reports
208
+ - Returns control to orchestrator
209
+ - Performs validation before reporting success
210
+ - Examples: bug-hunter, bug-fixer, security-scanner
211
+
212
+ **Pattern**: Orchestrator plans → Worker executes → Orchestrator validates → Repeat or finish
213
+
214
+ ---
215
+
216
+ ### What is the "Return Control Pattern"?
217
+
218
+ **Problem**: If orchestrators invoke workers via Task tool, context gets nested and complex.
219
+
220
+ **Solution**: Return Control Pattern
221
+
222
+ ```
223
+ 1. Orchestrator creates plan file (.tmp/current/plans/.workflow-plan.json)
224
+ 2. Orchestrator signals "Ready for {worker-name}" and exits
225
+ 3. Main session invokes worker manually
226
+ 4. Worker reads plan, executes, generates report, exits
227
+ 5. Main session invokes orchestrator to resume
228
+ 6. Orchestrator validates report and continues
229
+ ```
230
+
231
+ **Why?** Keeps context clean, enables rollback, prevents infinite loops.
232
+
233
+ See [ARCHITECTURE.md](./ARCHITECTURE.md) for visual diagram.
234
+
235
+ ---
236
+
237
+ ### How do Quality Gates work?
238
+
239
+ Quality gates are automated validation checkpoints that ensure code quality before proceeding.
240
+
241
+ **Types**:
242
+ - **Blocking**: MUST pass or workflow halts (e.g., type-check, build)
243
+ - **Non-blocking**: Optional checks (e.g., tests, lint)
244
+
245
+ **Usage in plan files**:
246
+ ```json
247
+ {
248
+ "validation": {
249
+ "required": ["type-check", "build"],
250
+ "optional": ["tests"]
251
+ }
252
+ }
253
+ ```
254
+
255
+ **Behavior**:
256
+ - If blocking gate fails → HALT workflow, report error to user, ask fix/skip
257
+ - If optional gate fails → Log warning, continue
258
+ - All gates pass → Proceed to next phase
259
+
260
+ **Skill**: `run-quality-gate` executes validation commands.
261
+
262
+ ---
263
+
264
+ ### How do I create a custom agent?
265
+
266
+ **Quick method**: Use meta-agent
267
+
268
+ ```
269
+ Ask Claude Code: "Create a worker agent for linting TypeScript files with ESLint"
270
+
271
+ Meta-agent will:
272
+ 1. Ask for agent type (worker/orchestrator/simple)
273
+ 2. Read ARCHITECTURE.md patterns
274
+ 3. Generate agent file with proper structure
275
+ 4. Validate against checklist
276
+ 5. Write to .claude/agents/{category}/workers/{name}.md
277
+ ```
278
+
279
+ **Manual method**: See [TUTORIAL-CUSTOM-AGENTS.md](./TUTORIAL-CUSTOM-AGENTS.md) for step-by-step guide.
280
+
281
+ ---
282
+
283
+ ### Can I use agents in CI/CD pipelines?
284
+
285
+ **Yes!** Example GitHub Actions workflow:
286
+
287
+ ```yaml
288
+ name: Health Check
289
+
290
+ on:
291
+ schedule:
292
+ - cron: '0 0 * * 1' # Weekly on Monday
293
+ workflow_dispatch:
294
+
295
+ jobs:
296
+ health-check:
297
+ runs-on: ubuntu-latest
298
+ steps:
299
+ - uses: actions/checkout@v3
300
+
301
+ - name: Run bug scan
302
+ run: |
303
+ claude-code /health-bugs
304
+
305
+ - name: Upload report
306
+ uses: actions/upload-artifact@v3
307
+ with:
308
+ name: bug-report
309
+ path: bug-hunting-report.md
310
+ ```
311
+
312
+ See `.github/workflows/` for examples.
313
+
314
+ ---
315
+
316
+ ### What is CLAUDE.md and why is it important?
317
+
318
+ **CLAUDE.md** is the "Behavioral Operating System" for all agents. It defines:
319
+
320
+ - **Prime Directives (PDs)**: Non-negotiable rules (e.g., Return Control Pattern, Quality Gates)
321
+ - **Behavioral Contracts**: What orchestrators/workers/MCPs promise to do
322
+ - **Fallback Strategies**: How to handle Context7 unavailable, quality gate failures, etc.
323
+ - **Emergency Protocols**: Infinite loop detection, file corruption, token exhaustion
324
+ - **Operational Procedures**: File structure, agent selection, plan file format
325
+
326
+ **All agents MUST comply** with CLAUDE.md. It ensures consistency, prevents anti-patterns, and enables self-diagnostics.
327
+
328
+ Think of it as the "constitution" for the agent ecosystem.
329
+
330
+ ---
331
+
332
+ ## Development
333
+
334
+ ### How do I add a new MCP server to existing config?
335
+
336
+ 1. Edit the MCP config file (e.g., `mcp/.mcp.base.json`):
337
+ ```json
338
+ {
339
+ "mcpServers": {
340
+ "existing-server": { ... },
341
+ "new-server": {
342
+ "command": "npx",
343
+ "args": ["-y", "new-mcp-package"],
344
+ "env": {
345
+ "API_KEY": "${NEW_SERVER_API_KEY}"
346
+ }
347
+ }
348
+ }
349
+ }
350
+ ```
351
+
352
+ 2. Add environment variable to `.env.local`:
353
+ ```bash
354
+ NEW_SERVER_API_KEY=your-key-here
355
+ ```
356
+
357
+ 3. Restart Claude Code
358
+
359
+ ---
360
+
361
+ ### How do I test agents locally?
362
+
363
+ **Method 1: Direct invocation**
364
+ ```
365
+ Ask Claude Code to invoke agent directly:
366
+ "Use bug-hunter agent to scan src/ directory"
367
+ ```
368
+
369
+ **Method 2: Via orchestrator**
370
+ ```
371
+ Run full workflow:
372
+ /health-bugs
373
+ ```
374
+
375
+ **Method 3: Unit testing skills**
376
+ ```bash
377
+ # Skills can be tested with simple inputs
378
+ # Example: Test parse-git-status skill
379
+ git status | claude-code "Use parse-git-status skill on this output"
380
+ ```
381
+
382
+ ---
383
+
384
+ ### Can I modify existing agents?
385
+
386
+ **Yes!** Agents are just markdown files:
387
+
388
+ 1. Open agent file: `.claude/agents/{category}/{type}/{name}.md`
389
+ 2. Modify instructions, add phases, change validation
390
+ 3. Save and test
391
+
392
+ **Best practice**: Keep modifications aligned with ARCHITECTURE.md patterns.
393
+
394
+ ---
395
+
396
+ ### How do I contribute new agents back to the project?
397
+
398
+ 1. Fork repository
399
+ 2. Create agent in `.claude/agents/{category}/`
400
+ 3. Follow agent template structure
401
+ 4. Test thoroughly
402
+ 5. Update README.md with agent description
403
+ 6. Submit PR with:
404
+ - Agent file
405
+ - Test examples
406
+ - Documentation updates
407
+
408
+ See [CONTRIBUTING.md](../CONTRIBUTING.md) for details.
409
+
410
+ ---
411
+
412
+ ## Troubleshooting
413
+
414
+ ### Quality gates keep failing even after fixes
415
+
416
+ **Diagnosis**:
417
+ ```bash
418
+ # Run gates manually to see full errors
419
+ npm run type-check
420
+ npm run build
421
+ npm run test
422
+
423
+ # Check for configuration issues
424
+ cat .claude/scripts/gates/check-*.sh
425
+ ```
426
+
427
+ **Common fixes**:
428
+ - Update TypeScript strict mode settings
429
+ - Fix test configuration (jest.config.js)
430
+ - Check for circular dependencies
431
+ - Verify build output directory exists
432
+
433
+ ---
434
+
435
+ ### Orchestrator workflow stuck or not progressing
436
+
437
+ **Check progression artifacts**:
438
+ ```bash
439
+ # 1. Verify plan file exists and is valid
440
+ cat .tmp/current/plans/*.json
441
+
442
+ # 2. Check if worker generated report
443
+ ls -la .tmp/current/reports/
444
+
445
+ # 3. Review changes log
446
+ cat .tmp/current/changes/*.json
447
+
448
+ # 4. Check for infinite loop
449
+ # (orchestrator should use check-infinite-loop skill)
450
+ ```
451
+
452
+ **Common issues**:
453
+ - Worker failed silently (no report generated)
454
+ - Plan file missing `nextAgent` field
455
+ - Quality gate blocking without user prompt
456
+ - Infinite loop detected (same agent invoked 3+ times)
457
+
458
+ **Solution**: Check orchestrator logs, manually invoke next step, or restart workflow.
459
+
460
+ ---
461
+
462
+ ### Context7 MCP server not working
463
+
464
+ **Symptoms**: "Context7 unavailable" warnings in reports
465
+
466
+ **Diagnosis**:
467
+ ```bash
468
+ # Check if Context7 is in active MCP config
469
+ cat .mcp.json | grep context7
470
+
471
+ # Test Context7 directly
472
+ # (Claude Code MCP tools should show mcp__context7__* tools)
473
+ ```
474
+
475
+ **Fixes**:
476
+ 1. Ensure `context7` is in your MCP config
477
+ 2. Check internet connectivity (Context7 is cloud-based)
478
+ 3. Verify no firewall blocking outbound requests
479
+ 4. Switch to BASE or higher config (Context7 included)
480
+
481
+ **Fallback**: Workers will continue with reduced confidence if Context7 unavailable.
482
+
483
+ ---
484
+
485
+ ### Reports are incomplete or missing sections
486
+
487
+ **Diagnosis**: Use `validate-report-file` skill
488
+
489
+ ```
490
+ Ask Claude Code: "Use validate-report-file skill to check {report-path}"
491
+ ```
492
+
493
+ **Common missing sections**:
494
+ - Executive Summary
495
+ - Changes Made
496
+ - Validation Results
497
+ - Next Steps
498
+
499
+ **Fix**: Workers MUST follow REPORT-TEMPLATE-STANDARD.md format. Update worker agent if non-compliant.
500
+
501
+ ---
502
+
503
+ ### Agent says "violates PD-1" or similar
504
+
505
+ **Explanation**: Agent detected it's about to violate a Prime Directive (PD) from CLAUDE.md.
506
+
507
+ **Common PDs**:
508
+ - **PD-1**: Orchestrators cannot invoke workers via Task tool
509
+ - **PD-2**: Cannot skip blocking quality gates without user confirmation
510
+ - **PD-3**: Must log all file changes
511
+ - **PD-4**: Must validate with Context7 when available
512
+ - **PD-6**: Workers must generate structured reports
513
+
514
+ **Action**: This is CORRECT behavior. The agent is preventing an anti-pattern. Adjust workflow to comply with PD.
515
+
516
+ ---
517
+
518
+ ### Token budget exhausted before workflow completes
519
+
520
+ **At 180k tokens**:
521
+ - Agents automatically simplify (minimal reports, essential Context7 only)
522
+
523
+ **At 195k tokens**:
524
+ - Workflow HALTS
525
+ - Emergency summary generated
526
+ - User must start new session
527
+
528
+ **Prevention strategies**:
529
+ 1. Use BASE config for daily work (saves 90% tokens)
530
+ 2. Break large workflows into smaller chunks
531
+ 3. Use specialized configs only when needed
532
+ 4. Clear context periodically (`/clear` command)
533
+
534
+ See [PERFORMANCE-OPTIMIZATION.md](./PERFORMANCE-OPTIMIZATION.md) for details.
535
+
536
+ ---
537
+
538
+ ### How do I rollback changes after failed workflow?
539
+
540
+ **Automatic rollback**: Workers log changes to `.tmp/current/changes/{workflow}-changes.json`
541
+
542
+ **Manual rollback**:
543
+ ```
544
+ Ask Claude Code: "Use rollback-changes skill to restore files from last workflow"
545
+
546
+ Skill will:
547
+ 1. Read changes log
548
+ 2. Restore backed-up files from .tmp/current/backups/
549
+ 3. Revert file modifications
550
+ 4. Report restored files
551
+ ```
552
+
553
+ **Prevention**: Quality gates should catch failures before committing changes.
554
+
555
+ ---
556
+
557
+ ## Additional Resources
558
+
559
+ - **Architecture**: [ARCHITECTURE.md](./ARCHITECTURE.md) — System design and diagrams
560
+ - **Tutorial**: [TUTORIAL-CUSTOM-AGENTS.md](./TUTORIAL-CUSTOM-AGENTS.md) — Create custom agents
561
+ - **Use Cases**: [USE-CASES.md](./USE-CASES.md) — Real-world examples
562
+ - **Performance**: [PERFORMANCE-OPTIMIZATION.md](./PERFORMANCE-OPTIMIZATION.md) — Token/cost optimization
563
+ - **Migration**: [MIGRATION-GUIDE.md](./MIGRATION-GUIDE.md) — Add to existing projects
564
+ - **Roadmap**: [ROADMAP.md](./ROADMAP.md) — Future plans
565
+
566
+ ---
567
+
568
+ **Still have questions?**
569
+
570
+ - Open an issue: [GitHub Issues](https://github.com/maslennikov-ig/claude-code-orchestrator-kit/issues)
571
+ - Join discussion: [GitHub Discussions](https://github.com/maslennikov-ig/claude-code-orchestrator-kit/discussions)
572
+ - Check main docs: [Agents Ecosystem](./Agents%20Ecosystem/)