Appendix B: Command Reference

This appendix is generated from the binary, not written by hand. Every command path below was read out of pmat 3.32.0’s own --help output and then re-checked by running pmat <path> --help and requiring exit status 0. Nothing in the tables is transcribed from memory. Regenerate it with:

python3 scripts/gen-appendix-b.py > src/appendix-b-commands.md

If you bookmarked this page before 2026-08-25, what you read here was wrong. Earlier editions listed 31 top-level commands that pmat has never had — pmat architecture, pmat rules, pmat clippy, pmat status, pmat scan, pmat dashboard and more. Of the 150 command paths that edition printed, 73 did not resolve. Every one of them is accounted for in Commands earlier editions listed that do not exist, with the real replacement where there is one.

pmat 3.32.0 exposes 70 top-level commands and 202 subcommands.

How to read this appendix

  • Aliases are real. pmat a cx is pmat analyze complexity. Anything in the Aliases column can be substituted for the command name.

  • --help works at every level, and short-circuits before argument validation: pmat <command> --help and pmat <command> <subcommand> --help always print and exit 0 if the path exists. That is exactly the check this appendix is built on.

  • A command with subcommands requires one. pmat analyze . is not “analyze the current directory” — it exits 2 with error: unrecognized subcommand. The path goes to the subcommand: pmat analyze complexity --path .

  • Path arguments are not uniform, and this is the single most common mistake. Some commands take a positional path, some take --path, some take --project-path, and passing a positional to a command that wants a flag exits 2 with error: unexpected argument found. The tables below name the form for every command, so check the column rather than guessing:

    pmat tdg .                              # positional
    pmat analyze complexity --path .        # --path
    pmat quality-gate --project-path .      # --project-path
    
  • [NOT AVAILABLE in the default build] in a description is pmat’s own wording. Those commands parse and appear in --help, but the shipped cargo install pmat binary refuses them at runtime; they need a non-default --features build. They are marked ⚠ below.

Top-level commands

