| # ---------------------------------------------------------------------------- | |
| # Licensed to the Apache Software Foundation (ASF) under one | |
| # or more contributor license agreements. See the NOTICE file | |
| # distributed with this work for additional information | |
| # regarding copyright ownership. The ASF licenses this file | |
| # to you under the Apache License, Version 2.0 (the | |
| # "License"); you may not use this file except in compliance | |
| # with the License. You may obtain a copy of the License at | |
| # | |
| # https://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, | |
| # software distributed under the License is distributed on an | |
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | |
| # KIND, either express or implied. See the License for the | |
| # specific language governing permissions and limitations | |
| # under the License. | |
| # ---------------------------------------------------------------------------- | |
| name: "Agent instructions" | |
| # Checks that the generated agent instructions (.claude/rules, .claude/skills, .github/instructions, | |
| # .github/copilot-instructions.md) match their sources in AGENTS.md and .agents/ (see .agents/README.md). | |
| # Fix a failure by running .agents/sync-adapters.sh and committing the result. | |
| on: | |
| push: | |
| branches: [ "develop" ] | |
| paths: | |
| - AGENTS.md | |
| - CLAUDE.md | |
| - .agents/** | |
| - .claude/** | |
| - .github/instructions/** | |
| - .github/copilot-instructions.md | |
| - .github/workflows/agent-instructions.yml | |
| pull_request: | |
| paths: | |
| - AGENTS.md | |
| - CLAUDE.md | |
| - .agents/** | |
| - .claude/** | |
| - .github/instructions/** | |
| - .github/copilot-instructions.md | |
| - .github/workflows/agent-instructions.yml | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| permissions: | |
| contents: read | |
| jobs: | |
| check: | |
| runs-on: ubuntu-slim | |
| timeout-minutes: 5 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v7 | |
| with: | |
| persist-credentials: false | |
| - name: Check the generated copies | |
| run: bash .agents/sync-adapters.sh --check |