diff --git a/officer.dev/CLAUDE.md b/officer.dev/CLAUDE.md index c62759f..b440f3f 100644 --- a/officer.dev/CLAUDE.md +++ b/officer.dev/CLAUDE.md @@ -28,10 +28,16 @@ This file captures the **cross-cutting operational reality** that neither of tho After editing anything under `platform/src` (backend *or* frontend), it needs a **`pm2 restart officer`** to take effect. Forgetting this looks exactly like "my fix didn't work." Confirm the reload before diagnosing further. - - **NEVER run pm2 yourself — tell the owner the exact command to run.** After a platform change, - print the precise `pm2 restart ` command that reloads ONLY the process(es) the change - needs (for platform TS edits that is `pm2 restart officer` alone — never the whole - `ecosystem.config.cjs`, which bounces every sidecar). The owner runs it. + - **Run the restart yourself, and say that you did.** This said "NEVER run pm2 yourself" until + 2026-08-20. The owner granted the opposite on this machine: restart when a change needs it rather + than handing over a command to paste. What did NOT change is the scope — restart ONLY the + process(es) the change needs (for platform TS edits that is `pm2 restart officer` alone, never the + whole `ecosystem.config.cjs`, which bounces every sidecar). + - **Check who else is live first.** The owner edits the platform *using* the platform, and often has + several sessions open, so a restart can cut another agent off mid-turn or bounce the process you + are both running inside. Look at `pm2 list`, the session list, the process table. Restarting is + also the one moment a half-applied change from a shared checkout ships — confirm the tree is + coherent (typecheck clean, database schema matching the code) before you bounce anything. - **Capabilities ARE hot — no restart.** Files under `capabilities/` are re-read from disk on each run / request (Pi per agent session, the app per request). Edit `TASK.md` / `index.ts` / `categories.yaml` and it's live immediately. This asymmetry is the #1 source of confusion: