Context
The pr-issue-linkage gate requires BOTH a closing keyword (or explicit no-issue opt-out) AND a non-empty ## Related section. The source-control:pull-request skill's pre-create gate (create.md §2.4.2) greps only for the closing keyword — it never verifies ## Related — so agent-composed bespoke PR bodies pass the skill-side check and fail at CI. This is the top confirmed break behind the fleet's most-reported CI failure (5 of 6 recent claude-code-plugins linkage failures were the ## Related error; PR #934 shows the fail-at-open → edit-body → pass-81s-later churn cycle). Affects both cached plugin versions (0.15.8, 0.16.2) — logic gap, not staleness.
Proposed work
- Extend the pre-create gate in the pull-request skill's create flow to verify a non-empty
## Related section (mirroring the gate's actual validation, ideally sourced from/tested against the ci-workflows pr-issue-linkage logic rather than a hand-copied regex)
- Ensure the body-assembly path always scaffolds
## Related (with - N/A default) for bespoke bodies, not only the template heredoc path
Acceptance criteria
References
- medley
docs/topics/cicd-fleet-audit/REPORT.md — issue-linkage root cause (break 1 of 3)
- Evidence:
.work/cicd-fleet-audit/data/issue-linkage-chain.md in medley
- ci-workflows#153 (enforcement-scope decision for remaining body sections — coordinate)
Context
The pr-issue-linkage gate requires BOTH a closing keyword (or explicit no-issue opt-out) AND a non-empty
## Relatedsection. The source-control:pull-request skill's pre-create gate (create.md §2.4.2) greps only for the closing keyword — it never verifies## Related— so agent-composed bespoke PR bodies pass the skill-side check and fail at CI. This is the top confirmed break behind the fleet's most-reported CI failure (5 of 6 recent claude-code-plugins linkage failures were the## Relatederror; PR #934 shows the fail-at-open → edit-body → pass-81s-later churn cycle). Affects both cached plugin versions (0.15.8, 0.16.2) — logic gap, not staleness.Proposed work
## Relatedsection (mirroring the gate's actual validation, ideally sourced from/tested against the ci-workflows pr-issue-linkage logic rather than a hand-copied regex)## Related(with- N/Adefault) for bespoke bodies, not only the template heredoc pathAcceptance criteria
## Relatedis caught beforegh pr create, with a fix hintReferences
docs/topics/cicd-fleet-audit/REPORT.md— issue-linkage root cause (break 1 of 3).work/cicd-fleet-audit/data/issue-linkage-chain.mdin medley