CommandAliasesSubcommandsWhat it does
pmat generategen, g—Generate a single template
pmat scaffoldsc11Scaffold complete project or agent
pmat listls—List available templates
pmat searchfind, s—Search templates
pmat validate——Validate template parameters
pmat contextctx, ast—Generate project context (AST analysis)
pmat queryq, search-code—Semantic code search with quality annotations (RAG-powered)
pmat analyzea, an35Analyze code metrics and patterns
pmat qddqd3Quality-Driven Development (QDD) tool for creating and refactoring code with guaranteed quality
pmat demod, show—⚠ [NOT AVAILABLE in the default build] Interactive demo — needs –features demo
pmat validate-docsdocs, doc—Validate documentation links
pmat validate-readmereadme, hallucination—Validate README/documentation for factual accuracy and hallucinations
pmat red-teamrt, hallucination-detect1Red Team Mode: Automated hallucination detection for commits and code
pmat orgorganization2⚠ [NOT AVAILABLE in the default build] Organizational intelligence — needs –features org-intelligence
pmat mcp—3Connect pmat to an MCP client: every transport, in one place
pmat agyantigravity1Google Anti-Gravity customizations translator
pmat initbootstrap—Bootstrap an agent-ready workspace: quality hook, MCP registration, skill and root rules file
pmat promptp9AI prompt generation (defect-aware, ticket-based, spec-based)
pmat quality-gatecheck, c, gate—Run quality gate checks on the codebase
pmat reportr, rep—Generate enhanced analysis reports
pmat score——Unified quality score — geometric composite (0-100)
pmat repo-scorehealth—Calculate repository health score (0-100 scale)
pmat rust-project-scorerust-score—Calculate Rust project quality score (0-289 scale; the reported total excludes categories that do not apply to the project)
pmat popper-scorepopper, falsifiability—Calculate Popper Falsifiability Score (0-100 scale)
pmat demo-scorebook-score, score-demo—Score demo/book repository quality (0-10 Category G scale)
pmat brick-scorebrick, computebrick—ComputeBrick profiling score (0-100 scale) for trueno/realizar ecosystem
pmat infra-scoreinfra, ci-score—Infrastructure Score (0-100 + 12 bonus) for CI/CD quality
pmat deps-auditdeps, audit-deps—Audit dependencies for Sovereign AI stack migration
pmat serveserver, api—Serve the MCP tool surface over streamable HTTP (--transport http)
pmat diagnosediag, doctor—Run self-diagnostics to verify all features are working
pmat verifypreflight, vfy—Pre-flight verification for autonomous agents: run the CI-faithful gate set (format, complexity, satd, clippy, tests) fail-fast before committing
pmat enforceenf1Enforce extreme quality standards using state machine
pmat refactorref, rf6Refactor code with real-time analysis or interactive mode
pmat roadmaproad, rm8Roadmap management with PDMT todos and quality gates
pmat test——Performance testing per SPECIFICATION.md Section 30
pmat memory—5Memory management and optimization
pmat cache—1Cache strategy management and optimization
pmat telemetry——Telemetry and system monitoring
pmat config——Configuration management and settings
pmat show-metricsmetrics, trends—Show quality metrics and trends (Phase 3 O(1) Quality Gates)
pmat predict-qualitypredict—Predict when quality metrics will exceed thresholds (Phase 4 O(1) Quality Gates)
pmat record-metricrecord—Record a quality metric observation (Phase 3.4 O(1) Quality Gates - CI/CD)
pmat agentag9⚠ [NOT AVAILABLE in the default build] Claude Code background agent — needs –features agent-daemon
pmat tdggrade, debt-grade9Grade technical debt and code quality (TDG - Technical Debt Grading)
pmat quality-gatesgates, qg3Run configurable quality gates on the current project
pmat maintainmaint, m4Project maintenance commands (cleanup, validation, reports)
pmat hookshook, h8Pre-commit hook management and installation
pmat embedemb3Manage semantic search embeddings for code search
pmat semanticsem, find-code2Semantic code search using embeddings
pmat debugdbg2Time-travel debugging commands for execution traces
pmat workw24Unified GitHub/YAML workflow management
pmat falsifyfalsify-spec—Falsify claims in a work item, spec, or ticket against the codebase
pmat qa-workqa, quality7QA validation after work completion with Toyota Way quality gates
pmat five-whyswhy, debug-whys—Five Whys root cause analysis (Toyota Way methodology) This is the ONLY acceptable debugging method per CLAUDE.md policy
pmat oraclefix, pdca3PMAT Oracle - PDCA loop for automated quality improvement (Toyota Way) Converges ANY Rust project toward perfect quality using CITL signals
pmat perfection-scoreperfection, perfect, ps—Unified 200-point Perfection Score (master-plan-pmat-work-system.md) Aggregates TDG, Repo Score, Rust Score, Coverage, Mutation, Docs, Performance
pmat explainexplain-check, what-is—Explain what a check, metric, or grade means
pmat specspecification6Specification management and validation
pmat ci-localci, local-ci—Run local CI simulation (quality gates, clippy, tests, cross-compilation)
pmat complycompliance19PMAT compliance checking and migration system (runs check by default)
pmat kaizenimprove—Autonomous continuous improvement (Toyota Way Kaizen) Scans, fixes, commits, and files GitHub issues for remaining findings
pmat project-diagpdiag, proj-diag—Rust project diagnostics (20 checks across 5 categories)
pmat test-discoverytest-fix, fix-tests6Systematic test discovery and fixing
pmat test-stabilitytest-flaky, flaky—Detect flaky and timeout-sensitive tests
pmat localizefault, fl—Fault localization using Spectrum-Based Fault Localization (SBFL) Identify suspicious code locations based on test coverage data
pmat extractext—Extract function boundaries from a single file (tree-sitter, no index)
pmat splitsp—Analyze and suggest semantic file splits using Louvain community detection
pmat cuda-tdggpu-tdg, simd-tdg8CUDA-SIMD Technical Debt Gradient (100-point Popper falsification scoring) Analyzes CUDA PTX, SIMD (AVX2/AVX-512/NEON), and WGPU code for defects Integrates Toyota …
pmat sql——Direct SQL access to the function index database
pmat stackstk3Cross-repo dependency coordination for the sovereign AI stack

Commands that take no subcommand

These run directly. The Path column is the form this command accepts a target path in — using the wrong one exits 2.

CommandPathOther positional arguments
pmat generate—<CATEGORY> <TEMPLATE>
pmat list——
pmat search—<QUERY>
pmat validate—<URI>
pmat context--project-path—
pmat query--path[QUERY]
pmat demo--path—
pmat validate-docs——
pmat validate-readme——
pmat init--path—
pmat quality-gate--project-path—
pmat report--project-path—
pmat score--path—
pmat repo-score--path—
pmat rust-project-score--path—
pmat popper-score--path—
pmat demo-score--path—
pmat brick-score--path—
pmat infra-score--path—
pmat deps-audit--path—
pmat serve——
pmat diagnose——
pmat verify——
pmat test—[SUITE]
pmat telemetry——
pmat config——
pmat show-metrics——
pmat predict-quality——
pmat record-metric—<METRIC> <VALUE>
pmat falsify--path<TARGET>
pmat five-whys--path<ISSUE>
pmat perfection-score--path—
pmat explain—[PATTERN]
pmat ci-local--path—
pmat kaizen--path—
pmat project-diag--path—
pmat test-stability--path—
pmat localize——
pmat extract——
pmat split[FILE] (positional)—
pmat sql--path[QUERY]

A — in the Path column means the command takes no path at all, or takes its target some other way. Two that catch people out: pmat extract takes its file as the value of --list (pmat extract --list src/main.rs), and pmat generate takes a template category and name (pmat generate makefile rust/cli -p project_name=demo).

Subcommands by parent

pmat scaffold (aliases: sc)

Scaffold complete project or agent

