Skip to content

Copilot CLI Plugin

The Archgate Copilot CLI plugin gives AI agents working in GitHub Copilot CLI a structured governance workflow. Agents read your ADRs before writing code, validate after, and capture new patterns for the team — the same workflow available in the Claude Code plugin.

Copilot CLI supports plugin installation from git repositories using copilot plugin install. The Archgate plugin is served from a git repository at plugins.archgate.dev/archgate.git, which Copilot CLI recognizes natively — the same .claude-plugin/plugin.json manifest format works for both Claude Code and Copilot CLI.

Authenticate with your GitHub account to obtain a plugin token:

Terminal window
archgate login

This starts a GitHub Device Flow. The CLI displays a one-time code and URL — open the URL in your browser, enter the code, and authorize. Once complete, credentials are stored in ~/.archgate/credentials.

2. Initialize your project with the plugin

Section titled “2. Initialize your project with the plugin”

Run archgate init with the --editor copilot flag:

Terminal window
archgate init --editor copilot

If you are already logged in and the copilot CLI is on your PATH, the plugin is installed automatically via:

Terminal window
copilot plugin install https://<github-user>:<token>@plugins.archgate.dev/archgate.git

If the copilot CLI is not found, the command prints the manual command for you to run.

To explicitly request plugin installation:

Terminal window
archgate init --editor copilot --install-plugin

To install or reinstall the plugin on an already-initialized project:

Terminal window
archgate plugin install --editor copilot

The command creates the .github/copilot/ directory for plugin configuration. Plugin installation is handled separately via the copilot plugin install command.

If the copilot CLI is not found during archgate init, you can install the plugin manually:

Terminal window
copilot plugin install https://<github-user>:<token>@plugins.archgate.dev/archgate.git

You can find your authenticated URL by running archgate login and checking ~/.archgate/credentials.

The plugin adds an agent and role-based skills to Copilot CLI. The agent orchestrates the governance workflow, invoking skills as needed.

AgentPurpose
archgate:developerGeneral development agent that reads ADRs before coding and validates after

The archgate:developer agent is set as the default agent via the plugin settings. It orchestrates the skills below automatically as part of its workflow.

SkillPurpose
archgate:architectValidates code changes against all project ADRs for structural compliance
archgate:quality-managerReviews rule coverage and proposes new ADRs when patterns emerge
archgate:adr-authorCreates and edits ADRs following project conventions
archgate:onboardOne-time setup: explores the codebase, interviews the developer, creates initial ADRs

After installation, run the archgate:onboard skill in your project once. This skill:

  1. Explores your codebase structure (directories, key files, package configuration)
  2. Interviews you about your team’s conventions, constraints, and architectural decisions
  3. Creates an initial set of ADRs based on your responses
  4. Sets up the .archgate/ directory with your first rules

The onboard skill is designed to run once per project. After onboarding, the other skills handle day-to-day development.

The plugin follows a structured workflow for every coding task:

When the developer gives a coding task, the agent runs archgate review-context to read all ADRs that apply to the files being changed. This provides a condensed briefing with the Decision and Do’s and Don’ts sections from each relevant ADR.

The agent writes code that complies with the constraints from the ADRs. The Do’s and Don’ts sections serve as concrete guardrails.

After writing code, the agent runs archgate check to execute automated rules against the changes. Any violations are fixed before proceeding.

The agent invokes archgate:architect to validate structural ADR compliance beyond what automated rules catch.

The agent invokes archgate:quality-manager to review the work and identify patterns worth capturing as new ADRs.

  • Run onboard once per project to generate your initial ADRs from your actual codebase.
  • Keep ADR rule files up to date — the agent enforces what the rules check for.