super-ralph 0.1.0 โ 0.2.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/package.json +4 -1
- package/src/components/SuperRalph.tsx +29 -19
- package/src/mdx.d.ts +4 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "super-ralph",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Reusable Ralph workflow pattern - ticket-driven development with multi-agent review loops",
|
|
5
5
|
"author": "William Cory",
|
|
6
6
|
"license": "MIT",
|
|
@@ -36,6 +36,9 @@
|
|
|
36
36
|
"tdd",
|
|
37
37
|
"code-review"
|
|
38
38
|
],
|
|
39
|
+
"scripts": {
|
|
40
|
+
"typecheck": "tsc --noEmit"
|
|
41
|
+
},
|
|
39
42
|
"peerDependencies": {
|
|
40
43
|
"smithers-orchestrator": "*"
|
|
41
44
|
},
|
|
@@ -35,13 +35,13 @@ export type SuperRalphProps = {
|
|
|
35
35
|
maxConcurrency: number;
|
|
36
36
|
taskRetries?: number;
|
|
37
37
|
|
|
38
|
-
// Agents (grouped)
|
|
38
|
+
// Agents (grouped) - each can be a single agent or [agent, fallback]
|
|
39
39
|
agents: {
|
|
40
|
-
planning: any;
|
|
41
|
-
implementation: any;
|
|
42
|
-
testing: any;
|
|
43
|
-
reviewing: any;
|
|
44
|
-
reporting: any;
|
|
40
|
+
planning: any | [any, any];
|
|
41
|
+
implementation: any | [any, any];
|
|
42
|
+
testing: any | [any, any];
|
|
43
|
+
reviewing: any | [any, any];
|
|
44
|
+
reporting: any | [any, any];
|
|
45
45
|
};
|
|
46
46
|
|
|
47
47
|
// Configuration
|
|
@@ -80,6 +80,10 @@ export type SuperRalphProps = {
|
|
|
80
80
|
children?: ReactNode;
|
|
81
81
|
};
|
|
82
82
|
|
|
83
|
+
function normalizeAgent(agentOrArray: any | any[]): any | any[] {
|
|
84
|
+
return agentOrArray; // Just return as-is, Task handles arrays now
|
|
85
|
+
}
|
|
86
|
+
|
|
83
87
|
export function SuperRalph({
|
|
84
88
|
ctx,
|
|
85
89
|
focuses,
|
|
@@ -126,11 +130,17 @@ export function SuperRalph({
|
|
|
126
130
|
|
|
127
131
|
const { prefix = "๐", mainBranch = "main", emojiPrefixes = "โจ feat, ๐ fix, โป๏ธ refactor, ๐ docs, ๐งช test" } = commitConfig;
|
|
128
132
|
|
|
133
|
+
const planningAgent = normalizeAgent(agents.planning);
|
|
134
|
+
const implementationAgent = normalizeAgent(agents.implementation);
|
|
135
|
+
const testingAgent = normalizeAgent(agents.testing);
|
|
136
|
+
const reviewingAgent = normalizeAgent(agents.reviewing);
|
|
137
|
+
const reportingAgent = normalizeAgent(agents.reporting);
|
|
138
|
+
|
|
129
139
|
return (
|
|
130
140
|
<Ralph until={false} maxIterations={Infinity} onMaxReached="return-last">
|
|
131
141
|
<Parallel maxConcurrency={maxConcurrency}>
|
|
132
142
|
{!skipPhases.has("PROGRESS") && (customUpdateProgress || (
|
|
133
|
-
<Task id="update-progress" output={outputs.progress} agent={
|
|
143
|
+
<Task id="update-progress" output={outputs.progress} agent={reportingAgent} retries={taskRetries}>
|
|
134
144
|
<UpdateProgressPrompt
|
|
135
145
|
projectName={projectName}
|
|
136
146
|
progressFile={progressFile}
|
|
@@ -145,7 +155,7 @@ export function SuperRalph({
|
|
|
145
155
|
) : (
|
|
146
156
|
<Parallel maxConcurrency={maxConcurrency}>
|
|
147
157
|
{focuses.map(({ id, name }) => (
|
|
148
|
-
<Task key={id} id={`codebase-review:${id}`} output={outputs.category_review} agent={
|
|
158
|
+
<Task key={id} id={`codebase-review:${id}`} output={outputs.category_review} agent={reviewingAgent} retries={taskRetries}>
|
|
149
159
|
<CategoryReviewPrompt categoryId={id} categoryName={name} relevantDirs={focusDirs[id] ?? null} />
|
|
150
160
|
</Task>
|
|
151
161
|
))}
|
|
@@ -153,7 +163,7 @@ export function SuperRalph({
|
|
|
153
163
|
))}
|
|
154
164
|
|
|
155
165
|
{!skipPhases.has("DISCOVER") && (customDiscover || (
|
|
156
|
-
<Task id="discover" output={outputs.discover} agent={
|
|
166
|
+
<Task id="discover" output={outputs.discover} agent={planningAgent} retries={taskRetries}>
|
|
157
167
|
<DiscoverPrompt
|
|
158
168
|
projectName={projectName}
|
|
159
169
|
specsPath={specsPath}
|
|
@@ -171,7 +181,7 @@ export function SuperRalph({
|
|
|
171
181
|
{focuses.map(({ id, name }) => {
|
|
172
182
|
const suiteInfo = focusTestSuites[id] ?? { suites: [], setupHints: [], testDirs: [] };
|
|
173
183
|
return (
|
|
174
|
-
<Task key={id} id={`integration-test:${id}`} output={outputs.integration_test} agent={
|
|
184
|
+
<Task key={id} id={`integration-test:${id}`} output={outputs.integration_test} agent={testingAgent} retries={taskRetries}>
|
|
175
185
|
<IntegrationTestPrompt
|
|
176
186
|
categoryId={id}
|
|
177
187
|
categoryName={name}
|
|
@@ -196,7 +206,7 @@ export function SuperRalph({
|
|
|
196
206
|
<Worktree key={ticket.id} id={`wt-${ticket.id}`} path={`/tmp/workflow-wt-${ticket.id}`}>
|
|
197
207
|
<Sequence skipIf={ctx.outputMaybe(outputs.report, { nodeId: `${ticket.id}:report` })?.status === "complete"}>
|
|
198
208
|
{customResearch || (
|
|
199
|
-
<Task id={`${ticket.id}:research`} output={outputs.research} agent={
|
|
209
|
+
<Task id={`${ticket.id}:research`} output={outputs.research} agent={planningAgent} retries={taskRetries}>
|
|
200
210
|
<ResearchPrompt
|
|
201
211
|
ticketId={ticket.id}
|
|
202
212
|
ticketTitle={ticket.title}
|
|
@@ -211,7 +221,7 @@ export function SuperRalph({
|
|
|
211
221
|
)}
|
|
212
222
|
|
|
213
223
|
{customPlan || (
|
|
214
|
-
<Task id={`${ticket.id}:plan`} output={outputs.plan} agent={
|
|
224
|
+
<Task id={`${ticket.id}:plan`} output={outputs.plan} agent={planningAgent} retries={taskRetries}>
|
|
215
225
|
<PlanPrompt
|
|
216
226
|
ticketId={ticket.id}
|
|
217
227
|
ticketTitle={ticket.title}
|
|
@@ -257,7 +267,7 @@ export function SuperRalph({
|
|
|
257
267
|
return (
|
|
258
268
|
<>
|
|
259
269
|
{customImplement || (
|
|
260
|
-
<Task id={`${ticket.id}:implement`} output={outputs.implement} agent={
|
|
270
|
+
<Task id={`${ticket.id}:implement`} output={outputs.implement} agent={implementationAgent} retries={taskRetries}>
|
|
261
271
|
<ImplementPrompt
|
|
262
272
|
ticketId={ticket.id}
|
|
263
273
|
ticketTitle={ticket.title}
|
|
@@ -281,7 +291,7 @@ export function SuperRalph({
|
|
|
281
291
|
)}
|
|
282
292
|
|
|
283
293
|
{customTest || (
|
|
284
|
-
<Task id={`${ticket.id}:test`} output={outputs.test_results} agent={
|
|
294
|
+
<Task id={`${ticket.id}:test`} output={outputs.test_results} agent={testingAgent} retries={taskRetries}>
|
|
285
295
|
<TestPrompt
|
|
286
296
|
ticketId={ticket.id}
|
|
287
297
|
ticketTitle={ticket.title}
|
|
@@ -298,7 +308,7 @@ export function SuperRalph({
|
|
|
298
308
|
)}
|
|
299
309
|
|
|
300
310
|
{customBuildVerify || (
|
|
301
|
-
<Task id={`${ticket.id}:build-verify`} output={outputs.build_verify} agent={
|
|
311
|
+
<Task id={`${ticket.id}:build-verify`} output={outputs.build_verify} agent={testingAgent} retries={taskRetries}>
|
|
302
312
|
<BuildVerifyPrompt
|
|
303
313
|
ticketId={ticket.id}
|
|
304
314
|
ticketTitle={ticket.title}
|
|
@@ -312,7 +322,7 @@ export function SuperRalph({
|
|
|
312
322
|
|
|
313
323
|
<Parallel maxConcurrency={maxConcurrency}>
|
|
314
324
|
{customSpecReview || (
|
|
315
|
-
<Task id={`${ticket.id}:spec-review`} output={outputs.spec_review} agent={
|
|
325
|
+
<Task id={`${ticket.id}:spec-review`} output={outputs.spec_review} agent={reviewingAgent} retries={taskRetries}>
|
|
316
326
|
<SpecReviewPrompt
|
|
317
327
|
ticketId={ticket.id}
|
|
318
328
|
ticketTitle={ticket.title}
|
|
@@ -332,7 +342,7 @@ export function SuperRalph({
|
|
|
332
342
|
)}
|
|
333
343
|
|
|
334
344
|
{customCodeReview || (
|
|
335
|
-
<Task id={`${ticket.id}:code-review`} output={outputs.code_review} agent={
|
|
345
|
+
<Task id={`${ticket.id}:code-review`} output={outputs.code_review} agent={reviewingAgent} retries={taskRetries}>
|
|
336
346
|
<CodeReviewPrompt
|
|
337
347
|
ticketId={ticket.id}
|
|
338
348
|
ticketTitle={ticket.title}
|
|
@@ -346,7 +356,7 @@ export function SuperRalph({
|
|
|
346
356
|
</Parallel>
|
|
347
357
|
|
|
348
358
|
{customReviewFix || (!noReviewIssues && (
|
|
349
|
-
<Task id={`${ticket.id}:review-fix`} output={outputs.review_fix} agent={
|
|
359
|
+
<Task id={`${ticket.id}:review-fix`} output={outputs.review_fix} agent={implementationAgent} retries={taskRetries}>
|
|
350
360
|
<ReviewFixPrompt
|
|
351
361
|
ticketId={ticket.id}
|
|
352
362
|
ticketTitle={ticket.title}
|
|
@@ -370,7 +380,7 @@ export function SuperRalph({
|
|
|
370
380
|
</Sequence>
|
|
371
381
|
|
|
372
382
|
{customReport || (
|
|
373
|
-
<Task id={`${ticket.id}:report`} output={outputs.report} agent={
|
|
383
|
+
<Task id={`${ticket.id}:report`} output={outputs.report} agent={reportingAgent} retries={taskRetries}>
|
|
374
384
|
<ReportPrompt
|
|
375
385
|
ticketId={ticket.id}
|
|
376
386
|
ticketTitle={ticket.title}
|
package/src/mdx.d.ts
ADDED