Documentation
Set up once, your AI assistant automatically understands your team's architecture rules.
How MANTRA Works
MANTRA is a constitutional memory for your AI assistant. Once connected, your AI assistant will automatically understand your architecture rules, coding standards, and technical decisions — without you having to re-explain every session.
Without MANTRA
AI assistant starts from zero every session. Doesn't know your team's rules. May suggest things that contradict existing decisions.
With MANTRA
AI assistant instantly knows all architecture decisions, constraints, and standards. Automatically aligns suggestions with your rules.
You don't need to memorize tool names
AI assistants (Claude Code, Cursor, Windsurf) automatically know when to use MANTRA's 40+ MCP tools. When you ask "how does authentication work in this project?", the AI automatically retrieves relevant decisions. When you write code, the AI automatically checks compliance. You just work as usual — MANTRA works behind the scenes.
1. Connect MANTRA to Your AI Assistant
Add this configuration to your AI assistant. After this, AI automatically has access to all your team's architecture decisions.
{
"mcpServers": {
"mantra": {
"command": "npx",
"args": ["-y", "@anthropic/mantra-mcp-server"],
"env": {
"MANTRA_API_URL": "https://api-mantra.arsaka.io",
"MANTRA_API_KEY": "your-api-key-here"
}
}
}
}How to get an API key: Login to the MANTRA dashboard → Settings → API Keys → Create New Key.
2. Record Your Architecture Decisions
This is the core of MANTRA: record your team's technical rules and decisions. Use the web dashboard, or just ask your AI assistant to create them.
Example conversation with AI assistant:
AI automatically uses mantra_create_decision
mantra_create_decision({
domain: "ARCH",
aspect: "A06",
statement: "Use PostgreSQL with RLS for multi-tenant data isolation",
rationale: "RLS provides row-level security without app-level filtering",
scope_path: "backend/*",
blast_radius: "high",
constraints: [
"All tables MUST have tenant_id column",
"RLS policies MUST be enabled on every tenant table"
]
})4 Decision Domains
INT— Vision, goals, and strategic directionARCH— Technical structure and patternsCTL— Standards and policiesEVO— Migration and system evolution
Decision Code
Every decision gets a unique code:
Domain — Aspect — Sequence — Version
3. Every Decision is Validated in 3 Stages
This process is automatic — you only need to approve at the final stage.
Schema Validation
AUTOMATICSystem automatically ensures correct format: required fields present, valid domain, structured constraints. On failure, the decision is rejected automatically.
AI Quality Check
AUTOMATICAI checks for duplication, conflicts with other decisions, and writing quality. Results are improvement suggestions, not rejections.
Human Approval
YOU APPROVEYou (or a designated team member) review and approve. AI cannot approve — this is a fundamental MANTRA principle. Architecture decisions must always come from humans.
4. AI Assistant Works Automatically for You
Once decisions are recorded, you don't need to do anything special. Your AI assistant automatically uses MANTRA as you work.
Automatically retrieves relevant decisions
When you ask about a topic, AI automatically searches and displays applicable architecture decisions.
You: "How should I implement authentication in the new service?"
AI: Automatically retrieves decision ARCH-A08-001 about JWT + RLS, then answers according to established rules.
Automatically checks code compliance
When AI writes or reviews code, it automatically checks whether the code complies with recorded constraints.
You: "Review this PR before merge."
AI: Automatically runs review from 3 perspectives (security, architecture, compliance) against all applicable decisions.
Automatically warns about conflicts
If you plan something that contradicts an existing decision, AI immediately informs you.
You: "Let's switch all APIs to GraphQL."
AI: Automatically detects conflict with decision ARCH-A07-002 that established a REST-only policy, and explains the contradiction.
Automatically generates documents and IDE rules
Ask AI to create documentation or IDE configurations from existing decisions.
You: "Generate a Tech Spec for the backend architecture."
AI: Automatically retrieves all ARCH domain decisions, compiles a complete Tech Spec with constraints and dependencies.
5. Manage via Dashboard
Besides AI assistant, you can also manage decisions from the web dashboard with visual features.
Decision List & Detail
View all decisions, filter by domain, search, and see full details including constraints and history.
Approval Queue
Review and approve decisions awaiting Gate 3 validation. Approve or reject with comments.
Analytics & Projections
Decision evolution timeline, knowledge graph, tech stack analysis, and blast radius mapping.
Team & Settings
Manage team members, API keys, choose industry template, and configure organization.
Document Generator
Generate PRD, Tech Spec, ADR, Security Spec, and 10 other document types directly from dashboard.
Violation Tracker
View detected constraint violations, track resolution, and monitor compliance score.
What MANTRA Can Generate
From recorded decisions, MANTRA can produce various outputs:
14 Document Types
9 IDE Rule Formats
Export decisions as rules for AI assistants in other IDEs:
Export & Backup
All decisions can be exported anytime in JSON, Markdown, ADR format, or SQL dump. Your data is always yours.
Industry Templates
MANTRA adapts terminology and examples based on your industry. Choose when creating an organization.
Ready to try?
5-minute setup. Your AI assistant instantly understands your team's rules.