SubcommandAliasesPathWhat it does
pmat scaffold project——Scaffold a complete project with templates
pmat scaffold agent——Scaffold a deterministic MCP agent
pmat scaffold wasm——Scaffold a WebAssembly project
pmat scaffold list-templates——List available agent templates
pmat scaffold validate-template—<PATH> (positional)Validate an agent template
pmat scaffold list-subagents——List available Claude Code sub-agents
pmat scaffold create-subagent——Create a specific Claude Code sub-agent
pmat scaffold create-all-subagents——Create all MVP Claude Code sub-agents
pmat scaffold validate-subagent——Validate a sub-agent definition file
pmat scaffold show-tool-mapping——Show MCP tool mapping for sub-agents
pmat scaffold export-tool-mapping——Export MCP tool mapping as JSON

pmat analyze (aliases: a an)

Analyze code metrics and patterns

SubcommandAliasesPathWhat it does
pmat analyze bottleneckbtn, hotspot--pathDetect architectural churn bottleneck files
pmat analyze churnch--pathAnalyze code churn (change frequency)
pmat analyze complexitycx, complex--pathAnalyze code complexity with MCP tool composition support
pmat analyze dagdep, graph--pathGenerate dependency graphs using Mermaid
pmat analyze dead-codedead, dc--pathAnalyze dead and unreachable code
pmat analyze defectsknown-defects--pathScan project for known defect patterns (e.g., .unwrap() calls in Rust)
pmat analyze reachabilityorphans, unreachable--pathReport tracked .rs files that no compilation unit reaches
pmat analyze hardcoded-pathsabs-paths, path-leaks--pathFind machine-specific absolute paths baked into source
pmat analyze unrun-testsunrun, test-ledger--pathReport tests no CI leg executes, keyed on the full module path
pmat analyze vacuous-testsvacuous, fake-tests--pathFind #[test] functions that cannot fail
pmat analyze satddebt, td, tech-debt--pathAnalyze Self-Admitted Technical Debt (SATD) in comments
pmat analyze deep-contextcontext, ctx, deep--pathGenerate comprehensive deep context analysis with defect detection
pmat analyze tdg—--pathAnalyze Technical Debt Gradient (TDG) scores
pmat analyze build-tdg—--pathBuild with TDG quality gate (CI/CD optimized)
pmat analyze lint-hotspot—--pathFind the file with highest defect density (lint violations per line)
pmat analyze makefile—<PATH> (positional)Analyze Makefile quality and compliance
pmat analyze provability—--pathAnalyze provability properties using abstract interpretation
pmat analyze duplicates—--pathDetect duplicate code using vectorized MinHash and AST embeddings
pmat analyze defect-prediction—--pathPredict defect probability using ML-based analysis
pmat analyze comprehensive—--pathRun comprehensive multi-dimensional analysis with MCP tool composition
pmat analyze graph-metrics—--pathAnalyze graph metrics and centrality measures
pmat analyze name-similarity—--pathAnalyze name similarity with embeddings
pmat analyze proof-annotations—--pathCollect proof annotations from multiple sources
pmat analyze incremental-coverage—--pathAnalyze incremental coverage changes with caching
pmat analyze coverage-improveimprove-coverage, cov-improve--pathImprove test coverage to target percentage using PMAT tools and Extreme TDD
pmat analyze symbol-table—--pathAnalyze symbol table with cross-references and usage patterns
pmat analyze big-o—--pathAnalyze algorithmic complexity (Big-O) of functions
pmat analyze assembly-script—--pathAnalyze AssemblyScript code
pmat analyze web-assembly—--pathAnalyze WebAssembly binary and text format
pmat analyze clippy—--pathAutomated clippy fixes with confidence-based filtering
pmat analyze entropy—--pathAnalyze pattern entropy for actionable quality improvements
pmat analyze wasm——⚠ [NOT AVAILABLE in the default build] Analyze WebAssembly modules — needs –features wasm-ast
pmat analyze cluster——Cluster code by semantic similarity
pmat analyze topics——Extract semantic topics from codebase
pmat analyze modelsmodel, mlops--pathAnalyze ML model files (GGUF, APR, SafeTensors)

pmat qdd (aliases: qd)

Quality-Driven Development (QDD) tool for creating and refactoring code with guaranteed quality

SubcommandAliasesPathWhat it does
pmat qdd create——Create high-quality code from specification
pmat qdd refactor——Refactor existing code to meet quality standards
pmat qdd validate—--pathValidate code against quality standards

pmat red-team (aliases: rt hallucination-detect)

Red Team Mode: Automated hallucination detection for commits and code

SubcommandAliasesPathWhat it does
pmat red-team analyze—--pathAnalyze a commit message for hallucinations

pmat org (aliases: organization)

[NOT AVAILABLE in the default build] Organizational intelligence — needs –features org-intelligence

SubcommandAliasesPathWhat it does
pmat org analyze——⚠ [REMOVED] Analyze GitHub organization for defect patterns — no longer available in any build
pmat org localize——Fault localization using Tarantula SBFL algorithm (Phase 5-7)

