agentleFS
thebanrithebanri/limoni/.claude/skills/limoni-zest/SKILL.md

limoni-zest

Skill151 starsChanged 3 months agoApache-2.0View on GitHub

zest, the log viewer built on Limoni — how its store, filtering and LogView fit together, how it is verified (in-process, in kitty, over MCP, in the browser), and what it deliberately does not do. Load before changing cmd/zest, internal/zestapp or widgets/logview.go.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    A real terminal: run it in kitty with --listen-on, then kitty @ get-text reads the rendered screen back and kitty @ send-text types.

    line 40
  2. Very specific:

    No pipe on Windows: keys need /dev/tty.

    line 59

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

zest: the flagship log viewer

cmd/zest is the command, internal/zestapp the code (so the WebAssembly playground can run the same viewer), widgets.LogView the pane itself.

The shape

readLines / generateDemo  →  store  →  view (filter)  →  widgets.LogView
        (goroutine)          chunks     idx []int32        draws what fits
  • store appends line text into fixed 1 MiB chunks that are never modified afterwards, so Line(i) hands out unsafe.String over those bytes. Nothing is copied per line or per frame; that is what keeps drawing a million-line log allocation-free. A line bigger than a chunk gets a chunk of its own. Memory is the text plus 16 bytes per line.
  • detectLevel reads the level from JSON ("level", "lvl", "severity"), logfmt (level=warn) and plain text, looking at the first 200 bytes only. An indented line with no level of its own inherits the previous line's, so filtering to errors keeps a stack trace whole.
  • view is the filter. Scanning runs in a goroutine in batches of 200,000 lines and calls wake after each, so a keystroke is never blocked; a filter change bumps gen and an in-flight scan of the old filter discards its batch. Without a filter it is a pass-through and costs nothing.
  • LogView draws only the rows on screen, follows new lines (tail -f), and stops following when the reader scrolls or clicks a line — a click sets Selected directly, and without that check the chosen line scrolled away. LineNumberSource is how a filtered view shows original line numbers.

Verification, in four places

  1. In process: internal/zestapp/ui_test.go and follow_test.go drive the whole viewer through its semantic tree with uitest.
  2. A real terminal: run it in kitty with --listen-on, then kitty @ get-text reads the rendered screen back and kitty @ send-text types. This is how the load times were measured (1,000,000 lines, 67 MiB, 0.54 s to screen, 123 MB RSS).
  3. Over MCP: build with -tags limoni_debug, run with -socket, and drive it with the real limoni-mcp binary or a headless agent. Drain the PTY on a thread or the app blocks writing and looks hung.
  4. In the browser: scripts/verify-wasm.mjs (which Pages runs before deploying) opens the "Logs · zest" scene under Node, filters to errors, and checks the emitted bytes. Look for fragments, not whole lines: at 100 columns the terminal cuts them off.

ZEST_MEASURE=1 go test ./internal/zestapp -run TestPreloadSpeed -v prints the generate-and-store time for a million lines (0.62 s here).

Deliberate limits

  • One input at a time; several files are not merged by timestamp.
  • The filter is a substring, not a regular expression.
  • No pipe on Windows: keys need /dev/tty. Pass a file.
  • The demo generator is seeded, so its content is reproducible — that is what makes it usable as ground truth for agent runs.

Assets

assets/zest.gif is recorded by scripts/record_zest.py (runs zest in a PTY, types at a human pace, writes an asciicast) and rendered with agg. Record with LIMONI_REP=0: agg's terminal emulator does not implement REP.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.