graph8 lifecycle
graph8 internal · setup only
7-day setup sprint · infra ↔ g8 monorepo

Setting up Lifecycle at graph8. 7 days to wire infra + g8. Then 18 people start shipping 2–3× faster.

This sprint is the SETUP — not the improvements. It wires the Lifecycle system across the two repos graph8 already runs: graph8-com/infra (axon agents, MBM service, crons, Postgres, k8s) and graph8-com/g8 (the monorepo with all product code, workflows, and per-engineer .claude config). Once these 27 tasks ship, the team starts running the new operating model: each engineer dispatches 3+ agents per day in parallel, overnight runs cover the long-form work, and the metrics live in one dashboard. The improvements (the 2–3× lift) come after — see graph8 after. One engineer dispatches these 27 setup tasks across the week; agents do most of the work. Tasks tagged human truly need you · agent dispatch + walk away · pair review tightly.

Monday · day 1 · ≤ 4 hours total

Settings + cleanup. Two clicks close the biggest hole.

Dispatch four agents in parallel for the four file-edit tasks. None of them need the ledger. The two GitHub settings tasks are you, in the browser, ~10 min each. By lunch: branch protection on, four PRs open. By EOD: all merged.

1
Morning dispatch · 20 min of human time
You click branch protection on both repos (tasks 1+2, ~20 min total). Spawn four agents in parallel for tasks 3, 4, 5, 6 — each is a single PR. Walk away. Review the four PRs as they land throughout the morning, merge when MBM has approved. EOD: branch protection on, four silent-failure landmines closed.
1

Branch protection · graph8-com/infra · main

Two clicks close the biggest "anyone can ship anything" hole. MBM bot review still satisfies the approval requirement — autonomous shipping not slowed.

human10 min
Where: github.com/graph8-com/infra/settings/branches · require PR · status checks · CODEOWNERS · linear history
Done when: a direct push to main from your laptop fails with "Protected branch."
2

Branch protection · graph8-com/g8 · main + qa

Same rule, bigger blast radius. MBM bot approval counts everywhere except migrations (already gated by CODEOWNERS).

human10 minparallel to #1
Where: github.com/graph8-com/g8/settings/branches
Done when: direct push fails on both branches.
3

Lowercase normalizer for @mbm review

@MBM review currently silently dropped. One small workflow re-posts as lowercase and counts dropped forms.

agent30 minparallel
New: graph8-com/g8/.github/workflows/normalize-mbm-trigger.yml
Done when: typing @MBM review on a test PR produces an auto-followup @mbm review.
4

Retire pr_cleanup + rage_click_detector

Both have prompts but no TaskSpawner. Today: wire (add to triggers.yaml) or delete. No in-between. You decide which; agent executes the file changes.

agent30 minparallel
Edit or remove: tenants/graph8-eng/agents/{pr_cleanup,rage_click_detector}/
Done when: agent catalog is "23 wired + 2 retired" or "25 fully wired" — not in-between.
5

Sync token guard on sync-main-to-qa.yml

Today silently no-ops if SYNC_BOT_TOKEN is missing. Add a fail-loud check at the top.

agent15 minparallel
Edit: graph8-com/g8/.github/workflows/sync-main-to-qa.yml
Done when: a workflow run either passes (token present) or fails loudly — never silent.
6

Document attempt-4 behavior in pr_fixer

Hard-capped at 3 today; attempt 4 is undefined. Append escalation rule: label mbm/needs-input, tag the author, stop.

agent15 minparallel
Edit: tenants/graph8-eng/agents/pr_fixer/prompt.md
Done when: the rule is in the prompt and mirrored in the workflow as a comment.
Tuesday · day 2 · the foundation lands

Ledger schema + ingest API. Single biggest unlock of the week.

By EOD: a Postgres table exists, an authenticated POST /v1/trace endpoint accepts rows, and the MBM service is the single ingest point. Every loop after this depends on it.

2
Morning dispatch · review-heavy day
Spawn the migration agent (task 7) and the trace-handler agent (task 8) in parallel against services/mbm. Both target the same package — review for conflicts before merging. The third agent (task 9, scaffolding axon prompts) is already done in this PR — your job there is read + refine. EOD: the table exists, the endpoint accepts test rows.
7

