v2.4 Knowledge graph engine, 14 deterministic helpers, track impact memory

Code intelligence built into your
AI coding agent.

A knowledge graph that maps your repo. Spec-driven planning. Three-stage review. Twenty-eight commands, one plugin, free forever — for Claude Code, Cursor, Copilot, Antigravity, and Gemini.

28 Commands
9 Languages
6 Graph Modes
5 IDE Integrations
MIT License
Explore
Latest v2.4 · April 26, 2026

Draft 2.4 ships built-in code intelligence

Knowledge graph engine. 14 deterministic helpers. Track-level impact memory. Confidence-tagged call edges. View full changelog →

Tree-sitter graph Atomic incremental 28 sections Free forever

AI tools ship fast
but create chaos

Without structure, AI makes assumptions, chooses arbitrary approaches, and produces code that doesn't fit your architecture.

01

Assumption-Driven

Guesses at requirements instead of asking clarifying questions

02

Arbitrary Choices

Picks random technical approaches without considering your stack

03

Poor Fit

Produces code that doesn't match existing patterns or conventions

04

No Checkpoints

Skips verification and claims completion without proof

Without Draft

  • Context in ephemeral chat
  • No version history for decisions
  • Loads entire project every session
  • Unsearchable conversations
  • Invisible to teammates

With Draft

  • File-based persistent memory
  • Git-tracked specs with diffs and blame
  • Scoped context per track
  • Grep-able specs and plans
  • PR-reviewable planning artifacts

Your repo, queryable.

Draft ships a knowledge graph engine that maps every module, call, dependency, and hotspot in your codebase. Six query modes. No daemon. No external service. Try the queries below — these are real outputs from running Draft against itself.

$ graph --query --file core/methodology.md --mode impact

                

Tree-sitter parsers for Go, Python, TS/JS, C/C++ · ctags fallback for Java/Rust/Ruby/Swift · Atomic incremental builds via per-module SHA-256

How the engine works →

The only one with all three.

Most tools cover one corner of AI-assisted development. Draft brings methodology, codebase intelligence, and verification together in one plugin.

  Draft Cursor / Copilot / Aider Sourcegraph / GitNexus ChatPRD / specStory
Spec-driven planning Specs & phased plans before code No No Yes
Knowledge graph engine Built-in tree-sitter, 6 query modes Indexes only Yes (separate service) No
Three-stage code review Validation · spec compliance · quality Inline diff suggestions No No
Bug discovery 14-dimension sweep + taint tracking Per-file hints No No
ACID-style audits Module lifecycle deep-review No No No
Multi-IDE Claude, Cursor, Copilot, Antigravity, Gemini Each tool, separately Editor extensions Web-only mostly
Persistent context Git-tracked spec/plan/architecture Session-bound Index, not artifacts App-bound
Price Free, MIT, no telemetry Subscription SaaS Subscription

Comparison reflects Draft 2.4 vs. publicly-documented features of named alternatives as of April 2026. Draft is the open-source plugin you install once and own forever.

Three jobs. One plugin.

/draft:init — your codebase, fully mapped

One command performs a 5-phase deep analysis of your entire codebase. Every future interaction is grounded in this understanding.

1

Discovery

Directory structure, build files, API definitions, interface/type files. Signal classification categorizes every source file into 11 categories (routes, services, auth, models, state, jobs, persistence, tests, config...) to drive adaptive analysis depth.

2

Wiring

Entry points, orchestrator initialization, registry/registration code, dependency injection, module system, import graph. Maps how components find and connect to each other.

3

Depth

End-to-end data flows, core module implementations, concurrency model, safety checks. Traces invariants, validation, auth gates. Identifies state machines and consistency boundaries.

4

Periphery

External dependencies, test infrastructure, configuration mechanisms, existing documentation. Maps the full operational envelope of your system.

5

Synthesis

