General-purpose coding policy for Baruch's AI agents
91
93%
Does it follow best practices?
Impact
91%
1.15xAverage score across 12 eval scenarios
Advisory
Suggest reviewing before use
Structured workflow for shipping code: PR creation, automated policy review, merge, and cleanup. Process each step in order — do not skip ahead.
main/master)git push -u origin <branch>gh pr create:
<type>(<scope>): <imperative summary>## Summary
<what changed and why — 1-3 bullet points>
## Test plan
- [ ] <verification steps>Proceed immediately to Step 3 — do not wait for reviews before reasoning about version.
Decide the version bump:
tesslio/patch-version-publish — no manifest update neededPushing the PR branch triggers the runnable GitHub Actions workflow .github/workflows/review.lock.yml ("PR Policy Review") on the pull_request event. The .github/workflows/review.md file is the gh-aw source that compiles into that lock file via gh aw compile. The workflow runs on every opened, synchronize, and reopened — no explicit request mutation. The review is submitted by github-actions[bot] and uses OpenAI gpt-5.4 via the gh-aw Codex engine, checking the diff against the in-tree rules/*.md from the PR head.
Proceed immediately to Step 5 — do not stop after creating the PR. The skill runs end-to-end: once gh pr create succeeds, the next action is always to start watching.
Trial — keep Copilot in parallel. During gh-aw validation, also request Copilot:
skills/release/request-copilot-review.sh <owner> <repo> <pr-number>Uses GraphQL (REST drops bot reviewers), falls back to discovering the bot ID from recent reviews if the pinned BOT_kgDOCnlnWA goes stale, verifies Copilot is in requested_reviewers. Exits non-zero on failure; emits a JSON summary on success. Both reviews gate the merge. This paragraph and the script are retired in a cleanup PR once gh-aw is validated on 1–2 PRs.
Capture a single JSON snapshot of CI status, bot review states, and inline comment counts:
skills/release/poll-pr-reviews.sh <owner> <repo> <pr-number>The script returns:
ci.status — pending | success | failure | none (the gh-aw workflow appears here as a check once it has run)reviews.gh_aw.state and reviews.copilot.state — latest review per bot (APPROVED | CHANGES_REQUESTED | COMMENTED | none)inline_comments.gh_aw and inline_comments.copilot — top-level inline comment countsInterpreting review states (per bot independently):
APPROVED — no issuesCHANGES_REQUESTED — comments need addressingCOMMENTED — observations; read and decide per threadLoop until ci.status is success (or none if no checks are configured) and neither review state is CHANGES_REQUESTED. If the gh-aw review check ran but no review was posted, inspect logs with gh run view --log-failed. Do not retry via GraphQL — gh-aw is event-triggered, not request-triggered.
<sha>"<reason with cited evidence>"pull_request: synchronize re-triggers the gh-aw workflow on every push — no manual re-request. During the trial, Copilot still needs a re-request via skills/release/request-copilot-review.sh (same args as Step 4).APPROVED or COMMENTED with no blocking items, and every thread has a reply.Only proceed when CI is green AND the latest gh-aw review has zero blocking comments AND (during trial) the latest Copilot review has zero comments AND all review threads have replies.
# Merge
gh pr merge <N> --merge --delete-branch
# Update local
git checkout main && git pull --ff-only
# Clean up local branch
git branch -d <branch>
# Prune stale remote refs
git remote prune originAfter merge:
Finish here — the skill is complete.