Repository navigation
Closed
Labels
dev-leadFor dev-lead agent pickupFor dev-lead agent pickupinitiativeEpic / initiative tracking issueEpic / initiative tracking issue
Description
Story
As a maintainer of the org's review automation,
I want an explicit artifact contract and a rubric registry with pr_diff as the only registered type,
so that the reviewer's logic can later be reused for plans and skills without forking it three ways.
Acceptance Criteria
- A documented artifact contract specifies the four fields {artifact_type, content_ref, rubric, output_channel}, their meaning, and allowed values.
- A versioned rubric-registry manifest maps each artifact_type to its rubric source and output_channel; only pr_diff is registered.
- The pr_diff registry entry references the existing prompts cascade (triage.md -> deep-review.md -> synthesize.md) and the inline-PR-review output channel (post-pr-review.sh) with no behavior change.
- The registry and helper are covered by the global CODEOWNERS rule and documented in a README adjacent to them and linked from AGENTS.md.
- shellcheck passes on touched scripts and no existing test changes are required (scaffolding only).
Tasks / Subtasks
- Add a rubric-registry manifest plus a sourced lookup helper that resolves an artifact_type to its {rubric, output_channel}; register only pr_diff, resolving to the existing cascade. (AC: Go-live improvements for PR review agent #2, Add @claude delegation, auto-merge, and rebase handling #3)
- Place the helper at scripts/lib/review-registry.sh (#!/usr/bin/env bash, set -euo pipefail).
- pr_diff entry points at prompts/triage.md, prompts/deep-review.md, prompts/synthesize.md and the post-pr-review.sh output channel.
- Document the contract fields and registry format in a README next to the registry and link it from AGENTS.md. (AC: test issue from agent #1, Optimize review: small-PR and incremental fast paths #4)
- Run shellcheck on touched scripts and confirm no change to the production PR path. (AC: feat: add Copilot engine support via REVIEW_ENGINE toggle #5)
Dev Notes
- The current PR 'rubric' is the prompt cascade in prompts/: triage.md (Tier 1), deep-review.md (Tier 2), rubber-duck.md + synthesize-duck.md (cross-engine adversarial), synthesize.md (merge + act), security-audit.md (Tier 3), shared.md (risk taxonomy), single-review.md, cascade-action.md. The pr_diff registry entry must reference this cascade, not copy it.
- The current PR 'output channel' is GitHub inline review comments + an approve/escalate review, implemented in scripts/post-pr-review.sh (posts via
gh pr review, dismisses stale reviews, escalates via scripts/request-codeowners-review.sh). Treat that as the pr_diff output_channel. - Model/engine routing lives in scripts/engine.sh (set_engine_config maps engine->tier models; run_triage/run_agentic/run_duck invoke tiers). The contract is an input-adapter/registry layer ABOVE engine.sh — do not change engine routing here.
- Keep this story strictly additive and scaffolding-only: pr_diff is the sole registered type and must resolve to today's behavior. Do not edit the cascade prompts themselves.
- Standards: scripts must be
#!/usr/bin/env bash+set -euo pipefailand pass shellcheck (AGENTS.md Scripts); the global CODEOWNERS rule* @petry-projects/org-leadsalready gates everything, so the registry is CODEOWNER-gated by default.
Project Structure Notes
Put the shell helper in scripts/lib/ alongside engine.sh/review-one-pr.sh orchestration, with a sibling README. Keep prompts/ for rubric content only (the cascade), not for the registry wiring.
References
- prompts/triage.md
- prompts/deep-review.md
- prompts/synthesize.md
- prompts/shared.md
- scripts/engine.sh#set_engine_config
- scripts/review-one-pr.sh
- scripts/post-pr-review.sh
- AGENTS.md#scripts
- .github/CODEOWNERS
Likely target surface
scripts/lib/review-registry.shAGENTS.mdprompts/
Story prepared by the BMAD Scrum Master (Bob) for epic #610. Status: ready-for-dev.
Metadata
Metadata
Assignees
Labels
dev-leadFor dev-lead agent pickupFor dev-lead agent pickupinitiativeEpic / initiative tracking issueEpic / initiative tracking issue
Activity
don-petry commentedon Jun 12, 2026
Dev-Lead Implementation Plan
Issue: #611 — [Phase 1] Define the review artifact contract + rubric registry (pr_diff sole type)
Scope
Add an additive, scaffolding-only artifact contract + versioned rubric-registry manifest with a sourced lookup helper that resolves an
artifact_typeto its{rubric, output_channel}; register onlypr_diff, resolving to today's prompt cascade and inline-PR-review output channel with no behavior change.Implementation Checklist
scripts/lib/review-registry.tsv— versioned manifest (schema_version + one row per artifact_type). Register onlypr_diff→ rubricprompts/triage.md,prompts/deep-review.md,prompts/synthesize.md, output_channelscripts/post-pr-review.sh.scripts/lib/review-registry.sh— sourced lookup helper (#!/usr/bin/env bash,set -euo pipefail) reading the manifest: version, list types, resolverubric/output_channelfor an artifact_type; non-zero on unknown type/field. Data-in-manifest pattern mirrors model-pricing.{sh,tsv}.scripts/lib/README.md— document the 4-field artifact contract{artifact_type, content_ref, rubric, output_channel}(meaning + allowed values) and the registry manifest format. Adjacent to the registry.AGENTS.md— link the new README from the Scripts section..github/workflows/lint.yml— registertests/test_review_registry.batsin the bats list (per AGENTS.md repo-specific test extension note).Tests to Write
tests/test_review_registry.bats— version is reported;pr_diffis the sole registered type;rubricresolves to the triage→deep-review→synthesize cascade;output_channelresolves toscripts/post-pr-review.sh; unknown artifact_type and unknown field both fail non-zero; referenced rubric + output_channel files exist on disk (proves no-fork reference to today's cascade).Test Command
bats tests/test_review_registry.bats(full suite: thebatslist in.github/workflows/lint.yml); lint viabash .dev-lead/scripts/dev-lead-lint.sh.Notes
Strictly additive scaffolding — does not touch engine.sh routing or the cascade prompts; production PR path (review-one-pr.sh) is unchanged.
don-petry commentedon Jun 12, 2026
Dev-Lead: Implementation Complete
Plan Execution
scripts/lib/review-registry.tsv(schema_version: 1;pr_diffis the sole registered type).scripts/lib/review-registry.sh(#!/usr/bin/env bash,set -euo pipefail) resolving anartifact_typeto its{rubric, output_channel}.pr_diffresolves to the existing cascade (prompts/triage.md,prompts/deep-review.md,prompts/synthesize.md) and the inline-PR-review output channel (scripts/post-pr-review.sh) — no behavior change.{artifact_type, content_ref, rubric, output_channel}and the manifest format inscripts/lib/README.md(adjacent to the registry).AGENTS.md(Scripts section).tests/test_review_registry.batsin the.github/workflows/lint.ymlbats list.review-one-pr.sh,engine.sh) untouched.Test Results
Files Changed
scripts/lib/review-registry.tsv(new): versioned manifest mappingartifact_type->rubric,output_channel. Onlypr_diffregistered.scripts/lib/review-registry.sh(new): sourced helper —review_registry_version,review_registry_types,review_registry_lookup <type> <field>(exit 1 unknown type, 2 missing/unknown field).scripts/lib/README.md(new): artifact contract field table + manifest/helper docs; notes CODEOWNERS coverage.AGENTS.md: new "Review artifact contract & rubric registry" subsection linking the README..github/workflows/lint.yml: addedtests/test_review_registry.batsto the bats list.tests/test_review_registry.bats(new): 10 unit tests.Notes
engine.shrouting or the cascade prompts; no existing test changed (TDD applied — the new helper is the only behavior under test).* @petry-projects/org-leads(.github/CODEOWNERS), so they are CODEOWNER-gated by default (AC Optimize review: small-PR and incremental fast paths #4).tests/test_batch_fallback.bats(Gemini->Copilot engine fallback); it is not in the CI bats list and is untouched by this change.feat: implement issue #611 — [Phase 1] Define the review artifact con…
feat: implement issue #611 — [Phase 1] Define the review artifact con…
feat: implement issue #611 — [Phase 1] Define the review artifact con…
feat: implement issue #611 — [Phase 1] Define the review artifact con…
feat: implement issue #611 — [Phase 1] Define the review artifact con…
feat: implement issue #611 — review artifact contract + rubric regist…