Files
supabase/.github/workflows/studio-guidelines-sync.yml
Alaister Young 1f4e59ddb0 chore(studio): generate apps/studio/AGENTS.md for CodeRabbit from skills
CodeRabbit's code-guidelines feature auto-detects guideline files and
directory-scopes them: a file applies only to its own directory and below.
Our Studio conventions live in .claude/skills/, which contains no code, so
CodeRabbit would never apply them to apps/studio. AGENTS.md is the right
carrier: CodeRabbit auto-detects **/AGENTS.md, and apps/studio/AGENTS.md
scopes correctly to apps/studio/**. Unlike CLAUDE.md, Claude Code does not
read AGENTS.md, so this adds zero context cost — Claude keeps using the
skills directly, and they stay the single source of truth.

A generator inlines the relevant skills into apps/studio/AGENTS.md (a derived
artifact) so there is no maintenance duplication; CI fails if it drifts.
2026-06-26 14:20:17 +08:00

40 lines
1.1 KiB
YAML

name: Studio Guidelines Sync
on:
pull_request:
branches:
- 'master'
paths:
- '.claude/skills/**'
- 'apps/studio/AGENTS.md'
- 'scripts/sync-studio-guidelines.mjs'
# Cancel old builds on new commit for same workflow + branch/PR
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
check:
name: Check apps/studio/AGENTS.md is in sync
runs-on: blacksmith-4vcpu-ubuntu-2404
steps:
- name: Check out repo
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
with:
persist-credentials: false
sparse-checkout: |
.claude/skills
apps/studio/AGENTS.md
scripts
.nvmrc
- name: Setup node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version-file: '.nvmrc'
- name: Verify guidelines are up to date
run: node scripts/sync-studio-guidelines.mjs --check