@slowcook-ai/cli 0.5.0 → 0.5.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/cli.js +6 -0
- package/dist/cli.js.map +1 -1
- package/dist/commands/catchup/detect.d.ts +28 -0
- package/dist/commands/catchup/detect.d.ts.map +1 -0
- package/dist/commands/catchup/detect.js +130 -0
- package/dist/commands/catchup/detect.js.map +1 -0
- package/dist/commands/catchup/index.d.ts +2 -0
- package/dist/commands/catchup/index.d.ts.map +1 -0
- package/dist/commands/catchup/index.js +157 -0
- package/dist/commands/catchup/index.js.map +1 -0
- package/dist/commands/init/templates.d.ts +1 -1
- package/dist/commands/init/templates.js +1 -1
- package/dist/commands/refine/spec-yaml.d.ts +10 -10
- package/package.json +4 -4
package/dist/cli.js
CHANGED
|
@@ -8,6 +8,7 @@ import { init } from "./commands/init/index.js";
|
|
|
8
8
|
import { refine } from "./commands/refine/index.js";
|
|
9
9
|
import { onSpecMerged } from "./commands/on-spec-merged/index.js";
|
|
10
10
|
import { testgen } from "./commands/testgen/index.js";
|
|
11
|
+
import { catchup } from "./commands/catchup/index.js";
|
|
11
12
|
// Read VERSION from package.json at runtime so the CLI's self-reported
|
|
12
13
|
// version, the spec's `refined_by` field, and the init template's workflow
|
|
13
14
|
// pin all stay in lockstep with the package version. Prevents the silent
|
|
@@ -35,6 +36,7 @@ Usage:
|
|
|
35
36
|
slowcook refine --issue <number> [--cwd <path>] [--owner <login>] [--repo <name>]
|
|
36
37
|
slowcook on-spec-merged --pr <number> [--cwd <path>]
|
|
37
38
|
slowcook testgen [--spec <id>] [--all] [--cwd <path>]
|
|
39
|
+
slowcook catchup [--dry-run] [--cwd <path>]
|
|
38
40
|
slowcook version
|
|
39
41
|
slowcook help
|
|
40
42
|
|
|
@@ -45,6 +47,7 @@ Commands available in ${VERSION}:
|
|
|
45
47
|
refine Drive a GitHub issue toward a frozen spec (refinement agent).
|
|
46
48
|
on-spec-merged Transition source-issue labels after a spec PR merges.
|
|
47
49
|
testgen Generate Vitest integration tests from merged specs.
|
|
50
|
+
catchup Detect + run pipeline steps that should have triggered but didn't.
|
|
48
51
|
|
|
49
52
|
Coming in later versions:
|
|
50
53
|
brew, review, dashboard
|
|
@@ -73,6 +76,9 @@ async function main() {
|
|
|
73
76
|
case "testgen":
|
|
74
77
|
await testgen(args.slice(1), VERSION);
|
|
75
78
|
return;
|
|
79
|
+
case "catchup":
|
|
80
|
+
await catchup(args.slice(1), VERSION);
|
|
81
|
+
return;
|
|
76
82
|
case "version":
|
|
77
83
|
case "--version":
|
|
78
84
|
case "-v":
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAEtD,uEAAuE;AACvE,2EAA2E;AAC3E,yEAAyE;AACzE,uEAAuE;AACvE,yBAAyB;AACzB,MAAM,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAC1D,MAAM,eAAe,GAAG,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC;AAC9D,MAAM,OAAO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AO,CAAC,CAAC;YACtC,OAAO;QACT,KAAK,SAAS;YACZ,MAAM,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;YACtC,OAAO;QACT,KAAK,SAAS,CAAC;QACf,KAAK,WAAW,CAAC;QACjB,KAAK,IAAI;YACP,OAAO,CAAC,GAAG,CAAC,YAAY,OAAO,EAAE,CAAC,CAAC;YACnC,OAAO;QACT,KAAK,SAAS,CAAC;QACf,KAAK,MAAM,CAAC;QACZ,KAAK,QAAQ,CAAC;QACd,KAAK,IAAI;YACP,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACnB,OAAO;QACT;YACE,OAAO,CAAC,KAAK,CAAC,oBAAoB,OAAO,KAAK,KAAK,EAAE,CAAC,CAAC;YACvD,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW;IACjC,CAAC;AACH,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAY,EAAE,EAAE;IAC5B,OAAO,CAAC,KAAK,CAAC,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;IAC7E,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ForgeAdapter } from "@slowcook-ai/core";
|
|
2
|
+
export interface PendingRefinement {
|
|
3
|
+
issueNumber: number;
|
|
4
|
+
title: string;
|
|
5
|
+
/** Whether any agent comment has been posted already. */
|
|
6
|
+
hasAgentComments: boolean;
|
|
7
|
+
reason: string;
|
|
8
|
+
}
|
|
9
|
+
export interface PendingOnSpecMerged {
|
|
10
|
+
storyId: string;
|
|
11
|
+
prNumber: number;
|
|
12
|
+
sourceIssueNumber: number;
|
|
13
|
+
reason: string;
|
|
14
|
+
}
|
|
15
|
+
export interface PendingTestgen {
|
|
16
|
+
storyId: string;
|
|
17
|
+
title: string;
|
|
18
|
+
reason: string;
|
|
19
|
+
}
|
|
20
|
+
export interface PipelineState {
|
|
21
|
+
pendingRefinements: PendingRefinement[];
|
|
22
|
+
pendingOnSpecMerged: PendingOnSpecMerged[];
|
|
23
|
+
pendingTestgen: PendingTestgen[];
|
|
24
|
+
}
|
|
25
|
+
export declare function detectPipelineState(forge: ForgeAdapter, repoRoot: string): Promise<PipelineState>;
|
|
26
|
+
/** Human-readable report of a PipelineState. */
|
|
27
|
+
export declare function formatReport(state: PipelineState): string;
|
|
28
|
+
//# sourceMappingURL=detect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"detect.d.ts","sourceRoot":"","sources":["../../../src/commands/catchup/detect.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAS,MAAM,mBAAmB,CAAC;AAG7D,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,yDAAyD;IACzD,gBAAgB,EAAE,OAAO,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,aAAa;IAC5B,kBAAkB,EAAE,iBAAiB,EAAE,CAAC;IACxC,mBAAmB,EAAE,mBAAmB,EAAE,CAAC;IAC3C,cAAc,EAAE,cAAc,EAAE,CAAC;CAClC;AAED,wBAAsB,mBAAmB,CACvC,KAAK,EAAE,YAAY,EACnB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,aAAa,CAAC,CAOxB;AAgFD,gDAAgD;AAChD,wBAAgB,YAAY,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,CAsCzD"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
// Pure detection: given a forge + local spec state, what pipeline steps
|
|
2
|
+
// should have run but haven't? Results are returned as a structured report
|
|
3
|
+
// so the CLI can print and/or act on them.
|
|
4
|
+
import { existsSync } from "node:fs";
|
|
5
|
+
import { join } from "node:path";
|
|
6
|
+
import { readIndex } from "../refine/spec-yaml.js";
|
|
7
|
+
export async function detectPipelineState(forge, repoRoot) {
|
|
8
|
+
const [pendingRefinements, pendingOnSpecMerged, pendingTestgen] = await Promise.all([
|
|
9
|
+
detectPendingRefinements(forge),
|
|
10
|
+
detectPendingOnSpecMerged(forge, repoRoot),
|
|
11
|
+
detectPendingTestgen(repoRoot),
|
|
12
|
+
]);
|
|
13
|
+
return { pendingRefinements, pendingOnSpecMerged, pendingTestgen };
|
|
14
|
+
}
|
|
15
|
+
async function detectPendingRefinements(forge) {
|
|
16
|
+
const issues = await forge.listIssuesByLabel("needs-refinement", "open");
|
|
17
|
+
const bot = await forge.botUsername();
|
|
18
|
+
const pending = [];
|
|
19
|
+
for (const issue of issues) {
|
|
20
|
+
const comments = await forge.listIssueComments(issue.number);
|
|
21
|
+
const agentComments = comments.filter((c) => c.is_bot || c.author === bot || c.body.startsWith("### slowcook"));
|
|
22
|
+
// If agent has commented, refinement is "in progress" — next PM reply
|
|
23
|
+
// will re-trigger the webhook normally. Still surface these, but tagged.
|
|
24
|
+
pending.push({
|
|
25
|
+
issueNumber: issue.number,
|
|
26
|
+
title: issue.title,
|
|
27
|
+
hasAgentComments: agentComments.length > 0,
|
|
28
|
+
reason: agentComments.length === 0
|
|
29
|
+
? "no agent comments — trigger was likely missed"
|
|
30
|
+
: `${agentComments.length} agent comment(s) — in progress, waiting on PM`,
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
return pending;
|
|
34
|
+
}
|
|
35
|
+
async function detectPendingOnSpecMerged(forge, repoRoot) {
|
|
36
|
+
const index = readIndex(repoRoot);
|
|
37
|
+
const pending = [];
|
|
38
|
+
for (const [storyId, entry] of Object.entries(index.stories)) {
|
|
39
|
+
if (entry.status !== "active")
|
|
40
|
+
continue;
|
|
41
|
+
if (!entry.source_issue)
|
|
42
|
+
continue;
|
|
43
|
+
const sourceIssueNumber = parseInt(entry.source_issue.replace(/^#/, ""), 10);
|
|
44
|
+
if (isNaN(sourceIssueNumber))
|
|
45
|
+
continue;
|
|
46
|
+
// If the source issue is already `spec-ready`, nothing to do.
|
|
47
|
+
let issue;
|
|
48
|
+
try {
|
|
49
|
+
issue = await forge.getIssue(sourceIssueNumber);
|
|
50
|
+
}
|
|
51
|
+
catch {
|
|
52
|
+
continue;
|
|
53
|
+
}
|
|
54
|
+
if (issue.labels.includes("spec-ready"))
|
|
55
|
+
continue;
|
|
56
|
+
// Only flag if there's actually a merged spec PR for this branch —
|
|
57
|
+
// otherwise the issue's pre-spec state (spec-submitted, etc.) is real
|
|
58
|
+
// and we'd just be labelling mid-flight work as "pending."
|
|
59
|
+
const branchName = `slowcook/spec/story-${storyId}`;
|
|
60
|
+
const pr = await forge.findPullRequestByBranch(branchName);
|
|
61
|
+
if (!pr)
|
|
62
|
+
continue;
|
|
63
|
+
if (!pr.merged)
|
|
64
|
+
continue;
|
|
65
|
+
pending.push({
|
|
66
|
+
storyId,
|
|
67
|
+
prNumber: pr.number,
|
|
68
|
+
sourceIssueNumber,
|
|
69
|
+
reason: `PR #${pr.number} merged but issue #${sourceIssueNumber} still has labels [${issue.labels.join(", ")}]`,
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
return pending;
|
|
73
|
+
}
|
|
74
|
+
async function detectPendingTestgen(repoRoot) {
|
|
75
|
+
const index = readIndex(repoRoot);
|
|
76
|
+
const pending = [];
|
|
77
|
+
for (const [storyId, entry] of Object.entries(index.stories)) {
|
|
78
|
+
if (entry.status !== "active")
|
|
79
|
+
continue;
|
|
80
|
+
const testPath = join(repoRoot, "tests", "integration", `story-${storyId}.test.ts`);
|
|
81
|
+
if (existsSync(testPath))
|
|
82
|
+
continue;
|
|
83
|
+
pending.push({
|
|
84
|
+
storyId,
|
|
85
|
+
title: entry.title,
|
|
86
|
+
reason: `${testPath.replace(repoRoot + "/", "")} does not exist`,
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
return pending;
|
|
90
|
+
}
|
|
91
|
+
/** Human-readable report of a PipelineState. */
|
|
92
|
+
export function formatReport(state) {
|
|
93
|
+
const lines = [];
|
|
94
|
+
lines.push("=== Pipeline catchup report ===");
|
|
95
|
+
lines.push("");
|
|
96
|
+
lines.push("Pending refinements (manual — bounce the `needs-refinement` label to re-trigger):");
|
|
97
|
+
if (state.pendingRefinements.length === 0) {
|
|
98
|
+
lines.push(" (none)");
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
for (const r of state.pendingRefinements) {
|
|
102
|
+
const tag = r.hasAgentComments ? "[in progress]" : "[MISSED TRIGGER]";
|
|
103
|
+
lines.push(` ${tag} #${r.issueNumber} — ${r.title}`);
|
|
104
|
+
lines.push(` reason: ${r.reason}`);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
lines.push("");
|
|
108
|
+
lines.push("Pending on-spec-merged (auto):");
|
|
109
|
+
if (state.pendingOnSpecMerged.length === 0) {
|
|
110
|
+
lines.push(" (none)");
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
for (const p of state.pendingOnSpecMerged) {
|
|
114
|
+
lines.push(` story-${p.storyId}: ${p.reason}`);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
lines.push("");
|
|
118
|
+
lines.push("Pending testgen (auto):");
|
|
119
|
+
if (state.pendingTestgen.length === 0) {
|
|
120
|
+
lines.push(" (none)");
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
for (const t of state.pendingTestgen) {
|
|
124
|
+
lines.push(` story-${t.storyId}: ${t.title}`);
|
|
125
|
+
lines.push(` reason: ${t.reason}`);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
return lines.join("\n");
|
|
129
|
+
}
|
|
130
|
+
//# sourceMappingURL=detect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"detect.js","sourceRoot":"","sources":["../../../src/commands/catchup/detect.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,2EAA2E;AAC3E,2CAA2C;AAE3C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AA6BnD,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,KAAmB,EACnB,QAAgB;IAEhB,MAAM,CAAC,kBAAkB,EAAE,mBAAmB,EAAE,cAAc,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QAClF,wBAAwB,CAAC,KAAK,CAAC;QAC/B,yBAAyB,CAAC,KAAK,EAAE,QAAQ,CAAC;QAC1C,oBAAoB,CAAC,QAAQ,CAAC;KAC/B,CAAC,CAAC;IACH,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,cAAc,EAAE,CAAC;AACrE,CAAC;AAED,KAAK,UAAU,wBAAwB,CAAC,KAAmB;IACzD,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,iBAAiB,CAAC,kBAAkB,EAAE,MAAM,CAAC,CAAC;IACzE,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,WAAW,EAAE,CAAC;IACtC,MAAM,OAAO,GAAwB,EAAE,CAAC;IACxC,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC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C,OAAO,KAAK,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;QAClD,CAAC;IACH,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,KAAK,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAC;IACtC,IAAI,KAAK,CAAC,cAAc,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACtC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACzB,CAAC;SAAM,CAAC;QACN,KAAK,MAAM,CAAC,IAAI,KAAK,CAAC,cAAc,EAAE,CAAC;YACrC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC;YAC/C,KAAK,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;QAC1C,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/catchup/index.ts"],"names":[],"mappings":"AA8FA,wBAAsB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAuE/E"}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { execSync } from "node:child_process";
|
|
2
|
+
import { GitHubAdapter } from "@slowcook-ai/forge-github";
|
|
3
|
+
import { detectPipelineState, formatReport } from "./detect.js";
|
|
4
|
+
import { onSpecMerged } from "../on-spec-merged/index.js";
|
|
5
|
+
import { testgen } from "../testgen/index.js";
|
|
6
|
+
function parseArgs(argv) {
|
|
7
|
+
const args = {
|
|
8
|
+
dryRun: false,
|
|
9
|
+
repoRoot: process.cwd(),
|
|
10
|
+
baseBranch: "main",
|
|
11
|
+
};
|
|
12
|
+
for (let i = 0; i < argv.length; i++) {
|
|
13
|
+
const arg = argv[i];
|
|
14
|
+
const next = argv[i + 1];
|
|
15
|
+
if (arg === "--dry-run")
|
|
16
|
+
args.dryRun = true;
|
|
17
|
+
else if (arg === "--cwd" && next) {
|
|
18
|
+
args.repoRoot = next;
|
|
19
|
+
i++;
|
|
20
|
+
}
|
|
21
|
+
else if (arg === "--owner" && next) {
|
|
22
|
+
args.owner = next;
|
|
23
|
+
i++;
|
|
24
|
+
}
|
|
25
|
+
else if (arg === "--repo" && next) {
|
|
26
|
+
args.repo = next;
|
|
27
|
+
i++;
|
|
28
|
+
}
|
|
29
|
+
else if (arg === "--base" && next) {
|
|
30
|
+
args.baseBranch = next;
|
|
31
|
+
i++;
|
|
32
|
+
}
|
|
33
|
+
else if (arg === "--help" || arg === "-h") {
|
|
34
|
+
printHelp();
|
|
35
|
+
process.exit(0);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return args;
|
|
39
|
+
}
|
|
40
|
+
function printHelp() {
|
|
41
|
+
console.log(`
|
|
42
|
+
slowcook catchup — detect and run pipeline steps that should have triggered
|
|
43
|
+
|
|
44
|
+
Scans the repo for "missed triggers" — state that's out of sync with what
|
|
45
|
+
the pipeline should have produced — and runs the corresponding commands
|
|
46
|
+
to bring everything back in sync. Useful after:
|
|
47
|
+
|
|
48
|
+
- a workflow run failed and the state machine stalled
|
|
49
|
+
- secrets were added/rotated (prior pushes didn't have auth)
|
|
50
|
+
- a permission toggle changed (prior pushes got 403)
|
|
51
|
+
- you manually merged something outside the automated flow
|
|
52
|
+
|
|
53
|
+
Three categories detected:
|
|
54
|
+
|
|
55
|
+
1. Pending refinements — issues with \`needs-refinement\` label
|
|
56
|
+
(surfaced only; re-triggering needs the PM to bounce the label)
|
|
57
|
+
2. Pending on-spec-merged — spec PRs that merged but whose source
|
|
58
|
+
issue still has \`spec-submitted\` (auto-run)
|
|
59
|
+
3. Pending testgen — active specs without corresponding
|
|
60
|
+
\`tests/integration/story-N.test.ts\` (auto-run)
|
|
61
|
+
|
|
62
|
+
Usage:
|
|
63
|
+
slowcook catchup [options]
|
|
64
|
+
|
|
65
|
+
Options:
|
|
66
|
+
--dry-run Print the report; don't run any commands
|
|
67
|
+
--cwd <path> Repo working directory (default: .)
|
|
68
|
+
--owner <login> Repo owner (default: from git remote)
|
|
69
|
+
--repo <name> Repo name (default: from git remote)
|
|
70
|
+
--base <branch> Base branch for PRs (default: main)
|
|
71
|
+
--help, -h Show this help
|
|
72
|
+
|
|
73
|
+
Environment:
|
|
74
|
+
GITHUB_TOKEN (required) GitHub token with issues + PR + contents write
|
|
75
|
+
ANTHROPIC_API_KEY (required if any testgen is pending)
|
|
76
|
+
|
|
77
|
+
Exit codes:
|
|
78
|
+
0 report printed (dry-run) or all pending actions executed
|
|
79
|
+
2 script error
|
|
80
|
+
`);
|
|
81
|
+
}
|
|
82
|
+
function detectOwnerRepo(cwd) {
|
|
83
|
+
try {
|
|
84
|
+
const url = execSync("git remote get-url origin", {
|
|
85
|
+
cwd,
|
|
86
|
+
encoding: "utf8",
|
|
87
|
+
stdio: ["ignore", "pipe", "ignore"],
|
|
88
|
+
}).trim();
|
|
89
|
+
const m = url.match(/github\.com[:/]([^/]+)\/([^/.]+)(?:\.git)?$/);
|
|
90
|
+
if (m && m[1] && m[2])
|
|
91
|
+
return { owner: m[1], repo: m[2] };
|
|
92
|
+
}
|
|
93
|
+
catch {
|
|
94
|
+
/* not a git repo */
|
|
95
|
+
}
|
|
96
|
+
return null;
|
|
97
|
+
}
|
|
98
|
+
export async function catchup(argv, cliVersion) {
|
|
99
|
+
const args = parseArgs(argv);
|
|
100
|
+
const githubToken = process.env["GITHUB_TOKEN"];
|
|
101
|
+
if (!githubToken) {
|
|
102
|
+
console.error("GITHUB_TOKEN environment variable is not set.");
|
|
103
|
+
process.exit(2);
|
|
104
|
+
}
|
|
105
|
+
let owner = args.owner;
|
|
106
|
+
let repo = args.repo;
|
|
107
|
+
if (!owner || !repo) {
|
|
108
|
+
const detected = detectOwnerRepo(args.repoRoot);
|
|
109
|
+
if (!detected) {
|
|
110
|
+
console.error("Could not detect owner/repo from git remote. Pass --owner and --repo explicitly.");
|
|
111
|
+
process.exit(2);
|
|
112
|
+
}
|
|
113
|
+
owner = owner ?? detected.owner;
|
|
114
|
+
repo = repo ?? detected.repo;
|
|
115
|
+
}
|
|
116
|
+
const forge = new GitHubAdapter({ owner, repo, token: githubToken });
|
|
117
|
+
console.log(`slowcook catchup · scanning ${owner}/${repo}...\n`);
|
|
118
|
+
const state = await detectPipelineState(forge, args.repoRoot);
|
|
119
|
+
console.log(formatReport(state));
|
|
120
|
+
if (args.dryRun) {
|
|
121
|
+
console.log("\n(dry-run — no actions taken)");
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
const autoPending = state.pendingOnSpecMerged.length + state.pendingTestgen.length;
|
|
125
|
+
if (autoPending === 0) {
|
|
126
|
+
console.log("\nNothing to do — auto-pending queues are empty.");
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
console.log(`\n=== Executing auto-pending actions ===\n`);
|
|
130
|
+
// Phase 1: on-spec-merged (may shift issue state that testgen watches)
|
|
131
|
+
for (const p of state.pendingOnSpecMerged) {
|
|
132
|
+
console.log(`\n--- on-spec-merged for PR #${p.prNumber} (story-${p.storyId}) ---`);
|
|
133
|
+
try {
|
|
134
|
+
await onSpecMerged(["--pr", String(p.prNumber), "--cwd", args.repoRoot]);
|
|
135
|
+
}
|
|
136
|
+
catch (e) {
|
|
137
|
+
console.error(` failed: ${e.message}`);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
// Phase 2: testgen for any still-pending specs
|
|
141
|
+
if (state.pendingTestgen.length > 0) {
|
|
142
|
+
const anthropicKey = process.env["ANTHROPIC_API_KEY"];
|
|
143
|
+
if (!anthropicKey) {
|
|
144
|
+
console.error("\nANTHROPIC_API_KEY is required to run testgen. Skipping the testgen phase.");
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
console.log(`\n--- testgen --all (${state.pendingTestgen.length} spec(s) need tests) ---`);
|
|
148
|
+
try {
|
|
149
|
+
await testgen(["--all", "--cwd", args.repoRoot, "--base", args.baseBranch], cliVersion);
|
|
150
|
+
}
|
|
151
|
+
catch (e) {
|
|
152
|
+
console.error(` testgen failed: ${e.message}`);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
console.log("\ncatchup done.");
|
|
156
|
+
}
|
|
157
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/catchup/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAU9C,SAAS,SAAS,CAAC,IAAc;IAC/B,MAAM,IAAI,GAAgB;QACxB,MAAM,EAAE,KAAK;QACb,QAAQ,EAAE,OAAO,CAAC,GAAG,EAAE;QACvB,UAAU,EAAE,MAAM;KACnB,CAAC;IACF,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACrC,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QACpB,MAAM,IAAI,GAAG,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;QACzB,IAAI,GAAG,KAAK,WAAW;YAAE,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;aACvC,IAAI,GAAG,KAAK,OAAO,IAAI,IAAI,EAAE,CAAC;YAAC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;YAAC,C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,MAAM,OAAO,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC,EAAE,UAAU,CAAC,CAAC;QAC1F,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,OAAO,CAAC,KAAK,CAAC,qBAAsB,CAAW,CAAC,OAAO,EAAE,CAAC,CAAC;QAC7D,CAAC;IACH,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;AACjC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Static and parameterized file contents written by `slowcook init`.
|
|
2
2
|
// Version is bumped in lockstep with the CLI package.
|
|
3
|
-
export const CLI_VERSION_FOR_TEMPLATES = "0.5.
|
|
3
|
+
export const CLI_VERSION_FOR_TEMPLATES = "0.5.1";
|
|
4
4
|
export const SLOWCOOK_CODEOWNERS_MARKER_BEGIN = "# --- slowcook:frozen-paths BEGIN ---";
|
|
5
5
|
export const SLOWCOOK_CODEOWNERS_MARKER_END = "# --- slowcook:frozen-paths END ---";
|
|
6
6
|
export function frozenPathsJson() {
|
|
@@ -34,16 +34,16 @@ export declare const schemas: {
|
|
|
34
34
|
supersedes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
35
35
|
superseded_by: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
36
36
|
}, "strip", z.ZodTypeAny, {
|
|
37
|
-
status: "draft" | "active" | "superseded";
|
|
38
37
|
title: string;
|
|
38
|
+
status: "draft" | "active" | "superseded";
|
|
39
39
|
source_issue?: string | undefined;
|
|
40
40
|
tags?: string[] | undefined;
|
|
41
41
|
summary?: string | undefined;
|
|
42
42
|
supersedes?: string[] | undefined;
|
|
43
43
|
superseded_by?: string | null | undefined;
|
|
44
44
|
}, {
|
|
45
|
-
status: "draft" | "active" | "superseded";
|
|
46
45
|
title: string;
|
|
46
|
+
status: "draft" | "active" | "superseded";
|
|
47
47
|
source_issue?: string | undefined;
|
|
48
48
|
tags?: string[] | undefined;
|
|
49
49
|
summary?: string | undefined;
|
|
@@ -53,8 +53,8 @@ export declare const schemas: {
|
|
|
53
53
|
}, "strip", z.ZodTypeAny, {
|
|
54
54
|
schema_version: 1;
|
|
55
55
|
stories: Record<string, {
|
|
56
|
-
status: "draft" | "active" | "superseded";
|
|
57
56
|
title: string;
|
|
57
|
+
status: "draft" | "active" | "superseded";
|
|
58
58
|
source_issue?: string | undefined;
|
|
59
59
|
tags?: string[] | undefined;
|
|
60
60
|
summary?: string | undefined;
|
|
@@ -65,8 +65,8 @@ export declare const schemas: {
|
|
|
65
65
|
}, {
|
|
66
66
|
schema_version: 1;
|
|
67
67
|
stories: Record<string, {
|
|
68
|
-
status: "draft" | "active" | "superseded";
|
|
69
68
|
title: string;
|
|
69
|
+
status: "draft" | "active" | "superseded";
|
|
70
70
|
source_issue?: string | undefined;
|
|
71
71
|
tags?: string[] | undefined;
|
|
72
72
|
summary?: string | undefined;
|
|
@@ -117,8 +117,8 @@ export declare const schemas: {
|
|
|
117
117
|
note?: string | undefined;
|
|
118
118
|
}>, "many">>;
|
|
119
119
|
}, "strip", z.ZodTypeAny, {
|
|
120
|
-
status: "draft" | "active" | "superseded";
|
|
121
120
|
title: string;
|
|
121
|
+
status: "draft" | "active" | "superseded";
|
|
122
122
|
supersedes: string[];
|
|
123
123
|
superseded_by: string | null;
|
|
124
124
|
story_id: string;
|
|
@@ -131,8 +131,8 @@ export declare const schemas: {
|
|
|
131
131
|
invariants: string[];
|
|
132
132
|
acceptance_scenarios: string[];
|
|
133
133
|
non_goals: string[];
|
|
134
|
-
$schema?: string | undefined;
|
|
135
134
|
source_issue?: string | undefined;
|
|
135
|
+
$schema?: string | undefined;
|
|
136
136
|
token_budget_usd?: number | undefined;
|
|
137
137
|
estimate?: "small" | "medium" | "large" | undefined;
|
|
138
138
|
refined_by?: string | undefined;
|
|
@@ -144,8 +144,8 @@ export declare const schemas: {
|
|
|
144
144
|
note?: string | undefined;
|
|
145
145
|
}[] | undefined;
|
|
146
146
|
}, {
|
|
147
|
-
status: "draft" | "active" | "superseded";
|
|
148
147
|
title: string;
|
|
148
|
+
status: "draft" | "active" | "superseded";
|
|
149
149
|
supersedes: string[];
|
|
150
150
|
superseded_by: string | null;
|
|
151
151
|
story_id: string;
|
|
@@ -158,8 +158,8 @@ export declare const schemas: {
|
|
|
158
158
|
invariants: string[];
|
|
159
159
|
acceptance_scenarios: string[];
|
|
160
160
|
non_goals: string[];
|
|
161
|
-
$schema?: string | undefined;
|
|
162
161
|
source_issue?: string | undefined;
|
|
162
|
+
$schema?: string | undefined;
|
|
163
163
|
token_budget_usd?: number | undefined;
|
|
164
164
|
estimate?: "small" | "medium" | "large" | undefined;
|
|
165
165
|
refined_by?: string | undefined;
|
|
@@ -180,16 +180,16 @@ export declare const schemas: {
|
|
|
180
180
|
supersedes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
181
181
|
superseded_by: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
182
182
|
}, "strip", z.ZodTypeAny, {
|
|
183
|
-
status: "draft" | "active" | "superseded";
|
|
184
183
|
title: string;
|
|
184
|
+
status: "draft" | "active" | "superseded";
|
|
185
185
|
source_issue?: string | undefined;
|
|
186
186
|
tags?: string[] | undefined;
|
|
187
187
|
summary?: string | undefined;
|
|
188
188
|
supersedes?: string[] | undefined;
|
|
189
189
|
superseded_by?: string | null | undefined;
|
|
190
190
|
}, {
|
|
191
|
-
status: "draft" | "active" | "superseded";
|
|
192
191
|
title: string;
|
|
192
|
+
status: "draft" | "active" | "superseded";
|
|
193
193
|
source_issue?: string | undefined;
|
|
194
194
|
tags?: string[] | undefined;
|
|
195
195
|
summary?: string | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slowcook-ai/cli",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "CLI for the slowcook brewing harness",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "aminazar",
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
"@octokit/rest": "^21.0.2",
|
|
38
38
|
"yaml": "^2.6.0",
|
|
39
39
|
"zod": "^3.23.8",
|
|
40
|
-
"@slowcook-ai/core": "^0.
|
|
41
|
-
"@slowcook-ai/stack-ts": "^0.
|
|
42
|
-
"@slowcook-ai/forge-github": "^0.
|
|
40
|
+
"@slowcook-ai/core": "^0.5.0",
|
|
41
|
+
"@slowcook-ai/stack-ts": "^0.5.0",
|
|
42
|
+
"@slowcook-ai/forge-github": "^0.5.0"
|
|
43
43
|
},
|
|
44
44
|
"publishConfig": {
|
|
45
45
|
"access": "public"
|