autoship-verify
Post-completion verification pipeline for OpenCode — review, simplify, re-verify, PR creation, CI monitoring, cleanup
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Post-completion verification pipeline for OpenCode — review, simplify, re-verify, PR creation, CI monitoring, cleanup
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Delegate GitHub issue-to-PR orchestration to the AutoShip OpenCode plugin.
Implementer role — writes code to implement features or fixes
AutoShip orchestration for OpenCode-only workers
Display current AutoShip orchestration status — running agents, quota bars, progress, token usage
Interactive setup wizard for AutoShip on OpenCode — model selection, tool detection, concurrency tuning
Lead role — coordinates multiple agents and manages orchestration flow
| name | autoship-verify |
| description | Post-completion verification pipeline for OpenCode — review, simplify, re-verify, PR creation, CI monitoring, cleanup |
| platform | opencode |
| tools | ["Bash","Agent","Read","Write"] |
Invoked after an agent reports COMPLETE. Runs verify → simplify → verify → PR → monitor → cleanup.
Check in order:
.autoship/config.json → test_commandpackage.json → npm test / yarn testMakefile → make testCargo.toml → cargo testpyproject.toml → pytestgo.mod → go test ./...Before spawning reviewer, run these assertions:
if [[ ! -e "$AUTOSHIP_RESULT_PATH" ]]; then
echo "VERDICT: FAIL — AUTOSHIP_RESULT.md missing"
exit 1
fi
REAL_RESULT=$(realpath "$AUTOSHIP_RESULT_PATH" 2>/dev/null)
REAL_WORKTREE=$(realpath "$WORKTREE_PATH" 2>/dev/null)
if [[ "$REAL_RESULT" != "$REAL_WORKTREE"/* ]]; then
echo "VERDICT: FAIL — path outside worktree"
exit 1
fi
DIFF_OUTPUT=$(git -C "$WORKTREE_PATH" diff main...HEAD 2>/dev/null)
if [[ -z "$DIFF_OUTPUT" ]]; then
echo "VERDICT: FAIL — git diff is empty"
exit 1
fi
Run the OpenCode reviewer hook:
bash hooks/opencode/reviewer.sh <issue-key> <worktree-path> <result-path> <test-command>
The reviewer role model is read from .autoship/model-routing.json; first-run setup prompts for it.
Create rollback point:
cd .autoship/workspaces/<issue-key>
git tag autoship-pre-simplify-<issue-key>
Get changed files:
SIMPLIFY_FILES=$(git -C .autoship/workspaces/<issue-key> diff --name-only main...HEAD)
Spawn an OpenCode worker to simplify. Must not break tests.
Confirm simplification preserved correctness. On FAIL: rollback.
cd .autoship/workspaces/<issue-key>
# Stage changed files only
CHANGED_FILES=$(git diff --name-only -z main...HEAD)
git add -- ${CHANGED_FILES}
# Create commit
git commit -m "feat: issue #<number>
Closes #<number>
Dispatched by AutoShip."
# Create PR
gh pr create \
--title "$(bash hooks/opencode/pr-title.sh --issue <number>)" \
--body "## Summary
<from AUTOSHIP_RESULT.md>
## Verification
- Tests: passing
- Reviewer: PASS
Closes #<number>
Dispatched by AutoShip." \
--label autoship \
--head autoship/issue-<number>
# Wait for CI checks
gh pr view <number> --json statusCheckRollup
# For simple issues: auto-merge when CI passes
# For complex issues: spawn reviewer first
After merge:
git worktree remove .autoship/workspaces/<issue-key> --force
git branch -D autoship/issue-<number>
bash hooks/update-state.sh set-merged <issue-id>
gh issue close <number>
| Error | Recovery |
|---|---|
| Missing result file | FAIL, re-dispatch |
| Empty diff | FAIL, re-dispatch |
| Tests fail | FAIL, re-dispatch with fix |
| PR creation fails | Retry once, then block |
| Merge conflict | Mark blocked for human review |