finish-up-pr
Finalize a PR by cleaning up comments, verifying test coverage, checking README accuracy, tightening type specs, and reviewing the PR title and description.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Finalize a PR by cleaning up comments, verifying test coverage, checking README accuracy, tightening type specs, and reviewing the PR title and description.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Review and address open (unresolved) GitHub PR review comments. Assesses relevance, correctness, and whether to implement in this PR or as a follow-up. For bugs, writes a failing test first. For design issues, considers updating CLAUDE.md.
Prepare and publish a new release of PhoenixSpectral. Updates CHANGELOG.md, mix.exs, and README.md with version information, analyzes git commits to determine semantic version, and guides through the release process.
| name | finish-up-pr |
| description | Finalize a PR by cleaning up comments, verifying test coverage, checking README accuracy, tightening type specs, and reviewing the PR title and description. |
You are performing a final quality pass on the current PR before it is merged. Work through each step below in order, making fixes directly in the code.
Get the full diff of this branch against main:
git diff main...HEAD
git diff main...HEAD --stat
git log main..HEAD --oneline
Read every changed file in full before making any edits. Build a clear picture of:
In each changed file, look for and remove:
# old_function(x) -> ...)# TODO: fix this that refer to work already done in this PRDo NOT remove:
@doc / @moduledoc strings that add real valueAfter removing, run mix format to re-format.
Identify every function and type that was added or meaningfully changed in this PR.
For each changed public function or behaviour, verify there is:
Check the test files in test/ for coverage. Prefer testing through the public API; use internal modules only when explicitly testing internal behaviour.
If a function is missing a positive or negative test, write one. Place new tests in the appropriate existing test file, or create a new test/<feature>_test.exs file if none exists. Test support modules (e.g. fake controllers or structs needed for __spectra_type_info__/0) must go in test/support/ as separate .ex files, not inline in the test file.
After adding tests, run:
mix test
Report which tests were added and which functions they cover.
Read README.md in full and compare it against the changes made in this PR.
Check for:
If the README is out of date, update it. Keep additions concise and consistent with the existing style.
Review all type definitions (@type, @opaque) and function specs (@spec) in changed files.
Look for specs that are less specific than they should be:
any() or term() where a concrete type is knownlist() where [specific_type()] could be usedinteger() where a more precise type applies (e.g. non_neg_integer() or a union of literals)atom() where a union of specific atoms applies (e.g. t :: :ok | :error | :pending){:ok, any()} | {:error, any()} that could name their payload typesFor each loosely-typed spec you find:
After changes, run:
make ci
Fetch the current PR title and body:
gh pr view --json title,body
Compare them against the actual changes in this PR (git log main..HEAD --oneline and the diff).
Check for:
If the title or description is out of date, suggest an updated version and ask the user whether to apply it. Use:
gh pr edit --title "new title" --body "new body"
Run the full CI suite:
make ci
If make ci fails, investigate and fix before finishing.
Report back to the user with a concise summary: