Skip to main content
Glama

HMT Reverse Root Cause Analysis

Python 3.12+ Apache-2.0 MCP local stdio

Investigate an observed effect, test its upstream causes, and verify a bounded repair while preserving previously passing gates.

HMT-RRCA pairs an agent skill with a stateless MCP evaluator and an explicit-output CLI. It follows the HMT Mission Assurance separation between claims, submitted observations, findings, and authority. It adds backward causal checkpoints, four intervention obligations per claimed edge, and cumulative regression ledgers.

Start

Requires Python 3.12 or newer and Git. Version 0.1.0 was qualified locally on Windows with Python 3.14; other operating systems and Python versions remain unqualified. Hosted workflow results are reported separately on the Actions page.

python -m uv tool install "git+https://github.com/CollaborativeMinD/HMT-Reverse-Root-Cause-Analysis.git@v0.1.0"
hmt-rrca install-skill --dest "$HOME/.codex/skills/hmt-rrca"
hmt-rrca schema

Install uv first with python -m pip install uv if needed. A standalone uv installation can use uv tool install directly. If the commands are not on PATH, run python -m uv tool update-shell and open a new shell. Wheel and source downloads are also available from the v0.1.0 release.

The destination is the skill folder itself. Both skill installation and report export refuse to replace an existing destination. To run the executed synthetic example from a source checkout:

git clone https://github.com/CollaborativeMinD/HMT-Reverse-Root-Cause-Analysis.git
cd HMT-Reverse-Root-Cause-Analysis
git checkout v0.1.0
python -m uv sync --frozen
python -m uv run hmt-rrca evaluate examples/repaired.json --out first-report

Open first-report/report.html or read report.md and assessment.json. The same directory contains ledgers.sqlite with the exact RRCA ledger columns. Exit 0 means the submitted records support the declared repair; 2 means findings remain; 3 means invalid input or destination. CLI syntax errors use argparse's exit 2.

The example comes from an executed, sequential synthetic admission fixture. It does not describe a deployed gateway or the user's mesh.

Related MCP server: codebase-doctor

Connect MCP

Use an absolute path if your MCP host does not inherit the executable directory. A generic local stdio profile is in integrations/stdio.json.

{
  "mcpServers": {
    "hmt-rrca": {"command": "hmt-rrca-mcp", "args": []}
  }
}

The server needs no credentials, network listener, model API, or persistent store. It does not read source references, run target commands, repair a system, or authorize an effect. The host agent collects records through its own authorized tools.

Tool

Result

audit_information_integrity

Complete five-question audit, evidence checks, causal review, and repair assessment

review_causal_chain

The same complete assessment, routed from a causal investigation

verify_repair

The same complete assessment, routed from a repair review

emit_investigation_report

Assessment plus full structured record, Markdown, and offline HTML

The first three tools are deliberate aliases. They accept the full {"contract": ...} envelope every time. A previous call confers no evidence, authority, or hidden session state.

Information Integrity Audit

  1. What model represents the effects, and within which domain and assumptions?

  2. What necessary conditions, constraints, and dependencies must hold?

  3. Which observation would falsify the claim?

  4. Which residuals, contradictions, and alternative explanations remain?

  5. What provenance, authority, incentives, or motivations bear on the source's assertion?

The skill directs the investigation. The evaluator checks the declared structure and supporting records. It cannot determine whether free-text reasoning is true. Motive alone neither proves nor defeats a claim.

Evidence and authority

Strict schemas reject extra fields, coercions, invalid identifiers, cycles, and unresolved references. Evidence checks bind literal UTF-8 content hashes to the declared environment, baseline, explicit clock, and gate. Each task needs fresh witnesses; a passing gate remains required at later boundaries. Current causal edges require deletion, restoration, matched control, and compensation results.

Investigation completion and remediation state remain separate. SOLUTION_CANDIDATE_APPLIED does not establish a verified repair. Every returned finding includes its anchor and a concrete evidence condition for resolution.

A caller can fabricate a matching record and hash. These checks establish submitted-record consistency. They do not authenticate the producer, independently execute tests, prove causation, or certify security. admission_authorized and security_certification are always false. The declared as_of time makes replay deterministic; the host must bind it to its trustworthy clock when freshness matters.

The application caps canonical input at 1 MiB and bounds collection sizes. The MCP SDK parses transport frames before this application check. It is not a network-facing resource isolation boundary. Duplicate JSON keys are rejected by the CLI reader; the SDK's parsed MCP object cannot preserve duplicate-key history. Run the local process under the host's least-privilege account. Contract semantics retain the exact limits.

Review and reproduce

  • SKILL.md: compact workflow and context handoff.

  • Runbook.md: development, qualification, export, and operational recovery.

  • Design and requirements: scope, acceptance conditions, trade study, and reference baseline.

  • Campaign: testing families, complete candidate space, and claim limits.

  • Qualification evidence: execution receipts, branch coverage, ledgers, and installed-package results.

This repository publishes the skill, evaluator, examples, and scoped qualification evidence under Apache-2.0. Historical pre-publication receipts retain their original scope and timestamps; publication evidence records the release preparation. A package-index release, remote MCP endpoint, Docker deployment, signed-in host acceptance, and operational certification are outside this release. Original internal policy files remain external source inputs and are not redistributed or licensed by implication.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers