Install and configure the Archgate plugin for Claude Code. Give your agent a governance workflow that reads ADRs before coding, validates after, and captures architectural patterns via skills and sub-agents.
The Archgate plugin for Claude Code is the most complete editor integration. It ships five skills and two sub-agents, and wires them into a structured governance loop: the agent reads the ADRs that apply to the files it is about to touch, writes code against those constraints, validates with automated checks and a focused review pass, and finally captures any new patterns back into your ADRs.
This is the integration most teams start with. If you are evaluating Archgate across editors, see the plugin ecosystem overview for the feature matrix.
What the plugin provides
Section titled “What the plugin provides”The plugin (archgate@archgate, version 0.7.0) registers a marketplace entry in Claude Code and installs two sub-agents and five skills.
Agents
Section titled “Agents”| Agent | Mode | Purpose |
|---|---|---|
archgate:developer | Edits (acceptEdits) | General development agent. Reads applicable ADRs before coding, validates after, and captures learnings. Orchestrates the skills below automatically. |
archgate:planner | Read-only | Designs ADR-compliant implementation approaches without writing or modifying any files. Useful for scoping work before handing it to the developer agent. |
The archgate:developer agent is set as the default agent — the plugin ships a settings.json with { "agent": "archgate:developer" }. It carries memory: project, so governance context persists across sessions in the project.
Skills
Section titled “Skills”| Skill | When the agent uses it |
|---|---|
archgate:reviewer | After a code change — validates all changes against project ADRs using focused per-domain sub-agents. |
archgate:lessons-learned | After coding and validation are complete — captures recurring patterns and codifies them into ADRs. |
archgate:adr-author | When creating or editing an ADR — follows the project’s established ADR structure and conventions. |
archgate:onboard | Once per project — runs archgate init, explores the codebase, interviews you, and writes initial ADRs. |
archgate:cli-reference | Internal: loads the authoritative CLI command, rules-authoring, and ADR-format references on demand. |
You rarely invoke skills by hand. The developer agent calls reviewer and lessons-learned as part of its workflow, and loads cli-reference whenever it needs exact command or rule syntax that may be newer than its training data.
Installation
Section titled “Installation”-
Log in with GitHub.
Authenticate to obtain your plugin token. This starts a GitHub Device Flow — the CLI prints a one-time code and a URL; open the URL, enter the code, and authorize.
Terminal window archgate loginCredentials are stored securely in your OS credential manager via
git credential approve, so the token persists for background plugin updates. -
Initialize your project.
Run
archgate initin your project root. If you are already logged in, the plugin is installed automatically:Terminal window archgate initTo request plugin installation explicitly:
Terminal window archgate init --install-pluginThis writes
.claude/settings.local.jsonwith thearchgate:developeragent and skill permissions pre-configured, and sets up the.archgate/directory. -
Let the CLI register the marketplace.
If the
claudeCLI is on your PATH, the plugin is installed automatically via:Terminal window claude plugin marketplace add # registers the Archgate marketplace (plugins.archgate.dev)claude plugin install archgate@archgateIf the
claudeCLI is not found,archgate initprints these commands for you to run manually.
Installing on an existing project
Section titled “Installing on an existing project”If the project is already initialized, install or reinstall the plugin without re-running archgate init:
archgate plugin installTo get the authenticated marketplace URL for manual configuration:
archgate plugin urlFirst-time setup: onboard
Section titled “First-time setup: onboard”After installation, run the archgate:onboard skill once per project. Ask the agent to onboard the project, and the skill will:
- Explore your codebase structure — directories, key files, package configuration.
- Interview you about your team’s conventions, constraints, and architectural decisions.
- Create an initial set of ADRs from your answers.
- Set up the
.archgate/directory with your first rules.
Onboarding runs once. After that, the other skills handle day-to-day development. See Writing ADRs for the ADR format the onboard skill follows.
How skills and agents drive the loop
Section titled “How skills and agents drive the loop”For every coding task, the developer agent follows a five-phase workflow. The phases map directly onto the governance loop — prevention, detection, and learning.
-
Understand — read the ADRs.
The agent runs
archgate review-contextto get condensed briefings (the Decision and Do’s and Don’ts sections) for every ADR that applies to the changed files, grouped by domain. It does not write code until it has read the applicable ADRs. -
Plan — design a compliant approach.
The agent designs an implementation that satisfies every applicable ADR. If a constraint conflicts with the task, it flags the conflict instead of silently violating the ADR.
-
Write — implement against the constraints.
The agent writes code referencing the Do’s and Don’ts it read in phase 1.
-
Validate — checks, then the reviewer skill.
The agent first discovers and runs your project’s own validation (CI checks, linters, type checkers, tests), then runs
archgate checkfor fast automated rule validation. For an initial task completion it invokes thearchgate:reviewerskill, which launches a focused sub-agent per affected domain to verify structural compliance against the full ADR set. ADR violations are hard blockers; warnings are surfaced to you but do not block. -
Capture — the lessons-learned skill.
After validation passes, the agent invokes
archgate:lessons-learnedto review rule coverage, identify patterns worth codifying, and propose new ADRs or updates to existing ones — so the same decision carries forward to every future session.
ADR-driven refusal
Section titled “ADR-driven refusal”When a task would require violating an ADR, the developer agent refuses, names the ADR that would be violated, and suggests a compliant alternative — consistently, regardless of how the request is phrased. ADRs are treated as mandatory constraints, not suggestions. If you insist on bypassing, it refuses again.
For example, asked to add a Redis cache for sessions in a project where an ADR mandates a database-backed session store, the agent declines, cites the ADR, and proposes a read-through cache on top of the existing store instead.
Read-only planning with the planner agent
Section titled “Read-only planning with the planner agent”When you want a plan before any code is written, switch to the archgate:planner agent. It reads the relevant ADRs, analyzes the codebase, and produces a structured plan — ADR compliance summary, file-level approach, dependencies, risk areas, governance gaps, and a verification strategy — without writing or editing a single file. Hand the resulting plan to the developer agent to execute.
How the plugin reads ADRs
Section titled “How the plugin reads ADRs”The plugin drives the Archgate CLI directly — nothing is sent to an external service. The commands it relies on:
archgate review-context— condensed, domain-grouped briefings for all ADRs applicable to the changed files.archgate check— automated rule checking with violation reporting.archgate adr show <id>— full text of a specific ADR.archgate adr list— inventory of all ADRs with metadata.archgate session-context claude-code— reads session transcripts for context recovery.
All commands run locally and read from your .archgate/adrs/ directory. For exact flags, output formats, and the rules-authoring API, see the authoritative reference at cli.archgate.dev — the plugin itself loads these via the cli-reference skill rather than guessing.
When to use each agent or skill
Section titled “When to use each agent or skill”| Scenario | Use |
|---|---|
| Setting up Archgate on a new project | archgate:onboard |
| Planning an approach before coding | archgate:planner |
| Day-to-day coding tasks | archgate:developer |
| Reviewing changes for ADR compliance | archgate:reviewer |
| Capturing a recurring pattern as an ADR | archgate:lessons-learned |
| Creating or editing an ADR by hand | archgate:adr-author |
Most of the time you interact only with the developer agent — it orchestrates reviewer and lessons-learned automatically.