feat(pi): let plannotator_submit_plan review plans in plannotator-tui (terminal) instead of the browser
What
The Pi extension's plannotator_submit_plan always starts the browser review server. For people working inside Herdr — especially on Windows — reviewing the plan in the existing plannotator-tui terminal UI would fit the workflow better. Plannotator already ships that TUI (and Herdr Annotate uses it for document review), but the Pi extension can't use it for plan review: the submit tool is hardwired to the web server, with no renderer option.
Proposal
Make the plan-review renderer selectable in the Pi extension's existing config layers:
// .pi/plannotator.json (project) or ~/.pi/agent/plannotator.json (global)
{ "renderer": "tui" } // "browser" (default) | "tui" | null (clear inherited)with PLANNOTATOR_RENDERER as a per-session env override. Precedence matches executionMode: env > project > global > browser; unknown values warn and fall through to the inherited value.
How it would work
When tui is active, plannotator_submit_plan spawns plannotator-tui <plan.md> in a Herdr pane (split beside Pi's own pane) with PLANNOTATOR_DATA_DIR pointed at a throwaway session dir, waits for exit, and maps the outcome back onto the exact same decision contract the browser flow returns ({ approved, feedback }):
- quit with no annotations → approved
- annotations present → denied, feedback = the TUI's own numbered export (send/archive text if the reviewer pressed
E, rebuilt fromannotations.jsonotherwise) - decisions are appended to the shared feedback archive, so browser and TUI history stay unified
Since the TUI has no approve/deny gate, the approve mapping is implicit (q with no notes = approve). The alternative — adding a gate mode to plannotator-tui itself — is a much bigger change (second repo, Rust); happy to discuss.
Platform notes
Works on Windows today (pi 0.79.x, Herdr 0.9.1, plannotator-tui 0.8.0). Exit detection uses a shell exit-status sentinel, since herdr pane process-info doesn't list the TUI process on Windows. This path drives the herdr CLI directly, so it isn't affected by the mac/linux gating of the Herdr Annotate doc-review pane.
I have this implemented and tested end-to-end on Windows (annotate → deny with feedback → revise → approve → execute; archive records written). Happy to open a PR if you're open to the feature.
Source: backnotprop/plannotator