Cross-reference, completeness validation, pattern identification, Mermaid diagram generation. Produces architecture.md (28 sections + 5 appendices) and derives .ai-context.md (200-400 lines, token-optimized).

State Persistence — Pay the cost once

freshness.json

SHA-256 hashes of every analyzed file. /draft:init refresh only re-analyzes files with changed hashes — no full re-scan.

signals.json

11-category signal classification. Detects structural drift on refresh (e.g., auth files added for the first time).

run-memory.json

Phases completed, unresolved questions, resumable checkpoints. Interrupted runs resume where they left off.

Then: Spec → Implement → Verify

02

Spec & Plan

/draft:new-track

Collaborative intake — AI asks one question at a time, contributes expertise, surfaces risks. Builds spec progressively with citations from DDD, Clean Architecture, OWASP.

03

Implement

/draft:implement

RED → GREEN → REFACTOR. Production robustness patterns enforced (atomicity, isolation, durability, idempotency, fail-closed, resilience). Property-based testing, observability prompts, contract testing at service boundaries.

04

Review

/draft:review

3-stage review with STRIDE threat modeling, SAST tool integration, breaking change detection, context-specific checks (crypto, DB, API, config, UI).

05

Bug Hunt

/draft:bughunt

14-dimension sweep with taint tracking, dependency/supply chain security, algorithmic complexity analysis, mutation testing awareness. Only HIGH/CONFIRMED confidence reported.

Each layer narrows the solution space. By the time AI writes code, most decisions are already made. product.md → tech-stack.md → .ai-context.md → spec.md → plan.md. 7 specialized agents (Planner, Architect, Reviewer, Debugger, RCA, Ops, Writer) enforce this at every step.

Enterprise-grade methodology,
zero cost

5-Phase Analysis

Architecture Discovery

Deep codebase analysis generating a comprehensive engineering reference with 28 sections + 5 appendices, Mermaid diagrams, data state machines, and consistency boundaries. Derives a 200-400 line machine-optimized .ai-context.md for all AI agents. Classifies files into 11 signal categories for adaptive analysis depth.

28 sections11 signalsIncremental refresh

TDD Enforcement

RED → GREEN → REFACTOR cycle. Production robustness patterns enforced: atomicity, isolation, durability, idempotency, fail-closed, resilience. Property-based testing, observability prompts, contract testing at service boundaries.

95%+ target7 robustness patterns

3-Stage Code Review

Automated validation + spec compliance + code quality. STRIDE threat modeling for new endpoints. Context-specific checks (crypto, DB, API, config, UI). SAST tool integration. Adversarial pass on zero findings.

3 stagesSTRIDESAST

Collaborative Intake

AI as expert partner — asks one question at a time, contributes patterns, risks, trade-offs. Builds spec progressively with citations from DDD, Clean Architecture, OWASP.

AI as partner
Exhaustive Sweep

14-Dimension Bug Hunt

Systematic defect discovery across 14 dimensions: correctness, reliability, security, performance, UI responsiveness, concurrency, state management, API contracts, accessibility, configuration, tests, dependency/supply chain security, algorithmic complexity, and i18n/l10n. Severity-ranked with file:line locations. Only HIGH/CONFIRMED confidence — false-positive elimination and taint tracking built in.

14 dimensionsTaint trackingConfidence filteringRegression tests

ACID Deep Review

Module lifecycle audit evaluating atomicity, isolation, durability, fail-closed behavior, and idempotency. Enterprise-grade production pattern enforcement.

ACID compliant

Pattern Learning

Scans your codebase for recurring patterns (3+ occurrences). Discovers conventions to skip and anti-patterns to always flag. Every quality command updates guardrails.md after each run — your codebase teaches Draft what to enforce, and false positives disappear over time.

Auto-learningTemporal analysisguardrails.md
v2.4 · Built-in

Knowledge Graph Engine