Migration: skill_invocations table

Single table is the foundation of everything — utilization dashboard, agent economics, mortality loop. Token columns NULL for Max-plan local runs; populated for K8s OAuth-pool runs.

pairhalf-day
New: services/mbm/migrations/20260518_skill_invocations.sql (template scaffolded in this repo)
Done when: psql -c "\d skill_invocations" shows the table with 3 indexes.
8

POST /v1/trace endpoint

Single ingest endpoint, API-token authenticated. Idempotent on (engineer_id, ts, skill_name). Returns 202 with the inserted id.

pairhalf-dayparallel to #7
New: services/mbm/internal/trace/handler.go
Done when: curl -X POST $MBM_URL/v1/trace -d '...' returns 202 and the row appears.
9

Scaffold the new axon agent prompts

Agent prompts can land before the agents are dispatched — they're just markdown. Land agent_health, mbm_critic, and knowledge_compactor today so they're ready to wire on day 4+. (Already scaffolded in this PR — review and refine.)

agent2 hrparallel
New: tenants/graph8-eng/agents/{agent_health,mbm_critic,knowledge_compactor}/prompt.md
Done when: all three prompts exist, reviewed by a human, ready to dispatch.
Wednesday · day 3 · capture goes live

MCP wrapper + Claude hook + first two dashboards.

By EOD: every local Claude Code session POSTs to the ledger automatically. Two Grafana dashboards (engineer utilization + agent economics) are live. The first numbers populate by Thursday morning.

3
Morning dispatch · capture goes live
Spawn the MCP-wrapper agent first (task 10) — that one needs your local install when it lands. Once it's in your own Claude Code (task 11 — you, 5 min), dispatch the two dashboard agents in parallel (12 + 13). By EOD, your own skill fires are showing up in the dashboard. Tomorrow others on the team install via your one-line Slack post.
10

Trace MCP wrapper

TypeScript MCP server wraps tool calls and POSTs trace rows. Settings.json SessionStart hook covers slash-command fires too.

pairhalf-day
New: services/lifecycle-trace-mcp/src/server.ts · Edit: .claude/mcp.json in both infra + g8
Done when: SELECT count(*) FROM skill_invocations WHERE engineer_id='you' AND ts > now() - interval '5 min' > 0 after running any local skill.
11

Install MCP locally · commit to both .claude/mcp.json

You install on your own machine. Commit the MCP entry to .claude/mcp.json in both infra and g8 so any future engineer (or remote agent run that loads from .claude config) inherits it. One Slack post in case anyone is paying attention.

human10 minparallel
Edit: .claude/mcp.json in both infra + g8 · Local: your ~/.claude/mcp.json
Done when: your own skill fires show up in the ledger within 5 minutes of any local /start.
12

Engineer-utilization Grafana dashboard

First user-visible artifact. SQL query + one Grafana panel. Lives at grafana.graph8.com/d/lifecycle-engineer.

agent2 hr
New: k8s/monitoring/dashboards/lifecycle-engineer.json
Done when: Grafana panel renders with the engineers who have run skills, with utilization grade column.
13

K8s-agent economics Grafana dashboard

The other half — for K8s OAuth-pool runs only. Real $/merged-PR per agent.

agent2 hrparallel to #12
New: k8s/monitoring/dashboards/lifecycle-agent-economics.json
Done when: g8_5xx_fixer's row visible with $/merged-PR. Red >$30 conditional formatting.
Thursday · day 4 · first loops close

test-writer wired · agent_health daily · first agent-reads-agent.

The ledger has 24 hours of data. Wire two agents that close loops today. test-writer already exists at g8/.claude/agents/test-writer.md — just needs PR-trigger plumbing. agent_health is the first agent that reads ledger output.

4
Morning dispatch · first loops close
Dispatch tasks 14, 15, 16 in parallel — three agents, three loops. Glance at yesterday's utilization dashboard while they run (your own number should be there now). Review each PR as it lands; agent_health's prompt is already in this PR — task 15 is wiring the cron, not writing the prompt. By EOD: the first agent that reads the ledger is alive.
14

Wire test-writer agent to PR open

Closing the test-coverage loop in one morning by wiring an existing agent. New workflow scans diffs for new public functions without tests; dispatches Claude Code k8s job to write them.

