claude-code-team 0.1.6 → 0.1.8
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/README.md +66 -21
- package/package.json +1 -1
- package/templates/lead.md +14 -39
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/claude-code-team)
|
|
4
4
|
|
|
5
|
-
Orchestrate multiple Claude sessions
|
|
5
|
+
Orchestrate multiple Claude sessions with hierarchical team structure.
|
|
6
6
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
@@ -31,22 +31,42 @@ claude --dangerously-skip-permissions
|
|
|
31
31
|
### Give orchestrator a task
|
|
32
32
|
|
|
33
33
|
```
|
|
34
|
-
>
|
|
34
|
+
> Analyze Smart Traffic market in Central Asia
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
37
|
+
## Hierarchy
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
Orchestrator (you talk to this)
|
|
41
|
+
↓ creates & manages
|
|
42
|
+
Leads (Team Leads - coordinate domains)
|
|
43
|
+
↓ create & manage
|
|
44
|
+
Workers (Specialists - do actual work)
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
| Level | Creates | Manages | Does Work |
|
|
48
|
+
|-------|---------|---------|-----------|
|
|
49
|
+
| Orchestrator | Leads | Leads | NO |
|
|
50
|
+
| Leads | Workers | Workers | NO |
|
|
51
|
+
| Workers | — | — | YES |
|
|
42
52
|
|
|
43
53
|
## Project Structure
|
|
44
54
|
|
|
45
55
|
After `cct init`:
|
|
46
56
|
```
|
|
47
57
|
my-project/
|
|
48
|
-
├── CLAUDE.md
|
|
49
|
-
|
|
58
|
+
├── CLAUDE.md # Orchestrator instructions
|
|
59
|
+
├── features/ # Capabilities catalog
|
|
60
|
+
│ ├── agents.md # Available agent roles
|
|
61
|
+
│ ├── skills.md # Available skills
|
|
62
|
+
│ ├── mcps.md # Available MCP tools
|
|
63
|
+
│ └── commands.md # Available commands
|
|
64
|
+
├── templates/
|
|
65
|
+
│ └── lead.md # Lead template (for orchestrator)
|
|
66
|
+
├── leads/ # Empty (leads created on demand)
|
|
67
|
+
├── .context/ # Shared project context
|
|
68
|
+
├── .outputs/ # Lead outputs
|
|
69
|
+
└── .sessions/ # Session IDs
|
|
50
70
|
```
|
|
51
71
|
|
|
52
72
|
After orchestrator runs:
|
|
@@ -54,23 +74,48 @@ After orchestrator runs:
|
|
|
54
74
|
my-project/
|
|
55
75
|
├── CLAUDE.md
|
|
56
76
|
├── features/
|
|
57
|
-
├──
|
|
58
|
-
├── .outputs/ # Worker results
|
|
77
|
+
├── templates/
|
|
59
78
|
├── .context/
|
|
60
|
-
│ └── project.md
|
|
61
|
-
├──
|
|
62
|
-
│
|
|
63
|
-
│
|
|
64
|
-
├──
|
|
65
|
-
|
|
79
|
+
│ └── project.md # Project context (written by orchestrator)
|
|
80
|
+
├── .sessions/
|
|
81
|
+
│ ├── orchestrator.id
|
|
82
|
+
│ └── ba_lead.id
|
|
83
|
+
├── .outputs/
|
|
84
|
+
│ ├── ba_analysis.md # Lead output
|
|
85
|
+
│ └── ba_lead.status # Completion signal
|
|
86
|
+
└── leads/
|
|
87
|
+
└── ba_lead/
|
|
88
|
+
├── CLAUDE.md # Lead instructions
|
|
89
|
+
├── .outputs/ # Worker outputs
|
|
90
|
+
│ ├── market.md
|
|
91
|
+
│ └── competitors.md
|
|
92
|
+
└── workers/
|
|
93
|
+
├── market_analyst/
|
|
94
|
+
│ └── CLAUDE.md
|
|
95
|
+
└── competitive_analyst/
|
|
96
|
+
└── CLAUDE.md
|
|
66
97
|
```
|
|
67
98
|
|
|
68
99
|
## How It Works
|
|
69
100
|
|
|
70
|
-
1. **
|
|
71
|
-
2. **Orchestrator**
|
|
72
|
-
3. **
|
|
73
|
-
4. **
|
|
101
|
+
1. **User** gives task to Orchestrator
|
|
102
|
+
2. **Orchestrator** writes `.context/project.md` and creates Leads
|
|
103
|
+
3. **Leads** create Workers from `features/` catalog
|
|
104
|
+
4. **Workers** execute tasks, write to Lead's `.outputs/`
|
|
105
|
+
5. **Leads** aggregate worker results, write to root `.outputs/`
|
|
106
|
+
6. **Orchestrator** reads Lead outputs, responds to User
|
|
107
|
+
|
|
108
|
+
## Session Types
|
|
109
|
+
|
|
110
|
+
| Type | How Created | By Whom |
|
|
111
|
+
|------|-------------|---------|
|
|
112
|
+
| User session | `claude` (interactive) | Human |
|
|
113
|
+
| CCT session | `claude --session-id $ID -p "TASK"` | Orchestrator/Lead |
|
|
114
|
+
|
|
115
|
+
- **Orchestrator** runs in user session (you talk to it)
|
|
116
|
+
- **Leads** and **Workers** run as CCT sessions (created programmatically)
|
|
117
|
+
- CCT sessions can be resumed with `-r $ID` for Q&A
|
|
118
|
+
- Only **Workers** do actual work
|
|
74
119
|
|
|
75
120
|
## License
|
|
76
121
|
|
package/package.json
CHANGED
package/templates/lead.md
CHANGED
|
@@ -9,31 +9,6 @@ You are a **Team Lead** — a coordinator for your domain.
|
|
|
9
9
|
- You **aggregate results** and report back to Orchestrator
|
|
10
10
|
- You do NOT do the work yourself — you delegate to workers
|
|
11
11
|
|
|
12
|
-
## CRITICAL: Workers vs Subagents
|
|
13
|
-
|
|
14
|
-
| Type | How to Run | Use When |
|
|
15
|
-
|------|-----------|----------|
|
|
16
|
-
| **Worker** | `claude -p "TASK: ..." &` | One-shot task, no Q&A needed |
|
|
17
|
-
| **Subagent** | `claude --session-id $ID -p "..."` | Need to ask questions, iterate |
|
|
18
|
-
|
|
19
|
-
### Worker (одноразовый)
|
|
20
|
-
```bash
|
|
21
|
-
claude --dangerously-skip-permissions -p "TASK: Write market analysis" &
|
|
22
|
-
```
|
|
23
|
-
- Runs once, produces output, exits
|
|
24
|
-
- Cannot ask questions
|
|
25
|
-
- Use for well-defined tasks
|
|
26
|
-
|
|
27
|
-
### Subagent (с сессией)
|
|
28
|
-
```bash
|
|
29
|
-
WORKER_ID=$(uuidgen)
|
|
30
|
-
echo "$WORKER_ID" > .outputs/analyst.id
|
|
31
|
-
claude --dangerously-skip-permissions --session-id "$WORKER_ID" -p "TASK: Research competitors"
|
|
32
|
-
```
|
|
33
|
-
- Can be resumed with `-r $WORKER_ID`
|
|
34
|
-
- Can receive follow-up instructions
|
|
35
|
-
- Use when you might need to clarify or iterate
|
|
36
|
-
|
|
37
12
|
## Your Structure
|
|
38
13
|
|
|
39
14
|
```
|
|
@@ -115,19 +90,11 @@ EOF
|
|
|
115
90
|
|
|
116
91
|
### 5. Launch Worker
|
|
117
92
|
|
|
118
|
-
**For one-shot task (worker):**
|
|
119
|
-
```bash
|
|
120
|
-
cd workers/<name>
|
|
121
|
-
claude --dangerously-skip-permissions -p "TASK: <specific task>" &
|
|
122
|
-
cd ../..
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
**For iterative task (subagent):**
|
|
126
93
|
```bash
|
|
127
94
|
cd workers/<name>
|
|
128
95
|
WORKER_ID=$(uuidgen)
|
|
129
96
|
echo "$WORKER_ID" > ../../.outputs/<name>.id
|
|
130
|
-
claude --dangerously-skip-permissions --session-id "$WORKER_ID" -p "TASK: <task>"
|
|
97
|
+
claude --dangerously-skip-permissions --session-id "$WORKER_ID" -p "TASK: <specific task>" &
|
|
131
98
|
cd ../..
|
|
132
99
|
```
|
|
133
100
|
|
|
@@ -137,12 +104,21 @@ cd ../..
|
|
|
137
104
|
# Check status
|
|
138
105
|
ls .outputs/*.status 2>/dev/null
|
|
139
106
|
|
|
107
|
+
# Check for questions
|
|
108
|
+
ls .outputs/*.question 2>/dev/null
|
|
109
|
+
|
|
140
110
|
# Read outputs
|
|
141
111
|
cat .outputs/*.md
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## Answering Worker Questions
|
|
142
115
|
|
|
143
|
-
|
|
116
|
+
When worker writes a question to `.outputs/<name>.question`:
|
|
117
|
+
|
|
118
|
+
```bash
|
|
144
119
|
WORKER_ID=$(cat .outputs/<name>.id)
|
|
145
|
-
claude -r "$WORKER_ID" -p "
|
|
120
|
+
claude -r "$WORKER_ID" -p "ANSWER: <your answer>"
|
|
121
|
+
rm .outputs/<name>.question
|
|
146
122
|
```
|
|
147
123
|
|
|
148
124
|
## When All Workers Done
|
|
@@ -185,6 +161,5 @@ fi
|
|
|
185
161
|
1. **Check catalog first** — `../../features/` has available roles and tools
|
|
186
162
|
2. **Read project context** — `../../.context/project.md`
|
|
187
163
|
3. **Delegate everything** — don't do work yourself
|
|
188
|
-
4. **
|
|
189
|
-
5. **
|
|
190
|
-
6. **Signal when done** — so Orchestrator knows
|
|
164
|
+
4. **Aggregate results** — combine worker outputs into cohesive report
|
|
165
|
+
5. **Signal when done** — so Orchestrator knows
|