Repository navigation
Description
Problem
The pr-issue-linkage CI gate (.github/workflows/pr-issue-linkage.yml) fails a PR whose body is missing any section in this repo's configured pr_body_required_sections (.claude/source-control.md: Summary, Test plan, Related). This fails on close to every PR opened by an agent that reaches for gh pr create directly instead of /source-control:pull-request create — the finding is discovered ~4s into CI, then patched by a read-modify-write body edit, repeatedly.
Root cause is a broken loop, not agent forgetfulness:
/source-control:pull-request createreads the config and scaffolds all required sections at create time — the intended path never trips the gate.- The guardrails advisory hook
flag-commit-pr-skill-bypass.shflags a directgh pr createbut is advisory-only, never blocks (deliberate —create.mddocuments a legitimate inline fallback when skill discovery is broken). - So any run on the inline fallback opens a PR with no scaffold, and the
Relatedrequirement in particular surfaces only at CI-fail time.Relatedis the usual offender: a PR that cleanlyCloses #Nand references nothing else still fails, because the section is required unconditionally.
What to build
Close the loop so the required-section contract is satisfied (or its absence surfaced) BEFORE the PR reaches CI. Reproduce the failure first, then choose among (cheapest → most ambitious; a maintainer decision, do not assume one):
- Upgrade the advisory to inject/repair. When
flag-commit-pr-skill-bypass.shsees a directgh pr create, have the guidance (or a companion PreToolUse step) surface the repo's resolvedpr_body_required_sectionsso the agent scaffolds them in the same call. Keep it non-blocking per the hook's documented posture, but make the requirement visible at author time, not CI time. Cheapest; highest leverage; kills the class. - Local pre-push / pre-PR gate mirroring
pr-issue-linkageso the missing-section failure fires locally before the PR exists. Shifts the loop left; needs a client-side hook surface. - Reconsider the
Relatedrequirement. Make it conditional — required only when the body carries noCloses/Fixes/Resolves #N— or demote it to advisory. A PR that closes an issue and references nothing else is the common case the gate currently red-lines. This is a policy call onpr-body-convention+ the repo's.claude/source-control.md.
Options are not mutually exclusive (1 + 3 together is plausible). Whatever lands, record the decision on docs/conventions/pr-body-convention/README.md.
Acceptance criteria
- Failure reproduced: a direct
gh pr createwith aCloses #N-only body failspr-issue-linkageonRelated, documented in the issue. - The required-section contract is satisfiable (or its gap surfaced to the author) before CI runs, for BOTH the
/pull-requestpath and a directgh pr create. - Any change to the guardrails hook keeps its non-blocking posture and passes its contract test (
flag-commit-pr-skill-bypass.test.sh). - If
Relatedis made conditional/advisory,pr-issue-linkage.yml+docs/conventions/pr-body-convention/README.md+.claude/source-control.mdagree, and aCloses #N-only PR passes. - Decision recorded; touched plugins version-bumped per semver weight; gates pass.
Blocked by
None — can start immediately.
Provenance
Recurring friction observed across many PRs in this repo; surfaced concretely on PR #1159 (this session) and raised by the maintainer as "this keeps occurring almost on every PR." Orthogonal to the melodic-session-plugins-audit chain (#1151–#1154) — filed standalone.
Activity
kyle-sexton commentedon Jul 27, 2026
This was generated by AI (triage lane — gate-audit claim). Claiming this item for one gate-audit cycle: an independent panel re-classifies whether the
needs-human/status: needs-decisiongate is still warranted, or whether the item is C2/C3 and liftable toagent-ready. Outcome comment follows in this cycle.kyle-sexton commentedon Jul 27, 2026
This was generated by AI (triage lane — gate audit). Independent panel: two fresh-context agents (one
fable, oneopus), each given only the issue content and the repo's ownplugins/autonomy/reference/guardrails/work-classes.md, plus the triage lane's own read. This lane never executes work items, authors fixes, or merges.Gate audit: GATE UPHELD — the issue itself reserves the decision
Panel: 2-of-2 STAYS-GATED (classed C3 and C4). Lane read concurs.
The build work is bounded, but the issue deliberately presents three non-exclusive options and states outright that the remedy choice is "a maintainer decision, do not assume one." Option 3 additionally changes the
pr_body_required_sectionscontract acrosspr-issue-linkage.yml,docs/conventions/pr-body-convention/README.md, and.claude/source-control.mdsimultaneously, and option 1 edits a guardrails hook whose non-blocking posture is a recorded design choice.A cold agent cannot execute this without inventing policy, which is exactly the floor.
Decision required
Which remedy closes the required-PR-section loop before CI?
RECOMMENDED — option 1 + option 3 together. Surface the resolved
pr_body_required_sectionsat author time via the existing advisory hook (kills the discovery-lag class), and makeRelatedconditional — required only when the body carries noCloses/Fixes/Resolves #N(kills the common false positive, where a PR that already links its issue is failed for lacking a separate section). Both panel legs converged on this pairing independently: it attacks the recurring failure at both ends rather than treating a contract defect as purely an author-visibility problem.Alternative — option 1 alone, keeping
Relatedunconditional. Choose this if a mandatory cross-reference section on every PR is considered valuable in its own right, and the false positives are acceptable.Whichever is chosen, the issue requires the decision recorded on
docs/conventions/pr-body-convention/README.md. Once recorded, the implementation becomes a clean C3 lift.kyle-sexton commentedon Jul 27, 2026
This was generated by AI (triage lane — claim release). Gate-audit cycle complete for this item; the triage claim posted earlier this cycle is released. No lease is held — another instance or lane may pick this up immediately. The outcome comment above this one carries the classification and either the lift rationale or the decision summary.
kyle-sexton commentedon Aug 13, 2026
Frontier disposition (drain session)
Ruling: Close as not planned for this drain wave (frontier consensus).
Dual-panel drain ruling: advisory, superseded, folded into a program umbrella, or blocked on a host/design carrier without an actionable in-repo slice this session. Re-open with a concrete acceptance brief if a consumer needs the work.
KEEP set for this wave: standing telemetry; host-physical Class C (#631 family); program umbrellas #530/#531/#532/#535; live design carriers #1500/#1553/#1668/#1695/#1716/#1681/#1718; #1360.