Skip to content

Add weekly scheduled research-brief workflow - #9

Draft
CDave79 wants to merge 1 commit into
mainfrom
claude/new-session-0bdfoy
Draft

Add weekly scheduled research-brief workflow#9
CDave79 wants to merge 1 commit into
mainfrom
claude/new-session-0bdfoy

Conversation

@CDave79

@CDave79 CDave79 commented Jun 22, 2026

Copy link
Copy Markdown
Owner

What

Adds .github/workflows/weekly-brief.yml — a scheduled GitHub Actions workflow (true cron) that runs the Agents CLI on a recurring basis, independent of any live Claude Code session.

Why

A container crontab is ephemeral and dies with the session. A workflow committed to the repo runs on GitHub's infrastructure indefinitely, which is the durable way to schedule recurring work.

Behavior

Each run (cron Mondays 13:00 UTC, plus a manual Run workflow button):

  1. npm ci, set up Node 22.
  2. npx tsx src/index.ts "<topic>" → coordinator produces a markdown report.
  3. Writes it to reports/YYYY-MM-DD.md and commits it back to the branch.
  • The standing topic is a one-line DEFAULT_TOPIC env var; workflow_dispatch accepts a per-run topic override.
  • Commits use the built-in GITHUB_TOKEN (contents: write); token-authored commits don't re-trigger workflows, so there's no loop.

Required before it works

  1. Add the ANTHROPIC_API_KEY repo secret (Settings → Secrets and variables → Actions). The "Generate brief" step fails without it.
  2. Merge to main — scheduled workflows only fire from the default branch, so the weekly cron activates on merge. Until then, test via the Run workflow button.

🤖 Generated with Claude Code


Generated by Claude Code

Runs the Agents CLI on a cron (Mondays 13:00 UTC) plus manual dispatch,
captures the report to reports/YYYY-MM-DD.md, and commits it back. This
gives a durable, session-independent schedule via GitHub Actions instead
of an ephemeral container crontab. Topic is a one-line DEFAULT_TOPIC env
var, overridable per manual run; requires the ANTHROPIC_API_KEY secret.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G6VpgijtYMp8mteVoJvfQu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants