Commit Graph
10 Commits
Author SHA1 Message Date
Claude ce72c4bbad 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
2026-02-13 15:47:42 +00:00
Claude f794971bfc fix(agents): rewrite scheduler prompts to force pre-flight execution
Agents were skipping the pre-flight curl/gh check for in-progress work,
causing duplicate task runs. Root causes:

1. Two-document indirection (meta prompt → scheduler) caused the pre-flight
   instructions to get lost when the agent opened the second file
2. No proof-of-execution gate — agents could assert "no conflicts" without
   actually running the commands
3. curl|jq pipeline silently fails when jq is unavailable
4. "Step 0" labeling felt like skippable preamble

Changes:
- Make the commands the literal first instruction ("run NOW, paste output")
- Use gh CLI as primary (authenticated, no jq needed), curl as fallback
- Require raw terminal output pasted before proceeding (output gate)
- Rename "Step 0" to "PRE-FLIGHT GATE" to signal it's not optional
- Eliminate duplication between meta prompt and scheduler files
- Add explicit "STOP HERE" checkpoint after command execution
- Add skip-ahead clause for agents arriving from meta prompt

https://claude.ai/code/session_01S7jaQb9ctJ4bzqRhEcm28Q
2026-02-13 05:21:25 +00:00
Claude 17a736b8da refactor(agents): migrate task logs from CSV to directory-based format
Replace shared CSV files (AGENT_TASK_LOG.csv, WEEKLY_AGENT_TASK_LOG.csv)
with per-entry files in docs/agents/task-logs/{daily,weekly}/. Each log
entry is now a separate file named YYYY-MM-DD_HH-MM-SS_<agent>_<status>.md,
eliminating git merge conflicts and race conditions when multiple agents
run concurrently.

Updated files:
- daily-scheduler.md: rewritten for directory-based log format
- weekly-scheduler.md: rewritten for directory-based log format
- META_PROMPTS.md: updated pre-flight scan and claiming instructions
- AGENTS.md: updated scheduler reference from CSV to directory-based

Migrated all existing CSV entries to individual files in the new
directory structure.

https://claude.ai/code/session_01P62EWUXwupgxPhpnRejUuz
2026-02-13 04:41:05 +00:00
google-labs-jules[bot]andPR0M3TH3AN 77ec8e18c3 chore(agents): migrate persistent state files to timestamped directories
- Move `CONTEXT.md`, `TODO.md`, `DECISIONS.md`, `TEST_LOG.md` to `context/`, `todo/`, `decisions/`, `test_logs/` directories with timestamps.
- Update `AGENTS.md` and `CLAUDE.md` to define the new workflow: agents must read the latest timestamped file and create a new one when updating.
- Update `daily-scheduler.md` and `weekly-scheduler.md` to initialize tasks using the new file structure.
- Update all daily agent prompts to reference the new directory structure.
- This change prevents merge conflicts on persistent state files by treating them as an append-only log of snapshots.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-13 03:14:50 +00:00
google-labs-jules[bot]andPR0M3TH3AN b7f63b323a chore(agents): replace gh pr list with curl in agent prompts
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-13 00:37:21 +00:00
Claude 857e820d65 fix(agents): prevent duplicate job selection in scheduler prompts
Agents were repeatedly picking up content-audit-agent because:
1. CSV only updated after task completion — crashes left no trace
2. PR claim check (Step 1.5) was buried and easy to skip
3. No "started" status meant failed runs were invisible to rotation
4. Pre-flight scan was too narrow (checked one agent, not all)

Changes:
- Add Step 0 (mandatory pre-flight) that scans ALL open PRs and CSV
  for in-progress work before selecting any task
- Introduce "started" CSV status logged immediately upon claiming,
  before task execution begins — ensures rotation advances on crash
- Promote claim check from sub-step 1.5 to full Step 2 with explicit
  MANDATORY warnings
- Add 24-hour stale claim timeout for abandoned "started" entries
- Add fallback: if gh is unavailable, CSV "started" rows still work
- Strengthen META_PROMPTS.md to front-load deduplication as Step 0
  with explicit "this has happened before" warning language
- Add Quick Reference table summarizing all 5 deduplication layers

https://claude.ai/code/session_017QCJvunQJ7ATr6uZBHV5iA
2026-02-13 00:08:36 +00:00
google-labs-jules[bot]andPR0M3TH3AN 7e86f96a2c chore(agents): fix scheduler task claiming logic and add meta prompts
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-12 23:41:48 +00:00
Claude 749dece7dd docs(agents): add draft PR task claiming protocol to prevent duplicate work
When multiple agents (Claude Code, Codex, Jules) run schedulers concurrently,
they can pick up the same task because neither has committed yet. This adds a
"Draft PR Lock" protocol: agents must check for and create a draft PR before
starting work, acting as a distributed lock visible to all platforms.

Changes:
- AGENTS.md §12: new "Task Claiming Protocol" subsection with check/claim/race
  handling steps
- daily-scheduler.md: new Step 1.5 with concrete gh CLI commands
- weekly-scheduler.md: same Step 1.5 addition

https://claude.ai/code/session_01Vnih5ZARbEmnh3EGTDQAXX
2026-02-12 22:02:37 +00:00
Claude 2e0bcefa4b docs(agents): add scheduler-update-agent to daily rotation
Add a new daily agent whose job is to keep the daily and weekly scheduler
rosters in sync with the actual prompt files on disk. It scans the prompt
directories, diffs against the roster tables, and applies additions,
removals, or filename corrections as needed.

- New file: docs/agents/prompts/daily/bitvid-scheduler-update-agent.md
- Updated daily-scheduler.md roster (20 -> 21 agents)

https://claude.ai/code/session_01KZQjoJKmPH74AK3QF1pzSq
2026-02-12 19:43:46 +00:00
Claude 647abfdd05 chore(agents): add daily agent scheduler prompt and task log
Replace the ad-hoc scheduling instructions with a structured
scheduler prompt that handles task rotation, error cases, and
CSV-based run tracking.

https://claude.ai/code/session_019EdLsbzCWtht1R3qk7pptb
2026-02-12 19:22:43 +00:00