32 32 /goal clear-criteria
35 36 Debug command, registered only when `PI_GOAL_PROBE=1`:
60 60 "judgeModel":
"provider/model",
67 - turn budget for a new goal.
68 - Default `20`, clamped to `1..10000`.
70 67 optional Pi model ref, `provider/model`.
71 68 When unset, the current session model is used.
99 96 - `/goal` and `/goal status` print current goal status.
100 -- `/goal <objective>` creates an active goal with empty criteria, current
101 - session ownership, and the configured turn budget.
97 +- `/goal <objective>` creates an active goal with empty criteria and current
102 99 It sends a kickoff prompt immediately.
103 100 - A raw prompt containing `standing goal` plus an `<objective>...</objective>`
104 101 block is adopted as an active goal when no goal exists.
109 106 - `before_agent_start` injects the active goal and criteria into the system
110 107 prompt for the owning session.
111 108 - After each owned active goal turn, the extension writes a `goal-judge` start
112 - entry, shows `goal judging N/M` in persistent UI, then asks a judge model for
109 + entry, shows `goal judging Nt` in persistent UI, then asks a judge model for
114 111 `done`, `blocked`, `reason`.
115 -- The judge sees the objective, criteria, latest assistant text, stop
116 - reason/error message, and last-turn tool call/result excerpts.
112 +- The judge runs as a separate Pi session with project/user extensions loaded.
113 + It gets `read`, `grep`, `find`, `ls`, and `bash`, plus the objective,
114 + criteria, latest assistant text, stop reason/error message, and last-turn tool
115 + call/result excerpts.
117 116 - Judge completion writes a `goal-judge` verdict entry and updates the goal
118 117 widget/footer with the latest verdict glyph/reason.
119 118 - Continue verdicts stay quiet except for persistent UI.
120 119 Complete, blocked, paused, and repeated judge-failed verdicts notify.
121 120 - Done verdict marks the goal complete and clears persistent
122 121 status/widget/footer.
122 +- Assistant/provider errors retry regardless of error text, then pause after the
124 +- Judge errors retry the goal loop, then pause after repeated failures.
123 125 - Blocked verdict must repeat the same blocker for 3 goal turns before the goal
124 126 is marked blocked.
125 -- Incomplete verdict increments `turnsUsed`; exhausted turn/token/time budget
127 +- Incomplete verdict increments `turnsUsed`; exhausted token/time budget pauses
129 + There is no max-turn budget.
127 130 - If still active, continuation is queued as a hidden `goal-continuation` custom
128 131 message with `deliverAs:
129 132 "followUp"` and `triggerTurn:
150 153 Complete/cleared goals clear status and notify instead.
153 - Active, queued, judging, paused, and blocked goals show an above-editor widget
154 - with phase, wrapped objective, turn progress, elapsed/budget info, criteria
155 - preview, and last judge verdict glyph/reason.
156 + Active, queued, judging, paused, and blocked goals show a compact above-editor
158 + `/goal widget` or `ctrl+shift+g` toggles expanded mode with wrapped objective,
159 + elapsed/budget info, criteria preview, and last judge verdict glyph/reason.
156 160 - Active/queued/judging goals set the streaming working message and spinner
157 161 frames as a heartbeat; terminal/passive states restore the default loader.
158 162 - Shared footer integration: