refactor: name dirs by what they hold, trim exports (#692)

Bare dir now always means a user data dir, so the snapshot root, the export listing, and the
keys.json kind get their own words; names used only inside their package are no longer exported.
This commit is contained in:
Roger authored and GitHub committed 2026-11-10 17:00:43 +08:00
1 parent 2e7ee3c69f
commit a7741eaab2
40 files changed
+242 -256

No files matched your search

+2 -1
View File
@@ -32,9 +32,10 @@ Dependencies point down only. Interfaces live with their consumer, nothing regis
## Naming
- A name is judged at its call site, qualified by its package, and never repeats the package's name.
- A name is judged at its call site, qualified by its package, and never repeats the package's name, unless it names the one type the package exists for.
- A name says what a thing is, not its role or its shape, and one concept has one word.
- Names are spelled out; only Go's universal idioms stay short, and lint enforces it.
- The domain's words: a **browser** is a row of the browser table; its **base** is what it is built on (Chromium, Firefox, or Safari); a **user data dir** is a browser's data directory, where an installation would be the program; and a **profile**, an **extraction**, a **snapshot**, a **record**, and a **category** mean what they say.
- Unqualified, "dir" means a user data dir; any other directory is named for what it holds.
**Rejected:** "engine" for the base, which means the renderer; "origin" or "owner" for where a record came from, which are web and access-control terms; and "job" for an extraction, which suggests a worker pool that does not exist.