Skip to content

[Phase 1] Define the consumer manifest + validator (shared-surface to consumers map) #728

Description

@github-actions

Story

As a pr-review maintainer,
I want commit a versioned consumer-manifest.json that enumerates each consumer repo and, per shared surface (reusable workflow path, scripts/lib/ library, prompts/ file), which consumers depend on it, plus a validator that keeps it well-formed,
so that downstream-impact detection has a single, ground-truthed source of truth to map changed files to impacted consumers.

Acceptance Criteria

  1. A committed consumer-manifest.json lists each consumer repo (owner/name) and a surfaces map keyed by a .github-private path (e.g. .github/workflows/pr-review.yml, scripts/lib/ci-status.sh, prompts/triage.md) to the list of consumer repos that reference it.
  2. The manifest's consumer set is grounded in the repo's authoritative release strategy, not guessed: each listed consumer is justified by a citation (the ring listing in docs/initiatives/agentic-release-strategy.md and/or the pr-review.yml consumer references), and any consumer whose dependency could not be confirmed is recorded under an explicit unverified field rather than asserted.
  3. A JSON Schema (consumer-manifest.schema.json) constrains the manifest shape (required keys, string formats for owner/name, surface paths relative to repo root) and a validator script exits non-zero with a clear message on a malformed manifest, unknown top-level keys, or a surface path that does not resolve in the working tree.
  4. Every surface path listed in the manifest resolves to an existing file in .github-private (no dangling surface entries).
  5. A bats test covers: a valid manifest passes; a malformed manifest (missing required key) fails; a manifest naming a non-existent surface path fails.

Tasks / Subtasks

Dev Notes

  • Source of truth for the consumer set: docs/initiatives/agentic-release-strategy.md lists consumers as bmad-bgreat-suite, google-app-scripts, markets, ContentTwin; the discussion text lists Broodly, TalkTerm, markets, google-app-scripts. These DISAGREE — do not silently pick one. Ground each listed consumer in a citation; park anything unconfirmed under unverified. See open_questions.
  • Shared surfaces to enumerate: (a) first-party reusable workflows consumers pin to (e.g. pr-review.yml, the dev-lead reusable, ci-failure-analyst-reusable.yml); (b) libs under scripts/lib/ (e.g. ci-status.sh, review-cycle.sh, advisory-review-gate.sh); (c) consumer-facing prompt files under prompts/. Only list a surface if a consumer plausibly references it.
  • Validation pattern to mirror: scripts/initiative-planner/validate-plan.py (structural JSON-Schema check + extra semantic invariants) and its registration in lint.yml. Prefer a small, dependency-light validator; the lint job already installs jsonschema>=4.
  • Testing standard: bats tests live in tests/ and MUST be added to the explicit list in .github/workflows/lint.yml's Run tests step or they never run in CI. Model after tests/test_oversized_pr.bats (setup + run + status assertions). Lint runs shellcheck --severity=warning -x over shell files — honor # shellcheck source=... directives.
  • Keep the manifest minimal and declarative; richer per-surface metadata (e.g. which consumer file references it) is added by Story 3 only if needed for the fetch.

Project Structure Notes

No existing consumer manifest or deploy workflow exists in this repo (the consumer-facing deploy lives elsewhere per the release-strategy doc). Place the manifest + schema + validator under a clear home (scripts/pr-review/ recommended, parallel to scripts/initiative-planner/). This is the data foundation for the entire epic.

References

  • docs/initiatives/agentic-release-strategy.md#1-executive-summary
  • .github/workflows/pr-review.yml
  • scripts/lib/ci-status.sh
  • scripts/initiative-planner/validate-plan.py
  • .github/workflows/lint.yml#Run-tests
  • tests/test_oversized_pr.bats

Likely target surface

  • scripts/pr-review/consumer-manifest.json
  • scripts/pr-review/consumer-manifest.schema.json
  • scripts/pr-review/validate-consumer-manifest.sh
  • tests/test_consumer_manifest.bats
  • .github/workflows/lint.yml

Story prepared by the BMAD Scrum Master (Bob) for epic #727. Status: ready-for-dev.

Metadata

Metadata

Assignees

No one assigned

    Labels

    initiativeEpic / initiative tracking issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions