@open-tomato/rafa 0.39.0 → 0.41.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 +1 -1
- package/dist/cli.js +3533 -1662
- package/dist/continue-criteria.md +31 -0
- package/dist/continue-decision-prompt.md +94 -0
- package/dist/effort/store/index.js +2 -2
- package/dist/{index-m0wt4nr1.js → index-3jpz9nr3.js} +129 -8
- package/dist/{index-1r2b1052.js → index-cd0wzc12.js} +76 -6
- package/dist/{index-psv1sxkv.js → index-snf04fpt.js} +390 -577
- package/dist/{index-nwgwxfkt.js → index-wjsarzf5.js} +2638 -820
- package/dist/{index-g4116t9m.js → index-zg0qsb5b.js} +29 -14
- package/dist/index.js +4 -4
- package/dist/plan/index.js +2 -2
- package/package.json +2 -2
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
activeOutput,
|
|
4
4
|
isStampableStub,
|
|
5
5
|
readRafaBlocks
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-3jpz9nr3.js";
|
|
7
7
|
import {
|
|
8
8
|
messageOf,
|
|
9
9
|
parseTaskDeclaration
|
|
@@ -465,25 +465,40 @@ function taskInfoOf(capture, lineNum, status) {
|
|
|
465
465
|
const { text, blocker } = splitBlockerComment(capture.trim());
|
|
466
466
|
return blocker === null ? { task: text, lineNum, status } : { task: text, lineNum, status, blocker };
|
|
467
467
|
}
|
|
468
|
-
|
|
468
|
+
var TASK_LINE_STATUSES = [
|
|
469
|
+
[/^- \[BLOCKED\] (.+)/, "blocked"],
|
|
470
|
+
[/^- \[ \] (.+)/, "unchecked"],
|
|
471
|
+
[/^- \[x\] (.+)/, "done"]
|
|
472
|
+
];
|
|
473
|
+
var NO_LINES = new Set;
|
|
474
|
+
function findNextTask(trackerContent, options = {}) {
|
|
475
|
+
const skip = options.skipLines ?? NO_LINES;
|
|
476
|
+
const open = listOpenTasks(trackerContent).filter((task) => !skip.has(task.lineNum));
|
|
477
|
+
return open.find((task) => task.status === "blocked") ?? open.find((task) => task.status === "unchecked") ?? null;
|
|
478
|
+
}
|
|
479
|
+
function listTrackerTasks(trackerContent) {
|
|
469
480
|
const lines = trackerContent.split(`
|
|
470
481
|
`);
|
|
471
482
|
const inBlock = closedBlockLines(trackerContent);
|
|
483
|
+
const tasks = [];
|
|
472
484
|
for (let i = 0;i < lines.length; i++) {
|
|
473
485
|
if (inBlock.has(i))
|
|
474
486
|
continue;
|
|
475
|
-
const
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
const match = lines[i].match(/^- \[ \] (.+)/);
|
|
483
|
-
if (match?.[1])
|
|
484
|
-
return taskInfoOf(match[1], i, "unchecked");
|
|
487
|
+
for (const [pattern, status] of TASK_LINE_STATUSES) {
|
|
488
|
+
const capture = lines[i].match(pattern)?.[1];
|
|
489
|
+
if (!capture)
|
|
490
|
+
continue;
|
|
491
|
+
tasks.push(taskInfoOf(capture, i, status));
|
|
492
|
+
break;
|
|
493
|
+
}
|
|
485
494
|
}
|
|
486
|
-
return
|
|
495
|
+
return tasks;
|
|
496
|
+
}
|
|
497
|
+
function isOpenTask(task) {
|
|
498
|
+
return task.status !== "done";
|
|
499
|
+
}
|
|
500
|
+
function listOpenTasks(trackerContent) {
|
|
501
|
+
return listTrackerTasks(trackerContent).filter(isOpenTask);
|
|
487
502
|
}
|
|
488
503
|
function updateTrackerLine(trackerPath, lineNum, newStatus) {
|
|
489
504
|
const lines = fs.readFileSync(trackerPath, "utf8").split(`
|
|
@@ -909,4 +924,4 @@ function renderInjection(request) {
|
|
|
909
924
|
}
|
|
910
925
|
return { requested: mode, mode, text: RENDERERS[mode](model, location.task), fallback: null };
|
|
911
926
|
}
|
|
912
|
-
export { escapeBlockerText, splitBlockerComment, findNextTask, updateTrackerLine, writeTrackerBlocker, insertTrackerTask, trackerPathFor, PLAN_BLOCK_KINDS, PLAN_HEADER_FIELDS, PLAN_RELEASE_LEVELS, parsePlan, parsePrerequisites, planPrerequisites, malformedPrerequisiteLines, mergePlanPrerequisites, prerequisitesPathForPlan, loadPlanPrerequisites, PROBE_TIMEOUT_MS, runShellProbe, runPreflight, renderInjection };
|
|
927
|
+
export { escapeBlockerText, splitBlockerComment, findNextTask, listTrackerTasks, listOpenTasks, updateTrackerLine, writeTrackerBlocker, insertTrackerTask, trackerPathFor, PLAN_BLOCK_KINDS, PLAN_HEADER_FIELDS, PLAN_RELEASE_LEVELS, parsePlan, parsePrerequisites, planPrerequisites, malformedPrerequisiteLines, mergePlanPrerequisites, prerequisitesPathForPlan, loadPlanPrerequisites, PROBE_TIMEOUT_MS, runShellProbe, runPreflight, renderInjection };
|
package/dist/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
report,
|
|
10
10
|
start,
|
|
11
11
|
validateManifest
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-wjsarzf5.js";
|
|
13
13
|
import {
|
|
14
14
|
PLAN_BLOCK_KINDS,
|
|
15
15
|
PLAN_HEADER_FIELDS,
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
renderInjection,
|
|
24
24
|
runPreflight,
|
|
25
25
|
runShellProbe
|
|
26
|
-
} from "./index-
|
|
26
|
+
} from "./index-zg0qsb5b.js";
|
|
27
27
|
import {
|
|
28
28
|
CORE_ADAPTER_REGISTRY,
|
|
29
29
|
DISK_FILE_SYSTEM,
|
|
@@ -52,7 +52,7 @@ import {
|
|
|
52
52
|
scopeAt,
|
|
53
53
|
selectEffortStore,
|
|
54
54
|
selfAndAncestors
|
|
55
|
-
} from "./index-
|
|
55
|
+
} from "./index-cd0wzc12.js";
|
|
56
56
|
import {
|
|
57
57
|
CONFIG_DEFAULTS,
|
|
58
58
|
CONFIG_FILE,
|
|
@@ -69,7 +69,7 @@ import {
|
|
|
69
69
|
parseReport,
|
|
70
70
|
readRafaBlocks,
|
|
71
71
|
resolveConfig
|
|
72
|
-
} from "./index-
|
|
72
|
+
} from "./index-3jpz9nr3.js";
|
|
73
73
|
import"./index-d6d0942q.js";
|
|
74
74
|
import"./index-eyjq63mx.js";
|
|
75
75
|
import"./index-sr3kc4mf.js";
|
package/dist/plan/index.js
CHANGED
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
renderInjection,
|
|
13
13
|
runPreflight,
|
|
14
14
|
runShellProbe
|
|
15
|
-
} from "../index-
|
|
15
|
+
} from "../index-zg0qsb5b.js";
|
|
16
16
|
import {
|
|
17
17
|
FINDING_KINDS,
|
|
18
18
|
FINDING_SIGNALS,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
isRafaBlockKind,
|
|
22
22
|
parseReport,
|
|
23
23
|
readRafaBlocks
|
|
24
|
-
} from "../index-
|
|
24
|
+
} from "../index-3jpz9nr3.js";
|
|
25
25
|
import {
|
|
26
26
|
INJECT_MODES
|
|
27
27
|
} from "../index-m2ahxjw8.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-tomato/rafa",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.41.0",
|
|
4
4
|
"description": "Alpha. Runs a plan through the ralph loop: one Claude Code session per task, one commit per task, then a pull request and a CI wait.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"bun": ">=1.3.14"
|
|
52
52
|
},
|
|
53
53
|
"scripts": {
|
|
54
|
-
"build": "rm -rf dist && bun build src/rafa.ts --target=bun --outfile=dist/cli.js && bun build src/index.ts src/plan/index.ts src/effort/store/index.ts src/ports/index.ts src/learning/index.ts --target=bun --splitting --root=src --outdir=dist && cp src/PROMPT.md src/plan-prompt.md src/epic-verify-prompt.md dist/ && cp -R src/bundled dist/bundled && bun build src/tools/ts-symbols/cli.ts --target=bun --outfile=dist/bundled/bin/ts-symbols && for tree in pr/plans:plans board/templates:templates; do src=src/${tree%:*}; out=dist/${tree#*:}; [ -d \"$src\" ] || continue; mkdir -p \"$out\" && cp \"$src\"/*.md \"$out\"/ || exit 1; for yml in \"$src\"/*.yml; do [ -e \"$yml\" ] || continue; cp \"$yml\" \"$out\"/ || exit 1; done; done",
|
|
54
|
+
"build": "rm -rf dist && bun build src/rafa.ts --target=bun --outfile=dist/cli.js && bun build src/index.ts src/plan/index.ts src/effort/store/index.ts src/ports/index.ts src/learning/index.ts --target=bun --splitting --root=src --outdir=dist && cp src/PROMPT.md src/plan-prompt.md src/epic-verify-prompt.md src/continue-decision-prompt.md src/continue-criteria.md dist/ && cp -R src/bundled dist/bundled && bun build src/tools/ts-symbols/cli.ts --target=bun --outfile=dist/bundled/bin/ts-symbols && for tree in pr/plans:plans board/templates:templates; do src=src/${tree%:*}; out=dist/${tree#*:}; [ -d \"$src\" ] || continue; mkdir -p \"$out\" && cp \"$src\"/*.md \"$out\"/ || exit 1; for yml in \"$src\"/*.yml; do [ -e \"$yml\" ] || continue; cp \"$yml\" \"$out\"/ || exit 1; done; done",
|
|
55
55
|
"prepack": "bun run build",
|
|
56
56
|
"test": "bun test",
|
|
57
57
|
"lint": "eslint .",
|