agent3 hr
New: graph8-com/g8/.github/workflows/test-writer-on-pr.yml · Reads: existing g8/.claude/agents/test-writer.md
Done when: a PR adding def public_foo(): with no test produces a follow-up test PR within 15 min.
15

agent_health cron live

Daily snapshot of each axon agent's PR survival rate. First agent that reads the ledger and writes back to it. Foundation for "agent A → agent B" pattern.

pair4 hrparallel
Edit: tenants/graph8-eng/crons.yaml (entry added in this PR) · prompt at tenants/graph8-eng/agents/agent_health/prompt.md (already scaffolded)
Done when: first daily snapshot lands in agent_health_stats table; agent-economics dashboard now updates from it instead of from raw queries.
16

Migration: agent_health_stats table

Storage for the daily agent-health snapshots. Schema lives in this repo template; engineer applies in mbm-pg.

agent1 hrparallel
New: services/mbm/migrations/20260520_agent_health_stats.sql (template scaffolded in this PR)
Done when: table exists, agent_health cron writes its first row.
Friday · day 5 · scoring + ratchet + auto-promote

Three medium tasks, one daring CI flip.

Get the PRD scoring out of the prompt and into Go (with tests). Open the first auto-promoted qa→main PR. Flip bandit to blocking. Four agents in parallel, you review as they land. Bandit needs your judgement on findings — block ~1 hr for that.

5
Morning dispatch · 4 parallel agents
Spawn 17, 18, 19, 20 in parallel. Task 19 (bandit flip) needs your judgement on which findings to fix vs nosec-comment — block 1–2 hours in the afternoon to walk the findings list. The other three you mostly review. By EOD: first blocking CI gate, qa→main auto-promotes, scoring is in code.
17

Engineer-scoring service

Move /assign-prds algorithm out of the prompt into code. 8 test cases. Skill calls POST /v1/grade/engineer instead of re-deriving.

pairhalf-day
New: services/mbm/internal/grader/engineer_scoring{,_test}.go · Edit: infra/.claude/commands/assign-prds.md
Done when: two runs of /assign-prds on the same input produce identical output.
18

Auto-promote qa → main on soak SLO

Hourly workflow opens the qa→main PR automatically once QA has been green ≥48h. Closes the biggest cycle-time dark zone.

pair3 hrparallel
New: graph8-com/g8/.github/workflows/auto-promote-qa-to-main.yml
Done when: next qa→main PR opens automatically; Slack ping fires.
19

Remove continue-on-error from bandit

First CI ratchet. Smallest blast radius. Agent runs bandit on main, files candidate fixes; you walk the list and accept/nosec each. Then agent flips the flag and opens the PR.

pairhalf-dayparallel
Edit: graph8-com/g8/.github/workflows/code-quality.yml
Done when: a PR introducing a shell=True subprocess fails CI on bandit.
20

Skill consolidation · round 1 · /commit into /ship

First merge of the four. /commit becomes a sub-step of /ship. Removes one skill from the catalog.

agent1 hrparallel
Edit: g8/.claude/commands/ship.md · Delete: g8/.claude/commands/commit.md
Done when: skill count = 21 (was 22).
Saturday · day 6 · the agent-watching-agents day

mbm_critic + skill-mortality + Cloudflare Worker scaffold.

Two more loops close. The first agent that reads MBM's own decisions ships today. Skill-mortality auto-issues open for low-fire skills. Cloudflare Worker scaffolded; cutover lands Sunday.

6
Morning dispatch · the agent-watching-agents day
Dispatch 21, 22, 23, 24 in parallel. The Worker (task 23) is the heaviest agent run today — give it extra context (existing cron patterns, MBM API surface) in the kick-off prompt. Hold the webhook cutover until tomorrow. The other three you mostly review as they land.
21

mbm_critic agent live

Daily cron classifies PRs where MBM's CHANGES_REQUESTED was dismissed. Proposes rubric updates to reviewer/prompt.md. First agent that reads MBM's own output.

agent4 hr
Already scaffolded: tenants/graph8-eng/agents/mbm_critic/prompt.md (this PR) · Add cron to: tenants/graph8-eng/crons.yaml (entry added)
Done when: first daily run completes; weekly digest scheduled for following Friday.
22

