Files
bitvid/docs/agents/prompts/META_PROMPTS.md
T
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

4.9 KiB

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

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

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.