pi-goal-list-loop-audit 0.26.3 → 0.26.4

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.
@@ -595,8 +595,12 @@ function fireReviewer(
595
595
  } catch {
596
596
  /* archive md may not exist for manual review of a live goal */
597
597
  }
598
+ // v0.26.4 source curation: an APPROVED audit report is the executor's
599
+ // own completion claims — meta-text with zero finding signal (the
600
+ // 0.26.2/0.26.3 misfires both mined it). Disapprovals/errors carry the
601
+ // independent auditor's required-fixes — the real findings.
598
602
  const auditTexts = readAuditLog(ctx.cwd)
599
- .filter((e) => e.goalId === source.goalId)
603
+ .filter((e) => e.goalId === source.goalId && (e.verdict === "disapproved" || e.verdict === "error"))
600
604
  .map((e) => e.report);
601
605
  for (const t of auditTexts) sources.push({ name: "audit", text: t });
602
606
  let ledgerEntries: Array<{ type: string; at?: string; value?: any }> = [];
@@ -80,8 +80,8 @@ const CLASS_PATTERNS: Array<{ class: FindingClass; re: RegExp }> = [
80
80
  * the reviewer's own report/config vocabulary. Observed false positives
81
81
  * from the 0.26.2 completion: a test("…architectural…") name, the
82
82
  * INSTALL.md mode-matrix row, and ship-doc prose. */
83
- const SKIP_LINE = /^\s*(test|it|describe|assert|expect)\s*\(|^\s*(const|let|var|function|import|export|require)\b|\{\s*\.\.\.\s*\}|,\s*\.\.\.$|^\s*\|/;
84
- const REVIEWER_VOCAB = /architectural-class|bug-class|refactor-class|strategic-class|reviewer found|cascade step|\*\*Mode\*\*|problems\s*\/\s*(improvements|architectural)/i;
83
+ const SKIP_LINE = /^\s*(test|it|describe|assert|expect)\s*\(|^\s*(const|let|var|function|import|export|require)\b|\{\s*\.\.\.\s*\}|,\s*\.\.\.$|^\s*\||^\s*[{\[\]}]|^\s*['"]/;
84
+ const REVIEWER_VOCAB = /architectural-class|bug-class|refactor-class|strategic-class|reviewer found|cascade step|\*\*Mode\*\*|problems\s*\/\s*\(?(improvements|architectural)/i;
85
85
 
86
86
  export function classifyFindingText(line: string): FindingClass | undefined {
87
87
  const t = line.trim();
@@ -93,12 +93,23 @@ export function classifyFindingText(line: string): FindingClass | undefined {
93
93
  return undefined;
94
94
  }
95
95
 
96
- /** Scan source texts line-by-line for finding-shaped content. */
96
+ /** v0.26.4: remove fenced code blocks and inline code spans. Quoted
97
+ * code is how completion summaries leak vocabulary into extraction —
98
+ * the 0.26.3 misfire matched a backticked reviewer.ts line containing
99
+ * four architectural patterns. */
100
+ export function stripCodeSpans(text: string): string {
101
+ return text
102
+ .replace(/```[\s\S]*?```/g, " ")
103
+ .replace(/`[^`\n]*`/g, " ");
104
+ }
105
+
106
+ /** Scan source texts line-by-line for finding-shaped content. Code
107
+ * spans are stripped first (v0.26.4) — findings live in prose. */
97
108
  export function extractFindings(sources: Array<{ name: string; text: string }>, max: number): Finding[] {
98
109
  const out: Finding[] = [];
99
110
  const seen = new Set<string>();
100
111
  for (const { name, text } of sources) {
101
- for (const line of text.split("\n")) {
112
+ for (const line of stripCodeSpans(text).split("\n")) {
102
113
  const cls = classifyFindingText(line);
103
114
  if (!cls) continue;
104
115
  const clean = line.trim().replace(/^[-*>\s\[\]x]+/, "").slice(0, 200);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-goal-list-loop-audit",
3
- "version": "0.26.3",
3
+ "version": "0.26.4",
4
4
  "description": "Goal. Loop. Audit. Done. — a pi-coding-agent extension that supervises long-running work, with isolated auditor on each completion. Beat bamboozling by design: the auditor runs in a fresh session with no extensions, no skills, no editor — only the read tools needed to verify your goal.",
5
5
  "license": "MIT",
6
6
  "author": "dracon",