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
- Distinctive: line 3
Read this before editing code.
- Distinctive: line 84
No Google/Sheets in core
≈ “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.
Files
Agent bootstrap — Canhoto
Read this before editing code.
Product
| Layer | Value |
| Product | Canhoto (stub/counterfoil you keep) |
| Package / import | canhoto |
| CLI | canhoto |
| MCP | canhoto-mcp |
| Data | ~/.canhoto / $CANHOTO_DATA_DIR |
| DB | canhoto.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 contractsDependency direction: cli / mcp → service → core + ports.
Hard rules
| Do | Do not |
| Keep money out of git | Commit statements, tokens, DB files |
MCP tools ⊆ MCP_TOOL_ALLOWLIST | Add sql_query or full ledger dumps |
Review via to_review_item + policy | Return raw LedgerTransaction to agents |
Parser enable only after successful parser_test (non-empty txs) | Auto-download parsers; stamp OK on empty parse |
| PDF summary only | Full transaction listing PDF |
| Country-agnostic core | Hardcode one bank as the kernel |
| Prefer deleting dead code | Keep unused alternate trees |
MCP happy path
statement_preview→parser_scaffold/parser_write→parser_test→parser_enableingestrule_list→run_rules→review_batchloop →set_categories(andset_merchant_categoryas needed). Store recurring decisions withrule_addand a note. Rules never overwrite rows set byset_categories.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-spawnedQuality bar
- TDD for behavior changes; meaningful tests only
- No Google/Sheets in core
- Guardrails in
tests/guardrails/must stay green
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
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.

