Skip to content

docs(skills): add a pr-body skill that composes from the diff - #277

Merged
andrew-blake merged 1 commit into
feat/dev-dashboard-generatorfrom
docs/pr-body-skill
Aug 27, 2026
Merged

docs(skills): add a pr-body skill that composes from the diff#277
andrew-blake merged 1 commit into
feat/dev-dashboard-generatorfrom
docs/pr-body-skill

Conversation

@andrew-blake

Copy link
Copy Markdown
Owner

Summary

Stacks on feat/dev-dashboard-generator and needs nothing from it: both are independent docs changes queued to merge in order.

A new pr-body skill under .claude/skills/pr-body/ holds how a PR description gets written here. SKILL.md carries the writing rules, handoff.md the mechanics of producing the file and handing it over, and a committed .markdownlint.jsonc scopes MD013 to prose so the wrapping convention is checkable. CLAUDE.md gains one line under Development Guides so the skill is discoverable.

The shape is six sections. Three are required by .github/pull_request_template.md; the other three are conditional on something checkable. The title is an H1 at the top of the file, written last, in conventional-commit form, and typed by its effect on a user. Every checkbox is worded as the claim it asserts, so ticking cannot invert its meaning, and an unticked box is scoped to its author: it says what was not verified here and claims nothing about other sessions. A subagent composes from the diff while the session that did the work gathers facts and reviews it, because that session cannot un-know how the work went. The skill ends at the written file; creating the PR stays the author's to run.

No ADR or plan backs this and no issue tracks it. The skill files are the artefact.

AI Disclosure

  • No AI/agent tooling was used
  • AI/agent tooling assisted; I reviewed and ran the change myself before submitting

Testing

Built test-first against fresh-context subagents. The generations are archived under gitignored _claude/pr-bodies-run*/ and are not part of the diff.

  • Baselines with no skill present wrote a street address into a body 2 of 2, opened with how the problem was discovered, and ran 361 and 475 words for a 286-line script. Five generations under the skill took em dashes to zero and unticked boxes carrying a reason from 2 of 9 to 9 of 11, and produced conventional-commit H1s typed by effect rather than by the commit. One proposed rule was dropped when its test failed to reproduce the problem it targeted.
  • npx markdownlint-cli2 on both skill files: 0 issues, under the committed config. Prose wrapped with npx prettier@3 --prose-wrap always --print-width 80, zero em dashes in either file.
  • make pre-commit: not run on this branch.
  • make test-api, make test-integration, make test-e2e: not run and not reachable; the diff is two markdown files, a lint config and one line of CLAUDE.md, with nothing under custom_components/ or tests/.

@codecov

codecov Bot commented Aug 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (feat/dev-dashboard-generator@f8709fc). Learn more about missing BASE report.

Additional details and impacted files

Impacted file tree graph

@@                       Coverage Diff                       @@
##             feat/dev-dashboard-generator     #277   +/-   ##
===============================================================
  Coverage                                ?   93.21%           
===============================================================
  Files                                   ?       44           
  Lines                                   ?     2904           
  Branches                                ?        0           
===============================================================
  Hits                                    ?     2707           
  Misses                                  ?      197           
  Partials                                ?        0           
Flag Coverage Δ
unittests 93.21% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f8709fc...417324f. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

PR descriptions in this repo have been inconsistent: sections varied, bodies were
sized by how much thought went in rather than by the change, and the title was
improvised at the command line where nothing reviewed it.

The skill fixes the shape and the process:

- Six sections. Three required from the PR template, three conditional on
  something checkable: Key changes above five files, What changes for users when
  a user notices something, Risks accepted when merging accepts a known risk.
- The H1 is the PR title, written last, conventional-commit form, typed by the
  effect on a user rather than the shape of the diff.
- Every checkbox is worded as the claim it asserts, so ticking one cannot invert
  it, and an unticked box says what was not verified here rather than asserting
  nobody verified it.
- Length is calibrated against this repo's merged bodies, not invented anchors.
- A subagent composes from the diff and the ADR; the session that did the work
  gathers facts and reviews, because it cannot un-know how the work went.
- The body is written to a file for review, and the skill stops there. Creating
  the PR is the author's to run.

Built test-first against fresh-context agents: baseline runs leaked a street
address into a body 3 times out of 3, opened with how the problem was discovered,
and reproduced an ADR's measurement table. Five generations of the two stacked
bodies in this repo are archived locally for comparison.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@andrew-blake
andrew-blake merged commit b3ebf96 into main Aug 27, 2026
14 of 22 checks passed
@andrew-blake
andrew-blake deleted the docs/pr-body-skill branch August 27, 2026 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant