Skip to content

Workflow reference

What each Claude workflow does, when it fires and what gates it, and how this repo's own CI guards the framework.

Every automation workflow is dual-use: it runs live in this repo (dogfooding) and is callable via workflow_call — which is how installed repos consume it through their thin stubs (template/workflows/). All of them share these conventions: OAuth-only auth (CLAUDE_CODE_OAUTH_TOKEN), least-privilege permissions, timeout-minutes, concurrency groups, config loaded via actions/load-config, and prompts that treat issue/PR content as data — numbers are interpolated, bodies never are. The ANTHROPIC_API_KEY fallback is disabled for now (2026-11-15): no workflow passes it to claude-code-action, even when the OAuth token is absent. Each reusable workflow still declares an optional ANTHROPIC_API_KEY workflow_call secret so callers that pass it keep working, but the secret is ignored.

When calling any of them: secrets: inherit from your stub, and grant the stub's job the permissions its jobs use (a reusable workflow can't exceed its caller's grants). The exact contract of each one — triggers, workflow_call inputs and secrets, job permissions, timeouts and concurrency — is generated from the workflow files into reference/workflows.md; this page explains behavior.

Every lane is also bounded and switchable. Each run names an exact model (claude.model from the config, or the workflow's pinned default when that is empty: claude-opus-5-5 in claude-implement.yml, claude-sonnet-5-5 in the others), a turn cap (claude.max_turns; 20 in the auto-merge evaluator) and a dollar ceiling (--max-budget-usd: 15 in the config-driven lanes, 10 in the auto-merge evaluator, 20 in claude.yml), and a run that reaches a cap stops there and fails. Under OAuth the dollar figure is an API-equivalent estimate, so the ceiling bounds throughput, not a bill. Each automation lane also reads a repository variable (CLAUDE_TRIAGE_ENABLED, CLAUDE_IMPLEMENT_ENABLED, CLAUDE_REVIEW_ENABLED, CLAUDE_AUTO_MERGE_ENABLED, CLAUDE_MAINTENANCE_ENABLED, CLAUDE_RELEASE_ENABLED): set it to false under Settings → Secrets and variables → Actions → Variables to stop that lane without a commit. Unset means on, a manual workflow_dispatch always runs, and a consuming repo's own variable is the one that is read. The maintenance switch stops the schedule only; the others stop every event except a manual dispatch.

claude.yml — interactive

  • Triggers: @claude in issue/PR comments or reviews; issue opened/assigned containing @claude. The author of that comment, review or issue must be an owner, member or collaborator of the repository (author_association); a mention from anyone else starts nothing.
  • Behavior: whatever was asked — the action's tag mode with repo context from CLAUDE.md. Branch/PR writes happen through the Claude GitHub App's token, not the workflow token.

claude-triage.yml

  • Triggers: issues opened/reopened; dispatch with issue_number for backfill; call with issue_number.
  • Behavior: tools restricted to gh issue/gh search/read-only file access, so triage cannot touch code. One type:* + priority:* + size:* label each, dedupe search, clarifying questions, single summary comment, claude:triaged (+ claude:needs-human when a human call is needed). Chains into implementation only when triage.auto_implement_labels allows. Skips bot-authored issues and claude:skip.

claude-implement.yml

  • Triggers: issue labeled claude:implement (rename via the trigger_label input); dispatch/call with issue_number.
  • Behavior: marks claude:in-progress, then either (a) stops with questions + claude:needs-human when requirements are ambiguous, or (b) implements on claude/issue-<n>-<slug>, runs standards.test_command, updates stale docs, opens a PR with Closes #<n> + test evidence, links it on the issue. The maintainer-applied label is the authorization boundary.

claude-review.yml

  • Triggers: PR opened/ready_for_review (same-repo, non-draft); label claude:review to (re)run, drafts included; dispatch/call with pr_number.
  • Behavior: reviews diff + surrounding code against the profile's review focus; inline comments classified [blocker]/[important]/[nit]; one sticky verdict comment (includes semver classification where the repo type demands it); adds a size:* label; may nominate clean, path-eligible PRs with the auto-merge label. Never approves or merges. Fork PRs are skipped (no secrets in fork context).

claude-auto-merge.yml

  • Triggers: PR labeled claude:auto-merge; PRs opened by dependabot/renovate; dispatch/call with pr_number. Runs triggered by dependabot read Dependabot secrets, not Actions secrets, so add CLAUDE_CODE_OAUTH_TOKEN under Settings → Secrets → Dependabot as well (an ANTHROPIC_API_KEY there is ignored while auth is OAuth only); claude-review.yml has the same requirement for bot PRs. Both pass allowed_bots: dependabot[bot],renovate[bot] to claude-code-action, which otherwise refuses non-human actors.
  • Behavior: two-phase by design. Phase 1: Claude, with read-only tools, checks the config gate (enabled + author/label + every file in allowed_paths), the content gate (genuinely minor changes only), risk (dependency-diff inspection; major bumps ≥ medium), and CI state — returning a structured verdict via JSON schema. Phase 2: a deterministic bash step posts the verdict comment and, only for eligible && risk ≤ max_risk (high never merges), approves and runs gh pr merge --auto — so the merge still waits for your required checks. If enabling auto-merge fails (repo setting off, no protection), it says so and leaves the PR approved but unmerged.

claude-maintenance.yml

  • Triggers: weekly cron (the stub's cron is what fires for consumers), dispatch/call with optional tasks subset.
  • Behavior: runs the enabled tasks — docs_drift, todo_sweep, dependency_report (manifest reading only, never installs), stale_nudge (max 5), health_report (single updatable issue). All output deduped via the <!-- githubai:maintenance --> marker, capped by max_issues_per_run, labeled type:chore + claude:triaged. Docs fixes become PRs only when auto_fix_docs: true; nothing ever lands on the default branch directly.

claude-release.yml

  • Triggers: push of v* tag (publish mode); dispatch/call with bump (prepare mode).
  • Behavior: publish = categorized release notes from the tag range → GitHub release (draft per config). Prepare = pick the semver bump from commits (or honor the input), update VERSION/CHANGELOG.md on a branch, open a release: vX.Y.Z PR. Tags are never created by automation — pushing the tag stays a human act.

CI for the framework itself

ci.yml (three jobs: tests runs the pytest suite, shell runs shellcheck on the installer, and relay runs the GitHub App relay's npm test in app/relay/, so CI needs Node as well as Python) and markdown-oneline.yml (one-paragraph-per-line prose rule) guard this repo; they are not installed into consumers.