@clemrig/factory 0.18.1 → 0.19.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 +15 -19
- package/dist/app/factory.d.ts +2 -0
- package/dist/app/factory.js +5 -1
- package/dist/app/factory.js.map +1 -1
- package/dist/app/review.d.ts +16 -0
- package/dist/app/review.js +87 -0
- package/dist/app/review.js.map +1 -0
- package/dist/app/workflows/implement.js +3 -7
- package/dist/app/workflows/implement.js.map +1 -1
- package/dist/app/workflows/stages/deliver.d.ts +5 -4
- package/dist/app/workflows/stages/deliver.js +47 -53
- package/dist/app/workflows/stages/deliver.js.map +1 -1
- package/dist/app/workflows/stages/prepare.js +11 -7
- package/dist/app/workflows/stages/prepare.js.map +1 -1
- package/dist/app/workflows/stages/resume.js +0 -4
- package/dist/app/workflows/stages/resume.js.map +1 -1
- package/dist/app/workflows/stages/review.d.ts +7 -5
- package/dist/app/workflows/stages/review.js +75 -24
- package/dist/app/workflows/stages/review.js.map +1 -1
- package/dist/app/workflows/stages/run.d.ts +1 -2
- package/dist/app/workflows/tidy.js +2 -3
- package/dist/app/workflows/tidy.js.map +1 -1
- package/dist/cli/ui.d.ts +4 -2
- package/dist/cli/ui.js +17 -5
- package/dist/cli/ui.js.map +1 -1
- package/dist/domain/board.d.ts +2 -0
- package/dist/domain/board.js +4 -1
- package/dist/domain/board.js.map +1 -1
- package/dist/domain/description.d.ts +57 -5
- package/dist/domain/description.js +133 -12
- package/dist/domain/description.js.map +1 -1
- package/dist/domain/diff.d.ts +8 -0
- package/dist/domain/diff.js +90 -0
- package/dist/domain/diff.js.map +1 -0
- package/dist/domain/pull-request.d.ts +9 -21
- package/dist/domain/pull-request.js +44 -229
- package/dist/domain/pull-request.js.map +1 -1
- package/dist/domain/review-page.d.ts +171 -0
- package/dist/domain/review-page.js +200 -0
- package/dist/domain/review-page.js.map +1 -0
- package/dist/domain/review.d.ts +85 -5
- package/dist/domain/review.js +109 -18
- package/dist/domain/review.js.map +1 -1
- package/dist/domain/spec.d.ts +1 -1
- package/dist/domain/spec.js.map +1 -1
- package/dist/system/environment.d.ts +6 -0
- package/dist/system/environment.js +19 -0
- package/dist/system/environment.js.map +1 -1
- package/dist/system/factory.d.ts +2 -0
- package/dist/system/factory.js +4 -0
- package/dist/system/factory.js.map +1 -1
- package/dist/system/git.d.ts +5 -1
- package/dist/system/git.js +19 -2
- package/dist/system/git.js.map +1 -1
- package/dist/system/github.d.ts +3 -12
- package/dist/system/github.js +7 -31
- package/dist/system/github.js.map +1 -1
- package/dist/system/run-files.d.ts +14 -0
- package/dist/system/run-files.js +51 -8
- package/dist/system/run-files.js.map +1 -1
- package/package.json +2 -2
- package/prompts/describe.md +36 -15
- package/prompts/plan.md +7 -5
- package/prompts/review.md +38 -21
package/dist/system/git.js
CHANGED
|
@@ -134,9 +134,26 @@ export async function recentCommits(dir, since, max) {
|
|
|
134
134
|
}
|
|
135
135
|
return commits;
|
|
136
136
|
}
|
|
137
|
-
/**
|
|
137
|
+
/**
|
|
138
|
+
* The diff from one commit or tree to another, as its readers take it
|
|
139
|
+
* whatever Git's configuration says: names after `a/` and `b/`, unescaped
|
|
140
|
+
* letters, no colors, each line as the files have it.
|
|
141
|
+
*/
|
|
138
142
|
export async function diff(dir, before, after) {
|
|
139
|
-
const result = await git(dir, [
|
|
143
|
+
const result = await git(dir, [
|
|
144
|
+
"-c",
|
|
145
|
+
"core.quotePath=false",
|
|
146
|
+
"-c",
|
|
147
|
+
"diff.suppressBlankEmpty=false",
|
|
148
|
+
"diff",
|
|
149
|
+
"--no-ext-diff",
|
|
150
|
+
"--no-textconv",
|
|
151
|
+
"--no-color",
|
|
152
|
+
"--src-prefix=a/",
|
|
153
|
+
"--dst-prefix=b/",
|
|
154
|
+
before,
|
|
155
|
+
after,
|
|
156
|
+
]);
|
|
140
157
|
return { text: result.stdout, truncated: result.stdoutTruncated };
|
|
141
158
|
}
|
|
142
159
|
/** Each file that differs from one commit or tree to another, with its added and removed lines, renames seen as `diff` sees them. */
|
package/dist/system/git.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git.js","sourceRoot":"","sources":["../../src/system/git.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAI3C,uEAAuE;AACvE,KAAK,UAAU,GAAG,CAAC,GAAW,EAAE,IAAc,EAAE,SAAS,GAAG,MAAM;IAChE,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,CAAC,KAAK,EAAE,GAAG,IAAI,CAAC,EAAE,GAAG,EAAE,SAAS,CAAC,CAAC;IAClE,IAAI,MAAM,CAAC,QAAQ,KAAK,CAAC;QACvB,MAAM,IAAI,KAAK,CACb,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,CAChF,CAAC;IACJ,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,KAAK,UAAU,MAAM,CAAC,GAAW,EAAE,IAAc;IAC/C,OAAO,CAAC,MAAM,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;AAC9C,CAAC;AAED;;;GAGG;AACH,KAAK,UAAU,KAAK,CAAC,GAAW,EAAE,IAAc;IAC9C,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IACpC,IAAI,MAAM,CAAC,eAAe;QACxB,MAAM,IAAI,KAAK,CACb,OAAO,IAAI,CAAC,CAAC,CAAC,uDAAuD,CACtE,CAAC;IACJ,OAAO,MAAM,CAAC,MAAM,CAAC;AACvB,C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AAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACvE,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,UAAU,CAAC,CAAC;AAClE,CAAC;AAED,sEAAsE;AACtE,SAAS,KAAK,CAAC,IAAY;IACzB,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC;AAChC,CAAC"}
|
package/dist/system/github.d.ts
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
export declare function isAuthenticated(dir: string): Promise<boolean>;
|
|
2
|
-
/** The
|
|
3
|
-
export declare function version(dir: string): Promise<string>;
|
|
4
|
-
/** The repository's GitHub page, and whether anyone can see it. */
|
|
2
|
+
/** The repository's GitHub page. */
|
|
5
3
|
export declare function repository(dir: string): Promise<{
|
|
6
4
|
url: string;
|
|
7
|
-
public: boolean;
|
|
8
5
|
}>;
|
|
9
6
|
/** An open pull request: its title, branch, page and the files it changes, the first 100: gh lists no more. */
|
|
10
7
|
export interface OpenPullRequest {
|
|
@@ -27,11 +24,5 @@ export declare function openPullRequest(dir: string, pullRequest: {
|
|
|
27
24
|
title: string;
|
|
28
25
|
body: string;
|
|
29
26
|
}): Promise<string>;
|
|
30
|
-
/**
|
|
31
|
-
export declare function
|
|
32
|
-
/**
|
|
33
|
-
* Replaces the pull request's body, uploading the `images` of `folder` it
|
|
34
|
-
* names: gh, run there, points each reference at its upload. When some fail,
|
|
35
|
-
* gh still writes the body, with the others' references unchanged.
|
|
36
|
-
*/
|
|
37
|
-
export declare function attachImages(folder: string, pullRequest: string, body: string, images: string[]): Promise<void>;
|
|
27
|
+
/** Where a changed file's diff opens in its pull request: GitHub names it by its path's SHA-256. */
|
|
28
|
+
export declare function fileAnchor(pullRequest: string, path: string): string;
|
package/dist/system/github.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
1
2
|
import { runProcess } from "@clemrig/flow";
|
|
2
3
|
/** Runs gh in the repository; its output is never journaled, as it may describe the account. */
|
|
3
4
|
async function gh(dir, args, stdin, timeoutMs = 60_000) {
|
|
@@ -10,18 +11,10 @@ export async function isAuthenticated(dir) {
|
|
|
10
11
|
const result = await runProcess(["gh", "auth", "status"], dir, 60_000);
|
|
11
12
|
return result.exitCode === 0;
|
|
12
13
|
}
|
|
13
|
-
/** The
|
|
14
|
-
export async function version(dir) {
|
|
15
|
-
const output = await gh(dir, ["--version"]);
|
|
16
|
-
const found = /^gh version (\d+\.\d+\.\d+)/.exec(output)?.[1];
|
|
17
|
-
if (!found)
|
|
18
|
-
throw new Error(`gh --version printed no version: ${output}`);
|
|
19
|
-
return found;
|
|
20
|
-
}
|
|
21
|
-
/** The repository's GitHub page, and whether anyone can see it. */
|
|
14
|
+
/** The repository's GitHub page. */
|
|
22
15
|
export async function repository(dir) {
|
|
23
|
-
const { url
|
|
24
|
-
return { url
|
|
16
|
+
const { url } = JSON.parse(await gh(dir, ["repo", "view", "--json", "url"]));
|
|
17
|
+
return { url };
|
|
25
18
|
}
|
|
26
19
|
/** The pull requests gh lists: the latest, at most this many. */
|
|
27
20
|
const listed = "100";
|
|
@@ -100,25 +93,8 @@ export async function openPullRequest(dir, pullRequest) {
|
|
|
100
93
|
"-",
|
|
101
94
|
], body);
|
|
102
95
|
}
|
|
103
|
-
/**
|
|
104
|
-
export
|
|
105
|
-
|
|
106
|
-
}
|
|
107
|
-
/**
|
|
108
|
-
* Replaces the pull request's body, uploading the `images` of `folder` it
|
|
109
|
-
* names: gh, run there, points each reference at its upload. When some fail,
|
|
110
|
-
* gh still writes the body, with the others' references unchanged.
|
|
111
|
-
*/
|
|
112
|
-
export async function attachImages(folder, pullRequest, body, images) {
|
|
113
|
-
await gh(folder, [
|
|
114
|
-
"pr",
|
|
115
|
-
"edit",
|
|
116
|
-
pullRequest,
|
|
117
|
-
"--body-file",
|
|
118
|
-
"-",
|
|
119
|
-
...images.flatMap((image) => ["--attach", image]),
|
|
120
|
-
], body,
|
|
121
|
-
// Uploads take longer than the other calls.
|
|
122
|
-
600_000);
|
|
96
|
+
/** Where a changed file's diff opens in its pull request: GitHub names it by its path's SHA-256. */
|
|
97
|
+
export function fileAnchor(pullRequest, path) {
|
|
98
|
+
return `${pullRequest}/files#diff-${createHash("sha256").update(path).digest("hex")}`;
|
|
123
99
|
}
|
|
124
100
|
//# sourceMappingURL=github.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github.js","sourceRoot":"","sources":["../../src/system/github.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,gGAAgG;AAChG,KAAK,UAAU,EAAE,CACf,GAAW,EACX,IAAc,EACd,KAAc,EACd,SAAS,GAAG,MAAM;IAElB,MAAM,MAAM,GAAG,MAAM,UAAU,CAC7B,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,EACf,GAAG,EACH,SAAS,EACT,SAAS,EACT,KAAK,CACN,CAAC;IACF,IAAI,MAAM,CAAC,QAAQ,KAAK,CAAC;QACvB,MAAM,IAAI,KAAK,CACb,MAAM,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,CACnE,CAAC;IACJ,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;AAC9B,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,GAAW;IAC/C,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;IACvE,OAAO,MAAM,CAAC,QAAQ,KAAK,CAAC,CAAC;AAC/B,CAAC;AAED,
|
|
1
|
+
{"version":3,"file":"github.js","sourceRoot":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,GAAG,IAAI,CAAC,KAAK,CACrB,MAAM,EAAE,CAAC,GAAG,EAAE;QACZ,IAAI;QACJ,MAAM;QACN,QAAQ;QACR,IAAI;QACJ,SAAS;QACT,MAAM;QACN,QAAQ;QACR,YAAY;KACb,CAAC,CACkC,CAAC;IACvC,MAAM,QAAQ,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;IACzB,IAAI,QAAQ,EAAE,CAAC;QACb,MAAM,EAAE,CACN,GAAG,EACH;YACE,IAAI;YACJ,MAAM;YACN,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC;YACvB,SAAS;YACT,KAAK;YACL,aAAa;YACb,GAAG;SACJ,EACD,IAAI,CACL,CAAC;QACF,OAAO,QAAQ,CAAC,GAAG,CAAC;IACtB,CAAC;IACD,OAAO,EAAE,CACP,GAAG,EACH;QACE,IAAI;QACJ,QAAQ;QACR,QAAQ;QACR,IAAI;QACJ,QAAQ;QACR,IAAI;QACJ,SAAS;QACT,KAAK;QACL,aAAa;QACb,GAAG;KACJ,EACD,IAAI,CACL,CAAC;AACJ,CAAC;AAED,oGAAoG;AACpG,MAAM,UAAU,UAAU,CAAC,WAAmB,EAAE,IAAY;IAC1D,OAAO,GAAG,WAAW,eAAe,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;AACxF,CAAC"}
|
|
@@ -6,6 +6,8 @@ export type KeptCheck = CheckResult & {
|
|
|
6
6
|
};
|
|
7
7
|
/** Keeps `text` in the run's directory, at `path` within it; returns where, absolute. */
|
|
8
8
|
export declare function keepInRun(runDir: string, path: string, text: string): Promise<string>;
|
|
9
|
+
/** A file the run kept, as text. */
|
|
10
|
+
export declare function readKept(file: string): Promise<string>;
|
|
9
11
|
/** Keeps what each check wrote in `checks/<n>-<name>.log` of the run's directory. */
|
|
10
12
|
export declare function keepCheckOutputs(runDir: string, passed: PassedCheck[]): Promise<KeptCheck[]>;
|
|
11
13
|
/**
|
|
@@ -15,6 +17,18 @@ export declare function keepCheckOutputs(runDir: string, passed: PassedCheck[]):
|
|
|
15
17
|
export declare function keepFailedCheck(runDir: string, name: string, output: string): Promise<string>;
|
|
16
18
|
/** The run's folder where the describing agent puts its screenshots, created empty. */
|
|
17
19
|
export declare function screenshotsFolder(runDir: string): Promise<string>;
|
|
20
|
+
/**
|
|
21
|
+
* Screenshot `file` of `folder`, with its media type: `undefined` when it is
|
|
22
|
+
* no image file of its own there, a link included, or is over `maxBytes`.
|
|
23
|
+
*/
|
|
24
|
+
export declare function readScreenshot(folder: string, file: string, maxBytes: number): Promise<{
|
|
25
|
+
body: Buffer;
|
|
26
|
+
type: string;
|
|
27
|
+
} | undefined>;
|
|
28
|
+
/** The answers of a run's review page, as kept: `undefined` before the first, or when they are no JSON. */
|
|
29
|
+
export declare function readAnswers(runDir: string): Promise<unknown>;
|
|
30
|
+
/** Keeps the answers of a run's review page, replacing the file whole. */
|
|
31
|
+
export declare function keepAnswers(runDir: string, answers: unknown): Promise<void>;
|
|
18
32
|
/**
|
|
19
33
|
* What is wrong with the screenshots `files` of `folder`: a folder or a file
|
|
20
34
|
* that is a link (which could lead anywhere on the machine), a file missing,
|
package/dist/system/run-files.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { randomUUID } from "node:crypto";
|
|
2
|
+
import { lstat, mkdir, open, readdir, readFile, realpath, rename, writeFile, } from "node:fs/promises";
|
|
2
3
|
import { basename, dirname, join } from "node:path";
|
|
3
4
|
/** Keeps `text` in the run's directory, at `path` within it; returns where, absolute. */
|
|
4
5
|
export async function keepInRun(runDir, path, text) {
|
|
@@ -7,6 +8,10 @@ export async function keepInRun(runDir, path, text) {
|
|
|
7
8
|
await writeFile(file, text);
|
|
8
9
|
return file;
|
|
9
10
|
}
|
|
11
|
+
/** A file the run kept, as text. */
|
|
12
|
+
export function readKept(file) {
|
|
13
|
+
return readFile(file, "utf8");
|
|
14
|
+
}
|
|
10
15
|
/** Keeps what each check wrote in `checks/<n>-<name>.log` of the run's directory. */
|
|
11
16
|
export function keepCheckOutputs(runDir, passed) {
|
|
12
17
|
return Promise.all(passed.map(async ({ output, ...check }, index) => ({
|
|
@@ -33,13 +38,51 @@ export async function screenshotsFolder(runDir) {
|
|
|
33
38
|
await mkdir(folder, { recursive: true });
|
|
34
39
|
return folder;
|
|
35
40
|
}
|
|
36
|
-
/** The
|
|
37
|
-
function
|
|
41
|
+
/** The media type of a PNG, JPEG, GIF or WebP image, from its first bytes; `undefined` for anything else. */
|
|
42
|
+
function imageType(start) {
|
|
38
43
|
const ascii = (from, to) => start.subarray(from, to).toString("latin1");
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
44
|
+
if (ascii(0, 8) === "\x89PNG\r\n\x1a\n")
|
|
45
|
+
return "image/png";
|
|
46
|
+
if (ascii(0, 3) === "\xff\xd8\xff")
|
|
47
|
+
return "image/jpeg";
|
|
48
|
+
if (ascii(0, 4) === "GIF8")
|
|
49
|
+
return "image/gif";
|
|
50
|
+
if (ascii(0, 4) === "RIFF" && ascii(8, 12) === "WEBP")
|
|
51
|
+
return "image/webp";
|
|
52
|
+
return undefined;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Screenshot `file` of `folder`, with its media type: `undefined` when it is
|
|
56
|
+
* no image file of its own there, a link included, or is over `maxBytes`.
|
|
57
|
+
*/
|
|
58
|
+
export async function readScreenshot(folder, file, maxBytes) {
|
|
59
|
+
if (basename(file) !== file)
|
|
60
|
+
return undefined;
|
|
61
|
+
const path = join(folder, file);
|
|
62
|
+
const found = await lstat(path).catch(() => undefined);
|
|
63
|
+
if (!found?.isFile() || found.size > maxBytes)
|
|
64
|
+
return undefined;
|
|
65
|
+
const body = await readFile(path);
|
|
66
|
+
const type = imageType(body);
|
|
67
|
+
return type ? { body, type } : undefined;
|
|
68
|
+
}
|
|
69
|
+
/** The answers of a run's review page, as kept: `undefined` before the first, or when they are no JSON. */
|
|
70
|
+
export async function readAnswers(runDir) {
|
|
71
|
+
try {
|
|
72
|
+
return JSON.parse(await readFile(join(runDir, "answers.json"), "utf8"));
|
|
73
|
+
}
|
|
74
|
+
catch (error) {
|
|
75
|
+
if (error instanceof SyntaxError ||
|
|
76
|
+
error.code === "ENOENT")
|
|
77
|
+
return undefined;
|
|
78
|
+
throw error;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
/** Keeps the answers of a run's review page, replacing the file whole. */
|
|
82
|
+
export async function keepAnswers(runDir, answers) {
|
|
83
|
+
const temporary = join(runDir, `answers-${randomUUID()}.tmp`);
|
|
84
|
+
await writeFile(temporary, `${JSON.stringify(answers)}\n`, { mode: 0o600 });
|
|
85
|
+
await rename(temporary, join(runDir, "answers.json"));
|
|
43
86
|
}
|
|
44
87
|
/**
|
|
45
88
|
* What is wrong with the screenshots `files` of `folder`: a folder or a file
|
|
@@ -80,7 +123,7 @@ export async function screenshotProblems(folder, files, maxBytes) {
|
|
|
80
123
|
finally {
|
|
81
124
|
await handle.close();
|
|
82
125
|
}
|
|
83
|
-
if (!
|
|
126
|
+
if (!imageType(start))
|
|
84
127
|
problems.push(`screenshots: ${file} is not a PNG, JPEG, GIF or WebP image`);
|
|
85
128
|
}
|
|
86
129
|
return problems;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-files.js","sourceRoot":"","sources":["../../src/system/run-files.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,KAAK,EACL,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,SAAS,GACV,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAOpD,yFAAyF;AACzF,MAAM,CAAC,KAAK,UAAU,SAAS,CAC7B,MAAc,EACd,IAAY,EACZ,IAAY;IAEZ,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,EAAE,IAAI,C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,CAAC,IAAI,CACX,gBAAgB,IAAI,wCAAwC,CAC7D,CAAC;IACN,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clemrig/factory",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.0",
|
|
4
4
|
"description": "Take a repository's issues from spec to pull request with agents, watch them on a local Kanban, and run the repository's own workflows",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"prepack": "npm run build"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@clemrig/factory-ui": "0.
|
|
42
|
+
"@clemrig/factory-ui": "0.4.0",
|
|
43
43
|
"@clemrig/flow": "0.11.0",
|
|
44
44
|
"@clemrig/flow-ui": "0.12.0"
|
|
45
45
|
}
|
package/prompts/describe.md
CHANGED
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
You describe an approved change for its pull request. Its reader reviews it days
|
|
2
|
-
the issue: from
|
|
3
|
-
is to merge,
|
|
1
|
+
You describe an approved change for its review page, which its pull request links to. Its reader reviews it days
|
|
2
|
+
later and remembers nothing of the issue: from that page alone, they must understand what the change does, how it
|
|
3
|
+
works, how dangerous it is to merge, see it when it shows, and decide what only a person can. You never change the repository. Write every text of your answer in the
|
|
4
4
|
language of the spec's content, even when the request, the code or these instructions use another; keep code,
|
|
5
5
|
paths and identifiers as they are.
|
|
6
6
|
|
|
7
7
|
Read the repository's agent instructions: `AGENTS.md` at the root and in the directories the change touches.
|
|
8
8
|
Ignore `.factory/`, except the files this request names.
|
|
9
9
|
|
|
10
|
-
The request gives the spec, the plan,
|
|
11
|
-
`deviations`, where the implementation departed from the plan
|
|
10
|
+
The request gives the spec, the plan, `interpretations`, its readings of the spec, numbered `I1`…, the change, the
|
|
11
|
+
checks that passed, the review that approved it and `deviations`, where the implementation departed from the plan,
|
|
12
|
+
numbered `D1`…:
|
|
12
13
|
|
|
13
14
|
- `changes` lists the changed files with their added and removed lines. A small change comes with its whole diff in
|
|
14
15
|
`diff`; a large one (`large` is true) with `diffFile`, the path of its diff.
|
|
15
16
|
- `checks` gives each check's command and `outputFile`, where the run kept what it wrote.
|
|
16
17
|
|
|
17
|
-
Read the code: describe what the change does, not what anyone said it does. The
|
|
18
|
+
Read the code: describe what the change does, not what anyone said it does. The review page already shows, from
|
|
18
19
|
the run, the spec's objective, each acceptance criterion with the review's evidence, the checks, the review's
|
|
19
|
-
findings, the
|
|
20
|
-
review still asks for changes, the operator delivers the change anyway and the
|
|
20
|
+
findings, and, word for word, the interpretations, the deviations and the plan's risks: do not repeat them. When the
|
|
21
|
+
review still asks for changes, the operator delivers the change anyway and the page lists them as open:
|
|
21
22
|
weigh them in `danger`, without listing them again.
|
|
22
23
|
|
|
23
24
|
Write for that reader: name things by what they do, an identifier only beside its meaning, and say what each item
|
|
@@ -51,11 +52,34 @@ Answer with:
|
|
|
51
52
|
a package to publish; empty if nothing.
|
|
52
53
|
- `guide`: `start`, the changed file to read first and why; `groups`, the changed files in the order to read them,
|
|
53
54
|
each group with a short `title` such as "Core logic", "Wiring", "Tests" or "Docs". Give each file once, with its
|
|
54
|
-
path as `changes` gives it; the
|
|
55
|
+
path as `changes` gives it; the page lists the files you leave out under "Other files".
|
|
55
56
|
- `screenshots`, or, without any, `noScreenshots` with the reason; leave `noScreenshots` out when there are some.
|
|
57
|
+
- `decisions`: what the reader must decide before merging, one card each, by this rule, and nothing else:
|
|
58
|
+
- `beyond_spec`: each change the spec does not ask for, such as a dependency raised, a behavior changed beside
|
|
59
|
+
the one it changes, or a file outside its scope;
|
|
60
|
+
- `changed_test`: each test that existed before whose expectation changed: an assertion removed, a value or a
|
|
61
|
+
case changed; say whether it now proves less than before;
|
|
62
|
+
- `spec_reading`: each place where the change reads the spec beyond its letter, in `interpretations` or in the
|
|
63
|
+
code.
|
|
64
|
+
|
|
65
|
+
None when nothing applies: the page shows every other interpretation and deviation word for word. Each has a
|
|
66
|
+
`title`, the decision in a sentence; `criterion`, the id of the criterion it bears on, if one; `advice`, `accept`
|
|
67
|
+
or `revise`, and `recommendation`, why, in a sentence or two; `why`, why it needs a person; `source`, the id of
|
|
68
|
+
the interpretation or deviation it comes from, if one; `file`, the changed file to open, if one; and `visual`,
|
|
69
|
+
what its card shows, with the fields of its `kind` only:
|
|
70
|
+
- `reading`: `spec`, the spec's words, quoted exactly, and `read`, how the change reads them;
|
|
71
|
+
- `diff`: `file`, a changed file, and `from` and `to`, lines of its new version (of its old one, for a deleted
|
|
72
|
+
file), 60 at most, which the page shows as the diff has them, with the lines removed just before each: to show
|
|
73
|
+
a removal, include the line that follows it;
|
|
74
|
+
- `screenshots`: `files`, screenshots of yours that show it;
|
|
75
|
+
- `list`: `items`, a few short items.
|
|
76
|
+
- `manualChecks`: what only a person can check before merging, because the run could not, as the review's evidence
|
|
77
|
+
and the plan's risks tell it: a real phone or browser where the review emulated one, real data, a sound, a third
|
|
78
|
+
party. Each has a `title`, what to do, in a sentence; `expect`, what should happen; and `why`, why the run could
|
|
79
|
+
not check it. None when the run checked everything that matters.
|
|
56
80
|
|
|
57
81
|
Only `visuals` hold code fences' content: write no code fence, of backticks or tildes, or HTML comment anywhere
|
|
58
|
-
else.
|
|
82
|
+
else.
|
|
59
83
|
|
|
60
84
|
## Screenshots
|
|
61
85
|
|
|
@@ -67,11 +91,8 @@ Otherwise, start the application as the repository's instructions say, and do no
|
|
|
67
91
|
show a state, use what the repository's instructions provide for tests, or create your own data. Use the request's
|
|
68
92
|
`browser` when it gives one, a command line (run it with `--help` first), or else the browser tools you have. Save
|
|
69
93
|
each image in the folder `screenshots` names, then give its file name, starting with a letter or a digit and made of
|
|
70
|
-
letters, digits, `.`, `-` and `_`, and its caption, in a sentence: PNG, JPEG, GIF or WebP, 10 MB at most,
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
When `repository.public` is true, anyone can see these images: show only test or seed data, never a secret, a
|
|
74
|
-
token or a person's data; when you cannot, take none and say why.
|
|
94
|
+
letters, digits, `.`, `-` and `_`, and its caption, in a sentence: PNG, JPEG, GIF or WebP, 10 MB at most, each a
|
|
95
|
+
file of its own. Stop everything you started, servers and browsers, before you answer.
|
|
75
96
|
|
|
76
97
|
Take none when nothing visible changed, when the application does not start or when you have no browser, and give
|
|
77
98
|
the reason in `noScreenshots`.
|
package/prompts/plan.md
CHANGED
|
@@ -7,8 +7,10 @@ change will touch, and follow them. Ignore `.factory/`: the other issues there a
|
|
|
7
7
|
truth, and `.factory/runs/` holds agents' outputs.
|
|
8
8
|
|
|
9
9
|
The request gives the issue's slug and its spec. The spec is approved and does not change: plan what it asks,
|
|
10
|
-
nothing more. When the spec reads more than one way,
|
|
11
|
-
|
|
10
|
+
nothing more. When the spec reads more than one way, choose the reading most consistent with the code and record it
|
|
11
|
+
in `interpretations`. When its letter would give a behavior its objective would not want, plan the letter all the
|
|
12
|
+
same and record the conflict in `interpretations`: only whoever approved the spec can depart from it, and the
|
|
13
|
+
review holds the change to its letter.
|
|
12
14
|
|
|
13
15
|
## Explore first
|
|
14
16
|
|
|
@@ -43,9 +45,9 @@ Answer with:
|
|
|
43
45
|
or many items, permissions. Only those the step meets; empty when there are none.
|
|
44
46
|
- `commit`: the conventional commit subject of the whole change, for example
|
|
45
47
|
`feat(api): export watchlists as CSV`, at most 72 characters.
|
|
46
|
-
- `interpretations`: each reading of the spec you chose
|
|
47
|
-
|
|
48
|
-
or to fix the spec.
|
|
48
|
+
- `interpretations`: each reading of the spec you chose and each conflict between its letter and its objective, as
|
|
49
|
+
above: what users observe with it and what the other reading, or a spec that follows its objective, would change;
|
|
50
|
+
empty when the spec leaves no doubt. The pull request asks the operator to confirm each one or to fix the spec.
|
|
49
51
|
- `risks`: what else could go wrong and what else you assumed; empty if nothing. The pull request shows them and
|
|
50
52
|
`interpretations` to a reader who knows neither the spec nor the code: a sentence or two each, naming things by
|
|
51
53
|
what they do, an identifier only beside its meaning, and what each means for the change.
|
package/prompts/review.md
CHANGED
|
@@ -24,6 +24,10 @@ test's title suggests it. A finding states only behavior you established the sam
|
|
|
24
24
|
application and you can run it, reproduce it there. A risk you could not establish is not a defect: report it as
|
|
25
25
|
`weak_test` when no test covers it, or leave it out.
|
|
26
26
|
|
|
27
|
+
The spec alone is the measure: a decision, a document or a comment the change writes does not relax a criterion. A
|
|
28
|
+
criterion the change departs from is `not_met`, even when the change documents the departure: only whoever approved
|
|
29
|
+
the spec can accept it. A criterion that one of your blocking findings contradicts is `not_met` too.
|
|
30
|
+
|
|
27
31
|
When you find a defect, look for the same defect everywhere in the change: every text that shows a count, every
|
|
28
32
|
path that takes the same locks, every transition of the same mechanism. Report it once, naming each place, so that
|
|
29
33
|
it is fixed everywhere at once; when several defects come from one mechanism, report the mechanism, with the
|
|
@@ -69,26 +73,39 @@ Answer with:
|
|
|
69
73
|
|
|
70
74
|
## The previous review
|
|
71
75
|
|
|
72
|
-
From the second round on, once you have answered, a request in this conversation gives `previous
|
|
73
|
-
the change's previous version
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
76
|
+
From the second round on, once you have answered, a request in this conversation gives `previous`: the criteria the
|
|
77
|
+
review of the change's previous version found unmet, and its findings, each with its `id`; and `answer`: the
|
|
78
|
+
findings of your first answer, each with its `id`. Your first answer stands: the run keeps it and adds to it what
|
|
79
|
+
you answer now, so repeat nothing of it. Check `previous` yourself, without launching sub-agents: your first answer
|
|
80
|
+
has just reviewed the whole change, and the implementing agent fixes each unmet criterion and blocking finding test
|
|
81
|
+
first.
|
|
82
|
+
|
|
83
|
+
For each criterion and finding `previous` gives, read its fix and the tests that cover it, then run those tests. A
|
|
84
|
+
test proves a fix when it reproduces the trigger the finding described, would fail without the fix, and covers the
|
|
85
|
+
situations around it that the fix changed, such as another error, size, input mode or state. Read also the tests the
|
|
86
|
+
fix changed: an assertion relaxed or realigned on what the code now does, where the spec does not ask for it, hides a
|
|
87
|
+
regression. Check in the browser only what no test can show, such as a layout, a contrast or the browser's handling
|
|
88
|
+
of a touch.
|
|
89
|
+
|
|
90
|
+
Answer with:
|
|
91
|
+
|
|
92
|
+
- `criteria`: each criterion `previous` gives, once, `met` or `not_met`, with its evidence. Its evidence in
|
|
93
|
+
`previous` describes where it failed: it is `met` only when a test you ran or the application you tried shows it
|
|
94
|
+
there; for a criterion that neither can show, such as a document's content, the file you read. The run counts it
|
|
95
|
+
met only when both your answers say so.
|
|
96
|
+
- `fixed`: each previous finding that no longer holds, with its `id` and the `evidence` of its fix: the test that
|
|
97
|
+
proves it, or the browser check where no test can show it. When the code shows the finding was wrong from the
|
|
98
|
+
start, its evidence says so, with the same kind of proof. A fix of a behavior that no test proves is not fixed:
|
|
99
|
+
leave its finding out, and report the missing test in `findings` as `weak_test`.
|
|
100
|
+
- `duplicates`: each previous finding that still holds and that your first answer reports, with its `id` and
|
|
101
|
+
`finding`, the `id` of that finding in `answer`. The run then keeps your first answer's finding alone, unless the
|
|
102
|
+
previous one blocks and yours does not.
|
|
103
|
+
- `findings`: what the fixes broke or made harder to follow, that your first answer does not report, each with its
|
|
104
|
+
nature, its file when relevant and its summary, as in your first answer. A fix that adds a special case where the
|
|
105
|
+
mechanism should change, or that makes the change harder to follow without need, is `maintainability`, or the
|
|
106
|
+
defect's own nature when the mechanism still fails elsewhere; a fix that breaks something that worked in the
|
|
107
|
+
previous version is a `regression`.
|
|
108
|
+
|
|
109
|
+
A previous finding you list neither in `fixed` nor in `duplicates` stays in the review as it is.
|
|
93
110
|
|
|
94
111
|
The change is approved only when every criterion is met and no finding is blocking.
|