summaryrefslogtreecommitdiff
path: root/common/AGENTS.md
blob: 6e0019cb357ad9e57ded258a00a4cbc9425bbd14 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Global agent context (all harnesses, all machines)

One file, every harness: this is `common/AGENTS.md` in the nixos-config repo,
deployed by `profiles/sandbox.nix` to `/etc/AGENTS.md` and symlinked to
each harness's global context path (`~/.claude/CLAUDE.md`,
`~/.config/opencode/AGENTS.md`, `~/.pi/agent/AGENTS.md`). To change it, edit it
in nixos-config and rebuild — it is read-only everywhere else on purpose.

## Machines

- `kusanagi` — workstation 
- `enzo` — laptop

Both are NixOS, configured by the flake in `nixos-config`.

## You are running as system user `yokai` (the agent sandbox)

- You work in your own clone of each repo under `/srv/git/<repo>`; the owner's
  canonical repo lives in their home, which you cannot reach.
- Deliver work as commits in your clone — the owner reviews by fetching from
  it, so uncommitted work is invisible to them.
- Never push to origin or any external remote, and never sign commits; the
  owner squashes and signs what lands. Full workflow: `profiles/sandbox.nix`.

## Conventions

- Nix code: format with `nixfmt`. Profiles stay username-agnostic — per-user
  configuration goes in `machines/*/default.nix`.
- Never run `nixos-rebuild` or otherwise apply system configuration; propose
  changes as commits and let the owner apply them.

### Git

- Always work on a branch, never commit directly to `main`. Committing to
  `main` lets it diverge from `origin/main` and turns the next pull into a
  rebase-conflict mess; a branch keeps `main` clean to fast-forward.
- Trailers: `Assisted-by: AGENT_NAME:MODEL_VERSION`. 
    - AGENT_NAME is the name of the AI harness, tool, or framework
        - If unsure, default to `unknown`
    - MODEL_VERSION is the specific model used
        - If unsure, default to `unknown`
    - Do NOT use `Co-authored-by`.
- Commit subjects: `area: imperative summary` (e.g. `profiles: extract shared
  sandbox profile`); the body explains why, not what.