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
CommandandQueryobjects with full OpenTelemetry tracing and structured logging. - Model Context Protocol (MCP): Expose
@mcp_tooland@mcp_resourceendpoints 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
/devtoolsshowing live quality gauges and one-click remediation actions. - Distributed Event Publishing: Emit domain events (
QualityGateFailedEvent,CriticalMutantSurvivingEvent) overhexastack-eventsto 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.7.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| hexastack_qual-0.7.0.tar.gz | 22.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hexastack_qual-0.7.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 59.7 kB
Release files / hexastack_qual-0.7.0.tar.gz
| Download URL | hexastack_qual-0.7.0.tar.gz |
|---|---|
| Size | 22.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6f22a0a940694d4dd15f26a4c13711ad01fc55152db67770ccad4573a36aa999
|
|
BLAKE2b-256 checksum How to use checksums |
897b283f425707e51b9157cc2e611ff71baa6e986316304b97d01456e5b840fe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / hexastack_qual-0.7.0-py3-none-any.whl
| Download URL | hexastack_qual-0.7.0-py3-none-any.whl |
|---|---|
| Size | 37.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6db7bd240e17a154947c7ed0e558ef47ebbc70c72c0a364be2df08c62f16dc86
|
|
BLAKE2b-256 checksum How to use checksums |
cb5c0d5b6391c595b0b5158c1bf37735b85149cfcecfd93d1328f867dce13d1f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|