When to use
Use this skill when asked to execute a CI-fix plan as a standalone PR targeting main, especially when another feature PR already exists.
Workflow
- Resolve config-plan location first:
- Run
printenv OPENCODE_CONFIG_DIR. - Read the requested plan from
$OPENCODE_CONFIG_DIR/plans.
- Run
- Prepare clean scope:
- Branch from
main(for examplefix/main-ci-failures). - If borrowing changes from another PR for temporary validation, isolate them in a firewall branch/commit.
- Recreate the final PR branch with only intended commits.
- Branch from
- Apply only scoped fixes from the plan.
- Validate locally from repo root:
source build/envsetup.sh highestcargo clippy --all-targets -- -W warnings -D warningscargo test -- --test-threads 1
- Flake handling:
- If
publisher_subscribermisses by one message once, rerun the same serial test command once before declaring failure.
- If
- PR target safety preflight:
- Confirm branch/repo context before PR creation (
git branch --show-current,git remote -v). - Create PR with explicit target/source flags:
gh pr create --repo <owner>/<repo> --base main --head <fork-owner>:<branch> ...
- Verify PR routing immediately after creation:
gh pr view <pr-number-or-url> --repo <owner>/<repo> --json url,baseRefName,headRefName
- Confirm branch/repo context before PR creation (
- Open PR and cross-link:
- Push branch and open PR to
main. - Comment on related PRs with the new PR URL.
- Capture the cross-link comment URL for reporting.
- Push branch and open PR to
Scope guardrails
- Keep this PR limited to CI fixes (plus feasible warning cleanup explicitly requested during validation).
- Before opening PR, run:
git log --oneline main..HEADgit diff --name-only main...HEAD
- If output includes unrelated work, rebuild the branch with cherry-picks.
Reporting template
Always report:
- Files changed
- Brief diff summary
- Clippy/test results (include rerun note for flaky tests)
- Commit SHA(s)
- PR URL
- Cross-link comment URL(s)
- Whether history rewrite occurred (yes/no) and final commit SHA(s)