Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .claude/memory/MEMORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
8 changes: 5 additions & 3 deletions ai-manager/manager.agent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 -->
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
Expand Down
2 changes: 1 addition & 1 deletion ai-manager/src/tick.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 "<!-- session-id: ${session.id} -->" 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}`;

Expand Down
2 changes: 1 addition & 1 deletion app/api/manager-tick/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 "<!-- session-id: ${session.id} -->" 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.`,
},
],
},
Expand Down