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.
- package/.claude/agents/database/workers/api-builder.md +155 -0
- package/.claude/agents/database/workers/database-architect.md +193 -0
- package/.claude/agents/database/workers/supabase-auditor.md +1070 -0
- package/.claude/agents/development/workers/code-reviewer.md +968 -0
- package/.claude/agents/development/workers/cost-calculator-specialist.md +683 -0
- package/.claude/agents/development/workers/llm-service-specialist.md +999 -0
- package/.claude/agents/development/workers/skill-builder-v2.md +480 -0
- package/.claude/agents/development/workers/typescript-types-specialist.md +649 -0
- package/.claude/agents/development/workers/utility-builder.md +582 -0
- package/.claude/agents/documentation/workers/technical-writer.md +152 -0
- package/.claude/agents/frontend/workers/fullstack-nextjs-specialist.md +206 -0
- package/.claude/agents/frontend/workers/visual-effects-creator.md +159 -0
- package/.claude/agents/health/orchestrators/bug-orchestrator.md +1045 -0
- package/.claude/agents/health/orchestrators/dead-code-orchestrator.md +1045 -0
- package/.claude/agents/health/orchestrators/dependency-orchestrator.md +1045 -0
- package/.claude/agents/health/orchestrators/security-orchestrator.md +1045 -0
- package/.claude/agents/health/workers/bug-fixer.md +525 -0
- package/.claude/agents/health/workers/bug-hunter.md +649 -0
- package/.claude/agents/health/workers/dead-code-hunter.md +446 -0
- package/.claude/agents/health/workers/dead-code-remover.md +437 -0
- package/.claude/agents/health/workers/dependency-auditor.md +379 -0
- package/.claude/agents/health/workers/dependency-updater.md +436 -0
- package/.claude/agents/health/workers/security-scanner.md +700 -0
- package/.claude/agents/health/workers/vulnerability-fixer.md +524 -0
- package/.claude/agents/infrastructure/workers/infrastructure-specialist.md +156 -0
- package/.claude/agents/infrastructure/workers/orchestration-logic-specialist.md +1260 -0
- package/.claude/agents/infrastructure/workers/qdrant-specialist.md +503 -0
- package/.claude/agents/infrastructure/workers/quality-validator-specialist.md +984 -0
- package/.claude/agents/meta/workers/meta-agent-v3.md +503 -0
- package/.claude/agents/research/workers/problem-investigator.md +507 -0
- package/.claude/agents/research/workers/research-specialist.md +423 -0
- package/.claude/agents/testing/workers/accessibility-tester.md +813 -0
- package/.claude/agents/testing/workers/integration-tester.md +188 -0
- package/.claude/agents/testing/workers/mobile-fixes-implementer.md +252 -0
- package/.claude/agents/testing/workers/mobile-responsiveness-tester.md +180 -0
- package/.claude/agents/testing/workers/performance-optimizer.md +262 -0
- package/.claude/agents/testing/workers/test-writer.md +800 -0
- package/.claude/commands/health-bugs.md +297 -0
- package/.claude/commands/health-cleanup.md +297 -0
- package/.claude/commands/health-deps.md +297 -0
- package/.claude/commands/health-metrics.md +747 -0
- package/.claude/commands/health-security.md +297 -0
- package/.claude/commands/push.md +21 -0
- package/.claude/commands/speckit.analyze.md +184 -0
- package/.claude/commands/speckit.checklist.md +294 -0
- package/.claude/commands/speckit.clarify.md +178 -0
- package/.claude/commands/speckit.constitution.md +78 -0
- package/.claude/commands/speckit.implement.md +182 -0
- package/.claude/commands/speckit.plan.md +87 -0
- package/.claude/commands/speckit.specify.md +250 -0
- package/.claude/commands/speckit.tasks.md +137 -0
- package/.claude/commands/translate-doc.md +95 -0
- package/.claude/commands/worktree-cleanup.md +382 -0
- package/.claude/commands/worktree-create.md +287 -0
- package/.claude/commands/worktree-list.md +239 -0
- package/.claude/commands/worktree-remove.md +339 -0
- package/.claude/schemas/base-plan.schema.json +82 -0
- package/.claude/schemas/bug-plan.schema.json +71 -0
- package/.claude/schemas/dead-code-plan.schema.json +71 -0
- package/.claude/schemas/dependency-plan.schema.json +74 -0
- package/.claude/schemas/security-plan.schema.json +71 -0
- package/.claude/scripts/gates/check-bundle-size.sh +47 -0
- package/.claude/scripts/gates/check-coverage.sh +67 -0
- package/.claude/scripts/gates/check-security.sh +46 -0
- package/.claude/scripts/release.sh +740 -0
- package/.claude/settings.local.json +21 -0
- package/.claude/settings.local.json.example +20 -0
- package/.claude/skills/calculate-priority-score/SKILL.md +229 -0
- package/.claude/skills/calculate-priority-score/scoring-matrix.json +83 -0
- package/.claude/skills/extract-version/SKILL.md +228 -0
- package/.claude/skills/format-commit-message/SKILL.md +189 -0
- package/.claude/skills/format-commit-message/template.md +64 -0
- package/.claude/skills/format-markdown-table/SKILL.md +202 -0
- package/.claude/skills/format-markdown-table/examples.md +84 -0
- package/.claude/skills/format-todo-list/SKILL.md +222 -0
- package/.claude/skills/format-todo-list/template.json +30 -0
- package/.claude/skills/generate-changelog/SKILL.md +258 -0
- package/.claude/skills/generate-changelog/commit-mapping.json +47 -0
- package/.claude/skills/generate-report-header/SKILL.md +228 -0
- package/.claude/skills/generate-report-header/template.md +66 -0
- package/.claude/skills/parse-error-logs/SKILL.md +286 -0
- package/.claude/skills/parse-error-logs/patterns.json +26 -0
- package/.claude/skills/parse-git-status/SKILL.md +164 -0
- package/.claude/skills/parse-package-json/SKILL.md +151 -0
- package/.claude/skills/parse-package-json/schema.json +43 -0
- package/.claude/skills/render-template/SKILL.md +245 -0
- package/.claude/skills/rollback-changes/SKILL.md +582 -0
- package/.claude/skills/rollback-changes/changes-log-schema.json +101 -0
- package/.claude/skills/run-quality-gate/SKILL.md +404 -0
- package/.claude/skills/run-quality-gate/gate-mappings.json +97 -0
- package/.claude/skills/validate-plan-file/SKILL.md +327 -0
- package/.claude/skills/validate-plan-file/schema.json +35 -0
- package/.claude/skills/validate-report-file/SKILL.md +256 -0
- package/.claude/skills/validate-report-file/schema.json +67 -0
- package/.env.example +49 -0
- package/.github/BRANCH_PROTECTION.md +137 -0
- package/.github/workflows/build.yml +70 -0
- package/.github/workflows/claude-code-review.yml +255 -0
- package/.github/workflows/claude.yml +79 -0
- package/.github/workflows/deploy-staging.yml +90 -0
- package/.github/workflows/test.yml +104 -0
- package/.gitignore +116 -0
- package/CLAUDE.md +137 -0
- package/LICENSE +72 -0
- package/README.md +1098 -0
- package/docs/ARCHITECTURE.md +746 -0
- package/docs/Agents Ecosystem/AGENT-ORCHESTRATION.md +568 -0
- package/docs/Agents Ecosystem/AI-AGENT-ECOSYSTEM-README.md +658 -0
- package/docs/Agents Ecosystem/ARCHITECTURE.md +606 -0
- package/docs/Agents Ecosystem/QUALITY-GATES-SPECIFICATION.md +1315 -0
- package/docs/Agents Ecosystem/REPORT-TEMPLATE-STANDARD.md +1324 -0
- package/docs/Agents Ecosystem/spec-kit-comprehensive-updates.md +478 -0
- package/docs/FAQ.md +572 -0
- package/docs/MIGRATION-GUIDE.md +542 -0
- package/docs/PERFORMANCE-OPTIMIZATION.md +494 -0
- package/docs/ROADMAP.md +439 -0
- package/docs/TUTORIAL-CUSTOM-AGENTS.md +2041 -0
- package/docs/USE-CASES.md +706 -0
- package/index.js +96 -0
- package/mcp/.mcp.base.json +21 -0
- package/mcp/.mcp.frontend.json +29 -0
- package/mcp/.mcp.full.json +67 -0
- package/mcp/.mcp.local.example.json +7 -0
- package/mcp/.mcp.local.json +7 -0
- package/mcp/.mcp.n8n.json +45 -0
- package/mcp/.mcp.supabase-full.json +35 -0
- package/mcp/.mcp.supabase-only.json +28 -0
- package/package.json +78 -0
- package/postinstall.js +71 -0
- package/switch-mcp.sh +101 -0
|
@@ -0,0 +1,542 @@
|
|
|
1
|
+
# 🔄 Migration Guide
|
|
2
|
+
|
|
3
|
+
## Adding Orchestrator Kit to Existing Projects
|
|
4
|
+
|
|
5
|
+
### Quick Start
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# 1. Backup your existing .claude directory (if exists)
|
|
9
|
+
mv .claude .claude.backup
|
|
10
|
+
|
|
11
|
+
# 2. Copy Orchestrator Kit
|
|
12
|
+
cp -r /path/to/claude-code-orchestrator-kit/.claude ./
|
|
13
|
+
|
|
14
|
+
# 3. If you had custom agents, merge them
|
|
15
|
+
cp .claude.backup/agents/my-custom-agent.md .claude/agents/
|
|
16
|
+
|
|
17
|
+
# 4. Configure environment
|
|
18
|
+
cp .env.example .env.local
|
|
19
|
+
# Edit .env.local with your credentials
|
|
20
|
+
|
|
21
|
+
# 5. Select MCP configuration
|
|
22
|
+
./switch-mcp.sh
|
|
23
|
+
|
|
24
|
+
# 6. Restart Claude Code
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Step-by-Step Migration
|
|
30
|
+
|
|
31
|
+
### Step 1: Assessment
|
|
32
|
+
|
|
33
|
+
**Before copying anything, assess your current setup:**
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
# Check existing agents
|
|
37
|
+
ls -la .claude/agents/
|
|
38
|
+
|
|
39
|
+
# Check custom commands
|
|
40
|
+
ls -la .claude/commands/
|
|
41
|
+
|
|
42
|
+
# Check scripts
|
|
43
|
+
ls -la .claude/scripts/
|
|
44
|
+
|
|
45
|
+
# Check if CLAUDE.md exists
|
|
46
|
+
cat CLAUDE.md
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
**Document what you have:**
|
|
50
|
+
- Custom agents you want to keep
|
|
51
|
+
- Custom commands
|
|
52
|
+
- Custom scripts
|
|
53
|
+
- Existing MCP configurations
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
### Step 2: Backup
|
|
58
|
+
|
|
59
|
+
**Create backup of existing setup:**
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
# Full backup
|
|
63
|
+
tar -czf claude-backup-$(date +%Y%m%d).tar.gz .claude/ CLAUDE.md .mcp.json
|
|
64
|
+
|
|
65
|
+
# Or simple copy
|
|
66
|
+
cp -r .claude .claude.backup
|
|
67
|
+
cp CLAUDE.md CLAUDE.md.backup
|
|
68
|
+
cp .mcp.json .mcp.json.backup
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
### Step 3: Install Orchestrator Kit
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
# Clone or download kit
|
|
77
|
+
git clone https://github.com/maslennikov-ig/claude-code-orchestrator-kit.git
|
|
78
|
+
# Or: download and extract ZIP
|
|
79
|
+
|
|
80
|
+
# Copy .claude directory
|
|
81
|
+
cp -r claude-code-orchestrator-kit/.claude ./
|
|
82
|
+
|
|
83
|
+
# Copy CLAUDE.md (Behavioral OS)
|
|
84
|
+
cp claude-code-orchestrator-kit/CLAUDE.md ./
|
|
85
|
+
|
|
86
|
+
# Copy MCP configurations
|
|
87
|
+
cp -r claude-code-orchestrator-kit/mcp ./
|
|
88
|
+
|
|
89
|
+
# Copy switch script
|
|
90
|
+
cp claude-code-orchestrator-kit/switch-mcp.sh ./
|
|
91
|
+
chmod +x switch-mcp.sh
|
|
92
|
+
|
|
93
|
+
# Copy environment template
|
|
94
|
+
cp claude-code-orchestrator-kit/.env.example ./.env.local
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
### Step 4: Merge Custom Agents
|
|
100
|
+
|
|
101
|
+
**If you had custom agents in `.claude.backup/agents/`:**
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
# List your custom agents
|
|
105
|
+
ls .claude.backup/agents/
|
|
106
|
+
|
|
107
|
+
# Copy custom agents to appropriate category
|
|
108
|
+
cp .claude.backup/agents/my-custom-worker.md .claude/agents/development/workers/
|
|
109
|
+
cp .claude.backup/agents/my-orchestrator.md .claude/agents/custom/orchestrators/
|
|
110
|
+
|
|
111
|
+
# Verify no conflicts
|
|
112
|
+
diff .claude.backup/agents/my-agent.md .claude/agents/development/workers/my-agent.md
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
**Update custom agents to follow new patterns:**
|
|
116
|
+
```markdown
|
|
117
|
+
# Update YAML frontmatter if needed
|
|
118
|
+
---
|
|
119
|
+
name: my-agent
|
|
120
|
+
description: Use proactively for {task}...
|
|
121
|
+
model: sonnet
|
|
122
|
+
color: cyan
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
# Check references to ARCHITECTURE.md, CLAUDE.md
|
|
126
|
+
# Update plan file locations to .tmp/current/plans/
|
|
127
|
+
# Update report locations to .tmp/current/reports/
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
### Step 5: Configure Environment
|
|
133
|
+
|
|
134
|
+
**Edit `.env.local`:**
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
# Required for Supabase MCP
|
|
138
|
+
SUPABASE_PROJECT_REF=your-project-ref
|
|
139
|
+
SUPABASE_ACCESS_TOKEN=your-token
|
|
140
|
+
SUPABASE_DB_PASSWORD=your-password
|
|
141
|
+
|
|
142
|
+
# Required for Sequential Thinking
|
|
143
|
+
SEQUENTIAL_THINKING_KEY=your-smithery-key
|
|
144
|
+
SEQUENTIAL_THINKING_PROFILE=your-profile
|
|
145
|
+
|
|
146
|
+
# Optional for n8n
|
|
147
|
+
N8N_API_URL=https://your-n8n.com
|
|
148
|
+
N8N_API_KEY=your-api-key
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
**Security check:**
|
|
152
|
+
```bash
|
|
153
|
+
# Verify .env.local is git-ignored
|
|
154
|
+
cat .gitignore | grep ".env.local"
|
|
155
|
+
|
|
156
|
+
# If not, add it
|
|
157
|
+
echo ".env.local" >> .gitignore
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
### Step 6: Select MCP Configuration
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
# Run interactive switcher
|
|
166
|
+
./switch-mcp.sh
|
|
167
|
+
|
|
168
|
+
# Select appropriate config:
|
|
169
|
+
# 1. BASE - Minimal (start here)
|
|
170
|
+
# 2. SUPABASE - Database work
|
|
171
|
+
# 3. SUPABASE-FULL - Multi-project
|
|
172
|
+
# 4. N8N - Workflow automation
|
|
173
|
+
# 5. FRONTEND - UI/UX work
|
|
174
|
+
# 6. FULL - Everything
|
|
175
|
+
|
|
176
|
+
# For first-time setup, recommend: BASE
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
### Step 7: Test Installation
|
|
182
|
+
|
|
183
|
+
```bash
|
|
184
|
+
# Verify agents loaded
|
|
185
|
+
# (In Claude Code)
|
|
186
|
+
"List available agents"
|
|
187
|
+
|
|
188
|
+
# Test a simple command
|
|
189
|
+
/health-metrics
|
|
190
|
+
|
|
191
|
+
# Test agent invocation
|
|
192
|
+
"Use bug-hunter to scan src/"
|
|
193
|
+
|
|
194
|
+
# Verify MCP servers working
|
|
195
|
+
"Check Context7 availability"
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
---
|
|
199
|
+
|
|
200
|
+
## Migration Scenarios
|
|
201
|
+
|
|
202
|
+
### Scenario 1: No Existing .claude Directory
|
|
203
|
+
|
|
204
|
+
**This is the easiest scenario:**
|
|
205
|
+
|
|
206
|
+
```bash
|
|
207
|
+
# Simply copy everything
|
|
208
|
+
cp -r claude-code-orchestrator-kit/.claude ./
|
|
209
|
+
cp claude-code-orchestrator-kit/CLAUDE.md ./
|
|
210
|
+
cp -r claude-code-orchestrator-kit/mcp ./
|
|
211
|
+
cp claude-code-orchestrator-kit/switch-mcp.sh ./
|
|
212
|
+
cp claude-code-orchestrator-kit/.env.example ./.env.local
|
|
213
|
+
|
|
214
|
+
# Configure and start
|
|
215
|
+
./switch-mcp.sh
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
### Scenario 2: Existing .claude with Custom Agents
|
|
221
|
+
|
|
222
|
+
**Merge approach:**
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
# 1. Backup existing
|
|
226
|
+
mv .claude .claude.backup
|
|
227
|
+
|
|
228
|
+
# 2. Install kit
|
|
229
|
+
cp -r claude-code-orchestrator-kit/.claude ./
|
|
230
|
+
|
|
231
|
+
# 3. Create custom category
|
|
232
|
+
mkdir -p .claude/agents/custom/workers/
|
|
233
|
+
mkdir -p .claude/agents/custom/orchestrators/
|
|
234
|
+
|
|
235
|
+
# 4. Copy custom agents
|
|
236
|
+
cp .claude.backup/agents/*.md .claude/agents/custom/workers/
|
|
237
|
+
|
|
238
|
+
# 5. Update custom agents (if needed)
|
|
239
|
+
# - Update YAML frontmatter
|
|
240
|
+
# - Update references to ARCHITECTURE.md
|
|
241
|
+
# - Update file paths (.tmp/current/...)
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
### Scenario 3: Existing MCP Configuration
|
|
247
|
+
|
|
248
|
+
**Merge MCP configs:**
|
|
249
|
+
|
|
250
|
+
```bash
|
|
251
|
+
# 1. Backup existing MCP
|
|
252
|
+
cp .mcp.json .mcp.json.backup
|
|
253
|
+
|
|
254
|
+
# 2. Copy kit's MCP configs
|
|
255
|
+
cp -r claude-code-orchestrator-kit/mcp ./
|
|
256
|
+
|
|
257
|
+
# 3. Merge custom MCP servers into BASE config
|
|
258
|
+
# Edit mcp/.mcp.base.json:
|
|
259
|
+
{
|
|
260
|
+
"mcpServers": {
|
|
261
|
+
"context7": { ... },
|
|
262
|
+
"server-sequential-thinking": { ... },
|
|
263
|
+
"my-custom-mcp": {
|
|
264
|
+
"command": "...",
|
|
265
|
+
"args": [...],
|
|
266
|
+
"env": { ... }
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
# 4. Switch to merged config
|
|
272
|
+
./switch-mcp.sh
|
|
273
|
+
# Select BASE (now includes your custom MCP)
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
---
|
|
277
|
+
|
|
278
|
+
### Scenario 4: Existing CLAUDE.md
|
|
279
|
+
|
|
280
|
+
**Compare and merge:**
|
|
281
|
+
|
|
282
|
+
```bash
|
|
283
|
+
# 1. Backup existing
|
|
284
|
+
cp CLAUDE.md CLAUDE.md.backup
|
|
285
|
+
|
|
286
|
+
# 2. Compare
|
|
287
|
+
diff CLAUDE.md.backup claude-code-orchestrator-kit/CLAUDE.md
|
|
288
|
+
|
|
289
|
+
# 3. Options:
|
|
290
|
+
# A. Use kit's CLAUDE.md (recommended):
|
|
291
|
+
cp claude-code-orchestrator-kit/CLAUDE.md ./
|
|
292
|
+
|
|
293
|
+
# B. Merge manually (advanced):
|
|
294
|
+
# - Keep your project-specific rules
|
|
295
|
+
# - Add kit's Prime Directives (PD-1 to PD-7)
|
|
296
|
+
# - Add kit's Behavioral Contracts
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
---
|
|
300
|
+
|
|
301
|
+
## Post-Migration Checklist
|
|
302
|
+
|
|
303
|
+
### Verification
|
|
304
|
+
|
|
305
|
+
- [ ] `.claude/` directory exists with agents, commands, skills
|
|
306
|
+
- [ ] `CLAUDE.md` exists (Behavioral OS)
|
|
307
|
+
- [ ] `mcp/` directory has configuration files
|
|
308
|
+
- [ ] `.mcp.json` is active configuration (not git-ignored)
|
|
309
|
+
- [ ] `.env.local` configured with credentials (git-ignored)
|
|
310
|
+
- [ ] `switch-mcp.sh` executable (`chmod +x`)
|
|
311
|
+
- [ ] Custom agents copied to appropriate categories
|
|
312
|
+
- [ ] Git ignores sensitive files (.env.local, .tmp/)
|
|
313
|
+
|
|
314
|
+
### Functional Testing
|
|
315
|
+
|
|
316
|
+
```bash
|
|
317
|
+
# Test 1: Agents loaded
|
|
318
|
+
# (Ask Claude Code): "List health agents"
|
|
319
|
+
# Should see: bug-orchestrator, security-orchestrator, etc.
|
|
320
|
+
|
|
321
|
+
# Test 2: Commands work
|
|
322
|
+
/health-metrics
|
|
323
|
+
# Should generate metrics report
|
|
324
|
+
|
|
325
|
+
# Test 3: MCP servers active
|
|
326
|
+
# (Ask Claude Code): "Use Context7 to get React docs"
|
|
327
|
+
# Should return React documentation
|
|
328
|
+
|
|
329
|
+
# Test 4: Custom agents work
|
|
330
|
+
# (If you had custom agents): "Use my-custom-agent for..."
|
|
331
|
+
# Should invoke your custom agent
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
### Performance Check
|
|
335
|
+
|
|
336
|
+
```bash
|
|
337
|
+
# Verify configuration
|
|
338
|
+
./switch-mcp.sh
|
|
339
|
+
# Select 0 to see current config
|
|
340
|
+
|
|
341
|
+
# Check token usage
|
|
342
|
+
# Current config should be BASE (smallest footprint)
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
---
|
|
346
|
+
|
|
347
|
+
## Troubleshooting
|
|
348
|
+
|
|
349
|
+
### Issue: Agents Not Found
|
|
350
|
+
|
|
351
|
+
**Symptom**: Claude Code doesn't recognize health commands.
|
|
352
|
+
|
|
353
|
+
**Solution**:
|
|
354
|
+
```bash
|
|
355
|
+
# 1. Verify .claude/ structure
|
|
356
|
+
ls -la .claude/agents/health/orchestrators/
|
|
357
|
+
# Should see: bug-orchestrator.md, security-orchestrator.md, etc.
|
|
358
|
+
|
|
359
|
+
# 2. Restart Claude Code completely
|
|
360
|
+
# (Not just reload, full restart)
|
|
361
|
+
|
|
362
|
+
# 3. Check YAML frontmatter in agent files
|
|
363
|
+
head -10 .claude/agents/health/orchestrators/bug-orchestrator.md
|
|
364
|
+
# Should have valid YAML:
|
|
365
|
+
# ---
|
|
366
|
+
# name: bug-orchestrator
|
|
367
|
+
# description: ...
|
|
368
|
+
# model: sonnet
|
|
369
|
+
# color: blue
|
|
370
|
+
# ---
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
---
|
|
374
|
+
|
|
375
|
+
### Issue: MCP Servers Not Working
|
|
376
|
+
|
|
377
|
+
**Symptom**: Context7, Supabase MCPs show "not available".
|
|
378
|
+
|
|
379
|
+
**Solution**:
|
|
380
|
+
```bash
|
|
381
|
+
# 1. Verify .mcp.json copied
|
|
382
|
+
cat .mcp.json | jq .mcpServers
|
|
383
|
+
|
|
384
|
+
# 2. Check environment variables loaded
|
|
385
|
+
cat .env.local
|
|
386
|
+
# Variables should be present (no quotes)
|
|
387
|
+
|
|
388
|
+
# 3. Restart Claude Code
|
|
389
|
+
# Environment variables load on startup
|
|
390
|
+
|
|
391
|
+
# 4. Test specific MCP
|
|
392
|
+
# (Ask Claude Code): "Test Context7 MCP server"
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
---
|
|
396
|
+
|
|
397
|
+
### Issue: Custom Agents Broken
|
|
398
|
+
|
|
399
|
+
**Symptom**: Custom agents fail to run or give errors.
|
|
400
|
+
|
|
401
|
+
**Solution**:
|
|
402
|
+
```bash
|
|
403
|
+
# 1. Check agent location
|
|
404
|
+
# Custom agents should be in:
|
|
405
|
+
# .claude/agents/custom/workers/ or
|
|
406
|
+
# .claude/agents/{appropriate-category}/workers/
|
|
407
|
+
|
|
408
|
+
# 2. Update agent references
|
|
409
|
+
# Old: docs/ARCHITECTURE.md
|
|
410
|
+
# New: docs/Agents Ecosystem/ARCHITECTURE.md
|
|
411
|
+
|
|
412
|
+
# Old: .bug-plan.json
|
|
413
|
+
# New: .tmp/current/plans/.bug-plan.json
|
|
414
|
+
|
|
415
|
+
# 3. Check YAML frontmatter
|
|
416
|
+
# Must have: name, description, model, color
|
|
417
|
+
|
|
418
|
+
# 4. Test agent
|
|
419
|
+
# (Ask Claude Code): "Use {agent-name} for test"
|
|
420
|
+
```
|
|
421
|
+
|
|
422
|
+
---
|
|
423
|
+
|
|
424
|
+
### Issue: Git Shows Kit Files as Untracked
|
|
425
|
+
|
|
426
|
+
**Symptom**: `git status` shows `.claude/`, `docs/`, etc.
|
|
427
|
+
|
|
428
|
+
**Solution**:
|
|
429
|
+
```bash
|
|
430
|
+
# Option A: Commit kit files (recommended)
|
|
431
|
+
git add .claude/ docs/ CLAUDE.md mcp/ switch-mcp.sh
|
|
432
|
+
git commit -m "feat: Add Claude Code Orchestrator Kit"
|
|
433
|
+
|
|
434
|
+
# Option B: Add to .gitignore (not recommended)
|
|
435
|
+
# Kit files should be committed so team has access
|
|
436
|
+
```
|
|
437
|
+
|
|
438
|
+
---
|
|
439
|
+
|
|
440
|
+
### Issue: Conflicts with Existing Agents
|
|
441
|
+
|
|
442
|
+
**Symptom**: Kit agent has same name as custom agent.
|
|
443
|
+
|
|
444
|
+
**Solution**:
|
|
445
|
+
```bash
|
|
446
|
+
# 1. Rename custom agent
|
|
447
|
+
mv .claude/agents/custom/bug-hunter.md .claude/agents/custom/my-bug-hunter.md
|
|
448
|
+
|
|
449
|
+
# 2. Update YAML frontmatter
|
|
450
|
+
# Change: name: bug-hunter
|
|
451
|
+
# To: name: my-bug-hunter
|
|
452
|
+
|
|
453
|
+
# 3. Use renamed agent
|
|
454
|
+
# (Ask Claude Code): "Use my-bug-hunter for..."
|
|
455
|
+
```
|
|
456
|
+
|
|
457
|
+
---
|
|
458
|
+
|
|
459
|
+
## CI/CD Integration
|
|
460
|
+
|
|
461
|
+
### GitHub Actions
|
|
462
|
+
|
|
463
|
+
```yaml
|
|
464
|
+
# .github/workflows/health-check.yml
|
|
465
|
+
name: Health Check
|
|
466
|
+
|
|
467
|
+
on:
|
|
468
|
+
pull_request:
|
|
469
|
+
schedule:
|
|
470
|
+
- cron: '0 0 * * 1' # Weekly
|
|
471
|
+
|
|
472
|
+
jobs:
|
|
473
|
+
health:
|
|
474
|
+
runs-on: ubuntu-latest
|
|
475
|
+
steps:
|
|
476
|
+
- uses: actions/checkout@v3
|
|
477
|
+
|
|
478
|
+
- name: Setup Claude Code
|
|
479
|
+
uses: claude-code/setup@v1
|
|
480
|
+
with:
|
|
481
|
+
mcp-config: base # Use BASE for CI
|
|
482
|
+
|
|
483
|
+
- name: Run health checks
|
|
484
|
+
run: |
|
|
485
|
+
cp mcp/.mcp.base.json .mcp.json
|
|
486
|
+
claude-code /health-bugs
|
|
487
|
+
|
|
488
|
+
- name: Upload reports
|
|
489
|
+
uses: actions/upload-artifact@v3
|
|
490
|
+
with:
|
|
491
|
+
name: health-reports
|
|
492
|
+
path: .tmp/current/reports/
|
|
493
|
+
```
|
|
494
|
+
|
|
495
|
+
---
|
|
496
|
+
|
|
497
|
+
## Rollback Procedure
|
|
498
|
+
|
|
499
|
+
**If migration causes issues:**
|
|
500
|
+
|
|
501
|
+
```bash
|
|
502
|
+
# 1. Stop Claude Code
|
|
503
|
+
|
|
504
|
+
# 2. Restore backup
|
|
505
|
+
rm -rf .claude/
|
|
506
|
+
mv .claude.backup .claude/
|
|
507
|
+
|
|
508
|
+
rm CLAUDE.md
|
|
509
|
+
mv CLAUDE.md.backup CLAUDE.md
|
|
510
|
+
|
|
511
|
+
rm .mcp.json
|
|
512
|
+
mv .mcp.json.backup .mcp.json
|
|
513
|
+
|
|
514
|
+
# 3. Restart Claude Code
|
|
515
|
+
|
|
516
|
+
# 4. Verify system restored
|
|
517
|
+
# (Ask Claude Code): "List agents"
|
|
518
|
+
# Should see your original agents
|
|
519
|
+
```
|
|
520
|
+
|
|
521
|
+
---
|
|
522
|
+
|
|
523
|
+
## Next Steps
|
|
524
|
+
|
|
525
|
+
After successful migration:
|
|
526
|
+
|
|
527
|
+
1. **Run baseline health check**: `/health-bugs`, `/health-security`, `/health-deps`
|
|
528
|
+
2. **Review reports**: Understand current code health
|
|
529
|
+
3. **Create action plan**: Prioritize fixes based on reports
|
|
530
|
+
4. **Train team**: Share documentation, run demo session
|
|
531
|
+
5. **Integrate with workflow**: Add to code review, CI/CD
|
|
532
|
+
|
|
533
|
+
See:
|
|
534
|
+
- [TUTORIAL-CUSTOM-AGENTS.md](./TUTORIAL-CUSTOM-AGENTS.md) for creating agents
|
|
535
|
+
- [USE-CASES.md](./USE-CASES.md) for real-world examples
|
|
536
|
+
- [PERFORMANCE-OPTIMIZATION.md](./PERFORMANCE-OPTIMIZATION.md) for cost savings
|
|
537
|
+
|
|
538
|
+
---
|
|
539
|
+
|
|
540
|
+
**Document Version**: 1.0
|
|
541
|
+
**Last Updated**: 2025-01-11
|
|
542
|
+
**Maintained by**: [Igor Maslennikov](https://github.com/maslennikov-ig)
|