Repository navigation
Closed
Labels
dev-leadFor dev-lead agent pickupFor dev-lead agent pickupenhancementFeature requestsFeature requestsinitiativeEpic / initiative tracking issueEpic / initiative tracking issue
Description
Story
As a fleet-repo maintainer,
I want copy a thin standards/workflows/initiative-planner.yml stub that, on idea:approved, dispatches the central planner for my repo,
so that I get idea→initiative planning without vendoring BMAD frameworks/tooling locally.
Acceptance Criteria
- A new standards/workflows/initiative-planner.yml (in the public petry-projects/.github repo) triggers on discussion:[labeled], guarded
if: github.event.label.name == 'idea:approved', copied verbatim per the org stub convention (mirrors standards/workflows/dev-lead.yml). - The stub runs the redispatch path with a target_repo argument, dispatching
gh workflow run initiative-planner.yml --repo petry-projects/.github-private -f discussion=<n> -f target_repo=<host>; redispatch.sh gains a TARGET_REPO/-f target_repo arg. - The stub documents the required dispatch secret (App token / GH_PAT_WORKFLOWS) and the idea:approved label + Ideas-category prerequisite.
- The PAT-present guard is retained (a dispatch fired with GITHUB_TOKEN never starts a run — redispatch.sh:17-22).
- tests/test_initiative_planner_redispatch.bats covers the target_repo argument (re-asserting the regression test feat: implement issue #574 — pr-review: PRs with >300 changed files hard-fail the cascade (gh pr diff 406); define org standard for oversized PRs #606 deleted).
Tasks / Subtasks
- Author standards/workflows/initiative-planner.yml as a thin discussion[labeled] caller stub in petry-projects/.github. (AC: test issue from agent #1)
- Extend redispatch.sh to accept and forward TARGET_REPO; dispatch against .github-private. (AC: Go-live improvements for PR review agent #2)
- Document the required secret, label, and category prerequisite in the stub header. (AC: Add @claude delegation, auto-merge, and rebase handling #3)
- Keep the PAT-present guard. (AC: Optimize review: small-PR and incremental fast paths #4)
- Add a redispatch bats case covering target_repo. (AC: feat: add Copilot engine support via REVIEW_ENGINE toggle #5)
Dev Notes
- Model after standards/workflows/dev-lead.yml (the existing thin caller stub) and standards/workflows/feature-ideation.yml (the existing discussion-triggered stub).
- redispatch.sh:56-58 currently dispatches
--repo "$REPO"with -f discussion/-f dry_run; add-f target_repo="$TARGET_REPO"and point --repo at the central .github-private when called from a fleet stub. - claude-code-action aborts on
discussionevent contexts, which is exactly why the redispatch bridge exists — the fleet stub must dispatch to workflow_dispatch, never plan inline (see bug(initiative-planner): claude-code-action rejectsdiscussionevents — theidea:approvedauto-trigger never plans #591/feat: implement issue #591 — bug(initiative-planner): claude-code-action rejectsdiscussionevents — theidea:approvedauto-trigger never plans #618). - The deleted-then-restored regression test (test_initiative_planner_redispatch.bats) is re-asserted here on purpose; feat: implement issue #574 — pr-review: PRs with >300 changed files hard-fail the cascade (gh pr diff 406); define org standard for oversized PRs #606 deleted it in the same diff that reverted the feature (see bug: stale-base merge (#606) silently reverted the initiative-planner discussion→dispatch fix (#618);
idea:approvedstopped planning #655).
Project Structure Notes
Spans two repos: the stub lands in public petry-projects/.github (standards/workflows/), the redispatch.sh + test changes land in .github-private. Open the stub PR against .github and the script/test PR against .github-private.
References
- standards/workflows/dev-lead.yml (petry-projects/.github)
- standards/workflows/feature-ideation.yml (petry-projects/.github)
- scripts/initiative-planner/redispatch.sh#L56-L58
- tests/test_initiative_planner_redispatch.bats
Likely target surface
standards/workflows/initiative-planner.yml (new — petry-projects/.github)scripts/initiative-planner/redispatch.shtests/test_initiative_planner_redispatch.bats
Story prepared by the BMAD Scrum Master (Bob) for epic #817. Status: ready-for-dev.
Metadata
Metadata
Assignees
Labels
dev-leadFor dev-lead agent pickupFor dev-lead agent pickupenhancementFeature requestsFeature requestsinitiativeEpic / initiative tracking issueEpic / initiative tracking issue
Activity
github-actions commentedon Jun 20, 2026
Thanks for the detailed write-up — the acceptance criteria, dev notes, and cross-repo scope are really helpful for anyone picking this up! Before implementation begins, could you clarify whether
TARGET_REPOshould be validated against an allowlist (e.g., only dispatch to repos withinpetry-projects) to prevent unauthorized cross-org dispatches, or is the PAT-scope boundary considered sufficient protection?don-petry commentedon Jun 20, 2026
Dev-Lead Implementation Plan
Issue: #820 — Per-repo caller stub + cross-repo redispatch
Scope (this repo:
.github-private)Wire the existing
target_reporedispatch regression test into CI so AC #5's guard actually runs; the redispatch.sh/test/workflowtarget_repoplumbing already landed in the merged tree.Current state assessment
redispatch.shgainsTARGET_REPO/-f target_repo): already present (scripts/initiative-planner/redispatch.sh:36,63) and consumed by the centralinitiative-planner.ymlredispatch job.initiative-planner.yml"Guard — PAT present") and documented inredispatch.sh:17-22.tests/test_initiative_planner_redispatch.batscoverstarget_repo): the test exists with both the self/default and fleet-override cases and passes locally (12/12) — but it is not listed inlint.yml's bats job, so it never runs in CI.standards/workflows/initiative-planner.ymlstub + its header docs): live in the publicpetry-projects/.githubrepo (there is nostandards/dir here). Out of scope for this repo's PR per the issue's "Project Structure Notes" — they ship in a separate PR against.github.Implementation Checklist
tests/test_initiative_planner_redispatch.batsin thebatsjob list in.github/workflows/lint.yml(AGENTS.md requires new test files be added here).Tests to Write
tests/test_initiative_planner_redispatch.batsalready asserts thetarget_repoargument (default self-path + fleet host override). This change makes that existing regression guard execute in CI.Test Command
bats tests/test_initiative_planner_redispatch.bats(and the fullscripts/run-bats.sh …list via thebatsCI job); lint viabash .dev-lead/scripts/dev-lead-lint.sh.don-petry commentedon Jun 20, 2026
Dev-Lead: Implementation Complete
Plan Execution
.github-privatestate against all five ACs.tests/test_initiative_planner_redispatch.batsin thebatsjob in.github/workflows/lint.ymlso AC feat: add Copilot engine support via REVIEW_ENGINE toggle #5'starget_reporegression guard actually runs in CI.AC status (this repo)
redispatch.shgainsTARGET_REPO/-f target_repo): already satisfied —scripts/initiative-planner/redispatch.sh:36,63, consumed by the centralinitiative-planner.ymlredispatchjob (TARGET_REPOenv, line 103).redispatch.sh:17-22.target_repo): test pre-existed with both the default self-path and fleet host-override cases; this PR wires it into CI so the regression guard is live (it was previously never executed by thebatsjob).standards/workflows/initiative-planner.ymlstub + header docs for the secret/label/Ideas-category prerequisite): these ship in the publicpetry-projects/.githubrepo (nostandards/dir exists here). Per the issue's "Project Structure Notes" they belong to a separate PR against.githuband are out of scope for this.github-privatePR.Test Results
Files Changed
.github/workflows/lint.yml: addtests/test_initiative_planner_redispatch.batsto thebatsjob test list (AGENTS.md requires new test files be registered here).Notes
TARGET_REPOagainst apetry-projectsallowlist) is a design decision not covered by the ACs; it was intentionally not implemented here to avoid scope creep. Recommend resolving it as a follow-up if cross-org dispatch hardening is desired.target_repoplumbing was already present in the merged tree (theredispatch.shheader even references Per-repo caller stub + cross-repo redispatch #820), so no edits were needed there.feat: implement issue #820 — Per-repo caller stub + cross-repo redisp…
don-petry commentedon Jun 20, 2026
Reopened: the
.github-private-side PR closed this, but the real fleet deliverable — the public caller stub(s) inpetry-projects/.github— was not created (dev-lead can't write to the public repo from here). That work is in combsmith/.github#499. This issue tracks until that PR merges + the channel tag is cut.don-petry commentedon Jun 20, 2026
Done — the public caller stub(s) shipped in combsmith/.github#499 (merged). Fleet repos can now adopt the stub(s); the
<name>/stablechannel tag(s) still need cutting on release before adoption.