Multi-IDE Support
Home GitHub

Multi-IDE Support

Part VI: Enterprise · Chapter 20

4 min read

Draft is not locked to a single AI coding tool. The methodology — the skills, agents, templates, and procedures — exists as markdown and bash, independent of any platform. A build pipeline transforms these source files into platform-specific integration formats. The result: every supported IDE gets the same methodology, with minor syntax adaptations.

Draft Core Claude Code Copilot Cursor Gemini Antigravity IDE Same methodology, same context files — platform-specific syntax only
Hub-and-spoke architecture: Draft's core methodology radiates to all supported IDEs through a build pipeline that adapts syntax while preserving identical functionality.

One installer, every host

All hosts install through the npm CLI. <host> is one of claude-code, cursor, codex, or opencode:

npx @drafthq/draft install <host>
# or: npm install -g @drafthq/draft && draft install <host>

Claude Code (Native)

Claude Code is Draft's native environment:

npx @drafthq/draft install claude-code
# alternative: /plugin marketplace add drafthq/draft && /plugin install draft

The full command surface (4 primaries + 5 routers as recommended interface + 24 specialists) is available as /draft:* slash commands. Skills are loaded from the .claude-plugin/plugin.json manifest, which points to the skills/ directory. Each skill's SKILL.md file is read at invocation time, giving Claude Code direct access to the full methodology without any transformation.

The 7 specialized agents (Architect, Debugger, Planner, RCA, Reviewer, Ops, Writer) are referenced as @architect, @debugger, etc., and resolved from core/agents/.

Cursor

Cursor requires a .cursor-plugin/plugin.json manifest plus registration in the shared Claude plugin registry. The CLI installs the full plugin tree to ~/.cursor/plugins/local/draft, writes the manifest, and registers + enables draft@draft-plugins:

npx @drafthq/draft install cursor

Registry writes are atomic and non-destructive — other plugins, hooks, and unknown keys are preserved. Existing installs that predate the registration fix upgrade with draft install cursor --force. Restart Cursor (or run Developer: Reload Window) to load the /draft:* commands.

GitHub Copilot

Copilot does not have a plugin system that can read skill files at runtime. Instead, Draft uses a .github/copilot-instructions.md file — a single, large generated file (~23,600 lines) that encodes the entire Draft methodology inline.

This file is produced by the build pipeline (scripts/build-integrations.sh) and includes:

  • All 33 skill definitions (minus frontmatter, plus syntax transforms)
  • All core reference files (methodology, knowledge base, shared procedures, templates, agent definitions)
  • Quality disciplines, communication style, and proactive behaviors
  • Intent mapping for natural language triggers

Two key syntax transformations apply:

Source SyntaxCopilot SyntaxExample
/draft:commanddraft command/draft:implement becomes draft implement
@architect, @debugger, etc.@workspaceAll agent references become @workspace

Copilot is not a draft install host — copy the generated instructions file directly:

curl -o .github/copilot-instructions.md https://raw.githubusercontent.com/drafthq/draft/main/integrations/copilot/.github/copilot-instructions.md

Codex & opencode (AGENTS.md)

Codex and opencode both read an AGENTS.md from the repo root. Draft ships a generated AGENTS.md (the full inlined methodology, with native agent names preserved) and the CLI drops it in place:

npx @drafthq/draft install codex      # writes ./AGENTS.md
npx @drafthq/draft install opencode   # writes ./AGENTS.md + ~/.agents/skills/draft

opencode additionally bundles Draft's skills under the cross-host ~/.agents/skills/draft convention.

Gemini

Gemini uses a .gemini.md bootstrap file that points to Draft's skill files. Like Copilot, it is not a draft install host — copy the file directly:

curl -o .gemini.md https://raw.githubusercontent.com/drafthq/draft/main/integrations/gemini/.gemini.md

The Build Pipeline

The transformation from source skills to platform-specific integrations is handled by scripts/build-integrations.sh, a ~700-line bash script that is the critical path for multi-IDE support.

The pipeline works as follows:

  1. Skill ordering — A SKILL_ORDER array defines the 33 skills and their generation order. This order is independent of the alphabetical order in plugin.json.
  2. Frontmatter extraction — Each skill's YAML frontmatter (name: and description:) is validated. The body is extracted via extract_body(), which strips the frontmatter delimiters.
  3. Body format validation — The body must follow a strict format: blank line, # Title heading, blank line, then content. The build skips the first 3 body lines when inlining (the title is replaced by the integration's section header).
  4. Syntax transformation — Platform-specific transforms are applied: /draft:command becomes draft command for Copilot, agent references become @workspace.
  5. Core file inlining — 62 core reference files (methodology, shared procedures, templates, agents, guardrails) are inlined into the output, each wrapped in <core-file> tags.
  6. Verificationverify_output() checks minimum line count (>1000), completeness sentinel (DRAFT_BUILD_COMPLETE), and that no untransformed syntax remains.

The build is atomic: output is written to a temporary file, verified, then moved to the final location. A failed verification deletes the temp file and exits with an error, leaving the previous output intact.

skills/ *.md (33 skills) SKILL_ORDER Ordering Frontmatter Extract & Validate Body Skip first 3 lines Syntax /draft: → draft Core Inline 62 reference files Verify Lines, sentinel, syntax copilot- instructions.md Build pipeline: 33 skill files → 6 stages → 1 generated integration file (~23,600 lines)
The build pipeline: 33 skill source files pass through 6 transformation stages to produce a single platform-specific integration file, with atomic output and post-build verification.

Choosing Your IDE

All supported IDEs receive the same Draft methodology. The differences are operational, not functional:

FactorClaude Code / CursorCopilotGemini / Antigravity
SetupPlugin installCopy one fileBootstrap file or global clone
Command syntax/draft:commanddraft commandNatural language
Agent references@architect, etc.@workspaceAs configured
Skill loadingOn-demand from filesPre-inlined in one fileBootstrap + file read
Updates/plugin updateRe-download filegit pull

The methodology is identical. The context files are identical. The plans, specs, architecture documents, and tracks are identical regardless of which IDE produced them. A team can have one developer using Claude Code and another using Copilot — both work on the same draft/ directory with full compatibility.

Single Source of Truth

Skills (skills/<name>/SKILL.md) are the source of truth. Integration files are generated artifacts. Never edit .github/copilot-instructions.md directly — edit the skill, run make build, and the integration files are regenerated. This ensures all platforms stay in sync.