create-claude-workspace 2.3.32 → 2.3.33
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 +24 -7
- package/dist/index.js +7 -0
- package/dist/scheduler/index.mjs +25 -2
- package/dist/scheduler/loop.mjs +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -28,9 +28,11 @@ Answer the discovery questions (non-technical). Claude generates the full pipeli
|
|
|
28
28
|
### Start Autonomous Development
|
|
29
29
|
|
|
30
30
|
```bash
|
|
31
|
-
npx create-claude-workspace
|
|
32
|
-
npx create-claude-workspace
|
|
33
|
-
npx create-claude-workspace
|
|
31
|
+
npx create-claude-workspace run # start (1 agent)
|
|
32
|
+
npx create-claude-workspace run --concurrency 3 # 3 parallel agents
|
|
33
|
+
npx create-claude-workspace run -i # interactive mode (user input only)
|
|
34
|
+
npx create-claude-workspace run --task-mode local # force local task mode
|
|
35
|
+
npx create-claude-workspace run --resume # resume from saved state
|
|
34
36
|
```
|
|
35
37
|
|
|
36
38
|
Or interactively: `claude --agent orchestrator`, then `/ralph-loop:ralph-loop Continue autonomous development according to CLAUDE.md`
|
|
@@ -45,12 +47,27 @@ The scheduler replaces the single-orchestrator model with parallel agent executi
|
|
|
45
47
|
- **N agents in parallel** — independent tasks run concurrently in separate git worktrees
|
|
46
48
|
|
|
47
49
|
```bash
|
|
48
|
-
npx create-claude-workspace
|
|
49
|
-
npx create-claude-workspace
|
|
50
|
-
npx create-claude-workspace
|
|
51
|
-
npx create-claude-workspace
|
|
50
|
+
npx create-claude-workspace run # start (1 agent)
|
|
51
|
+
npx create-claude-workspace run --concurrency 3 # 3 parallel agents
|
|
52
|
+
npx create-claude-workspace run -i # interactive mode
|
|
53
|
+
npx create-claude-workspace run --task-mode local # force local mode
|
|
54
|
+
npx create-claude-workspace run --help # all options
|
|
52
55
|
```
|
|
53
56
|
|
|
57
|
+
#### Task modes
|
|
58
|
+
|
|
59
|
+
The scheduler supports three task modes (`--task-mode`):
|
|
60
|
+
|
|
61
|
+
| Mode | Source | Use case |
|
|
62
|
+
|------|--------|----------|
|
|
63
|
+
| **local** | `TODO.md` / `tasks.json` | Solo development, no issue tracker |
|
|
64
|
+
| **platform** | GitHub/GitLab issues | Team workflows with issue tracking |
|
|
65
|
+
| **interactive** | User TUI input only | Ad-hoc tasks, exploration, prototyping |
|
|
66
|
+
|
|
67
|
+
Auto-detected at startup: if the repo has a remote with `status::` labeled issues → `platform`, otherwise → `local`. Override with `--task-mode` flag or set `Task Platform` in CLAUDE.md via `project-initializer`.
|
|
68
|
+
|
|
69
|
+
The `--interactive` (`-i`) flag implies `--task-mode interactive`. Type task descriptions directly in the TUI — each becomes a task that goes through the full pipeline (plan → implement → test → review → commit). Pending tasks are shown in the status bar queue.
|
|
70
|
+
|
|
54
71
|
#### Communicate at runtime
|
|
55
72
|
|
|
56
73
|
Write to `.claude/scheduler/inbox.json` while the scheduler is running:
|
package/dist/index.js
CHANGED
|
@@ -70,6 +70,8 @@ ${C.b}Scheduler options:${C.n}
|
|
|
70
70
|
--concurrency <n> Parallel agents (default: 1)
|
|
71
71
|
--max-iterations <n> Max iterations (default: 50)
|
|
72
72
|
--max-turns <n> Max turns per agent invocation (default: 50)
|
|
73
|
+
--task-mode <mode> Task source: local, platform, or interactive
|
|
74
|
+
--interactive, -i Interactive mode — tasks from user input only
|
|
73
75
|
--resume Resume from saved state
|
|
74
76
|
--dry-run Validate prerequisites only
|
|
75
77
|
See 'npx create-claude-workspace run --help' for all options.
|
|
@@ -78,6 +80,8 @@ ${C.b}Examples:${C.n}
|
|
|
78
80
|
npx create-claude-workspace # scaffold in current directory
|
|
79
81
|
npx create-claude-workspace run # start scheduler
|
|
80
82
|
npx create-claude-workspace run --concurrency 3 # 3 parallel agents
|
|
83
|
+
npx create-claude-workspace run -i # interactive mode (user input only)
|
|
84
|
+
npx create-claude-workspace run --task-mode local # force local task mode
|
|
81
85
|
npx create-claude-workspace run --resume # resume from state
|
|
82
86
|
npx create-claude-workspace validate # check prerequisites
|
|
83
87
|
|
|
@@ -244,6 +248,9 @@ async function main() {
|
|
|
244
248
|
console.log(` ${C.d}# Multi-agent scheduler${C.n}`);
|
|
245
249
|
console.log(` npx create-claude-workspace run`);
|
|
246
250
|
console.log('');
|
|
251
|
+
console.log(` ${C.d}# Interactive mode (tasks from user input)${C.n}`);
|
|
252
|
+
console.log(` npx create-claude-workspace run -i`);
|
|
253
|
+
console.log('');
|
|
247
254
|
console.log(` ${C.d}# With parallel agents${C.n}`);
|
|
248
255
|
console.log(` npx create-claude-workspace run --concurrency 3`);
|
|
249
256
|
console.log('');
|
package/dist/scheduler/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// ─── Multi-agent scheduler entry point ───
|
|
3
3
|
// Replaces the single-orchestrator autonomous loop with parallel agent execution.
|
|
4
4
|
import { resolve } from 'node:path';
|
|
5
|
-
import { existsSync, mkdirSync } from 'node:fs';
|
|
5
|
+
import { existsSync, mkdirSync, readFileSync } from 'node:fs';
|
|
6
6
|
import { config as dotenvConfig } from '@dotenvx/dotenvx';
|
|
7
7
|
import { SCHEDULER_DEFAULTS } from './types.mjs';
|
|
8
8
|
import { detectCIPlatform, checkPlatformCLI, installPlatformCLI } from './git/ci-watcher.mjs';
|
|
@@ -147,10 +147,32 @@ export function parseSchedulerArgs(argv) {
|
|
|
147
147
|
}
|
|
148
148
|
return opts;
|
|
149
149
|
}
|
|
150
|
+
function readTaskPlatformFromClaudeMd(projectDir) {
|
|
151
|
+
for (const p of ['CLAUDE.md', '.claude/CLAUDE.md']) {
|
|
152
|
+
const fp = resolve(projectDir, p);
|
|
153
|
+
if (!existsSync(fp))
|
|
154
|
+
continue;
|
|
155
|
+
try {
|
|
156
|
+
const content = readFileSync(fp, 'utf-8');
|
|
157
|
+
const match = content.match(/^\s*-\s*\*\*Task Platform\*\*:\s*(\S+)/m);
|
|
158
|
+
if (match)
|
|
159
|
+
return match[1].toLowerCase();
|
|
160
|
+
}
|
|
161
|
+
catch { /* ignore */ }
|
|
162
|
+
}
|
|
163
|
+
return null;
|
|
164
|
+
}
|
|
150
165
|
function detectTaskMode(projectDir) {
|
|
166
|
+
// Respect explicit Task Platform setting from CLAUDE.md
|
|
167
|
+
const claudeMdPlatform = readTaskPlatformFromClaudeMd(projectDir);
|
|
168
|
+
if (claudeMdPlatform === 'local')
|
|
169
|
+
return 'local';
|
|
151
170
|
const platform = detectCIPlatform(projectDir);
|
|
152
171
|
if (platform === 'none')
|
|
153
172
|
return 'local';
|
|
173
|
+
// CLAUDE.md says github/gitlab → platform mode
|
|
174
|
+
if (claudeMdPlatform === 'github' || claudeMdPlatform === 'gitlab')
|
|
175
|
+
return 'platform';
|
|
154
176
|
try {
|
|
155
177
|
const issues = fetchOpenIssues(projectDir, platform);
|
|
156
178
|
if (issues.length === 0)
|
|
@@ -231,7 +253,7 @@ export async function runScheduler(opts) {
|
|
|
231
253
|
if (opts.interactive) {
|
|
232
254
|
tui.setInputHandler((text) => {
|
|
233
255
|
writeToInbox(opts.projectDir, [{ type: 'add-task', title: text }]);
|
|
234
|
-
tui.
|
|
256
|
+
tui.addPendingInput(text); // tracks in status bar queue + logs "Queued: text"
|
|
235
257
|
});
|
|
236
258
|
}
|
|
237
259
|
const logger = {
|
|
@@ -407,6 +429,7 @@ export async function runScheduler(opts) {
|
|
|
407
429
|
onMessage,
|
|
408
430
|
onSpawnStart,
|
|
409
431
|
onSpawnEnd,
|
|
432
|
+
onInboxTaskPicked: opts.interactive ? () => tui.consumePendingInput() : undefined,
|
|
410
433
|
});
|
|
411
434
|
if (!workDone) {
|
|
412
435
|
if (state.taskMode === 'interactive') {
|
package/dist/scheduler/loop.mjs
CHANGED
|
@@ -40,6 +40,7 @@ export async function runIteration(deps) {
|
|
|
40
40
|
const newTask = addTaskMessageToTask(addMsg, state.currentPhase, nextId);
|
|
41
41
|
inboxTasks.push(newTask);
|
|
42
42
|
logger.info(`[inbox] New task: ${newTask.title}`);
|
|
43
|
+
deps.onInboxTaskPicked?.(newTask.title);
|
|
43
44
|
appendEvent(projectDir, createEvent('task_started', { taskId: nextId, detail: `inbox: ${newTask.title}` }));
|
|
44
45
|
}
|
|
45
46
|
else if (msg.type === 'message') {
|