@ai-hero/sandcastle 0.1.5 → 0.1.6
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.
|
@@ -167,45 +167,34 @@ for (let iteration = 1; iteration <= MAX_ITERATIONS; iteration++) {
|
|
|
167
167
|
continue;
|
|
168
168
|
}
|
|
169
169
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
//
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
// A markdown list of branch names, one per line.
|
|
199
|
-
BRANCHES: completedBranches.map((b) => `- ${b}`).join("\n"),
|
|
200
|
-
// A markdown list of issue numbers and titles, one per line.
|
|
201
|
-
ISSUES: completedIssues
|
|
202
|
-
.map((i) => `- #${i.number}: ${i.title}`)
|
|
203
|
-
.join("\n"),
|
|
204
|
-
},
|
|
205
|
-
});
|
|
206
|
-
|
|
207
|
-
console.log("\nBranches merged.");
|
|
208
|
-
}
|
|
170
|
+
// -------------------------------------------------------------------------
|
|
171
|
+
// Phase 3: Merge
|
|
172
|
+
//
|
|
173
|
+
// One sonnet agent merges all completed branches into the current branch,
|
|
174
|
+
// resolving any conflicts and running tests to confirm everything still works.
|
|
175
|
+
//
|
|
176
|
+
// The {{BRANCHES}} and {{ISSUES}} prompt arguments are lists that the agent
|
|
177
|
+
// uses to know which branches to merge and which issues to close.
|
|
178
|
+
// -------------------------------------------------------------------------
|
|
179
|
+
await sandcastle.run({
|
|
180
|
+
hooks,
|
|
181
|
+
copyToSandbox,
|
|
182
|
+
name: "merger",
|
|
183
|
+
maxIterations: 10,
|
|
184
|
+
// Sonnet is sufficient for merge conflict resolution.
|
|
185
|
+
model: "claude-sonnet-4-6",
|
|
186
|
+
promptFile: "./.sandcastle/merge-prompt.md",
|
|
187
|
+
promptArgs: {
|
|
188
|
+
// A markdown list of branch names, one per line.
|
|
189
|
+
BRANCHES: completedBranches.map((b) => `- ${b}`).join("\n"),
|
|
190
|
+
// A markdown list of issue numbers and titles, one per line.
|
|
191
|
+
ISSUES: completedIssues
|
|
192
|
+
.map((i) => `- #${i.number}: ${i.title}`)
|
|
193
|
+
.join("\n"),
|
|
194
|
+
},
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
console.log("\nBranches merged.");
|
|
209
198
|
}
|
|
210
199
|
|
|
211
200
|
console.log("\nAll done.");
|