claude-code-orchestrator-kit 1.0.0 → 1.1.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/.gitignore +7 -1
- package/README.md +138 -0
- package/package.json +1 -1
package/.gitignore
CHANGED
|
@@ -113,4 +113,10 @@ $RECYCLE.BIN/
|
|
|
113
113
|
# package-lock.json
|
|
114
114
|
# yarn.lock
|
|
115
115
|
# pnpm-lock.yaml
|
|
116
|
-
*.tgz
|
|
116
|
+
*.tgz
|
|
117
|
+
|
|
118
|
+
# ===================================================================
|
|
119
|
+
# Articles & Writing
|
|
120
|
+
# ===================================================================
|
|
121
|
+
# Article drafts and master prompts (not for publication)
|
|
122
|
+
articles/
|
package/README.md
CHANGED
|
@@ -16,6 +16,7 @@ Complete toolkit with **33+ AI agents**, **quality gates**, **health monitoring*
|
|
|
16
16
|
|
|
17
17
|
- [Overview](#overview)
|
|
18
18
|
- [Features](#features)
|
|
19
|
+
- [Key Innovations](#key-innovations)
|
|
19
20
|
- [Quick Start](#quick-start)
|
|
20
21
|
- [Installation](#installation)
|
|
21
22
|
- [Documentation](#documentation)
|
|
@@ -95,6 +96,143 @@ Reusable utilities for:
|
|
|
95
96
|
|
|
96
97
|
---
|
|
97
98
|
|
|
99
|
+
## 🔑 Key Innovations
|
|
100
|
+
|
|
101
|
+
### 🎯 **Orchestrator Pattern**
|
|
102
|
+
|
|
103
|
+
**The Paradigm Shift**: Transform Claude Code from doing everything directly to acting as an orchestrator that delegates complex tasks to specialized sub-agents.
|
|
104
|
+
|
|
105
|
+
**Why It Matters**:
|
|
106
|
+
- **Context Preservation**: Main Claude Code stays lean (~10-15K tokens vs 50K+ in standard usage)
|
|
107
|
+
- **Specialization**: Each sub-agent is expert in its domain (bug fixing, security scanning, database architecture)
|
|
108
|
+
- **Quality Assurance**: Mandatory verification after every delegation (read files + run type-check)
|
|
109
|
+
- **Indefinite Work**: Can work on project indefinitely without context exhaustion
|
|
110
|
+
|
|
111
|
+
**Core Rules** (from `CLAUDE.md`):
|
|
112
|
+
1. **GATHER FULL CONTEXT FIRST** - Read code, search patterns, check commits before delegation
|
|
113
|
+
2. **DELEGATE TO SUBAGENTS** - Provide complete context + validation criteria
|
|
114
|
+
3. **VERIFY RESULTS** - Never skip verification (read modified files, run type-check)
|
|
115
|
+
4. **ACCEPT/REJECT LOOP** - Re-delegate with corrections if verification fails
|
|
116
|
+
5. **PER-TASK COMMITS** - Run `/push patch` after each completed task
|
|
117
|
+
|
|
118
|
+
### 📋 **SpecKit Enhancement: Phase 0 Planning**
|
|
119
|
+
|
|
120
|
+
**SpecKit** (by GitHub) provides structured development workflow. We enhanced it with **Phase 0: Planning**.
|
|
121
|
+
|
|
122
|
+
**Phase 0 Responsibilities**:
|
|
123
|
+
1. **Executor Assignment**:
|
|
124
|
+
- `[EXECUTOR: MAIN]` - Only trivial tasks (1-2 line fixes, simple imports)
|
|
125
|
+
- `[EXECUTOR: existing-agent]` - If 100% match with existing sub-agent
|
|
126
|
+
- `[EXECUTOR: FUTURE-agent-name]` - If no match (agent needs creation)
|
|
127
|
+
|
|
128
|
+
2. **Meta-Agent Creation**:
|
|
129
|
+
- Launch N `meta-agent-v3` calls in **single message** for parallel agent creation
|
|
130
|
+
- **Atomicity Rule**: 1 Task = 1 Agent Invocation
|
|
131
|
+
- After creation: Ask user to restart Claude Code
|
|
132
|
+
|
|
133
|
+
3. **Research Resolution**:
|
|
134
|
+
- Simple research: Agent solves with available tools
|
|
135
|
+
- Complex research: Create prompt in `research/` directory
|
|
136
|
+
|
|
137
|
+
**Why It Matters**: Ensures all necessary agents exist before implementation starts, enables parallel task execution, prevents context overflow.
|
|
138
|
+
|
|
139
|
+
### 🤖 **Meta-Agent: The Agent Factory**
|
|
140
|
+
|
|
141
|
+
**meta-agent-v3** creates new specialized agents in 2-3 minutes following project patterns:
|
|
142
|
+
- **Workers** - Execute tasks from plan files (5-phase structure)
|
|
143
|
+
- **Orchestrators** - Coordinate multi-phase workflows (return control pattern)
|
|
144
|
+
- **Simple Agents** - Standalone tools
|
|
145
|
+
|
|
146
|
+
**How It Works**:
|
|
147
|
+
1. Loads architecture docs (`ARCHITECTURE.md` + `CLAUDE.md`)
|
|
148
|
+
2. Determines agent type and requirements
|
|
149
|
+
3. Generates YAML frontmatter + structure + validation + error handling
|
|
150
|
+
4. Writes to appropriate location
|
|
151
|
+
5. Validates against project patterns
|
|
152
|
+
|
|
153
|
+
### 🔄 **Return Control Pattern**
|
|
154
|
+
|
|
155
|
+
**Orchestrators** coordinate workflows without invoking workers directly:
|
|
156
|
+
|
|
157
|
+
```
|
|
158
|
+
Orchestrator → Create plan file → Signal readiness → EXIT
|
|
159
|
+
↓
|
|
160
|
+
Main Session → Invoke worker via Task tool
|
|
161
|
+
↓
|
|
162
|
+
Worker → Execute → Validate → Report → EXIT
|
|
163
|
+
↓
|
|
164
|
+
Orchestrator → Resume → Verify → Next phase
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
**Why Not Task Tool?**: Using Task tool would create nested contexts, defeating isolation purpose.
|
|
168
|
+
|
|
169
|
+
### ⚙️ **MCP Dynamic Switching**
|
|
170
|
+
|
|
171
|
+
**Problem**: Each MCP server consumes 500-1500 tokens from context budget.
|
|
172
|
+
|
|
173
|
+
**Solution**: `switch-mcp.sh` script dynamically switches between 6 configurations:
|
|
174
|
+
- **BASE** (~600 tokens): Context7 + Sequential Thinking (daily use)
|
|
175
|
+
- **SUPABASE** (~2500): + Supabase (database work)
|
|
176
|
+
- **FRONTEND** (~2000): + Playwright + ShadCN (UI work)
|
|
177
|
+
- **FULL** (~5000): All servers (when needed)
|
|
178
|
+
|
|
179
|
+
**Benefit**: Save 500-4500 context tokens by loading only what you need.
|
|
180
|
+
|
|
181
|
+
### 🌳 **Worktree + VS Code Integration**
|
|
182
|
+
|
|
183
|
+
**Parallel Feature Development**:
|
|
184
|
+
1. Create worktrees for different features: `/worktree-create feature/new-auth`
|
|
185
|
+
2. Add `.worktrees/*` to VS Code workspace folders (see `.claude/settings.local.json.example`)
|
|
186
|
+
3. Switch between features via folder selector
|
|
187
|
+
4. Run multiple Claude Code sessions in parallel
|
|
188
|
+
|
|
189
|
+
**Benefit**: 3-5 features in parallel, no context pollution, isolated testing.
|
|
190
|
+
|
|
191
|
+
### 🔔 **Webhook Integration**
|
|
192
|
+
|
|
193
|
+
**Task Completion Notifications** (`.claude/settings.local.json.example`):
|
|
194
|
+
```json
|
|
195
|
+
{
|
|
196
|
+
"hooks": {
|
|
197
|
+
"Stop": [
|
|
198
|
+
{
|
|
199
|
+
"type": "command",
|
|
200
|
+
"command": "notify-send 'Claude Code' 'Task completed!'"
|
|
201
|
+
}
|
|
202
|
+
]
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
**Use Cases**: Slack notifications, system alerts, Telegram bots, log files.
|
|
208
|
+
|
|
209
|
+
**Benefit**: Start task, switch to other project, get notified when done.
|
|
210
|
+
|
|
211
|
+
### 🎯 **Skills vs Agents**
|
|
212
|
+
|
|
213
|
+
**Skills** (15+): Reusable utilities (<100 lines), stateless, invoked via `Skill` tool
|
|
214
|
+
- Examples: `run-quality-gate`, `validate-plan-file`, `generate-report-header`
|
|
215
|
+
- No context isolation, runs in caller's context
|
|
216
|
+
|
|
217
|
+
**Agents** (33+): Stateful workflows, context-isolated, invoked via `Task` tool
|
|
218
|
+
- Examples: `bug-hunter`, `security-scanner`, `database-architect`
|
|
219
|
+
- Full context isolation, multi-step processes
|
|
220
|
+
|
|
221
|
+
### 📐 **Non-Traditional CLAUDE.md**
|
|
222
|
+
|
|
223
|
+
**Standard Practice**: Store entire project history in `CLAUDE.md`
|
|
224
|
+
- Problem: Wastes context tokens on historical data
|
|
225
|
+
|
|
226
|
+
**Our Innovation**: `CLAUDE.md` as **Behavioral Operating System**
|
|
227
|
+
- Contains ONLY orchestration rules (no project history)
|
|
228
|
+
- Defines how to gather context BEFORE delegation
|
|
229
|
+
- Specifies verification rules AFTER delegation
|
|
230
|
+
- Forces context preservation
|
|
231
|
+
|
|
232
|
+
**Result**: Main Claude Code stays lean, all context gathered on-demand.
|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
|
|
98
236
|
## 🚀 Quick Start
|
|
99
237
|
|
|
100
238
|
```bash
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-code-orchestrator-kit",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Complete automation and orchestration system for Claude Code with 33+ AI agents, quality gates, health monitoring, and workflow automation",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|