wip: unified minibuffer panel, v0.9.1 Emacs dev env in ROADMAP

- Unified minibuffer slash-command panel (panel-based wizard, settings,
  help sub-mode stack) — channel-tui state/view changes
- ROADMAP: v0.8.0 broken into atomic DONE items, v0.9.1 added with
  Emacs major mode + M-x command surface TODOs
- Semver discipline from v0.7.1 onward (X.Y.Z)
This commit is contained in:
2026-05-13 09:17:30 -04:00
parent a8901d9675
commit 00211cf685
5 changed files with 485 additions and 231 deletions

View File

@@ -34,11 +34,32 @@ On release:
2. Extract DONE items from ROADMAP (all items with LOGBOOK timestamps since the last release tag) and use as the release notes body
3. If a ~CHANGELOG.md~ is needed for packaging tools, auto-generate it from ROADMAP DONE items
** DONE v0.8.0: Information Radiator (Foundation)
** TODO v0.8.0: Information Radiator (Foundation)
Sidebar (6 panels), sidebar overlay mode (<120 cols), command palette (Ctrl+P), TrueColor theme expansion (8 presets).
Sidebar (6 panels), sidebar overlay mode (<120 cols), command palette (Ctrl+P), TrueColor theme expansion (8 presets), unified minibuffer panel with slash-command context menu and sub-mode navigation (wizard, settings, help).
For the full DONE items, see ~CHANGELOG.org~.
*** DONE Unified minibuffer slash-command panel
:PROPERTIES:
:ID: id-v080-minibuffer
:CREATED: [2026-05-10 Sat]
:END:
:LOGBOOK:
- State "DONE" from "TODO" [2026-05-10 Sat]
:END:
Replace ad-hoc overlay windows with a single bottom-anchored panel. Typing =/= as the first character opens a command context menu (~25 slash commands, filtered in real time as the user types). Navigating to =/wizard= and pressing Enter transitions the panel into the setup wizard — same panel, same position, sub-mode stack. Esc returns to the command list. Future sub-modes (=/settings=, =/help=) slot into the same architecture.
- Add ~:minibuffer-mode~ and ~:minibuffer-selected-idx~ state fields to ~init-state~
- Extract ~*slash-commands*~ data structure (~25 commands, each with description) from the ~on-key~ Enter handler
- Add ~view-minibuffer~ that dispatches on ~:minibuffer-mode~ to ~view-slash-menu~, ~view-wizard-in-panel~
- Add ~minibuffer-handle-key~ which dispatches to ~slash-menu-handle-key~ or ~wizard-handle-key~
- TUI event loop: replace separate wizard key handlers with unified modal dispatch block
- ~on-key~: auto-open slash-menu when =/= typed as first character
- ~wizard-start~ / ~wizard-cancel~: set ~:minibuffer-mode~ instead of ~:wizard-visible~
- Merge the wizard overlay (centered, 60x14) into the bottom-anchored panel
- Remove ~:wizard-visible~ state field
~150 lines.
** v0.9.0: Eval Harness — Safety Net First
@@ -58,6 +79,74 @@ Every subsequent release ships with automated regression protection. The eval ha
- Task suite grows with codebase: every bug fix adds a regression task
~200 lines.
** v0.9.1: Emacs Development Environment — A Functional UI
The croatoan TUI is on life support — enough to see output and type commands, but every render feature (markdown, tool visualization, mouse, adaptive layout) requires custom ncurses code destined for the trash at v2.0.0. Emacs is the v2.0.0 bridge: the same major mode, sidebar, and M-x commands survive from now through Phase III.
*** TODO Emacs major mode
:PROPERTIES:
:ID: id-v091-emacs-mode
:CREATED: [2026-05-10 Sat]
:END:
- ~passepartout-mode~ major mode for the conversation buffer
- Message rendering as Org headlines: role prefix (~:user:~, ~:agent:~, ~:system:~), universal timestamp, content in body. Gate trace as property drawer under agent message headlines
- Streaming insertion: LLM response chunks arrive from the daemon and insert incrementally into the buffer (~insert~ as chunks arrive, update on each frame)
- Read-only protection on agent response regions (editable regions only in user input area)
- Keybindings: ~C-c C-c~ send current input, ~C-c C-k~ interrupt/stop, ~C-c C-a~ approve HITL, ~C-c C-d~ deny HITL
- ~100 lines elisp
*** TODO M-x command surface
:PROPERTIES:
:ID: id-v091-emacs-commands
:CREATED: [2026-05-10 Sat]
:END:
Replace croatoan's ~/~ slash-command panel with Emacs ~M-x~ dispatch. Each command is a ~defun passeparate-<action>~ with interactive completion:
- ~passepartout-focus~ — completing-read over node IDs from the daemon's focus response. Sets the foveal context
- ~passepartout-eval~ — eval a Lisp form in the daemon. Read from minibuffer, send as framed plist, insert result
- ~passepartout-theme~ — completing-read over available themes. Sends ~/theme <name>~ to daemon
- ~passepartout-export~ — export session. Prefix arg selects format (~C-u M-x passeparate-export~)
- ~passepartout-sidebar~ — toggle the sidebar buffer visibility
- ~passepartout-config~ — completing-read over config keys. Sets env var, triggers daemon reload
- ~passepartout-coach~ — run self-diagnosis. Inserts coaching report as new message
- ~passepartout-agenda~ — run Org agenda query. Inserts results as new message
- ~passepartout-quit~ — close connection and kill buffer
Each command is a thin wrapper around ~passepartout-send~ (the existing TCP bridge from v0.4.0): construct the correct plist, send it, and insert the response. Completing-read, history, and docstrings are free. ~80 lines elisp.
*** TODO Sidebar buffer
:PROPERTIES:
:ID: id-v091-emacs-sidebar
:CREATED: [2026-05-10 Sat]
:END:
- ~passepartout-sidebar-mode~ — a dedicated side window (right, 42 chars) that updates on each daemon response
- Gate Trace panel — per-gate results from the most recent agent response. Colored by state (green/yellow/red)
- Focus panel — current foveal node ID + related node count
- Rules panel — rule counter with session delta. When symbolic engine is active, shows sufficiency score and provenance breakdown
- Context panel — token gauge (percentage bar + color coding)
- Cost panel — session cost updated after each LLM call
- Files panel — modified files list with +/- line counts
- All data already exists in the daemon's response plist (~:rule-count~, ~:foveal-id~, ~:gate-trace~, ~:sufficiency-ratio~). The sidebar is a formatting layer
- Toggle via ~M-x passeparate-sidebar~ or ~C-c C-s~
- ~60 lines elisp
*** TODO Daemon lifecycle
:PROPERTIES:
:ID: id-v091-emacs-lifecycle
:CREATED: [2026-05-10 Sat]
:END:
- ~passepartout-start~ — runs ~passepartout daemon~ in a background process, waits for port 9105, connects
- ~passepartout-stop~ — sends shutdown signal, kills buffer
- ~passepartout-restart~ — stop + start
- ~passepartout-status~ — checks daemon health via ~/status~ command, displays in sidebar
- ~20 lines elisp + bash wrappers
Total: ~260 lines elisp, persisting through v2.0.0+.
** v0.10.0: Phase 0 — Type-Level Gates + Core Integrity (~75 lines)
:PROPERTIES: