# Example: RapidKit agent grounding gate for consumer workspaces # # Copy to your repo as `.github/workflows/rapidkit-agent-grounding.yml` # and adjust `working-directory` to your RapidKit workspace root. # # Requires: Node.js 20+, `rapidkit` available via npx in CI. name: RapidKit Agent Grounding on: pull_request: paths: - '.rapidkit/**' - 'AGENTS.md' - 'CLAUDE.md' - '.github/copilot-instructions.md' - '.cursor/rules/**' workflow_dispatch: jobs: agent-grounding: runs-on: ubuntu-latest defaults: run: working-directory: . # set to your workspace root if nested steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: '20' - name: Install RapidKit CLI run: npm install --no-save rapidkit@latest - name: Run governance pipeline run: npx rapidkit pipeline --json --strict continue-on-error: true id: pipeline - name: Sync and verify agent grounding run: | npx rapidkit workspace agent-sync --write --refresh-context --strict --json --preset enterprise node ./node_modules/rapidkit/scripts/check-agent-customization-drift.mjs --workspace . env: RAPIDKIT_NO_AGENT_SYNC: '0' - name: Upload agent grounding artifacts if: always() uses: actions/upload-artifact@v4 with: name: rapidkit-agent-grounding path: | .rapidkit/reports/INDEX.json .rapidkit/reports/workspace-context-agent.json .rapidkit/reports/agent-customization-pack.json .rapidkit/reports/rapidkit-mcp-design.json .rapidkit/reports/pipeline-last-run.json AGENTS.md if-no-files-found: ignore - name: Fail if pipeline blocked if: steps.pipeline.outcome == 'failure' run: exit 1