@pasko70/pibo 1.9.2 → 1.9.3
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 +183 -183
- package/context/codex-base-prompt.md +148 -148
- package/context/compute-worker.md +23 -23
- package/context/pibo-compaction-prompt.md +100 -100
- package/context/pibo-native-tooling.md +18 -18
- package/context/pibo-system-prompt.md +77 -77
- package/dist/apps/chat/agent-store.js +248 -248
- package/dist/apps/chat/data/project-service.js +168 -168
- package/dist/apps/chat/data/read-state-service.js +18 -18
- package/dist/apps/chat/data/session-query-service.js +25 -25
- package/dist/apps/chat/data/timeline-query-service.js +14 -14
- package/dist/apps/chat/static-assets.js +854 -854
- package/dist/apps/chat/workflow-persistence.js +255 -255
- package/dist/apps/chat-ui/assets/{dist-5GM30SQK.js → dist-5WHjqNrY.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-Cge8JklW.js → dist-BJBNSAIH.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-C-5u2QIS.js → dist-C3liNPZJ.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-BWbWIOcD.js → dist-CW6FHEaw.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-CjYtD7ZT.js → dist-CaNlj6v6.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-BYKMZlI0.js → dist-Cne74s6i.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-9lsp1UpA.js → dist-DvKZv20v.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-DFhhiR8M.js → dist-FYH7vzrh.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-Etxmpyxg.js → dist-f5KioIwL.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-2KdPXbMT.js → dist-hWrpj7SE.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-Idz5kzy8.js → dist-jAuO8_bV.js} +1 -1
- package/dist/apps/chat-ui/assets/{index-BqD_bm7z.js → index-Bf29pJph.js} +29 -29
- package/dist/apps/chat-ui/index.html +17 -17
- package/dist/apps/chat-ui/manifest.webmanifest +25 -25
- package/dist/apps/chat-ui/sw.js +47 -47
- package/dist/apps/chat-vscode-web/assets/index-BAMxIaI_.js +41 -0
- package/dist/apps/chat-vscode-web/index.html +13 -13
- package/dist/apps/cli-ui/cliSessionsCommand.js +23 -23
- package/dist/apps/context-files-ui/index.html +11 -11
- package/dist/cli.js +39 -39
- package/dist/compute/cli.js +54 -54
- package/dist/core/session-router.js +5 -2
- package/dist/cron/cli.js +15 -15
- package/dist/cron/store.js +49 -49
- package/dist/data/cli.js +23 -23
- package/dist/data/event-log.js +23 -23
- package/dist/data/message-store.js +20 -20
- package/dist/data/navigation-store.js +9 -9
- package/dist/data/observation-store.js +4 -4
- package/dist/data/payload-store.js +17 -17
- package/dist/data/schema.js +431 -431
- package/dist/data/session-store.js +4 -4
- package/dist/data/telemetry-queries.js +54 -54
- package/dist/data/telemetry.js +197 -197
- package/dist/debug/events.js +12 -12
- package/dist/debug/failures.js +6 -6
- package/dist/debug/index.js +227 -227
- package/dist/debug/messages.js +6 -6
- package/dist/debug/pty.js +124 -124
- package/dist/debug/session.js +29 -29
- package/dist/debug/tools.js +5 -5
- package/dist/debug/web-snapshot-browser-scripts.js +294 -294
- package/dist/debug/web-streaming-browser-library.js +925 -925
- package/dist/debug/web-streaming-browser-scripts.js +232 -232
- package/dist/debug/web-streaming-provider-telemetry.js +4 -4
- package/dist/debug/web.js +93 -93
- package/dist/gateway/cli.js +19 -19
- package/dist/mcp/config-command.js +53 -53
- package/dist/mcp/index.js +21 -21
- package/dist/mcp/registry.js +11 -11
- package/dist/pi-packages/cli.js +11 -11
- package/dist/plugins/context-files-store.js +110 -110
- package/dist/plugins/context-files.js +4 -4
- package/dist/ralph/cli.js +18 -18
- package/dist/ralph/templates.js +140 -140
- package/dist/reliability/store.js +226 -226
- package/dist/session-ui/sessionActivity.js +30 -0
- package/dist/sessions/pibo-data-store.js +16 -16
- package/dist/sessions/sqlite-store.js +53 -53
- package/dist/setup/cli.js +58 -58
- package/dist/signals/projector.js +26 -11
- package/dist/signals/registry.js +41 -0
- package/dist/tools/agent-browser-wrapper.js +80 -80
- package/dist/tools/browser-use-cdp.js +12 -12
- package/dist/tools/browser-use-wrapper.js +762 -762
- package/dist/tools/guides.js +538 -538
- package/dist/tools/index.js +99 -99
- package/dist/tools/runtime/node-worker-source.js +205 -205
- package/dist/tools/runtime/python-worker-source.js +177 -177
- package/dist/vscode/cli.js +9 -9
- package/dist/web-annotations/cdp.js +900 -900
- package/dist/web-annotations/store.js +96 -96
- package/docs/README.md +23 -23
- package/docs/ops/install-developer-host.md +112 -112
- package/docs/ops/install-user-host.md +96 -96
- package/docs/ops/upgrade-user-to-developer-host.md +69 -69
- package/docs/ops/vscode-extension-release.md +160 -160
- package/package.json +95 -95
- package/skills/builtin/graphify/SKILL.md +52 -52
- package/skills/builtin/pi-agent-harness/SKILL.md +319 -319
- package/skills/builtin/pi-agent-harness/agents/openai.yaml +4 -4
- package/skills/builtin/pibo-docker-system/SKILL.md +170 -170
- package/skills/builtin/pibo-spec-writing/SKILL.md +330 -330
- package/skills/builtin/prd/SKILL.md +143 -143
- package/skills/builtin/ralph-loop/SKILL.md +359 -359
- package/skills/builtin/ralph-prd-json/SKILL.md +123 -123
- package/skills/builtin/skill-creator/LICENSE.txt +201 -201
- package/skills/builtin/skill-creator/SKILL.md +513 -513
- package/skills/builtin/skill-creator/agents/analyzer.md +274 -274
- package/skills/builtin/skill-creator/agents/comparator.md +202 -202
- package/skills/builtin/skill-creator/agents/grader.md +223 -223
- package/skills/builtin/skill-creator/assets/eval_review.html +146 -146
- package/skills/builtin/skill-creator/eval-viewer/generate_review.py +471 -471
- package/skills/builtin/skill-creator/eval-viewer/viewer.html +1325 -1325
- package/skills/builtin/skill-creator/references/schemas.md +430 -430
- package/skills/builtin/skill-creator/scripts/aggregate_benchmark.py +401 -401
- package/skills/builtin/skill-creator/scripts/generate_report.py +326 -326
- package/skills/builtin/skill-creator/scripts/improve_description.py +247 -247
- package/skills/builtin/skill-creator/scripts/package_skill.py +136 -136
- package/skills/builtin/skill-creator/scripts/quick_validate.py +102 -102
- package/skills/builtin/skill-creator/scripts/run_eval.py +310 -310
- package/skills/builtin/skill-creator/scripts/run_loop.py +328 -328
- package/skills/builtin/skill-creator/scripts/utils.py +47 -47
- package/skills/builtin/web-annotations/SKILL.md +93 -93
- package/src/mcp/LICENSE.mcp-cli +21 -21
- package/dist/apps/chat-vscode-web/assets/index-Cst9OUkC.js +0 -41
- package/dist/session-ui/activeTurn.js +0 -126
|
@@ -71,39 +71,39 @@ export class ContextFileMetadataStore {
|
|
|
71
71
|
this.db = new DatabaseSync(resolvedPath);
|
|
72
72
|
this.db.exec("PRAGMA busy_timeout = 5000");
|
|
73
73
|
this.db.exec("PRAGMA journal_mode = WAL");
|
|
74
|
-
this.db.exec(`
|
|
75
|
-
CREATE TABLE IF NOT EXISTS context_files (
|
|
76
|
-
key TEXT PRIMARY KEY,
|
|
77
|
-
label TEXT NOT NULL,
|
|
78
|
-
managed_path TEXT NOT NULL,
|
|
79
|
-
scope TEXT NOT NULL,
|
|
80
|
-
source_type TEXT NOT NULL,
|
|
81
|
-
agent_profile_name TEXT,
|
|
82
|
-
active_revision_id TEXT,
|
|
83
|
-
source_ref TEXT,
|
|
84
|
-
source_hash TEXT,
|
|
85
|
-
created_at TEXT NOT NULL,
|
|
86
|
-
updated_at TEXT NOT NULL
|
|
87
|
-
);
|
|
88
|
-
|
|
89
|
-
CREATE INDEX IF NOT EXISTS idx_context_files_scope
|
|
90
|
-
ON context_files(scope, updated_at);
|
|
91
|
-
|
|
92
|
-
CREATE TABLE IF NOT EXISTS context_file_revisions (
|
|
93
|
-
id TEXT PRIMARY KEY,
|
|
94
|
-
context_file_key TEXT NOT NULL,
|
|
95
|
-
kind TEXT NOT NULL,
|
|
96
|
-
content_hash TEXT NOT NULL,
|
|
97
|
-
content TEXT NOT NULL,
|
|
98
|
-
created_at TEXT NOT NULL,
|
|
99
|
-
actor_id TEXT,
|
|
100
|
-
based_on_revision_id TEXT,
|
|
101
|
-
source_hash_at_creation TEXT,
|
|
102
|
-
note TEXT
|
|
103
|
-
);
|
|
104
|
-
|
|
105
|
-
CREATE INDEX IF NOT EXISTS idx_context_file_revisions_key
|
|
106
|
-
ON context_file_revisions(context_file_key, created_at DESC);
|
|
74
|
+
this.db.exec(`
|
|
75
|
+
CREATE TABLE IF NOT EXISTS context_files (
|
|
76
|
+
key TEXT PRIMARY KEY,
|
|
77
|
+
label TEXT NOT NULL,
|
|
78
|
+
managed_path TEXT NOT NULL,
|
|
79
|
+
scope TEXT NOT NULL,
|
|
80
|
+
source_type TEXT NOT NULL,
|
|
81
|
+
agent_profile_name TEXT,
|
|
82
|
+
active_revision_id TEXT,
|
|
83
|
+
source_ref TEXT,
|
|
84
|
+
source_hash TEXT,
|
|
85
|
+
created_at TEXT NOT NULL,
|
|
86
|
+
updated_at TEXT NOT NULL
|
|
87
|
+
);
|
|
88
|
+
|
|
89
|
+
CREATE INDEX IF NOT EXISTS idx_context_files_scope
|
|
90
|
+
ON context_files(scope, updated_at);
|
|
91
|
+
|
|
92
|
+
CREATE TABLE IF NOT EXISTS context_file_revisions (
|
|
93
|
+
id TEXT PRIMARY KEY,
|
|
94
|
+
context_file_key TEXT NOT NULL,
|
|
95
|
+
kind TEXT NOT NULL,
|
|
96
|
+
content_hash TEXT NOT NULL,
|
|
97
|
+
content TEXT NOT NULL,
|
|
98
|
+
created_at TEXT NOT NULL,
|
|
99
|
+
actor_id TEXT,
|
|
100
|
+
based_on_revision_id TEXT,
|
|
101
|
+
source_hash_at_creation TEXT,
|
|
102
|
+
note TEXT
|
|
103
|
+
);
|
|
104
|
+
|
|
105
|
+
CREATE INDEX IF NOT EXISTS idx_context_file_revisions_key
|
|
106
|
+
ON context_file_revisions(context_file_key, created_at DESC);
|
|
107
107
|
`);
|
|
108
108
|
this.migrateLegacyStore();
|
|
109
109
|
}
|
|
@@ -119,20 +119,20 @@ export class ContextFileMetadataStore {
|
|
|
119
119
|
const createdAt = input.createdAt ?? new Date().toISOString();
|
|
120
120
|
const updatedAt = input.updatedAt ?? createdAt;
|
|
121
121
|
this.db
|
|
122
|
-
.prepare(`
|
|
123
|
-
INSERT INTO context_files (
|
|
124
|
-
key,
|
|
125
|
-
label,
|
|
126
|
-
managed_path,
|
|
127
|
-
scope,
|
|
128
|
-
source_type,
|
|
129
|
-
agent_profile_name,
|
|
130
|
-
active_revision_id,
|
|
131
|
-
source_ref,
|
|
132
|
-
source_hash,
|
|
133
|
-
created_at,
|
|
134
|
-
updated_at
|
|
135
|
-
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
122
|
+
.prepare(`
|
|
123
|
+
INSERT INTO context_files (
|
|
124
|
+
key,
|
|
125
|
+
label,
|
|
126
|
+
managed_path,
|
|
127
|
+
scope,
|
|
128
|
+
source_type,
|
|
129
|
+
agent_profile_name,
|
|
130
|
+
active_revision_id,
|
|
131
|
+
source_ref,
|
|
132
|
+
source_hash,
|
|
133
|
+
created_at,
|
|
134
|
+
updated_at
|
|
135
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
136
136
|
`)
|
|
137
137
|
.run(input.key, input.label, input.managedPath, input.scope, "managed", input.agentProfileName ?? null, null, input.sourceRef ?? null, input.sourceHash ?? null, createdAt, updatedAt);
|
|
138
138
|
const record = this.getFile(input.key);
|
|
@@ -142,19 +142,19 @@ export class ContextFileMetadataStore {
|
|
|
142
142
|
}
|
|
143
143
|
updateFile(input) {
|
|
144
144
|
this.db
|
|
145
|
-
.prepare(`
|
|
146
|
-
UPDATE context_files SET
|
|
147
|
-
label = ?,
|
|
148
|
-
managed_path = ?,
|
|
149
|
-
scope = ?,
|
|
150
|
-
source_type = ?,
|
|
151
|
-
agent_profile_name = ?,
|
|
152
|
-
active_revision_id = ?,
|
|
153
|
-
source_ref = ?,
|
|
154
|
-
source_hash = ?,
|
|
155
|
-
created_at = ?,
|
|
156
|
-
updated_at = ?
|
|
157
|
-
WHERE key = ?
|
|
145
|
+
.prepare(`
|
|
146
|
+
UPDATE context_files SET
|
|
147
|
+
label = ?,
|
|
148
|
+
managed_path = ?,
|
|
149
|
+
scope = ?,
|
|
150
|
+
source_type = ?,
|
|
151
|
+
agent_profile_name = ?,
|
|
152
|
+
active_revision_id = ?,
|
|
153
|
+
source_ref = ?,
|
|
154
|
+
source_hash = ?,
|
|
155
|
+
created_at = ?,
|
|
156
|
+
updated_at = ?
|
|
157
|
+
WHERE key = ?
|
|
158
158
|
`)
|
|
159
159
|
.run(input.label, input.managedPath, input.scope, "managed", input.agentProfileName ?? null, input.activeRevisionId ?? null, input.sourceRef ?? null, input.sourceHash ?? null, input.createdAt, input.updatedAt, input.key);
|
|
160
160
|
const record = this.getFile(input.key);
|
|
@@ -178,19 +178,19 @@ export class ContextFileMetadataStore {
|
|
|
178
178
|
const id = `rev_${randomUUID()}`;
|
|
179
179
|
const createdAt = input.createdAt ?? new Date().toISOString();
|
|
180
180
|
this.db
|
|
181
|
-
.prepare(`
|
|
182
|
-
INSERT INTO context_file_revisions (
|
|
183
|
-
id,
|
|
184
|
-
context_file_key,
|
|
185
|
-
kind,
|
|
186
|
-
content_hash,
|
|
187
|
-
content,
|
|
188
|
-
created_at,
|
|
189
|
-
actor_id,
|
|
190
|
-
based_on_revision_id,
|
|
191
|
-
source_hash_at_creation,
|
|
192
|
-
note
|
|
193
|
-
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
181
|
+
.prepare(`
|
|
182
|
+
INSERT INTO context_file_revisions (
|
|
183
|
+
id,
|
|
184
|
+
context_file_key,
|
|
185
|
+
kind,
|
|
186
|
+
content_hash,
|
|
187
|
+
content,
|
|
188
|
+
created_at,
|
|
189
|
+
actor_id,
|
|
190
|
+
based_on_revision_id,
|
|
191
|
+
source_hash_at_creation,
|
|
192
|
+
note
|
|
193
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
194
194
|
`)
|
|
195
195
|
.run(id, input.contextFileKey, input.kind, input.contentHash, input.content, createdAt, input.actorId ?? null, input.basedOnRevisionId ?? null, input.sourceHashAtCreation ?? null, input.note ?? null);
|
|
196
196
|
const revision = this.getRevision(id);
|
|
@@ -211,19 +211,19 @@ export class ContextFileMetadataStore {
|
|
|
211
211
|
findLatestSourceSnapshot(contextFileKey, sourceHash) {
|
|
212
212
|
const row = sourceHash
|
|
213
213
|
? this.db
|
|
214
|
-
.prepare(`
|
|
215
|
-
SELECT * FROM context_file_revisions
|
|
216
|
-
WHERE context_file_key = ? AND kind = 'source-snapshot' AND content_hash = ?
|
|
217
|
-
ORDER BY created_at DESC
|
|
218
|
-
LIMIT 1
|
|
214
|
+
.prepare(`
|
|
215
|
+
SELECT * FROM context_file_revisions
|
|
216
|
+
WHERE context_file_key = ? AND kind = 'source-snapshot' AND content_hash = ?
|
|
217
|
+
ORDER BY created_at DESC
|
|
218
|
+
LIMIT 1
|
|
219
219
|
`)
|
|
220
220
|
.get(contextFileKey, sourceHash)
|
|
221
221
|
: this.db
|
|
222
|
-
.prepare(`
|
|
223
|
-
SELECT * FROM context_file_revisions
|
|
224
|
-
WHERE context_file_key = ? AND kind = 'source-snapshot'
|
|
225
|
-
ORDER BY created_at DESC
|
|
226
|
-
LIMIT 1
|
|
222
|
+
.prepare(`
|
|
223
|
+
SELECT * FROM context_file_revisions
|
|
224
|
+
WHERE context_file_key = ? AND kind = 'source-snapshot'
|
|
225
|
+
ORDER BY created_at DESC
|
|
226
|
+
LIMIT 1
|
|
227
227
|
`)
|
|
228
228
|
.get(contextFileKey);
|
|
229
229
|
return row ? revisionRowToRecord(row) : undefined;
|
|
@@ -248,20 +248,20 @@ export class ContextFileMetadataStore {
|
|
|
248
248
|
? statSync(resolvedPath).mtime.toISOString()
|
|
249
249
|
: new Date().toISOString();
|
|
250
250
|
this.db
|
|
251
|
-
.prepare(`
|
|
252
|
-
INSERT INTO context_files (
|
|
253
|
-
key,
|
|
254
|
-
label,
|
|
255
|
-
managed_path,
|
|
256
|
-
scope,
|
|
257
|
-
source_type,
|
|
258
|
-
agent_profile_name,
|
|
259
|
-
active_revision_id,
|
|
260
|
-
source_ref,
|
|
261
|
-
source_hash,
|
|
262
|
-
created_at,
|
|
263
|
-
updated_at
|
|
264
|
-
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
251
|
+
.prepare(`
|
|
252
|
+
INSERT INTO context_files (
|
|
253
|
+
key,
|
|
254
|
+
label,
|
|
255
|
+
managed_path,
|
|
256
|
+
scope,
|
|
257
|
+
source_type,
|
|
258
|
+
agent_profile_name,
|
|
259
|
+
active_revision_id,
|
|
260
|
+
source_ref,
|
|
261
|
+
source_hash,
|
|
262
|
+
created_at,
|
|
263
|
+
updated_at
|
|
264
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
265
265
|
`)
|
|
266
266
|
.run(file.key, file.label, resolvedPath, file.scope, "managed", file.agentProfileName ?? null, null, null, null, createdAt, createdAt);
|
|
267
267
|
if (!existsSync(resolvedPath))
|
|
@@ -270,19 +270,19 @@ export class ContextFileMetadataStore {
|
|
|
270
270
|
const contentHash = hashContextFileContent(content);
|
|
271
271
|
const revisionId = `rev_${randomUUID()}`;
|
|
272
272
|
this.db
|
|
273
|
-
.prepare(`
|
|
274
|
-
INSERT INTO context_file_revisions (
|
|
275
|
-
id,
|
|
276
|
-
context_file_key,
|
|
277
|
-
kind,
|
|
278
|
-
content_hash,
|
|
279
|
-
content,
|
|
280
|
-
created_at,
|
|
281
|
-
actor_id,
|
|
282
|
-
based_on_revision_id,
|
|
283
|
-
source_hash_at_creation,
|
|
284
|
-
note
|
|
285
|
-
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
273
|
+
.prepare(`
|
|
274
|
+
INSERT INTO context_file_revisions (
|
|
275
|
+
id,
|
|
276
|
+
context_file_key,
|
|
277
|
+
kind,
|
|
278
|
+
content_hash,
|
|
279
|
+
content,
|
|
280
|
+
created_at,
|
|
281
|
+
actor_id,
|
|
282
|
+
based_on_revision_id,
|
|
283
|
+
source_hash_at_creation,
|
|
284
|
+
note
|
|
285
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
286
286
|
`)
|
|
287
287
|
.run(revisionId, file.key, "working", contentHash, content, createdAt, null, null, null, "Legacy managed file import");
|
|
288
288
|
this.db
|
|
@@ -227,10 +227,10 @@ function responseBuiltIndex() {
|
|
|
227
227
|
return responseHtml(readFileSync(indexPath, "utf8"));
|
|
228
228
|
}
|
|
229
229
|
function fallbackHtml() {
|
|
230
|
-
return responseHtml(`<!doctype html>
|
|
231
|
-
<html lang="en">
|
|
232
|
-
<head><meta charset="utf-8"><title>Pibo Context Files</title></head>
|
|
233
|
-
<body><p>Context Files UI has not been built. Run <code>npm run context-files-ui:build</code>.</p></body>
|
|
230
|
+
return responseHtml(`<!doctype html>
|
|
231
|
+
<html lang="en">
|
|
232
|
+
<head><meta charset="utf-8"><title>Pibo Context Files</title></head>
|
|
233
|
+
<body><p>Context Files UI has not been built. Run <code>npm run context-files-ui:build</code>.</p></body>
|
|
234
234
|
</html>`);
|
|
235
235
|
}
|
|
236
236
|
function writeSse(controller, eventName, payload, id) {
|
package/dist/ralph/cli.js
CHANGED
|
@@ -6,24 +6,24 @@ import { DEFAULT_PIBO_PROFILE_NAME } from '../plugins/builtin.js';
|
|
|
6
6
|
import { getRalphJobTemplate, listRalphJobTemplates } from './templates.js';
|
|
7
7
|
import { parsePiboThinkingLevel } from '../core/thinking.js';
|
|
8
8
|
function printDiscovery() {
|
|
9
|
-
console.log(`pibo ralph
|
|
10
|
-
|
|
11
|
-
Manage continuous Ralph Pibo agent jobs.
|
|
12
|
-
|
|
13
|
-
Commands:
|
|
14
|
-
status Show Ralph status
|
|
15
|
-
list List Ralph jobs
|
|
16
|
-
add Create a Ralph job
|
|
17
|
-
edit Update a Ralph job
|
|
18
|
-
conditions List registered built-in stop conditions
|
|
19
|
-
templates List built-in Ralph job templates
|
|
20
|
-
policy Show, set, or clear a job stop policy
|
|
21
|
-
start Start a Ralph job now
|
|
22
|
-
stop Stop after the current session finishes
|
|
23
|
-
cancel Abort the current session and stop
|
|
24
|
-
remove Delete a Ralph job
|
|
25
|
-
runs List Ralph runs
|
|
26
|
-
|
|
9
|
+
console.log(`pibo ralph
|
|
10
|
+
|
|
11
|
+
Manage continuous Ralph Pibo agent jobs.
|
|
12
|
+
|
|
13
|
+
Commands:
|
|
14
|
+
status Show Ralph status
|
|
15
|
+
list List Ralph jobs
|
|
16
|
+
add Create a Ralph job
|
|
17
|
+
edit Update a Ralph job
|
|
18
|
+
conditions List registered built-in stop conditions
|
|
19
|
+
templates List built-in Ralph job templates
|
|
20
|
+
policy Show, set, or clear a job stop policy
|
|
21
|
+
start Start a Ralph job now
|
|
22
|
+
stop Stop after the current session finishes
|
|
23
|
+
cancel Abort the current session and stop
|
|
24
|
+
remove Delete a Ralph job
|
|
25
|
+
runs List Ralph runs
|
|
26
|
+
|
|
27
27
|
Next: pibo ralph add --help`);
|
|
28
28
|
}
|
|
29
29
|
function targetFromOptions(options) { if (options.room)
|
package/dist/ralph/templates.js
CHANGED
|
@@ -18,79 +18,79 @@ export const BUILT_IN_RALPH_JOB_TEMPLATES = [
|
|
|
18
18
|
job: {
|
|
19
19
|
name: 'Ralph PRD single story',
|
|
20
20
|
description: 'One PRD user story per Ralph iteration.',
|
|
21
|
-
prompt: markdown `# Ralph Auftrag: <Project / Change Name>
|
|
22
|
-
|
|
23
|
-
## Worktree
|
|
24
|
-
|
|
25
|
-
Work from the host worktree, not from a container copy:
|
|
26
|
-
|
|
27
|
-
\`\`\`bash
|
|
28
|
-
cd <host-worktree>
|
|
29
|
-
\`\`\`
|
|
30
|
-
|
|
31
|
-
Branch: \`<branch-name>\`
|
|
32
|
-
Base: \`<base-branch-or-commit>\`
|
|
33
|
-
PRDs: \`<path-to-prds>/prd_*.json\`
|
|
34
|
-
Progress log: \`<path-to-prds>/progress.txt\`
|
|
35
|
-
|
|
36
|
-
If a container is required for build, gateway, or browser checks, use it only for running commands. Edit files and run git commands in the host worktree. Do not edit \`/app\` inside a container.
|
|
37
|
-
|
|
38
|
-
## Ralph Agent Instructions
|
|
39
|
-
|
|
40
|
-
You are an autonomous coding agent working on a software project.
|
|
41
|
-
|
|
42
|
-
### Your Task
|
|
43
|
-
|
|
44
|
-
1. Work from the host worktree above.
|
|
45
|
-
2. Read all PRD JSON files matching \`<path-to-prds>/prd_*.json\`.
|
|
46
|
-
3. Read the progress log. If it does not exist, create it.
|
|
47
|
-
4. Read the \`## Codebase Patterns\` section at the top of the progress log if present.
|
|
48
|
-
5. Pick the highest-priority user story where \`passes: false\`.
|
|
49
|
-
6. Implement that single user story only.
|
|
50
|
-
7. Run quality checks:
|
|
51
|
-
- Always run \`npm run typecheck\`.
|
|
52
|
-
- Run relevant tests for touched areas.
|
|
53
|
-
- For UI stories, run browser verification in the configured dev container/browser environment.
|
|
54
|
-
8. If checks pass, update the PRD JSON to set \`passes: true\` for the completed story.
|
|
55
|
-
9. Commit all changes from the host worktree with message:
|
|
56
|
-
\`feat: [Story ID] - [Story Title]\`
|
|
57
|
-
10. Append your progress to the progress log.
|
|
58
|
-
|
|
59
|
-
### Progress Report Format
|
|
60
|
-
|
|
61
|
-
Append to the progress log. Never replace; always append.
|
|
62
|
-
|
|
63
|
-
\`\`\`md
|
|
64
|
-
## [Date/Time] - [Story ID]
|
|
65
|
-
- What was implemented
|
|
66
|
-
- Files changed
|
|
67
|
-
- Quality checks run
|
|
68
|
-
- Browser verification, if UI changed
|
|
69
|
-
- **Learnings for future iterations:**
|
|
70
|
-
- Patterns discovered
|
|
71
|
-
- Gotchas encountered
|
|
72
|
-
- Useful context
|
|
73
|
-
---
|
|
74
|
-
\`\`\`
|
|
75
|
-
|
|
76
|
-
### Consolidate Patterns
|
|
77
|
-
|
|
78
|
-
If you discover a reusable pattern, add it to the \`## Codebase Patterns\` section at the top of the progress log. Only add general reusable patterns, not story-specific notes.
|
|
79
|
-
|
|
80
|
-
## Quality Requirements
|
|
81
|
-
|
|
82
|
-
- All commits must pass quality checks.
|
|
83
|
-
- Do not commit broken code.
|
|
84
|
-
- Keep changes focused and minimal.
|
|
85
|
-
- Follow existing code patterns.
|
|
86
|
-
- For UI stories, browser verification is mandatory.
|
|
87
|
-
|
|
88
|
-
## Stop Condition
|
|
89
|
-
|
|
90
|
-
After completing one user story, check whether all stories in all PRD JSON files have \`passes: true\`.
|
|
91
|
-
|
|
92
|
-
If all stories are complete and passing, reply with the XML completion marker on its own line. Compose it from the opening tag \`<promise>\`, the word \`COMPLETE\`, and the closing tag \`</promise>\`.
|
|
93
|
-
|
|
21
|
+
prompt: markdown `# Ralph Auftrag: <Project / Change Name>
|
|
22
|
+
|
|
23
|
+
## Worktree
|
|
24
|
+
|
|
25
|
+
Work from the host worktree, not from a container copy:
|
|
26
|
+
|
|
27
|
+
\`\`\`bash
|
|
28
|
+
cd <host-worktree>
|
|
29
|
+
\`\`\`
|
|
30
|
+
|
|
31
|
+
Branch: \`<branch-name>\`
|
|
32
|
+
Base: \`<base-branch-or-commit>\`
|
|
33
|
+
PRDs: \`<path-to-prds>/prd_*.json\`
|
|
34
|
+
Progress log: \`<path-to-prds>/progress.txt\`
|
|
35
|
+
|
|
36
|
+
If a container is required for build, gateway, or browser checks, use it only for running commands. Edit files and run git commands in the host worktree. Do not edit \`/app\` inside a container.
|
|
37
|
+
|
|
38
|
+
## Ralph Agent Instructions
|
|
39
|
+
|
|
40
|
+
You are an autonomous coding agent working on a software project.
|
|
41
|
+
|
|
42
|
+
### Your Task
|
|
43
|
+
|
|
44
|
+
1. Work from the host worktree above.
|
|
45
|
+
2. Read all PRD JSON files matching \`<path-to-prds>/prd_*.json\`.
|
|
46
|
+
3. Read the progress log. If it does not exist, create it.
|
|
47
|
+
4. Read the \`## Codebase Patterns\` section at the top of the progress log if present.
|
|
48
|
+
5. Pick the highest-priority user story where \`passes: false\`.
|
|
49
|
+
6. Implement that single user story only.
|
|
50
|
+
7. Run quality checks:
|
|
51
|
+
- Always run \`npm run typecheck\`.
|
|
52
|
+
- Run relevant tests for touched areas.
|
|
53
|
+
- For UI stories, run browser verification in the configured dev container/browser environment.
|
|
54
|
+
8. If checks pass, update the PRD JSON to set \`passes: true\` for the completed story.
|
|
55
|
+
9. Commit all changes from the host worktree with message:
|
|
56
|
+
\`feat: [Story ID] - [Story Title]\`
|
|
57
|
+
10. Append your progress to the progress log.
|
|
58
|
+
|
|
59
|
+
### Progress Report Format
|
|
60
|
+
|
|
61
|
+
Append to the progress log. Never replace; always append.
|
|
62
|
+
|
|
63
|
+
\`\`\`md
|
|
64
|
+
## [Date/Time] - [Story ID]
|
|
65
|
+
- What was implemented
|
|
66
|
+
- Files changed
|
|
67
|
+
- Quality checks run
|
|
68
|
+
- Browser verification, if UI changed
|
|
69
|
+
- **Learnings for future iterations:**
|
|
70
|
+
- Patterns discovered
|
|
71
|
+
- Gotchas encountered
|
|
72
|
+
- Useful context
|
|
73
|
+
---
|
|
74
|
+
\`\`\`
|
|
75
|
+
|
|
76
|
+
### Consolidate Patterns
|
|
77
|
+
|
|
78
|
+
If you discover a reusable pattern, add it to the \`## Codebase Patterns\` section at the top of the progress log. Only add general reusable patterns, not story-specific notes.
|
|
79
|
+
|
|
80
|
+
## Quality Requirements
|
|
81
|
+
|
|
82
|
+
- All commits must pass quality checks.
|
|
83
|
+
- Do not commit broken code.
|
|
84
|
+
- Keep changes focused and minimal.
|
|
85
|
+
- Follow existing code patterns.
|
|
86
|
+
- For UI stories, browser verification is mandatory.
|
|
87
|
+
|
|
88
|
+
## Stop Condition
|
|
89
|
+
|
|
90
|
+
After completing one user story, check whether all stories in all PRD JSON files have \`passes: true\`.
|
|
91
|
+
|
|
92
|
+
If all stories are complete and passing, reply with the XML completion marker on its own line. Compose it from the opening tag \`<promise>\`, the word \`COMPLETE\`, and the closing tag \`</promise>\`.
|
|
93
|
+
|
|
94
94
|
Do not quote, negate, explain, or mention that literal marker unless all stories are complete and you intend to stop the job. If any story remains with \`passes: false\`, end normally so another iteration can pick up the next story and say only that the completion marker was omitted.`,
|
|
95
95
|
stopPolicy: promiseCompletePolicy,
|
|
96
96
|
},
|
|
@@ -103,44 +103,44 @@ Do not quote, negate, explain, or mention that literal marker unless all stories
|
|
|
103
103
|
job: {
|
|
104
104
|
name: 'Ralph PRD batch',
|
|
105
105
|
description: 'Multiple PRD user stories per Ralph run.',
|
|
106
|
-
prompt: markdown `# Ralph Auftrag: <Project / Change Name> Batch
|
|
107
|
-
|
|
108
|
-
## Worktree
|
|
109
|
-
|
|
110
|
-
Work from the host worktree:
|
|
111
|
-
|
|
112
|
-
\`\`\`bash
|
|
113
|
-
cd <host-worktree>
|
|
114
|
-
\`\`\`
|
|
115
|
-
|
|
116
|
-
PRDs: \`<path-to-prds>/prd_*.json\`
|
|
117
|
-
Progress log: \`<path-to-prds>/progress.txt\`
|
|
118
|
-
Batch limit: \`<max-stories-this-run>\`
|
|
119
|
-
|
|
120
|
-
## Task
|
|
121
|
-
|
|
122
|
-
1. Read the PRD JSON files and progress log.
|
|
123
|
-
2. Work through failing user stories in priority order.
|
|
124
|
-
3. Complete up to \`<max-stories-this-run>\` stories in this run.
|
|
125
|
-
4. Keep each story isolated:
|
|
126
|
-
- implement one story;
|
|
127
|
-
- run relevant checks;
|
|
128
|
-
- set that story's \`passes\` to \`true\` only after checks pass;
|
|
129
|
-
- commit with \`feat: [Story ID] - [Story Title]\`;
|
|
130
|
-
- append a progress-log entry.
|
|
131
|
-
5. Stop early if a story is blocked, ambiguous, or tests fail. Do not continue with later stories after a failed story.
|
|
132
|
-
|
|
133
|
-
## Quality Requirements
|
|
134
|
-
|
|
135
|
-
- Always run \`npm run typecheck\` before each story commit unless the repository has a documented narrower check for this batch.
|
|
136
|
-
- Run relevant tests for touched areas.
|
|
137
|
-
- Browser verification is mandatory for UI changes.
|
|
138
|
-
- Keep changes focused; do not bundle unrelated refactors.
|
|
139
|
-
|
|
140
|
-
## Stop Condition
|
|
141
|
-
|
|
142
|
-
If all stories in all PRD JSON files are complete and passing, reply with the XML completion marker on its own line. Compose it from the opening tag \`<promise>\`, the word \`COMPLETE\`, and the closing tag \`</promise>\`.
|
|
143
|
-
|
|
106
|
+
prompt: markdown `# Ralph Auftrag: <Project / Change Name> Batch
|
|
107
|
+
|
|
108
|
+
## Worktree
|
|
109
|
+
|
|
110
|
+
Work from the host worktree:
|
|
111
|
+
|
|
112
|
+
\`\`\`bash
|
|
113
|
+
cd <host-worktree>
|
|
114
|
+
\`\`\`
|
|
115
|
+
|
|
116
|
+
PRDs: \`<path-to-prds>/prd_*.json\`
|
|
117
|
+
Progress log: \`<path-to-prds>/progress.txt\`
|
|
118
|
+
Batch limit: \`<max-stories-this-run>\`
|
|
119
|
+
|
|
120
|
+
## Task
|
|
121
|
+
|
|
122
|
+
1. Read the PRD JSON files and progress log.
|
|
123
|
+
2. Work through failing user stories in priority order.
|
|
124
|
+
3. Complete up to \`<max-stories-this-run>\` stories in this run.
|
|
125
|
+
4. Keep each story isolated:
|
|
126
|
+
- implement one story;
|
|
127
|
+
- run relevant checks;
|
|
128
|
+
- set that story's \`passes\` to \`true\` only after checks pass;
|
|
129
|
+
- commit with \`feat: [Story ID] - [Story Title]\`;
|
|
130
|
+
- append a progress-log entry.
|
|
131
|
+
5. Stop early if a story is blocked, ambiguous, or tests fail. Do not continue with later stories after a failed story.
|
|
132
|
+
|
|
133
|
+
## Quality Requirements
|
|
134
|
+
|
|
135
|
+
- Always run \`npm run typecheck\` before each story commit unless the repository has a documented narrower check for this batch.
|
|
136
|
+
- Run relevant tests for touched areas.
|
|
137
|
+
- Browser verification is mandatory for UI changes.
|
|
138
|
+
- Keep changes focused; do not bundle unrelated refactors.
|
|
139
|
+
|
|
140
|
+
## Stop Condition
|
|
141
|
+
|
|
142
|
+
If all stories in all PRD JSON files are complete and passing, reply with the XML completion marker on its own line. Compose it from the opening tag \`<promise>\`, the word \`COMPLETE\`, and the closing tag \`</promise>\`.
|
|
143
|
+
|
|
144
144
|
Do not quote, negate, explain, or mention that literal marker unless all stories are complete and you intend to stop the job. Otherwise report the stories completed and the next remaining failing story, and say only that the completion marker was omitted.`,
|
|
145
145
|
stopPolicy: promiseCompletePolicy,
|
|
146
146
|
},
|
|
@@ -155,35 +155,35 @@ Do not quote, negate, explain, or mention that literal marker unless all stories
|
|
|
155
155
|
description: 'One focused non-PRD objective.',
|
|
156
156
|
maxIterations: 1,
|
|
157
157
|
stopPolicy: singleRunPolicy,
|
|
158
|
-
prompt: markdown `# Ralph Auftrag: <Objective>
|
|
159
|
-
|
|
160
|
-
## Worktree
|
|
161
|
-
|
|
162
|
-
\`\`\`bash
|
|
163
|
-
cd <host-worktree>
|
|
164
|
-
\`\`\`
|
|
165
|
-
|
|
166
|
-
Branch: \`<branch-name>\`
|
|
167
|
-
|
|
168
|
-
## Objective
|
|
169
|
-
|
|
170
|
-
<Describe the concrete outcome.>
|
|
171
|
-
|
|
172
|
-
## Done Criteria
|
|
173
|
-
|
|
174
|
-
- <Pass/fail criterion 1>
|
|
175
|
-
- <Pass/fail criterion 2>
|
|
176
|
-
- <Required verification command or manual check>
|
|
177
|
-
|
|
178
|
-
## Instructions
|
|
179
|
-
|
|
180
|
-
1. Inspect the relevant code and docs before editing.
|
|
181
|
-
2. State assumptions in code comments or docs only when they matter for maintainers.
|
|
182
|
-
3. Implement the smallest focused change that satisfies the done criteria.
|
|
183
|
-
4. Run \`npm run typecheck\` and relevant tests.
|
|
184
|
-
5. Commit with a concise message if checks pass.
|
|
185
|
-
6. End with a short report listing files changed and verification run.
|
|
186
|
-
|
|
158
|
+
prompt: markdown `# Ralph Auftrag: <Objective>
|
|
159
|
+
|
|
160
|
+
## Worktree
|
|
161
|
+
|
|
162
|
+
\`\`\`bash
|
|
163
|
+
cd <host-worktree>
|
|
164
|
+
\`\`\`
|
|
165
|
+
|
|
166
|
+
Branch: \`<branch-name>\`
|
|
167
|
+
|
|
168
|
+
## Objective
|
|
169
|
+
|
|
170
|
+
<Describe the concrete outcome.>
|
|
171
|
+
|
|
172
|
+
## Done Criteria
|
|
173
|
+
|
|
174
|
+
- <Pass/fail criterion 1>
|
|
175
|
+
- <Pass/fail criterion 2>
|
|
176
|
+
- <Required verification command or manual check>
|
|
177
|
+
|
|
178
|
+
## Instructions
|
|
179
|
+
|
|
180
|
+
1. Inspect the relevant code and docs before editing.
|
|
181
|
+
2. State assumptions in code comments or docs only when they matter for maintainers.
|
|
182
|
+
3. Implement the smallest focused change that satisfies the done criteria.
|
|
183
|
+
4. Run \`npm run typecheck\` and relevant tests.
|
|
184
|
+
5. Commit with a concise message if checks pass.
|
|
185
|
+
6. End with a short report listing files changed and verification run.
|
|
186
|
+
|
|
187
187
|
This is not a PRD loop. Do not edit PRD JSON progress unless the objective explicitly asks for it.`,
|
|
188
188
|
},
|
|
189
189
|
},
|