Urgent.News

What's breaking now, across thousands of outlets.

Culture

Hide your slop PR descriptions behind <details><summary>

Most of the changes I make to my projects these days come in the form of PRs opened for me by Claude Code or Codex. The PR is my unit of work - I use them to bundle commits together, iterating on them until a feature is complete, document decisions and then merge the finished result. Today's coding agents are great at writing PR descriptions. They're too good at describing the work The problem is…

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.

Read the original at simonwillison.net →

More in Culture

More from Monday 9 November →