ralphflow 0.5.0 → 0.5.2
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 +2 -0
- package/dist/{chunk-TCCMQDVT.js → chunk-DOC64TD6.js} +32 -2
- package/dist/ralphflow.js +584 -24
- package/dist/{server-DOSLU36L.js → server-EX5MWYW4.js} +210 -10
- package/package.json +6 -2
- package/src/dashboard/ui/app.js +203 -0
- package/src/dashboard/ui/archives.js +167 -0
- package/src/dashboard/ui/index.html +2 -3210
- package/src/dashboard/ui/loop-detail.js +880 -0
- package/src/dashboard/ui/notifications.js +151 -0
- package/src/dashboard/ui/prompt-builder.js +362 -0
- package/src/dashboard/ui/sidebar.js +97 -0
- package/src/dashboard/ui/state.js +54 -0
- package/src/dashboard/ui/styles.css +2140 -0
- package/src/dashboard/ui/templates.js +1858 -0
- package/src/dashboard/ui/utils.js +115 -0
- package/src/templates/code-implementation/loops/00-story-loop/prompt.md +73 -11
- package/src/templates/code-implementation/loops/01-tasks-loop/prompt.md +51 -2
- package/src/templates/code-implementation/loops/02-delivery-loop/prompt.md +48 -4
- package/src/templates/research/loops/00-discovery-loop/prompt.md +58 -5
- package/src/templates/research/loops/01-research-loop/prompt.md +44 -2
- package/src/templates/research/loops/02-story-loop/prompt.md +42 -1
- package/src/templates/research/loops/03-document-loop/prompt.md +42 -1
package/README.md
CHANGED
|
@@ -8,6 +8,8 @@ Multi-agent AI workflow orchestration for [Claude Code](https://docs.anthropic.c
|
|
|
8
8
|
|
|
9
9
|
Define pipelines as loops, coordinate parallel agents via file-based trackers, and ship structured work — from single-agent interactive sessions to multi-agent autonomous execution.
|
|
10
10
|
|
|
11
|
+
**[Documentation](https://rahulthakur319.github.io/ralph-flow/)** | **[npm](https://www.npmjs.com/package/ralphflow)** | **[GitHub](https://github.com/rahulthakur319/ralph-flow)**
|
|
12
|
+
|
|
11
13
|
## Quick Start
|
|
12
14
|
|
|
13
15
|
```bash
|
|
@@ -138,6 +138,12 @@ function createCustomTemplate(cwd, definition) {
|
|
|
138
138
|
model: loopDef.model || "claude-sonnet-4-6",
|
|
139
139
|
cadence: loopDef.cadence ?? 0
|
|
140
140
|
};
|
|
141
|
+
if (loopDef.claude_args && loopDef.claude_args.length > 0) {
|
|
142
|
+
loopConfig.claude_args = loopDef.claude_args;
|
|
143
|
+
}
|
|
144
|
+
if (loopDef.skip_permissions !== void 0) {
|
|
145
|
+
loopConfig.skip_permissions = loopDef.skip_permissions;
|
|
146
|
+
}
|
|
141
147
|
if (loopDef.data_files && loopDef.data_files.length > 0) {
|
|
142
148
|
loopConfig.data_files = loopDef.data_files.map((f) => `${loopDirName}/${f}`);
|
|
143
149
|
}
|
|
@@ -173,10 +179,11 @@ function createCustomTemplate(cwd, definition) {
|
|
|
173
179
|
const loopDirName = `${dirPrefix}-${loopKey}`;
|
|
174
180
|
const loopDir = join(loopsDir, loopDirName);
|
|
175
181
|
mkdirSync(loopDir, { recursive: true });
|
|
176
|
-
|
|
182
|
+
const promptContent = loopDef.prompt && loopDef.prompt.trim() ? loopDef.prompt : `# ${loopDef.name} \u2014 Prompt
|
|
177
183
|
|
|
178
184
|
<!-- Add your prompt here -->
|
|
179
|
-
|
|
185
|
+
`;
|
|
186
|
+
writeFileSync(join(loopDir, "prompt.md"), promptContent, "utf-8");
|
|
180
187
|
writeFileSync(join(loopDir, "tracker.md"), `# ${loopDef.name} \u2014 Tracker
|
|
181
188
|
|
|
182
189
|
- stage: ${loopDef.stages[0] || "init"}
|
|
@@ -198,6 +205,28 @@ function createCustomTemplate(cwd, definition) {
|
|
|
198
205
|
}
|
|
199
206
|
});
|
|
200
207
|
}
|
|
208
|
+
function cloneBuiltInTemplate(cwd, sourceName, newName) {
|
|
209
|
+
if (!BUILT_IN_TEMPLATES.includes(sourceName)) {
|
|
210
|
+
throw new Error(`"${sourceName}" is not a built-in template. Only built-in templates can be cloned.`);
|
|
211
|
+
}
|
|
212
|
+
const validation = validateTemplateName(newName);
|
|
213
|
+
if (!validation.valid) {
|
|
214
|
+
throw new Error(validation.error);
|
|
215
|
+
}
|
|
216
|
+
const customDir = join(cwd, ".ralph-flow", ".templates", newName);
|
|
217
|
+
if (existsSync(customDir)) {
|
|
218
|
+
throw new Error(`Template "${newName}" already exists`);
|
|
219
|
+
}
|
|
220
|
+
const sourceDir = resolveTemplatePath(sourceName);
|
|
221
|
+
mkdirSync(customDir, { recursive: true });
|
|
222
|
+
cpSync(sourceDir, customDir, { recursive: true });
|
|
223
|
+
const yamlPath = join(customDir, "ralphflow.yaml");
|
|
224
|
+
if (existsSync(yamlPath)) {
|
|
225
|
+
const content = readFileSync(yamlPath, "utf-8");
|
|
226
|
+
const patched = content.replace(/^name:\s*.+$/m, `name: ${newName}`);
|
|
227
|
+
writeFileSync(yamlPath, patched, "utf-8");
|
|
228
|
+
}
|
|
229
|
+
}
|
|
201
230
|
function deleteCustomTemplate(cwd, name) {
|
|
202
231
|
if (BUILT_IN_TEMPLATES.includes(name)) {
|
|
203
232
|
throw new Error("Cannot delete built-in templates");
|
|
@@ -487,6 +516,7 @@ export {
|
|
|
487
516
|
listCustomTemplates,
|
|
488
517
|
getAvailableTemplates,
|
|
489
518
|
createCustomTemplate,
|
|
519
|
+
cloneBuiltInTemplate,
|
|
490
520
|
deleteCustomTemplate,
|
|
491
521
|
listFlows,
|
|
492
522
|
resolveFlowDir,
|