Skip to content
Architecture

Three Databases, One MCP Server

Massu AI runs as a local Model Context Protocol server that connects Claude Code to three purpose-built SQLite databases -- giving the AI persistent memory, code intelligence, and governance state.

Central Hub

MCP Server

Routes every tool call to the right database

CodeGraph DB

Read-only

Stores code structure: files, AST nodes, and dependency edges. Built by static analysis and never mutated at runtime.

  • Files & directories
  • AST nodes & symbols
  • Dependency edges

Data DB

Read-write

Holds import edges, tRPC mappings, and the sentinel registry. Updated when the project structure changes.

  • Import edges
  • tRPC mappings
  • Sentinel registry

Memory DB

Read-write

Persists session memory, observations, analytics, and the full audit trail across every AI interaction.

  • Session memory
  • Observations & analytics
  • Audit trail
Installation

One Command. Full Setup.

Install the package, run massu init, and you're done. Framework detection, MCP registration, hook installation, and config generation -- all automatic.

terminal -- zsh

Automatic MCP Registration

massu init automatically registers the MCP server, installs all 11 lifecycle hooks, and detects your framework. No manual configuration needed.

.mcp.json
json
// .mcp.json (auto-generated by massu init)
{
"mcpServers": {
"massu": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@massu/core"]
}
}
}
Configuration

One Config File Rules Everything

All project-specific data lives in massu.config.yaml -- domains, rules, framework settings, and tool prefixes. Zero hardcoding.

massu.config.yaml
yaml
# Auto-generated by: npx massu init
project:
name: my-project
root: auto
framework:
type: typescript
router: trpc
orm: prisma
ui: nextjs
paths:
source: src
aliases:
"@": src
toolPrefix: massu
domains:
- name: Authentication
routers: ['src/server/api/routers/auth.ts']
pages: ['src/app/(auth)/**']
- name: Billing
routers: ['src/server/api/routers/billing.ts']
pages: ['src/app/dashboard/billing/**']
rules:
- pattern: "src/**/*.ts"
rules:
- "Use ESM imports, not CommonJS"
- "All mutations must use protectedProcedure"
- "No hardcoded credentials"
Architecture

Domain Mapping

Map logical domains to directory patterns so Massu AI understands your architecture and can scope impact analysis.

Governance

Custom Rules

Define project-specific coding rules with severity levels. Massu AI enforces them during every AI interaction.

Intelligence

Framework Awareness

Declare your stack once. Massu AI adapts tool behavior, pattern scanning, and validation to your framework.

Workflow

31 Commands. Complete Governance.

A complete command ecosystem for AI-assisted development: from planning through implementation, testing, security, and release. Each command enforces verification before moving forward.

1
/massu-create-planRead-only

Create Plan

Generate a structured plan document with deliverables, verification requirements, and blast-radius analysis.

2
/massu-planRead-only

Audit Plan

Review and improve the plan document. Ensure every requirement has a verification type and every change has a blast-radius entry.

3
/massu-loopEdits code

Implement

Execute the plan item by item with mandatory verification at each step. Loops until 100% of items are verified with proof.

4
/massu-commitRead-only

Pre-Commit Gate

Run type checks, tests, and pattern scanning. Blocks the commit if any verification fails. Fixes issues automatically.

5
/massu-pushRead-only

Pre-Push Gate

Full verification sweep before pushing: types, tests, patterns, and audit trail completeness. Nothing ships unchecked.

Development Tools

/massu-test

Intelligent test runner with failure analysis, coverage gaps, and test generation.

/massu-debug

Systematic debugging with hypothesis testing and root cause tracing.

/massu-refactor

Safe refactoring with behavioral equivalence verification and automatic rollback.

/massu-hotfix

Quick scoped fix workflow — max 3 files, then branch, test, commit, PR.

/massu-new-feature

Feature scaffolding with config registration, test stubs, and verification plan.

/massu-cleanup

Dead code removal — unused imports, orphaned files, dead exports, and stale references.

/massu-doc-gen

Generate JSDoc comments, README sections, and API documentation for undocumented code.

/massu-tdd

Test-driven development cycle with RED/GREEN/IMPROVE phases and behavioral verification.

/massu-golden-path

Complete end-to-end workflow from plan creation through implementation, testing, and push.

/massu-dead-code

Detect and remove dead code, orphaned modules, unused exports, and stale references.

/massu-docs

Documentation sync ensuring docs align with code changes across the project.

/massu-loop-playwright

Iterative development loop with Playwright browser testing — implement, verify visually, and refine.

/massu-simplify

Code simplification and cleanup — reduce complexity, flatten abstractions, and remove unnecessary indirection.

Quality & Security

/massu-review

Automated code review across 7 dimensions including AI-specific and performance.

/massu-audit-deps

Dependency vulnerabilities, outdated packages, licenses, and bundle impact.

/massu-push-light

