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.8.0

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.8.0
File Size Uploaded
hexastack_qual-0.8.0.tar.gz 22.9 kB Details

Built distribution (wheel)

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

Total release size: 60.5 kB

Release files / hexastack_qual-0.8.0.tar.gz

Download URL hexastack_qual-0.8.0.tar.gz
Size 22.9 kB
Tags Source
SHA-256 checksum
How to use checksums
7b30f81a82be1e7af24a4eca278438fe0157f8a07027f7d72a31f83badf56a69
BLAKE2b-256 checksum
How to use checksums
cc1d03a0e65ac9233cee669a63ba168ffc0767c4c761962b81813fa5c4d9de4b
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.8.0-py3-none-any.whl

Download URL hexastack_qual-0.8.0-py3-none-any.whl
Size 37.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
318907b52dd685767ea5d74717195794fa3e6301f78bbbf7ef80b85a459dd3b8
BLAKE2b-256 checksum
How to use checksums
c49b737359b64dfccbf743b02e5c053351c4bb3063e3eb9d4c8282c9641a4840
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

0.8.0 This release

2 release files

0.7.0

2 release files

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