Repository navigation
Closed
Labels
dev-leadFor dev-lead agent pickupFor dev-lead agent pickupinitiativeEpic / initiative tracking issueEpic / initiative tracking issue
Description
Story
As a pr-review maintainer,
I want a committed, validated consumer-manifest that maps each provider reusable workflow to the org repos (consumers) that pin it,
so that the downstream-impact pass has a single, machine-checkable source of truth for which changes affect which consumers.
Acceptance Criteria
- A committed manifest file (JSON) declares:
providers= [".github", ".github-private"];consumers= a list of{repo, refs}whererefsare the provider reusable-workflow paths that repo pins viauses:; andsurface_sources= per reusable-workflow path, the in-providerscripts/lib/*.shandprompts/*files it sources (exact paths). - A refresh/builder script populates
consumersempirically: it enumerates org repos and detectsuses:references to provider reusable workflows usingGH_PAT(the same token.github/workflows/pr-review.ymlalready uses), and writes the manifest deterministically (stable key ordering) so re-runs produce a clean diff. - A validator script exits non-zero on: invalid JSON/schema, a
surface_sourceskey that is not an existing reusable-workflow path in this repo, or asurface_sourcesvalue pointing at ascripts/lib/promptspath that does not exist in this repo. - A bats test (
tests/test_consumer_manifest.bats) covers: a well-formed manifest passes; a manifest referencing a non-existent local surface fails; malformed JSON fails. shellcheckpasses on every new/changed shell script.
Tasks / Subtasks
- Add the manifest file (e.g.
scripts/lib/consumer-manifest.json) with theproviders/consumers/surface_sourcesshape, seeded from docs/initiatives/agentic-release-strategy.md and an initial empirical scan. (AC: test issue from agent #1) - Add a builder/refresh script (e.g.
scripts/refresh-consumer-manifest.sh) that enumerates org repos viagh+GH_PATand detects provider-reusableuses:references, writing the manifest with stable ordering. (AC: Go-live improvements for PR review agent #2) - Add a validator (e.g.
scripts/lib/validate-consumer-manifest.shor a--validateflag) that checks schema and that every referenced local surface exists. (AC: Add @claude delegation, auto-merge, and rebase handling #3) - Add
tests/test_consumer_manifest.batsand register it in thebatsjob list in.github/workflows/lint.yml(repo-specific test-list exception per AGENTS.md). (AC: Optimize review: small-PR and incremental fast paths #4, feat: add Copilot engine support via REVIEW_ENGINE toggle #5)
Dev Notes
- Manifest is data, not code — follow the repo convention of keeping tabular/lookup data in
scripts/lib/(cf.scripts/lib/model-pricing.tsv,scripts/lib/review-registry.tsv). JSON is appropriate here because the consumer->refs relation is nested. - Providers are fixed:
.githuband.github-private(resolved in 💡 Cross-Repo Impact-Aware Review Annotations for Downstream Breakage Detection #653). Consumers are ALL org repos that pin a provider reusable — do NOT hand-curate; build empirically. The release-strategy doc names example consumers (bmad-bgreat-suite, google-app-scripts, markets, ContentTwin) but the discussion body also names Broodly/TalkTerm — the empirical scan is authoritative, not either list. - Reusable workflows are the consumer-facing surface (what a consumer
uses:).surface_sourcescaptures the single documented hop from a changed lib/prompt to the reusable(s) that source it — exact path only, no recursive graph (💡 Cross-Repo Impact-Aware Review Annotations for Downstream Breakage Detection #653: exact match). - Use
GH_PATexactly as.github/workflows/pr-review.ymldoes (GH_TOKEN: ${{ secrets.DON_PETRY_BOT_GH_PAT_CLASSIC || secrets.DON_PETRY_BOT_GH_PAT }}); the org-enumeration call needs read access across consumer repos, which that token already has. - Testing: bats is the repo standard for script behavior (see
tests/), shellcheck for lint. New bats files MUST be added to thelint.ymlbats list (AGENTS.md documents this as a repo-specific exception).
Project Structure Notes
New manifest + scripts live under scripts//scripts/lib/; new test under tests/. No changes to the cascade behavior in this story — it only introduces the data + its validator.
References
- docs/initiatives/agentic-release-strategy.md#consumers
- .github/workflows/pr-review.yml#GH_PAT
- scripts/lib/model-pricing.tsv
- scripts/lib/review-registry.tsv
- AGENTS.md#bats-test-list-exception
- .github/workflows/lint.yml#bats
Likely target surface
scripts/scripts/lib/tests/.github/workflows/lint.yml
Story prepared by the BMAD Scrum Master (Bob) for epic #748. 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 18, 2026
Dev-Lead Implementation Plan
Issue: #749 — [Phase 1] Define the consumer manifest + validator (shared-surface -> consumers map)
Scope
Add a committed, validated JSON consumer-manifest (
providers/consumers/surface_sources) plus an empirical refresh/builder script, a schema+existence validator, and a bats test wired intolint.yml.Implementation Checklist
scripts/lib/consumer-manifest.json— seededproviders(.github,.github-private), empirically-scannedconsumers({repo, refs}), andsurface_sources(per.github-privatereusable-workflow path -> the exactscripts/lib/*.sh+prompts/*it sources)scripts/lib/validate-consumer-manifest.sh— sourced lib + CLI; exits non-zero on invalid JSON/schema, asurface_sourceskey that is not an existing reusable-workflow path in this repo, or asurface_sourcesvalue not pointing at an existingscripts/lib/promptspathscripts/refresh-consumer-manifest.sh— enumerates org repos viagh+GH_TOKEN(GH_PAT), detects provideruses:references, writes the manifest deterministically (stable key + array ordering) preservingproviders/surface_sources.github/workflows/lint.yml— registertests/test_consumer_manifest.batsin thebatsjob list (repo-specific test-list exception per AGENTS.md)Tests to Write
tests/test_consumer_manifest.bats: the committed manifest passes the validatorTest Command
scripts/run-bats.sh tests/test_consumer_manifest.bats(full suite vialint.ymlbats job); lint viabash .dev-lead/scripts/dev-lead-lint.sh+shellcheckdon-petry commentedon Jun 18, 2026
Dev-Lead: Implementation Complete
Plan Execution
scripts/lib/consumer-manifest.json—providers(.github,.github-private), empirically-scannedconsumers(8 repos × pinned provider reusablerefs), and hand-seededsurface_sourcesfor the two.github-privatereusables that sourcescripts/lib/prompts(pr-review.yml,dev-lead-reusable.yml)scripts/lib/validate-consumer-manifest.sh— exits non-zero on invalid JSON, schema-shape violations, asurface_sourceskey that is not an existing reusable-workflow path in this repo, or a value not pointing at an existingscripts/lib/*.sh/prompts/*filescripts/refresh-consumer-manifest.sh— enumerates org repos viagh+GH_TOKEN(the same PATpr-review.ymluses), detects provideruses:references, writes deterministically (sorted keys, sorted/deduped refs); preservesproviders+surface_sources. Verified: re-run produces a clean (empty) difftests/test_consumer_manifest.batsin thelint.ymlbatsjob list (repo-specific test-list exception per AGENTS.md)Test Results
Verification
shellcheck --severity=warning -xclean on both new scripts.dev-lead/scripts/dev-lead-lint.sh— all checks passed (66 shell files + agent profiles)Files Changed
scripts/lib/consumer-manifest.json(new): the manifest datascripts/lib/validate-consumer-manifest.sh(new): schema + local-surface validatorscripts/refresh-consumer-manifest.sh(new): empirical consumers buildertests/test_consumer_manifest.bats(new): 12 bats cases (AC Optimize review: small-PR and incremental fast paths #4).github/workflows/lint.yml: registered the new bats fileNotes
.githuband.github-privatethemselves (they pin provider reusables —.github-privateself-hosts Ring 0).refsare stored provider-qualified (<provider>/.github/workflows/<name>.yml) so each ref's prefix maps to aprovidersentry. Stale consumer refs (e.g. TalkTerm/broodly still pinning the retiredpr-review-reusable.yml) are recorded as-pinned and are intentionally NOT existence-checked — onlysurface_sources(local surfaces) are validated.surface_sourcescaptures the single documented hop (exact paths) from a changed lib/prompt to the reusable that sources it —ci-failure-analyst-reusable.ymlis omitted because it sources noscripts/lib/promptsfiles (fully inline).feat: implement issue #749 — [Phase 1] Define the consumer manifest +…