diff --git a/.claude/skills/handoff/SKILL.md b/.claude/skills/handoff/SKILL.md index 8a95b55c66..305e80dbe4 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 with `npm run ledger:append`, passing `--ref `, `--head` (the full 40-character SHA), `--scope`, `--outcome`, and `--checks`. Do not hand-write the row into `docs/branch-review-ledger.md`. diff --git a/AGENTS.md b/AGENTS.md index bbd0c367dc..1bfd7cc38b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -262,6 +262,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).