ci(dispatch): agent-authored PR body via PR_BODY.md template#36
Merged
Conversation
The dispatch workflow previously wrote a canned PR body itself, so every dispatch PR read the same generic summary regardless of what the agent did. The workflow cannot know what changed; only the agent can. Now the agent writes PR_BODY.md following a Problem / Changes / How to test / Verification template baked into APPEND_SYSTEM.md, and the workflow publishes that file as the PR body. The workflow strips PR_BODY.md from the commit first (it is a build artifact, not a source change) and falls back to a canned body if the agent produced none. Grounded in current PR-description best practice (GitHub docs + community guides): What changed / Why / How tested, with the issue linked via the Closes keyword. Verified by simulating the step: PR_BODY.md is stripped, the body is preserved for publishing, source changes commit cleanly. build/vet/test green; no em dashes per AGENTS.md.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #none (workflow improvement, no issue).
Problem
The dispatch workflow wrote its own canned PR body (
Closes #N. Generated by the dispatch workflow...), so every dispatch PR had the same generic summary regardless of what the agent actually did. The workflow cannot know what changed; only the agent can. PR #34 demonstrated the weakness: a strong code change with a boilerplate body.Changes
.github/dispatch/APPEND_SYSTEM.md: added a PR_BODY.md template (Problem / Changes / How to test / Verification) the agent must follow, and an instruction not to rungh pr createitself..github/workflows/dispatch.yml: the commit/push/open-PR step now (1) readsPR_BODY.mdif the agent wrote it, (2) strips it from the commit as a build artifact, (3) publishes it as the PR body, (4) falls back to a canned body if the agent produced none.How to test
dispatch; the resulting PR body should have the four sections authored by the agent, not the canned summary.PR_BODY.md, the PR body is the canned summary, andPR_BODY.mdis still not committed.Verification
go build ./... && go vet ./... && go test ./...pass. The workflow step logic was simulated in a scratch tree:PR_BODY.mdis stripped from the commit, the body is preserved for publishing, source changes commit cleanly. Grounded in current PR-description guidance from GitHub docs (issue-linking keywords) and community best-practice guides (What/Why/How-tested). No em dashes per AGENTS.md.