chore: switch crew policy from direct-push to PR-by-default

Beads is now a dependency of Gas City, which expects a standard PR-based
workflow. Remove the hook that blocked PR creation and update
AGENT_INSTRUCTIONS.md so crew workers use PRs by default. Direct push to
main stays available for releases and narrow operational fixes.

Keep the CI-polling rate-limit block in the hook — that guard is about
the 5000/hr GitHub API quota, not workflow policy.

Executed-By: beads/crew/emma
This commit is contained in:
emma 2026-04-15 13:48:02 -07:00 • committed by Steve Yegge
commit db7698956e
2 changed files with 9 additions and 33 deletions

View file

@ -17,30 +17,4 @@ if echo "$COMMAND" | grep -qE 'gh run watch|gh run list.*--watch'; then
exit 0
fi
# Block PR creation for crew/maintainers. Crew workers push directly to main.
# External contributors (beads.role=contributor or fork origin) need PRs.
if echo "$COMMAND" | grep -qE 'gh pr create'; then
ROLE=$(git config --get beads.role 2>/dev/null || echo "")
ORIGIN=$(git config --get remote.origin.url 2>/dev/null || echo "")
# Allow if role is explicitly contributor
if [ "$ROLE" = "contributor" ]; then
exit 0
fi
# Allow if origin points to a fork (not the upstream repo)
if [ -n "$ORIGIN" ] && echo "$ORIGIN" | grep -qvE 'steveyegge/beads'; then
exit 0
fi
jq -n '{
hookSpecificOutput: {
hookEventName: "PreToolUse",
permissionDecision: "deny",
permissionDecisionReason: "BLOCKED: Crew workers do NOT create PRs. Push directly to main with `git push`. PRs are for external contributors only. If you are reviewing an external PR, use fix-merge: checkout the PR, fix/rebase, merge to main, push, then close the PR."
}
}'
exit 0
fi
exit 0

View file

@ -101,15 +101,17 @@ bd hooks install
**Merge conflicts**: Rare with hash IDs. Dolt uses cell-level 3-way merge for conflict resolution.
## Git Workflow: Push to Main, Never PR
## Git Workflow: PR by Default
Crew workers push directly to main. **Never create pull requests.**
Crew workers use a PR-based workflow. Beads is a dependency of Gas City, so we
defer to the standard PR flow to keep changes reviewable.
- `git push` to main is the only way to land work
- `gh pr create` is forbidden — PRs are for external contributors, not crew
- Do not create feature branches for your own work — commit and push to main
- When handling external PRs, use fix-merge: checkout the PR branch locally,
fix/rebase onto main, merge locally, `git push`, then close the PR
- Work on a feature branch, push the branch, open a PR against `main`
- `gh pr create` is the normal path to land work
- Direct push to main is reserved for releases (tag + release commit) and
narrow operational fixes; prefer a PR when unsure
- When handling external contributor PRs, use fix-merge: checkout the PR
branch locally, fix/rebase onto main, merge via PR, then close the PR
### External Contributor PRs: Check Before You Build