@jwilger/pi-development-system 0.28.0 → 0.30.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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jwilger/pi-development-system",
3
- "version": "0.28.0",
3
+ "version": "0.30.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"
@@ -30,11 +30,16 @@ export type DiffNow = {
30
30
  readonly files?: Readonly<Record<string, string>>;
31
31
  };
32
32
 
33
+ // The departure log is the system's own record (devsys_record_departure writes it), not work under review.
34
+ export const DECISION_LOG = /^docs\/decisions\/\d{4}-\d{2}\.md$/;
35
+
33
36
  /** Every file in the current diff was in the last round's diff, byte for byte: a part of what was reviewed. */
34
37
  const coveredByLastRound = (review: ReviewState, now: DiffNow): boolean => {
35
38
  const reviewed = review.rounds.at(-1)?.files;
36
39
  if (reviewed === undefined || now.files === undefined) return false;
37
- return Object.entries(now.files).every(([path, digest]) => reviewed[path] === digest);
40
+ return Object.entries(now.files).every(
41
+ ([path, digest]) => reviewed[path] === digest || DECISION_LOG.test(path),
42
+ );
38
43
  };
39
44
 
40
45
  export function reviewGap(state: DevsysState, slice: SliceRef, now: DiffNow): string | undefined {
@@ -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(/\/+$/, "");