Tree-sitter parsers for Go, Python, TS/JS, C/C++ · ctags fallback for Java/Rust/Ruby/Swift. Six query modes — callers, impact, hotspots, modules, cycles, mermaid. Atomic incremental builds via per-module SHA-256 hashing. Call edges carry confidence markers (direct vs inferred); impact queries break results down by code/test/doc/config. Powers /draft:impact, enriches /draft:bughunt and /draft:review.

9 languages6 query modesAtomic incrementalConfidence-tagged
v2.4

Track Impact Memory

Each completed track records its blast radius in metadata.json — files touched, modules affected, downstream count, by-category breakdown. /draft:new-track reads recent tracks' impact during context load and surfaces overlap warnings before you even write a spec.

Auto-recordedOverlap detection
14 helpers

Deterministic Helpers

Skills delegate mechanical work to 14 shell tools under scripts/tools/ — git metadata, file classification, hotspot ranking, cycle detection, freshness checks, ADR indexing, test-framework detection, and more. Uniform JSON output and exit-code contract; graceful degradation when input is missing.

JSON contractReproducible
Enterprise

Enterprise Ready

Monorepo federation with service discovery and dependency graphs. Jira integration (Track → Epic, Phase → Story, Task → Sub-task). Architecture Decision Records with full lifecycle. Git-aware task/phase/track-level revert. Mid-track change management with impact analysis.

MonorepoJiraADRsRevertChange mgmt

Full development lifecycle

draft-terminal
$ |
/draft Overview and intent mapping
/draft:init Initialize project context
/draft:index Monorepo federation
/draft:new-track Collaborative spec + plan
/draft:implement TDD workflow execution
/draft:status Progress overview
/draft:change Mid-track amendments
/draft:revert Git-aware rollback
/draft:review 3-stage code review
/draft:deep-review ACID module audit
/draft:bughunt 14-dimension sweep
/draft:coverage Coverage report (95%+)
/draft:learn Pattern discovery
/draft:decompose Module decomposition
/draft:adr Architecture Decision Records
/draft:jira-preview Generate Jira export
/draft:jira-create Push to Jira via MCP
/draft:debug Structured debugging sessions
/draft:quick-review Lightweight code review
/draft:deploy-checklist Pre-deployment verification
/draft:testing-strategy Test plan design
/draft:tech-debt Technical debt analysis
/draft:standup Git activity standup summaries
/draft:incident-response Incident management lifecycle
/draft:documentation Technical documentation generation
/draft:tour Interactive codebase walk-through
/draft:impact Project metrics and ROI analytics
/draft:assist-review Summarize intent for PR reviewers

Review specs, not surprises

Every markdown file goes through commit → review → merge before a single line of code is written. By the time implementation starts, the entire team has already agreed on what to build.

1

Initialize

Tech lead runs /draft:init. Team reviews architecture, tech stack, and workflow via PR.

2

Spec & Plan

Lead runs /draft:new-track. Team reviews requirements and task breakdown via PR.

3

Decompose

Lead runs /draft:decompose. Team reviews module boundaries and API surfaces via PR.

4

Distribute

/draft:jira-create pushes epics and stories to Jira. Developers pick up stories with full context.

5

Implement

Every developer has spec.md, plan.md, and .ai-context.md. Quality tools verify completeness.

Changing a sentence in spec.md takes seconds. Changing an architectural decision after 2,000 lines of code takes days.

Install in 30 seconds

Works with your existing tools. Zero switching cost.

Claude Code CLI
# Install from marketplace
/plugin marketplace add mayurpise/draft
/plugin install draft

# Start using
/draft:init

Prerequisites: Claude Code CLI, Git, Node.js 18+

Cursor Setup
# Cursor > Settings > Rules > New > Add from Github:
https://github.com/mayurpise/draft.git

# Then use:
@draft init
@draft new-track

Cursor natively supports .claude/ plugin structure

