|
| 1 | +# Draft: Optimize viz-dashboard — Merge into `humanize monitor` as a Web View |
| 2 | + |
| 3 | +## Background |
| 4 | + |
| 5 | +The `feat/viz-dashboard` branch currently introduces a `/humanize:viz` Claude |
| 6 | +slash command and a local visualization dashboard for Humanize. While the |
| 7 | +dashboard does show some data, the visualization of a *live, dynamically |
| 8 | +running RLCR loop* is not clear enough today: status, progress per round, and |
| 9 | +streamed log output are hard to follow as a loop progresses. |
| 10 | + |
| 11 | +Separately, Humanize already ships a CLI-side monitoring capability that the |
| 12 | +user runs in another terminal (NOT inside Claude Code): |
| 13 | + |
| 14 | +```bash |
| 15 | +source <path/to/humanize>/scripts/humanize.sh # or add to .bashrc / .zshrc |
| 16 | + |
| 17 | +humanize monitor rlcr # RLCR loop |
| 18 | +humanize monitor skill # All skill invocations (codex + gemini) |
| 19 | +humanize monitor codex # Codex invocations only |
| 20 | +humanize monitor gemini # Gemini invocations only |
| 21 | +``` |
| 22 | + |
| 23 | +This monitor capability already captures live state (RLCR rounds, skill / Codex |
| 24 | +/ Gemini invocations, log output). The web dashboard does not need to invent |
| 25 | +its own capture pipeline — it should consume what `humanize monitor` already |
| 26 | +provides. |
| 27 | + |
| 28 | +## Goal |
| 29 | + |
| 30 | +Optimize the viz-dashboard branch so that: |
| 31 | + |
| 32 | +1. The dashboard becomes a **web view** layered on top of the existing |
| 33 | + `humanize monitor` data sources, rather than an independent capture layer. |
| 34 | +2. The dashboard can show **multiple live RLCR loops simultaneously**, with |
| 35 | + per-loop status and streamed log output. |
| 36 | +3. The entry point moves out of Claude (no more `/humanize:viz` slash command) |
| 37 | + and into the `humanize monitor` CLI command, as a new web-online viewing |
| 38 | + subcommand. |
| 39 | +4. The new capability targets **online / remote viewing in a browser**, not a |
| 40 | + local-only viewer that requires the user to be on the same machine running |
| 41 | + Claude. |
| 42 | +5. Useful features from the existing viz-dashboard branch — notably **cross- |
| 43 | + conversation querying** (browsing past sessions / loops across different |
| 44 | + Claude conversations) — are preserved. |
| 45 | + |
| 46 | +## Non-goals |
| 47 | + |
| 48 | +- Reimplementing the monitor capture pipeline (`humanize monitor rlcr/skill/ |
| 49 | + codex/gemini`). The dashboard consumes it; it does not replace it. |
| 50 | +- Continuing to ship `/humanize:viz` as a Claude slash command. |
| 51 | +- Adding chart panels or features explicitly removed in commit 1b575fe |
| 52 | + ("multi-project switcher + restart + remove chart panels"). |
| 53 | + |
| 54 | +## Required behaviors |
| 55 | + |
| 56 | +1. **CLI entry point unification** |
| 57 | + - Remove `commands/viz.md` and any `/humanize:viz` Claude command surface. |
| 58 | + - Add a new `humanize monitor` subcommand (name to be agreed during |
| 59 | + planning, e.g. `humanize monitor web` or `humanize monitor dashboard`) |
| 60 | + that starts the web dashboard server. |
| 61 | + - The other `humanize monitor rlcr|skill|codex|gemini` subcommands must |
| 62 | + keep working unchanged (terminal-attached live tail). |
| 63 | + |
| 64 | +2. **Live multi-loop view** |
| 65 | + - The web dashboard MUST be able to display 2+ concurrently running RLCR |
| 66 | + loops at the same time, each with: |
| 67 | + - current status (running, paused, converged, stopped, …) |
| 68 | + - current round / phase |
| 69 | + - live streamed log output, updated in near real time |
| 70 | + |
| 71 | +3. **Reuse existing monitor data** |
| 72 | + - The dashboard MUST source its data from the same files / events that |
| 73 | + `humanize monitor rlcr/skill/codex/gemini` already read. It MUST NOT add |
| 74 | + a parallel capture mechanism (no new hooks just for the dashboard). |
| 75 | + |
| 76 | +4. **Online / remote-viewable** |
| 77 | + - The dashboard MUST be reachable from a browser over the network, not |
| 78 | + only via `localhost` on the machine running Claude. Concrete binding / |
| 79 | + auth design to be agreed during planning. |
| 80 | + |
| 81 | +5. **Cross-conversation history** |
| 82 | + - Cross-conversation querying (browsing past loops from different Claude |
| 83 | + conversations / sessions) from the existing viz-dashboard branch MUST be |
| 84 | + preserved. |
| 85 | + |
| 86 | +## Branch hygiene |
| 87 | + |
| 88 | +Before implementation begins, the branch `feat/viz-dashboard` MUST be rebased |
| 89 | +onto the latest `upstream/dev` (humania-org/humanize). Several relevant changes |
| 90 | +have landed on `upstream/dev` after the branch diverged, including: |
| 91 | + |
| 92 | +- `Add ask-gemini skill and tool-filtered monitor subcommands` (introduces the |
| 93 | + `humanize monitor skill|codex|gemini` subcommands the dashboard must reuse) |
| 94 | +- `Remove PR loop feature entirely` (the viz-dashboard branch still references |
| 95 | + PR-loop concepts via `commands/cancel-pr-loop.md`, `commands/start-pr-loop.md`, |
| 96 | + `hooks/pr-loop-stop-hook.sh`) |
| 97 | +- Multiple monitor / hook fixes |
| 98 | + |
| 99 | +The rebase is therefore both a precondition for correctness (the dashboard |
| 100 | +consumes the new monitor subcommands) and a cleanup step (PR-loop references |
| 101 | +must be dropped). |
| 102 | + |
| 103 | +## Out of scope (for this plan) |
| 104 | + |
| 105 | +- Changes to RLCR semantics, hooks, or skill behavior. |
| 106 | +- Authentication providers, identity systems, or multi-user account models — |
| 107 | + basic remote-access protection is in scope, but full IAM is not. |
0 commit comments