Getting started
Examples use
agentrigas shorthand fornpx @doidor/agentrig. Auth: AgentRig defaults to the GitHub Copilot CLI provider —gh auth loginis the only setup. Switch viaAGENTRIG_PROVIDER.
1. Install#
In any repo — fresh or existing:
agentrig initinit is non-destructive by default. If you already have AGENTS.md, .mcp.json, or rules in
.agents/rules/, they're preserved verbatim and the rest of the harness is installed around
them. Pass --force to overwrite.
What lands:
.agentrig/ harness state-machine, role prompts, eval rubric, dashboard
.agents/ rules/ skills/ wiki/
AGENTS.md canonical agent instructions (the source of truth)
.mcp.json MCP server registry
scripts/ hermetic per-agent worktree script
+ projected surfaces for Copilot, Claude, Cursor, Codex, OpenCode, MCPSee agent surfaces → for what lands where.
Adopting AgentRig in a repo that already has an agent harness#
Preserved files appear in the install summary:
✔ installed 30 artifact(s)
preserved 2 existing file(s) — pass --force to overwrite:
· AGENTS.md
· .mcp.jsonYour existing AGENTS.md is still compiled into every projected surface.
2. Iterate#
Edit AGENTS.md and rules, then re-project:
agentrig compile # re-project AGENTS.md + rules into every surface
agentrig doctor # health check + Install Completeness + Quality Probes
agentrig update # pull newer best practices from the package
agentrig update --auto-fix # …and self-heal broken YAML / unknown model ids from canonical
agentrig fix # standalone repair (no agent / network needed)compile is idempotent — run it as often as you want; user-owned files like
copilot-setup-steps.yml are never clobbered, and the auto-populated
<!-- AGENTRIG:skills-inventory --> ... :end --> block in AGENTS.md is rewritten from
whatever's actually in .agents/skills/. doctor on a fresh install reports
Install Completeness 100%.
3. Evaluate#
agentrig eval --scaffold # generate eval scenarios tailored to your repo's stack
agentrig eval --static --min 80 # CI gate: fail if Install Completeness < 80%
agentrig eval # full agentic run — harness vs baselineeval --scaffold is the fastest way to make the eval kit yours — it reads the repo
investigation from init and writes fixture-based scenarios that use your real test runner and
package manager, instead of the generic bundled templates. --static is deterministic and runs in
milliseconds (no model). The full agentic run scores both the implementation work (via a
deterministic oracle) and agent behavior (via an independent judge in a different model family).
Full rubric →
Next#
- Commands reference → — every flag.
- Agent surfaces → — projection map per vendor.
- Evaluating the harness → — does the harness actually help?