@jwilger/pi-development-system 0.24.0 → 0.25.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/package.json
CHANGED
package/prompts/devsys-review.md
CHANGED
|
@@ -6,5 +6,5 @@ Review the work in progress with the code-review skill.
|
|
|
6
6
|
|
|
7
7
|
1. Call `devsys_review_start` (slice and diff range: $ARGUMENTS; omit either to use the active slice and `HEAD`).
|
|
8
8
|
2. Run the `agent_spawn` payload it returns, unchanged.
|
|
9
|
-
3. Pass the reviewer's packet verbatim to `devsys_review_record
|
|
9
|
+
3. Pass the reviewer's packet verbatim to `devsys_review_record` with the same `diffDigest` and `diffRange` the start reply gave.
|
|
10
10
|
4. Report `review: N/R clean` and the next action. If the next action is `fix-findings`, list each blocking and should-fix finding with its `path:line`.
|
|
@@ -17,7 +17,8 @@ Review is a soft gate (`review.unsatisfied`): skipping it needs a recorded depar
|
|
|
17
17
|
2. Run that `agent_spawn` unchanged. The reviewer is a top-level agent, not a
|
|
18
18
|
child of this conversation, so it does not inherit your context.
|
|
19
19
|
3. Pass the reviewer's packet, verbatim, to `devsys_review_record` with the
|
|
20
|
-
`diffDigest` the start reply gave
|
|
20
|
+
`diffDigest` the start reply gave, and the same `diffRange` if you gave one
|
|
21
|
+
(`packets: [...]`; all lens packets of one
|
|
21
22
|
round in one call). A packet is recorded once, in the round its header names;
|
|
22
23
|
if the diff changed since the start, the round is refused: start again.
|
|
23
24
|
4. Read the reply: `review: N/R clean` and `next:`.
|
|
@@ -59,7 +60,7 @@ commit keeps the clean rounds already earned unless findings come back.
|
|
|
59
60
|
## Rules of thumb
|
|
60
61
|
|
|
61
62
|
- Fix the findings before the next round. Do not argue a finding away; if it is
|
|
62
|
-
wrong, the reviewer
|
|
63
|
+
wrong, the reviewer marks it a false positive with evidence (Jev can only suggest).
|
|
63
64
|
- Do not widen a review into an audit of the tree. The reviewer reads the diff and
|
|
64
65
|
what it depends on.
|
|
65
66
|
- Never edit the packet to make it pass.
|
package/src/review/digest.ts
CHANGED
|
@@ -33,7 +33,16 @@ export async function snapshotDiff(
|
|
|
33
33
|
try {
|
|
34
34
|
// Plain, parseable output whatever the user's git config says: an external diff driver or
|
|
35
35
|
// forced colour removes the `diff --git` headers the per-file digests are cut from.
|
|
36
|
-
const plain = [
|
|
36
|
+
const plain = [
|
|
37
|
+
"-c",
|
|
38
|
+
"core.quotePath=false",
|
|
39
|
+
"diff",
|
|
40
|
+
"--no-ext-diff",
|
|
41
|
+
"--no-color",
|
|
42
|
+
// diff.mnemonicPrefix / diff.noprefix change the `a/` `b/` header prefixes the file keys are cut from.
|
|
43
|
+
"--src-prefix=a/",
|
|
44
|
+
"--dst-prefix=b/",
|
|
45
|
+
];
|
|
37
46
|
const [diff, stat, others] = await Promise.all([
|
|
38
47
|
exec("git", [...plain, "--full-index", "--no-renames", range], { cwd, timeout: 15_000 }),
|
|
39
48
|
exec("git", [...plain, "--stat", range], { cwd, timeout: 15_000 }),
|
|
@@ -146,7 +146,7 @@ export function createReviewStartTool(
|
|
|
146
146
|
[
|
|
147
147
|
`${reviewLabel(review)}; round ${round}; diff ${snap.value.digest}. ${basis}`,
|
|
148
148
|
`lenses: ${lenses.join(", ")}`,
|
|
149
|
-
`Spawn the reviewer with agent_spawn using exactly this payload, then pass its packet to devsys_review_record with diffDigest "${snap.value.digest}":`,
|
|
149
|
+
`Spawn the reviewer with agent_spawn using exactly this payload, then pass its packet to devsys_review_record with diffDigest "${snap.value.digest}"${range === "HEAD" ? "" : ` and diffRange "${range}"`}:`,
|
|
150
150
|
JSON.stringify(spawn),
|
|
151
151
|
].join("\n"),
|
|
152
152
|
);
|