GitHub Copilot
# Download copilot-instructions.md
mkdir -p .github && curl -o .github/copilot-instructions.md \
  https://raw.githubusercontent.com/mayurpise/draft/main/integrations/copilot/.github/copilot-instructions.md

Works in VS Code, JetBrains, Neovim

Antigravity IDE
# Install globally
mkdir -p ~/.gemini/antigravity/skills
git clone https://github.com/mayurpise/draft.git ~/.gemini/antigravity/skills/draft

# Bootstrap
curl -o ~/.gemini.md https://raw.githubusercontent.com/mayurpise/draft/main/integrations/gemini/.gemini.md
Gemini
# Add bootstrap to your project
curl -o .gemini.md https://raw.githubusercontent.com/mayurpise/draft/main/integrations/gemini/.gemini.md
No vendor lock-in. Your specs, plans, and architecture docs are plain markdown files in your repo. Switch tools any time — your project knowledge stays with you.

Your codebase, fully understood

/draft:init performs a 5-phase codebase analysis — not a diagram of intent, a map of reality.

1

System Map

Directory structure, entry points, request/response flows with actual file:line references.

2

Data Lifecycle

State machines per domain object. Storage topology across cache, DB, event log, archive.

3

Critical Paths

End-to-end write/read paths with consistency boundaries and failure recovery matrix.

4

System Constraints

Critical invariants: data safety, security, concurrency, ordering, idempotency.

5

Extension Cookbooks

Step-by-step guides: "Add a new endpoint", "Add a new model" — file-by-file instructions.

S

State Persistence

SHA-256 freshness hashes, 11-category signal classification, resumable run memory. Incremental refresh only re-analyzes what changed.

.ai-context.md

Machine-optimized · 200-400 lines

Dense tables, YAML frontmatter, flat sections. Token-efficient — minimal prose, maximum signal. Consumed by all Draft commands and external AI tools.

architecture.md

Human-readable · 28 sections + 5 appendices

Prose paragraphs, annotated Mermaid diagrams, onboarding framing. Source of truth — all mutations happen here. For engineers, leads, and PR reviewers.

guardrails.md

Auto-learning · Hard rules + discovered patterns

Human-defined constraints plus auto-discovered conventions and anti-patterns. Quality commands read this file, skip known patterns, and flag violations — then update it after every run. Your codebase teaches Draft what to enforce.

Pay the analysis cost once, benefit on every interaction. Reduces token cost, eliminates hallucinations, improves accuracy. The AI writes code that fits your system because it knows your system — and guardrails ensure it respects your rules.

Who it's for

Draft speaks different languages to different roles — but the value compounds across your entire organization.

Engineers

IC / Senior / Staff

TDD enforcement, 14-dimension bug hunting, architecture discovery with Mermaid diagrams, pattern learning. Write code that fits your system because Draft knows your system.

/draft:implement + /draft:bughunt

Engineering Managers

EM / Director

Review specs before code exists. PR-reviewable planning artifacts. Team alignment through documents, not meetings. Quality gates at every phase boundary.

Specs are 10x cheaper to change than code

Product Managers

PM / TPM

Readable specs anyone can review. Jira integration with auto story points. Status tracking across tracks. Know what's being built before it's built.

/draft:jira-preview + /draft:status

CXOs & VPs

CTO / VP Eng / CISO

FAANG-level engineering practices at zero cost. ACID compliance audits, Architecture Decision Records, monorepo federation. Maturity Level 4/5. MIT licensed, no vendor lock-in.

Enterprise-grade methodology, free forever

Open Source & Enthusiasts

Hobbyist / Indie / Student

Architecture discovery turns any project into a documented system. Bug hunting catches what you'd never find manually. Free, open source, MIT license.

/draft:init + /draft:bughunt = instant quality

FAANG-level practices, free

Draft codifies the engineering culture of Google, Amazon, and Stripe into an AI-assisted workflow.

