@open-tomato/rafa 0.51.0 → 0.52.1
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/dist/bugs/record.d.ts +8 -3
- package/dist/bundled/agents/doc-updater.md +4 -0
- package/dist/bundled/agents/loop-implementer.md +4 -0
- package/dist/bundled/agents/qa-bug-reporter.md +6 -3
- package/dist/bundled/operators/agents/rafa-stretch-engineer.md +10 -2
- package/dist/bundled/operators/skills/rafa-stretch-pit-stop/SKILL.md +37 -11
- package/dist/bundled/operators/skills/rafa-stretch-sweep/SKILL.md +10 -3
- package/dist/bundled/skills/dev-planner/SKILL.md +20 -5
- package/dist/cli.js +650 -340
- package/dist/effort/store/index.js +2 -2
- package/dist/{index-j518r1yt.js → index-1tdzcheq.js} +1 -1
- package/dist/{index-h9vwrj54.js → index-4dwaxd5r.js} +1 -1
- package/dist/{index-chm1d3xn.js → index-4wy2nmyt.js} +3 -3
- package/dist/{index-w5qbpdtp.js → index-amevawhe.js} +1 -1
- package/dist/{index-ajv88fkm.js → index-n2r3wf2z.js} +31 -2
- package/dist/index.js +55 -26
- package/dist/plan/index.js +2 -2
- package/dist/plan-prompt.md +1 -0
- package/dist/{ready-dph3z1nz.js → ready-kac4ty0p.js} +3 -3
- package/dist/report/parse.d.ts +3 -1
- package/package.json +9 -17
|
@@ -13,10 +13,10 @@ import {
|
|
|
13
13
|
openNdjsonStore,
|
|
14
14
|
openSqliteStore,
|
|
15
15
|
selectEffortStore
|
|
16
|
-
} from "../../index-
|
|
16
|
+
} from "../../index-1tdzcheq.js";
|
|
17
17
|
import {
|
|
18
18
|
TRUSTED_PERMISSIONS
|
|
19
|
-
} from "../../index-
|
|
19
|
+
} from "../../index-4dwaxd5r.js";
|
|
20
20
|
import"../../index-2a7nb3an.js";
|
|
21
21
|
import"../../index-m672ptpg.js";
|
|
22
22
|
import {
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
parsePlan,
|
|
8
8
|
readRafaBlocks,
|
|
9
9
|
rejectedPath
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-n2r3wf2z.js";
|
|
11
11
|
import {
|
|
12
12
|
CORE_ADAPTER_REGISTRY,
|
|
13
13
|
CommandExit,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
isRecord,
|
|
21
21
|
normalizeRemote,
|
|
22
22
|
setActiveStoreSettings
|
|
23
|
-
} from "./index-
|
|
23
|
+
} from "./index-4dwaxd5r.js";
|
|
24
24
|
import {
|
|
25
25
|
activeOutput,
|
|
26
26
|
activeOutputMode
|
|
@@ -8971,7 +8971,7 @@ var ISSUE_CREATE_DECLARATION = Object.freeze({
|
|
|
8971
8971
|
},
|
|
8972
8972
|
{
|
|
8973
8973
|
name: "reproduce",
|
|
8974
|
-
description: "A bug: the
|
|
8974
|
+
description: "A bug: one command run from the checkout root whose output or exit code shows it; the condition only when no command can. Never unknown.",
|
|
8975
8975
|
type: "string"
|
|
8976
8976
|
},
|
|
8977
8977
|
{
|
|
@@ -167,7 +167,7 @@ function splitBlockerComment(taskText) {
|
|
|
167
167
|
|
|
168
168
|
// packages/rafa/src/core/plan/parse.ts
|
|
169
169
|
var PLAN_BLOCK_KINDS = ["plan", "context", "stage-context"];
|
|
170
|
-
var PLAN_HEADER_FIELDS = ["stub", "issue", "spec", "release"];
|
|
170
|
+
var PLAN_HEADER_FIELDS = ["stub", "issue", "spec", "release", "closes"];
|
|
171
171
|
var PLAN_RELEASE_LEVELS = ["patch", "minor", "major", "none"];
|
|
172
172
|
var TASK_LINES = [
|
|
173
173
|
["unchecked", /^- \[ \] (.+)/],
|
|
@@ -205,7 +205,7 @@ function planIssue(reason, line, text) {
|
|
|
205
205
|
return { reason, line, text };
|
|
206
206
|
}
|
|
207
207
|
function emptyHeader() {
|
|
208
|
-
return { stub: null, issue: null, spec: null, release: null, extras: [] };
|
|
208
|
+
return { stub: null, issue: null, spec: null, release: null, closes: [], extras: [] };
|
|
209
209
|
}
|
|
210
210
|
function readTaskLine(line) {
|
|
211
211
|
for (const [status, pattern] of TASK_LINES) {
|
|
@@ -324,11 +324,30 @@ function usableField(field, value) {
|
|
|
324
324
|
return null;
|
|
325
325
|
return value;
|
|
326
326
|
}
|
|
327
|
+
function isIssueNumber(entry) {
|
|
328
|
+
return typeof entry === "number" && Number.isSafeInteger(entry) && entry > 0;
|
|
329
|
+
}
|
|
330
|
+
function usableClosesField(value) {
|
|
331
|
+
if (!Array.isArray(value))
|
|
332
|
+
return null;
|
|
333
|
+
const entries = value;
|
|
334
|
+
return entries.every(isIssueNumber) ? [...entries] : null;
|
|
335
|
+
}
|
|
336
|
+
function closesText(subject, value) {
|
|
337
|
+
const wanted = "a list of whole positive issue numbers, such as [12, 13]";
|
|
338
|
+
if (!Array.isArray(value))
|
|
339
|
+
return `${subject} is ${describeValue(value)}, not ${wanted}`;
|
|
340
|
+
const entries = value;
|
|
341
|
+
const refused = entries.find((entry) => !isIssueNumber(entry));
|
|
342
|
+
return `${subject} holds ${describeValue(refused)}, so the whole list is unread; write ${wanted}`;
|
|
343
|
+
}
|
|
327
344
|
function unusableText(field, value) {
|
|
328
345
|
const subject = `rafa:plan ${field}`;
|
|
329
346
|
if (value === null) {
|
|
330
347
|
return `${subject} is empty; a value opening with # after a space is a YAML comment unless quoted`;
|
|
331
348
|
}
|
|
349
|
+
if (field === "closes")
|
|
350
|
+
return closesText(subject, value);
|
|
332
351
|
if (field === "release") {
|
|
333
352
|
return `${subject} is ${describeValue(value)}, not one of ${PLAN_RELEASE_LEVELS.join(", ")}`;
|
|
334
353
|
}
|
|
@@ -349,11 +368,20 @@ function readFields(document, line) {
|
|
|
349
368
|
const values = new Map;
|
|
350
369
|
const extras = [];
|
|
351
370
|
const issues = [];
|
|
371
|
+
let closes2 = [];
|
|
352
372
|
for (const [key, value] of Object.entries(document)) {
|
|
353
373
|
if (!isHeaderField(key)) {
|
|
354
374
|
extras.push({ key, value });
|
|
355
375
|
continue;
|
|
356
376
|
}
|
|
377
|
+
if (key === "closes") {
|
|
378
|
+
const list = usableClosesField(value);
|
|
379
|
+
if (list === null)
|
|
380
|
+
issues.push(planIssue("unusable-field", line, unusableText(key, value)));
|
|
381
|
+
else
|
|
382
|
+
closes2 = list;
|
|
383
|
+
continue;
|
|
384
|
+
}
|
|
357
385
|
const usable = usableField(key, value);
|
|
358
386
|
if (usable === null)
|
|
359
387
|
issues.push(planIssue("unusable-field", line, unusableText(key, value)));
|
|
@@ -365,6 +393,7 @@ function readFields(document, line) {
|
|
|
365
393
|
issue: values.get("issue") ?? null,
|
|
366
394
|
spec: values.get("spec") ?? null,
|
|
367
395
|
release: releaseOf(values),
|
|
396
|
+
closes: closes2,
|
|
368
397
|
extras
|
|
369
398
|
};
|
|
370
399
|
return { header, issues };
|
package/dist/index.js
CHANGED
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
runPreflight,
|
|
22
22
|
runShellProbe,
|
|
23
23
|
spawnShell
|
|
24
|
-
} from "./index-
|
|
24
|
+
} from "./index-amevawhe.js";
|
|
25
25
|
import {
|
|
26
26
|
ACROSS_STORES_ORDER,
|
|
27
27
|
DEVELOPMENT_NEXT_STEP,
|
|
@@ -82,7 +82,7 @@ import {
|
|
|
82
82
|
withSqliteStore,
|
|
83
83
|
writeNames,
|
|
84
84
|
writeSqliteStore
|
|
85
|
-
} from "./index-
|
|
85
|
+
} from "./index-1tdzcheq.js";
|
|
86
86
|
import {
|
|
87
87
|
ACTION_SHAPE,
|
|
88
88
|
CONFIG_DEFAULTS,
|
|
@@ -269,7 +269,7 @@ import {
|
|
|
269
269
|
writeHopRecord,
|
|
270
270
|
writePositionFile,
|
|
271
271
|
writeRefsBlock
|
|
272
|
-
} from "./index-
|
|
272
|
+
} from "./index-4wy2nmyt.js";
|
|
273
273
|
import {
|
|
274
274
|
BLOCKER_GAP,
|
|
275
275
|
PLAN_BLOCK_KINDS,
|
|
@@ -294,7 +294,7 @@ import {
|
|
|
294
294
|
stubOfPlanFile,
|
|
295
295
|
trackerPathFor,
|
|
296
296
|
unescapeBlockerText
|
|
297
|
-
} from "./index-
|
|
297
|
+
} from "./index-n2r3wf2z.js";
|
|
298
298
|
import {
|
|
299
299
|
CORE_ADAPTER_REGISTRY,
|
|
300
300
|
CommandExit,
|
|
@@ -321,7 +321,7 @@ import {
|
|
|
321
321
|
parseWorkingTree,
|
|
322
322
|
registerAdapters,
|
|
323
323
|
restoreAdapters
|
|
324
|
-
} from "./index-
|
|
324
|
+
} from "./index-4dwaxd5r.js";
|
|
325
325
|
import {
|
|
326
326
|
activeOutput,
|
|
327
327
|
activeOutputMode,
|
|
@@ -13257,7 +13257,8 @@ function forecastLine(read) {
|
|
|
13257
13257
|
return `Release forecast: none computed, because ${read.problem}`;
|
|
13258
13258
|
const strategy = strategyOf3(read.forecast);
|
|
13259
13259
|
const by = strategy === null ? "" : `${strategy}, `;
|
|
13260
|
-
|
|
13260
|
+
const merged = read.mergedVersion === undefined ? "" : `, ${read.mergedVersion} once this branch's version file merges`;
|
|
13261
|
+
return `Release forecast: this branch ${read.forecast.sentence}` + ` (${by}${read.ref} at ${read.baseVersion}${merged}, ${waitingClause(read.waiting.length)})`;
|
|
13261
13262
|
}
|
|
13262
13263
|
function blockOpen(forecast) {
|
|
13263
13264
|
if (forecast === null || !forecast.ok)
|
|
@@ -13771,6 +13772,11 @@ function formatRows(rows) {
|
|
|
13771
13772
|
`);
|
|
13772
13773
|
}
|
|
13773
13774
|
var FIRST_CHECK_GRACE_MS = 120000;
|
|
13775
|
+
function headTimeOf(detail) {
|
|
13776
|
+
const committedAt = detail?.headCommittedAt ?? null;
|
|
13777
|
+
const ms = committedAt === null ? Number.NaN : Date.parse(committedAt);
|
|
13778
|
+
return Number.isNaN(ms) ? null : ms;
|
|
13779
|
+
}
|
|
13774
13780
|
function defaultSleep(ms) {
|
|
13775
13781
|
return new Promise((resolve12) => {
|
|
13776
13782
|
setTimeout(resolve12, ms);
|
|
@@ -23581,6 +23587,20 @@ function typeCheckLines(recipe) {
|
|
|
23581
23587
|
];
|
|
23582
23588
|
}
|
|
23583
23589
|
|
|
23590
|
+
// packages/rafa-run/src/start/tracker-line.ts
|
|
23591
|
+
import { isAbsolute as isAbsolute12 } from "path";
|
|
23592
|
+
var TRACKER_PROMPT_PREFIX = "The tracker holding this task's line is ";
|
|
23593
|
+
function trackerLines(trackerPath) {
|
|
23594
|
+
if (trackerPath === null)
|
|
23595
|
+
return [];
|
|
23596
|
+
if (!isAbsolute12(trackerPath)) {
|
|
23597
|
+
throw new Error(`The tracker path \`${trackerPath}\` is not absolute; the session may run in a worktree it does not resolve against.`);
|
|
23598
|
+
}
|
|
23599
|
+
return [
|
|
23600
|
+
`${TRACKER_PROMPT_PREFIX}\`${trackerPath}\`, by its absolute path, since a worktree checkout holds no copy of it: write any close-out notes there, indented below this task's line, never as a \`- [ ]\` line (the loop dispatches any such line) and never above this task's line (the loop marks it by its line number).`
|
|
23601
|
+
];
|
|
23602
|
+
}
|
|
23603
|
+
|
|
23584
23604
|
// packages/rafa-run/src/start/dispatch.ts
|
|
23585
23605
|
function runTaskSession(prompt, flags, sessionId, settingSources, served2 = [], cwd, spawn) {
|
|
23586
23606
|
const options = cwd === undefined ? {} : { cwd };
|
|
@@ -23595,10 +23615,11 @@ var NO_TASK_SECTIONS = { skills: "", lessons: "" };
|
|
|
23595
23615
|
function sectionLines(sections) {
|
|
23596
23616
|
return [sections.skills, sections.lessons, sections.inherited].filter((section2) => section2.trim().length > 0).flatMap((section2) => [section2, ""]);
|
|
23597
23617
|
}
|
|
23598
|
-
function buildTaskPrompt(taskText, promptContent, planText, knownMissing = [], blocker = null, sections = NO_TASK_SECTIONS, base2 = null, inherited = [], alwaysRun = [], typeCheck = null) {
|
|
23618
|
+
function buildTaskPrompt(taskText, promptContent, planText, knownMissing = [], blocker = null, sections = NO_TASK_SECTIONS, base2 = null, inherited = [], alwaysRun = [], typeCheck = null, trackerPath = null) {
|
|
23599
23619
|
return [
|
|
23600
23620
|
`Your scoped task is: ${taskText}`,
|
|
23601
23621
|
"Consider tasks listed above this one in the plan checklist as completed. Do not re-evaluate or re-do them. Focus only on the scoped task.",
|
|
23622
|
+
...trackerLines(trackerPath),
|
|
23602
23623
|
...blockerLines(blocker),
|
|
23603
23624
|
...baseLines(base2),
|
|
23604
23625
|
...alwaysRunLines(alwaysRun),
|
|
@@ -23647,7 +23668,7 @@ async function dispatchTask(options) {
|
|
|
23647
23668
|
const resolution = options.serving === null ? EMPTY_RESOLUTION : resolveSessionTiers(options.serving);
|
|
23648
23669
|
const task = taskInputFor(taskInfo, taskText, declaration, options.planContent);
|
|
23649
23670
|
const handed = await handOut(options.handout, task, resolution, options.repoRoot);
|
|
23650
|
-
const prompt = withStamp(buildTaskPrompt(taskText, docTaskPrompt(options.promptContent, { ...options, declaration, place: options.docTask }), injection.text, options.knownMissing, taskInfo.blocker ?? null, { skills: renderSkillsSection(handed.skills), lessons: renderLessonsSection(handed.lessons) }, options.base, options.inherited, options.alwaysRun, options.typeCheck ?? null));
|
|
23671
|
+
const prompt = withStamp(buildTaskPrompt(taskText, docTaskPrompt(options.promptContent, { ...options, declaration, place: options.docTask }), injection.text, options.knownMissing, taskInfo.blocker ?? null, { skills: renderSkillsSection(handed.skills), lessons: renderLessonsSection(handed.lessons) }, options.base, options.inherited, options.alwaysRun, options.typeCheck ?? null, options.trackerPath ?? null));
|
|
23651
23672
|
const served2 = serveForSession(options.serving, resolution);
|
|
23652
23673
|
const record = {
|
|
23653
23674
|
taskText,
|
|
@@ -24128,16 +24149,18 @@ async function verifyAttempt(io, branch, timeoutMs, isLastAttempt) {
|
|
|
24128
24149
|
const merge2 = await io.pulls.get(prNumber);
|
|
24129
24150
|
return result.verdict === "none" ? handleNoChecks(io, branch, prNumber, merge2) : handleRedChecks(io, branch, prNumber, result.rows);
|
|
24130
24151
|
}
|
|
24131
|
-
function pollChecks(io, prNumber, timeoutMs) {
|
|
24152
|
+
async function pollChecks(io, prNumber, timeoutMs) {
|
|
24132
24153
|
io.phases.ciStarted();
|
|
24133
24154
|
activeOutput().info(`
|
|
24134
24155
|
\u23F3 Waiting for CI on PR #${prNumber} (up to ${Math.round(timeoutMs / 60000)} min)...`);
|
|
24156
|
+
const headCommittedAtMs = headTimeOf(await io.pulls.get(prNumber));
|
|
24135
24157
|
return waitForChecks({
|
|
24136
24158
|
probe: async () => (await io.pulls.checks(prNumber)).rows,
|
|
24137
24159
|
timeoutMs,
|
|
24138
24160
|
intervalMs: CI_POLL_INTERVAL_MS,
|
|
24139
24161
|
now: io.now,
|
|
24140
24162
|
sleep: io.sleep,
|
|
24163
|
+
...headCommittedAtMs === null ? {} : { headCommittedAtMs },
|
|
24141
24164
|
onPoll: (rows, verdict, elapsedMs) => {
|
|
24142
24165
|
const secs = Math.round(elapsedMs / 1000);
|
|
24143
24166
|
activeOutput().info(` [${secs}s] ${verdict} \u2014 ${rows.length} check(s)`);
|
|
@@ -25414,7 +25437,7 @@ async function readPlanOwns(options) {
|
|
|
25414
25437
|
|
|
25415
25438
|
// packages/rafa-run/src/suite/scope.ts
|
|
25416
25439
|
import { existsSync as existsSync36, readdirSync as readdirSync11, readFileSync as readFileSync34 } from "fs";
|
|
25417
|
-
import { isAbsolute as
|
|
25440
|
+
import { isAbsolute as isAbsolute13, join as join44, relative as relative15, sep as sep7 } from "path";
|
|
25418
25441
|
var BUNFIG_FILE = "bunfig.toml";
|
|
25419
25442
|
var TEST_FILE_NAME = /[._](?:test|spec)\.(?:tsx?|jsx?|[cm][jt]s)$/;
|
|
25420
25443
|
var DEPENDENCY_FOLDER = "node_modules";
|
|
@@ -25422,9 +25445,9 @@ function sortedUnique(paths) {
|
|
|
25422
25445
|
return [...new Set(paths)].sort((a, b) => a.localeCompare(b));
|
|
25423
25446
|
}
|
|
25424
25447
|
function preloadPath(root, entry) {
|
|
25425
|
-
const path3 =
|
|
25448
|
+
const path3 = isAbsolute13(entry) ? relative15(root, entry).split(sep7).join("/") : entry;
|
|
25426
25449
|
const repoRelative2 = normaliseFolder(path3);
|
|
25427
|
-
if (repoRelative2 === "" ||
|
|
25450
|
+
if (repoRelative2 === "" || isAbsolute13(repoRelative2))
|
|
25428
25451
|
return null;
|
|
25429
25452
|
return repoRelative2.split("/").includes("..") ? null : repoRelative2;
|
|
25430
25453
|
}
|
|
@@ -27751,9 +27774,13 @@ function fragmentNotesIn(checkout, fragment) {
|
|
|
27751
27774
|
const reading = parseFragment(text);
|
|
27752
27775
|
return reading.ok ? reading.fragment.notes : [];
|
|
27753
27776
|
}
|
|
27754
|
-
function
|
|
27777
|
+
function closedIssues(issue4, closes) {
|
|
27778
|
+
return [...new Set([issue4, ...closes])];
|
|
27779
|
+
}
|
|
27780
|
+
function runnerPullRequestBody(issue4, closes, notes) {
|
|
27755
27781
|
const section2 = notes.length === 0 ? [] : [RELEASE_NOTES_HEADING, "", ...notes, ""];
|
|
27756
|
-
|
|
27782
|
+
const closing = closedIssues(issue4, closes).map((closed) => `Closes #${String(closed)}`);
|
|
27783
|
+
return [...closing, "", ...section2, UNFINISHED_WRAP_UP_LINE].join(`
|
|
27757
27784
|
`);
|
|
27758
27785
|
}
|
|
27759
27786
|
function blocked2(branch, step2, detail) {
|
|
@@ -27772,11 +27799,11 @@ function dirtyDetail(entries) {
|
|
|
27772
27799
|
].join(`
|
|
27773
27800
|
`);
|
|
27774
27801
|
}
|
|
27775
|
-
async function refreshAfterOpen(seams,
|
|
27802
|
+
async function refreshAfterOpen(seams, issues) {
|
|
27776
27803
|
try {
|
|
27777
|
-
return await seams.refreshProject(
|
|
27804
|
+
return await seams.refreshProject(issues);
|
|
27778
27805
|
} catch (error) {
|
|
27779
|
-
return [refreshFailedWarning(
|
|
27806
|
+
return [refreshFailedWarning(issues[0] ?? 0, error)];
|
|
27780
27807
|
}
|
|
27781
27808
|
}
|
|
27782
27809
|
async function openRunnerPullRequest(input, seams) {
|
|
@@ -27797,19 +27824,19 @@ async function openRunnerPullRequest(input, seams) {
|
|
|
27797
27824
|
head: branch,
|
|
27798
27825
|
base: input.base,
|
|
27799
27826
|
title: pullRequestTitle(input.issue, input.planTitle),
|
|
27800
|
-
body: runnerPullRequestBody(input.issue, input.notes)
|
|
27827
|
+
body: runnerPullRequestBody(input.issue, input.closes, input.notes)
|
|
27801
27828
|
});
|
|
27802
27829
|
} catch (error) {
|
|
27803
27830
|
return blocked2(branch, "create", messageOf(error));
|
|
27804
27831
|
}
|
|
27805
|
-
return { kind: "opened", pull, warnings: await refreshAfterOpen(seams, input.issue) };
|
|
27832
|
+
return { kind: "opened", pull, warnings: await refreshAfterOpen(seams, closedIssues(input.issue, input.closes)) };
|
|
27806
27833
|
}
|
|
27807
27834
|
|
|
27808
27835
|
// packages/rafa-run/src/start/wrap-up.ts
|
|
27809
27836
|
import { posix as posix7 } from "path";
|
|
27810
27837
|
|
|
27811
27838
|
// packages/rafa-run/src/start/promoted-check.ts
|
|
27812
|
-
import { isAbsolute as
|
|
27839
|
+
import { isAbsolute as isAbsolute14, posix as posix6, relative as relative18 } from "path";
|
|
27813
27840
|
|
|
27814
27841
|
// packages/rafa-run/src/start/promoted.ts
|
|
27815
27842
|
var PROMOTED_BLOCK_KIND = "promoted";
|
|
@@ -27900,9 +27927,9 @@ function changedSince(git, head) {
|
|
|
27900
27927
|
return { ok: true, head, paths: new Set(paths) };
|
|
27901
27928
|
}
|
|
27902
27929
|
function repoPath3(path4, repoRoot) {
|
|
27903
|
-
const inside =
|
|
27930
|
+
const inside = isAbsolute14(path4) ? relative18(repoRoot, path4) : path4;
|
|
27904
27931
|
const normal = posix6.normalize(inside.replaceAll("\\", "/"));
|
|
27905
|
-
if (normal === "." || normal === ".." || normal.startsWith("../") ||
|
|
27932
|
+
if (normal === "." || normal === ".." || normal.startsWith("../") || isAbsolute14(normal))
|
|
27906
27933
|
return null;
|
|
27907
27934
|
return normal.replace(/^(\.\/)+/, "");
|
|
27908
27935
|
}
|
|
@@ -28061,7 +28088,7 @@ function pullRequestNamingBullets(branch, provider) {
|
|
|
28061
28088
|
return [
|
|
28062
28089
|
"* Find the plan's issue number `<n>`: the plan below carries it in its `rafa:plan` block as `issue: <n>`.",
|
|
28063
28090
|
`* If the plan carries no \`issue:\` field, read the number from the branch name (${branch}), which is the \`naming.branch\` template with the plan's stub, \`feat/rafa-<n>-<slug>\` by default.`,
|
|
28064
|
-
|
|
28091
|
+
"* Title the PR `rafa-<n>: <title>`, taking `<title>` from the plan title, e.g. \"rafa-20: Add pull-request commands\". Open the PR body with `Closes #<n>` \u2014 the GitHub issue number on its own, never `#rafa-<n>`, since the `rafa-` prefix is this project's naming convention and not a GitHub alias. Below `Closes #<n>`, write one more `Closes #<m>` line for each number `<m>` of the plan's `closes:` list, in its `rafa:plan` block, never writing a number twice and writing none when the plan has no `closes:` list. If no number was found, title the PR with the plan title alone and write no closing line rather than inventing one.",
|
|
28065
28092
|
"* Create a concise yet descriptive PR description that summarizes the overall work done based on the completed plan and progress notes."
|
|
28066
28093
|
];
|
|
28067
28094
|
}
|
|
@@ -28417,6 +28444,7 @@ function runnerPrInputFor(source) {
|
|
|
28417
28444
|
branch: source.branch,
|
|
28418
28445
|
base: source.base,
|
|
28419
28446
|
issue: issue4,
|
|
28447
|
+
closes: parsePlan(source.planContent).header.closes,
|
|
28420
28448
|
planTitle: planTitleIn(source.planContent, source.planStub),
|
|
28421
28449
|
notes: source.notes
|
|
28422
28450
|
};
|
|
@@ -28498,7 +28526,7 @@ import { fileURLToPath as fileURLToPath5 } from "url";
|
|
|
28498
28526
|
|
|
28499
28527
|
// src/commands/plan/bundled-check.ts
|
|
28500
28528
|
import { readdirSync as readdirSync12, readFileSync as readFileSync40, realpathSync as realpathSync6, statSync as statSync10, writeFileSync as writeFileSync13 } from "fs";
|
|
28501
|
-
import { basename as basename15, isAbsolute as
|
|
28529
|
+
import { basename as basename15, isAbsolute as isAbsolute15, join as join49, relative as relative19, resolve as resolve21, sep as sep8 } from "path";
|
|
28502
28530
|
var SOURCE_DIR2 = "src";
|
|
28503
28531
|
var CODE_SPAN6 = /`([^`]+)`/gu;
|
|
28504
28532
|
var PATH_LIKE = /^\S+$/u;
|
|
@@ -28534,7 +28562,7 @@ function skillHolding(bundle, realPath2) {
|
|
|
28534
28562
|
if (bundle.skillsRoot === null)
|
|
28535
28563
|
return null;
|
|
28536
28564
|
const inside = relative19(bundle.skillsRoot, realPath2);
|
|
28537
|
-
if (inside === "" || inside.startsWith("..") ||
|
|
28565
|
+
if (inside === "" || inside.startsWith("..") || isAbsolute15(inside))
|
|
28538
28566
|
return null;
|
|
28539
28567
|
const name = inside.split(sep8)[0] ?? "";
|
|
28540
28568
|
return bundle.skills.includes(name) ? name : null;
|
|
@@ -28866,7 +28894,7 @@ function createPlanBlockedOffer(seams = DEFAULT_BLOCKED_SEAMS) {
|
|
|
28866
28894
|
|
|
28867
28895
|
// src/commands/plan/ready-offer.ts
|
|
28868
28896
|
var runIssueReadyLazily = async (options) => {
|
|
28869
|
-
const { runIssueReady: run } = await import("./ready-
|
|
28897
|
+
const { runIssueReady: run } = await import("./ready-kac4ty0p.js");
|
|
28870
28898
|
return run(options);
|
|
28871
28899
|
};
|
|
28872
28900
|
var DEFAULT_OFFER_SEAMS = Object.freeze({});
|
|
@@ -29737,6 +29765,7 @@ async function start(args, repoRoot) {
|
|
|
29737
29765
|
serving,
|
|
29738
29766
|
handout,
|
|
29739
29767
|
base: base2,
|
|
29768
|
+
trackerPath,
|
|
29740
29769
|
guard: { expected: expected2, trackerPath },
|
|
29741
29770
|
docTask: { planStub, prBase: runConfig.config.prBase }
|
|
29742
29771
|
});
|
package/dist/plan/index.js
CHANGED
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
renderInjection,
|
|
14
14
|
runPreflight,
|
|
15
15
|
runShellProbe
|
|
16
|
-
} from "../index-
|
|
16
|
+
} from "../index-amevawhe.js";
|
|
17
17
|
import {
|
|
18
18
|
PLAN_BLOCK_KINDS,
|
|
19
19
|
PLAN_HEADER_FIELDS,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
isRafaBlockKind,
|
|
22
22
|
parsePlan,
|
|
23
23
|
readRafaBlocks
|
|
24
|
-
} from "../index-
|
|
24
|
+
} from "../index-n2r3wf2z.js";
|
|
25
25
|
import"../index-2a7nb3an.js";
|
|
26
26
|
import {
|
|
27
27
|
INJECT_MODES
|
package/dist/plan-prompt.md
CHANGED
|
@@ -15,6 +15,7 @@ ID appears as `rafa-<n>`.
|
|
|
15
15
|
| Git branch | `feat/rafa-<n>-<slug>` | `feat/rafa-20-pr-commands` |
|
|
16
16
|
| Pull request title | `rafa-<n>: <title>` | `rafa-20: Add pull-request commands` |
|
|
17
17
|
| Pull request body | `Closes #<n>` | `Closes #20` |
|
|
18
|
+
| `closes:` field in `rafa:plan` | a list of issue numbers, one `Closes #<m>` line each | `closes: [1444, 1479]` |
|
|
18
19
|
|
|
19
20
|
The slug summarizes what the user gets, using two to four words joined by
|
|
20
21
|
hyphens. The order of work lives in ONE place: the pinned "Roadmap" issue
|
|
@@ -24,14 +24,14 @@ import {
|
|
|
24
24
|
requireCompleteSpec,
|
|
25
25
|
requireTrustedBoardAuthor,
|
|
26
26
|
typeOfLabels
|
|
27
|
-
} from "./index-
|
|
28
|
-
import"./index-
|
|
27
|
+
} from "./index-4wy2nmyt.js";
|
|
28
|
+
import"./index-n2r3wf2z.js";
|
|
29
29
|
import {
|
|
30
30
|
CommandExit,
|
|
31
31
|
createGitRunner,
|
|
32
32
|
createLinePrompter,
|
|
33
33
|
lazyPrompter
|
|
34
|
-
} from "./index-
|
|
34
|
+
} from "./index-4dwaxd5r.js";
|
|
35
35
|
import"./index-2a7nb3an.js";
|
|
36
36
|
import"./index-jjxnyqvy.js";
|
|
37
37
|
import"./index-m672ptpg.js";
|
package/dist/report/parse.d.ts
CHANGED
|
@@ -125,7 +125,9 @@
|
|
|
125
125
|
*
|
|
126
126
|
* - `module`: the part of the code the bug sits in.
|
|
127
127
|
* - `action`: what was being done when it showed.
|
|
128
|
-
* - `reproduce`:
|
|
128
|
+
* - `reproduce`: one command run from the checkout root whose output
|
|
129
|
+
* or exit code shows the bug; prose naming the condition only when
|
|
130
|
+
* no command can show it.
|
|
129
131
|
* - `cause`: why it happens, as a cause code or in words.
|
|
130
132
|
*
|
|
131
133
|
* Whether `cause` is a code or a sentence is the cause rule's business,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-tomato/rafa",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.52.1",
|
|
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": {
|
|
@@ -32,7 +32,8 @@
|
|
|
32
32
|
"packageManager": "bun@1.3.14",
|
|
33
33
|
"type": "module",
|
|
34
34
|
"workspaces": [
|
|
35
|
-
"packages/*"
|
|
35
|
+
"packages/*",
|
|
36
|
+
"addons/atlas/*"
|
|
36
37
|
],
|
|
37
38
|
"module": "./dist/index.js",
|
|
38
39
|
"bin": {
|
|
@@ -131,7 +132,7 @@
|
|
|
131
132
|
"prepack": "bun run build",
|
|
132
133
|
"test": "bun test",
|
|
133
134
|
"lint": "eslint .",
|
|
134
|
-
"check-types": "tsc --noEmit && bun run --filter './packages/*' check-types",
|
|
135
|
+
"check-types": "tsc --noEmit && bun run --filter './packages/*' check-types && bun run --filter './addons/atlas/*' check-types",
|
|
135
136
|
"verify:affected": "turbo run lint check-types test --affected",
|
|
136
137
|
"codeowners": "bun scripts/codeowners.ts",
|
|
137
138
|
"gate:control-bytes": "bun scripts/control-byte-gate/control-byte-gate.ts",
|
|
@@ -140,30 +141,21 @@
|
|
|
140
141
|
"device:check": "bash scripts/device/check.sh"
|
|
141
142
|
},
|
|
142
143
|
"devDependencies": {
|
|
143
|
-
"@eslint/js": "^9.39.4",
|
|
144
|
-
"@eslint/markdown": "^8.0.3",
|
|
145
144
|
"@open-tomato/define-config": "0.5.0",
|
|
145
|
+
"@open-tomato/eslint-config": "^0.1.0",
|
|
146
|
+
"@open-tomato/eslint-plugin": "^0.1.0",
|
|
146
147
|
"@open-tomato/rafa-board": "workspace:*",
|
|
147
148
|
"@open-tomato/rafa-core": "workspace:*",
|
|
148
149
|
"@open-tomato/rafa-effort": "workspace:*",
|
|
149
|
-
"@open-tomato/rafa-eslint-config": "workspace:*",
|
|
150
150
|
"@open-tomato/rafa-inventory": "workspace:*",
|
|
151
151
|
"@open-tomato/rafa-pr": "workspace:*",
|
|
152
152
|
"@open-tomato/rafa-release": "workspace:*",
|
|
153
153
|
"@open-tomato/rafa-run": "workspace:*",
|
|
154
|
-
"@open-tomato/
|
|
155
|
-
"@stylistic/eslint-plugin": "^5.10.0",
|
|
154
|
+
"@open-tomato/typescript-config": "^0.1.0",
|
|
156
155
|
"@types/bun": "^1.4.0",
|
|
157
156
|
"@types/node": "^26.4.1",
|
|
158
|
-
"@typescript-eslint/parser": "^8.69.0",
|
|
159
157
|
"eslint": "^9.39.4",
|
|
160
|
-
"eslint-import-resolver-typescript": "^4.4.4",
|
|
161
|
-
"eslint-plugin-import": "^2.32.0",
|
|
162
|
-
"eslint-plugin-jsonc": "^3.4.2",
|
|
163
|
-
"globals": "^17.12.0",
|
|
164
|
-
"jsonc-eslint-parser": "^3.1.0",
|
|
165
158
|
"turbo": "^2.11.8",
|
|
166
|
-
"typescript": "^5.9.3"
|
|
167
|
-
"typescript-eslint": "^8.69.0"
|
|
159
|
+
"typescript": "^5.9.3"
|
|
168
160
|
}
|
|
169
|
-
}
|
|
161
|
+
}
|