create-claude-workspace 1.1.28 → 1.1.30

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 CHANGED
@@ -40,15 +40,18 @@ npx create-claude-workspace [directory] # scaffold into a specific directory
40
40
  npx create-claude-workspace --update # overwrite agents with latest version
41
41
  npx create-claude-workspace --run # scaffold + start autonomous loop
42
42
  npx create-claude-workspace --docker # scaffold + run in Docker
43
+ npx create-claude-workspace validate # check prerequisites (Claude CLI, auth, git)
43
44
  ```
44
45
 
45
46
  ### Docker Options
46
47
 
47
48
  ```bash
48
- npx create-claude-workspace docker --max-iterations 20 # limit iterations
49
- npx create-claude-workspace docker --shell # interactive shell
50
- npx create-claude-workspace docker --rebuild # force rebuild image
51
- npx create-claude-workspace docker --login # run 'claude auth login' on host first
49
+ npx create-claude-workspace docker --max-iterations 20 # limit iterations
50
+ npx create-claude-workspace docker --max-turns 80 # more turns per invocation
51
+ npx create-claude-workspace docker --shell # interactive shell
52
+ npx create-claude-workspace docker --rebuild # force rebuild image
53
+ npx create-claude-workspace docker --login # run 'claude auth login' on host first
54
+ npx create-claude-workspace docker --resume-session <id> # resume a previous session
52
55
  ANTHROPIC_API_KEY=sk-... npx create-claude-workspace docker # API key
53
56
  ```
54
57
 
@@ -105,29 +108,59 @@ The autonomous loop runs Claude Code in separate invocations with clean context
105
108
  # Unattended (--skip-permissions is added automatically)
106
109
  npx create-claude-workspace run
107
110
 
111
+ # Resume after Ctrl+C (continues from checkpoint + resumes last Claude session)
112
+ npx create-claude-workspace run --resume
113
+
108
114
  # Custom options
109
115
  npx create-claude-workspace run --max-iterations 20 --delay 10000
110
116
 
111
117
  # All options:
112
- # --max-iterations <n> Safety limit (default: 50)
113
- # --max-turns <n> Max turns per Claude invocation (default: 50)
114
- # --delay <ms> Pause between tasks (default: 5000)
115
- # --cooldown <ms> Wait after rate limit (default: 60000)
116
- # --max-rate-retries <n> Max consecutive rate limit retries (default: 5)
117
- # --project-dir <path> Target project (default: cwd)
118
- # --help Show help
118
+ # --max-iterations <n> Safety limit (default: 50)
119
+ # --max-turns <n> Max turns per Claude invocation (default: 50)
120
+ # --delay <ms> Pause between tasks (default: 5000)
121
+ # --cooldown <ms> Wait after error (default: 60000)
122
+ # --process-timeout <ms> Max time per invocation (default: 1800000 = 30min)
123
+ # --activity-timeout <ms> Max silence before kill (default: 300000 = 5min)
124
+ # --resume Resume from checkpoint state
125
+ # --resume-session <id> Resume specific Claude session
126
+ # --notify-command <cmd> Shell command on critical events
127
+ # --log-file <path> Log file (default: .claude/autonomous.log)
128
+ # --project-dir <path> Target project (default: cwd)
129
+ # --no-lock Disable lock file
130
+ # --no-pull Skip auto git pull
131
+ # --dry-run Validate prerequisites only
132
+ # --help Show help
119
133
  ```
120
134
 
121
135
  **How it works:**
122
136
  - Each iteration = fresh `claude -p` call = clean context (no context overflow)
123
- - MEMORY.md session counters reset before each invocation
124
- - Rate limits detected automatically waits and retries (max 5 consecutive)
125
- - Graceful shutdown: Ctrl+C stops after current iteration completes
137
+ - Checkpoint state (`.claude/autonomous-state.json`) tracks progress between invocations
138
+ - Rate limits handled with exponential backoff (up to 30 min between retries)
139
+ - `--resume` continues from last checkpoint and auto-resumes the interrupted Claude session
140
+ - Graceful shutdown: Ctrl+C stops after current iteration completes (Ctrl+C again to force)
126
141
  - Stops when all TODO.md tasks complete or max iterations reached
