Add weekly scheduled research-brief workflow - #9
Draft
CDave79 wants to merge 1 commit into
Draft
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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):
npm ci, set up Node 22.npx tsx src/index.ts "<topic>"→ coordinator produces a markdown report.reports/YYYY-MM-DD.mdand commits it back to the branch.DEFAULT_TOPICenv var;workflow_dispatchaccepts a per-runtopicoverride.GITHUB_TOKEN(contents: write); token-authored commits don't re-trigger workflows, so there's no loop.Required before it works
ANTHROPIC_API_KEYrepo secret (Settings → Secrets and variables → Actions). The "Generate brief" step fails without it.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