agentleFS
luabaggluabagg/canhoto/AGENTS.md

canhoto

AGENTS.md2 starsChanged 58 days agoMITView on GitHub

Read this before editing code. User docs: README.md. Dependency direction: cli / mcp → service → core + ports. 1. statement_preview → parser_scaffold / parser_write → parser_test → parser_enable 2. ingest 3. rule_list → run_rules → review_batch loop → set_categories (and set_merchant_category as needed). Store recurring decisions with rule_add and a note. Rules never overwrite rows set by set_categories. 4. month_breakdown → export_pdf parser_write requires agent_view.allow_parser_writes=true. CLI may always write local parsers.

  • 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.

The file

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

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read this before editing code.

    line 3
  2. Distinctive:

    No Google/Sheets in core

    line 84

≈ “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

Agent bootstrap — Canhoto

Read this before editing code.

Product

LayerValue
ProductCanhoto (stub/counterfoil you keep)
Package / importcanhoto
CLIcanhoto
MCPcanhoto-mcp
Data~/.canhoto / $CANHOTO_DATA_DIR
DBcanhoto.db

User docs: README.md.

Layout

src/canhoto/
  core/           # models, config, store, migrate, policy, redaction, categorize, …
  migrations/     # Alembic scripts (SQLite)
  parsers/        # Protocol, loader, scaffold (no bank logic)
  exporters/      # pdf_summary
  mcp/            # allowlist + Fast/MCP server → service only
  service.py      # façade for CLI + MCP
  cli.py
examples/parsers/ # docs-only demo (not auto-loaded)
tests/guardrails/ # privacy/allowlist contracts

Dependency direction: cli / mcp → service → core + ports.

Hard rules

DoDo not
Keep money out of gitCommit statements, tokens, DB files
MCP tools ⊆ MCP_TOOL_ALLOWLISTAdd sql_query or full ledger dumps
Review via to_review_item + policyReturn raw LedgerTransaction to agents
Parser enable only after successful parser_test (non-empty txs)Auto-download parsers; stamp OK on empty parse
PDF summary onlyFull transaction listing PDF
Country-agnostic coreHardcode one bank as the kernel
Prefer deleting dead codeKeep unused alternate trees

MCP happy path

  1. statement_preview → parser_scaffold / parser_write → parser_test → parser_enable
  2. ingest
  3. rule_list → run_rules → review_batch loop → set_categories (and set_merchant_category as needed). Store recurring decisions with rule_add and a note. Rules never overwrite rows set by set_categories.
  4. month_breakdown → export_pdf

parser_write requires agent_view.allow_parser_writes=true. CLI may always write local parsers.

Data dir

$CANHOTO_DATA_DIR or ~/.canhoto/
  config.json
  canhoto.db
  parsers/
  exports/
  raw/
  fixtures/

Commands

uv sync --extra dev
uv run pytest -q
uv run ruff check src/canhoto tests
uv run mypy -p canhoto
uv run canhoto --help
uv run canhoto-mcp   # stdio; host-spawned

Quality bar

  • TDD for behavior changes; meaningful tests only
  • No Google/Sheets in core
  • Guardrails in tests/guardrails/ must stay green

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.