Skill-mortality job

Weekly SQL + auto-issue. Skills with <5 fires/month in the ledger → deprecation issue with the consolidation suggestion from the merge table.

agent2 hrparallel
New: services/mbm/internal/jobs/skill_mortality.go
Done when: first deprecation issue auto-opens for any skill below threshold.
23

Cloudflare Worker for tenant webhooks

Replaces 2h polling with sub-60s dispatch. Validates GitHub HMAC, translates events into Task CR creation.

pair5 hr
New: workers/tenant-webhook/src/index.ts · workers/tenant-webhook/wrangler.toml
Done when: staging Worker accepts a test GitHub webhook and returns 200 with a Task CR created.
24

Skill consolidation · round 2 · /assign-prds + /capacity-check/capacity

Second merge. Both read the same data; splitting forces two queries for one decision.

agent1 hrparallel
New: infra/.claude/commands/capacity.md · Delete: the two source skills
Done when: skill count = 20.
Sunday · day 7 · cutover + demo

5xx-error label goes webhook · acceptance review · demo for the board.

Cut over the first label to the Worker; prove the latency win (~1h → <60s). Run the 8-point acceptance check. Record a 10-minute demo of the dashboards + a journey-walk for stakeholders.

7
Morning dispatch · the proof day
Dispatch the cutover agent (task 25). While it works, you walk the 8-metric acceptance grid (task 26 — you only, ~1 hr). Record the demo last (task 27 — you, ~2 hr, your face and voice). EOD: week 1 shipped, week 2 starts from a working system, not zero.
25

Cut over 5xx-error label to webhook

First proof point. Flip the trigger from polling to webhook; observe the p50 dispatch latency drop from ~1h to sub-60s.

pair2 hr
Edit: tenants/graph8-eng/triggers.yaml — change g8-issues-5xx-error entry from polling to webhook
Done when: a test issue with 5xx-error label produces a Task CR within 60 seconds.
26

Run the day-7 acceptance check (§ below)

8 metrics. 6 green = shipped. Walk the list, run each verification command, mark green/red.

human1 hrparallel
Done when: at least 6 of 8 metrics are verifiably green.
27

Record the 10-minute demo

Loom or screen recording. Walk through: a journey on lifecycle.html → click a stat card → drill into a skill → open the engineer-utilization dashboard with real data → show the webhook cutover latency improvement → show a closed loop (test-writer or agent_health digest).

human2 hrparallel
Output: Loom link in #engineering · share with board / hiring pipeline / Anthropic
Done when: link is in Slack and posted to Roam project page.
Day 7 review · 8 metrics

Did we ship it? 6 green = yes.

Run this checklist Sunday afternoon. If 6+ are green, declare success and start the week-2 horizon items (knowledge_compactor, contracts, bug_predictor, onboarding). If fewer, the next 7 days close the gap before adding new scope.

Day 7 metric 1
Branch protection on
git push origin main from any non-MBM machine fails.
Day 7 metric 2
Ledger ≥ 200rows / day
SELECT count(*) FROM skill_invocations WHERE ts > now() - interval '1 day'
Day 7 metric 3
Your own utilization visible
Your engineer_id appears in the Grafana panel with a grade. Local /start fires from your laptop land in the ledger within 5 min.
Day 7 metric 4
5xx-error pickup < 60 s
Webhook live for that label; test issue dispatches in <60s.
Day 7 metric 5
Skill count = 20(was 22)
Rounds 1+2 of consolidation merged.
Day 7 metric 6
qa→main auto-promote live
Workflow exists and has fired at least once.
Day 7 metric 7
Bandit blocking
continue-on-error removed from bandit job in code-quality.yml.
Day 7 metric 8
3 loops live
test-writer + agent_health + mbm_critic each have a recent run in the ledger or stats table.
Week 2 (days 8–14) · what comes next

Roll remaining labels to webhooks · ratchet ruff to blocking · ship knowledge_compactor · scaffold contract schemas for cross-repo (top 5) · ship contract_test_runner · ship bug_predictor (comment-only mode) · ship onboarding agent for first new engineer. Skill consolidation rounds 3+4. By day 14: 6/8 loops live, skill count = 14.

On this page