claude-overnight 1.3.0 → 1.4.0
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 +3 -1
- package/dist/swarm.js +22 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -70,7 +70,9 @@ An orchestrator agent reads all design documents and synthesizes concrete execut
|
|
|
70
70
|
|
|
71
71
|
### 3. Iterative execution
|
|
72
72
|
|
|
73
|
-
Tasks run in parallel (each agent in its own git worktree). After
|
|
73
|
+
Tasks run in parallel (each agent in its own git worktree). After completing its task, each agent automatically runs a **simplify pass** — reviewing its own `git diff` for code reuse opportunities, quality issues, and inefficiencies, then fixing them before the framework commits.
|
|
74
|
+
|
|
75
|
+
After each wave, steering assesses: "how good is this?" — not "what's missing?" It can:
|
|
74
76
|
|
|
75
77
|
- **Execute** more tasks to build features, fix bugs, polish UX
|
|
76
78
|
- **Reflect** by spinning up 1-2 review agents for deep quality/architecture audits
|
package/dist/swarm.js
CHANGED
|
@@ -4,6 +4,15 @@ import { join } from "path";
|
|
|
4
4
|
import { tmpdir } from "os";
|
|
5
5
|
import { query } from "@anthropic-ai/claude-agent-sdk";
|
|
6
6
|
import { NudgeError } from "./types.js";
|
|
7
|
+
const SIMPLIFY_PROMPT = `You just finished your task. Now review and simplify your changes.
|
|
8
|
+
|
|
9
|
+
Run \`git diff\` to see what you changed, then fix any issues:
|
|
10
|
+
|
|
11
|
+
1. **Reuse**: Search the codebase — did you write something that already exists? Use existing utilities, helpers, patterns instead.
|
|
12
|
+
2. **Quality**: Redundant state, copy-paste with slight variation, leaky abstractions, unnecessary wrappers/nesting, comments that narrate what the code does? Delete them.
|
|
13
|
+
3. **Efficiency**: Redundant computations, sequential operations that could be parallel, unnecessary existence checks before operations, unbounded data structures, missing cleanup?
|
|
14
|
+
|
|
15
|
+
Less code is better. Delete and simplify rather than add. Fix directly — no need to explain.`;
|
|
7
16
|
export class Swarm {
|
|
8
17
|
agents = [];
|
|
9
18
|
logs = [];
|
|
@@ -225,9 +234,10 @@ export class Swarm {
|
|
|
225
234
|
try {
|
|
226
235
|
const perm = this.config.permissionMode ?? "auto";
|
|
227
236
|
let resumeSessionId;
|
|
237
|
+
let resumePrompt = "Continue. Complete the task.";
|
|
228
238
|
const runOnce = async (isResume) => {
|
|
229
239
|
const agentPrompt = isResume
|
|
230
|
-
?
|
|
240
|
+
? resumePrompt
|
|
231
241
|
: this.config.useWorktrees
|
|
232
242
|
? `You are working in an isolated git worktree. Focus only on this task. Do NOT commit your changes — the framework handles that.\n\n${task.prompt}`
|
|
233
243
|
: task.prompt;
|
|
@@ -301,6 +311,17 @@ export class Swarm {
|
|
|
301
311
|
throw nudgeErr;
|
|
302
312
|
}
|
|
303
313
|
}
|
|
314
|
+
// Simplify pass: resume session with review prompt
|
|
315
|
+
if (resumeSessionId && agent.status === "running") {
|
|
316
|
+
try {
|
|
317
|
+
this.log(id, "Simplify pass");
|
|
318
|
+
resumePrompt = SIMPLIFY_PROMPT;
|
|
319
|
+
await runOnce(true);
|
|
320
|
+
}
|
|
321
|
+
catch {
|
|
322
|
+
this.log(id, "Simplify pass skipped");
|
|
323
|
+
}
|
|
324
|
+
}
|
|
304
325
|
if (agent.status === "running") {
|
|
305
326
|
agent.finishedAt = Date.now();
|
|
306
327
|
const duration = agent.finishedAt - (agent.startedAt || agent.finishedAt);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-overnight",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "Run 10, 100, or 1000 Claude agents overnight. Parallel autonomous AI coding with thinking waves, iterative quality steering, crash recovery, and rate limit handling. Built on the Claude Agent SDK.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|