@rasensio/aidlc 2.19.0 → 2.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/dist/autopilot/answers.js +2 -2
- package/dist/autopilot/answers.js.map +1 -1
- package/dist/autopilot/decisions.d.ts +42 -5
- package/dist/autopilot/decisions.d.ts.map +1 -1
- package/dist/autopilot/decisions.js +85 -16
- package/dist/autopilot/decisions.js.map +1 -1
- package/dist/autopilot/driver.d.ts +6 -5
- package/dist/autopilot/driver.d.ts.map +1 -1
- package/dist/autopilot/driver.js +57 -42
- package/dist/autopilot/driver.js.map +1 -1
- package/dist/autopilot/presets.d.ts.map +1 -1
- package/dist/autopilot/presets.js +4 -2
- package/dist/autopilot/presets.js.map +1 -1
- package/dist/autopilot/proposal.d.ts +55 -0
- package/dist/autopilot/proposal.d.ts.map +1 -0
- package/dist/autopilot/proposal.js +167 -0
- package/dist/autopilot/proposal.js.map +1 -0
- package/dist/autopilot/review.d.ts +15 -3
- package/dist/autopilot/review.d.ts.map +1 -1
- package/dist/autopilot/review.js +211 -40
- package/dist/autopilot/review.js.map +1 -1
- package/dist/autopilot/typed.d.ts +9 -1
- package/dist/autopilot/typed.d.ts.map +1 -1
- package/dist/autopilot/typed.js +6 -2
- package/dist/autopilot/typed.js.map +1 -1
- package/dist/commands/autopilot.d.ts +3 -1
- package/dist/commands/autopilot.d.ts.map +1 -1
- package/dist/commands/autopilot.js +10 -6
- package/dist/commands/autopilot.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A review proposal: an agent's suggested verdict for each unreviewed entry of the logs it
|
|
3
|
+
* read, checked against the CLI's own rules before a person is asked anything
|
|
4
|
+
* (review-from-agent-proposal).
|
|
5
|
+
*
|
|
6
|
+
* Every byte of the file was written by an agent, so it is size-capped before it is read,
|
|
7
|
+
* parsed into Maps so no key reaches an object prototype, checked against the logs rather than
|
|
8
|
+
* trusted, and cleaned before any of it reaches a terminal.
|
|
9
|
+
*
|
|
10
|
+
* Reads files; writes nothing.
|
|
11
|
+
*
|
|
12
|
+
* Design: design.md C2
|
|
13
|
+
*
|
|
14
|
+
* @module
|
|
15
|
+
*/
|
|
16
|
+
import { existsSync, readFileSync, statSync } from 'node:fs';
|
|
17
|
+
import { join } from 'node:path';
|
|
18
|
+
import { parse as parseYaml } from 'yaml';
|
|
19
|
+
import { INSTANCE_RE, cleanEntry, parseLog, promotable, stopsLogPath } from './decisions.js';
|
|
20
|
+
export const PROPOSAL_MAX_BYTES = 1024 * 1024;
|
|
21
|
+
export const EXPLANATION_CAP = 1_000;
|
|
22
|
+
const WORDS = { keep: 'kept', reject: 'rejected', promote: 'promoted' };
|
|
23
|
+
const PARTS = [
|
|
24
|
+
['what_happened', 'whatHappened'],
|
|
25
|
+
['example', 'example'],
|
|
26
|
+
['what_changes', 'whatChanges'],
|
|
27
|
+
];
|
|
28
|
+
const MAPPING_KEYS = new Set(['verdict', ...PARTS.map(([k]) => k)]);
|
|
29
|
+
/** Agent text as it may appear in a problem line: cleaned, short, on one line. */
|
|
30
|
+
function shown(value) {
|
|
31
|
+
return JSON.stringify(cleanEntry(String(value), 100).replace(/\n/g, ' '));
|
|
32
|
+
}
|
|
33
|
+
function fail(problem) {
|
|
34
|
+
return { ok: false, problems: [problem] };
|
|
35
|
+
}
|
|
36
|
+
function rawEntry(value) {
|
|
37
|
+
if (!(value instanceof Map))
|
|
38
|
+
return { verdict: value, parts: null, unknownKeys: [] };
|
|
39
|
+
const unknownKeys = [...value.keys()].filter((k) => !MAPPING_KEYS.has(k)).map((k) => String(k));
|
|
40
|
+
return { verdict: value.get('verdict'), parts: value, unknownKeys };
|
|
41
|
+
}
|
|
42
|
+
/** Every problem with one instance's proposal, or the checked instance (AC-2, AC-3). */
|
|
43
|
+
function checkInstance(root, instance, value) {
|
|
44
|
+
const problems = [];
|
|
45
|
+
const at = (n, what) => problems.push(`${instance} entry ${n}: ${what}`);
|
|
46
|
+
if (!existsSync(join(root, '.aidlc', 'state', instance))) {
|
|
47
|
+
return { problems: [`${instance}: no such instance in ${root}`], checked: null };
|
|
48
|
+
}
|
|
49
|
+
const path = stopsLogPath(root, instance);
|
|
50
|
+
let text;
|
|
51
|
+
try {
|
|
52
|
+
text = readFileSync(path, 'utf8');
|
|
53
|
+
}
|
|
54
|
+
catch {
|
|
55
|
+
return { problems: [`${instance}: has no unattended-stops.md`], checked: null };
|
|
56
|
+
}
|
|
57
|
+
if (!(value instanceof Map) || value.size === 0) {
|
|
58
|
+
return { problems: [`${instance}: must map entry numbers to verdicts`], checked: null };
|
|
59
|
+
}
|
|
60
|
+
const log = parseLog(text);
|
|
61
|
+
const byNumber = new Map(log.map((e) => [e.n, e]));
|
|
62
|
+
const given = new Map();
|
|
63
|
+
for (const [key, raw] of value) {
|
|
64
|
+
if (typeof key !== 'number' || !Number.isInteger(key) || key < 1) {
|
|
65
|
+
at(shown(key), 'not an entry number');
|
|
66
|
+
continue;
|
|
67
|
+
}
|
|
68
|
+
const entry = byNumber.get(key);
|
|
69
|
+
if (entry === undefined) {
|
|
70
|
+
at(key, 'the log holds no such entry');
|
|
71
|
+
continue;
|
|
72
|
+
}
|
|
73
|
+
const r = rawEntry(raw);
|
|
74
|
+
for (const k of r.unknownKeys)
|
|
75
|
+
at(key, `unknown key ${shown(k)}`);
|
|
76
|
+
if (r.verdict === undefined) {
|
|
77
|
+
at(key, 'no verdict');
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
const proposed = typeof r.verdict === 'string' ? WORDS[r.verdict] : undefined;
|
|
81
|
+
if (proposed === undefined) {
|
|
82
|
+
at(key, `${shown(r.verdict)} is not keep, reject or promote`);
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
85
|
+
if (entry.verdict !== null) {
|
|
86
|
+
at(key, `already has a verdict (${entry.verdict})`);
|
|
87
|
+
continue;
|
|
88
|
+
}
|
|
89
|
+
if (proposed === 'promoted' && !promotable(entry)) {
|
|
90
|
+
at(key, `cannot be promoted: it is ${entry.typed ? 'a typed ' : ''}${entry.type}`);
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
93
|
+
const needsPerson = entry.type === 'open-question' || proposed !== 'kept';
|
|
94
|
+
let explanation = null;
|
|
95
|
+
if (needsPerson) {
|
|
96
|
+
const missing = PARTS.filter(([k]) => {
|
|
97
|
+
const part = r.parts?.get(k);
|
|
98
|
+
return typeof part !== 'string' || part.trim() === '';
|
|
99
|
+
}).map(([k]) => k);
|
|
100
|
+
if (missing.length > 0) {
|
|
101
|
+
at(key, `needs the person, so it needs ${missing.join(', ')}`);
|
|
102
|
+
continue;
|
|
103
|
+
}
|
|
104
|
+
const part = (k) => cleanEntry((r.parts?.get(k)).trim(), EXPLANATION_CAP);
|
|
105
|
+
explanation = { whatHappened: part('what_happened'), example: part('example'), whatChanges: part('what_changes') };
|
|
106
|
+
}
|
|
107
|
+
given.set(key, { entry, proposed, explanation, needsPerson });
|
|
108
|
+
}
|
|
109
|
+
// A proposal for an instance covers all of it, so no unexplained prompt appears mid-review (AC-3).
|
|
110
|
+
for (const e of log) {
|
|
111
|
+
if (e.verdict === null && !given.has(e.n) && !problems.some((p) => p.startsWith(`${instance} entry ${e.n}:`))) {
|
|
112
|
+
at(e.n, 'unreviewed, and the proposal gives it no verdict');
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
if (problems.length > 0)
|
|
116
|
+
return { problems, checked: null };
|
|
117
|
+
const entries = log.filter((e) => given.has(e.n)).map((e) => given.get(e.n));
|
|
118
|
+
return { problems: [], checked: { instance, path, text, entries } };
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* The whole proposal checked against the logs in `root`, before anything is written or asked
|
|
122
|
+
* (review-from-agent-proposal/AC-5). A file-level problem is one line and ends the check
|
|
123
|
+
* (AC-4); otherwise every problem in every instance is collected (AC-2, AC-3).
|
|
124
|
+
*/
|
|
125
|
+
export function checkProposal(root, file) {
|
|
126
|
+
let size;
|
|
127
|
+
try {
|
|
128
|
+
const st = statSync(file);
|
|
129
|
+
// No device or FIFO: a read of one need not end.
|
|
130
|
+
if (!st.isFile())
|
|
131
|
+
return fail(`proposal ${file} is not a regular file`);
|
|
132
|
+
size = st.size;
|
|
133
|
+
}
|
|
134
|
+
catch (e) {
|
|
135
|
+
return fail(`cannot read the proposal ${file}: ${e.code ?? e.message}`);
|
|
136
|
+
}
|
|
137
|
+
if (size > PROPOSAL_MAX_BYTES)
|
|
138
|
+
return fail(`proposal ${file} is ${size} bytes; the limit is ${PROPOSAL_MAX_BYTES}`);
|
|
139
|
+
let doc;
|
|
140
|
+
try {
|
|
141
|
+
doc = parseYaml(readFileSync(file, 'utf8'), { mapAsMap: true });
|
|
142
|
+
}
|
|
143
|
+
catch (e) {
|
|
144
|
+
const first = e.message.split('\n')[0];
|
|
145
|
+
return fail(`proposal ${file} is not valid YAML: ${cleanEntry(first, 200)}`);
|
|
146
|
+
}
|
|
147
|
+
const instances = doc instanceof Map ? doc.get('instances') : undefined;
|
|
148
|
+
if (!(doc instanceof Map) || doc.size !== 1 || !(instances instanceof Map) || instances.size === 0) {
|
|
149
|
+
return fail(`proposal ${file} must hold one key, instances, mapping each instance to its verdicts`);
|
|
150
|
+
}
|
|
151
|
+
const problems = [];
|
|
152
|
+
const checked = [];
|
|
153
|
+
const names = [...instances.keys()];
|
|
154
|
+
// A name becomes a path segment only after it passes the instance-name pattern (AC-4).
|
|
155
|
+
for (const name of names) {
|
|
156
|
+
if (typeof name !== 'string' || !INSTANCE_RE.test(name))
|
|
157
|
+
problems.push(`not an instance name: ${shown(name)}`);
|
|
158
|
+
}
|
|
159
|
+
for (const name of names.filter((n) => typeof n === 'string' && INSTANCE_RE.test(n)).sort()) {
|
|
160
|
+
const r = checkInstance(root, name, instances.get(name));
|
|
161
|
+
problems.push(...r.problems);
|
|
162
|
+
if (r.checked !== null)
|
|
163
|
+
checked.push(r.checked);
|
|
164
|
+
}
|
|
165
|
+
return problems.length > 0 ? { ok: false, problems } : { ok: true, instances: checked };
|
|
166
|
+
}
|
|
167
|
+
//# sourceMappingURL=proposal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proposal.js","sourceRoot":"","sources":["../../src/autopilot/proposal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC7D,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,MAAM,CAAC;AAE1C,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,YAAY,EAAiB,MAAM,gBAAgB,CAAC;AA+B5G,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,GAAG,IAAI,CAAC;AAC9C,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,CAAC;AAErC,MAAM,KAAK,GAAoC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;AACzG,MAAM,KAAK,GAAG;IACZ,CAAC,eAAe,EAAE,cAAc,CAAC;IACjC,CAAC,SAAS,EAAE,SAAS,CAAC;IACtB,CAAC,cAAc,EAAE,aAAa,CAAC;CACvB,CAAC;AACX,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC,CAAC,SAAS,EAAE,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAEpE,kFAAkF;AAClF,SAAS,KAAK,CAAC,KAAc;IAC3B,OAAO,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC;AAC5E,CAAC;A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CAAC;QAC1G,MAAM,CAAC,GAAG,aAAa,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;QACzD,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC;QAC7B,IAAI,CAAC,CAAC,OAAO,KAAK,IAAI;YAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;IAClD,CAAC;IACD,OAAO,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC;AAC1F,CAAC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `aidlc autopilot review
|
|
3
|
-
*
|
|
2
|
+
* `aidlc autopilot review` — the morning walk through an unattended run's decisions
|
|
3
|
+
* (unattended-decision-diary/AC-13..AC-20), in three forms: one instance, every instance with
|
|
4
|
+
* an unreviewed entry (`--pending`), or an agent's proposal accepted in one step (`--from`)
|
|
5
|
+
* (review-from-agent-proposal).
|
|
4
6
|
*
|
|
5
7
|
* It reads the checkout it runs in, not the primary one every other subcommand resolves: the
|
|
6
8
|
* log sits on the item's branch, so before the merge it is in the item's worktree — where its
|
|
@@ -9,7 +11,7 @@
|
|
|
9
11
|
* Only a person reviews. The check is the terminal test the person-only commands share, not an
|
|
10
12
|
* entry in their table: the installed approval guard embeds that table (design D4).
|
|
11
13
|
*
|
|
12
|
-
* Design: design.md
|
|
14
|
+
* Design: design.md C3
|
|
13
15
|
*
|
|
14
16
|
* @module
|
|
15
17
|
*/
|
|
@@ -25,7 +27,17 @@ export interface ReviewDeps {
|
|
|
25
27
|
/** Why no person is present, or null when one is (`absenceReason`). */
|
|
26
28
|
absence: string | null;
|
|
27
29
|
}
|
|
30
|
+
/** Which form of the review to run; exactly one is given (review-from-agent-proposal/AC-20). */
|
|
31
|
+
export interface ReviewForms {
|
|
32
|
+
instance?: string;
|
|
33
|
+
pending?: boolean;
|
|
34
|
+
from?: string;
|
|
35
|
+
}
|
|
36
|
+
export declare const REVIEW_USAGE = "usage: aidlc autopilot review <instance> | --pending | --from <file>";
|
|
37
|
+
/** Unchanged signature for existing callers: the person check, then one instance. */
|
|
28
38
|
export declare function runReview(instance: string, deps: ReviewDeps): Promise<number>;
|
|
39
|
+
/** Every form's entry point: the person check before any read, then the form check, then the form (AC-20, AC-21, design D7). */
|
|
40
|
+
export declare function runReviewCommand(forms: ReviewForms, deps: ReviewDeps): Promise<number>;
|
|
29
41
|
/** Today in local time, as the log's dates are written. */
|
|
30
42
|
export declare function localDate(now?: Date): string;
|
|
31
43
|
//# sourceMappingURL=review.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"review.d.ts","sourceRoot":"","sources":["../../src/autopilot/review.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"review.d.ts","sourceRoot":"","sources":["../../src/autopilot/review.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAKH,OAAO,KAAK,EAAE,QAAQ,EAAgB,MAAM,mBAAmB,CAAC;AAkBhE,MAAM,WAAW,UAAU;IACzB,+CAA+C;IAC/C,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,QAAQ,CAAC;IACnB,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5B,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5B,8BAA8B;IAC9B,KAAK,EAAE,MAAM,MAAM,CAAC;IACpB,uEAAuE;IACvE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED,gGAAgG;AAChG,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,YAAY,yEAAyE,CAAC;AAoJnG,qFAAqF;AACrF,wBAAsB,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAInF;AAgGD,gIAAgI;AAChI,wBAAsB,gBAAgB,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAU5F;AAED,2DAA2D;AAC3D,wBAAgB,SAAS,CAAC,GAAG,GAAE,IAAiB,GAAG,MAAM,CAGxD"}
|
package/dist/autopilot/review.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `aidlc autopilot review
|
|
3
|
-
*
|
|
2
|
+
* `aidlc autopilot review` — the morning walk through an unattended run's decisions
|
|
3
|
+
* (unattended-decision-diary/AC-13..AC-20), in three forms: one instance, every instance with
|
|
4
|
+
* an unreviewed entry (`--pending`), or an agent's proposal accepted in one step (`--from`)
|
|
5
|
+
* (review-from-agent-proposal).
|
|
4
6
|
*
|
|
5
7
|
* It reads the checkout it runs in, not the primary one every other subcommand resolves: the
|
|
6
8
|
* log sits on the item's branch, so before the merge it is in the item's worktree — where its
|
|
@@ -9,60 +11,130 @@
|
|
|
9
11
|
* Only a person reviews. The check is the terminal test the person-only commands share, not an
|
|
10
12
|
* entry in their table: the installed approval guard embeds that table (design D4).
|
|
11
13
|
*
|
|
12
|
-
* Design: design.md
|
|
14
|
+
* Design: design.md C3
|
|
13
15
|
*
|
|
14
16
|
* @module
|
|
15
17
|
*/
|
|
16
|
-
import { existsSync, readFileSync } from 'node:fs';
|
|
18
|
+
import { existsSync, readdirSync, readFileSync } from 'node:fs';
|
|
17
19
|
import { join } from 'node:path';
|
|
18
|
-
import { cleanEntry, parseLog, promotable, promote, stopsLogPath, withVerdict, writeWhole, } from './decisions.js';
|
|
19
|
-
|
|
20
|
-
const
|
|
20
|
+
import { INSTANCE_RE, PERSON_NOTE, PROPOSAL_NOTE, cleanEntry, parseLog, promotable, promote, recordCorrection, stopsLogPath, withVerdict, writeWhole, } from './decisions.js';
|
|
21
|
+
import { checkProposal } from './proposal.js';
|
|
22
|
+
export const REVIEW_USAGE = 'usage: aidlc autopilot review <instance> | --pending | --from <file>';
|
|
21
23
|
const LATER = 'later';
|
|
24
|
+
const STOPPED = 'review stopped; verdicts given so far are written';
|
|
25
|
+
/** The type as the person reads it; an untyped entry says so, which is why promote is offered (review-from-agent-proposal/AC-14). */
|
|
26
|
+
function typeLabel(e) {
|
|
27
|
+
return e.typed ? e.type : 'untyped';
|
|
28
|
+
}
|
|
22
29
|
function summary(e) {
|
|
23
30
|
const slug = e.slug === '' ? '' : ` — ${e.slug}`;
|
|
24
31
|
const verdict = e.verdict === null ? 'unreviewed' : reviewLine(e);
|
|
25
|
-
return cleanEntry(`${e.n}. [${e
|
|
32
|
+
return cleanEntry(`${e.n}. [${typeLabel(e)}] ${e.title}${slug} (${verdict})`, 300).replace(/\n/g, ' ');
|
|
26
33
|
}
|
|
27
34
|
/** "kept 2026-10-14", as written in the entry's Review line. */
|
|
28
35
|
function reviewLine(e) {
|
|
29
36
|
const line = e.lines.find((l) => l.startsWith('**Review:**')) ?? '';
|
|
30
37
|
return line.slice('**Review:**'.length).trim();
|
|
31
38
|
}
|
|
32
|
-
|
|
39
|
+
/** The options for one entry; a proposed verdict comes first and says so in text, not colour (review-from-agent-proposal/AC-7). */
|
|
40
|
+
function choices(e, proposed) {
|
|
33
41
|
const options = [
|
|
34
42
|
{ value: 'kept', label: 'keep', hint: 'the call stands' },
|
|
35
43
|
{ value: 'rejected', label: 'reject', hint: 'then reopen the phase with aidlc amend' },
|
|
36
44
|
];
|
|
37
45
|
if (promotable(e))
|
|
38
46
|
options.push({ value: 'promoted', label: 'promote', hint: 'keep it, and add it to the guidance every later item reads' });
|
|
47
|
+
const at = options.findIndex((o) => o.value === proposed);
|
|
48
|
+
if (at !== -1) {
|
|
49
|
+
const [chosen] = options.splice(at, 1);
|
|
50
|
+
options.unshift({ ...chosen, label: `${chosen.label} (proposed)` });
|
|
51
|
+
}
|
|
39
52
|
options.push({ value: LATER, label: 'leave for later' });
|
|
40
53
|
return options;
|
|
41
54
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
55
|
+
function explanationText(x) {
|
|
56
|
+
return `What happened\n${x.whatHappened}\n\nExample\n${x.example}\n\nWhat changes with each answer\n${x.whatChanges}`;
|
|
57
|
+
}
|
|
58
|
+
const WORD = { kept: 'keep', rejected: 'reject', promoted: 'promote' };
|
|
59
|
+
/**
|
|
60
|
+
* One entry, asked and applied — the step every form shares. The verdict is written into the
|
|
61
|
+
* log at once, so a later cancel keeps it (AC-8). A cancelled choice or question writes nothing
|
|
62
|
+
* for this entry and stops.
|
|
63
|
+
*/
|
|
64
|
+
async function askEntry(instance, e, text, deps, proposal) {
|
|
65
|
+
const path = stopsLogPath(deps.root, instance);
|
|
66
|
+
deps.prompter.note(cleanEntry(e.lines.slice(1).join('\n').trim()), `${e.n}. ${typeLabel(e)} — ${cleanEntry(e.title, 200)}`);
|
|
67
|
+
// Already cleaned and cut by checkProposal (review-from-agent-proposal/AC-10).
|
|
68
|
+
if (proposal?.explanation)
|
|
69
|
+
deps.prompter.note(explanationText(proposal.explanation), `The agent proposes: ${WORD[proposal.proposed]}`);
|
|
70
|
+
const answer = await deps.prompter.select({ message: `Entry ${e.n}: keep, reject or promote?`, options: choices(e, proposal?.proposed) });
|
|
71
|
+
if (!answer.ok)
|
|
72
|
+
return { stopped: true };
|
|
73
|
+
if (answer.value === LATER)
|
|
74
|
+
return { stopped: false, text, verdict: null };
|
|
75
|
+
const verdict = answer.value;
|
|
76
|
+
const date = deps.today();
|
|
77
|
+
if (verdict === 'promoted') {
|
|
78
|
+
const r = promote(deps.root, instance, date, e);
|
|
79
|
+
if (!r.ok) {
|
|
80
|
+
// The entry keeps no verdict (AC-18).
|
|
81
|
+
deps.err(`not promoted — ${r.reason}`);
|
|
82
|
+
return { stopped: false, text, verdict: null };
|
|
83
|
+
}
|
|
84
|
+
deps.out(`promoted entry ${e.n} to ${r.file}`);
|
|
85
|
+
}
|
|
86
|
+
// Only a call a person can stand behind teaches; an open question or a default is never asked (AC-4).
|
|
87
|
+
if (verdict === 'rejected' && promotable(e)) {
|
|
88
|
+
const said = await deps.prompter.text({
|
|
89
|
+
message: 'What should it have done?',
|
|
90
|
+
placeholder: 'Enter to skip — a correction goes into the guidance every later item reads',
|
|
91
|
+
});
|
|
92
|
+
// As a cancelled choice: no verdict for this entry, nothing written (AC-6, design D4).
|
|
93
|
+
if (!said.ok)
|
|
94
|
+
return { stopped: true };
|
|
95
|
+
// Clack can hand back undefined for an untouched field; that is a skip (AC-3).
|
|
96
|
+
const shouldHave = said.value ?? '';
|
|
97
|
+
if (shouldHave.trim() !== '') {
|
|
98
|
+
const r = recordCorrection(deps.root, instance, date, e, shouldHave);
|
|
99
|
+
if (r.ok)
|
|
100
|
+
deps.out(`wrote the correction for entry ${e.n} to ${r.file}`);
|
|
101
|
+
else
|
|
102
|
+
deps.err(`no correction written — ${r.reason}`);
|
|
103
|
+
}
|
|
47
104
|
}
|
|
105
|
+
// Every verdict given at a prompt says a person judged it (review-from-agent-proposal/AC-12).
|
|
106
|
+
const next = withVerdict(text, e.n, verdict, date, PERSON_NOTE);
|
|
107
|
+
writeWhole(path, next);
|
|
108
|
+
if (verdict === 'rejected')
|
|
109
|
+
deps.out(`rejected entry ${e.n} — next: aidlc amend ${instance} --impact`);
|
|
110
|
+
if (verdict === 'kept')
|
|
111
|
+
deps.out(`kept entry ${e.n}`);
|
|
112
|
+
return { stopped: false, text: next, verdict };
|
|
113
|
+
}
|
|
114
|
+
function refuseAbsent(deps) {
|
|
115
|
+
deps.err(`aidlc autopilot review needs a person: ${deps.absence}. Run it yourself in your own terminal.`);
|
|
116
|
+
return 2;
|
|
117
|
+
}
|
|
118
|
+
/** One instance's log, listed and walked. `stopped` tells `--pending` to end the walk. */
|
|
119
|
+
async function reviewInstance(instance, deps) {
|
|
48
120
|
if (!INSTANCE_RE.test(instance)) {
|
|
49
121
|
deps.err(`not an instance name: ${JSON.stringify(cleanEntry(instance, 100))}`);
|
|
50
|
-
return 1;
|
|
122
|
+
return { code: 1, stopped: false };
|
|
51
123
|
}
|
|
52
124
|
if (!existsSync(join(deps.root, '.aidlc', 'state', instance))) {
|
|
53
125
|
deps.err(`no instance "${instance}" in ${deps.root}`);
|
|
54
|
-
return 1;
|
|
126
|
+
return { code: 1, stopped: false };
|
|
55
127
|
}
|
|
56
128
|
const path = stopsLogPath(deps.root, instance);
|
|
57
129
|
if (!existsSync(path)) {
|
|
58
130
|
deps.out(`${instance} has no unattended-stops.md — nothing to review`);
|
|
59
|
-
return 0;
|
|
131
|
+
return { code: 0, stopped: false };
|
|
60
132
|
}
|
|
61
133
|
let text = readFileSync(path, 'utf8');
|
|
62
134
|
const entries = parseLog(text);
|
|
63
135
|
if (entries.length === 0) {
|
|
64
136
|
deps.out(`${instance}: unattended-stops.md holds no entry — nothing to review`);
|
|
65
|
-
return 0;
|
|
137
|
+
return { code: 0, stopped: false };
|
|
66
138
|
}
|
|
67
139
|
deps.out(`${instance}: ${entries.length} entr${entries.length === 1 ? 'y' : 'ies'} in ${path}`);
|
|
68
140
|
for (const e of entries)
|
|
@@ -70,37 +142,136 @@ export async function runReview(instance, deps) {
|
|
|
70
142
|
const open = entries.filter((e) => e.verdict === null);
|
|
71
143
|
if (open.length === 0) {
|
|
72
144
|
deps.out('every entry has a verdict');
|
|
73
|
-
return 0;
|
|
145
|
+
return { code: 0, stopped: false };
|
|
74
146
|
}
|
|
75
|
-
const date = deps.today();
|
|
76
147
|
for (const e of open) {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
return 0;
|
|
148
|
+
const r = await askEntry(instance, e, text, deps);
|
|
149
|
+
if (r.stopped) {
|
|
150
|
+
deps.out(STOPPED);
|
|
151
|
+
return { code: 0, stopped: true };
|
|
82
152
|
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
153
|
+
text = r.text;
|
|
154
|
+
}
|
|
155
|
+
return { code: 0, stopped: false };
|
|
156
|
+
}
|
|
157
|
+
/** Unchanged signature for existing callers: the person check, then one instance. */
|
|
158
|
+
export async function runReview(instance, deps) {
|
|
159
|
+
// Before any read: an agent is refused without learning anything (AC-14).
|
|
160
|
+
if (deps.absence !== null)
|
|
161
|
+
return refuseAbsent(deps);
|
|
162
|
+
return (await reviewInstance(instance, deps)).code;
|
|
163
|
+
}
|
|
164
|
+
/** Instances in this checkout whose log holds an entry without a verdict, in name order (review-from-agent-proposal/AC-17). */
|
|
165
|
+
function pendingInstances(root) {
|
|
166
|
+
const stateDir = join(root, '.aidlc', 'state');
|
|
167
|
+
let names;
|
|
168
|
+
try {
|
|
169
|
+
names = readdirSync(stateDir, { withFileTypes: true })
|
|
170
|
+
.filter((d) => d.isDirectory() && INSTANCE_RE.test(d.name))
|
|
171
|
+
.map((d) => d.name);
|
|
172
|
+
}
|
|
173
|
+
catch {
|
|
174
|
+
return [];
|
|
175
|
+
}
|
|
176
|
+
return names.sort().filter((name) => {
|
|
177
|
+
const path = stopsLogPath(root, name);
|
|
178
|
+
return existsSync(path) && parseLog(readFileSync(path, 'utf8')).some((e) => e.verdict === null);
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
/** `--pending`: every instance with an unreviewed entry, one after another; a cancel ends the walk (AC-17 to AC-19). */
|
|
182
|
+
async function reviewPending(deps) {
|
|
183
|
+
const names = pendingInstances(deps.root);
|
|
184
|
+
if (names.length === 0) {
|
|
185
|
+
deps.out('no instance has an unreviewed entry');
|
|
186
|
+
return 0;
|
|
187
|
+
}
|
|
188
|
+
let code = 0;
|
|
189
|
+
for (const name of names) {
|
|
190
|
+
deps.out(`== ${name} ==`);
|
|
191
|
+
const r = await reviewInstance(name, deps);
|
|
192
|
+
code = Math.max(code, r.code);
|
|
193
|
+
if (r.stopped)
|
|
194
|
+
break;
|
|
195
|
+
}
|
|
196
|
+
return code;
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* `--from <file>`: the proposal checked whole, every routine keep written at once, then a stop
|
|
200
|
+
* for each entry that needs the person (AC-6 to AC-9).
|
|
201
|
+
*/
|
|
202
|
+
async function reviewFrom(file, deps) {
|
|
203
|
+
const checked = checkProposal(deps.root, file);
|
|
204
|
+
if (!checked.ok) {
|
|
205
|
+
for (const p of checked.problems)
|
|
206
|
+
deps.err(p);
|
|
207
|
+
deps.err('nothing written');
|
|
208
|
+
return 1;
|
|
209
|
+
}
|
|
210
|
+
const date = deps.today();
|
|
211
|
+
const tally = new Map();
|
|
212
|
+
const texts = new Map();
|
|
213
|
+
for (const inst of checked.instances) {
|
|
214
|
+
// Routine is a proposed keep of anything but an open question, so this pass only ever
|
|
215
|
+
// writes kept — nothing an agent proposes reaches decisions.md without a person (design D3).
|
|
216
|
+
const routine = inst.entries.filter((e) => !e.needsPerson);
|
|
217
|
+
let text = inst.text;
|
|
218
|
+
for (const e of routine)
|
|
219
|
+
text = withVerdict(text, e.entry.n, 'kept', date, PROPOSAL_NOTE);
|
|
220
|
+
if (routine.length > 0)
|
|
221
|
+
writeWhole(inst.path, text);
|
|
222
|
+
texts.set(inst.instance, text);
|
|
223
|
+
tally.set(inst.instance, { accepted: routine.length, judged: 0, later: 0 });
|
|
224
|
+
deps.out(`${inst.instance}: kept ${routine.length} routine entr${routine.length === 1 ? 'y' : 'ies'} from the proposal`);
|
|
225
|
+
}
|
|
226
|
+
let stopped = false;
|
|
227
|
+
for (const inst of checked.instances) {
|
|
228
|
+
const t = tally.get(inst.instance);
|
|
229
|
+
const stops = inst.entries.filter((e) => e.needsPerson);
|
|
230
|
+
if (stops.length > 0 && !stopped)
|
|
231
|
+
deps.out(`== ${inst.instance} ==`);
|
|
232
|
+
for (const e of stops) {
|
|
233
|
+
// After a cancel, the stops not reached are left for later (AC-9).
|
|
234
|
+
if (stopped) {
|
|
235
|
+
t.later++;
|
|
91
236
|
continue;
|
|
92
237
|
}
|
|
93
|
-
|
|
238
|
+
const r = await askEntry(inst.instance, e.entry, texts.get(inst.instance), deps, {
|
|
239
|
+
proposed: e.proposed,
|
|
240
|
+
explanation: e.explanation,
|
|
241
|
+
});
|
|
242
|
+
if (r.stopped) {
|
|
243
|
+
stopped = true;
|
|
244
|
+
t.later++;
|
|
245
|
+
deps.out(STOPPED);
|
|
246
|
+
continue;
|
|
247
|
+
}
|
|
248
|
+
texts.set(inst.instance, r.text);
|
|
249
|
+
if (r.verdict === null)
|
|
250
|
+
t.later++;
|
|
251
|
+
else
|
|
252
|
+
t.judged++;
|
|
94
253
|
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
deps.out(`rejected entry ${e.n} — next: aidlc amend ${instance} --impact`);
|
|
99
|
-
if (verdict === 'kept')
|
|
100
|
-
deps.out(`kept entry ${e.n}`);
|
|
254
|
+
}
|
|
255
|
+
for (const [instance, t] of tally) {
|
|
256
|
+
deps.out(`${instance}: ${t.accepted} accepted from the proposal, ${t.judged} judged by you, ${t.later} left for later`);
|
|
101
257
|
}
|
|
102
258
|
return 0;
|
|
103
259
|
}
|
|
260
|
+
/** Every form's entry point: the person check before any read, then the form check, then the form (AC-20, AC-21, design D7). */
|
|
261
|
+
export async function runReviewCommand(forms, deps) {
|
|
262
|
+
if (deps.absence !== null)
|
|
263
|
+
return refuseAbsent(deps);
|
|
264
|
+
const given = [forms.instance !== undefined, forms.pending === true, forms.from !== undefined].filter(Boolean).length;
|
|
265
|
+
if (given !== 1) {
|
|
266
|
+
deps.err(REVIEW_USAGE);
|
|
267
|
+
return 1;
|
|
268
|
+
}
|
|
269
|
+
if (forms.from !== undefined)
|
|
270
|
+
return reviewFrom(forms.from, deps);
|
|
271
|
+
if (forms.pending === true)
|
|
272
|
+
return reviewPending(deps);
|
|
273
|
+
return runReview(forms.instance, deps);
|
|
274
|
+
}
|
|
104
275
|
/** Today in local time, as the log's dates are written. */
|
|
105
276
|
export function localDate(now = new Date()) {
|
|
106
277
|
const pad = (n) => String(n).padStart(2, '0');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"review.js","sourceRoot":"","sources":["../../src/autopilot/review.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGjC,OAAO,EACL,UAAU,EACV,QAAQ,EACR,UAAU,EACV,OAAO,EACP,YAAY,EACZ,WAAW,EACX,UAAU,GAGX,MAAM,gBAAgB,CAAC;AAcxB,8EAA8E;AAC9E,MAAM,WAAW,GAAG,2BAA2B,CAAC;AAEhD,MAAM,KAAK,GAAG,OAAO,CAAC;AAEtB,SAAS,OAAO,CAAC,CAAW;IAC1B,MAAM,IAAI,GAAG,CAAC,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC;IACjD,MAAM,OAAO,GAAG,CAAC,CAAC,OAAO,KAAK,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IAClE,OAAO,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,KAAK,GAAG,IAAI,MAAM,OAAO,GAAG,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;AACpG,CAAC;AAED,gEAAgE;AAChE,SAAS,UAAU,CAAC,CAAW;IAC7B,MAAM,IAAI,GAA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G,CAAC,WAAW,EAAE,IAAI,GAAG,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,IAAI,GAAG,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC;AACjF,CAAC"}
|
|
@@ -60,6 +60,12 @@ export interface TypedArgs {
|
|
|
60
60
|
/** Codex only: both under `<git-common-dir>/aidlc/autopilot/` (autopilot-reads-agent-result/AC-2). */
|
|
61
61
|
schemaFile: string;
|
|
62
62
|
outcomeFile: string;
|
|
63
|
+
/**
|
|
64
|
+
* Codex only: the one directory beyond the worktree its sandbox may write. A linked
|
|
65
|
+
* worktree's index, objects and refs live there, so without it no commit and no `aidlc`
|
|
66
|
+
* claim can succeed (codex-sandbox-blocks-commit/AC-1, AC-4).
|
|
67
|
+
*/
|
|
68
|
+
gitCommonDir: string;
|
|
63
69
|
/** Claude only: `--max-budget-usd` in whole cents; null adds no flag (autopilot-reads-agent-result/AC-17). */
|
|
64
70
|
maxBudgetCents: number | null;
|
|
65
71
|
/** The session to resume; null for a fresh launch (autopilot-reads-agent-result/AC-23). */
|
|
@@ -72,7 +78,9 @@ export interface TypedArgs {
|
|
|
72
78
|
* agent can edit (autopilot-reads-agent-result/AC-33).
|
|
73
79
|
*
|
|
74
80
|
* Codex's flags go before the prompt so that a resume is a splice — `resume <id>` where
|
|
75
|
-
* the prompt was, after every option `codex exec` defines (design D4).
|
|
81
|
+
* the prompt was, after every option `codex exec` defines (design D4). Also null for a
|
|
82
|
+
* Codex launch whose git common dir is not absolute: a relative one would grant whatever
|
|
83
|
+
* directory Codex starts in (codex-sandbox-blocks-commit/AC-4).
|
|
76
84
|
*/
|
|
77
85
|
export declare function typedArgv(command: readonly string[], args: TypedArgs): string[] | null;
|
|
78
86
|
export declare function withOutcomeContract(prompt: string): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typed.d.ts","sourceRoot":"","sources":["../../src/autopilot/typed.ts"],"names":[],"mappings":"AAAA;;;;;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