Fast pre-push verification — type check and pattern scan without full test suite.

/massu-verify

Run all VR-* verification checks — build, type, test, pattern, security, and coverage.

/massu-verify-playwright

Browser-based page verification via Playwright for visual and functional testing.

/massu-deps

Dependency audit covering security vulnerabilities, available updates, and compatibility checks.

/massu-parity

Generic feature parity check between two systems to identify gaps and drift.

Release & Ops

/massu-release

Version bump, changelog, pre-release verification, and tagging.

/massu-changelog

Generate changelog entries from conventional commits.

/massu-deploy

Structured deployment workflow with pre-deploy verification, environment checks, and rollback planning.

Diagnostics & Insights

/massu-status

Project health dashboard with 14 health checks.

/massu-estimate

Effort estimation with complexity scoring, codebase impact analysis, and historical comparison.

/massu-guide

Interactive onboarding walkthrough for the codebase with architecture maps and key patterns.

The Difference

Before and After Massu AI

See how Massu AI transforms ad-hoc AI coding into a governed engineering practice.

Without Massu AI

  • Hope AI remembers context between sessions
  • No verification -- trust that changes are correct
  • Same mistakes repeated every session
  • No audit trail of what AI changed and why
  • Quality varies wildly between sessions

With Massu AI

  • Cross-session memory retains everything
  • Mandatory verification with command output as proof
  • Incidents become permanent safeguards
  • Complete audit trail for compliance
  • Consistent quality scoring on every change
The Flywheel

Every Session Makes the System Smarter

Massu AI creates a compounding data flywheel. The more you use it, the better it gets -- automatically.

1

Code

AI writes code using governed tools and cross-session memory.

2

Learn

Massu AI observes patterns, incidents, and quality metrics.

3

Remember

Observations persist in the Memory DB across sessions.

4

Govern

Rules, thresholds, and safeguards tighten based on real data.

5

Better Code

Each session starts smarter than the last. Quality compounds.

CI/CD Integration

Automate Governance in Your Pipeline

Integrate Massu AI into your CI/CD workflow with GitHub Actions, webhooks, REST API, and quality badges.

GitHub Actions

PR Risk Scoring

GitHub Actions workflow that analyzes impact, regression, security, and coupling for every pull request.

Real-time

Webhook Notifications

Real-time HTTP callbacks when quality scores change, budgets are exceeded, or security alerts are detected.

Public

Quality Badges

Embed live quality, security, and cost score badges in your repository README using shields.io-compatible SVG.

Extensible

REST API

Full REST API with scoped API keys for custom integrations, CI/CD pipelines, and internal tooling.

Cost Intelligence

Know Exactly What AI Costs

Track spending per session, per model, and per feature. Set budgets, get alerts, and forecast month-end totals from your daily rate.

Daily Trends

Line charts showing cost over time with budget reference lines.

Model Breakdown

See which AI models cost the most with stacked bar charts.

Budget Alerts

Set monthly limits and get email alerts when approaching them.

Spend Forecasting

Project month-end totals based on your current daily rate.

Feature Attribution

Donut charts showing cost distribution across features.

Period Comparison

Compare this week vs last week, this month vs last month.

Enterprise Governance

Compliance on Autopilot

From continuous monitoring to audit-ready evidence packages — Massu automates the compliance workflow so your team can focus on building.

1
Real-time

Continuous Compliance Monitoring

Massu automatically evaluates every synced session against your active policies, computing a real-time compliance score (0-100) and logging violations with full context.

2
Automated

Scheduled Reports & Evidence

Configure automated report generation on weekly, monthly, or quarterly schedules. Reports are distributed to stakeholders via email with SOC2 and ISO 27001 templates built in.

3
PDF Export

Evidence Package Generation

Generate downloadable PDF evidence bundles containing audit chain certificates, change logs, approval records, and policy compliance summaries — ready for external auditors.

4
Governance

Rule Marketplace

Browse and install curated rule packs covering SOC2 compliance, React best practices, API security, and more. Enterprise organizations can create private packs to share across teams.

Team Intelligence

Make Your Whole Team Smarter

Weekly digests, code review insights, onboarding guides, and a shared prompt library -- built from your team's collective AI session data.

Automated

Weekly Digests

Automated email summaries with quality trends, cost breakdown, session counts, risk alerts, and top-performing prompts -- delivered every Monday.

Analytics

Code Review Insights

Aggregated health scores, risk hotspot identification, coupling change detection, and developer activity heatmaps across your team.

Knowledge

Onboarding Guides

Auto-generated documentation from team knowledge: key patterns, common mistakes, important files, domain maps, and personalized learning paths.

Collaboration

Prompt Library

Save, search, share, and rate effective prompts. Build a team-wide collection of proven instructions with effectiveness scoring.

Ready to Govern Your AI Code?

The open-source core is free forever. Install now and experience governed AI development today.