diff --git a/.claude/memory/MEMORY.md b/.claude/memory/MEMORY.md index b93c27a..9cee8d5 100644 --- a/.claude/memory/MEMORY.md +++ b/.claude/memory/MEMORY.md @@ -13,6 +13,7 @@ Keep this file under 200 lines — anything longer is content bloat, not memory. - [learnings/closed-pr-receives-review-after-close](learnings/2026-05-26-closed-pr-receives-review-after-close.md) — Closed PR can still get a REQUEST_CHANGES review seconds after dup-close; don't reopen, surface to sibling PR + Linear (PR #18 vs #20 ENG-25 race) - [learnings/review-feedback-fanout](learnings/2026-05-26-review-feedback-fanout.md) — multiple REQUEST_CHANGES comments fire multiple manager sessions; fetch + check head-branch commits newer than the reviewer comment before doing work (PR #20) - [learnings/vercel-bot-status-as-deploy-health-fallback](learnings/2026-05-26-vercel-bot-status-as-deploy-health-fallback.md) — When Vercel MCP/CLI auth is broken, read the GitHub Vercel-bot's commit status on the latest PR HEAD as a deploy-health fallback +- [learnings/manager-agent-yaml-needs-manual-bootstrap](learnings/2026-05-26-manager-agent-yaml-needs-manual-bootstrap.md) — `manager.agent.yaml` edits do NOT auto-deploy; a human must run `npm run bootstrap` from `ai-manager/` with `ANTHROPIC_API_KEY`+`AGENT_ID` to push the prompt to the live agent (ENG-28) ## Decisions - [decisions/mcp-for-small-writes-checkout-for-big](decisions/2026-05-26-mcp-for-small-writes-checkout-for-big.md) — Single-file writes go through GitHub MCP; multi-file or test-needing changes use the mounted checkout + `git push` diff --git a/.claude/memory/learnings/2026-05-26-manager-agent-yaml-needs-manual-bootstrap.md b/.claude/memory/learnings/2026-05-26-manager-agent-yaml-needs-manual-bootstrap.md new file mode 100644 index 0000000..51704b5 --- /dev/null +++ b/.claude/memory/learnings/2026-05-26-manager-agent-yaml-needs-manual-bootstrap.md @@ -0,0 +1,3 @@ +# `manager.agent.yaml` changes need a manual bootstrap run to land + +Editing `ai-manager/manager.agent.yaml` (the live manager system prompt) and merging the PR does NOT push the change to the running agent. The YAML is just a source artifact — the actual update goes through `ai-manager/src/bootstrap.ts`, which calls `client.beta.agents.update(AGENT_ID, { system: ... })` on the Anthropic platform. That script needs `ANTHROPIC_API_KEY` and the existing `AGENT_ID` in env, neither of which is available from the agent sandbox. So after merging any PR that touches `manager.agent.yaml`, surface it: a human has to run `npm run bootstrap` (or `npm run bootstrap:reviewer` for `reviewer.agent.yaml`) from `ai-manager/` with those env vars set. Until they do, the live system prompt lags `main`. Hit on ENG-28 / PR #25 — runtime templates (`tick.ts`, `manager-tick/route.ts`) deploy automatically via Vercel, but the YAML doesn't, so the live prompt and the runtime kickoffs can drift across a merge. Call out the gap explicitly in the PR body whenever the YAML changes. diff --git a/ai-manager/manager.agent.yaml b/ai-manager/manager.agent.yaml index 667c556..48216a3 100644 --- a/ai-manager/manager.agent.yaml +++ b/ai-manager/manager.agent.yaml @@ -187,10 +187,12 @@ system: | For changes that don't touch the UI (build config, prompt tweaks, docs), skip steps (d)–(h) and (j) — just build + lint. - l. **Open the PR.** The PR body MUST end with this HTML comment - as the last line so future webhooks can resume this session: + l. **Open the PR.** The PR body MUST end with this plain-text + marker on its own line so future webhooks can resume this + session (HTML-comment shape is stripped by the GitHub MCP + body filter — ENG-25): - + session-id: SESSION_ID_PROVIDED_IN_KICKOFF **Editing a PR body later:** `gh pr edit` fails in this repo with a Projects-classic deprecation error (exit 1) even when diff --git a/ai-manager/src/tick.ts b/ai-manager/src/tick.ts index 2675213..56a9a85 100644 --- a/ai-manager/src/tick.ts +++ b/ai-manager/src/tick.ts @@ -40,7 +40,7 @@ The token is scoped to the public 'pr-media-2' Vercel Blob store — used by ste const baseGoal = customGoal || - `Wake up. Your session id is ${session.id} — when you open a PR, include "" as the last line of the PR body so future webhooks can resume this session. Run the operational loop in your system prompt. Stop when there is nothing left.`; + `Wake up. Your session id is ${session.id} — when you open a PR, include "session-id: ${session.id}" on its own line as the last line of the PR body so future webhooks can resume this session. Run the operational loop in your system prompt. Stop when there is nothing left.`; const goal = `${baseGoal}\n\n${sessionEnv}`; diff --git a/app/api/manager-tick/route.ts b/app/api/manager-tick/route.ts index 1d54c7d..677b696 100644 --- a/app/api/manager-tick/route.ts +++ b/app/api/manager-tick/route.ts @@ -46,7 +46,7 @@ export async function GET(req: Request) { content: [ { type: 'text', - text: `Wake up. Your session id is ${session.id} — when you open a PR, include "" as the last line of the PR body so future webhooks can resume this session. Run the operational loop in your system prompt. Stop when there is nothing left.`, + text: `Wake up. Your session id is ${session.id} — when you open a PR, include "session-id: ${session.id}" on its own line as the last line of the PR body so future webhooks can resume this session. Run the operational loop in your system prompt. Stop when there is nothing left.`, }, ], },