pi-goal-list-loop-audit 0.27.4 → 0.27.6

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.
@@ -71,8 +71,13 @@ export interface Settings {
71
71
  * its quota; "agent-default" restores upstream behavior. Applies to NEW
72
72
  * sessions (pi-subagents registers agents at session start). */
73
73
  /** v0.26.0: reviewer (post-completion follow-up enqueuer) config —
74
- * project-scoped; see extensions/reviewer.ts DEFAULT_REVIEWER_CONFIG. */
74
+ * project-scoped; see extensions/reviewer.ts DEFAULT_REVIEWER_CONFIG.
75
+ * v0.27.5: superseded by `postaudit` (same shape, terminology reflects
76
+ * the auditor-adjacent role). Both keys are read; `postaudit` wins
77
+ * when both are present. `reviewer` is kept for backwards compat. */
75
78
  reviewer?: Record<string, unknown>;
79
+ /** v0.27.5: post-completion audit config. Same shape as `reviewer`. */
80
+ postaudit?: Record<string, unknown>;
76
81
  subagentModelStrategy?: SubagentModelStrategy;
77
82
  /** v0.24.6: per-agent-type model pin, e.g. { "Explore": "minimax/MiniMax-M3" }.
78
83
  * Always wins over subagentModelStrategy — the managed override is written
@@ -140,6 +145,7 @@ export const SETTINGS_KEYS: Array<keyof Settings> = [
140
145
  "stallEscalationRefires",
141
146
  "stallShortWords",
142
147
  "stallSimilarityThreshold",
148
+ "postaudit",
143
149
  ];
144
150
 
145
151
  /** Where each effective setting comes from (for the /glla display). */
@@ -683,7 +683,12 @@ function fireReviewer(
683
683
  ): void {
684
684
  try {
685
685
  const settings = loadSettings(ctx.cwd);
686
- const config = resolveReviewerConfig(settings.reviewer as Partial<ReviewerConfig> | undefined);
686
+ // v0.27.5: dual-read `reviewer` (legacy) and `postaudit` (new) settings
687
+ // keys. `postaudit` takes precedence when both are present — the
688
+ // existing settings file shape is preserved; the rename is purely
689
+ // vocabulary on the user-facing surface.
690
+ const reviewerBlock = (settings.postaudit ?? settings.reviewer) as Partial<ReviewerConfig> | undefined;
691
+ const config = resolveReviewerConfig(reviewerBlock);
687
692
  if (opts.mode) config.mode = opts.mode;
688
693
  const sources: Array<{ name: string; text: string }> = [];
689
694
  try {
@@ -728,6 +733,19 @@ function fireReviewer(
728
733
  if (!outcome.fired && outcome.suppressedReason && opts.manual) {
729
734
  ctx.ui.notify(`Reviewer suppressed: ${outcome.suppressedReason}`, "info");
730
735
  }
736
+ // v0.27.5: surface the silent review to interactive users. The internal
737
+ // runReviewer notify fires DURING the goal-completion handler, easy to
738
+ // miss because pi is busy transitioning state. The second notify
739
+ // arrives AFTER everything settles and points at the file directly.
740
+ // Skipped when manual=true (manual /review has its own UX already) and
741
+ // when the runner wasn't fired (suppressed / not applicable).
742
+ if (!opts.manual && outcome.fired && outcome.reportPath) {
743
+ const relPath = path.relative(ctx.cwd, outcome.reportPath) || outcome.reportPath;
744
+ ctx.ui.notify(
745
+ `↳ review written: ${relPath}${outcome.enqueued ? ` (${outcome.enqueued} enqueued to /list)` : ""}${outcome.proposed ? ` (${outcome.proposed} /goal proposed)` : ""}`,
746
+ "info",
747
+ );
748
+ }
731
749
  } catch (err) {
732
750
  ctx.ui.notify(`Reviewer failed (non-fatal): ${err instanceof Error ? err.message : String(err)}`, "warning");
733
751
  }
@@ -3216,6 +3234,13 @@ async function cmdSettings(args: string, ctx: ExtensionContext): Promise<void> {
3216
3234
  await cmdReviewerSettings(ctx);
3217
3235
  return;
3218
3236
  }
3237
+ // v0.27.5: postaudit is the new vocabulary (the post-completion auditor).
3238
+ // Both keywords open the same config menu and resolve to the same settings
3239
+ // key — the legacy `reviewer` label is kept for backwards compatibility.
3240
+ if (/^postaudit\b/.test(trimmed)) {
3241
+ await cmdReviewerSettings(ctx);
3242
+ return;
3243
+ }
3219
3244
  if (!trimmed) {
3220
3245
  if (ctx.hasUI) {
3221
3246
  await openSettingsUI(ctx);
@@ -3245,6 +3270,9 @@ async function cmdSettings(args: string, ctx: ExtensionContext): Promise<void> {
3245
3270
  fmt("wedgeAlertMinutes", "wedgeAlert"),
3246
3271
  fmt("stallShortWords", "stallShortWords"),
3247
3272
  fmt("stallSimilarityThreshold", "stallSimilarityThreshold"),
3273
+ // v0.27.5: post-completion auditor config — read either the new
3274
+ // `postaudit` key or the legacy `reviewer` key (postaudit wins).
3275
+ `postaudit: ${JSON.stringify(loadSettings(ctx.cwd).postaudit ?? loadSettings(ctx.cwd).reviewer ?? {}) || '(unset — defaults)'}`,
3248
3276
  // v0.25.6: effective per-type subagent model resolution.
3249
3277
  ...["Explore", "Plan", "general-purpose"].map(
3250
3278
  (t) => `subagent ${t}: ${resolveEffectiveSubagentModel(t, loadSettings(ctx.cwd), (ctx.model as any)?.id ? `${(ctx.model as any).provider}/${(ctx.model as any).id}` : undefined)}`,
@@ -3576,7 +3604,8 @@ export default function (pi: ExtensionAPI): void {
3576
3604
  ["stats", "per-project ledger rollups: /glla stats [json|premature|project=<path>]"],
3577
3605
  ["audits", "audit-log browser: /glla audits [N|full] — recent verdicts from .pi-glla/audits.jsonl"],
3578
3606
  ["autoaccept=", "on: drafts activate without the Confirm dialog (unattended rigs)"],
3579
- ["reviewer", "reviewer config menu (post-completion follow-up enqueuer)"],
3607
+ ["reviewer", "reviewer config menu (alias of postaudit — post-completion follow-up enqueuer)"],
3608
+ ["postaudit", "post-completion audit config menu (the new name for /glla reviewer)"],
3580
3609
  ["project", "write a project override: /glla project key=value"],
3581
3610
  ]),
3582
3611
  handler: settingsHandler,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pi-goal-list-loop-audit",
3
- "version": "0.27.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.",
3
+ "version": "0.27.6",
4
+ "description": "Goal. Loop. Audit. Done. \u2014 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 \u2014 only the read tools needed to verify your goal.",
5
5
  "license": "MIT",
6
6
  "author": "dracon",
7
7
  "type": "module",
@@ -43,7 +43,9 @@
43
43
  },
44
44
  "scripts": {
45
45
  "check": "tsc --noEmit",
46
- "test": "node --experimental-strip-types --test tests/*.test.ts"
46
+ "test": "bun test",
47
+ "test:node": "node --experimental-strip-types --test tests/*.test.ts",
48
+ "test:all": "bun test && tsc --noEmit"
47
49
  },
48
50
  "peerDependencies": {
49
51
  "@earendil-works/pi-agent-core": "*",
@@ -52,6 +52,7 @@ When the agent calls any of these, the orchestrator tracks the call and persists
52
52
  - **Default to subagents.** For any task that decomposes into independent chunks, spawn `Agent` subagents. Use `Explore` for read-only research, `general-purpose` for implementation, `Plan` for architecture. Spawn multiple in PARALLEL — don't serialise through your own context. You remain the single writer: synthesize findings and apply edits yourself.
53
53
  - **Eager continuation.** When in doubt, KEEP GOING on sub-tasks. If a subagent fails, retry with a different approach. Don't ask permission to continue — just continue. Pause only when you are genuinely blocked on information that does not exist in the repo, or the user explicitly pauses you.
54
54
  - **Bound every long command.** Wrap test suites, builds, and dev servers in `timeout <seconds>` (e.g. `timeout 120 bun test src/lib`). An unbounded command that hangs burns an hour; a bounded one burns two minutes and tells you it hung. If a command produces no output for many minutes, treat it as hung: kill it, diagnose why, rerun bounded.
55
+ - **Chunk output near context-full.** When the conversation is heavy (long-running audit, deep debug, big rollout), prefer smaller commits, smaller tool outputs, and focused reasoning — one or two punchy paragraphs, one well-scoped tool call at a time. Don't try to fit a thousand lines of work into one reply. glla's 0.27.2 auto-continue fires on `stop_reason="length"` (the output-token cap) and will reschedule you anyway; pre-empting by chunking is cheaper than recovering from the cap. Save large file writes for their own turns; emit them only when you have the next read step ready to follow.
55
56
 
56
57
  ## WHEN THE AUDITOR DISAPPROVES
57
58