diff --git a/AGENTS.md b/AGENTS.md index da14711..23c531c 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -16,6 +16,43 @@ This file is the quick-reference for an agent starting work: where things live, what's safe to touch, and the conventions that aren't obvious from the code. +## Worktrees: where dispatched work happens (read before editing anything) + +**`/home/alee/Sources/6krrt` is the main checkout, and it is production.** The +live router restarts from its `config/config.yaml`, and the live `router.db` and +`config/config.local.yaml` live there. Its uncommitted files are the owner's. + +Your session opens in that directory by default, even when your task belongs to +a worktree. So a task that names no worktree edits production files. That +happened on 2026-09-28: a worker rewrote the main checkout's live +`config.yaml`. + +**If you are a worker:** +- Your task names a worktree under `/home/alee/Sources/6krrt-worktrees/`. + `cd` there first, and read and edit only paths under it. +- Check where you are before your first edit: + `git -C rev-parse --show-toplevel` must print the worktree, not + `/home/alee/Sources/6krrt`. +- If your task names no worktree, stop and ask the orchestrator. Do not default + to the main checkout. +- Never edit, commit, stash, reset or check out anything in the main checkout + unless your task explicitly says "main checkout". + +**If you dispatch work (Atlas, any orchestrator):** +- Begin every `task()` prompt with this line: + `WORKTREE: . cd there first; never edit under /home/alee/Sources/6krrt/.` + Include it even for a small or read-only task. +- Give every `task()` a `category` or `subagent_type`. A call with neither + creates no worker, yet still reports "completed". +- Never dispatch to `oh-my-claudecode:*` agents. They are pinned to Anthropic + models this opencode cannot reach, and return "completed" with zero work. +- Run one worker at a time per worktree, unless the plan says the files are + disjoint. +- Before ticking a todo, confirm its commit exists: + `git -C log --oneline`. + +The Git hygiene section below says why the main checkout is shared. + ## Stack snapshot | Dimension | Value |