The AI Pull Request Body: h5i's Review Surface for Agent Work
h5i's PR comment is not the product. It is a high-leverage view of the shared context graph: what the agent was asked to do, what it inspected, what it changed, what risk signals fired, and where reviewers should look first.
The pull request is where human review already happens. If an AI agent did a meaningful part of the work, the reviewer should not have to open a terminal, scrape a chat transcript, or guess which files are risky. The review surface should explain the branch in the same place the diff is reviewed.
That is what h5i share pr post does. It renders h5i's shared context
into a sticky GitHub comment. Re-run it and h5i updates the same comment instead
of spraying duplicates across the thread.
What the PR body answers
| Reviewer question | h5i source |
|---|---|
| What was the agent trying to do? | Branch goal, prompt, milestones. |
| Which files deserve first review? | Footprint, churn, audit signals, context relevance. |
| Was the work tested? | Captured test metrics from h5i commit. |
| What did the agent decide? | THINK entries and structured decisions. |
| What risks were detected? | h5i audit review, secrets, blind edits, duplicates, CI changes. |
Post or preview
$ h5i share pr post --style review # upsert a sticky GitHub PR comment $ h5i share pr post --style review --dry-run # render locally without calling gh $ h5i share pr body --style replay # print markdown for CI or gh pr edit --body-file -
Five styles, one record
The style changes the presentation, not the underlying evidence. The data still comes from h5i context, notes, commits, audit rules, claims, and memory.
| Style | Best use |
|---|---|
review | Default reviewer workflow: triage, checklist, evidence, compact reasoning highlights. |
receipt | Screenshot-friendly summary with punchline stats. |
detective | Narrative write-up: goal, considered alternatives, key insight, shipped work. |
replay | Reasoning DAG promoted above the fold. |
minimal | Quiet internal provenance for routine branches. |
The important boundary
The PR comment is a surface, not the source of truth. h5i stores the durable
record in Git sidecar refs such as refs/h5i/context, refs/h5i/notes,
and refs/h5i/memory. The same record can render as a terminal prelude,
a local dashboard, a compliance report, a handoff prompt, or a PR comment.
Requirements
Posting requires the GitHub CLI to be installed and authenticated. If CI should own
the final PR body, use h5i share pr body and pipe the rendered markdown into
your existing GitHub workflow.
The strongest PR comments come from branches that used h5i throughout the work:
h5i codex prelude at the start, h5i codex sync during the
session, h5i capture commit for provenance, and h5i audit review
before review.