@jwilger/pi-development-system 0.29.0 → 0.31.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.
@@ -31,7 +31,7 @@ You are a reviewer. You find defects you can demonstrate from the code and propo
31
31
 
32
32
  ## What counts
33
33
 
34
- Look for correctness bugs, regressions in existing behavior, security issues, and changed behavior with no test. Each finding needs a realistic triggering input or state. Before reporting, try to refute it: a covering test, a nearby guard, a type that rules the case out. Drop it if the refute holds; if it nearly holds, say what evidence is missing. Do not report untraced speculation or nits. Report style only if asked, labeled as style, after defects. Zero findings is a valid result.
34
+ Look for correctness bugs, regressions in existing behavior, security issues, and changed behavior with no test. Each finding needs a realistic triggering input or state. Before reporting, try to refute it: a covering test, a nearby guard, a type that rules the case out. Drop it if the refute holds; if it nearly holds, say what evidence is missing. Do not report untraced speculation or nits. Report style only if asked, labeled as style, after defects. The verdict is `blocking` when any finding is blocking or should-fix, otherwise `no-blocking`. Zero findings is a valid result: write `- none` under Findings.
35
35
 
36
36
  A fix is the smallest local change or deletion that removes the demonstrated defect. Do not propose new abstractions, frameworks, or broad refactors.
37
37
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jwilger/pi-development-system",
3
- "version": "0.29.0",
3
+ "version": "0.31.0",
4
4
  "description": "A pi extension package representing a seasoned approach to software development using a full AI SDLC.",
5
5
  "keywords": [
6
6
  "pi-package"
@@ -31,7 +31,7 @@ export type DiffNow = {
31
31
  };
32
32
 
33
33
  // The departure log is the system's own record (devsys_record_departure writes it), not work under review.
34
- const DECISION_LOG = /^docs\/decisions\/\d{4}-\d{2}\.md$/;
34
+ export const DECISION_LOG = /^docs\/decisions\/\d{4}-\d{2}\.md$/;
35
35
 
36
36
  /** Every file in the current diff was in the last round's diff, byte for byte: a part of what was reviewed. */
37
37
  const coveredByLastRound = (review: ReviewState, now: DiffNow): boolean => {
@@ -177,6 +177,6 @@ export function reviewerTask(input: {
177
177
  "### Verdict",
178
178
  "no-blocking | blocking",
179
179
  "",
180
- "Severity: blocking = demonstrable defect or broken non-negotiable; should-fix = real defect or missing test with a realistic trigger; nit = style or report-only. Zero findings is a valid result.",
180
+ "Severity: blocking = demonstrable defect or broken non-negotiable; should-fix = real defect or missing test with a realistic trigger; nit = style or report-only. The verdict is `blocking` when any finding is blocking or should-fix, otherwise `no-blocking`. With zero findings (a valid result) write `- none` under Findings.",
181
181
  ].join("\n");
182
182
  }
@@ -82,7 +82,7 @@ export function parseReviewPacket(text: string): ReviewPacket | ParseError {
82
82
  const lines = (section(text, "Findings") ?? "")
83
83
  .split("\n")
84
84
  .map((l) => l.trim())
85
- .filter((l) => l !== "" && !/^-?\s*none\.?$/i.test(l));
85
+ .filter((l) => l !== "" && !/^(?:-\s*)?[([]?(?:none|no findings?)[)\]]?\.?$/i.test(l));
86
86
  for (const [i, line] of lines.entries()) {
87
87
  const finding = parseFinding(line, lenses, i + 1);
88
88
  if (isParseError(finding)) return finding;
@@ -14,7 +14,7 @@ import {
14
14
  } from "../core/commit-message.ts";
15
15
  import type { Exec } from "../core/exec.ts";
16
16
  import { resolveGit } from "../core/git-invocations.ts";
17
- import { reviewGap } from "../core/review-flow.ts";
17
+ import { DECISION_LOG, reviewGap } from "../core/review-flow.ts";
18
18
  import { type GateId, isParseError, parseGateId } from "../core/types.ts";
19
19
  import type { Jev } from "../jev/client.ts";
20
20
  import { judgeCommit, MIX_THRESHOLD, RATIONALE_FLOOR } from "../jev/questions/commit.ts";
@@ -176,7 +176,9 @@ const stagedThenEdited = (
176
176
  .filter((i) => (i.sub === "commit" || i.sub === "add") && !isDryRun(i) && inThisDir(i, cwd))
177
177
  .flatMap((i) => i.args.filter((a) => !a.startsWith("-")).map(cleanPath));
178
178
  const covered = (name: string) => named.some((n) => name === n || name.startsWith(`${n}/`));
179
- return names.staged.filter((name) => names.unstaged.includes(name) && !covered(name));
179
+ return names.staged.filter(
180
+ (name) => names.unstaged.includes(name) && !covered(name) && !DECISION_LOG.test(name),
181
+ );
180
182
  };
181
183
 
182
184
  const cleanPath = (arg: string): string => arg.replace(/^(\.\/)+/, "").replace(/\/+$/, "");