Skip to content

feat(skills): add pr-design-doc skill - #451

Open
smolpaws wants to merge 13 commits into
OpenHands:mainfrom
smolpaws:feat/pr-design-doc-skill
Open

feat(skills): add pr-design-doc skill#451
smolpaws wants to merge 13 commits into
OpenHands:mainfrom
smolpaws:feat/pr-design-doc-skill

Conversation

@smolpaws

@smolpaws smolpaws commented Aug 4, 2026

Copy link
Copy Markdown
Contributor
  • A human has tested these changes.

HUMAN:
Human attention is a scarce resource. This PR proposes a skill to teach the agent the make-up of an HTML design doc for non-trivial PRs, that allows a better quick view of the proposed changes, than the raw diff. The doc would show the state before and after, and contains instructions to focus the agent on summarizing, on capturing what is relevant, including SVG diagrams if needed.

I have personally used a very similar skill for a few dozen arch notes, studies of a repo or component or feature behavior, and I think the result is much better to go through than raw diffs.


Why

Reviewers of a non-trivial PR often have to reconstruct the design from the diff alone — the shape of the change, the API before/after, and why this approach. That's slow and error-prone. This skill guides an agent to hand maintainers a single, self-contained HTML design doc they can grasp in ~15 seconds, grounded to real code.

It also operationalizes the .pr/ convention: the doc is committed under the temporary .pr/ directory (auto-removed on approval by pr-artifacts.yml), and linked in the PR description via an htmlpreview URL that renders before the PR is merged.

Companion guideline issue: OpenHands/OpenHands#16304.

Summary

  • Add the pr-design-doc skill (/pr-design-doc, /design-doc): when to use it (and when to skip — trivial PRs), the .pr/ workflow, a step-by-step process, what the page contains (decision-first summary, API before/after, per-file before/after cards grounded to path:line), and anti-patterns.
  • Include references/html-craft.md — the editorial look, hand-drawn before/after SVG technique, code-grounding discipline, and the htmlpreview delivery link (adapted so .pr/ + the fork/branch URL is the primary path).
  • Register in the openhands-extensions marketplace + README catalog; add the .plugin manifest, vendor symlinks, and generated command files via scripts/sync_extensions.py.

Adapted from the show-me visualization skill, focused on the OpenHands PR-review workflow.

Issue Number

Related: OpenHands/OpenHands#16304

How to Test

# registry/catalog/symlinks/commands are all in sync
uv run python scripts/sync_extensions.py --check   # only the pre-existing, unrelated issue-duplicate-checker coverage warning

# skill structure + plugin-loading + sync tests
uv run pytest tests/test_skills_have_readme.py tests/test_skill_plugin_loading.py tests/test_sync_extensions.py tests/test_catalogs.py -q   # 117 passed

You can also read skills/pr-design-doc/SKILL.md and follow it against any non-trivial PR: it produces .pr/design.html and an htmlpreview link of the shape
https://htmlpreview.github.io/?https://github.com/<fork-owner>/<repo>/blob/<pr-branch>/.pr/design.html.

Notes

  • Skills-only change; no integration catalog or code touched.
  • The .pr/ auto-removal workflow lives in OpenHands/OpenHands; this skill documents relying on it.

Co-authored-by: smolpaws engel@enyst.org

Add a skill that guides writing a self-contained HTML design doc for a
non-trivial PR, committed under the temporary .pr/ directory and linked in
the PR description via htmlpreview so maintainers see the code/API design
and the before/after at a glance, grounded to real code.

Adapted from the show-me visualization skill for the OpenHands PR-review
workflow: focuses the craft on the .pr/ convention (auto-removed on
approval) and the fork-branch htmlpreview link that renders before merge.

Includes SKILL.md, README.md, references/html-craft.md, the generated
command files and .plugin manifest/symlinks, and the marketplace + README
catalog registration. sync_extensions.py --check passes.

Co-authored-by: smolpaws <engel@enyst.org>
Point contributors at the frontend-design skill, if it helps, when building
the design HTML page.

Co-authored-by: smolpaws <engel@enyst.org>
@all-hands-bot

Copy link
Copy Markdown
Contributor

👋 This PR needs a couple of things fixed before OpenHands can review it:

  • the PR description's HUMAN: section needs at least 20 characters describing what you tested, not just the template placeholder

Push an update once this is addressed and this check re-runs automatically.

This is an automated check - no AI was used to generate this comment.

Comment thread skills/pr-design-doc/references/html-craft.md Outdated
Comment thread skills/pr-design-doc/SKILL.md Outdated
Comment thread skills/pr-design-doc/SKILL.md Outdated
enyst and others added 3 commits August 10, 2026 00:45
The pr-artifacts workflow removes .pr/ on approval only for same-repository
PRs; fork PRs require manual cleanup before merge. Adjust the skill and
README to state this accurately rather than claiming it never lands in main.

Co-authored-by: openhands <openhands@all-hands.dev>
The reference is a PR-design-doc craft doc, but six of its sections
(dependency graphs, deployment/topology, swimlanes, state machines,
capability matrices, misconception-correction) are generic 'show-me'
visualization breadth not specific to PR design docs. Drop them to keep
the skill tightly scoped to its purpose; retain the editorial HTML shell,
before/after SVG encoding, figure captions, code grounding, and the
htmlpreview delivery guidance the skill actually depends on.

Co-authored-by: openhands <openhands@all-hands.dev>
Comment thread skills/pr-design-doc/references/html-craft.md Outdated
Comment thread skills/pr-design-doc/references/html-craft.md Outdated
Comment thread skills/pr-design-doc/references/html-craft.md Outdated
enyst and others added 4 commits August 10, 2026 01:05
Removed section on human accessibility and GitHub link preference.
Removed instructions for serving HTML files over HTTP for private repositories.
The checked-in skills/index.js was stale and missing pr-design-doc, so
test_index_is_up_to_date failed. Regenerate via build-skills-catalog.mjs.

Note: the category-count snapshot test (test_category_distribution_is_balanced)
is intentionally NOT updated here — it is useless and is being removed in
a separate PR.

Co-authored-by: openhands <openhands@all-hands.dev>
@enyst
enyst force-pushed the feat/pr-design-doc-skill branch from 95401f0 to 3fa97f7 Compare August 9, 2026 23:21
@all-hands-bot

Copy link
Copy Markdown
Contributor

🚦 CI is currently failing on this PR's latest commit.

Please fix the failing checks before OpenHands reviews it - this is re-checked automatically once you push a new commit. (A maintainer can also request @all-hands-bot as a reviewer to have it reviewed regardless of CI status.)

This is an automated check - no AI was used to generate this comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: feat A new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants