open-pr
Ship the current branch: update the documentation for the modules it touched, stage what the work taught into the memory store, push, open the pull request under the repo's git rules, and put it through a posted panel review that loops until every thread is answered. Usable on its own for any finished branch, and the step `implement-handoff` forks to once its review loop comes back clean. Trigger on "open a PR", "open the PR for this branch", "ship this branch", "raise a pull request", "let's get this reviewed".
- License 许可
- MIT
- 最近更新
- 2026-10-20
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- open-pr
- requires
- [ "agents/wrap-session-reviewer", "skills/panel-code-review", "skills/review-pull-request", "instructions/git" ]
- extensions
- { "claude": { "argument_hint": "[pr title]" } }
- description
- Ship the current branch: update the documentation for the modules it touched, stage what the work taught into the memory store, push, open the pull request under the repo's git rules, and put it through a posted panel review that loops until every thread is answered. Usable on its own for any finished branch, and the step `implement-handoff` forks to once its review loop comes back clean. Trigger on "open a PR", "open the PR for this branch", "ship this branch", "raise a pull request", "let's get this reviewed".
03 SKILL.md 正文
Open PR
Turn a finished branch into a pull request that has been documented, reviewed and recorded.
The order matters and is not negotiable: everything that changes the branch happens
before the pull request exists. Documentation written after gh pr create lands outside
the change it describes, and findings staged afterwards belong to a session that has already
ended.
0 — Refuse the obvious mistakes
Stop, and say which applies, if any of these hold:
- The current branch is the default branch. A pull request needs somewhere to come from.
- Nothing separates this branch from its base. There is no change to open.
- A pull request is already open for this branch. Say so, give its URL, and stop — re-reviewing
an open PR is
panel-code-review's to do directly, and opening a second is not a thing to recover from.
Follow the repo's git rules for everything below: establish the layout, read the GitHub user
from the root .envrc before any gh call, and never merge.
1 — Documentation, before anything is pushed
Dispatch the wrap-session-reviewer subagent with:
scope:branch_commits— the commits on this branch that are not on the default branch. This is the only scope that means anything here. Do not ask which scope to use;wrap-sessionasks because a session being wrapped might not be a branch being shipped, and this one is.repo_root: the absolute repository root.session_summary: one to three sentences on what this branch does, at the level of themes and modules touched.
Show what it reports, unedited. If it wrote nothing, say so and continue — a branch that warrants no documentation change is an ordinary outcome, not a problem.
2 — Stage what the work taught, before the context is gone
agtk memory stats --json
If agtk is missing, the command exits non-zero, or the output carries no root, skip this
section entirely and say nothing about it. The repo has not adopted a memory store or cannot
reach one, and inventing a path loses the finding silently.
Otherwise go through what this branch cost you to learn, and stage the entries that are durable facts about the codebase and can name a file they came from. Both, not either:
| Stage it | Leave it out |
|---|---|
The hook's fail_closed parses and never reaches settings.json |
This branch took three passes to converge |
Stack self-sufficiency is enforced, so a requires: must also be listed |
Rebase before pushing |
Approach X was tried against resolver.go and reverted because Y |
The tests are slow |
The right-hand column is true and is not a fact about the codebase. A note must carry at least one anchor, so an entry with no file to point at cannot become one however useful it is — staging it only buys a rejection later.
One file per finding, at <root>/candidates/<YYYYMMDD>-<short-slug>.md, carrying about, saw
and a body with a pointer for every claim. No targets or verdict: these are new findings,
not re-checks.
Always wrap about in double quotes (escape any double quote inside as \"). The front matter
is YAML, and an unquoted colon inside the value (about: the flag: off by default) makes the
candidate unparseable, so it drops out of the backlog and is never curated.
After staging, run:
agtk memory lint
It reports every candidate it cannot read, with the file and the YAML error, and exits non-zero while any remains. Fix what it names before committing.
Then look at what is already in candidates/. A finding staged before this branch was
written was staged against code that has since moved, and a branch that renames or deletes what
one names leaves a finding that still reads as true. The curator is fed the candidates and the
matching slice of the index and not the code, so it has nothing to catch that with: a
candidate naming a symbol you just deleted reads to it exactly like one naming a symbol that is
still there. Promotion writes it into notes/, where a wrong claim is most expensive.
You are the last reader who can tell. Rewrite such a candidate to what now holds, or delete it when the branch removed its subject outright, and say which you did and why. Leaving it is not the neutral option — it is the choice that lets the false claim through.
This is not an exception to the rule below. candidates/ is the staging area every producer
writes to, and it is not notes/.
Never write, edit, stamp or delete a note, and never run agtk memory anchor or
agtk memory index. notes/ has exactly one writer and it runs from /memory-curate
(ADR 0003). Say in your output that candidates are waiting.
Then record the reads this session made, so they travel with the branch. First check that the
installed agtk knows the subcommand. The probe asks for the fold help because an older agtk
answers memory hits --help with the parent memory help and exits 0:
agtk memory hits fold --help 2>&1 | grep -q -- '--check'
If that fails, the binary predates it: skip the fold, say so in one line, and carry on. Otherwise:
agtk memory hits fold
It moves the local hit log into one shard under <root>/hits/ and empties the log. agtk
never commits, so the shard is left for the next step.
3 — Commit and push
Commit anything the steps above produced, candidates and the hits shard included, as its own commit, conventional like the rest.
If the memory store was in play, check that nothing under it is left behind:
git status --short -- <root>
It must print nothing. A fold or a staged candidate that was never committed is lost with the container, so commit what it lists, or say why you did not, before pushing.
Push the branch and set upstream if it has none.
4 — Open it
The title is a conventional-commit subject, because squash merge makes it a subject on the default branch and no commit message underneath can correct it. Take it from the argument if one was given; otherwise derive it from the branch's commits.
The body says what the change does and why, and links whatever it closes. It carries no co-authorship trailer and no link back to the session that produced it.
Report the URL.
5 — Review it, posted
Invoke panel-code-review on the pull request just opened, with --no-fix: fixing is the next
step's, and a question here about whether to fix would stop a run that has nobody to answer it.
This is a second reading, not a repeat of any local one: the review manifest's defaults put a pull request on a different panel from a working tree, so the change is read by a model that has not seen it. Report the posted review's URL and how many findings landed.
6 — Converge it
Invoke review-pull-request <N>. The review just posted is its first pass: every thread it
opened gets fixed or answered, the fixes are pushed, and the next pass reads only what they
changed, until nothing is waiting or the loop stops for another reason.
Report its outcome as it gave it: the passes, what each cost, every false-positive marking the agent posted, and the threads waiting for a person to resolve. Anything but clean means the pull request is open and not ready, so say that and do not describe the branch as shipped.
What this skill never does
It never approves and never merges — approval is a separate act with its own subcommand, and no flag here reaches it.
It never marks a handoff consumed. A caller that reads a handoff owns that bookkeeping, because this skill runs on branches that never had one.
04 同仓库更多 Skills
challenge
Stress-test a plan through one-question-at-a-time interviewing.
skill-creator
Skill-creator external bundle.
example
An example skill used by parser tests.
unknown-field
Has a field the schema doesn't recognize.
unclosed-frontmatter
暂无简介
no-frontmatter
暂无简介