AgentRC — prime your repositories for AI-assisted development.
AgentRC commands return structured output and exit codes designed for CI pipelines.
- Node.js 20+ on the runner
- Auth token — GitHub:
GITHUB_TOKENorGH_TOKEN. Azure DevOps:AZURE_DEVOPS_PATorAZDO_PAT. - Copilot CLI — required for
eval(it calls the Copilot SDK). Not needed forreadiness. See the VS Code Copilot Chat extension docs for installation.
readinessis a pure static analysis — it works anywhere Node runs.evalinvokes AI models via the Copilot SDK, so the runner needs Copilot CLI installed and authenticated.
Fail if the repo drops below a maturity level:
agentrc readiness --fail-level 3 --jsonExits with code 1 if the readiness level is below 3. The --json flag outputs a machine-readable result to stdout.
Fail if instruction quality drops below a pass rate:
agentrc eval agentrc.eval.json --fail-level 80 --jsonExits with code 1 if the pass rate is below 80%.
name: AgentRC checks
on: [pull_request]
jobs:
readiness:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Check readiness
run: npx github:microsoft/agentrc readiness --fail-level 3 --json
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run eval
run: npx github:microsoft/agentrc eval --fail-level 80 --json
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# eval requires the GitHub Copilot CLI to be installed
# and authenticated on the runner (copilot → /login)trigger:
- main
pool:
vmImage: ubuntu-latest
steps:
- task: NodeTool@0
inputs:
versionSpec: "20.x"
- script: npx github:microsoft/agentrc readiness --fail-level 3 --json
displayName: Check readiness
env:
GITHUB_TOKEN: $(GITHUB_TOKEN) # for GitHub-hosted repos
# AZURE_DEVOPS_PAT: $(AZURE_DEVOPS_PAT) # for Azure DevOps repos
- script: npx github:microsoft/agentrc eval --fail-level 80 --json
displayName: Run eval
env:
GITHUB_TOKEN: $(GITHUB_TOKEN)
# AZURE_DEVOPS_PAT: $(AZURE_DEVOPS_PAT)
# eval requires the GitHub Copilot CLI to be installed
# and authenticated on the runner (copilot → /login)Use a policy to enforce org-specific standards:
npx github:microsoft/agentrc readiness --policy ./policies/strict.json --fail-level 3 --jsonThe pattern works in any CI that has Node.js:
npx github:microsoft/agentrc readiness --fail-level 3 --json
npx github:microsoft/agentrc eval --fail-level 80 --jsonBoth commands exit 0 on success and 1 when --fail-level is breached. Use --json to get structured output for downstream tooling.
Both commands output a CommandResult<T> envelope when --json is set:
{
"ok": true,
"status": "success",
"data": { ... }
}Status values: "success", "partial", "noop", "error". The process exit code is 0 for success and 1 when --fail-level is breached or a command error occurs.