feat(templates): aim PR bodies at outside readers #218
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "docs/pr-template-readers"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
Agent Foundry gives a repository the instructions its coding agents
follow. When an agent finishes a change, the
deliverskill has it opena pull request whose body it writes from one template,
.agents/templates/pull-request.md; a Forgejo repository also shows acopy to people who open one in the web form.
The template wrote for a reviewer who already knows the project, so a
contributor, an adopter, or the maintainer months later could not tell
from a body why a change mattered or check that it worked. In the last
eight merged pull requests, Why opened on a commit hash or an audit;
What changed listed edits file by file; How to verify asked the reader
to read a file, used placeholders such as
<branch>, or relied on theauthor's machine; and issues linked in prose closed only the first of
two, or none.
Set aside: reading as enough for every change to what agents read,
which shows nothing about what the agent does, and the billed
behavioral evals as the standard scenario.
What changed
Before, the template named one reader with the diff beside them. Now
Why and How to verify speak to a person new to the project, and What
changed and Considerations to the reviewer.
Before, Why could open on a commit and link its issue in any form. Now
it opens with what the touched part is and who uses it, then the problem
as a person meets it, and ends with one
Closes #<n>orRefs #<n>line per issue. What changed tells before and after, then names files in
one sentence.
Before, How to verify asked for repeatable steps, main's result
optional. Now each scenario shows the problem on main, then its absence
on the branch, by the same literal commands, which create every input,
with versions and both results quoted; a change to what agents read
gives a trial repository and the exact prompt. Only a change that alters
nothing a person or an agent does is verified by reading. The author
runs each scenario or says it was not run.
AGENTS.mdnow sizes a pull request body at about two minutes, countedwithout its How to verify, instead of one.
The template's comments, their Forgejo copy, and the size bullet of
AGENTS.md§ Writing for readers hold the change.How to verify
What to have first: Git 2.48 or later, and Claude Code 2.1.322 or later
logged in to an account that can run a session.
The problem, on main: make a trial clone holding the commit of #195 with
main's template, and ask an agent for that commit's body.
Expected on main:
../body-main.mdopens Why on thediagnoseskill'ssteps rather than on what the skill is for, and its How to verify asks
the reader to read step 4, or gives steps with placeholders and no
result on main.
The solution, on the branch: the same steps with the branch's template.
Expected on the branch:
../body-branch.mdopens Why on whatdiagnoseis and who runs it, and its How to verify makes a trialrepository with literal commands and gives an exact prompt, with what
the agent does on main and on the branch, both quoted.
Checks run on the tip:
bash tests/verify-agent-config.sh(234 tests),bash tests/agent-config/real-source.sh(6 tests, including the onethat keeps the Forgejo copy equal to the template),
bash tests/check-work-folder.sh(46 tests),.agents/hooks/shellcheck.sh repo,prettier --check '**/*.md',scripts/verify-agent-config.sh, andgit diff --check main, allpassing. The change adds no regression test, since no test reads the
template's comments.
Could not be tried: the scenario above was not run, since each of its
two agent sessions is a billed run; its expected results come from the
template's text, not from a session.
Considerations
A body now takes longer to write, since its author runs each scenario
first. Set aside from review: whether Forgejo closes another
repository's issue from
Closesand its full URL, unverified, and theform
AGENTS.mdalready requires.