tlc-claude-code 2.6.0 → 2.6.1
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.
|
@@ -113,24 +113,99 @@ After `resolveRouting` returns, immediately write `.tlc/.build-routing-active` w
|
|
|
113
113
|
|
|
114
114
|
Use this mode only when `models[0]` is **NOT** `claude`.
|
|
115
115
|
|
|
116
|
-
Claude
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
116
|
+
Claude is the **project manager**. Claude reads the plan, breaks tasks into small prompts, and dispatches each to the tlc-core orchestrator. Claude does NOT write code.
|
|
117
|
+
|
|
118
|
+
### Step O1: Read the Plan
|
|
119
|
+
|
|
120
|
+
Read `.planning/phases/{N}-PLAN.md`. Extract each task's goal, files, acceptance criteria, and test cases.
|
|
121
|
+
|
|
122
|
+
### Step O2: Check Orchestrator Health
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
curl -sf http://localhost:3100/health
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
If healthy, dispatch via orchestrator (Step O3). If unreachable, fall back to direct Codex dispatch via Bash (Step O3-fallback).
|
|
129
|
+
|
|
130
|
+
### Step O3: Dispatch Tasks to Orchestrator
|
|
131
|
+
|
|
132
|
+
For each independent task, dispatch via the orchestrator API:
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
curl -s -X POST http://localhost:3100/sessions \
|
|
136
|
+
-H 'Content-Type: application/json' \
|
|
137
|
+
-d '{
|
|
138
|
+
"project": "<project-name>",
|
|
139
|
+
"pool": "local-tmux",
|
|
140
|
+
"command": "<provider>",
|
|
141
|
+
"prompt": "<task prompt — one clear action, explicit file paths, under 500 words>"
|
|
142
|
+
}'
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
- `project`: the repo directory name under `/workspace/` (e.g., `Tools/TLC`)
|
|
146
|
+
- `command`: the provider from routing result (e.g., `codex`)
|
|
147
|
+
- `prompt`: small focused prompt for one task — include file paths, acceptance criteria, test command
|
|
148
|
+
|
|
149
|
+
**Save each returned session ID** to `.tlc/.active-sessions.json`:
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
node -e "
|
|
153
|
+
const fs = require('fs');
|
|
154
|
+
const path = '.tlc/.active-sessions.json';
|
|
155
|
+
const existing = fs.existsSync(path) ? JSON.parse(fs.readFileSync(path, 'utf8')) : [];
|
|
156
|
+
existing.push({ sessionId: '<id>', taskName: '<task>', startedAt: new Date().toISOString() });
|
|
157
|
+
fs.writeFileSync(path, JSON.stringify(existing, null, 2));
|
|
158
|
+
"
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### Step O3-fallback: Direct Dispatch (No Orchestrator)
|
|
162
|
+
|
|
163
|
+
If orchestrator is down, dispatch directly via tmux on the host:
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
tmux new-session -d -s <task-id> -c $(pwd)
|
|
167
|
+
tmux send-keys -t <task-id> "/opt/homebrew/bin/codex --full-auto '<prompt>'" Enter
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
### Step O4: Report and Free
|
|
171
|
+
|
|
172
|
+
After dispatching all tasks, report:
|
|
173
|
+
|
|
174
|
+
```
|
|
175
|
+
Dispatched N tasks to orchestrator:
|
|
176
|
+
ses_abc123 Task 1: Create schema codex running
|
|
177
|
+
ses_def456 Task 2: Add validation codex running
|
|
178
|
+
|
|
179
|
+
Run /tlc:status to check progress.
|
|
180
|
+
I'm free — what would you like to work on?
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
**STOP HERE.** Do not write code. Do not execute inline mode. Claude is the PM, not the coder.
|
|
184
|
+
|
|
185
|
+
### Step O5: Monitor (When User Asks)
|
|
186
|
+
|
|
187
|
+
When the user asks for status or agents complete, check:
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
# Check all sessions
|
|
191
|
+
curl -s http://localhost:3100/sessions | node -e "
|
|
192
|
+
const d=require('fs').readFileSync('/dev/stdin','utf8');
|
|
193
|
+
JSON.parse(d).forEach(s=>console.log(s.id, s.status, s.project));
|
|
194
|
+
"
|
|
195
|
+
|
|
196
|
+
# Check specific session output (inside container)
|
|
197
|
+
docker exec tlc-agent-runner tmux capture-pane -t <session_id> -p -S -20
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
Auto-approve any prompts found in tmux sessions:
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
docker exec tlc-agent-runner tmux send-keys -t <session_id> Enter
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### Step O6: Cleanup
|
|
207
|
+
|
|
208
|
+
When all tasks complete, remove `.tlc/.build-routing-active` and report results.
|
|
134
209
|
|
|
135
210
|
## INLINE MODE
|
|
136
211
|
|
|
@@ -44,12 +44,32 @@ else
|
|
|
44
44
|
fi
|
|
45
45
|
|
|
46
46
|
# --- tlc-core Orchestrator ---
|
|
47
|
+
# Kill switch: export TLC_CORE_AUTOSTART=false to disable auto-start
|
|
47
48
|
TLC_CORE_PORT="${TLC_CORE_PORT:-3100}"
|
|
48
|
-
if
|
|
49
|
+
if [ "${TLC_CORE_AUTOSTART}" = "false" ]; then
|
|
50
|
+
echo "tlc-core orchestrator: auto-start disabled (TLC_CORE_AUTOSTART=false)"
|
|
51
|
+
elif curl -sf --max-time 1 "http://localhost:${TLC_CORE_PORT}/health" > /dev/null 2>&1; then
|
|
49
52
|
SESSIONS=$(curl -sf --max-time 1 "http://localhost:${TLC_CORE_PORT}/sessions" 2>/dev/null | jq "length" 2>/dev/null || echo "0")
|
|
50
53
|
echo "tlc-core orchestrator: healthy (${SESSIONS} sessions)"
|
|
51
54
|
else
|
|
52
|
-
|
|
55
|
+
# Try to auto-start if tlc-core CLI is available
|
|
56
|
+
if command -v tlc-core >/dev/null 2>&1; then
|
|
57
|
+
echo "tlc-core orchestrator: not running — starting..."
|
|
58
|
+
tlc-core start > /dev/null 2>&1 &
|
|
59
|
+
# Wait up to 15s for health
|
|
60
|
+
for i in 1 2 3 4 5; do
|
|
61
|
+
sleep 3
|
|
62
|
+
if curl -sf --max-time 1 "http://localhost:${TLC_CORE_PORT}/health" > /dev/null 2>&1; then
|
|
63
|
+
echo "tlc-core orchestrator: started successfully"
|
|
64
|
+
break
|
|
65
|
+
fi
|
|
66
|
+
done
|
|
67
|
+
if ! curl -sf --max-time 1 "http://localhost:${TLC_CORE_PORT}/health" > /dev/null 2>&1; then
|
|
68
|
+
echo "tlc-core orchestrator: failed to start. Run 'tlc-core start' manually."
|
|
69
|
+
fi
|
|
70
|
+
else
|
|
71
|
+
echo "tlc-core orchestrator: not installed. Run: git clone git@github.com:TwentyTwoLabs22/tlc-core.git && cd cli && npm install && npm link"
|
|
72
|
+
fi
|
|
53
73
|
fi
|
|
54
74
|
|
|
55
75
|
# ─── Memory System Init ─────────────────────────────
|