Hide your slop PR descriptions behind <details><summary>
Simon Willison's recent article introduces a clever trick for filtering through AI-generated pull request (PR) descriptions on GitHub. The method involves utilizing the HTML `<details>` and `<summary>` elements directly within Markdown comments or PR descriptions. These elements create a collapsible content section, where the summary serves as a concise, high-level introduction, and the detailed description remains hidden until expanded.
This approach effectively reduces the cognitive load on readers, allowing them to quickly assess whether a PR merits their attention based on a brief, human-curated summary.
Willison employs this technique for PRs created or edited by AI agents such as Claude Code or Codex. He emphasizes that while AI-generated descriptions are accurate and comprehensive, they often require too much time to read, making them less appealing. By using the `<details>` and `<summary>` tags, he places the most crucial information upfront, ensuring that the essence of the PR is immediately visible. This summary can include screenshots or other visual aids to further illustrate changes or new features.
To assist with remembering the correct tag order, Willison suggests referring to them as "details-summary," which rolls off the tongue more smoothly than the more intuitive-seeming "summary-details." He encourages readers to practice saying the phrase aloud to reinforce the order. Although GitHub could benefit from a built-in button for this feature in their Markdown editor, Willison believes that implementing it manually is a worthwhile workaround.
Overall, by integrating AI-generated content with human editorial oversight, Willison's method aims to preserve the richness of detailed PR descriptions while making them more accessible and digestible for human readers. This approach not only enhances the readability of PRs but also maintains the integrity of the information presented.
Written by urgent.news from Simon Willison's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.
This story
This is one outlet's version. Read the fullest account.
- Hide your slop PR descriptions behind <details><summary> simonwillison.net