agentleFS
hamidi-devhamidi-dev/opentab/AGENTS.md

opentab

AGENTS.md88 starsChanged 58 days agoMITView on GitHub

OpenTab browses local AI usage and spend in a curses TUI and a self-contained web report. It reads multiple harnesses through a shared store interface. The PyPI distribution is opentab-ai; the import package and command are opentab. Start with Architecture for the package map. Read the relevant topic, not the entire documentation tree: - Python 3.9+. Standard library only at runtime, except Windows-only windows-curses. No new runtime dependencies. - Harness databases, transcripts and auth files are read-only. Writes belong to…

  • Installs packages
  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.

    Of the AGENTS.md files we read, the 11,736 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repositoryOne other file it gives its agents.

The file

We split this AGENTS.md into the rules it gives an agent

7 rules. About 0 are common, 3 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Start with Architecture for the package map.

    line 9
  2. Very specific:

    Keep imports acyclic and stores independent of the TUI.

    line 32
  3. Distinctive:

    Keep the model scan deferred until after the first TUI paint.

    line 36
  4. Very specific:

    Do not hand-edit src/opentab/data/models.json.

    line 40
  5. Very specific:

    Do not wrap fixed-width TUI strings to satisfy line length (E501 is ignored).

    line 57
  6. Distinctive:

    Check both frontends when changing a feature they share.

    line 58
  7. Very specific:

    Use Conventional Commits and the scope vocabulary in CONTRIBUTING.md.

    line 60

≈ “Common” is an estimate: at least 1 in 5 of the 16,597 AGENTS.md 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
AGENTS.md

Working on OpenTab

OpenTab browses local AI usage and spend in a curses TUI and a self-contained web report. It reads multiple harnesses through a shared store interface. The PyPI distribution is opentab-ai; the import package and command are opentab.

Read for the task

Start with Architecture for the package map. Read the relevant topic, not the entire documentation tree:

Working onReference
Setup, tests, commits, releasesContributing
A store, token accounting, deduplication, subagents, retentionBackend accounting; harness setup and schemas
Startup, reload, caches, cost, --gotoStartup and caching
TUI state, navigation, tables, colours, tracesTUI internals; user controls
Costs, model rates, $, P, wPricing
Notes, XDG files, demo, export privacyPrivacy
HTML payload, browser state, live serverWeb browser
Fleet summaries, pulls, remote sessionsMultiple machines
Environment diagnosis, portabilityTroubleshooting; Windows/WSL

Non-negotiable constraints

  • Python 3.9+. Standard library only at runtime, except Windows-only windows-curses. No new runtime dependencies.
  • Harness databases, transcripts and auth files are read-only. Writes belong to OpenTab's own files or explicitly requested exports; use persistence/paths.py for XDG paths.
  • Notes are authored data: locked read-modify-write, atomic save on each edit, no overwrite of malformed files, preserve unknown entries, never prune missing IDs.
  • Keep imports acyclic and stores independent of the TUI. Use TYPE_CHECKING for annotation-only back-references; preserve the top-level public API exports.
  • Recorded cost, API-equivalent estimates ($), and session-only rate comparisons (w) are distinct. Never turn w into an app-wide repricing mode.
  • Keep the model scan deferred until after the first TUI paint. Session extras and content stay lazy; raw traces never enter rollup caches or web/fleet payloads.
  • Demo must not expose real notes or traces, persist preferences, or launch/copy sessions. Treat selective anonymization as selective, not fully private.
  • Do not hand-edit src/opentab/data/models.json; regenerate it with scripts/update_prices.py.

Development loop

pip install -e .
python3 run_tests.py                     # custom stdlib runner, not pytest
python3 run_tests.py pricing             # module/test substring filter
ruff check src/opentab tests run_tests.py
ruff format --check src/opentab tests run_tests.py
python3 -m compileall -q src/opentab
python3 -m opentab --demo

Tests belong to the module they exercise; shared builders live in tests/_support.py. tests/__init__.py isolates all XDG roots before imports. Do not wrap fixed-width TUI strings to satisfy line length (E501 is ignored). Check both frontends when changing a feature they share.

Use Conventional Commits and the scope vocabulary in CONTRIBUTING.md; no AI attribution or co-author trailers. Version is the manual __version__ constant in src/opentab/__init__.py, not derived from a tag.

Keep this file small

This is a task router and a short set of guardrails, not a design history. Put explanations in the relevant human-readable doc, tests next to the affected module, and local implementation rationale beside the code. Update existing sections instead of appending bug diaries or duplicating whole feature descriptions here.

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.