Rank Practice Draft Implementation Industry Equivalent Companies
1 Design-First Engineering spec.md & plan.md per track Amazon PR/FAQ, Google Design Docs Google, Amazon, Stripe, Uber
1 Monorepo / Shared Context /draft:index federation Unified codebase, dependency graphing Google, Meta, Twitter
2 Test-Driven Development /draft:implement RED-GREEN-REFACTOR TDD / CI Gates Netflix, Pivotal
3 Structured Code Review /draft:review 3-stage Google Critique system Google, Meta
3 Architecture Decision Records /draft:adr + architecture.md Immutable ADRs Spotify, AWS, GitHub
4 Bug Bashes /draft:bughunt 14 dimensions Scheduled team testing sessions Microsoft, Game Studios
5 Service Catalog product.md + tech-stack.md Internal Developer Platform Spotify, Lyft

Draft

$0

Free forever. Open source, MIT licensed.

Host tool costs apply (Claude Code, Copilot, etc.)

Kiro (AWS)

$19-39/mo

Free preview, then paid tiers

Cursor

$20-40/mo

Free tier, then Pro/Business

Windsurf

$15+/mo

Free tier, then paid

Maturity Level 4/5 (High). Adopting Draft puts your workflow on par with Staff Engineer practices at FAANG companies: proposing implementations of specs, performing systematic bughunts, and maintaining architectural documents.

Frequently asked questions

What is Draft?

Draft is a free, open-source plugin that adds Context-Driven Development to AI coding agents. It provides 28 commands covering spec-driven planning, TDD enforcement, 3-stage code review, 14-dimension bug hunting, and architecture discovery for Claude Code, Cursor, GitHub Copilot, Antigravity IDE, and Gemini.

Is Draft free?

Yes, Draft is completely free and open source under the MIT license. There are no paid tiers, no usage limits, and no vendor lock-in. The only costs are from the host AI tools you use (Claude Code, Copilot, etc.).

What AI coding agents does Draft support?

Draft supports Claude Code, Cursor, GitHub Copilot, Antigravity IDE, and Gemini. It integrates natively with each platform using their respective configuration formats — slash commands for Claude Code and Cursor, copilot-instructions.md for Copilot, and .gemini.md for Gemini and Antigravity.

How do I install Draft?

For Claude Code, run /plugin marketplace add mayurpise/draft then /plugin install draft. For Cursor, add the GitHub repo via Settings > Rules. For Copilot, download copilot-instructions.md into your .github directory. Each platform takes under 30 seconds to set up.

What is Context-Driven Development?

Context-Driven Development is a methodology where AI coding agents operate from persistent, file-based project context rather than ephemeral chat. Draft analyzes your codebase to generate architecture docs, then enforces a spec-first workflow: specifications and plans are written and reviewed before any code is generated.

Does Draft work with my existing project?

Yes. Running /draft:init performs a 5-phase analysis of your existing codebase, generating architecture documentation, AI context files, and signal classifications. It works with any language, framework, or project structure — brownfield or greenfield.

How is Draft different from other AI coding tools?

Draft is not an AI coding tool — it is a methodology layer that runs on top of existing AI agents. While tools like Cursor or Copilot generate code, Draft ensures that code follows approved specifications, passes TDD gates, and fits your architecture. It adds structure and quality gates, not another AI model.

Does Draft require any configuration?

Minimal. After installation, run /draft:init and it automatically analyzes your codebase and generates all necessary configuration files (product.md, tech-stack.md, architecture.md, etc.). You can customize these files afterward, but the defaults work out of the box.

Can Draft work with monorepos?

Yes. The /draft:index command provides monorepo federation — it discovers services, builds dependency graphs, and aggregates context across multiple packages or services. Each service gets its own context while maintaining a unified root-level view.

Does Draft support Jira integration?

Yes. /draft:jira-preview generates a Jira export file mapping tracks to epics, phases to stories, and tasks to sub-tasks with auto-generated story points. /draft:jira-create pushes these issues to Jira via MCP.