Merged
Conversation
…view # Conflicts: # ci/pr-review/agents/pr-review.md # ci/pr-review/skills/pr-review-output-contract/SKILL.md # plugins/eng/skills/ship/SKILL.md
6 tasks
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.
Summary
This PR implements Nick's draft proposal in #6: make the PR review system portable so the same review shape can run locally before a PR exists.
Today, the strongest review machinery in
team-skillsassumes a GitHub PR already exists. This change makes that review flow usable before push and before PR creation, so an autonomous/shiprun can review its own branch locally, fix validated issues, and only then open a draft PR.Concretely, the new behavior is:
tmp/ship/review-output.md/shipuse that artifact as a bounded pre-push gateKey decisions
tmp/ship/pr-review-pluginand execute the staged copy from the target repo so feature repos do not need to vendorci/pr-review..claude/worktrees; this avoids container hangs from repo-local Claude state while preserving git state and copying review artifacts back.claude.aicredentials only if no valid API key is available.What changed
ci/pr-review/agents/pr-review-local.mdandci/pr-review/agents/references/pr-review-core-workflow.md.detect-target-branch.sh,generate-pr-context.sh, andpr-review.sh.run-local-review.shandstage-local-review-bundle.sh.pr-review-output-contractfor local repo-relative citations./shipdocs, stop-hook guidance, and PR-creation timing to make the local review gate a bounded pre-push step.ci/pr-review/README.mdto document the new local entrypoints and durable run artifacts.run-local-review.shvalidates API key sources, prefers a working repo or shell API key, and falls back to host-backedclaude.aicredentials only when needed.Validation
bash -non the new and updated shell scripts.code/agentson branchcodex/preview-auto-followup-2440-cleanusing.ai-dev/docker-compose.yml.mainas the target branch, generates localpr-context, writestmp/ship/review-output.md, and copies durable artifacts back undertmp/ship/local-review-runs/./tmp/local-review-workspaceinstead of the mounted/workspacerepo, which avoids recursing through the repo's 9.1 GB.claude/worktreestree during startup.code/agents/tmp/ship/local-review-runs/20260317T134310Z-codex-preview-auto-followup-2440-clean-9410/review-output.md.ANTHROPIC_API_KEYthat overrode a different valid key incode/agents/.env.https://api.anthropic.com/v1/models.claude -p "reply with OK only" --dangerously-skip-permissions --max-turns 1, which returnedOK.Notes
code/agentsisolated environment.code/agentsbranch being reviewed, not failures in the local-review transport itself.