Skip to content

Add core clinical-RAG review subagents#599

Merged
BigSimmo merged 2 commits into
mainfrom
claude/subagents-clinical-rag-uqa5aa
Jul 13, 2026
Merged

Add core clinical-RAG review subagents#599
BigSimmo merged 2 commits into
mainfrom
claude/subagents-clinical-rag-uqa5aa

Conversation

@BigSimmo

Copy link
Copy Markdown
Owner

Summary

  • Scaffold six project-level Claude Code subagents under .claude/agents/ (a new directory — none existed before). Each is scoped to a high-churn / high-risk surface and encodes the repo's documented gotchas so they stop being re-derived each session.
  • All six are read-only (tools: Read, Grep, Glob, Bash), inherit the AGENTS.md review-throttling protocol + docs/codex-review-protocol.md, and defer every provider-touching command for confirmation rather than running it — so auto-dispatch can't trip the provider boundary.
  • Roster (model tier): rag-retrieval-reviewer (opus) — local-eval trap, gpt-5.5 token/effort starvation, no-reindex-without-a-golden-miss; supabase-schema-guardian (opus) — correct project ref, no live raw SQL, fail-closed tenancy, key confinement / RLS / SECURITY DEFINER; clinical-governance-reviewer (opus) — runs the Clinical Governance Preflight, grounded-evidence fidelity, fail-closed clinical behavior; ingestion-worker-reviewer (sonnet) — job-queue concurrency/recovery, atomic reindex commit, index-quality gate integrity; frontend-ui-reviewer (sonnet) — composer placement invariants, @theme tokens, a11y; verification-router (sonnet) — gate-pyramid selection + provider boundary.

Docs/config only — no source, schema, or runtime behavior changes.

Verification

  • Frontmatter validated (unique kebab-case name, description, tools, model parse cleanly for all six)
  • Prettier-formatted to satisfy the pre-push format guard
  • npm run verify:pr-local — not run; the change is Markdown-only under .claude/agents/ (outside the ESLint/TS/build source scope), so no code gate applies. Available to run on request.

No retrieval/answer/UI/Supabase/deployment behavior changed, so the retrieval-eval, answer-eval, production-readiness, and UI gates are not applicable.

Clinical Governance Preflight

This PR does not touch ingestion, answer generation, search/ranking, source rendering, document access, privacy, production env, or clinical output — it adds reviewer configuration only. Acknowledged for completeness:

  • Source-backed claims still require linked source verification before clinical use — unchanged (no answer-path change)
  • No patient-identifiable document workflow was introduced or expanded — none touched
  • Supabase target remains Clinical KB Database (sjrfecxgysukkwxsowpy) — unchanged; the guardian agent hard-codes this ref and flags the stale one
  • Service-role keys and private document access remain server-only — unchanged
  • Demo/synthetic content remains clearly separated from real clinical sources — unchanged
  • Source metadata, review status, and outdated/unknown-source behavior remain conservative — unchanged
  • Deployment classification/TGA SaMD impact — n/a; no clinical decision-support behavior changed

Notes

  • The agents are advisory reviewers: their bodies restate existing AGENTS.md / docs/ rules for auto-dispatch; they enforce the same provider-confirmation boundary rather than relaxing it.
  • src/lib/env.ts is intentionally referenced by both the RAG and Supabase agents (it holds both RAG_PROVIDER_MODE/reasoning config and SUPABASE_SERVICE_ROLE_KEY).

🤖 Generated with Claude Code


Generated by Claude Code

claude added 2 commits July 13, 2026 14:49
Scaffold six project-level Claude Code subagents under .claude/agents/,
each scoped to a high-churn/high-risk surface and encoding the repo's
documented gotchas so they stop being re-derived each session:

- rag-retrieval-reviewer: local-eval trap, gpt-5.5 token/effort
  starvation, no-reindex-without-a-golden-miss.
- supabase-schema-guardian: correct project ref, no live raw SQL,
  fail-closed tenancy, key confinement / RLS / SECURITY DEFINER.
- clinical-governance-reviewer: runs the clinical governance preflight,
  grounded-evidence fidelity, fail-closed clinical behavior, privacy.
- ingestion-worker-reviewer: job-queue concurrency/recovery, atomic
  reindex commit, index-quality gate integrity.
- frontend-ui-reviewer: composer placement invariants, design tokens,
  accessibility.
- verification-router: gate-pyramid selection + provider-confirmation
  boundary.

All are read-only (Read/Grep/Glob/Bash), inherit the AGENTS.md review
throttling protocol, and defer provider-touching commands for
confirmation rather than running them.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C2UrfPZrLNp8YhGZ6iqaui
Satisfy the pre-push format guard (blank lines around headings/lists).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C2UrfPZrLNp8YhGZ6iqaui
@supabase

supabase Bot commented Jul 13, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: fdd51756-5cdb-4773-a40b-6cb949f97e3e

📥 Commits

Reviewing files that changed from the base of the PR and between e8330b2 and 56dbfa3.

📒 Files selected for processing (6)
  • .claude/agents/clinical-governance-reviewer.md
  • .claude/agents/frontend-ui-reviewer.md
  • .claude/agents/ingestion-worker-reviewer.md
  • .claude/agents/rag-retrieval-reviewer.md
  • .claude/agents/supabase-schema-guardian.md
  • .claude/agents/verification-router.md

📝 Walkthrough

Summary by CodeRabbit

  • Documentation
    • Added specialized review guidance for clinical governance, frontend UI, ingestion, retrieval, database schema, and verification workflows.
    • Documented review scopes, validation checklists, safety requirements, and provider-access boundaries.
    • Added routing guidance for selecting appropriate verification checks based on the area changed.

Walkthrough

Added six Claude agent guides under .claude/agents/, covering verification routing and specialized review protocols for clinical governance, frontend UI, ingestion, RAG retrieval, and Supabase schema changes.

Changes

Review Guidance Agents

Layer / File(s) Summary
Verification routing and provider boundaries
.claude/agents/verification-router.md
Documents offline-safe gates, provider-confirmation requirements, and routing rules based on changed repository surfaces.
Domain-specific review protocols
.claude/agents/clinical-governance-reviewer.md, .claude/agents/ingestion-worker-reviewer.md, .claude/agents/rag-retrieval-reviewer.md, .claude/agents/supabase-schema-guardian.md
Adds scoped review checklists for clinical safety and privacy, ingestion concurrency and indexing, RAG evaluation and retrieval quality, and Supabase tenancy and security controls.
Frontend UI review protocol
.claude/agents/frontend-ui-reviewer.md
Adds frontend review scope, UI verification commands, search placement checks, design-token requirements, and accessibility checks.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • BigSimmo/Database#443: Introduced or defined review-document and ledger/workflow conventions referenced by these agent guides.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/subagents-clinical-rag-uqa5aa
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch claude/subagents-clinical-rag-uqa5aa

Comment @coderabbitai help to get the list of available commands.

@BigSimmo
BigSimmo marked this pull request as ready for review July 13, 2026 14:55
@BigSimmo
BigSimmo merged commit 359203b into main Jul 13, 2026
15 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants