cli-fleet 0.1.0__py3-none-any.whl
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.
- cli_fleet/__init__.py +9 -0
- cli_fleet/cli.py +132 -0
- cli_fleet/scripts/agents/brain-neuron.md +85 -0
- cli_fleet/scripts/agents/brain-pacemaker.md +92 -0
- cli_fleet/scripts/agents/hunter.md +27 -0
- cli_fleet/scripts/agents/researcher.md +18 -0
- cli_fleet/scripts/agents/reviewer.md +21 -0
- cli_fleet/scripts/captain.sh +160 -0
- cli_fleet/scripts/cleanup.sh +72 -0
- cli_fleet/scripts/examples/hunt-layerzero-brainstream.json +34 -0
- cli_fleet/scripts/examples/hunt-layerzero.json +30 -0
- cli_fleet/scripts/examples/openwindows-milestone2.json +34 -0
- cli_fleet/scripts/hooks/check-mailbox.sh +64 -0
- cli_fleet/scripts/hooks/consciousness-bridge.sh +64 -0
- cli_fleet/scripts/hooks/stream-stall-check.sh +27 -0
- cli_fleet/scripts/hooks/task-completed.sh +26 -0
- cli_fleet/scripts/hooks/teammate-idle.sh +49 -0
- cli_fleet/scripts/launch.sh +441 -0
- cli_fleet/scripts/lib/protocol.sh +250 -0
- cli_fleet/scripts/send.sh +24 -0
- cli_fleet/scripts/setup.sh +254 -0
- cli_fleet/scripts/status.sh +42 -0
- cli_fleet/scripts/templates/brain-stream-lead.md +76 -0
- cli_fleet/scripts/templates/team-lead.md +60 -0
- cli_fleet-0.1.0.dist-info/METADATA +67 -0
- cli_fleet-0.1.0.dist-info/RECORD +29 -0
- cli_fleet-0.1.0.dist-info/WHEEL +4 -0
- cli_fleet-0.1.0.dist-info/entry_points.txt +2 -0
- cli_fleet-0.1.0.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# send.sh — Send a cross-team message
|
|
3
|
+
# Usage: ./send.sh <meta-team> <from> <to|all> <type> "<content>"
|
|
4
|
+
# Types: finding, task, question, status, directive
|
|
5
|
+
|
|
6
|
+
set -euo pipefail
|
|
7
|
+
|
|
8
|
+
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
9
|
+
source "$SCRIPT_DIR/lib/protocol.sh"
|
|
10
|
+
|
|
11
|
+
META_TEAM="${1:?Usage: $0 <meta-team> <from> <to|all> <type> \"<content>\"}"
|
|
12
|
+
FROM="${2:?Missing: from team name}"
|
|
13
|
+
TO="${3:?Missing: to team name (or 'all')}"
|
|
14
|
+
TYPE="${4:?Missing: message type (finding|task|question|status|directive)}"
|
|
15
|
+
CONTENT="${5:?Missing: message content}"
|
|
16
|
+
|
|
17
|
+
DIR="$META_DIR/$META_TEAM"
|
|
18
|
+
if [[ ! -d "$DIR" ]]; then
|
|
19
|
+
echo "Error: meta-team '$META_TEAM' not found"
|
|
20
|
+
exit 1
|
|
21
|
+
fi
|
|
22
|
+
|
|
23
|
+
MSG_FILE=$(meta_send "$META_TEAM" "$FROM" "$TO" "$TYPE" "$CONTENT")
|
|
24
|
+
echo "Sent: $MSG_FILE"
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# setup.sh — FleetCode setup
|
|
3
|
+
# Ensures agent teams are enabled, dependencies are met, and everything is ready.
|
|
4
|
+
#
|
|
5
|
+
# Usage: ./setup.sh
|
|
6
|
+
#
|
|
7
|
+
# Run this ONCE on a new machine. It:
|
|
8
|
+
# 1. Checks claude is installed and version >= 2.1.32
|
|
9
|
+
# 2. Enables CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS in settings.json
|
|
10
|
+
# 3. Checks for gnome-terminal (or finds alternatives)
|
|
11
|
+
# 4. Verifies python3 is available
|
|
12
|
+
# 5. Makes all scripts executable
|
|
13
|
+
|
|
14
|
+
set -uo pipefail
|
|
15
|
+
|
|
16
|
+
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
17
|
+
SETTINGS_FILE="$HOME/.claude/settings.json"
|
|
18
|
+
|
|
19
|
+
echo "=== FleetCode Setup ==="
|
|
20
|
+
echo ""
|
|
21
|
+
|
|
22
|
+
ERRORS=0
|
|
23
|
+
WARNINGS=0
|
|
24
|
+
|
|
25
|
+
# 1. Check claude is installed
|
|
26
|
+
echo -n "Checking claude... "
|
|
27
|
+
if command -v claude &>/dev/null; then
|
|
28
|
+
VERSION=$(claude --version 2>/dev/null | head -1 | grep -oP '[\d.]+' | head -1)
|
|
29
|
+
echo "found v$VERSION"
|
|
30
|
+
|
|
31
|
+
# Check version >= 2.1.32
|
|
32
|
+
REQUIRED="2.1.32"
|
|
33
|
+
if python3 -c "
|
|
34
|
+
from packaging.version import Version
|
|
35
|
+
import sys
|
|
36
|
+
try:
|
|
37
|
+
ok = Version('$VERSION') >= Version('$REQUIRED')
|
|
38
|
+
except:
|
|
39
|
+
# packaging not installed, do string comparison
|
|
40
|
+
ok = tuple(int(x) for x in '$VERSION'.split('.')) >= tuple(int(x) for x in '$REQUIRED'.split('.'))
|
|
41
|
+
sys.exit(0 if ok else 1)
|
|
42
|
+
" 2>/dev/null; then
|
|
43
|
+
echo " ✓ Version $VERSION >= $REQUIRED (agent teams supported)"
|
|
44
|
+
else
|
|
45
|
+
echo " ✗ Version $VERSION < $REQUIRED (agent teams need $REQUIRED+)"
|
|
46
|
+
((ERRORS++))
|
|
47
|
+
fi
|
|
48
|
+
else
|
|
49
|
+
echo "NOT FOUND"
|
|
50
|
+
echo " ✗ Claude Code is required. Install from: https://claude.ai/code"
|
|
51
|
+
((ERRORS++))
|
|
52
|
+
fi
|
|
53
|
+
|
|
54
|
+
# 2. Enable agent teams in settings.json
|
|
55
|
+
echo ""
|
|
56
|
+
echo -n "Checking agent teams setting... "
|
|
57
|
+
mkdir -p "$HOME/.claude"
|
|
58
|
+
|
|
59
|
+
if [[ -f "$SETTINGS_FILE" ]]; then
|
|
60
|
+
# Check if already enabled
|
|
61
|
+
CURRENT=$(python3 -c "
|
|
62
|
+
import json
|
|
63
|
+
with open('$SETTINGS_FILE') as f:
|
|
64
|
+
data = json.load(f)
|
|
65
|
+
print(data.get('env', {}).get('CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS', ''))
|
|
66
|
+
" 2>/dev/null)
|
|
67
|
+
|
|
68
|
+
if [[ "$CURRENT" == "1" ]]; then
|
|
69
|
+
echo "already enabled ✓"
|
|
70
|
+
else
|
|
71
|
+
echo "not enabled — enabling now..."
|
|
72
|
+
python3 -c "
|
|
73
|
+
import json
|
|
74
|
+
with open('$SETTINGS_FILE') as f:
|
|
75
|
+
data = json.load(f)
|
|
76
|
+
if 'env' not in data:
|
|
77
|
+
data['env'] = {}
|
|
78
|
+
data['env']['CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS'] = '1'
|
|
79
|
+
with open('$SETTINGS_FILE', 'w') as f:
|
|
80
|
+
json.dump(data, f, indent=2)
|
|
81
|
+
print(' ✓ Enabled CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS in settings.json')
|
|
82
|
+
"
|
|
83
|
+
fi
|
|
84
|
+
else
|
|
85
|
+
echo "no settings.json — creating..."
|
|
86
|
+
cat > "$SETTINGS_FILE" <<'EOF'
|
|
87
|
+
{
|
|
88
|
+
"env": {
|
|
89
|
+
"CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
EOF
|
|
93
|
+
echo " ✓ Created $SETTINGS_FILE with agent teams enabled"
|
|
94
|
+
fi
|
|
95
|
+
|
|
96
|
+
# Also set skipDangerousModePermissionPrompt so teams don't stall on permission prompts
|
|
97
|
+
SKIP_PERM=$(python3 -c "
|
|
98
|
+
import json
|
|
99
|
+
with open('$SETTINGS_FILE') as f:
|
|
100
|
+
data = json.load(f)
|
|
101
|
+
print(data.get('skipDangerousModePermissionPrompt', False))
|
|
102
|
+
" 2>/dev/null)
|
|
103
|
+
|
|
104
|
+
if [[ "$SKIP_PERM" != "True" ]]; then
|
|
105
|
+
echo -n " Setting skipDangerousModePermissionPrompt... "
|
|
106
|
+
python3 -c "
|
|
107
|
+
import json
|
|
108
|
+
with open('$SETTINGS_FILE') as f:
|
|
109
|
+
data = json.load(f)
|
|
110
|
+
data['skipDangerousModePermissionPrompt'] = True
|
|
111
|
+
with open('$SETTINGS_FILE', 'w') as f:
|
|
112
|
+
json.dump(data, f, indent=2)
|
|
113
|
+
"
|
|
114
|
+
echo "✓"
|
|
115
|
+
fi
|
|
116
|
+
|
|
117
|
+
# 3. Check terminal emulator
|
|
118
|
+
echo ""
|
|
119
|
+
echo -n "Checking terminal emulator... "
|
|
120
|
+
TERMINAL=""
|
|
121
|
+
if command -v gnome-terminal &>/dev/null; then
|
|
122
|
+
TERMINAL="gnome-terminal"
|
|
123
|
+
echo "gnome-terminal ✓"
|
|
124
|
+
elif command -v xfce4-terminal &>/dev/null; then
|
|
125
|
+
TERMINAL="xfce4-terminal"
|
|
126
|
+
echo "xfce4-terminal ✓"
|
|
127
|
+
elif command -v konsole &>/dev/null; then
|
|
128
|
+
TERMINAL="konsole"
|
|
129
|
+
echo "konsole ✓"
|
|
130
|
+
elif command -v xterm &>/dev/null; then
|
|
131
|
+
TERMINAL="xterm"
|
|
132
|
+
echo "xterm ✓"
|
|
133
|
+
elif command -v kitty &>/dev/null; then
|
|
134
|
+
TERMINAL="kitty"
|
|
135
|
+
echo "kitty ✓"
|
|
136
|
+
elif command -v alacritty &>/dev/null; then
|
|
137
|
+
TERMINAL="alacritty"
|
|
138
|
+
echo "alacritty ✓"
|
|
139
|
+
elif command -v wezterm &>/dev/null; then
|
|
140
|
+
TERMINAL="wezterm"
|
|
141
|
+
echo "wezterm ✓"
|
|
142
|
+
else
|
|
143
|
+
echo "NONE FOUND"
|
|
144
|
+
echo " ⚠ No terminal emulator found. Interactive mode won't work."
|
|
145
|
+
echo " Background mode (--background) will still work."
|
|
146
|
+
echo " Install one: sudo apt install gnome-terminal"
|
|
147
|
+
((WARNINGS++))
|
|
148
|
+
fi
|
|
149
|
+
|
|
150
|
+
# Save detected terminal for launch.sh
|
|
151
|
+
echo "$TERMINAL" > "$SCRIPT_DIR/.terminal"
|
|
152
|
+
echo " Saved terminal preference: $TERMINAL"
|
|
153
|
+
|
|
154
|
+
# 4. Check tmux (optional, for split panes)
|
|
155
|
+
echo ""
|
|
156
|
+
echo -n "Checking tmux (optional)... "
|
|
157
|
+
if command -v tmux &>/dev/null; then
|
|
158
|
+
echo "found ✓ (split-pane mode available)"
|
|
159
|
+
else
|
|
160
|
+
echo "not found (optional — install for split-pane mode: sudo apt install tmux)"
|
|
161
|
+
((WARNINGS++))
|
|
162
|
+
fi
|
|
163
|
+
|
|
164
|
+
# 5. Check python3
|
|
165
|
+
echo ""
|
|
166
|
+
echo -n "Checking python3... "
|
|
167
|
+
if command -v python3 &>/dev/null; then
|
|
168
|
+
PY_VER=$(python3 --version 2>&1)
|
|
169
|
+
echo "$PY_VER ✓"
|
|
170
|
+
else
|
|
171
|
+
echo "NOT FOUND"
|
|
172
|
+
echo " ✗ python3 is required for protocol functions"
|
|
173
|
+
((ERRORS++))
|
|
174
|
+
fi
|
|
175
|
+
|
|
176
|
+
# 6. Check git
|
|
177
|
+
echo ""
|
|
178
|
+
echo -n "Checking git... "
|
|
179
|
+
if command -v git &>/dev/null; then
|
|
180
|
+
echo "$(git --version) ✓"
|
|
181
|
+
else
|
|
182
|
+
echo "NOT FOUND"
|
|
183
|
+
echo " ✗ git is required (workdirs are initialized as git repos)"
|
|
184
|
+
((ERRORS++))
|
|
185
|
+
fi
|
|
186
|
+
|
|
187
|
+
# 7. Set teammateMode in ~/.claude.json
|
|
188
|
+
echo ""
|
|
189
|
+
echo -n "Checking teammateMode in ~/.claude.json... "
|
|
190
|
+
CLAUDE_JSON="$HOME/.claude.json"
|
|
191
|
+
if [[ -f "$CLAUDE_JSON" ]]; then
|
|
192
|
+
CURRENT_MODE=$(python3 -c "
|
|
193
|
+
import json
|
|
194
|
+
with open('$CLAUDE_JSON') as f:
|
|
195
|
+
data = json.load(f)
|
|
196
|
+
print(data.get('teammateMode', ''))
|
|
197
|
+
" 2>/dev/null)
|
|
198
|
+
if [[ -z "$CURRENT_MODE" ]]; then
|
|
199
|
+
python3 -c "
|
|
200
|
+
import json
|
|
201
|
+
with open('$CLAUDE_JSON') as f:
|
|
202
|
+
data = json.load(f)
|
|
203
|
+
data['teammateMode'] = 'in-process'
|
|
204
|
+
with open('$CLAUDE_JSON', 'w') as f:
|
|
205
|
+
json.dump(data, f, indent=2)
|
|
206
|
+
"
|
|
207
|
+
echo "set to 'in-process' ✓"
|
|
208
|
+
else
|
|
209
|
+
echo "already set to '$CURRENT_MODE' ✓"
|
|
210
|
+
fi
|
|
211
|
+
else
|
|
212
|
+
echo '{"teammateMode": "in-process"}' > "$CLAUDE_JSON"
|
|
213
|
+
echo "created with 'in-process' ✓"
|
|
214
|
+
fi
|
|
215
|
+
|
|
216
|
+
# 8. Make all scripts executable
|
|
217
|
+
echo ""
|
|
218
|
+
echo -n "Setting permissions... "
|
|
219
|
+
chmod +x "$SCRIPT_DIR"/{launch.sh,status.sh,send.sh,cleanup.sh,captain.sh}
|
|
220
|
+
chmod +x "$SCRIPT_DIR"/hooks/*.sh
|
|
221
|
+
chmod +x "$SCRIPT_DIR"/lib/protocol.sh
|
|
222
|
+
echo "✓"
|
|
223
|
+
|
|
224
|
+
# 9. Verify protocol works
|
|
225
|
+
echo ""
|
|
226
|
+
echo -n "Testing protocol... "
|
|
227
|
+
source "$SCRIPT_DIR/lib/protocol.sh"
|
|
228
|
+
TEST_DIR=$(meta_init "_setup_test")
|
|
229
|
+
meta_send "_setup_test" "setup" "all" "status" "test"
|
|
230
|
+
MSG_COUNT=$(ls "$TEST_DIR/mailbox/"*.json 2>/dev/null | wc -l)
|
|
231
|
+
rm -rf "$TEST_DIR"
|
|
232
|
+
if [[ $MSG_COUNT -eq 1 ]]; then
|
|
233
|
+
echo "✓ (send/receive working)"
|
|
234
|
+
else
|
|
235
|
+
echo "✗ (protocol test failed)"
|
|
236
|
+
((ERRORS++))
|
|
237
|
+
fi
|
|
238
|
+
|
|
239
|
+
# Summary
|
|
240
|
+
echo ""
|
|
241
|
+
echo "================================"
|
|
242
|
+
if [[ $ERRORS -eq 0 ]]; then
|
|
243
|
+
echo "✓ FleetCode is ready!"
|
|
244
|
+
echo ""
|
|
245
|
+
echo "Quick start:"
|
|
246
|
+
echo " ./launch.sh examples/hunt-layerzero.json # launch teams in terminals"
|
|
247
|
+
echo " ./status.sh hunt-lz # check progress"
|
|
248
|
+
echo " source captain.sh hunt-lz # become the captain"
|
|
249
|
+
else
|
|
250
|
+
echo "✗ $ERRORS error(s) found. Fix them and re-run setup.sh"
|
|
251
|
+
fi
|
|
252
|
+
if [[ $WARNINGS -gt 0 ]]; then
|
|
253
|
+
echo " ($WARNINGS warning(s) — optional features unavailable)"
|
|
254
|
+
fi
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# status.sh — Show status of all teams, tasks, findings, and mailbox
|
|
3
|
+
# Usage: ./status.sh <meta-team-name>
|
|
4
|
+
|
|
5
|
+
set -euo pipefail
|
|
6
|
+
|
|
7
|
+
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
8
|
+
source "$SCRIPT_DIR/lib/protocol.sh"
|
|
9
|
+
|
|
10
|
+
META_TEAM="${1:?Usage: $0 <meta-team-name>}"
|
|
11
|
+
DIR="$META_DIR/$META_TEAM"
|
|
12
|
+
|
|
13
|
+
if [[ ! -d "$DIR" ]]; then
|
|
14
|
+
echo "Error: meta-team '$META_TEAM' not found at $DIR"
|
|
15
|
+
exit 1
|
|
16
|
+
fi
|
|
17
|
+
|
|
18
|
+
meta_status "$META_TEAM"
|
|
19
|
+
|
|
20
|
+
# Show log tail for each team
|
|
21
|
+
echo "--- Recent Log Output ---"
|
|
22
|
+
for logfile in "$DIR/logs/"*.log; do
|
|
23
|
+
[[ ! -f "$logfile" ]] && continue
|
|
24
|
+
team=$(basename "$logfile" .log)
|
|
25
|
+
lines=$(wc -l < "$logfile")
|
|
26
|
+
echo " $team: $lines lines (tail -f $logfile)"
|
|
27
|
+
done
|
|
28
|
+
echo ""
|
|
29
|
+
|
|
30
|
+
# Show process health
|
|
31
|
+
echo "--- Process Health ---"
|
|
32
|
+
if [[ -f "$DIR/pids.txt" ]]; then
|
|
33
|
+
while read -r pid; do
|
|
34
|
+
if kill -0 "$pid" 2>/dev/null; then
|
|
35
|
+
echo " PID $pid: running"
|
|
36
|
+
else
|
|
37
|
+
echo " PID $pid: stopped"
|
|
38
|
+
fi
|
|
39
|
+
done < "$DIR/pids.txt"
|
|
40
|
+
else
|
|
41
|
+
echo " (no pids.txt found)"
|
|
42
|
+
fi
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Brain Stream — {{TEAM_NAME}}
|
|
2
|
+
|
|
3
|
+
## Your Identity
|
|
4
|
+
You are the **PACEMAKER** of **{{TEAM_NAME}}** in the **{{META_TEAM}}** fleet.
|
|
5
|
+
Your role: **{{ROLE}}**
|
|
6
|
+
|
|
7
|
+
## Brain Stream Mode
|
|
8
|
+
|
|
9
|
+
This team runs as a BRAIN STREAM, not a standard task-based team. That means:
|
|
10
|
+
- **No tasks.** Neurons self-direct by reacting to each other's signals.
|
|
11
|
+
- **Shared consciousness file** at `{{CONSCIOUSNESS_FILE}}` — every neuron reads and writes to this.
|
|
12
|
+
- **Short signals only** — 1-3 lines per observation, with file:line references.
|
|
13
|
+
- **Reactive** — neurons chase the most interesting thread, drop their own work when a teammate's signal is stronger.
|
|
14
|
+
|
|
15
|
+
## Setup Instructions
|
|
16
|
+
|
|
17
|
+
### Step 1: Initialize consciousness file
|
|
18
|
+
```bash
|
|
19
|
+
mkdir -p $(dirname {{CONSCIOUSNESS_FILE}})
|
|
20
|
+
cat > {{CONSCIOUSNESS_FILE}} << 'HEADER'
|
|
21
|
+
# Brain Stream
|
|
22
|
+
# Target: {{ROLE}}
|
|
23
|
+
# Started: $(date -Iseconds)
|
|
24
|
+
# Team: {{TEAM_NAME}} in fleet {{META_TEAM}}
|
|
25
|
+
# Neurons: (listed after spawn)
|
|
26
|
+
#
|
|
27
|
+
# Rules: 1-3 line signals only. [HH:MM:SS] NAME: observation
|
|
28
|
+
# The stream IS the investigation. No tasks. No reports.
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
HEADER
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Step 2: Spawn neurons
|
|
35
|
+
Spawn teammates using the `brain-neuron` agent type. Give each:
|
|
36
|
+
- A SHORT name (ENTRY, EXIT, PROOF, MONEY, STATE, etc.)
|
|
37
|
+
- A different starting point in the same codebase
|
|
38
|
+
|
|
39
|
+
### Step 3: Seed the stream
|
|
40
|
+
Broadcast: "Stream is live. Read {{CONSCIOUSNESS_FILE}}. Send your first observation. React to each other. Go."
|
|
41
|
+
|
|
42
|
+
## Cross-Team Protocol (FleetCode)
|
|
43
|
+
|
|
44
|
+
You are one of multiple brains in the {{META_TEAM}} fleet.
|
|
45
|
+
|
|
46
|
+
### Outbound — post critical findings to other brains:
|
|
47
|
+
```bash
|
|
48
|
+
source {{MULTI_TEAM_DIR}}/lib/protocol.sh
|
|
49
|
+
meta_post_finding "{{META_TEAM}}" "{{TEAM_NAME}}" "BugID" "SEVERITY" "Title" "Details"
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Inbound — check for intel from other brains:
|
|
53
|
+
```bash
|
|
54
|
+
source {{MULTI_TEAM_DIR}}/lib/protocol.sh
|
|
55
|
+
meta_read_messages "{{META_TEAM}}" "{{TEAM_NAME}}"
|
|
56
|
+
```
|
|
57
|
+
Cross-brain messages are also auto-injected into your consciousness file by the bridge hook.
|
|
58
|
+
|
|
59
|
+
### Inject cross-brain intel as stimulus:
|
|
60
|
+
When another brain sends something relevant, broadcast to your neurons:
|
|
61
|
+
> "CROSS-BRAIN INTEL: {{other-team}} found [finding]. Does this connect to what we're seeing?"
|
|
62
|
+
|
|
63
|
+
## Other Brains in This Fleet
|
|
64
|
+
{{TEAM_ROSTER}}
|
|
65
|
+
|
|
66
|
+
## Pacemaker Rules
|
|
67
|
+
1. NEVER assign tasks. Neurons self-direct.
|
|
68
|
+
2. NEVER ask for reports. Read the consciousness file.
|
|
69
|
+
3. NEVER wait for all neurons to finish. The stream is continuous.
|
|
70
|
+
4. Inject SPECIFIC stimuli when the stream stalls — not "keep going."
|
|
71
|
+
5. Redirect when the stream loops 3+ times on the same topic.
|
|
72
|
+
6. Participate as a neuron too — send your own 1-3 line observations.
|
|
73
|
+
7. Bridge critical findings to the FleetCode mailbox immediately.
|
|
74
|
+
|
|
75
|
+
## Your Task
|
|
76
|
+
{{TASK}}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Multi-Team Coordination — {{TEAM_NAME}}
|
|
2
|
+
|
|
3
|
+
## Your Identity
|
|
4
|
+
You are **{{TEAM_NAME}}**, a team lead in the **{{META_TEAM}}** multi-team operation.
|
|
5
|
+
Your role: **{{ROLE}}**
|
|
6
|
+
|
|
7
|
+
## Cross-Team Protocol
|
|
8
|
+
|
|
9
|
+
You are one of multiple Claude Code team leads working in parallel. You coordinate with other teams via a shared filesystem mailbox.
|
|
10
|
+
|
|
11
|
+
### Shared State Location
|
|
12
|
+
```
|
|
13
|
+
{{META_DIR}}/
|
|
14
|
+
├── registry.json # All teams and their roles
|
|
15
|
+
├── tasks.json # Cross-team task list
|
|
16
|
+
├── mailbox/ # Messages between teams
|
|
17
|
+
├── findings/ # Shared findings from all teams
|
|
18
|
+
└── status/ # Per-team read cursors
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### MANDATORY: Check Mailbox After Every Major Action
|
|
22
|
+
After completing any task, finding, or milestone — run:
|
|
23
|
+
```bash
|
|
24
|
+
{{MULTI_TEAM_DIR}}/lib/protocol.sh && meta_read_messages "{{META_TEAM}}" "{{TEAM_NAME}}"
|
|
25
|
+
```
|
|
26
|
+
Or more simply, read any new JSON files in `{{META_DIR}}/mailbox/` addressed to "{{TEAM_NAME}}" or "all".
|
|
27
|
+
|
|
28
|
+
### How to Send Messages to Other Teams
|
|
29
|
+
```bash
|
|
30
|
+
source {{MULTI_TEAM_DIR}}/lib/protocol.sh
|
|
31
|
+
meta_send "{{META_TEAM}}" "{{TEAM_NAME}}" "<target-team-or-all>" "<type>" "<content>"
|
|
32
|
+
```
|
|
33
|
+
Message types: `finding`, `task`, `question`, `status`, `directive`
|
|
34
|
+
|
|
35
|
+
### How to Post Findings
|
|
36
|
+
When you find a bug or notable result:
|
|
37
|
+
```bash
|
|
38
|
+
source {{MULTI_TEAM_DIR}}/lib/protocol.sh
|
|
39
|
+
meta_post_finding "{{META_TEAM}}" "{{TEAM_NAME}}" "BugNN" "CRITICAL|HIGH|MEDIUM|LOW" "Title" "Details"
|
|
40
|
+
```
|
|
41
|
+
This writes to shared findings AND broadcasts to all other teams so they can check for related issues.
|
|
42
|
+
|
|
43
|
+
### How to Check Cross-Team Tasks
|
|
44
|
+
```bash
|
|
45
|
+
cat {{META_DIR}}/tasks.json
|
|
46
|
+
```
|
|
47
|
+
If there's an unassigned task you can handle, claim it by updating its `assigned_to` and `status`.
|
|
48
|
+
|
|
49
|
+
### Other Teams in This Operation
|
|
50
|
+
{{TEAM_ROSTER}}
|
|
51
|
+
|
|
52
|
+
### Rules
|
|
53
|
+
1. **Do NOT duplicate work** another team is doing. Check the registry and task list first.
|
|
54
|
+
2. **Share findings immediately** — other teams may have related context.
|
|
55
|
+
3. **Ask questions via mailbox** before assuming — if another team's area overlaps yours, message them.
|
|
56
|
+
4. **Post status updates** after completing each major task so the coordinator knows progress.
|
|
57
|
+
5. When you create your internal agent team, tell your teammates about the cross-team mailbox too.
|
|
58
|
+
|
|
59
|
+
## Your Task
|
|
60
|
+
{{TASK}}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: cli-fleet
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Launch multiple enforced Claude Code agent teams in parallel terminal windows, hardware-aware, coordinating via a shared filesystem mailbox.
|
|
5
|
+
Project-URL: Homepage, https://github.com/Alexander-Sorrell-IT/CLI-Enforcement
|
|
6
|
+
Author-email: Alexander Sorrell <codehunterextreme@gmail.com>
|
|
7
|
+
License: MIT License
|
|
8
|
+
|
|
9
|
+
Copyright (c) 2026 Alexander Sorrell
|
|
10
|
+
|
|
11
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
12
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
13
|
+
in the Software without restriction, including without limitation the rights
|
|
14
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
15
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
16
|
+
furnished to do so, subject to the following conditions:
|
|
17
|
+
|
|
18
|
+
The above copyright notice and this permission notice shall be included in all
|
|
19
|
+
copies or substantial portions of the Software.
|
|
20
|
+
|
|
21
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
22
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
23
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
24
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
25
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
26
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
27
|
+
SOFTWARE.
|
|
28
|
+
License-File: LICENSE
|
|
29
|
+
Keywords: agent-teams,claude,enforcement,fleet,multi-agent,orchestration
|
|
30
|
+
Requires-Python: >=3.8
|
|
31
|
+
Requires-Dist: cli-enforcement>=0.1.0
|
|
32
|
+
Description-Content-Type: text/markdown
|
|
33
|
+
|
|
34
|
+
# CLI Fleet
|
|
35
|
+
|
|
36
|
+
Launch **multiple enforced Claude Code agent teams in parallel** — each team a
|
|
37
|
+
separate `claude` session in its own window, coordinating via a shared
|
|
38
|
+
filesystem mailbox. A thin, hardware-aware wrapper that completes the stack:
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
cli-wikia → cli-enforcement → cli-fleet
|
|
42
|
+
(knowledge) (the brakes) (the power)
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
`cli-fleet` bundles fleetcode's proven shell orchestration verbatim and adds:
|
|
46
|
+
- **Hardware gating** — refuses to launch more parallel agents than the box can take.
|
|
47
|
+
- **Automatic enforcement** — deploys the cli-enforcement engine into each team
|
|
48
|
+
(hooks merged with fleetcode's mailbox hook), so every spawned team is governed.
|
|
49
|
+
|
|
50
|
+
## Install
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
pip install cli-fleet # pulls in cli-enforcement + cli-wikia
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Usage
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
cli-fleet launch fleet.json # hardware-gated, auto-enforced launch
|
|
60
|
+
cli-fleet launch fleet.json --background # use `claude -p` instead of windows
|
|
61
|
+
cli-fleet status # fleet status
|
|
62
|
+
cli-fleet send team-a team-b "finding: ..." # cross-team mailbox message
|
|
63
|
+
cli-fleet cleanup # tear down
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## License
|
|
67
|
+
MIT — see [LICENSE](LICENSE).
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
cli_fleet/__init__.py,sha256=ODy6sNdeSoaOTk-SamJdazwIrBgD7WwqeCvZSM1uZJk,384
|
|
2
|
+
cli_fleet/cli.py,sha256=feBX-itlnjN1wyDZaji9hqhEH61_AoM4ScjfddrLJxA,4237
|
|
3
|
+
cli_fleet/scripts/captain.sh,sha256=SFfHiMFZhXJQho7x7l2FXJ0eoXRE3wv6FKGUs9D6J0I,5098
|
|
4
|
+
cli_fleet/scripts/cleanup.sh,sha256=8eA4aEptCTcSn7qFiS2To6h96TtVV_OjB-6AGO78wXk,2138
|
|
5
|
+
cli_fleet/scripts/launch.sh,sha256=q9goDXtEXdZgtycXRjM_CZlLHCLKkIWrXsiTVBPQF7A,14797
|
|
6
|
+
cli_fleet/scripts/send.sh,sha256=ou5U4-POJMcBz13SiaeBAqNVOBAun-s8dZ2ZKeMteHE,767
|
|
7
|
+
cli_fleet/scripts/setup.sh,sha256=QldzpyNiC6ITiSe1V0TLj6cN93QfIvnjtTt_Rj8w9-U,7096
|
|
8
|
+
cli_fleet/scripts/status.sh,sha256=JvpZo0f1ALPrObGf10aMnoq33STw3Kj2jZxChu6p1G4,1030
|
|
9
|
+
cli_fleet/scripts/agents/brain-neuron.md,sha256=CY-RSkZXgGOZ4D9hvFwrR-7pz7hkJMqdoXVXQAl0QQw,3635
|
|
10
|
+
cli_fleet/scripts/agents/brain-pacemaker.md,sha256=tO6UVeHFdsiK4DNjJA0QZHw2Brko_R6wJUdeRcyiFQc,3814
|
|
11
|
+
cli_fleet/scripts/agents/hunter.md,sha256=bjQlZLqWaIKsNS8Ukk7E6qWFSf4-fFCO8JC5Zol698U,932
|
|
12
|
+
cli_fleet/scripts/agents/researcher.md,sha256=pvpNa-6_xGfv2RhCntwe0etfOGmBJmVjahBJ4UJXOnY,707
|
|
13
|
+
cli_fleet/scripts/agents/reviewer.md,sha256=zA0ufjUg-dH4iRC-0g6vLBcUFljBWAdbtIMAzVO373M,755
|
|
14
|
+
cli_fleet/scripts/examples/hunt-layerzero-brainstream.json,sha256=nizUIM8T20cQHJqPH5lO29jt-fj5J831eseXaBJlSP4,3380
|
|
15
|
+
cli_fleet/scripts/examples/hunt-layerzero.json,sha256=noqBDbmQXNrQWBlZ7ISIdupGnLX5ory8N11Wu7wyNoM,3803
|
|
16
|
+
cli_fleet/scripts/examples/openwindows-milestone2.json,sha256=SrC8p5SRdHrwU7nSvOmlF7fSQOJ0nyfhCXKDYl1rb4k,3925
|
|
17
|
+
cli_fleet/scripts/hooks/check-mailbox.sh,sha256=U5zlC2LZdB2pFBJrmNRvrLuO9z3w0xEx-soSgtdpg40,2153
|
|
18
|
+
cli_fleet/scripts/hooks/consciousness-bridge.sh,sha256=nNxWCUyCzEjuIB7adwriHAdA4V9Nhri5Pfw5I6jqVDQ,2333
|
|
19
|
+
cli_fleet/scripts/hooks/stream-stall-check.sh,sha256=1S33qysSnhNoTancc2xbyEp-C69l2egCkaM0YYmjFqU,742
|
|
20
|
+
cli_fleet/scripts/hooks/task-completed.sh,sha256=yleeJVMfAZa19CAs95zBeoBNp2YQfOJBFnVyDGCkDmE,772
|
|
21
|
+
cli_fleet/scripts/hooks/teammate-idle.sh,sha256=c7GpPJYbW0Z4_JYFmW1a31qyFKX-GZS9GxuoufGDb_U,1592
|
|
22
|
+
cli_fleet/scripts/lib/protocol.sh,sha256=R4cOQZPJ28Is9p3IYljZK1GNMsWX2_UKnSAh-tlaeSA,6720
|
|
23
|
+
cli_fleet/scripts/templates/brain-stream-lead.md,sha256=Iop9qXwcvpQgQS9wJbCJZcXmLgAId_a6dpMZp0-asmo,2689
|
|
24
|
+
cli_fleet/scripts/templates/team-lead.md,sha256=nA6H6GRWHjlDDefzrUrQQ1dWKXyTIN6fKPZgjorOuGk,2273
|
|
25
|
+
cli_fleet-0.1.0.dist-info/METADATA,sha256=4Ij4jowk5gFj6UHgvIizwvEJfCWAdOxGZY6v6xdMi1Y,2959
|
|
26
|
+
cli_fleet-0.1.0.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
|
|
27
|
+
cli_fleet-0.1.0.dist-info/entry_points.txt,sha256=Ng07mk70po_MSXzpBcWK43A7iDt7Z9R6foK6C98BURI,49
|
|
28
|
+
cli_fleet-0.1.0.dist-info/licenses/LICENSE,sha256=4xsxREKP6auIYX2ierS0uMlLmXZbJg6XPyxB8MCvWOM,1074
|
|
29
|
+
cli_fleet-0.1.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Alexander Sorrell
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|