Skip to content

Weekly repository review

weekly-review.yml runs on a schedule or by manual dispatch. It checks out the chosen branch and reads one area at a time, with the repository configuration and optional project rules.

Place area Markdown files in .claude/rules/, or set weekly.areas_dir. List the area's file globs under paths in the frontmatter. For example, save this as .claude/rules/checkout.md in a repository that has a src/checkout/ directory:

---
paths:
- "src/checkout/**"
---
The server recalculates order totals before writing an order.

Area filenames rotate in sorted order by ISO week. Pass area: checkout to choose the area explicitly. The security and bug passes read the area's bounded context. A check by an independent model (the jobs.weekly_confirm route in the default-branch settings) reads cited files and their direct imports. The check never uses the profile that found the issue, or any profile with the same model ID. Only confirmed findings are filed, so a one-profile setup runs the find passes but files nothing. Unconfirmed findings, duplicates, files omitted for size, and findings unchecked because of spend limits stay in the summary. A normal run posts a summary issue and closes that summary. dry_run prints the result instead.

Save as .github/workflows/weekly-review.yml, enable WEEKLY_REVIEW_ENABLED, install the CodeHawk App, and supply the provider secrets used by the default-branch settings. The caller below shows the optional legacy inference override and slots for existing installations. For a first run, use manual dispatch with dry_run checked. It still makes billable model calls.

name: Code Hawk weekly review
on:
schedule:
- cron: '0 22 * * 0'
workflow_dispatch:
inputs:
area:
description: 'Area filename without .md'
type: string
default: ''
dry_run:
description: 'Log results without filing issues'
type: boolean
default: true
permissions:
contents: read
issues: read
concurrency:
group: codehawk-weekly
cancel-in-progress: false
jobs:
review:
if: vars.WEEKLY_REVIEW_ENABLED == 'true'
permissions:
contents: read
issues: read
id-token: write
uses: bts-io/codehawk/.github/workflows/weekly-review.yml@<sha> # codehawk <version>
with:
inference: ${{ vars.CODEHAWK_INFERENCE }}
area: ${{ inputs.area || '' }}
dry_run: ${{ inputs.dry_run || false }}
max_usd: ${{ vars.REVIEW_WEEKLY_MAX_USD }}
context_tokens: ${{ vars.REVIEW_WEEKLY_CONTEXT_TOKENS }}
secrets:
CODEHAWK_CREDENTIAL_1: ${{ secrets.CODEHAWK_CREDENTIAL_1 }}
CODEHAWK_CREDENTIAL_2: ${{ secrets.CODEHAWK_CREDENTIAL_2 }}

The example forwards slot 2 for an independent checker on a second provider. Forward only the slots your inference document uses.

If weekly.auto_fix_severities is set, filed issues of those severities also get the configured fix label. Run fixes from a caller you control. See verified fixes for label-event handling.

For your own App, add app_id under with and forward CODEHAWK_PRIVATE_KEY under secrets. See the self-hosted App lines. The hosted App needs neither.