Install and configure the Archgate plugin for Cursor. Add an always-apply governance rule plus skills and sub-agents so Cursor's AI reads your ADRs before coding and validates compliance after.
Archgate integrates with Cursor to give its AI agent the same structured governance workflow available in Claude Code: read the applicable ADRs before writing code, validate after, and capture new patterns for the team. The integration combines an always-apply Cursor rule with the Archgate skills and agents.
What the plugin provides
Section titled “What the plugin provides”The plugin (archgate, version 0.7.0) registers a Cursor marketplace entry and installs an agent, five skills, and a governance rule. Cursor’s plugin system handles namespacing, so skills and agents use their direct names without an archgate: prefix.
Agents
Section titled “Agents”| Name | Mode | Purpose |
|---|---|---|
developer | Edits | General development agent. Reads ADRs before coding, validates after, orchestrates the skills. |
planner | Read-only | Designs ADR-compliant implementation approaches without writing or modifying any files. |
Skills
Section titled “Skills”| Name | When it is used |
|---|---|
reviewer | After a code change — validates changes against project ADRs using focused per-domain sub-agents. |
lessons-learned | After coding and validation — captures recurring patterns and codifies them into ADRs. |
adr-author | When creating or editing an ADR — follows the project’s established structure and conventions. |
onboard | Once per project — runs archgate init, explores the codebase, interviews you, writes ADRs. |
cli-reference | Internal: loads the authoritative CLI command, rules-authoring, and ADR-format references. |
These are the same agent and skills shipped in the Claude Code plugin, adapted for Cursor’s plugin system.
Governance rule
Section titled “Governance rule”| File | Purpose |
|---|---|
.cursor/rules/archgate-governance.mdc | An always-apply rule that instructs the agent to consult ADRs and run checks. |
The rule uses alwaysApply: true, so Cursor’s agent always has governance context available without manual activation. It tells the agent to run archgate review-context before coding and archgate check --staged after, and reinforces the key principle: architectural decisions are enforced, not suggested — if archgate check reports violations, they must be fixed.
Installation
Section titled “Installation”-
Log in with GitHub.
Terminal window archgate loginThis obtains your plugin token and stores credentials in your OS credential manager.
-
Initialize the project for Cursor.
Run
archgate initwith the--editor cursorflag:Terminal window archgate init --editor cursorIf you are logged in, this also installs the Archgate plugin. To request the plugin explicitly:
Terminal window archgate init --editor cursor --install-plugin
The plugin is delivered through two channels, both handled by the CLI:
- Cursor team marketplace — a git-based marketplace repository served from
plugins.archgate.dev. After installation, Cursor discovers the plugin from the marketplace URL the CLI prints. (Under the hood, the plugin archive is served as atar.gz.) - VS Code extension (VSIX) — a
.vsixis installed into Cursor viacursor --install-extensionwhen thecursorCLI is available.
The archgate plugin install --editor cursor command installs the VSIX via the cursor CLI if present and prints the team marketplace URL; otherwise it prints manual instructions.
Installing on an existing project
Section titled “Installing on an existing project”archgate plugin install --editor cursorTo retrieve the authenticated marketplace URL for manual setup:
archgate plugin url --editor cursorFirst-time setup: onboard
Section titled “First-time setup: onboard”After installing the plugin, run the onboard skill once per project. It:
- Explores your codebase structure — directories, key files, package configuration.
- Interviews you about your team’s conventions, constraints, and architectural decisions.
- Creates an initial set of ADRs from your answers.
- Sets up the
.archgate/directory with your first rules.
After onboarding, the other skills handle day-to-day development. See Writing ADRs for the format it follows.
How it works in practice
Section titled “How it works in practice”The developer agent follows a structured workflow for every coding task:
- Read applicable ADRs — runs
archgate review-contextto see which ADRs apply to the changed files. It does not write code until it has read them. - Write code following ADR constraints — implements changes against the Do’s and Don’ts from the applicable ADRs.
- Run compliance checks — runs
archgate check --stagedto execute automated rules; fixes any violations before proceeding. - Reviewer pass — invokes the
reviewerskill, which launches a focused sub-agent per affected domain to verify structural compliance against the full ADR set. - Capture learnings — invokes the
lessons-learnedskill to identify patterns worth codifying as new ADRs or updates to existing ones.
For planning-only work, switch to the planner agent: it reads the relevant ADRs, analyzes the codebase, and produces an ADR-compliant plan without modifying any files.
Even without the plugin (the free path), archgate init --editor cursor configures the governance rule. The agent uses that rule and CLI commands to follow four manual steps:
- Review context — run
archgate review-contextto see which ADRs apply to the changed files. - Read individual ADRs — run
archgate adr show <id>(for example,archgate adr show ARCH-001) for full context on a decision. - Write code — implement changes following the applicable ADR constraints.
- Run compliance checks — run
archgate check --stagedto validate compliance.
The free path gives Cursor governance context and CLI-driven checks, but not the role-based skills and sub-agents above.
ADR-driven refusal
Section titled “ADR-driven refusal”When a task would require violating an ADR, the agent refuses, names the ADR, and suggests a compliant alternative — consistently, regardless of phrasing. ADRs are mandatory constraints. For example, asked to add a disallowed dependency in a project governed by a dependency-policy ADR, the agent declines, cites the ADR and the approved list, and proposes the sanctioned alternative.
Session transcript access
Section titled “Session transcript access”The archgate session-context cursor command reads Cursor agent session transcripts from disk, letting skills recover context that may have been compacted or truncated. It accepts two optional flags:
--max-entries <n>— maximum number of (most recent) entries to return; default200.--session-id <uuid>— a specific session UUID; if omitted, the most recent session is used.
For exact command flags and output formats, see the authoritative reference at cli.archgate.dev.
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 | onboard |
| Planning an approach before coding | planner |
| Day-to-day coding tasks | developer |
| Reviewing changes for ADR compliance | reviewer |
| Capturing a recurring pattern as an ADR | lessons-learned |
| Creating or editing an ADR by hand | adr-author |
Most of the time you interact only with the developer agent — it orchestrates reviewer and lessons-learned automatically.