Files
mnovak b62317d552
ci / check (pull_request) Has been cancelled
[docs] Workflow: the agent merges every PR, protocol changes included; the self-review goes in the PR
Section 4's pairing change is approved (Mark, 2026-11-14). The F21 review moves from
.agents/reviews/ into PR #14.
2026-11-14 14:58:42 +01:00

47 lines
2.9 KiB
Markdown

# CLAUDE.md — Tabellarius
Operating manual for AI agents. This repository is **public**. Write every file, commit and review as
if a stranger auditing your privacy claims will read it — because one will.
## 1. Layout (proposed)
```
crates/protocol/ # wire types, versioned; no I/O
crates/client/ # OpenMLS wrapper + mailbox client; embedded by Amicitia Domi
crates/relay/ # axum + SQLite; stores exactly docs/PROTOCOL.md §5
deploy/nixos/ # NixOS module (non-logging reverse proxy included)
deploy/container/ # container image
```
`relay` never depends on `client`. `protocol` depends on nothing in this repository.
## 2. Absolute rules
1. **No hand-written cryptography.** MLS via OpenMLS; hashes and randomness from vetted crates.
2. **The relay stores only `docs/PROTOCOL.md` §5.** A new column is a protocol change: document,
review, version bump — never a migration slipped into a feature.
3. **No logging of IP addresses, user agents or request bodies**, in code or in the shipped deploy
configuration. Counts only.
4. **Every privacy claim in the docs has a test** (§7 of the protocol). A claim without a test is
removed from the docs until it has one.
5. Secrets (tokens, keys) never in the repository, test fixtures included — fixtures generate them.
6. **Builds are reproducible** (Nix flake) and every release publishes a signed `SHA256SUMS`. A
change that breaks reproducibility is a review **blocker** (`docs/VERIFY.md`).
7. The name *Tabellarius* is for developers and auditors. User-facing copy says *your message relay*.
## 3. Workflow
Same as Amicitia: analysis document in `.agents/features/` before code ((D)TDD), branch per feature,
PR. **The adversarial self-review is posted in the PR** as a Gitea review: the evidence (test counts
per crate, planted bugs) in its body and a comment on each line a finding is about. The PR is the
record; `.agents/reviews/` holds the reviews from before 2026-11-14 only.
**The agent merges every PR itself**, a change to `docs/PROTOCOL.md` included, once local checks pass
and the review is posted: merge `--no-ff`, push, verify the remote hash, say in the merge commit which
PR holds the review, and report to Mark afterwards (Mark, 2026-11-14). A protocol change still says in
`docs/PROTOCOL.md` what changed, when and why.
**No AI attribution in commits, ever.** Quote test counts per crate; an exit code is not a count.
## 4. Known traps
| Trap | Why it bites |
|:--|:--|
| **The helpful debug log** | One `tracing::info!(?request)` logs an IP or a token. Logging goes through a filter that knows which fields are allowed. |
| **The reverse proxy logs** | The relay can be clean while nginx/caddy logs every IP. The deploy module disables access logs; the review checks it. |
| **Metadata by timing** | Fetching all mailboxes in one connection links them. Document it honestly; do not claim otherwise. |
| **iOS wake-ups** | See protocol §6 — the publisher's push gateway is a privacy cost, stated, not hidden. |