Add plot_metrics builtin: braille line charts of JSONL streams in the conversation - #920
Draft
wilfred-dore wants to merge 1 commit into
Draft
Add plot_metrics builtin: braille line charts of JSONL streams in the conversation#920wilfred-dore wants to merge 1 commit into
wilfred-dore wants to merge 1 commit into
Conversation
Renders per-series braille line charts of a JSONL metrics stream directly in the conversation (training curves, benchmarks, monitoring series). Read-only, zero new dependencies: reuses render_braille, the primitive that animates the mascot and spinner. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Author
|
Full showcase of this capability (extended tool with colors/heatmaps/live follow, ml-trainer skill, W&B-style run tracking & comparison, on-device profiling via Qualcomm AI Hub): https://github.com/wilfred-dore/vibe-pulse |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Vibe Work (web) can chart data in Canvas; Vibe Code (CLI) cannot. Terminal-first data/ML users still have to leave their environment (Jupyter, TensorBoard) just to see whether a training run converges — no terminal coding agent offers this natively today.
This PR adds a minimal, dependency-free visualization capability to the CLI.
What it does
New builtin tool
plot_metrics: reads a JSONL stream (one flat JSON object per line, e.g.{"epoch": 3, "loss": 0.42, "accuracy": 0.88}), auto-detects numeric fields, and renders per-series braille line charts directly in the conversation. Read-only (permission = ALWAYS), zero new dependencies.sequenceDiagram participant U as User participant V as Vibe agent participant T as plot_metrics tool U->>V: "train this model, show me the curve" V->>V: run training, stream metrics.jsonl V->>T: plot_metrics(source="metrics.jsonl") T-->>U: braille chart in the conversation V-->>U: commentary (trend, convergence)The fun part
The rendering reuses
render_braillefromvibe/cli/textual_ui/widgets/braille_renderer.py— until now used only to animate the mascot and the spinner. This gives that primitive its first product feature. 🐱Open question for maintainers: this imports
clicode from acoretool, which inverts the usual layering. Happy to moverender_brailleinto e.g.vibe/core/utils/if you'd prefer — kept the diff minimal for review.Scope & design notes
render_braillesums dot indices, so duplicate dots would overflow past the braille block.--followstreaming, a colored Textual result widget) are demonstrated out-of-tree in Vibe Pulse, built at the Vibe Hackathon Paris (July 18, 2026) viatool_paths+ a skill. A natural follow-up here would be aPlotextPlot-based result widget using textual-plotext, since the TUI is already Textual.Testing
ToolManager._load_tools_from_file, prompt file loaded.