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

opentab

AGENTS.md99 starsChanged 28 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 code style.

    Of the AGENTS.md files we read, the 35,337 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.

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 33
  3. Distinctive:

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

    line 37
  4. Very specific:

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

    line 43
  5. Very specific:

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

    line 63
  6. Distinctive:

    Check both frontends when changing a feature they share.

    line 64
  7. Very specific:

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

    line 66

≈ “Common” is an estimate: at least 1 in 5 of the 45,344 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
The website, the in-browser app (site/)Website

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 enter web payloads only with --allow-raw-content, never rollup caches, fleet payloads, the served page cache, or programmatic output without the existing gate.
  • 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
python3 run_tests.py -j 1 pricing        # in-process and in order, for pdb
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. Tests run on parallel workers in no fixed order: no test may rely on another's files or globals. 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.