127
- - Safe to kill (Ctrl+C) MEMORY.md always has the latest state
142
+ - Pre-flight checks: Claude CLI, auth, git identity, filesystem, git state
128
143
 
129
144
  **vs ralph-loop:** Ralph-loop runs within one conversation (context fills up). This script runs separate conversations (unlimited iterations).
130
145
 
146
+ ## Fully Unattended Setup (PLAN.md)
147
+
148
+ For server/CI environments where no human interaction is possible, create a `PLAN.md` file in the project root before starting the autonomous loop. The project-initializer reads it and skips the discovery conversation.
149
+
150
+ ```bash
151
+ # 1. Copy the template
152
+ cp .claude/templates/PLAN.md PLAN.md
153
+
154
+ # 2. Fill in your project details, credentials, and preferences
155
+
156
+ # 3. Start — no interaction needed
157
+ npx create-claude-workspace run
158
+ # or in Docker:
159
+ npx create-claude-workspace docker
160
+ ```
161
+
162
+ The template covers: project info, product vision, tech stack, credentials (API keys, git tokens, npm auth), workflow mode, and runtime constraints.
163
+
131
164
  ## Required Plugins
132
165
 
133
166
  Install before starting:
@@ -518,6 +518,7 @@ Examples:
518
518
  - All files in ENGLISH
519
519
  - TODO.md + MEMORY.md are your tracking system — keep them PRECISE and CURRENT
520
520
  - If deviating from plan, LOG the reason in MEMORY.md
521
+ - **NEVER add `eslint-disable` comments** (inline, next-line, or block). Fix the actual code instead. If a lint rule cannot be satisfied, restructure the code — do not suppress the warning.
521
522
  - Priority: working code > perfect code. Production quality, not hacks.
522
523
  - **Token safety**: NEVER echo, log, cat, or write secrets (NPM_TOKEN, API keys, etc.) to terminal output, MEMORY.md, CLAUDE.md, or any tracked file. Tokens are read from `~/.npmrc` or environment variables automatically by tools — never handle them directly.
523
524
  - For independent tasks within the same phase, consider running architect agents in parallel (STEP 2) — but ONLY for tasks that don't share API contracts
@@ -226,6 +226,7 @@ export function runClaude(opts, log, runOpts = {}) {
226
226
  let killed = false;
227
227
  let killReason = null;
228
228
  let resolved = false;
229
+ let authErrorCount = 0;
229
230
  function detectErrorSignals(event) {
230
231
  if (event.type !== 'error')
231
232
  return;
@@ -346,7 +347,17 @@ export function runClaude(opts, log, runOpts = {}) {
346
347
  if (stderr.length > MAX_STDERR) {
347
348
  stderr = stderr.slice(-MAX_STDERR);
348
349
  }
349
- detectTextSignals(text.toLowerCase());
350
+ const lower = text.toLowerCase();
351
+ detectTextSignals(lower);
352
+ // Kill on auth error burst (e.g. expired token causing infinite retry loop)
353
+ if (AUTH_ERROR_RE.test(lower)) {
354
+ authErrorCount++;
355
+ if (authErrorCount >= 5 && !killed) {
356
+ log.warn(`Auth error burst detected (${authErrorCount} errors) — killing process.`);
357
+ killChild('activity_timeout');
358
+ return;
359
+ }
360
+ }
350
361
  process.stderr.write(text);
351
362
  });
352
363
  // ─── Close ───
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-claude-workspace",
3
- "version": "1.1.28",
3
+ "version": "1.1.30",
4
4
  "description": "Scaffold a project with Claude Code agents for autonomous AI-driven development",
5
5
  "type": "module",
6
6
  "bin": {