Skip to content

feat(cc)!: v3.1 context diet — single tool, skill, lifecycle, cache, tests #36

feat(cc)!: v3.1 context diet — single tool, skill, lifecycle, cache, tests

feat(cc)!: v3.1 context diet — single tool, skill, lifecycle, cache, tests #36

Workflow file for this run

name: AI Review Team
# both reviewers ride on github apps tied to the user's subscriptions
# (claude max + chatgpt plus). this workflow posts one @mention comment per
# pr/issue pointing both apps at the canonical rubric; the apps respond.
# no api keys, no per-token billing, no curl plumbing.
# see docs/review-process.md for the full process.
on:
pull_request:
types: [opened, ready_for_review]
issues:
types: [opened]
workflow_dispatch:
inputs:
pr_number:
description: PR number to re-review
required: true
type: number
concurrency:
group: ai-review-${{ github.event.pull_request.number || github.event.issue.number || inputs.pr_number }}
cancel-in-progress: true
permissions:
contents: read
pull-requests: write
issues: write
jobs:
pr-review:
name: mention reviewers
runs-on: ubuntu-latest
if: github.event_name != 'issues' && github.event.pull_request.draft != true
steps:
- uses: actions/checkout@v6
- name: check for recent mention
id: guard
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number || inputs.pr_number }}
run: |
set -euo pipefail
cutoff=$(python3 -c "from datetime import datetime, timedelta, timezone; print((datetime.now(timezone.utc) - timedelta(days=7)).isoformat())")
recent=$(gh api "repos/${GITHUB_REPOSITORY}/issues/${PR_NUMBER}/comments" \
--jq "[.[] | select(.user.login == \"github-actions[bot]\" and (.body | contains(\"@claude\")) and .created_at > \"${cutoff}\")] | length")
if [ "${recent}" -gt 0 ]; then
echo "found ${recent} recent @claude mention(s) from this workflow within 7 days; skipping to avoid re-mention loop"
echo "skip=true" >> "$GITHUB_OUTPUT"
else
echo "skip=false" >> "$GITHUB_OUTPUT"
fi
- name: post review mention
if: steps.guard.outputs.skip != 'true'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number || inputs.pr_number }}
run: |
set -euo pipefail
body=$'@claude @codex please review this pr per [.github/AI_REVIEW_RUBRIC.md](.github/AI_REVIEW_RUBRIC.md).\n\nlanes:\n- claude: prose, voice, api/contract shape, skill + hook + plugin surface correctness, tests for the public path.\n- codex: bugs, security, type/shell correctness, dependency hygiene, ci config.\n\noutput one pr comment each in the exact shape from the rubric. if an app is not installed on this repo, the mention sits unanswered and ci stays green.'
gh pr comment "${PR_NUMBER}" --body "${body}"
issue-triage:
name: mention triage
runs-on: ubuntu-latest
if: github.event_name == 'issues'
steps:
- uses: actions/checkout@v6
- name: post triage mention
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ISSUE_NUMBER: ${{ github.event.issue.number }}
run: |
set -euo pipefail
body='@claude please triage this issue per [.github/AI_REVIEW_RUBRIC.md](.github/AI_REVIEW_RUBRIC.md) (issue-triage section).'
gh issue comment "${ISSUE_NUMBER}" --body "${body}"