Skip to main content

hexastack-qual

🛡️ Hexagonal quality, governance, and release adapter integrating hexaqual with CQRS, MCP, UI, and Events.

Part of the Hexastack ecosystem.


🌟 Overview

hexastack-qual bridges Hexaqual into Hexastack applications:

  • CQRS Execution Pipeline: Execute sanity checks, statement formatting, and mutant audits via decoupled Command and Query objects with full OpenTelemetry tracing and structured logging.
  • Model Context Protocol (MCP): Expose @mcp_tool and @mcp_resource endpoints for AI coding assistants (Claude Desktop, Cursor, Antigravity) to audit complexity, test parity, and mutant resilience.
  • DevTools Console Panel: Mount a reactive NiceGUI dashboard in /devtools showing live quality gauges and one-click remediation actions.
  • Distributed Event Publishing: Emit domain events (QualityGateFailedEvent, CriticalMutantSurvivingEvent) over hexastack-events to Apprise or NATS.

📦 Installation

# Core adapter (CQRS pipeline + Hexaqual runner)
pip install hexastack-qual

# With Model Context Protocol (MCP) server support
pip install "hexastack-qual[mcp]"

# With NiceGUI DevTools console tab
pip install "hexastack-qual[ui]"

# With distributed event publishing
pip install "hexastack-qual[events]"

# All extras
pip install "hexastack-qual[all]"

🚀 Quickstart

1. CQRS Pipeline Execution

from hexastack_cqrs.infra.pipeline import ExecutionPipeline
from hexastack_qual.adapters.cqrs.commands import RunSanityCheckCommand
from hexastack_qual.adapters.cqrs.queries import GetQualityScorecardQuery

# Dispatch queries and commands via the CQRS pipeline
scorecard = await pipeline.execute(GetQualityScorecardQuery(package="core"))
print(
    f"Healthy: {scorecard.is_healthy}, Violations: {len(scorecard.complexity_violations)}"
)

result = await pipeline.execute(RunSanityCheckCommand(package="core", skip_tests=True))
print(f"Sanity status: {result.success}")

2. Exposing Quality over MCP

from hexastack_qual.adapters.mcp import get_quality_tools

# Attach quality inspection tools to an AI agent
agent = create_cqrs_agent(
    pipeline=pipeline,
    tools=get_quality_tools(),
    system_prompt="You are an autonomous refactoring agent with self-verification tools.",
)

🏛️ Architecture

hexastack_qual/
├── domain/       # Pure models (QualityScorecard, ComplexityMetric), exceptions, and events
├── ports/        # QualityAuditorPort, MutationInspectorPort, PrDiagnosticPort
├── adapters/     # Hexaqual runner, CQRS handlers, MCP tools, NiceGUI panel, Events publisher
└── infra/        # QualBootstrapper (DI container registration) and Typer CLI

Metadata

Release files for hexastack-qual 0.11.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hexastack-qual 0.11.2
File Size Uploaded Provenance Actions
hexastack_qual-0.11.2.tar.gz 25.0 kB Without provenance Details for hexastack_qual-0.11.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hexastack-qual 0.11.2
File Interpreter ABI Platform Actions
hexastack_qual-0.11.2-py3-none-any.whl Python 3 none any Details for hexastack_qual-0.11.2-py3-none-any.whl

Total release size: 62.6 kB

Release files / hexastack_qual-0.11.2.tar.gz

Download URL hexastack_qual-0.11.2.tar.gz
Size 25.0 kB
Tags Source
SHA-256 checksum
How to use checksums
b6fce270d543d1a76d0853391d1abffcc96b5ad784a263a5a7e0f1c8f9887030
BLAKE2b-256 checksum
How to use checksums
a47e8c7c46948b73de06808429bc31d2d0b23a1895c79fa9dda2acfa769696da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / hexastack_qual-0.11.2-py3-none-any.whl

Download URL hexastack_qual-0.11.2-py3-none-any.whl
Size 37.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1ed9b09019c2c404c10be132a03a803d1aa3dea30cf53bb52d1a582278c4e66c
BLAKE2b-256 checksum
How to use checksums
9915941bd79991a33b1ff4434764fe5fa84e0316f32002df7dd682ca3b588b16
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for hexastack-qual 0.11.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page