pmat mcp

Connect pmat to an MCP client: every transport, in one place

SubcommandAliasesPathWhat it does
pmat mcp manifest——Manage the MCP manifest file
pmat mcp connectinfo, setup—Print how to connect pmat to an MCP client — every transport, in one place
pmat mcp token——Print a fresh conforming bearer token and nothing else

pmat agy (aliases: antigravity)

Google Anti-Gravity customizations translator

SubcommandAliasesPathWhat it does
pmat agy sync——Report the PMAT work contracts an AGY transpiler would consume, then refuse the transpile: no Anti-Gravity target schema is defined (MACS-017, #984)

pmat prompt (aliases: p)

AI prompt generation (defect-aware, ticket-based, spec-based)

SubcommandAliasesPathWhat it does
pmat prompt show——Show workflow prompt (original functionality - EXTREME TDD, Toyota Way, etc.)
pmat prompt generategen, defect—Generate defect-aware AI prompt from organizational intelligence
pmat prompt tickettkt, fix—Generate EXTREME TDD workflow prompt for fixing a ticket
pmat prompt implementimpl, spec—Generate implementation prompt from specification
pmat prompt scaffold-new-reposcaffold, new—Generate prompt for scaffolding a new repository
pmat prompt complycompliance—Fix all drift from PMAT’s rigid quality processes and restore compliance
pmat prompt bookdocs, mdbook—Create and maintain technical book documentation with EXTREME TDD validation
pmat prompt repo-imagereadme, image—Generate professional repository documentation with badges and polish
pmat prompt github-issueissue, gh—Implement GitHub issue/ticket with full EXTREME TDD workflow

pmat enforce (aliases: enf)

Enforce extreme quality standards using state machine

SubcommandAliasesPathWhat it does
pmat enforce extreme—--project-pathEnforce extreme quality standards

pmat refactor (aliases: ref rf)

Refactor code with real-time analysis or interactive mode

SubcommandAliasesPathWhat it does
pmat refactor serve——Run refactor server mode for batch processing
pmat refactor interactive—--project-pathRun interactive refactoring mode
pmat refactor status——Show current refactoring status
pmat refactor resume——Resume refactoring from checkpoint
pmat refactor auto—--project-pathAI-powered automated refactoring to achieve RIGID extreme quality standards
pmat refactor docs—--project-pathAI-assisted documentation cleanup and refactoring

pmat roadmap (aliases: road rm)

Roadmap management with PDMT todos and quality gates

SubcommandAliasesPathWhat it does
pmat roadmap sync—--pathRender a canonical ROADMAP.yaml from the work store + ledger states (MACS F6 / Component 32). Deterministic: ids sorted, generation timestamp excluded from the content …
pmat roadmap init——Initialize a new sprint in the roadmap
pmat roadmap todos——Generate PDMT todos from roadmap tasks
pmat roadmap start——Start working on a task
pmat roadmap complete——Complete a task (with quality validation)
pmat roadmap status——Check sprint or task status
pmat roadmap validate——Validate sprint readiness for release
pmat roadmap quality-check——Run quality checks for a task

pmat memory

Memory management and optimization

SubcommandAliasesPathWhat it does
pmat memory stats——Show current memory usage statistics
pmat memory cleanup——Force memory cleanup operations
pmat memory configure——Configure memory limits and policies
pmat memory pools——Show detailed pool statistics
pmat memory pressure——Check current memory pressure level

pmat cache

Cache strategy management and optimization

SubcommandAliasesPathWhat it does
pmat cache stats——Display cache statistics and performance metrics

pmat agent (aliases: ag)

[NOT AVAILABLE in the default build] Claude Code background agent — needs –features agent-daemon

SubcommandAliasesPathWhat it does
pmat agent start—--project-pathStart the background agent daemon
pmat agent stop——Stop the background agent daemon
pmat agent status——Show daemon status
pmat agent monitor—--project-pathStart monitoring a new project
pmat agent unmonitor——Stop monitoring a project
pmat agent health——Run health check
pmat agent reload——Reload daemon configuration
pmat agent quality-gate——Run quality gate through agent
pmat agent mcp-server——Start MCP server for testing

pmat tdg (aliases: grade debt-grade)

Grade technical debt and code quality (TDG - Technical Debt Grading)

SubcommandAliasesPathWhat it does
pmat tdg compare——Compare two files or directories
pmat tdg history—--pathView TDG history at specific commits
pmat tdg baseline——Manage TDG baselines for quality regression detection
pmat tdg diagnostics——Show TDG system diagnostics and health status
pmat tdg storage——Manage TDG storage backends
pmat tdg dashboard——⚠ [NOT AVAILABLE in the default build] Start TDG web dashboard server — needs –features http-server
pmat tdg config——Configuration management (single source of truth)
pmat tdg check-regression—--pathCheck for quality regressions against baseline
pmat tdg check-quality—--pathCheck files meet minimum quality thresholds

pmat quality-gates (aliases: gates qg)

Run configurable quality gates on the current project

SubcommandAliasesPathWhat it does
pmat quality-gates init——Initialize .pmat-gates.toml with defaults
pmat quality-gates validate——Validate configuration file
pmat quality-gates show——Show current configuration

pmat maintain (aliases: maint m)

Project maintenance commands (cleanup, validation, reports)

SubcommandAliasesPathWhat it does
pmat maintain roadmap——Validate roadmap structure and ticket consistency
pmat maintain health——Validate project health (build only by default; –all adds tests, coverage, complexity, SATD)
pmat maintain bug-reportbug, report—Create bug report from captured error
pmat maintain cleanup-resourcesclean, cleanup, purge—Clean up development artifacts and caches

pmat hooks (aliases: hook h)

Pre-commit hook management and installation

SubcommandAliasesPathWhat it does
pmat hooks init——Initialize pre-commit hooks (alias for install)
pmat hooks install——Install or update pre-commit hooks
pmat hooks uninstall——Remove PMAT-managed hooks
pmat hooks status——Show hook installation status
pmat hooks verify——Verify hooks work with current configuration
pmat hooks refresh——Regenerate hooks from current configuration
pmat hooks run——Run pre-commit hooks (for CI/CD integration)
pmat hooks cache——O(1) cache management for hooks

pmat embed (aliases: emb)

Manage semantic search embeddings for code search

SubcommandAliasesPathWhat it does
pmat embed sync—--pathSync embeddings for codebase
pmat embed status——Show embedding database status
pmat embed clear——Clear all embeddings (requires –confirm)

pmat semantic (aliases: sem find-code)

Semantic code search using embeddings

SubcommandAliasesPathWhat it does
pmat semantic search——Search code by natural language query
pmat semantic similar——Find code files similar to a reference file

pmat debug (aliases: dbg)

Time-travel debugging commands for execution traces

SubcommandAliasesPathWhat it does
pmat debug servesrv, server—[NOT IMPLEMENTED] DAP (Debug Adapter Protocol) server — exits with an error
pmat debug replayplay, view—[NOT IMPLEMENTED] Replay an execution recording — exits with an error

pmat work (aliases: w)

Unified GitHub/YAML workflow management

SubcommandAliasesPathWhat it does
pmat work addnew, create, a--pathAdd a new work ticket (CREATE)
pmat work listls, l--pathList all work tickets (READ)
pmat work editupdate, e--pathEdit an existing ticket (UPDATE)
pmat work deleterm, remove, del--pathDelete a work ticket (DELETE)
pmat work annotateann, quality, metrics--pathShow unified quality annotations for a ticket
pmat work startbegin, s--pathStart work on a GitHub issue or YAML ticket
pmat work continuecont, c, resume--pathContinue work on existing issue/ticket
pmat work checkpointck, cp--pathRun invariant checkpoint (DbC §4.2)
pmat work completedone, finish, f--pathComplete work on issue/ticket
pmat work delegatehandoff--pathDelegate an active PMAT work contract to a Google Anti-Gravity agent (MACS-019)
pmat work falsifytest-claims--pathRun falsification tests without completing the work item
pmat work cot——Structured chain-of-thought tools: integrity check + derivation (MACS F3 / Component 31)
pmat work ledger——Falsification-ledger tools: hash re-verification + provenance report (MACS F1 / Component 32)
pmat work eventev--pathRecord an agent interruption event (refusal, model switch, session restart, workflow spawn) or acknowledge one (MACS F1/E5)
pmat work claimclaims—Claim exclusive ownership of paths for one agent, so concurrent agents cannot silently collide on the same file (ULTRA-002)
pmat work triage——Record and gate the coverage of a bounded triage pass: what was examined, what was acted on, and what was dropped (ULTRA-003)
pmat work statusst, stat--pathShow work status
pmat work syncsy--pathSynchronize GitHub and YAML
pmat work initsetup, ini--pathInitialize roadmap and hooks
pmat work validatecheck, lint, v--pathValidate roadmap.yaml syntax and content (Part B: UX Improvements)
pmat work migratefix, m--pathAuto-fix common roadmap.yaml issues (Part B: UX Improvements)
pmat work list-statusesvalues, statuses—List all valid status values with descriptions
pmat work scoresc, quality-score--pathScore a work contract (DBC spec 5-dimension quality + lint)
pmat work codebase-scorecbs, portfolio--pathAggregate quality score across all work contracts (DBC spec §14.6)

pmat qa-work (aliases: qa quality)

QA validation after work completion with Toyota Way quality gates

SubcommandAliasesPathWhat it does
pmat qa-work generate-checklistchecklist, cl--pathGenerate QA checklist for a task
pmat qa-work validatecheck, v--pathRun automated QA validation
pmat qa-work reportr--pathGenerate QA report for audit trail
pmat qa-work summaryst, status--pathShow QA status summary
pmat qa-work generate-examplesexamples, ex--pathGenerate example scripts for a feature (V2)
pmat qa-work mcp-sweepsweep, mcp--pathLLM-free deterministic MCP conformance sweep (MACS F5). Spawns the live MCP server over stdio, derives minimal args from each tool’s inputSchema, calls every tool, and …
pmat qa-work specpopper--pathValidate specification with 100-point Popperian falsifiability scoring (Part D & E)

pmat oracle (aliases: fix pdca)

PMAT Oracle - PDCA loop for automated quality improvement (Toyota Way) Converges ANY Rust project toward perfect quality using CITL signals

SubcommandAliasesPathWhat it does
pmat oracle fixf, run--pathRun PDCA fix loop to converge toward perfect project quality Uses CITL (Compiler-In-The-Loop) signals from rustc, clippy, cargo test
pmat oracle statuss--pathShow current project quality status against convergence targets
pmat oracle single—--pathRun a single PDCA iteration (for CI/CD integration)

pmat spec (aliases: specification)

Specification management and validation

SubcommandAliasesPathWhat it does
pmat spec scorevalidate, v—Validate specification with 100-point Popperian score (S-001) Requires ≥95 points to be worked on
pmat spec complyfix, c—Auto-fix spec issues to meet 95-point threshold (S-003)
pmat spec createnew, n—Create new specification from template
pmat spec listls, l--pathList all specifications with their scores
pmat spec syncsy, link—Sync specs with roadmap (bidirectional ticket linking)
pmat spec driftorphans, unlinked—Report specs without roadmap links (drift detection)

pmat comply (aliases: compliance)

PMAT compliance checking and migration system (runs check by default)

SubcommandAliasesPathWhat it does
pmat comply checkstatus--pathCheck project compliance with current PMAT version
pmat comply migrate—--pathMigrate project to latest PMAT standards
pmat comply upgrade—--pathUpgrade project to a specific quality enforcement style (e.g., Popperian)
pmat comply diff—--pathShow changelog since project’s PMAT version
pmat comply update—--pathUpdate hooks and configs to latest versions
pmat comply init—--pathInitialize .pmat/project.toml with current version
pmat comply enforceinstall, hooks--pathInstall git hooks for mandatory work tracking (W-006) Blocks commits without active tickets per master-plan-pmat-work-system.md
pmat comply report—--pathGenerate compliance report (W-009)
pmat comply ledger—--pathCB-2100: generate the comply enforcement ledger
pmat comply ratchet—--pathCB-2102: check the ratchet baselines, or lower them
pmat comply coherence—--pathCB-2101: classify every threshold in .pmat-metrics.toml
pmat comply numeric-claims—[PATH] (positional)CB-2104: report numbers this repository writes down about itself and then contradicts
pmat comply review—--pathLayer 2 (Genchi Genbutsu): Evidence-based review checklist (COMPLY-045) Generates a reviewer checklist with reproducibility, hypothesis, and trace evidence
pmat comply audit—--pathLayer 3 (Governance): Generate audit artifact with sovereign trail (COMPLY-045) Requires clean git state. Produces UNSIGNED compliance evidence pinned to the HEAD commit
pmat comply baseline—--pathGenerate file health baseline for ratchet enforcement Scans source files, calculates health metrics, saves to .pmat/file-health-baseline.json
pmat comply refresh-bindingsrefresh, rb--pathGenerate .pmat/binding-index.json, O(1) caches, and contracts/work/*.yaml Enables CB-1350 differential obligation verification at commit time
pmat comply ratchet-overrideoverride--pathOverride verification level ratchet for a binding (escape hatch for CB-1330). Records signed entry in .pmat-metrics/ratchet-overrides.jsonl, expires in 14 days
pmat comply asset-validateav--pathValidate non-code asset layout contracts (README, Dockerfile, SVG, etc.) Runs CB-1320..1326 checks on a specific asset or all assets
pmat comply cross-cratecc, xc--pathCross-crate duplication detection (CC-001 through CC-005) Detects copy-paste duplication, API divergence, and churn correlation across workspace crates

pmat test-discovery (aliases: test-fix fix-tests)

Systematic test discovery and fixing

SubcommandAliasesPathWhat it does
pmat test-discovery rund--pathDiscover all test failures in workspace
pmat test-discovery categorizecat—Categorize test failures by root cause
pmat test-discovery markm—Mark tests as #[ignore] with reasons
pmat test-discovery verifyv--pathVerify all tests pass after marking
pmat test-discovery create-ticketstickets, t—Create GitHub issues from categorized test failures (Phase 5)
pmat test-discovery resolve-pathsresolve, r--pathResolve test file paths from test names

pmat cuda-tdg (aliases: gpu-tdg simd-tdg)

CUDA-SIMD Technical Debt Gradient (100-point Popper falsification scoring) Analyzes CUDA PTX, SIMD (AVX2/AVX-512/NEON), and WGPU code for defects Integrates Toyota Production System principles with falsificationist methodology

SubcommandAliasesPathWhat it does
pmat cuda-tdg analyze—<PATH> (positional)Analyze a file or directory for CUDA/SIMD defects
pmat cuda-tdg score—[PATH] (positional)Score codebase with 100-point Popper falsification system
pmat cuda-tdg report—[PATH] (positional)Generate detailed defect report
pmat cuda-tdg barrier-check—<PATH> (positional)Check barrier safety (PARITY-114 detection)
pmat cuda-tdg validate-tiles——Validate tile dimensions for attention kernels
pmat cuda-tdg gate—[PATH] (positional)Quality gate for CI/CD (exits non-zero on failure)
pmat cuda-tdg kaizen—[PATH] (positional)Generate Kaizen continuous improvement report
pmat cuda-tdg taxonomy——Show Tauranta fault taxonomy

pmat stack (aliases: stk)

Cross-repo dependency coordination for the sovereign AI stack

SubcommandAliasesPathWhat it does
pmat stack statusst—Show dependency status across all stack repos
pmat stack syncs—Sync dependency versions across repos
pmat stack scaffoldsc—Generate SQI-compliant boilerplate files for repo hygiene

Verified examples

Each block below was executed against pmat 3.32.0 on 2026-08-25, in a two-file Rust fixture, and the exit status recorded. Output is trimmed for length; nothing else is edited.

pmat --version
# pmat 3.32.0                                                     exit 0
pmat analyze complexity --path .
# ✅ Successfully analyzed 1 file(s)
#   Files analyzed: 1
#   Total functions: 3                                            exit 0
pmat analyze satd --path .
# Found 1 SATD violations in 1 files (analysed 1 of 1 file(s) walked)   exit 0
pmat analyze dead-code --path .
#   Files with dead code: 1
#   Dead code percentage: 27.8%                                   exit 0
pmat analyze tdg -p . --format table
#   Average Score: 99.5/100 (A+)                                  exit 0
pmat tdg .
#   Overall Score: 99.5/100 (A+)                                  exit 0
pmat quality-gate -p . --checks complexity
# Quality Gate: PASSED
# Total violations: 0                                             exit 0
pmat analyze dag --target-nodes 10
# 📊 full-dependency: rendered 4 nodes and 0 edges
# graph TD                                                        exit 0
pmat extract --list src/main.rs
# { "file": "src/main.rs", "language": "rust", "items": [ ...     exit 0
pmat search rust --limit 2
#  1. template://readme/rust/cli (score: 9.00)                    exit 0
pmat mcp connect
# prints every way to connect this binary to an MCP client, with
# the exact `claude mcp add` line                                 exit 0

Two failures worth knowing, also executed. They are shown as a table rather than a code block on purpose: this is what a wrong form looks like, not something to type.

CommandResultWhy
pmat analyze .error: unrecognized subcommand, exit 2analyze requires a subcommand, and the path belongs to it: pmat analyze complexity --path .
pmat repo-score .error: unexpected argument found, exit 2repo-score takes --path; a positional path is rejected

Between them these two shapes account for most broken pmat lines in circulation. Check the Path column in the tables above before typing a path.

Commands earlier editions listed that do not exist

Every row here was printed as a working command by this appendix before 2026-08-25. None of them resolve against pmat 3.32.0. The middle column is what the binary actually does when you type it; the right column is the nearest real command, verified to resolve.

Where the right column says nothing — there is no equivalent. pmat has no plugin system, no webhook manager, no notification sender, no team/retrospective features and no secret scanner. That capability was never built; it was only ever written down.

Documented command (fiction)What really happensReal command in pmat 3.32.0
pmat statuserror: unrecognized subcommandpmat diagnose, or pmat score --path .
pmat scanerror: unrecognized subcommandpmat analyze comprehensive --path .
pmat watcherror: unrecognized subcommandnothing — there is no watch mode
pmat complexityerror: unrecognized subcommandpmat analyze complexity --path .
pmat dead-codeerror: unrecognized subcommandpmat analyze dead-code --path .
pmat satderror: unrecognized subcommandpmat analyze satd --path .
pmat similarityerror: unrecognized subcommandpmat analyze name-similarity, pmat analyze duplicates, pmat semantic similar
pmat architecture analyze (and deps, patterns, graph, validate-layers)error: unrecognized subcommandpmat analyze dag, pmat analyze graph-metrics, pmat analyze symbol-table
pmat rules init (and create, test, validate)error: unrecognized subcommandpmat quality-gates init writes .pmat-gates.toml; pmat comply enforces project rules
pmat clippy run (and enable, fix)error: unrecognized subcommandpmat analyze clippy
pmat security scanerror: unrecognized subcommandpmat quality-gate --checks security
pmat secrets scanerror: unrecognized subcommandnothing — pmat does not scan for secrets
pmat auditerror: unrecognized subcommandpmat deps-audit --path . (dependencies), pmat comply audit (governance artifact)
pmat dependencieserror: unrecognized subcommandpmat deps-audit --path .
pmat performance analyze (and hotspots, memory, compare)error: unrecognized subcommandpmat test performance, pmat analyze big-o, pmat analyze bottleneck
pmat benchmarkerror: unrecognized subcommandpmat test throughput
pmat compare / pmat differror: unrecognized subcommandpmat tdg compare, pmat comply diff
pmat merge / pmat export / pmat importerror: unrecognized subcommandnothing — use each command’s own --format and --output
pmat report executivereport takes no subcommand; exits 2pmat report --format json
pmat dashboard serve / pmat dashboard generateerror: unrecognized subcommandpmat tdg dashboard ⚠ (needs --features http-server; not in the shipped build)
pmat team setup / pmat retrospective / pmat review prepareerror: unrecognized subcommandnothing — no team, retrospective or review-prep features exist
pmat webhook / pmat notify slackerror: unrecognized subcommandnothing — pmat sends no notifications
pmat pipeline validateerror: unrecognized subcommandpmat ci-local
pmat plugin list (and install, update)error: unrecognized subcommandnothing — there is no plugin system
pmat ai analyze (and suggest, refactor, review)error: unrecognized subcommandpmat refactor auto, pmat prompt generate, pmat oracle fix
pmat infoerror: unrecognized subcommandpmat diagnose --format json
pmat doctorworks — it is an alias of pmat diagnosepmat diagnose
pmat checkworks — it is an alias of pmat quality-gatepmat quality-gate
pmat complianceworks — it is an alias of pmat complypmat comply check
pmat config set (and get, list, reset, profiles, export, import)config takes no subcommand; exits 2pmat config --show, --edit, --validate, --reset
pmat cache clear (and optimize, warmup, configure)error: unrecognized subcommandonly pmat cache stats exists; delete the .pmat/ directory to clear
pmat hooks configureerror: unrecognized subcommandpmat hooks refresh, pmat hooks verify, pmat hooks status
pmat self-updateerror: unrecognized subcommandcargo install pmat --force
pmat mutateerror: unrecognized subcommandnothing in pmat — run cargo mutants directly
pmat analyze tdg --detailed--detailed is not a flag; exits 2pmat analyze tdg -p . --include-components

Global options

These are accepted by every command (from pmat --help):

OptionDescription
--mode <cli|mcp>Force CLI or MCP mode instead of auto-detecting. --mode mcp starts the MCP stdio server
-v, --verboseInfo-level output
-q, --quietErrors only
--debugDebug-level output
--traceTrace-level output
--trace-filter <FILTER>Custom trace filter, e.g. --trace-filter="paiml=debug,cache=trace" (env: RUST_LOG)
--color <auto|always|never>Colour control (default auto)
-h, --helpPrint help
-V, --versionPrint version

--format and --output are per-command, not global: most analysis commands take -f, --format and -o, --output, but the accepted values differ per command. Check pmat <command> --help.

Environment variables

Only variables that pmat 3.32.0 itself declares in --help (as [env: NAME=]) or prints from pmat mcp connect are listed. Earlier editions of this appendix listed eight variables — PMAT_CONFIG_PATH, PMAT_PROFILE, PMAT_MAX_THREADS, PMAT_MEMORY_LIMIT, PMAT_API_TOKEN, PMAT_DEBUG, PMAT_LOG_LEVEL and PMAT_CACHE_DIR — of which seven appear nowhere in the pmat source at all. PMAT_CACHE_DIR is the one that is real, but no --help declares it, so it is listed here as a source-level detail rather than a supported interface.

VariableWhere it applies
MCP_VERSION=1Setting it makes a bare pmat start the MCP stdio server (equivalent to pmat --mode mcp)
PMAT_MCP_HTTP_TOKENBearer token for pmat serve --transport http. Must be ≥16 characters or the server refuses to start
RUST_LOGBacks --trace-filter on every command
PMAT_COVERAGE_FILEpmat query — path to the coverage file to enrich results with
PMAT_AGENT_MODEL, PMAT_AGENT_HARNESS, PMAT_AGENT_EFFORT, PMAT_AGENT_PARENT, PMAT_AGENT_WORKFLOW_IDAgent provenance recorded by pmat work start, work checkpoint, work complete, work falsify

Exit codes

Measured, not documented by the tool. Earlier editions of this appendix listed ten codes (3 = analysis failure, 4 = quality gate failure, 5 = security violation, 20 = license error, …); pmat emits none of them.

CodeMeaningExample that produces it
0Success — including an analysis that found problems but was not asked to fail on thempmat analyze satd --path .
1The command ran and failed: a gate tripped, a target could not be analysed, a subprocess diedpmat analyze satd --path . --fail-on-violation, pmat analyze complexity --path /nonexistent
2Usage error from the argument parser — unknown subcommand, unknown flag, unexpected positionalpmat analyze ., pmat repo-score .

A --fail-on-* style flag is what turns a finding into exit 1; without one, most analysis commands report and exit 0. Do not build CI on “pmat exited 0 therefore the code is clean” — check the flag list for the command you are running.

See also