Quickstart — Adopt Morphism in Your Repo¶
NON-NORMATIVE. Get governance running in under 5 minutes.
Prerequisites¶
- Node.js 18+ and npm
- Python 3.10+ (for the category theory engine)
- Git
1. Install the CLI¶
npm install -g @morphism-systems/cli
Or use npx without installing:
npx @morphism-systems/cli doctor
2. Initialize governance¶
Navigate to your project root and run:
morphism init
This creates:
.morphism/config.json— governance configuration with default tenets, invariants, and metrics thresholds
To add governance documents (AGENTS.md, SSOT.md, GUIDELINES.md), copy them from the templates directory and customize for your project.
3. Run your first audit¶
morphism doctor
This checks that all governance files are in place. You should see:
[+] .morphism/ config exists
[+] AGENTS.md exists
[+] SSOT.md exists
[+] Python available
[+] Governance scripts exist
All checks passed
4. Validate governance¶
morphism validate
This runs the full governance validation pipeline and reports:
- Maturity score (0–125)
- Policy compliance
- Documentation coverage
Add --full for categorical validation with proof witness generation:
morphism validate --full
5. Check status anytime¶
morphism status
One-line summary: Maturity: 125/125 | Drift: 0 items | Proofs: 3
6. Detect governance drift¶
morphism diff
Shows which governance files changed since your last commit and whether drift was introduced.
7. Set up MCP server (optional)¶
For AI-assisted governance in Claude, Cursor, or other MCP-compatible tools:
npm install -g @morphism-systems/mcp-server
Add to your MCP config (.claude/mcp.json or equivalent):
{
"mcpServers": {
"morphism-governance": {
"command": "npx",
"args": ["@morphism-systems/mcp-server"]
}
}
}
Available MCP tools:
| Tool | Description |
|---|---|
governance_validate |
Run full validation pipeline |
governance_score |
Compute maturity score |
governance_status |
Quick status summary |
governance_diff |
Governance delta since last commit |
governance_heal |
Dry-run healing for detected drift |
compute_kappa |
Convergence metric |
compute_delta |
Drift metric |
ssot_verify |
SSOT integrity check |
8. Add to CI (optional)¶
Add a governance check to your CI pipeline:
# .github/workflows/governance.yml
name: Governance
on: [push, pull_request]
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: 22 }
- run: npx @morphism-systems/cli doctor
- run: npx @morphism-systems/cli validate
Next steps¶
- Read MORPHISM Framework for the full governance model
- See Worked Example for a real-world walkthrough
- Browse ADRs for architectural decisions