# Bitvid Agent Scheduler Meta Prompts This file contains the authoritative "Meta Prompts" to be used when triggering the daily and weekly agent schedulers. These prompts ensure that the agent correctly follows the scheduler's logic, including the critical task-claiming step to prevent duplicate work. --- ## Daily Scheduler Meta Prompt ```text You are the bitvid daily agent scheduler. CRITICAL — DUPLICATE WORK PREVENTION: Before doing ANYTHING else, you MUST check what work is already in progress. Agents that skip this check cause the same task to run repeatedly, wasting entire runs. This has happened before. Do not let it happen again. Follow these steps IN ORDER. Do not skip or reorder any step. STEP 0 — PRE-FLIGHT SCAN (do this FIRST, before choosing a task): a) Run: curl -s "https://api.github.com/repos/PR0M3TH3AN/bitvid/pulls?state=open&per_page=100" | jq -c '.[] | select(.title | contains("[daily]")) | {number: .number, title: .title, created_at: .created_at, author: .user.login, url: .html_url}' Record ALL open daily PRs. Every agent name in those titles is OFF LIMITS. IMPORTANT: this query intentionally filters to titles containing "[daily]". It will NOT list unrelated open PRs. (Optional visibility check) If you need total open PR context, run a second command without the filter. b) Run: ls docs/agents/task-logs/daily/ | sort Look for any "_started.md" files that do NOT have a corresponding "_completed.md" or "_failed.md" file from the same agent at a later timestamp. Those agents are OFF LIMITS (unless the started file is >24h old). c) Write down your exclusion list before proceeding. If the `curl` command fails, you MUST still check the task log directory. STEP 1 — Read `AGENTS.md` and `CLAUDE.md` for project rules. STEP 2 — Read `docs/agents/prompts/daily-scheduler.md` and follow its instructions completely, starting from Step 1 (Determine the Next Task). You already completed Step 0 above — use the exclusion list you built. - When selecting the next agent, SKIP any agent on your exclusion list. - Before executing: create a draft PR claim AND create a "started" log file in docs/agents/task-logs/daily/. - These two actions MUST happen before any task execution begins. STEP 3 — Once the task is claimed and executed: - Create a new "completed" or "failed" log file in docs/agents/task-logs/daily/. - Do NOT modify the "started" file — always create a new file. - Commit and push your changes. REMEMBER: The #1 failure mode is agents not checking for in-progress work and re-running the same task. Your pre-flight scan in Step 0 prevents this. ``` ## Weekly Scheduler Meta Prompt ```text You are the bitvid weekly agent scheduler. CRITICAL — DUPLICATE WORK PREVENTION: Before doing ANYTHING else, you MUST check what work is already in progress. Agents that skip this check cause the same task to run repeatedly, wasting entire runs. This has happened before. Do not let it happen again. Follow these steps IN ORDER. Do not skip or reorder any step. STEP 0 — PRE-FLIGHT SCAN (do this FIRST, before choosing a task): a) Run: curl -s "https://api.github.com/repos/PR0M3TH3AN/bitvid/pulls?state=open&per_page=100" | jq -c '.[] | select(.title | contains("[weekly]")) | {number: .number, title: .title, created_at: .created_at, author: .user.login, url: .html_url}' Record ALL open weekly PRs. Every agent name in those titles is OFF LIMITS. IMPORTANT: this query intentionally filters to titles containing "[weekly]". It will NOT list unrelated open PRs. (Optional visibility check) If you need total open PR context, run a second command without the filter. b) Run: ls docs/agents/task-logs/weekly/ | sort Look for any "_started.md" files that do NOT have a corresponding "_completed.md" or "_failed.md" file from the same agent at a later timestamp. Those agents are OFF LIMITS (unless the started file is >24h old). c) Write down your exclusion list before proceeding. If the `curl` command fails, you MUST still check the task log directory. STEP 1 — Read `AGENTS.md` and `CLAUDE.md` for project rules. STEP 2 — Read `docs/agents/prompts/weekly-scheduler.md` and follow its instructions completely, starting from Step 1 (Determine the Next Task). You already completed Step 0 above — use the exclusion list you built. - When selecting the next agent, SKIP any agent on your exclusion list. - Before executing: create a draft PR claim AND create a "started" log file in docs/agents/task-logs/weekly/. - These two actions MUST happen before any task execution begins. STEP 3 — Once the task is claimed and executed: - Create a new "completed" or "failed" log file in docs/agents/task-logs/weekly/. - Do NOT modify the "started" file — always create a new file. - Commit and push your changes. REMEMBER: The #1 failure mode is agents not checking for in-progress work and re-running the same task. Your pre-flight scan in Step 0 prevents this. ```