| name | ant |
| description | Local-first notebook for *why* — design decisions, alternatives rejected, pivots taken, the conversational nuance that gets lost when an issue closes. Sibling to ait. Use when the user asks to record/note a decision, after a load-bearing choice between options, after a library swap or refactor of direction, or to recall prior decisions in an area. |
AIT (ant) — Agent Notebook Tool
ant is the why companion to ait's what. Where ait tracks
open issues and dependencies, ant captures the durable record of decisions
made, alternatives evaluated, and pivots taken — the context a future
session needs to pick up where the last one left off.
The database lives at .ant/ant.db, gitignored by default. Notes are
developer-personal working memory; they can be promoted to project
documentation later via ant export.
At the start of every session
If the project has an ant database, run ant foundation early. It
returns the project's single load-bearing vision entry — what the
project is, what it isn't, the spirit you're meant to be working in.
Read it before you start making judgement calls about design, wording,
or trade-offs.
If ant foundation reports no foundation recorded and the project
shows signs of being established (a populated CLAUDE.md, a real
README.md, non-trivial git history), offer to backfill one with the
user. If they agree, read
BACKFILL_FOUNDATION.md and follow the Q&A
flow there. If they'd rather not — or the project is brand new and
hasn't had its ideation discussion yet — drop it and carry on. Most
projects won't have a foundation and that's fine.
After a project ideation/vision discussion that produced a shared sense
of what the project is and isn't, offer to capture it as the foundation
entry: ant add --kind foundation --body @path/to/notes.md. There can
only be one — add will refuse a second, and you revise the existing
one with ant edit instead.
When to reach for it
Lean conservative — capture entries when the why would be hard to
reconstruct from the code alone:
- The user asks: "let's make a note of this", "record this", "ADR this".
- A load-bearing decision was made: a choice that constrains future
work and isn't obvious from reading the code.
- An evaluation between options ended in a pick: "we tried X but went
with Y because…".
- A pivot or library swap: moving away from one approach to another.
- A project ideation phase wrapped up: the moment after you've
agreed on what the project is, before any code is written, is the
right time to capture a
foundation entry.
You don't need to capture every small detail — favour fewer high-value
entries over a stream-of-consciousness log. If in doubt, ask the user.
Conventional kinds
The schema doesn't enforce these — kind is a free string — but starting
with three named conventions keeps the notebook navigable:
adr — Architecture Decision Record. A load-bearing choice worth
recording properly: title, context, options considered, the decision,
the consequences. Longer-form by convention.
note — A captured thought, observation, or short rationale. The
default and the bulk of entries.
pivot — A change of direction: "we tried X for Y reason, it
didn't pan out, here's why we moved on". Often shorter than an ADR but
worth distinguishing because pivots tell future-you "don't reconsider this
unless conditions changed".
foundation — The project's single vision document (one per
project, enforced). What this project is and isn't, in the spirit of
a design doc agreed before code was written. Read it at session
start; capture one only after a clear ideation/vision discussion.
Promote a note to an adr later (ant edit --kind adr <id>) if it turns
out to matter.
Capturing entries
ant init
ant init --prefix myproject
ant add --body "rationale text"
ant add --body @path/to/file.md
echo "rationale" | ant add
ant add --title "Choose sqlite" --kind adr --issue ait-AbCdE.2 \
--body "we picked modernc/sqlite over CGO bindings because…"
--issue is free-form; if you use ait it'll match an ait id, but Jira /
Linear / GitHub ids work just as well — ant doesn't validate the value.
For non-trivial bodies, write a temp file and use @file; heredocs are fragile
when the body contains backticks.
Recall — the four read-side moments
These are when ant earns its keep. Each returns slim JSON by default; reach
for ant show <id> when you need the full body.
| Moment | Command |
|---|
| Session start — "what does this project care about?" | ant foundation |
| Session start — "what did we decide recently?" | ant recent --limit 5 |
| Touching an area — "any prior decisions here?" | ant search "auth" |
| Evaluating a library — "have we looked at this before?" | ant search "spatie" |
| Working on an issue — "what's the context?" | ant for <issue-id> |
recent and search include a 200-character body snippet so you can
decide whether to follow up with show. Multi-word search ANDs the terms
across title and body (case-insensitive).
ant list
ant list --long
ant list --human
ant list --kind adr --since 2026-04-01
ant show <id>
Editing and promotion
ant edit <id> --title "New title"
ant edit <id> --issue ""
echo "new body" | ant edit <id>
ant edit <id> --body @path/to/new.md
ant export <id>
ant export --kind adr
ant export --json
export is how a personal entry gets promoted to project documentation:
pipe it into a PR description, save it as a doc file, share it as a gist.
Removing entries
ant delete <id>
ant delete is intentionally cautious. If something looks wrong with the
warning it prints, stop and check with the user — the cost of a
mistaken delete is high (entries don't soft-delete) and the cost of
double-checking is low. Don't routinely retry a refused delete; surface the
refusal to the user instead.
Output mode
Default output is JSON. Pipe to jq for ad-hoc shaping, or use
ant list --human when a table is more useful for a person reading along.
Database location and --db
ant config
ant --db /path/to/other.db <command>
.ant/ant.db lives at the git root and is added to .gitignore by ant init. Each project gets its own notebook.
Quick mental model
- Capture is cheap. Don't ceremony it. A two-sentence
note beats nothing.
- Recall is targeted. Pull the right few entries, not the whole notebook.
ant is for the why; ait is for the what. Cross-reference
with --issue.
- Personal by default. Promote what deserves promotion; let the rest
stay personal working memory.