From 170a3e35cd85ad3a23cdcedf236057418723eded Mon Sep 17 00:00:00 2001 From: mfowler Date: Sun, 14 Jun 2026 15:08:08 +0000 Subject: [PATCH] chore(po): track memory in-repo + add AGENTS.md conventions - memory/ now lives in the repo and is git-tracked; the harness memory path (~/.claude/.../memory) is a symlink to it so writes still land here - AGENTS.md: document memory-in-repo, always-commit-and-push, operator-driven (no sweep), and the one-directional rule Co-Authored-By: Claude Opus 4.8 --- AGENTS.md | 30 ++++++++++++++++++++++++++++++ memory/MEMORY.md | 3 +++ memory/always-commit-and-push.md | 14 ++++++++++++++ memory/git-identity-local.md | 12 ++++++++++++ memory/memory-in-repo.md | 12 ++++++++++++ 5 files changed, 71 insertions(+) create mode 100644 AGENTS.md create mode 100644 memory/MEMORY.md create mode 100644 memory/always-commit-and-push.md create mode 100644 memory/git-identity-local.md create mode 100644 memory/memory-in-repo.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..ffe3a1f --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,30 @@ +# AGENTS.md — conventions for agents working in this repo + +This is the **project-orchestrator (PO)** repo. See `README.md` for what the PO is and +`prompts/orchestrator.md` for the agent's role. + +## Memory + +- The PO's memory lives **in this repo** under `memory/`, and is **tracked via git** — not left + under `~/.claude`. Memory is versioned and reviewable alongside the code. +- The harness's expected memory path + (`~/.claude/projects/-home-loops-project-orchestrator/memory`) is a **symlink** to `memory/` here, + so the normal "write to the harness memory path" flow still lands files in the repo. +- `memory/MEMORY.md` is the index (one line per memory); each fact is its own file with frontmatter. + +## Git + +- **Always commit and push** every change to this repo (`git add -A && git commit && git push + origin main`) — including memory updates. Don't wait to be asked. +- Git identity is set locally on this repo (`mfowler.email@protonmail.com` / `mfowler`); it was not + configured globally in this environment. +- Push credentials for `git.autonomic.zone` come from the active cc-ci project + (`/srv/cc-ci/.testenv`, per `fleet.toml`). + +## Operating model + +- The PO is **operator-driven**: it acts on request (create / start / stop / update / list / status + a project). There is **no periodic fleet sweep** — this repo manages projects, it does not watch + them live. The agent uses `watch = "heal"` (recover-if-dead) with no `wake`. +- **Knowledge is one-directional (PO → projects).** Never write PO/fleet metadata into a project + repo. The fleet's only record is this repo's `fleet.toml`. diff --git a/memory/MEMORY.md b/memory/MEMORY.md new file mode 100644 index 0000000..4528e51 --- /dev/null +++ b/memory/MEMORY.md @@ -0,0 +1,3 @@ +- [Always commit and push](always-commit-and-push.md) — commit + push every PO-repo change automatically, no need to ask +- [Git identity / push creds](git-identity-local.md) — git.autonomic.zone push info lives in the active cc-ci project (/srv/cc-ci/.testenv); local git identity set on PO repo +- [Memory lives in repo](memory-in-repo.md) — memory/ is in the PO repo and git-tracked; ~/.claude memory path is a symlink to it diff --git a/memory/always-commit-and-push.md b/memory/always-commit-and-push.md new file mode 100644 index 0000000..1d7b38c --- /dev/null +++ b/memory/always-commit-and-push.md @@ -0,0 +1,14 @@ +--- +name: always-commit-and-push +description: Operator wants every change to the PO repo committed and pushed automatically +metadata: + node_type: memory + type: feedback + originSessionId: 7ed8744a-1e31-4832-8cdc-3b726ab41f9a +--- + +Whenever I make changes in the project-orchestrator repo, always commit AND push them (to `origin main`) without waiting to be asked. + +**Why:** the operator stated this as a standing rule on 2026-06-14; they don't want to prompt for it each time. + +**How to apply:** after any edit to this repo, `git add -A && git commit && git push origin main`. Git identity was not configured globally — set locally if needed: `user.email "mfowler.email@protonmail.com"`, `user.name "mfowler"`. Commit messages end with the Co-Authored-By trailer. This applies to the PO's own repo; project repos are driven per their own runbooks. See [[git-identity-local]]. diff --git a/memory/git-identity-local.md b/memory/git-identity-local.md new file mode 100644 index 0000000..a649795 --- /dev/null +++ b/memory/git-identity-local.md @@ -0,0 +1,12 @@ +--- +name: git-identity-local +description: Where PO git push credentials/identity for git.autonomic.zone come from +metadata: + node_type: memory + type: reference + originSessionId: 7ed8744a-1e31-4832-8cdc-3b726ab41f9a +--- + +Pushing the PO repo to its remote on `git.autonomic.zone` works (verified 2026-06-14). The credentials/info needed to push to `git.autonomic.zone` live in the **active (live) cc-ci project** — per `fleet.toml`, that project's secrets are at `/srv/cc-ci/.testenv` (live cc-ci runs under `/srv/cc-ci/cc-ci-plan/agents.py`). If a push ever fails on auth, source/check there rather than re-inventing creds. + +Git author identity was not set globally in this environment; it was set locally on the PO repo: `user.email "mfowler.email@protonmail.com"`, `user.name "mfowler"`. Related: [[always-commit-and-push]]. diff --git a/memory/memory-in-repo.md b/memory/memory-in-repo.md new file mode 100644 index 0000000..5168a21 --- /dev/null +++ b/memory/memory-in-repo.md @@ -0,0 +1,12 @@ +--- +name: memory-in-repo +description: All memory files live in the PO repo (memory/) and are git-tracked, not under ~/.claude +metadata: + type: feedback +--- + +All memory files must be written **inside the PO repo** at `memory/` and tracked via git — not left under `~/.claude`. + +**Why:** the operator wants memory versioned and reviewable alongside the repo (stated 2026-06-14). + +**How to apply:** write memory files to `/home/loops/project-orchestrator/memory/`. The harness's expected memory path (`~/.claude/projects/-home-loops-project-orchestrator/memory`) is a **symlink** to that in-repo dir, so the usual Write-to-the-harness-path flow still lands files in the repo. After writing/updating any memory file, commit and push (see [[always-commit-and-push]]). Noted in the repo's `AGENTS.md`.