Bring Your Own Pipeline (BYOP) Setup
The CI-Native Agent runs no hosted sandbox. Tier 2 validation uses the CI pipeline you already have. This page covers wiring it in.
Prerequisitesโ
- The SquireX GitHub App installed on the repository
- GitHub Advanced Security enabled (the agent reacts to
code_scanning_alert) - An existing CI workflow that runs your tests (
sf apex run test, ServiceNow ATF, or MuleSoft MUnit)
1. Enable the agentโ
The CI-Native Agent is opt-in per installation. It only runs when the feature flag is set:
AUTOFIX_ENABLED=true
Select an LLM provider:
LLM_PROVIDER=anthropic # Claude Sonnet with prompt caching (default)
# or
LLM_PROVIDER=copilot # GitHub Copilot via the GitHub Models API
Provide the matching credential (ANTHROPIC_API_KEY for Anthropic; the GitHub token scope for Copilot).
2. Confirm GitHub App permissionsโ
The app manifest requests the minimum needed to run the loop:
contents: writeโ branch creation and single-file commitsactions: readโ downloading CI failure logs for retry context- Webhook events:
code_scanning_alert,check_run
3. Proactive scanning (recommended)โ
Add the proactive scan workflow so alerts are generated automatically. It runs on push to main and on a weekly schedule, uploads SARIF to GHAS, and the resulting code_scanning_alert webhook drives the autofix loop:
# .github/workflows/proactive-scan.yml is included by the SquireX setup
on:
push:
branches: [main]
schedule:
- cron: '0 6 * * 1'
4. Your CI is the only test runnerโ
No changes to your test pipeline are required. SquireX does not run your tests โ it reacts to the check_run.completed webhook your existing workflow already emits. Keep using your own credentials, runners, and org connections.
Verifying the loopโ
- Trigger a known violation (e.g., an Apex file with an
AGENTFORCE-1.1issue). - Confirm a branch
squirex-autofix/alert-{id}is created with the patched file. - Confirm your CI runs and a
check_runwebhook is received. - Green CI: the draft PR comments "Fixed. Tests green. Ready to merge."
- Red CI: a new commit is pushed to the same branch with the CI error in context.
- Merge the PR and confirm a billing record is created.
See The Fix Loop for the full state machine.