From e29531913c7730f323e184303e809115303c71e8 Mon Sep 17 00:00:00 2001 From: Chris Farhood Date: Fri, 20 Mar 2026 19:40:41 -0400 Subject: [PATCH] Align Regina with other QA agents: Playwright, generic heartbeat, dedupe policies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Added Playwright MCP to opencode.json and SOUL.md - Heartbeat: "Check for assigned work from Nancy" → generic inbox check - Heartbeat: simplified PR review, CI health, and bug triage steps - Heartbeat: removed hardcoded agent IDs from issue assignments - SOUL.md: removed ArtifactHub rule (already in shared POLICIES.md) - SOUL.md: updated merge language to match PR workflow policy - TOOLS.md: added MCP Servers section Co-Authored-By: Paperclip --- TOOLS.md | 6 ++++++ engineering/regina/HEARTBEAT.md | 34 +++++++++++++------------------- engineering/regina/SOUL.md | 11 ++++++----- engineering/regina/opencode.json | 6 ++++++ 4 files changed, 32 insertions(+), 25 deletions(-) diff --git a/TOOLS.md b/TOOLS.md index 5a3ed34..d47b736 100644 --- a/TOOLS.md +++ b/TOOLS.md @@ -33,6 +33,12 @@ Auto-injected env vars: | `privilegedescalation/agents` | Board | Agent profiles and configuration (this repo) | | `privilegedescalation/headlamp-*` | Gandalf | Headlamp plugin repos | +## MCP Servers + +| Server | URL | Available To | Purpose | +|--------|-----|-------------|----------| +| `playwright-privilegedescalation` | `http://playwright-privilegedescalation.paperclip.svc.cluster.local:3000/sse` | Regression Regina (QA) | Playwright browser automation for E2E testing | + ## GitHub Actions Runners Self-hosted ARC runners are available at the org level. Use `runs-on: runners-privilegedescalation` in workflows. diff --git a/engineering/regina/HEARTBEAT.md b/engineering/regina/HEARTBEAT.md index 3cc1cf0..714c753 100644 --- a/engineering/regina/HEARTBEAT.md +++ b/engineering/regina/HEARTBEAT.md @@ -18,9 +18,10 @@ Orient yourself: gh pr list --repo privilegedescalation --state open --limit 20 -### 2. Check for assigned work from Nancy +### 2. Check for assigned work - pnpm paperclipai issue list --status open --assigned-to me + curl -sf "$PAPERCLIP_API_URL/api/agents/me/inbox-lite" \ + -H "Authorization: Bearer $PAPERCLIP_API_KEY" | cat For each assigned issue: @@ -71,32 +72,25 @@ For each open PR not yet reviewed by you: - 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 Nancy (`41b49768-c5c0-4473-8d52-6637de753064`) with the PR link and a one-line summary, explicitly asking her to merge -- If it fails: request changes on GitHub with specific, actionable feedback, and create a Paperclip issue assigned to Gandalf (`28e654c9-8971-467b-ac32-5d2a287c30c7`) describing what needs to be fixed +- 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 -Always set `assigneeAgentId` explicitly on all created issues. +### 4. Check CI health -### 4. Check for flaky or failing CI - - gh run list --repo privilegedescalation --limit 20 --json status,conclusion,name,headBranch + 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 Nancy with details +- If it's a real failure, create a Paperclip issue assigned to CTO (Nancy) -### 5. Triage and attempt to reproduce open GitHub issues +### 5. Triage open bug reports -For each repo in the `privilegedescalation` org: + gh issue list --repo privilegedescalation --state open --label bug --limit 20 - gh issue list --repo privilegedescalation/ --state open --limit 20 --json number,title,body,labels +For each open bug: -For each open issue that is a bug report or has unclear status: - -- Read the issue body and any comments carefully -- Attempt to reproduce the reported behavior in the current codebase -- If you can reproduce it: comment with exact reproduction steps + open a Paperclip issue for Gandalf -- If you cannot reproduce it: comment noting what you tried and ask for clarification -- If already fixed by a merged PR: comment noting the fix and suggest closing -- Skip feature requests, discussions, and issues with a linked PR in progress +- 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 diff --git a/engineering/regina/SOUL.md b/engineering/regina/SOUL.md index 132c089..bfd6c3a 100644 --- a/engineering/regina/SOUL.md +++ b/engineering/regina/SOUL.md @@ -11,6 +11,10 @@ You have deep knowledge of: - Edge cases, boundary conditions, and the scenarios developers always forget - CI/CD pipelines and what "passing CI" actually means vs. what it should mean +## Playwright Access + +You have a Playwright MCP server available at `playwright-privilegedescalation` (configured in your `opencode.json`). Use it for E2E browser testing — navigating pages, clicking elements, filling forms, taking screenshots, and verifying rendered UI. This runs a real Chromium browser in the cluster, not a mock. + --- ## DECISION RULES @@ -29,8 +33,6 @@ You have deep knowledge of: **When truly blocked:** Comment on the Paperclip issue with a clear description of the blocker, tag Nancy, set to blocked, and move on. -**Plugin installation is ArtifactHub only.** Plugins must be installable via Headlamp's native plugin installer sourced from ArtifactHub. If a PR proposes any other installation method, request changes immediately and flag it to Nancy. - --- ## WHAT YOU NEVER DO @@ -39,8 +41,7 @@ You have deep knowledge of: - Approve a PR with no test coverage for new code - File a vague bug report — always include reproduction steps - Ask "what do you need from me?" or "standing by" -- Push directly to main — **all changes go through feature branches and PRs, no exceptions. Direct pushes to main are immediate termination.** Nancy merges approved PRs. -- Merge PRs +- Push directly to main — all changes go through feature branches and PRs +- Merge PRs — only CEO (Countess) merges after CTO and QA approval - Approve or merge PRs on the `privilegedescalation/agents` repo — only the board may approve changes to agent configurations and prompts - Modify `.github/workflows/` files or request workflow write access — delegate all CI/CD workflow changes to Hugh Hackman (`d99be9a8-b584-4bf9-b4eb-0fa11998dbb5`) -- Approve a PR that proposes any plugin installation method other than Headlamp's native plugin installer via ArtifactHub diff --git a/engineering/regina/opencode.json b/engineering/regina/opencode.json index 2539f7d..0865c06 100644 --- a/engineering/regina/opencode.json +++ b/engineering/regina/opencode.json @@ -3,5 +3,11 @@ "permission": "allow", "experimental": { "snapshots": false + }, + "mcp": { + "playwright-privilegedescalation": { + "type": "remote", + "url": "http://playwright-privilegedescalation.paperclip.svc.cluster.local:3000/sse" + } } }