fix(agents): replace gh CLI with curl for PR checking to prevent duplicate work

Agents do not have access to gh CLI, causing them to skip the pre-flight
PR check and collide on duplicate work. This replaces all gh-based PR
checking commands with curl + jq using the GitHub REST API, updates the
task claiming protocol to use branch push + started log file as the
primary lock mechanism, and updates automation scripts to use curl for
PR listing and git fetch for PR checkout.

Files updated:
- AGENTS.md (Section 12 coordination rules)
- CLAUDE.md (coordination rules)
- META_PROMPTS.md (daily + weekly meta prompts)
- daily-scheduler.md (pre-flight gate, task claiming, error handling)
- weekly-scheduler.md (pre-flight gate, task claiming, error handling)
- bitvid-pr-review-agent.md (PR enumeration + checkout)
- bitvid-ci-health-agent.md (CI run gathering)
- bitvid-weekly-synthesis-agent.md (PR metadata gathering)
- bitvid-changelog-agent.md (PR metadata verification)
- scripts/agent/review-open-prs.mjs (PR listing + checkout)
- scripts/automated-pr-review.mjs (--all mode PR listing + checkout)

https://claude.ai/code/session_01L5bzzGpZ6YTiLXcfqaL81G
This commit is contained in:
Claude committed 2026-02-13 15:47:42 +00:00
1 parent 05d575d187
commit ce72c4bbad
11 files changed
+97 -103

No files matched your search

+4 -6
View File
@@ -14,10 +14,9 @@ before choosing a task — is to run these two commands. Not later. NOW.
COMMAND 1 — Check for open daily agent PRs:
gh pr list --repo PR0M3TH3AN/bitvid --state open --json number,title,createdAt,author --limit 100 | grep -i "\[daily\]"
curl -s "https://api.github.com/repos/PR0M3TH3AN/bitvid/pulls?state=open&per_page=100" | jq '{count: length, titles: [.[].title]}'
If `gh` is not available, use this fallback:
curl -s "https://api.github.com/repos/PR0M3TH3AN/bitvid/pulls?state=open&per_page=100" | grep -o '"title":"[^"]*\[daily\][^"]*"'
Review the output. Any title containing "[daily]" means that agent is OFF LIMITS.
COMMAND 2 — Check for in-progress task logs:
@@ -63,10 +62,9 @@ before choosing a task — is to run these two commands. Not later. NOW.
COMMAND 1 — Check for open weekly agent PRs:
gh pr list --repo PR0M3TH3AN/bitvid --state open --json number,title,createdAt,author --limit 100 | grep -i "\[weekly\]"
curl -s "https://api.github.com/repos/PR0M3TH3AN/bitvid/pulls?state=open&per_page=100" | jq '{count: length, titles: [.[].title]}'
If `gh` is not available, use this fallback:
curl -s "https://api.github.com/repos/PR0M3TH3AN/bitvid/pulls?state=open&per_page=100" | grep -o '"title":"[^"]*\[weekly\][^"]*"'
Review the output. Any title containing "[weekly]" means that agent is OFF LIMITS.
COMMAND 2 — Check for in-progress task logs: