/thebous-os:review-pr-multiharnessfrom thebous-os
Reviews GitHub pull requests with risk-proportional specialist coverage, multi-harness validation, and provider-neutral subagents.
Ships in thebous-os. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Review the change, not the author. Optimize for a merge decision that can be defended in production with the least unnecessary reviewer effort.
Use gh pr view to get the PR metadata:
gh pr view --json number,title,body,author,headRefName,baseRefName,additions,deletions,changedFiles,headRefOid
Follow references/task-context.md with:
<SOURCES> = the PR head branch, then the PR title and body;<REQUIRED> = optional;<DETAILS> = full.Resolve the provider-neutral task reference and normalized task when available;
A Jira or Notion task may be linked from the branch, PR title, or PR body;
store TASK_REF, TASK_JSON, TASK_REQUIREMENTS, and the provider source link
for the review. Jira and Notion are independent providers: if
no task is found or the selected provider is unavailable, continue and record
the exact coverage gap; do not invent a task. If Jira and Notion references are
both present, stop and ask which one is the source of truth. If no PR is open on
the current branch, ask the user for the PR number or URL.
Use the shared resolver for each candidate and keep only one unambiguous result:
source "scripts/helpers.sh"
TASK_REF=$(resolve_work_item_ref "<branch, title, or body candidate>" 2>/dev/null || true)
Identify the PR URL/number, branch, or local base. Do not switch branches or mix a remote PR diff with unrelated workspace files. Capture base/head refs, changed and untracked paths, PR title/description/commits/prior comments, applicable standards, generated files, and any plan or acceptance criteria.
Read the PR description before the diff. Expect GitHub's Summary / Test
plan format (or the repository's .github/PULL_REQUEST_TEMPLATE.md /
CONTRIBUTING.md if present): filled sections whose claims match the
diff, with no leftover placeholders.
When a task reference is present in the branch, title, or body, expect the
provider reference and concrete task title in the PR context. Preserve the
existing [KEY] <ticket title> convention for Jira; for Notion, retain the
resolved page reference. Otherwise a non-placeholder title is enough. A
description that still contains template comments, an empty Summary / Test
plan, or claims that contradict the diff is incomplete intent; record it
in Coverage and raise it as IMPORTANT when CONTRIBUTING.md forbids
placeholders or requires the body to match the diff.
Infer problem, solution, non-goals, tests, configuration, migrations, rollout, risks, and follow-ups from the description and the diff. If intent is incomplete, mark uncertainty; do not block on a question unless the contributing rules make the missing section a merge requirement.
Always compute a danger score before dispatching subagents. Score every axis from 0 to 5:
| Axis | 0 | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|---|
| Impact | cosmetic | isolated | user-visible | important workflow | business-critical | safety/financial/legal critical |
| Blast radius | isolated | one module | several callers | shared service | cross-system | platform-wide/public |
| Irreversibility | trivial revert | easy revert | deploy revert | data/config rollback | difficult migration | destructive/permanent |
| Boundary sensitivity | none | local state | internal API | external API/auth | secrets/permissions | money/PII/security |
| Behavioral uncertainty | obvious | low | some edge cases | complex state | concurrency/retry | unknown/underspecified |
| Verification gap | strong proof | minor gap | partial tests | missing case | weak gates | silent-pass risk |
danger_score = sum(axis scores), from 0 to 30. Apply these overrides:
The score is not the number of subagents. The number is always between 0 and 10; no case may generate more than ten subagents.
| Score | Classification | Subagents | Treatment |
|---|---|---|---|
| 0–4 | minimal | 1 | main reviewer + automated checks |
| 5–8 | low | 2 | correctness or standards |
| 9–12 | moderate | 3 | correctness + tests/risk lens |
| 13–16 | significant | 4 | relevant security/API/reliability/performance lens |
| 17–20 | high | 5 | specialist coverage + explicit residual risk |
| 21–23 | very high | 6 | domain, adversarial, rollout/rollback |
| 24–27 | critical | 7 | independent second-harness review when useful |
| 28–29 | extreme | 9 | multi-harness review + human walkthrough |
| 30 | extreme | 10 | maximum specialist coverage + multi-harness review + human walkthrough |
The count is a ceiling, not a reason to create irrelevant work. Keep one subagent per distinct lens; merge overlapping lenses. A small diff with high blast radius gets the high-risk roster.
Always run correctness. Add only lenses justified by the diff:
standards: repository instructions and conventions;tests: changed tests, behavior changes, mocks, fixtures, or test gaps;maintainability: large/structural diff, abstractions, coupling, moves, types;security: auth, permissions, input, secrets, privacy, crypto;api-contract: routes, serializers, schemas, public types, versioning;performance: queries, caching, transforms, async, bundle/runtime cost;reliability: retries, timeouts, queues, background work, partial failure;data-migration: migrations, schema artifacts, backfills, destructive changes;deployment: rollout, rollback, feature flags, observability;adversarial: abuse cases, false confidence, downstream breakage, hidden behavior;agent-native: changed skills, prompts, tools, agents, MCP, or harness behavior;previous-feedback: existing PR comments needing resolution/revalidation;Select the additional lenses below only when the diff exposes the named
surface. Rank candidates before dispatching: (1) irreversible, security,
legal, or data-loss risk; (2) direct coverage of changed code; (3) blast radius;
(4) verification gap. If candidates exceed the score ceiling, run the highest
ranked distinct lenses and record the skipped ones in Coverage.
observability: logs, metrics, traces, dashboards, alerts, or SLO signals;production-readiness: health checks, deadlines, retries, startup/shutdown, or SLO-sensitive behavior;resource-management: memory, file descriptors, sockets, threads, pools, or cleanup paths;data-integrity: ACID boundaries, consistency, idempotent writes, invariants, or duplicate/out-of-order events;database-schema: DDL, indexes, constraints, schema migrations, or online/zero-downtime changes;idempotency: retry keys, deduplication, at-least-once delivery, or repeated side effects;backwards-compatibility: changed consumers, versions, deprecations, or old/new coexistence;rollback-strategy: feature flags, graceful degradation, rollback, roll-forward, or recovery gates;accessibility: UI interaction, semantics, keyboard flow, focus, contrast, or assistive technology;compliance: GDPR/PII, retention, consent, auditability, SOX-relevant control evidence, or regulated data;dependency-supply-chain: dependency manifests, lockfiles, build provenance, plugins, or third-party code;secrets-vault: credentials, tokens, keys, secret stores, rotation, or secret exposure in logs/config;concurrency: shared mutable state, parallel tasks, locks, atomics, ordering, races, or deadlocks;distributed-systems: network partitions, quorum/consensus, cross-service state, sagas, or message delivery;regression-testing: changed behavior, bug fixes, edge cases, state combinations, or both flag states;integration-testing: cross-module/service/database boundaries, adapters, or real dependency behavior;chaos-engineering: resilience behavior that needs fault injection, degraded dependencies, or recovery proof;feature-flag: flag evaluation, rollout targeting, lifecycle, cleanup, or enabled/disabled behavior;api-contract-testing: consumer/provider interactions, OpenAPI or message contracts, or compatibility gates;schema-evolution: serialized/event/database schema changes, versioning, or forward/backward compatibility;caching-strategy: cache keys, invalidation, freshness, TTL, eviction, or stampede risk;latency: P95/P99 paths, async boundaries, batching, N+1 queries, or tail-latency regressions;energy-efficiency: polling, compute intensity, algorithmic work, payloads, or device/server energy use;resource-proportionality: lazy loading, memoization, bounded work, allocation, or over-fetching;disaster-recovery: backups, restore, failover, replication, RTO/RPO, or recovery-region readiness;incident-response: runbooks, diagnostics, escalation, containment, or incident telemetry;documentation: API docs, runbooks, ADRs, operational notes, or user-visible behavior documentation.Coalesce overlapping candidates instead of dispatching duplicates: migration and schema lenses; reliability, production-readiness, and observability; tests, regression, integration, and API-contract testing; deployment, rollback, feature flags, disaster recovery, and incident response; security, secrets, dependencies, and compliance; performance, latency, resource, resource-proportionality, and energy; correctness, integrity, idempotency, concurrency, and distributed systems. Keep the most specific lens and give it the shared evidence needed to cover the overlap.
For a silent-pass mechanism, always include adversarial regardless of line
count. Do not run irrelevant specialists just to fill the quota.
Before dispatch, load the matching prompt from
references/reviewer-prompts/. Every selected
subagent must receive exactly one lens prompt, plus the shared review scope,
intent, relevant paths, diff, standards, and the structured output contract.
Do not dispatch a generic “review the PR” prompt. If a stack-specific lens is
selected, specialize stack-specific.md with the runtime/framework evidence
from the diff and name the concrete concern being checked.
fast: small, low-risk, deterministic lens;standard: normal correctness, tests, standards, maintainability;deep: security, data, API, reliability, performance, migrations;independent: adversarial pass from a separate harness or context.Treat observability, production readiness, resource management, accessibility,
testing, feature flags, and documentation as standard by default. Treat data
integrity, schema, idempotency, compatibility, supply chain, secrets,
concurrency, distributed systems, compliance, chaos, API contracts, disaster
recovery, and incident response as deep when their trigger is present.
For scores 0–8 use fast/standard. For 9–20 use standard plus relevant deep lenses. For 21+ add an independent reviewer only when the risk justifies it. For 24+ prefer an independent second-harness pass, but keep the total at seven or fewer unless the score is 28–30. If no second harness is available, run adversarial locally and disclose the fallback. Never let a closed loop of agents approve itself.
Before dispatching, read
../../references/subagent-dispatch.md in full.
It defines how to detect and use the active host's subagent primitive. Do not
claim that subagents are unavailable merely because the skill is provider
neutral: first try the host adapter described there.
Read ../../references/review-evidence-contract.md
before dispatching and again during synthesis. It defines the shared evidence
standard for every candidate finding.
Give each subagent only the relevant scope, intent, paths, diff, standards, the selected lens prompt, and the shared JSON output contract. Keep reviewers independent: do not include another reviewer's findings in the initial prompt. Dispatch the materialized roster concurrently when the host supports it, respect its active-agent cap, and collect every result before synthesis. If the host has no supported subagent primitive, run the same roster sequentially and record the degraded path.
Each reviewer returns structured findings with:
severity, category, title, file, line, evidence, impact,
suggested_fix, confidence, requires_verification, scope,
preconditions, execution_path, reproduction_or_failing_test,
requirement, validation_status.
Reviewers may return candidates, but the synthesis stage must assign exactly one
validation_status: confirmed, coverage-gap, question, out-of-scope, or
duplicate. Only confirmed candidates may become P0–P2 findings.
Use P0 for critical breakage/security/data loss, P1 for high-impact defects
or broken contracts, P2 for meaningful edge/performance/maintainability
issues, and P3 for narrow advisory improvements.
For AI-assisted changes, inspect the test diff early. Look for removed or weakened assertions, tautological tests, duplicated patterns, invented APIs, missing configuration, and code the author cannot explain.
Apply ../../references/review-evidence-contract.md
to every candidate. A candidate without an exact changed-line anchor cannot be
confirmed; assign coverage-gap and keep it out of Actionable Findings.
Only confirmed candidates may become P0-P2 findings.
For P0/P1 candidates and all security or correctness candidates, use an independent verifier or a separate context when available. The verifier must try to disprove the candidate, not merely repeat it. If independent review is unavailable, run the adversarial check locally and disclose the degraded path.
Deduplicate confirmed candidates by root cause. Prefer one fix at the shared source over guards in every caller. Never manufacture comments to appear thorough or to satisfy a comment quota.
Write comments that state behavior, risk, and action. Prefix them with
BLOCKER, IMPORTANT, SUGGESTION, QUESTION, or PRAISE; mark suggestions
as non-blocking. Finish with:
Actionable Findings: numbered P0–P2 findings with file:line and confidence;Coverage: scope, score, classification, subagents run, skipped lenses and reasons, checks;Verdict: Not ready, Ready with fixes, or Ready to merge;Residual risk: what was not verified and why.If no candidates reach confirmed, write Actionable Findings: none. Put
unverified concerns in Coverage or Residual risk, not in the actionable
finding list.
Approve only when you can defend the change as if you owned its production behavior. Applying fixes requires an explicit user instruction.
The default remains report-only. Never post to GitHub merely because the review is complete. When publication is explicitly authorized, first verify the PR number, repository, head SHA, and that every finding was introduced by the PR. Re-read the complete affected file and anchor comments only to lines inside the current diff hunk.
Use the posting format in github-posting.md:
request-changes when at least one Must fix before merge finding is
present; otherwise use a comment review. Omit discretionary P3 findings
from GitHub and mention them only in the local verdict.suggestion block only for a small, self-contained change
on the anchored lines. For coordinated changes or test additions, explain
the direction without pretending the snippet is directly committable.After posting, report the review state, number of inline comments, skipped P3 items, and any findings that could not be anchored to the diff. Do not merge, push, or apply fixes unless separately authorized.
Read review-lenses.md when selecting lenses, scoring difficult changes, or checking the final report.
Read subagent-dispatch.md before Stage 7; it is the host-adapter and collection contract for local reviewer subagents.
references/github-posting.md (opens in a new tab)references/review-lenses.md (opens in a new tab)references/reviewer-prompts/accessibility.md (opens in a new tab)references/reviewer-prompts/adversarial.md (opens in a new tab)references/reviewer-prompts/agent-native.md (opens in a new tab)references/reviewer-prompts/api-contract-testing.md (opens in a new tab)references/reviewer-prompts/api-contract.md (opens in a new tab)references/reviewer-prompts/backwards-compatibility.md (opens in a new tab)references/reviewer-prompts/caching-strategy.md (opens in a new tab)references/reviewer-prompts/chaos-engineering.md (opens in a new tab)references/reviewer-prompts/compliance.md (opens in a new tab)references/reviewer-prompts/concurrency.md (opens in a new tab)references/reviewer-prompts/correctness.md (opens in a new tab)references/reviewer-prompts/data-integrity.md (opens in a new tab)references/reviewer-prompts/data-migration.md (opens in a new tab)references/reviewer-prompts/database-schema.md (opens in a new tab)references/reviewer-prompts/dependency-supply-chain.md (opens in a new tab)references/reviewer-prompts/deployment.md (opens in a new tab)references/reviewer-prompts/disaster-recovery.md (opens in a new tab)references/reviewer-prompts/distributed-systems.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
13 skills in this plugin
/address-reviewAssess code review comments against code evidence, fix confirmed issues on your PR after user approval, reply to every comment on GitHub, and update documentation for a linked Jira or Notion task/architecture-first-developmentUse when implementing or refactoring features, bug fixes, handlers, integrations, or domain logic where architecture, maintainability, validation, errors, complexity, I/O, or over-engineering matter/create-jira-taskCreate a Jira task from a user request using the repository's fixed description format with the sections "Descrizione" and "Acceptance Criteria". Use when the user asks to create, open, or draft a new Jira task.npx claudepluginhub thebous/thebous-os --plugin thebous-osOther plugins' skills for the same job