Updated the planDrafting prompt to improve clarity and user engagement. Added details on user interaction and refined language for better understanding.
Both round-1 findings were withdrawn once the reviewer had the plan-mode
facts. Comment the state-flip order, which is the part that reads like a bug
and is not.
Co-Authored-By: Claudypoo <288921227+claudypoo@users.noreply.github.com>
"Ready?" over an unread file is not a review -- the only copy of the plan was
inside a collapsed edit tool call. Print the working set before the menu.
The 4th option compacts the planning conversation before the work turn starts.
session_compact already re-sends the whole plan file, so the exploration is
summarized away and the agreed goals are not.
Co-Authored-By: Claudypoo <288921227+claudypoo@users.noreply.github.com>
A subagent runs pi -p --no-session with extensions on, so it loaded pi-goals, got the
parent's plan injected, and could sign off the parent's goals. Two windows on one checkout
also stomped each other's file. The session id in the name fixes both, and doubles as the
on switch: no /goals means no file at this session's path, so nothing fires.
Drops the v1 goals.md rename, and /goals clear now deletes the file.
Co-Authored-By: Claudypoo <288921227+claudypoo@users.noreply.github.com>
~/.pi/skills is a symlink to ~/.claude/skills, so a pi session loads the plan-format skill and this
prompt at once. A dogfooding agent merged the two by hand on every redraft.
Co-Authored-By: Claudypoo <288921227+claudypoo@users.noreply.github.com>
The judge has been read-only with no bash since the rewrite, but the README still said it runs the
goal's verify command. That is the exact thing a dogfooding agent got wrong out loud.
Co-Authored-By: Claudypoo <288921227+claudypoo@users.noreply.github.com>
v2 injected the entire plan.md on every turn. pi-tasks tried that and deleted it -- "wallpaper
noise that trains the model to ignore the task block" (CHANGELOG.md:149) -- so follow them: one
transient user message via the context hook, never persisted, and only when the plan went untouched
for 2 turns. Editing the plan resets the clock, the way a task tool call resets theirs. Session
start and session_compact push the WHOLE file back instead, which is where the settled context is
actually needed (pi-goal-x does the same with its post-compaction resync).
That makes an unlimited appendix free: everything under ## Log is durable memory, not working set.
Also: the drafting prompt is sent once with the /goals seed instead of every turn (that re-arming
is why plan mode read as never-ending), the review menu gains "Open in $EDITOR" and loops like
pi-plan's, and the widget shows the active goal's open subtasks so the plan is visibly the task
list. Drops the stale-copy stripping hook, which a non-persisted injection doesn't need.
Co-Authored-By: Claudypoo <288921227+claudypoo@users.noreply.github.com>
Re-running verify was fine for 'npm test' but a footgun for ML workflows where verify may be a
10-hour training run -- and bash made 'read-only' nominal anyway (it could mutate). The agent now
runs verify itself and saves the output as evidence. The judge checks, in order: anything here /
quoted+attributed / provenance / quotes match disk / substance. Matches the cooperative-but-
confused threat model: reading real artifacts catches confusion; execution only defended against
deliberate forgery, which is out of scope.
Co-Authored-By: Claudypoo <288921227+claudypoo@users.noreply.github.com>
Dogfood: an agent with blank tool output back-filled plausible test counts into evidence and
the judge accepted (the numbers happened to be true). Norm now stated agent-side (verbatim
quotes, honest gaps beat plausible fabrication) and enforced judge-side (mismatched quotes =>
reject even when the goal looks met).
Co-Authored-By: Claudypoo <288921227+claudypoo@users.noreply.github.com>
'Did the judge really re-run verify?' was unanswerable post-hoc; now every sign-off's full
judge output survives on disk.
Co-Authored-By: Claudypoo <288921227+claudypoo@users.noreply.github.com>
Dogfood exit interview: agent bookkeeping is the drift point (tick after accept was the
step most likely forgotten), and 'committed artifact' language implied the judge sees HEAD.
Tick is exact-subject match via the existing GOAL_LINE regex; on drift the result explicitly
asks the agent to tick, so neither path is silent.
Co-Authored-By: Claudypoo <288921227+claudypoo@users.noreply.github.com>
CompleteGoal.execute now delegates to a pure decideSignOff(input, signal,
runJudgeFn) that takes an injected judge runner. judgeModel is never checked
pre-emptively: null just omits --model (buildJudgeArgs), so pi's configured
default runs the judge. The only producers of accepted_inconclusive are now the
judge-error and no-VERDICT paths -- i.e. 'the judge ran but failed', never 'no
model'. Wording (log/result/docstring/README) updated to say 'ran but failed'.
Adds test/decide-signoff.test.ts: null judgeModel still reaches runJudge (no
pre-emptive return); judge error/timeout/no-VERDICT -> accepted_inconclusive
with a 'ran but failed' reason. 11 tests pass, typecheck + lint clean.
The v1 lesson: the parser existed so TypeScript could read goals.md, but every
reader is a model. v2 injects .pi/plan.md verbatim each turn, teaches the format
as a convention, and hands the whole file to the judge, which now does the goal
matching (tolerates wording drift), evidence validation, verify execution, and
format reading that v1 did in code. 1874 -> 530 lines.
Deleted: plan-file.ts + tests, JSON-stream judge transport, custom tool
rendering, review menu + $EDITOR + newSession dance, pruneCompleted, unwired
continuation/loopJudge prompts, MUTATING_BASH_PATTERNS. CompleteGoal's only
write is the ## Log sign-off line (the audit trail); the agent ticks [x] itself.
Judge runs with --no-extensions so a broken global extension can't take down
sign-offs (pi-hermes-memory currently does exactly that). File renamed
goals.md -> plan.md.
UAT (real judge subprocess on a toy repo, /tmp/claude-goals-uat/judge-*.log):
accept with verify run + byte-check, reject on placeholder evidence + missing
file, accept under drifted goal wording.
Co-Authored-By: Claudypoo <288921227+claudypoo@users.noreply.github.com>
Drop the '✔ N done' summary line -- done/cancelled goals now render
nothing in the widget. The done count is already in the status bar
(◷ n/N goals) and full history is in goals.md / the ## Log.
Co-Authored-By: Claudypoo <288921227+claudypoo@users.noreply.github.com>
Completed goals were listed in file order, so done goals pushed the
active/open work down the widget. Now show active+open in full and
collapse done/cancelled into a single muted '✔ N done ✗ M cancelled'
line. Full history stays in goals.md and the ## Log.
Co-Authored-By: Claudypoo <288921227+claudypoo@users.noreply.github.com>
Two space-savers for a display that grows across sessions:
- widget header now carries the clickable .pi/goals.md path (with title),
dropping the separate muted footer -- one vertical line instead of two.
- /goals clear now offers 'Prune completed goals' (pure pruneCompleted:
drops done+cancelled goal blocks, keeps active/open, title, and the log)
alongside the existing full clear. Gives a way to shed old goals without
losing the audit trail.
Co-Authored-By: Claudypoo <288921227+claudypoo@users.noreply.github.com>
- Judge gets read, bash, grep, find, ls but edit+write are blocked via --exclude-tools
- Added renderCall: shows goal name while running
- Added renderResult: shows accept/reject icon, model, duration, collapsed/expanded view
- Wired onUpdate through decideSignOff -> runJudge so the TUI shows progress while judging
- Added SignOffDetails type for structured metadata
- Added 120s timeout on judge subprocess
pi -p --no-session clones the repo into the parent of cwd, leaving a stale
directory that the NEXT judge then finds and rejects the goal over. Needs a
temp-dir fix or in-repo inspection.
The tool description and param doc are model-facing, so they belong in
prompts.ts with the rest. Add them as step 6 (completeGoalTool) and
renumber the evidence judge to 7; prompts.ts is now ordered the way the
agent meets each text, so it reads as one pass.
The moved desc also carries the positive-success framing: evidence must
show the success happened, not just that a failure was avoided.
README trimmed (saying less, voice unchanged): tighter intro and
comparison, less prose around the examples and sign-off steps. Humanizer
lint clean.
Co-Authored-By: Claudypoo <288921227+claudypoo@users.noreply.github.com>
Replace done_when with a discriminator + subtle-failure-mode pair as the
heart of each goal. The discriminator is the POSITIVE success observation
that no failure mode could fake, not just failure-avoidance: a run can
dodge every trap and still produce nothing. Carried through planDrafting,
the sign-off judge, README, and the parser doc.
Format migration: flat numbered markdown goals (`1. [/] goal: ...`),
keyword-anchored parsing (indentation cosmetic), goals matched by text,
subtask states [ ]/[/]/[x]/[-] plus ~~strike~~. Evidence empty at
planning, filled at sign-off, multi-line supported.
CompleteGoal now returns the judge's reasoning under a
`--- sign-off judge ---` block (was just "Signed off"), so the verdict is
visible. Plan mode is read-only: edit/write (except goals.md) and
mutating bash are blocked by a tool hook.
17 parser tests, typecheck + biome clean.
Co-Authored-By: Claudypoo <288921227+claudypoo@users.noreply.github.com>
Goal state moves from a `status:` line into a checkbox on the goal header
(single source of truth, renders natively): [ ] open, [/] active, [x] done,
[-] cancelled. Only CompleteGoal writes [x]; the agent sets [/] when starting.
The GoalStatus enum and all consumers (widget, injection, counts) are unchanged.
Evidence becomes a goal field, not an ephemeral tool argument: an `evidence:`
block the agent fills before sign-off, read by CompleteGoal from the file
(git-tracked, reviewable). The tool is now CompleteGoal(goal_id) only.
Also:
- format reorder: subtasks under the goal; failure_modes + evidence as
separated trailing blocks (no abutting dash-lists)
- widget: (done/total tasks), and done goals show checked instead of hiding
- drafting prompt: guard against a circular done_when (one that points at the
file's own checkbox/log, which the sign-off writes, so it can never pass)
- drafting template now includes the H1 and the <!-- id --> line CompleteGoal
needs to locate a goal
- strip ANSI/CSI control codes from the judge subprocess output
Co-Authored-By: Claudypoo <288921227+claudypoo@users.noreply.github.com>