Track architectural decisions with AI assistance. Organize by domain, manage team workflows, integrate seamlessly with any MCP client.
A comprehensive CLI tool and MCP server for managing Architectural Decision Records (ADRs). Works standalone via command line or integrates directly with AI tools like Claude Code, Codex, Cursor, Windsurf, and any MCP-compatible client.
Simplicity: Zero-config initialization with smart defaults Organization: Domain-based structure keeps decisions discoverable Workflow: Built-in team review process (draft → proposed → accepted) AI-Native: 11 MCP tools enable AI agents to manage decisions directly
- One command init -
decision initcreates everything you need - Smart ID generation - Automatic sequential IDs with customizable prefixes
- Subdirectory-friendly - Run from anywhere in your repo, auto-finds
.decision/ - Git-aware user identity - Auto-detects your name/email for approvals
- Status lifecycle - draft → proposed → accepted/rejected → deprecated/superseded
- Approval tracking - Records who approved/rejected and when
- Relationship linking - Connect related decisions, track supersession chains
- Validation checks - Ensure decisions have required sections before acceptance
- 11 MCP tools - Complete CRUD + workflow operations for AI agents
- Works with any MCP client - Claude Code, Codex, Cursor, Windsurf, Cline, etc.
- AGENTS.md generation - Auto-generated summary for AI context
- User identity management - Configured approver used automatically by AI
- Create decisions interactively or programmatically with templates
- List and filter by status, domain, or tags
- Search across all decision content with relevance scoring
- Show full decision details with frontmatter and content
- Export to JSON or HTML for external tools
- Propose - Submit draft for team review
- Accept/Reject - Record approval with approver identity
- Reopen - Return rejected decisions to draft
- Deprecate - Mark outdated decisions
- Supersede - Replace old decisions with new ones (auto-links both)
- Domain-based folders - Group by area (auth, frontend, backend, etc.)
- Custom templates - Default and security templates included
- Relationship graph - Visualize decision connections (ASCII, DOT, JSON)
- Git history - View change history for any decision
- Customizable ID format -
PRJ-0001,ADR-0001, etc. - Domain management - Add/remove domains dynamically
- Validation rules - Check for missing sections, empty content
- Format normalization - Consistent formatting for clean diffs
Decision CLI is designed for seamless AI collaboration. Once configured, you can ask your AI assistant to manage decisions using natural language.
- Faster documentation - AI drafts decisions from conversation context
- Consistent format - AI follows templates automatically
- Instant search - AI finds relevant decisions before suggesting changes
- Automatic relationships - AI links related decisions as it creates them
- Review assistance - AI validates decisions before proposing
Once the MCP server is configured, you can simply ask:
Creating decisions:
"Create a decision to use Redis for caching in the backend domain"
"Document our choice to use TypeScript strict mode"
"Add an architectural decision for the new authentication flow we just discussed"
Querying decisions:
"What decisions have we made about authentication?"
"Show me all accepted backend decisions"
"Are there any decisions related to caching?"
"List deprecated decisions that might need review"
Updating decisions:
"Update the JWT decision to include the new refresh token strategy"
"Mark decision 5 as accepted"
"Link the Redis caching decision to the session management decision"
"Deprecate the old MongoDB decision since we switched to PostgreSQL"
Workflow management:
"Propose decision 3 for team review"
"Accept all proposed decisions in the auth domain"
"What decisions are waiting for approval?"
The AGENTS.md file is a special summary designed specifically for AI agents. It provides:
Instant Context
- Complete catalog of all decisions organized by domain
- Status overview (how many accepted, proposed, deprecated)
- Recent decisions for quick reference
AI-Optimized Format
- Structured for fast parsing by language models
- Includes decision relationships and supersession chains
- Tags and metadata for semantic search
Always Current
- Regenerate anytime with
decision summary - Only updates when decisions actually change (unless
--force) - Tracks last generation timestamp
How AI Uses AGENTS.md
When you ask an AI assistant about your project's architecture:
- AI reads
.decision/AGENTS.mdfor complete decision context - AI understands what choices have been made and why
- AI avoids suggesting approaches that contradict existing decisions
- AI references relevant decisions when proposing changes
Example AGENTS.md content:
# Decision Records Summary
> Auto-generated summary for AI agents. Last updated: 2024-01-30T10:30:00Z
## Overview
- **Total Decisions:** 15
- **Accepted:** 12
- **Proposed:** 2
- **Draft:** 1
## By Domain
### auth (3 decisions)
- [PRJ-0001] Use JWT for Authentication (accepted)
- [PRJ-0005] Implement MFA with TOTP (accepted)
- [PRJ-0010] Session Management Strategy (proposed)
### backend (4 decisions)
- [PRJ-0003] Use PostgreSQL for Primary Database (accepted)
- [PRJ-0007] Use Redis for Caching (accepted)
...
## Recent Decisions
1. PRJ-0015: API Versioning Strategy (2024-01-28) - proposed
2. PRJ-0014: Error Handling Standards (2024-01-25) - accepted
...
## Relationships
- PRJ-0010 supersedes PRJ-0001
- PRJ-0007 related to PRJ-0003, PRJ-0010Generating the Summary
# Generate/update AGENTS.md
decision summary
# Force regeneration (updates timestamp even if unchanged)
decision summary --forceVia MCP:
{ "name": "decision_summary", "arguments": { "force": true } }-
Initialize user identity first
decision user setup
This ensures AI-created approvals use your real name/email.
-
Keep AGENTS.md in version control The summary helps all team members' AI assistants stay consistent.
-
Reference decisions in prompts "According to PRJ-0003, we use PostgreSQL. How should we handle..."
-
Let AI validate before accepting Ask: "Validate all proposed decisions and show any issues"
-
Use domains consistently Well-organized domains help AI find relevant context faster.
- Node.js >= 20.19.0
Using npx (no install required):
npx @aitool/decision-cli init
npx @aitool/decision-cli new
npx @aitool/decision-cli listGlobal installation:
npm install -g @aitool/decision-cli
# Now use 'decision' command anywhere
decision init
decision new
decision list# Initialize with auto-detected prefix from package.json
decision init
# Or specify a custom prefix
decision init --prefix ADRThis creates:
.decision/
├── config.yaml # Configuration
├── templates/
│ ├── default.md # Standard template
│ └── security.md # Security-focused template
└── general/ # Default domain folder
Set up your identity for decision approvals:
# Auto-detect from git config
decision user setup
# Or specify manually
decision user setup --name "Your Name" --email "you@example.com"# Interactive mode (prompts for title, domain, template)
decision new
# Non-interactive with options
decision new --title "Use Redis for Caching" --domain backend --no-interactive# List all decisions
decision list
# Filter by status
decision list --status accepted
# Filter by domain
decision list --domain auth
# Show specific decision (by ID or number)
decision show 1
decision show PRJ-0001
# Search across all decisions
decision search "authentication"# Submit for review
decision propose 1
# Accept (uses configured user identity)
decision accept 1
# Reject with reason
decision reject 1 --reason "Needs more analysis"
# Reopen rejected decision
decision reopen 1
# Mark as deprecated
decision deprecate 1
# Supersede with new decision
decision supersede 1 2# Link related decisions
decision link 1 2
# Remove link
decision unlink 1 2
# View relationship graph
decision graph
decision graph --format dot # For GraphViz# Validate all decisions
decision validate
# Validate specific decision
decision validate --id 1
# Generate AGENTS.md summary
decision summary
# Export to JSON
decision export --format json --output decisions.json# Show all config
decision config
# Get specific value
decision config get id-format
# Set value
decision config set default-domain backend
# Add new domain
decision config add-domain infrastructure
# Repair next-id cache
decision config repairThe MCP server allows AI tools to manage decisions directly through the Model Context Protocol.
# Global install
decision mcp
# Using npx
npx @aitool/decision-cli mcp# Add MCP server (recommended — uses npx, no global install needed)
claude mcp add decision -- npx @aitool/decision-cli mcp
# Or if installed globally
claude mcp add decision -- decision mcp
# Verify it's registered
claude mcp list
# Remove when no longer needed
claude mcp remove decisionOnce added, just talk to Claude naturally:
You: "Create a decision to use Redis for caching in the backend domain"
You: "What decisions have we made about authentication?"
You: "Mark decision 3 as accepted"
# Add MCP server
codex mcp add decision -- npx @aitool/decision-cli mcp
# Or if installed globally
codex mcp add decision -- decision mcp
# Verify
codex mcp listThen use naturally in your Codex sessions:
You: "List all accepted decisions in the auth domain"
You: "Create a decision for the new authentication flow"
Add to your claude_desktop_config.json:
{
"mcpServers": {
"decision": {
"command": "npx",
"args": ["@aitool/decision-cli", "mcp"],
"cwd": "/path/to/your/project"
}
}
}Or if installed globally:
{
"mcpServers": {
"decision": {
"command": "decision",
"args": ["mcp"]
}
}
}Most MCP clients use the same JSON configuration format. Add to your MCP settings:
{
"mcpServers": {
"decision": {
"command": "npx",
"args": ["@aitool/decision-cli", "mcp"],
"cwd": "/path/to/your/project"
}
}
}Key settings for any MCP client:
- Command:
npx(ordecisionif installed globally) - Args:
["@aitool/decision-cli", "mcp"](or["mcp"]if global) - CWD: Your project root (where
.decision/exists or should be created)
| Tool | Description |
|---|---|
decision_list |
List decisions with optional status/domain/tag filter |
decision_get |
Get decision by ID (full or numeric shorthand) |
decision_create |
Create new decision (non-interactive) |
decision_update |
Update frontmatter and/or content |
decision_status |
Change status (propose/accept/reject/etc.) |
decision_search |
Search by free-text query |
decision_summary |
Generate/update AGENTS.md |
decision_validate |
Validate decisions and return issues |
decision_graph |
Get relationship graph (JSON or DOT) |
decision_user_setup |
Configure user identity for approvals |
decision_user_show |
Display current user configuration |
List accepted decisions:
{ "name": "decision_list", "arguments": { "status": "accepted" } }Create a new decision:
{
"name": "decision_create",
"arguments": {
"title": "Use PostgreSQL for Primary Database",
"domain": "backend",
"content": "## Context\n\nWe need a reliable relational database...\n\n## Decision\n\nUse PostgreSQL...\n\n## Consequences\n\n### Positive\n- ACID compliance..."
}
}Accept a decision (uses configured user identity):
{ "name": "decision_status", "arguments": { "id": "1", "status": "accepted" } }Decisions are stored as Markdown files with YAML frontmatter:
---
id: PRJ-0001
title: Use JWT for Authentication
status: accepted
date: 2024-01-28
domain: auth
deciders: [john, sarah]
tags: [security, api]
related: [PRJ-0003]
approved-by: [John Doe <john@example.com>]
approved-date: 2024-01-30
---
## Context
Our API needs stateless authentication for horizontal scaling...
## Decision
We will use JWT tokens with RS256 signing algorithm...
## Consequences
### Positive
- Stateless authentication scales horizontally
- No session storage required
### Negative
- Token revocation requires deny-list implementationdraft → proposed → accepted → [deprecated | superseded]
↘ rejected → draft (reopen)
.decision/
├── config.yaml # Project configuration
├── user.yaml # User identity (git-ignored)
├── AGENTS.md # Auto-generated AI summary
├── templates/
│ ├── default.md # Standard template
│ └── security.md # Security template
├── auth/ # Domain: auth
│ ├── PRJ-0001-jwt-auth.md
│ └── PRJ-0005-mfa.md
├── frontend/ # Domain: frontend
│ └── PRJ-0002-use-react.md
├── backend/ # Domain: backend
│ └── PRJ-0003-use-postgres.md
└── general/ # Default domain
└── PRJ-0004-coding-standards.md
.decision/config.yaml:
version: 1
project-name: my-project
id-format: "PRJ-{number}"
id-padding: 4
domains:
- auth
- frontend
- backend
- general
default-domain: general
templates:
default: templates/default.md
security: templates/security.md
domain-templates:
auth: security
summary:
auto-generate: false
include-insights: true
include-recent: 5| Key | Description | Default |
|---|---|---|
project-name |
Project identifier | From package.json |
id-format |
ID pattern ({number} placeholder) |
PRJ-{number} |
id-padding |
Zero-padding for numbers | 4 |
domains |
Available domain categories | [general] |
default-domain |
Domain when not specified | general |
templates |
Named template mappings | default, security |
domain-templates |
Default template per domain | - |
npm install
npm run build
node bin/decision.js --helpnpm run build # Build TypeScript
npm run dev # Watch mode
npm test # Run tests
npm run test:watch # Tests in watch mode
npm run lint # Lint code
npm run check # Lint + type checknpm link
decision --help # Now available globally
npm unlink -g @aitool/decision-cli # When doneMIT - see LICENSE
Created by Kurdin