@clemrig/factory 0.18.3 → 0.20.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 +25 -23
- package/dist/app/board.js +1 -0
- package/dist/app/board.js.map +1 -1
- 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/spec-page.d.ts +11 -0
- package/dist/app/spec-page.js +37 -0
- package/dist/app/spec-page.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/issue-save.d.ts +4 -1
- package/dist/app/workflows/issue-save.js +35 -4
- package/dist/app/workflows/issue-save.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/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 +5 -2
- package/dist/cli/ui.js +24 -5
- package/dist/cli/ui.js.map +1 -1
- package/dist/domain/board.d.ts +6 -0
- package/dist/domain/board.js +5 -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 +43 -228
- 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/spec-page.d.ts +132 -0
- package/dist/domain/spec-page.js +155 -0
- package/dist/domain/spec-page.js.map +1 -0
- 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/issues.d.ts +10 -0
- package/dist/system/issues.js +57 -1
- package/dist/system/issues.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/templates/init/gitignore +1 -0
- package/templates/skills/issue/SKILL.md +49 -7
|
@@ -1,89 +1,20 @@
|
|
|
1
|
-
import { isBlocking
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export const minimumGhVersion = "2.99.0";
|
|
5
|
-
/** Why this `gh` cannot open the pull request, if it cannot. */
|
|
6
|
-
export function ghVersionProblem(version) {
|
|
7
|
-
const parts = (text) => text.split(".").map(Number);
|
|
8
|
-
const [major = 0, minor = 0, patch = 0] = parts(version);
|
|
9
|
-
const [needMajor = 0, needMinor = 0, needPatch = 0] = parts(minimumGhVersion);
|
|
10
|
-
const recent = major !== needMajor
|
|
11
|
-
? major > needMajor
|
|
12
|
-
: minor !== needMinor
|
|
13
|
-
? minor > needMinor
|
|
14
|
-
: patch >= needPatch;
|
|
15
|
-
return recent
|
|
16
|
-
? undefined
|
|
17
|
-
: `gh ${minimumGhVersion} or later is required to attach screenshots (found ${version}): upgrade gh`;
|
|
18
|
-
}
|
|
19
|
-
/** Below GitHub's limit for a pull request's body (65,536 characters), with room for the screenshots' links. */
|
|
20
|
-
export const maxBodyLength = 60_000;
|
|
21
|
-
/** Agent text on one line. */
|
|
22
|
-
function line(text) {
|
|
23
|
-
return text.replace(/\s*\n\s*/g, " ");
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Text shown as prose, from the spec or an agent: nothing in it opens a code
|
|
27
|
-
* block or a comment, which would swallow the rest of the body.
|
|
28
|
-
*/
|
|
29
|
-
function inert(text) {
|
|
1
|
+
import { isBlocking } from "./review.js";
|
|
2
|
+
/** Agent text on one line, in a table cell: no column separator. */
|
|
3
|
+
function cell(text) {
|
|
30
4
|
return text
|
|
31
|
-
.
|
|
32
|
-
.replaceAll("
|
|
5
|
+
.replace(/\s*\n\s*/g, " ")
|
|
6
|
+
.replaceAll("|", "\\|")
|
|
33
7
|
.replaceAll("<!--", "<!--");
|
|
34
8
|
}
|
|
35
|
-
/** Agent text inside a table cell: one line, no column separator. */
|
|
36
|
-
function cell(text) {
|
|
37
|
-
return inert(line(text)).replaceAll("|", "\\|");
|
|
38
|
-
}
|
|
39
|
-
/** A list item whose text may hold several lines. */
|
|
40
|
-
function item(text) {
|
|
41
|
-
return `- ${inert(text.trim()).replace(/\n/g, "\n ")}`;
|
|
42
|
-
}
|
|
43
|
-
/** Agent text as HTML, in a folded section's title. */
|
|
44
|
-
function html(text) {
|
|
45
|
-
return line(text)
|
|
46
|
-
.replaceAll("&", "&")
|
|
47
|
-
.replaceAll("<", "<")
|
|
48
|
-
.replaceAll(">", ">");
|
|
49
|
-
}
|
|
50
|
-
/** Agent text as an image's alternative text: one line, no bracket to end it. */
|
|
51
|
-
function alt(text) {
|
|
52
|
-
return line(text).replace(/[\\[\]]/g, "\\$&");
|
|
53
|
-
}
|
|
54
9
|
function plural(count, noun) {
|
|
55
10
|
return `${count} ${noun}${count === 1 ? "" : "s"}`;
|
|
56
11
|
}
|
|
57
|
-
/** Content folded under its title until the reader opens it. */
|
|
58
|
-
function folded(title, content) {
|
|
59
|
-
return `<details><summary>${title}</summary>\n\n${content}\n\n</details>`;
|
|
60
|
-
}
|
|
61
|
-
/** Above this many files, the review guide folds each group's list. */
|
|
62
|
-
const foldedFiles = 10;
|
|
63
|
-
/** A changed file with its added and removed lines, as the review guide lists it. */
|
|
64
|
-
function changedFile(file) {
|
|
65
|
-
const name = file.from
|
|
66
|
-
? `\`${file.from}\` → \`${file.path}\``
|
|
67
|
-
: `\`${file.path}\``;
|
|
68
|
-
return file.added === undefined || file.removed === undefined
|
|
69
|
-
? `${name} (binary)`
|
|
70
|
-
: `${name} (+${file.added} -${file.removed})`;
|
|
71
|
-
}
|
|
72
|
-
/** A review's finding, as the pull request lists it: where, what, and its nature. */
|
|
73
|
-
function finding({ nature, file, summary, }) {
|
|
74
|
-
const label = natureLabel(nature);
|
|
75
|
-
return item(`${file ? `\`${file}\` — ` : ""}${summary.trim()} _${label[0]?.toUpperCase()}${label.slice(1)}_`);
|
|
76
|
-
}
|
|
77
12
|
/** What the review still asks for, which the operator accepted to deliver. */
|
|
78
|
-
function
|
|
13
|
+
function openCount({ review, acceptedReview }) {
|
|
79
14
|
if (!acceptedReview)
|
|
80
|
-
return
|
|
81
|
-
return
|
|
82
|
-
|
|
83
|
-
.filter(({ status }) => status === "not_met")
|
|
84
|
-
.map(({ id, evidence }) => item(`${id} is not met — ${evidence.trim()}`)),
|
|
85
|
-
...review.findings.filter(({ nature }) => isBlocking(nature)).map(finding),
|
|
86
|
-
];
|
|
15
|
+
return 0;
|
|
16
|
+
return (review.criteria.filter(({ status }) => status === "not_met").length +
|
|
17
|
+
review.findings.filter(({ nature }) => isBlocking(nature)).length);
|
|
87
18
|
}
|
|
88
19
|
/** The criteria the last review found met. */
|
|
89
20
|
function metCriteria({ criteria, review }) {
|
|
@@ -95,7 +26,7 @@ function rounds(facts) {
|
|
|
95
26
|
const after = facts.reviewRounds === 0
|
|
96
27
|
? "at the first review"
|
|
97
28
|
: `after ${plural(facts.reviewRounds, "round")} of changes`;
|
|
98
|
-
return
|
|
29
|
+
return openCount(facts) > 0
|
|
99
30
|
? `Delivered by the operator ${after}`
|
|
100
31
|
: `Approved ${after}`;
|
|
101
32
|
}
|
|
@@ -104,7 +35,7 @@ function glance(facts) {
|
|
|
104
35
|
const { files, links, runId, description, checks, skippedChecks } = facts;
|
|
105
36
|
const sum = (key) => files.reduce((total, file) => total + (file[key] ?? 0), 0);
|
|
106
37
|
const { danger, screenshots } = description;
|
|
107
|
-
const open =
|
|
38
|
+
const open = openCount(facts);
|
|
108
39
|
const nonBlocking = facts.review.findings.filter(({ nature }) => !isBlocking(nature)).length;
|
|
109
40
|
const proof = [
|
|
110
41
|
`${metCriteria(facts)} / ${facts.criteria.length} criteria`,
|
|
@@ -137,171 +68,55 @@ function glance(facts) {
|
|
|
137
68
|
`| **Review** | ${review.join(" · ")} |`,
|
|
138
69
|
].join("\n");
|
|
139
70
|
}
|
|
140
|
-
/**
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
const afterMerge = danger.afterMerge.length > 0
|
|
155
|
-
? danger.afterMerge
|
|
156
|
-
.map((action, index) => `${index + 1}. ${cell(action)}`)
|
|
157
|
-
.join("<br>")
|
|
158
|
-
: "Nothing.";
|
|
159
|
-
return [
|
|
160
|
-
`| **Door** | **${danger.door === "one_way" ? "One-way" : "Two-way"}.** ${cell(danger.reason)} |`,
|
|
161
|
-
"|:--|:--|",
|
|
162
|
-
`| **Blast radius** | **${cell(danger.blastRadius)}.** ${cell(danger.ramifications)} |`,
|
|
163
|
-
`| **Rollback** | ${cell(danger.rollback)} |`,
|
|
164
|
-
`| **After merge** | ${afterMerge} |`,
|
|
165
|
-
].join("\n");
|
|
166
|
-
}
|
|
167
|
-
function reviewGuide({ description, files }) {
|
|
168
|
-
const { start, groups } = description.guide;
|
|
169
|
-
const byPath = new Map(files.map((file) => [file.path, file]));
|
|
170
|
-
const listed = (paths) => paths.flatMap((path) => {
|
|
171
|
-
const file = byPath.get(path);
|
|
172
|
-
return file ? [`- ${changedFile(file)}`] : [];
|
|
173
|
-
});
|
|
174
|
-
const grouped = new Set(groups.flatMap((group) => group.files));
|
|
175
|
-
const others = files.filter(({ path }) => !grouped.has(path));
|
|
176
|
-
const sections = [
|
|
177
|
-
...groups.map(({ title, files: paths }, index) => ({
|
|
178
|
-
title: `${index + 1}. ${title.trim()}`,
|
|
179
|
-
lines: listed(paths),
|
|
180
|
-
})),
|
|
181
|
-
...(others.length > 0
|
|
182
|
-
? [
|
|
183
|
-
{
|
|
184
|
-
title: groups.length > 0 ? "Other files" : "Files",
|
|
185
|
-
lines: others.map((file) => `- ${changedFile(file)}`),
|
|
186
|
-
},
|
|
187
|
-
]
|
|
71
|
+
/**
|
|
72
|
+
* What the reader answers on the review page: the describer's decisions, one
|
|
73
|
+
* on what the review left, one on what the operator delivered open, and the
|
|
74
|
+
* checks to do by hand.
|
|
75
|
+
*/
|
|
76
|
+
function toAnswer(facts) {
|
|
77
|
+
const { decisions, manualChecks } = facts.description;
|
|
78
|
+
const count = decisions.length +
|
|
79
|
+
(facts.review.findings.some(({ nature }) => !isBlocking(nature)) ? 1 : 0) +
|
|
80
|
+
(openCount(facts) > 0 ? 1 : 0);
|
|
81
|
+
const items = [
|
|
82
|
+
...(count > 0 ? [plural(count, "decision")] : []),
|
|
83
|
+
...(manualChecks.length > 0
|
|
84
|
+
? [`${plural(manualChecks.length, "check")} to do yourself`]
|
|
188
85
|
: []),
|
|
189
86
|
];
|
|
190
|
-
|
|
191
|
-
const fold = files.length > foldedFiles;
|
|
192
|
-
return [
|
|
193
|
-
`Start with \`${start.file}\`: ${inert(start.why.trim())}`,
|
|
194
|
-
...sections.map(({ title, lines }) => fold
|
|
195
|
-
? folded(`<b>${html(title)}</b> · ${plural(lines.length, "file")}`, lines.join("\n"))
|
|
196
|
-
: `**${inert(line(title))}**\n${lines.join("\n")}`),
|
|
197
|
-
].join("\n\n");
|
|
87
|
+
return items.length > 0 ? items.join(" and ") : "nothing to decide";
|
|
198
88
|
}
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
const
|
|
202
|
-
|
|
203
|
-
.
|
|
204
|
-
|
|
205
|
-
["Spec interpretations to confirm", facts.interpretations.map(item)],
|
|
206
|
-
["Open, accepted by the operator", open],
|
|
207
|
-
["Non-blocking findings", findings],
|
|
208
|
-
["Deviations from the plan", facts.deviations.map(item)],
|
|
209
|
-
];
|
|
210
|
-
const shown = lists
|
|
211
|
-
.filter(([, items]) => items.length > 0)
|
|
212
|
-
.map(([title, items]) => `**${title}**\n${items.join("\n")}`);
|
|
213
|
-
const fixed = facts.resolved.length > 0
|
|
214
|
-
? [
|
|
215
|
-
folded(`Resolved during the review rounds · ${facts.resolved.length}`, facts.resolved
|
|
216
|
-
.map(({ summary, evidence }) => item(`${summary.trim()} Proof: ${evidence.trim()}`))
|
|
217
|
-
.join("\n")),
|
|
218
|
-
]
|
|
219
|
-
: [];
|
|
220
|
-
const assumptions = facts.assumptions.length > 0
|
|
221
|
-
? [
|
|
222
|
-
folded(`The plan's ${plural(facts.assumptions.length, "assumption")}`, facts.assumptions.map(item).join("\n")),
|
|
223
|
-
]
|
|
224
|
-
: [];
|
|
225
|
-
const sections = [...shown, ...fixed, ...assumptions];
|
|
226
|
-
if (sections.length === 0)
|
|
227
|
-
return `${rounds(facts)}. No spec interpretation, non-blocking finding, deviation from the plan or assumption.`;
|
|
228
|
-
const left = open.length > 0 ? ", with what it still asked for left open" : "";
|
|
229
|
-
return [`${rounds(facts)}${left}.`, ...sections].join("\n\n");
|
|
89
|
+
/** Where to review the change: its page, from the run's data. */
|
|
90
|
+
function reviewLink(facts) {
|
|
91
|
+
const path = reviewPath(facts.runId);
|
|
92
|
+
return facts.reviewPage
|
|
93
|
+
? `**[Review this change](${facts.reviewPage})**: ${toAnswer(facts)}.`
|
|
94
|
+
: `**Review this change** on its page, ${toAnswer(facts)}: run \`factory ui\` where the run ran, and open \`${path}\`.`;
|
|
230
95
|
}
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
return `No screenshots: ${inert(description.noScreenshots?.trim() ?? "")}`;
|
|
235
|
-
if (screenshotsPending)
|
|
236
|
-
return `_Attaching ${plural(shots.length, "screenshot")}…_`;
|
|
237
|
-
return shots
|
|
238
|
-
.map(({ file, caption }) =>
|
|
239
|
-
// A backslash would escape the closing underscore. Each image is a
|
|
240
|
-
// paragraph of its own, as gh attached them in a real run; a line
|
|
241
|
-
// that starts with `\n\n_${line(caption).replaceAll("\\", "\\\\")}_`)
|
|
243
|
-
.join("\n\n");
|
|
96
|
+
/** The review page's address, relative to where `factory ui` serves. */
|
|
97
|
+
export function reviewPath(runId) {
|
|
98
|
+
return `/review?run=${encodeURIComponent(runId)}`;
|
|
244
99
|
}
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
...(facts.checks.length > 0
|
|
250
|
-
? [
|
|
251
|
-
`passed: ${facts.checks.map(({ name, command, durationMs }) => `${name} (\`${command.join(" ")}\`, ${seconds(durationMs)})`).join(", ")}`,
|
|
252
|
-
]
|
|
253
|
-
: []),
|
|
254
|
-
...(facts.skippedChecks.length > 0
|
|
255
|
-
? [
|
|
256
|
-
`skipped, no change matching their files: ${facts.skippedChecks.join(", ")}`,
|
|
257
|
-
]
|
|
258
|
-
: []),
|
|
259
|
-
];
|
|
260
|
-
const criteria = facts.criteria.map(({ id, text }) => {
|
|
261
|
-
const judged = facts.review.criteria.find((criterion) => criterion.id === id);
|
|
262
|
-
const unmet = judged?.status === "not_met" ? "Not met: " : "";
|
|
263
|
-
return `| ${cell(`${id}: ${text}`)} | ${cell(`${unmet}${judged?.evidence ?? ""}`)} |`;
|
|
264
|
-
});
|
|
265
|
-
return [
|
|
266
|
-
screenshots(facts),
|
|
267
|
-
`**${met} / ${total} ${total === 1 ? "criterion" : "criteria"} met**, checked by an independent review${met < total ? "; the others are open, accepted by the operator" : ""}.`,
|
|
268
|
-
`Checks ${checks.join("; ")}.`,
|
|
269
|
-
folded("Each criterion and the review's evidence", `| Criterion | Evidence |\n|---|---|\n${criteria.join("\n")}`),
|
|
270
|
-
].join("\n\n");
|
|
271
|
-
}
|
|
272
|
-
/** Everything needed to review the change without remembering its issue or opening the run. */
|
|
100
|
+
/**
|
|
101
|
+
* The pull request's body: what it risks and proves at a glance, and the
|
|
102
|
+
* link to its review page, which shows everything else from the run.
|
|
103
|
+
*/
|
|
273
104
|
export function pullRequestBody(facts) {
|
|
274
|
-
const {
|
|
275
|
-
const
|
|
276
|
-
const open = openItems(facts).length;
|
|
105
|
+
const { danger } = facts.description;
|
|
106
|
+
const open = openCount(facts);
|
|
277
107
|
return `${[
|
|
278
108
|
...(open > 0
|
|
279
109
|
? [
|
|
280
|
-
`> [!WARNING]\n> **Delivered with ${plural(open, "open review finding")}**, accepted by the operator
|
|
110
|
+
`> [!WARNING]\n> **Delivered with ${plural(open, "open review finding")}**, accepted by the operator.`,
|
|
281
111
|
]
|
|
282
112
|
: []),
|
|
283
113
|
...(danger.door === "one_way"
|
|
284
114
|
? [`> [!CAUTION]\n> **One-way door:** ${cell(danger.reason)}`]
|
|
285
115
|
: []),
|
|
286
|
-
|
|
287
|
-
? [
|
|
288
|
-
`> [!IMPORTANT]\n> **${plural(facts.interpretations.length, "spec interpretation")} to confirm**, chosen by the plan: see Needs your judgment.`,
|
|
289
|
-
]
|
|
290
|
-
: []),
|
|
116
|
+
reviewLink(facts),
|
|
291
117
|
glance(facts),
|
|
292
|
-
`## Why\n\n${inert(facts.objective.trim())}`,
|
|
293
|
-
`## What changes\n\n${description.changes.map(item).join("\n")}`,
|
|
294
|
-
`## How it works\n\n${howItWorks(description)}`,
|
|
295
|
-
`## Merge danger\n\n${mergeDanger(description)}`,
|
|
296
|
-
`## Review guide\n\n${reviewGuide(facts)}`,
|
|
297
|
-
`### Needs your judgment\n\n${judgment(facts)}`,
|
|
298
|
-
`## Evidence\n\n${evidence(facts)}`,
|
|
299
118
|
].join("\n\n")}\n`;
|
|
300
119
|
}
|
|
301
|
-
/** How many readings of the spec the plan chose, as the terminal shows them once the pull request is open. */
|
|
302
|
-
export function interpretationsLine(count) {
|
|
303
|
-
return `Spec interpretations to confirm: ${count}, in Needs your judgment`;
|
|
304
|
-
}
|
|
305
120
|
/** The danger of merging, as the terminal shows it once the pull request is open. */
|
|
306
121
|
export function mergeDangerLine({ danger }) {
|
|
307
122
|
return `Merge danger: ${danger.door === "one_way" ? "one-way" : "two-way"} door, blast radius ${danger.blastRadius}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pull-request.js","sourceRoot":"","sources":["../../src/domain/pull-request.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,UAAU,EACV,WAAW,GAEZ,MAAM,aAAa,CAAC;AAErB,OAAO,EAAoB,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE9D,0EAA0E;AAC1E,MAAM,CAAC,MAAM,gBAAgB,GAAG,QAAQ,CAAC;AAEzC,gEAAgE;AAChE,MAAM,UAAU,gBAAgB,CAAC,OAAe;IAC9C,MAAM,KAAK,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAC5D,MAAM,CAAC,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;IACzD,MAAM,CAAC,SAAS,GAAG,CAAC,EAAE,SAAS,GAAG,CAAC,EAAE,SAAS,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC,gBAAgB,CAAC,CAAC;IAC9E,MAAM,MAAM,GACV,KAAK,KAAK,SAAS;QACjB,CAAC,CAAC,KAAK,GAAG,SAAS;QACnB,CAAC,CAAC,K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KAAK,CAAC,GAAG;QACtE,CAAC,CAAC,uCAAuC,QAAQ,CAAC,KAAK,CAAC,sDAAsD,IAAI,KAAK,CAAC;AAC5H,CAAC;AAED,wEAAwE;AACxE,MAAM,UAAU,UAAU,CAAC,KAAa;IACtC,OAAO,eAAe,kBAAkB,CAAC,KAAK,CAAC,EAAE,CAAC;AACpD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,KAAuB;IACrD,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC,WAAW,CAAC;IACrC,MAAM,IAAI,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC;IAC9B,OAAO,GAAG;QACR,GAAG,CAAC,IAAI,GAAG,CAAC;YACV,CAAC,CAAC;gBACE,oCAAoC,MAAM,CAAC,IAAI,EAAE,qBAAqB,CAAC,+BAA+B;aACvG;YACH,CAAC,CAAC,EAAE,CAAC;QACP,GAAG,CAAC,MAAM,CAAC,IAAI,KAAK,SAAS;YAC3B,CAAC,CAAC,CAAC,qCAAqC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;YAC9D,CAAC,CAAC,EAAE,CAAC;QACP,UAAU,CAAC,KAAK,CAAC;QACjB,MAAM,CAAC,KAAK,CAAC;KACd,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;AACrB,CAAC;AAED,qFAAqF;AACrF,MAAM,UAAU,eAAe,CAAC,EAAE,MAAM,EAAe;IACrD,OAAO,iBAAiB,MAAM,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,uBAAuB,MAAM,CAAC,WAAW,EAAE,CAAC;AACvH,CAAC"}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { z } from "@clemrig/flow";
|
|
2
|
+
import type { Description, decisionKinds } from "./description.js";
|
|
3
|
+
import type { Plan } from "./plan.js";
|
|
4
|
+
import { type ChangedFile, type Implementation, type Review } from "./review.js";
|
|
5
|
+
import type { Criterion } from "./spec.js";
|
|
6
|
+
import type { CheckResult } from "./verification.js";
|
|
7
|
+
/** What the review page shows of a delivered change; `@clemrig/factory-ui` draws it. */
|
|
8
|
+
export interface ReviewPage {
|
|
9
|
+
run: {
|
|
10
|
+
id: string;
|
|
11
|
+
durationMs: number | null;
|
|
12
|
+
costUsd: number | null;
|
|
13
|
+
};
|
|
14
|
+
title: string;
|
|
15
|
+
objective: string;
|
|
16
|
+
pullRequest: {
|
|
17
|
+
url: string;
|
|
18
|
+
number: number;
|
|
19
|
+
};
|
|
20
|
+
links: {
|
|
21
|
+
spec: string;
|
|
22
|
+
plan: string;
|
|
23
|
+
};
|
|
24
|
+
danger: Description["danger"];
|
|
25
|
+
changes: string[];
|
|
26
|
+
visuals: Description["visuals"];
|
|
27
|
+
screenshots: PageScreenshot[];
|
|
28
|
+
noScreenshots?: string;
|
|
29
|
+
guide: {
|
|
30
|
+
start: {
|
|
31
|
+
file: string;
|
|
32
|
+
why: string;
|
|
33
|
+
url: string;
|
|
34
|
+
};
|
|
35
|
+
groups: {
|
|
36
|
+
title: string;
|
|
37
|
+
files: PageFile[];
|
|
38
|
+
}[];
|
|
39
|
+
};
|
|
40
|
+
rounds: {
|
|
41
|
+
met: number;
|
|
42
|
+
total: number;
|
|
43
|
+
blocking: number;
|
|
44
|
+
nonBlocking: number;
|
|
45
|
+
resolved: {
|
|
46
|
+
summary: string;
|
|
47
|
+
evidence: string;
|
|
48
|
+
}[];
|
|
49
|
+
}[];
|
|
50
|
+
criteria: PageCriterion[];
|
|
51
|
+
checks: {
|
|
52
|
+
name: string;
|
|
53
|
+
durationMs: number;
|
|
54
|
+
}[];
|
|
55
|
+
skippedChecks: string[];
|
|
56
|
+
decisions: PageDecision[];
|
|
57
|
+
manualChecks: {
|
|
58
|
+
id: string;
|
|
59
|
+
title: string;
|
|
60
|
+
expect: string;
|
|
61
|
+
why: string;
|
|
62
|
+
}[];
|
|
63
|
+
assumptions: string[];
|
|
64
|
+
otherInterpretations: string[];
|
|
65
|
+
otherDeviations: string[];
|
|
66
|
+
}
|
|
67
|
+
interface PageScreenshot {
|
|
68
|
+
file: string;
|
|
69
|
+
caption: string;
|
|
70
|
+
url: string;
|
|
71
|
+
}
|
|
72
|
+
type PageFile = ChangedFile & {
|
|
73
|
+
url: string;
|
|
74
|
+
};
|
|
75
|
+
interface PageCriterion {
|
|
76
|
+
id: string;
|
|
77
|
+
text: string;
|
|
78
|
+
status: "met" | "not_met";
|
|
79
|
+
evidence: string;
|
|
80
|
+
}
|
|
81
|
+
interface PageFinding {
|
|
82
|
+
nature: string;
|
|
83
|
+
blocking: boolean;
|
|
84
|
+
file?: string;
|
|
85
|
+
summary: string;
|
|
86
|
+
}
|
|
87
|
+
interface PageDecision {
|
|
88
|
+
id: string;
|
|
89
|
+
kind: (typeof decisionKinds)[number] | "non_blocking" | "open";
|
|
90
|
+
title: string;
|
|
91
|
+
criterion?: string;
|
|
92
|
+
advice: "accept" | "revise";
|
|
93
|
+
recommendation: string;
|
|
94
|
+
why?: string;
|
|
95
|
+
source?: {
|
|
96
|
+
kind: "interpretation" | "deviation";
|
|
97
|
+
text: string;
|
|
98
|
+
};
|
|
99
|
+
findings?: PageFinding[];
|
|
100
|
+
unmet?: PageCriterion[];
|
|
101
|
+
file?: {
|
|
102
|
+
path: string;
|
|
103
|
+
url: string;
|
|
104
|
+
};
|
|
105
|
+
visual?: {
|
|
106
|
+
kind: "reading";
|
|
107
|
+
spec: string;
|
|
108
|
+
read: string;
|
|
109
|
+
} | {
|
|
110
|
+
kind: "diff";
|
|
111
|
+
file: string;
|
|
112
|
+
content: string;
|
|
113
|
+
} | {
|
|
114
|
+
kind: "screenshots";
|
|
115
|
+
items: PageScreenshot[];
|
|
116
|
+
} | {
|
|
117
|
+
kind: "list";
|
|
118
|
+
items: string[];
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
/** What the page is computed from: the run's data, and where the page and the pull request show its files. */
|
|
122
|
+
export interface ReviewFacts {
|
|
123
|
+
run: {
|
|
124
|
+
id: string;
|
|
125
|
+
durationMs: number | null;
|
|
126
|
+
costUsd: number | null;
|
|
127
|
+
};
|
|
128
|
+
title: string;
|
|
129
|
+
objective: string;
|
|
130
|
+
criteria: Criterion[];
|
|
131
|
+
/** Runs of factory 0.7 have no interpretations. */
|
|
132
|
+
plan: Pick<Plan, "risks"> & Partial<Pick<Plan, "interpretations">>;
|
|
133
|
+
implementation: Pick<Implementation, "deviations">;
|
|
134
|
+
/** The review the run judged last, and every review in order: absent from runs of an earlier factory. */
|
|
135
|
+
review: Review;
|
|
136
|
+
reviews?: Review[];
|
|
137
|
+
acceptedReview?: boolean;
|
|
138
|
+
checks: CheckResult[];
|
|
139
|
+
skippedChecks: string[];
|
|
140
|
+
files: ChangedFile[];
|
|
141
|
+
/** The change's whole diff. */
|
|
142
|
+
diff: string;
|
|
143
|
+
/** Runs of an earlier factory have no decisions or manual checks. */
|
|
144
|
+
description: Omit<Description, "decisions" | "manualChecks"> & Partial<Pick<Description, "decisions" | "manualChecks">>;
|
|
145
|
+
pullRequest: string;
|
|
146
|
+
links: {
|
|
147
|
+
spec: string;
|
|
148
|
+
plan: string;
|
|
149
|
+
};
|
|
150
|
+
/** A changed file's diff in the pull request. */
|
|
151
|
+
fileUrl(path: string): string;
|
|
152
|
+
/** Where the page loads a screenshot. */
|
|
153
|
+
screenshotUrl(file: string): string;
|
|
154
|
+
}
|
|
155
|
+
/** The page's data, from the run that delivered the change. */
|
|
156
|
+
export declare function reviewPage(facts: ReviewFacts): ReviewPage;
|
|
157
|
+
/** Where a person is in a run's review, as the page sends it: kept with the run. */
|
|
158
|
+
export declare const reviewAnswers: z.ZodObject<{
|
|
159
|
+
answers: z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
160
|
+
no: "no";
|
|
161
|
+
ok: "ok";
|
|
162
|
+
skip: "skip";
|
|
163
|
+
}>>;
|
|
164
|
+
notes: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
165
|
+
seen: z.ZodArray<z.ZodString>;
|
|
166
|
+
position: z.ZodNumber;
|
|
167
|
+
startedAt: z.ZodNullable<z.ZodNumber>;
|
|
168
|
+
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
169
|
+
}, z.core.$strict>;
|
|
170
|
+
export type ReviewAnswers = z.output<typeof reviewAnswers>;
|
|
171
|
+
export {};
|