From 29c58693d6e63f8174386e6a8cdc94e39f0f8343 Mon Sep 17 00:00:00 2001 From: BigSimmo <87357024+BigSimmo@users.noreply.github.com> Date: Tue, 28 Jul 2026 14:18:24 +0800 Subject: [PATCH] chore: organize dirty work from claude/pr-policy-caveman-fix-6875bb --- .claude/skills/handoff/SKILL.md | 10 ++++++++-- AGENTS.md | 12 ++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/.claude/skills/handoff/SKILL.md b/.claude/skills/handoff/SKILL.md index 5348957764..65f7b58997 100644 --- a/.claude/skills/handoff/SKILL.md +++ b/.claude/skills/handoff/SKILL.md @@ -35,8 +35,14 @@ force-push, or discard work. 5. **Push** the feature branch: `git push -u origin `. The pre-push guards run (auto-merge sentinel, format, drift) — heed a block rather than overriding blindly. 6. **Open a PR** with `gh pr create --base main`, body ending with the Claude Code - attribution line. Enabling squash-auto-merge (`gh pr merge --squash --auto`) is the - repo norm but requires explicit user confirmation before enabling; the PR lands on green. + attribution line. Write the body from `.github/pull_request_template.md` in full normal + prose — exact `## Summary` / `## Verification` / `## Risk and rollout` / (when clinical-risk + or RAG-ranking files are touched) `## Clinical Governance Preflight` headings, every governance + box checked, and a satisfying `RAG impact:` line — never caveman-compressed; `pr-policy.yml` + parses this text verbatim and hard-blocks the merge on a paraphrased or dropped item (see + AGENTS.md "External skill precedence"). Enabling squash-auto-merge is the repo norm but + requires explicit user confirmation before enabling (`gh pr merge --squash --auto`); the + PR lands on green. 7. **Record** the review in `docs/branch-review-ledger.md` (Date | Branch/ref | Reviewed HEAD | Scope | Outcome | Checks). diff --git a/AGENTS.md b/AGENTS.md index 10cac063b7..0d506b1e58 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -263,6 +263,18 @@ Output-style plugins such as caveman mode may compress prose. They must never co inspecting already-fetched local refs (`git log`, `git show`) first; `git fetch` or other network/provider access requires explicit user confirmation per the "API and provider confirmation boundary" section. +- **PR titles and descriptions are parsed input, not prose.** `.github/workflows/pr-policy.yml` + runs `scripts/pr-policy.mjs` against the exact PR title/body text and hard-blocks the merge + when a clinical-risk diff lacks a complete `## Clinical Governance Preflight` (every item from + `requiredClinicalGovernanceItems` checked) or a RAG-ranking-surface diff lacks a satisfying + `RAG impact:` line (see "RAG ranking protection" below). Caveman-style fragment-dropping breaks + this exact-format contract — a paraphrased checklist item or a shortened `RAG impact:` reason can + silently fail `governanceItemSatisfied`/`ragImpactDeclared` even though the PR is otherwise fine. + `gh pr create`/`gh pr edit` bodies and any `PR_POLICY_BODY.md` content therefore always get + written in full normal prose from `.github/pull_request_template.md`, regardless of the active + output style — this is "commits" territory under the caveman carve-out, not chat. Before + push, sanity-check clinical-risk/RAG-ranking bodies against `scripts/pr-policy.mjs`'s + `evaluatePullRequestPolicy` shape (run `npm run check:pr-policy` if the script itself changed).