Background
Storage
Where notes are kept, what a file looks like, and how saved data is upgraded.
Everything archr saves is plain text, so people, agents and git can all read it.
Where things are kept
| Kind | Where |
|---|---|
| Annotations in git | .archr/annotations/, committed |
| Comments | .git/archr/reviews/<spec>/ |
| Closed reviews | .git/archr/reviews/<spec>@<when>/ |
| Tours | .git/archr/tours/ |
Outside git, annotations go under ~/.local/state/archr/<path>/annotations/, named for the directory.
Annotations are shared with other developers, and with you on other machines, and git is their history.
Comments, review state and tours are per clone and never committed, with no .gitignore involved.
A note's file
Each note is one Markdown file named for its id, with its anchor in the frontmatter and its text below.
---
id: k7mq2xfa
places:
- path: internal/serve/router.go
kind: line
start: "12:1"
end: "30:2"
quote: "func route(r *http.Request) {"
commit: 0fe5423a...
created: 2026-11-03T17:20:00Z
---
Routing stays here. Handlers do not look at the path.
A place's kind is folder, file, line or char.
start and end are a line and a character of it, both from 1, counted as the file has them: a tab is one character.
A place on lines a review removed has old: true and is numbered as the file was at commit.
A comment also has its status and replies.
Line numbers are against commit and do not move when the file changes.
Versions
Each folder of saved data, .archr/ and .git/archr/, has a version file holding a number.
archr writes it when it makes the folder.
When archr opens a project whose data is older than it reads, it upgrades the data in place and writes the new version.
A folder with no version file is version 1.
Data from a newer archr is refused, with a message saying so.
.archr/ is committed, so its upgrade shows up as a change to commit.
.git/archr/ is per clone, so each clone upgrades its own.