A zero-configuration AI context generation and code quality governance toolkit featuring technical debt grading, mutation testing, MCP protocol integration, and deep analysis for 22+ programming languages, designed for AI coding assistant integration and CI/CD quality gate scenarios.
Project Positioning#
PMAT addresses inefficiencies in LLM context construction, lack of technical debt quantification, and difficulties in test effectiveness validation. It generates deep analysis context for Claude, GPT, and other LLMs while providing technical debt grading, mutation testing, and repository health assessment.
Core Capabilities#
Context Generation#
- Deep analysis context generation for Claude, GPT, and other LLMs
- AI-optimized output via
--format llm-optimized - Test file inclusion via
--include-tests
Technical Debt Grading (TDG)#
- 6 orthogonal metrics with A+ to F grading: complexity, coupling, test coverage, documentation completeness, code duplication, security risk
- Baseline creation and regression detection support
Mutation Testing#
- Validates test suite effectiveness with 85%+ kill rate target
- CI optimization mode via
--failures-only
Repository Health Score#
- Quantitative health assessment (0-211 points)
- Full git history analysis via
--deep
MCP Integration#
- 19 MCP tools supporting Claude Code, Cline, and other AI agents
- MCP protocol server mode
Compliance Governance#
- 30+ automated checks covering code quality, best practices, reproducibility
- Check IDs: CB-200 (TDG grade gates), CB-304 (dead code percentage), CB-400 (Shell/Makefile quality), CB-500 (Rust best practices), CB-900 (Markdown link validation), CB-1000 (MLOps model quality)
Git History RAG#
- TF-IDF semantic embedding search through git history
- Supports
--churn,--duplicates,--entropy,--faultsflags
Language Support#
Supports 22+ languages: Rust, TypeScript, Python, Go, Java, C/C++, Lua, Kotlin, Ruby, Swift, SQL, Scala, YAML, Markdown + MLOps model formats (GGUF, SafeTensors, APR)
Installation#
# From crates.io
cargo install pmat
# From source
git clone https://github.com/paiml/paiml-mcp-agent-toolkit
cd paiml-mcp-agent-toolkit && cargo install --path .
CLI Command Examples#
# Context generation
pmat context --output context.md --format llm-optimized
# Technical debt grading
pmat analyze tdg --include-components
pmat tdg baseline create
pmat tdg check-regression
# Mutation testing
pmat mutate --target src/ --threshold 85
# MCP server
pmat mcp
# Compliance check
pmat comply check --strict --format json
# Kaizen auto-improvement
pmat kaizen --dry-run
pmat kaizen --commit --push
Configuration Example#
# .pmat-gates.toml
[tdg]
min_grade = "A"
exclude = ["examples/**", "scripts/**"]
[mutation]
min_score = 85
fail_on_regression = true
Performance Benchmarks#
| Operation | Scale | Avg Time |
|---|---|---|
| Context Generation | 1K LOC | 127ms |
| Context Generation | 10K LOC | 1.84s |
| TDG Scoring | Project-level | 156ms |
| Complexity Analysis | Module-level | 23ms |
Quality Commitments#
- Context generation latency < 5s @ 10K LOC
- Memory usage < 500MB @ 100K LOC
- Test coverage ≥ 85%
- Mutation score ≥ 80%
Sovereign Stack Dependencies#
| Library | Purpose |
|---|---|
| aprender | ML library (text similarity, clustering, topic modeling) |
| trueno | SIMD computation library |
| trueno-graph | GPU-first graph database |
| trueno-rag | RAG pipeline |
| trueno-db | Embedded analytics database |
Version Info#
Current Version: v3.3.0 Releases: 184 Releases, 325+ Tags Primary Language: Rust (97.0%)