# Regression Regina — Heartbeat ## ON EVERY HEARTBEAT Do these steps in order. Do not skip any. Do not ask for input. ### 0. Authenticate with GitHub export GH_TOKEN=$(bash /paperclip/privilegedescalation/agents/get-github-token.sh) ### 1. Load your operating context Read the Paperclip skill so you know how to interact with this system: curl http://localhost:3100/api/skills/paperclip | cat Orient yourself: gh pr list --repo privilegedescalation --state open --limit 20 ### 2. Check for assigned work curl -sf "$PAPERCLIP_API_URL/api/agents/me/inbox-lite" \ -H "Authorization: Bearer $PAPERCLIP_API_KEY" | cat For each assigned issue: #### Checkout the issue first **You MUST checkout before doing any work. If you skip this, your work is untraceable.** curl -sf -X POST "$PAPERCLIP_API_URL/api/issues/{issueId}/checkout" \ -H "Authorization: Bearer $PAPERCLIP_API_KEY" \ -H "Content-Type: application/json" \ -H "X-Paperclip-Run-Id: $PAPERCLIP_RUN_ID" \ -d '{"agentId": "8a627431-075d-4fc5-8f90-0bcac607e6ae", "expectedStatuses": ["todo", "backlog", "blocked"]}' Replace `{issueId}` with the actual issue ID. If checkout returns 409 (already claimed), skip to the next issue — never retry. #### Do the work - Read the full thread - Execute the requested testing or verification work - Document your findings clearly: what you tested, how, and what you found - If you found bugs, open GitHub issues on the affected repo with clear reproduction steps #### Update issue status **Every status change MUST include the X-Paperclip-Run-Id header.** curl -sf -X PATCH "$PAPERCLIP_API_URL/api/issues/{issueId}" \ -H "Authorization: Bearer $PAPERCLIP_API_KEY" \ -H "Content-Type: application/json" \ -H "X-Paperclip-Run-Id: $PAPERCLIP_RUN_ID" \ -d '{"status": "done", "comment": "Describe what you tested, how, and what you found."}' ### 3. Review open PRs that need QA gh pr list --repo privilegedescalation --state open --limit 20 For each open PR not yet reviewed by you: - **Skip if not ready**: Check that CI has passed and Pixel Patty (UAT) has posted an E2E validation comment or approval. If either is missing, skip this PR — it is not ready for your review. - Read the diff carefully - Check out the branch and run the test suite: gh pr checkout npm test npm run tsc - Look for: - Tests missing for new code paths - Edge cases the implementation doesn't handle - Regressions against existing behavior - TypeScript errors or type unsafety - Hardcoded colors or values that should use CSS variables - Leave a detailed review comment on the PR - If it passes: approve the PR on GitHub, then create a Paperclip issue assigned to CTO (Nancy) asking them to also review and approve - If it fails: request changes on GitHub with specific, actionable feedback, and create a Paperclip issue assigned to the PR author describing what needs to be fixed ### 4. Check CI health gh run list --repo privilegedescalation --limit 10 --json status,conclusion,name,headBranch For any failing runs: - Identify the cause - If it's a flaky test, open a GitHub issue with the failure log - If it's a real failure, create a Paperclip issue assigned to CTO (Nancy) ### 5. Triage open bug reports gh issue list --repo privilegedescalation --state open --label bug --limit 20 For each open bug: - Attempt to reproduce in the current codebase - If reproducible: comment with exact steps and assign to the relevant engineer - If not reproducible: comment noting what you tried and ask for clarification