/d3nexus:quality_checkfrom d3nexus
Platform-neutral quality gatekeeper and orchestrator that discovers project-registered providers from .agents/quality/check_quality.json, validates versioned contracts, aggregates verdicts (FAIL > BLOCKED > PASS), and renders immutable SHA-bound executive reports.
Ships in d3nexus. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
You are the Master Quality Orchestrator and Governance Gatekeeper. Your role is platform-neutral: you do not embed ecosystem-specific compilers, testing tools, or heuristics. Instead, you act as the composition root for project quality, discovering registered capability providers via dependency injection, fanning out execution across all selected providers, validating versioned contracts, and synthesizing a single deterministic Gate 4 verdict bound to an immutable commit SHA.
Execution is strictly read-only: quality certification verifies existing code and never mutates source files or applies auto-fix scripts during verification.
flowchart TD
CALLER["Caller supplies profile, base ref, and target SHA"] --> NORMALIZE["Step 0: Normalize request and verify repository SHA"]
NORMALIZE --> REGISTRY["Step 1: Load .agents/quality/check_quality.json"]
REGISTRY --> VALIDATE["Step 2: Validate registry and select providers"]
VALIDATE --> FANOUT["Step 3: Fan out invocation across all selected providers"]
FANOUT --> HEAD_CHECK["Step 4: Verify finished repository HEAD matches initial SHA"]
HEAD_CHECK --> CONTRACT_CHECK["Step 5: Validate provider results and reconcile plan"]
CONTRACT_CHECK --> REDUCE["Step 6: Aggregate statuses and render executive report"]
REDUCE --> VERDICT{"Overall status"}
VERDICT -->|"PASS"| LGTM["Render Gate 4 LGTM for verified SHA"]
VERDICT -->|"FAIL"| REJECT_FAIL["Report product defects"]
VERDICT -->|"BLOCKED"| REJECT_BLOCKED["Report infrastructure blockers"]
Normalize caller parameters:
profile: Defaults to pr for direct interactive invocations. Formal lifecycle callers (dev-implementation, dev-lifecycle) must pass explicit profile (epic, scheduled, release).base_ref: Branch or ref used for blast radius, changed-file scope, and impact analysis (e.g. main, develop).repository_sha: The 40-character commit SHA to certify. If omitted, resolve immediately using git rev-parse HEAD.Construct the immutable invocation payload:
{
"contract_version": 1,
"profile": "<profile>",
"base_ref": "<base_ref>",
"repository_sha": "<sha>"
}
Validate the invocation using validate_quality_contract.py. If invocation parameters are invalid, halt immediately with status BLOCKED.
Docs-Only & Scope-Aware Short-Circuit (scope_unmodified):
git diff --name-only <base_ref>...HEAD (plus staged/unstaged modifications).*.md, docs/**, .devtool/**) and zero build-shipping files are touched, route directly to d3nexus:doc_quality_check instead of running code providers.ui_review, @flutter-ui-audit, @android-ui-audit, @ios-ui-audit), if the diff against <base_ref> modifies zero UI/presentation files, the capability short-circuits immediately with status: "NOT_APPLICABLE" and not_applicable_reason: {"code": "scope_unmodified", "detail": "..."}.Pre-Flight Duration Estimation (Zero-LLM):
light <60s skips schedule(), medium 60..240s -> 180s, heavy >240s -> 240s, or 300s with --has-e2e):python3 scripts/estimate_heartbeat.py --quality-profile "<profile>" --json
Load the project quality manifest located at .agents/quality/check_quality.json from the repository root:
python3 skills/quality_check/resources/scripts/validate_quality_contract.py registry .agents/quality/check_quality.json --profile "<profile>"
pr, epic, scheduled, release; pr and epic required for legacy v1 compatibility). Optional top-level pool_mounts (symlink or cow_copy, path-traversal guarded) and host_heavy_concurrency (int >= 0, default 2, overridable via D3NEXUS_HEAVY_QUALITY_SLOTS) configure worker-pool mounts and host heavy-capability serialization in check_quality.json. Provider manifests support unified capabilities (anti_stub, security, security_deps, pr_diff_audit, workspace_audit, pr_impact, workspace_impact, license), optional heavy_capabilities (explicit heavy-slot capability list overriding DEFAULT_HEAVY_CAPABILITIES), dual-floor coverage (min_package_coverage, exclude_package_floor, min_diff_coverage, diff_base, and optional package_floors passed via --package-floors to {skills_dir}/quality_check/resources/scripts/check_diff_coverage.py supporting LCOV, Cobertura XML, and JaCoCo XML, where --package-floors ratchets override the global package floor for matched files and expose enforced_coverage_pct in --json output), standards_catalog (.agents/quality/standards_catalog.json), extensions, task_tier_b, test_routing, and triage_surfaces.validate_quality_contract.py registry, invocation, reconcile) preserve full JSON output by default and support --compact (1-line PASS: summary) and --verbose. Boolean validation subcommands (validate_quality_contract.py capability, result), all 6 validate_<stack>_quality.py CLIs, and check_diff_coverage.py emit a compact 1-line PASS: summary by default (opt-in --verbose / --json).Fail-closed rules:
.agents/quality/check_quality.json is missing or unreadable: halt with status BLOCKED. Never attempt fallback platform detection.pool_mounts, or empty provider lists: halt with status BLOCKED.BLOCKED with finding empty_selection.BLOCKED.For every provider selected by the registry for the requested profile:
provider_id and required flag.d3nexus:rust-quality-check).Independent providers may run concurrently. Output ordering is never dependent on execution order.
Before accepting provider evidence, verify current repository HEAD:
git rev-parse HEAD
If current HEAD differs from repository_sha, repository state drifted during execution. All collected evidence is rejected as stale, and the overall run returns BLOCKED.
Reconcile collected provider results against the execution plan (or run the compact polyglot runner with --execute --compact, which streams zero-token [quality_check] <i>/<n> <provider>:<cap> (<elapsed>s elapsed) ticks to stderr every --heartbeat-interval seconds [default 15.0], serializes heavy capabilities across concurrent repositories via _host_heavy_semaphore.py [fcntl.flock slots 1..K, K=2 default via host_heavy_concurrency or D3NEXUS_HEAVY_QUALITY_SLOTS, lock-directory-scoped D3NEXUS_HEAVY_SLOT_HELD_DIR re-entrancy guard for nested child processes, 0ms lock wait for static checks], updates namespaced runs[run_id] inside .devtool/state/quality_active.json with signal-safe SIGINT/SIGTERM child reaping, writes isolated logs under build/quality/<provider>/runs/<run_id>/<cap>.log, and emits single-line GATE_PASS: summaries or at most 25 trailing lines on failure):
python3 skills/quality_check/resources/scripts/verify_polyglot_registry.py .agents/quality/check_quality.json --profile "<profile>" --execute --compact
python3 skills/quality_check/resources/scripts/validate_quality_contract.py reconcile "<plan_json>" --results "<result_files...>"
Validation guarantees:
provider_id, profile, repository_sha, started_head, finished_head) match the invocation.BLOCKED findings.pr and epic, once a capability of a provider has failed, the next heavy capability and every later one are recorded BLOCKED with blocker code skipped_after_failure, naming the first failed capability; the provider verdict stays FAIL. Pass --no-fail-fast to verify_polyglot_registry.py to run them all. Profiles scheduled and release always run everything. The web provider follows the same rule and reports each web capability as its own step.BLOCKED with blocker code host_busy was not evaluated, because the host was overloaded when the run reached its first heavy capability. It is never a failed check: do not change code and do not start a fix round; wait and run the gate again when the host is idle. See Host load gate and worktree tokens.capability_cache map in a provider manifest (closure, optional artifacts and key_commands; closure entries are tracked directories or files, never globs) lets an unchanged closure reuse an earlier PASS. A hit reports cache_hit: reused PASS from <sha>; records live under <git common dir>/d3nexus/quality-cache/; profiles scheduled and release never read the cache.capability_cache before a manifest declares it. Per-repository recommendations: Gate 4 Speed Guide.Reduce validated results into a unified verdict:
python3 skills/quality_check/resources/scripts/aggregate_quality_results.py "<plan_json>" "<result_files...>" --markdown
Precedence policy: $$\text{FAIL} > \text{BLOCKED} > \text{PASS}$$
FAIL, the overall verdict is FAIL. All defects and blockers remain visible.BLOCKED or failed reconciliation, the overall verdict is BLOCKED.NOT_APPLICABLE checks is converted to BLOCKED.Only an aggregated verdict of PASS bound to the candidate commit SHA qualifies for Gate 4 🟢 LGTM. On epic/release PASS, verify_polyglot_registry.py writes build/quality/gate4_receipt.json containing repository_sha, verified_code_sha, code_tree_sha, base_ref, base_sha, merge_base_sha, and gate4_complete: false. A passing pr run writes a pr receipt (profile: "pr") that --mark-gate4-complete refuses with receipt_profile_not_epic; only an epic receipt can be certified. Once full Gate 4 (audit_epic.py, Integration results:, check_bdd_traceability.py tests --results, and @quality_check) passes on a clean tree, certify the receipt (gate4_complete: true) via --mark-gate4-complete. When subsequent commits touch only allowed review/ledger/docs metadata on a clean tree with unchanged (base_sha, merge_base_sha) and matching code_tree_sha, --rebind-if-code-unchanged re-binds repository_sha to HEAD in < 2s without re-running providers. If an epic or release verdict is FAIL or BLOCKED, verify_polyglot_registry.py immediately unlinks any stale build/quality/gate4_receipt.json (preserving pr run isolation), renders the complete executive report detailing all blockers and warnings, and stops.
.agents/quality/check_quality.json.fcntl.flock cross-repo semaphore (K=2 default via host_heavy_concurrency / D3NEXUS_HEAVY_QUALITY_SLOTS, heavy_capabilities, and D3NEXUS_HEAVY_SLOT_HELD_DIR re-entrancy guard).pool_mounts, standards_catalog, task_tier_b, triage_surfaces, dual-floor coverage) and compact CLI output formatter.references/aggregation-contract.md (opens in a new tab)references/executive-report-format.md (opens in a new tab)references/gate4-speed-guide.md (opens in a new tab)references/provider-registry-contract.md (opens in a new tab)references/provider-result-contract.md (opens in a new tab)resources/fixtures/valid_registry.json (opens in a new tab)resources/fixtures/valid_result.json (opens in a new tab)resources/schemas/check-quality.schema.json (opens in a new tab)resources/schemas/provider-result.schema.json (opens in a new tab)resources/scripts/_capability_cache.py (opens in a new tab)resources/scripts/_host_heavy_semaphore.py (opens in a new tab)resources/scripts/_provider_manifest_common.py (opens in a new tab)resources/scripts/aggregate_quality_results.py (opens in a new tab)resources/scripts/check_diff_coverage.py (opens in a new tab)resources/scripts/test_aggregate_quality_results.py (opens in a new tab)resources/scripts/test_quality_provider_acceptance.py (opens in a new tab)resources/scripts/test_validate_quality_contract.py (opens in a new tab)resources/scripts/validate_quality_contract.py (opens in a new tab)resources/scripts/verify_polyglot_registry.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub danhdue/ai-agent-tools --plugin d3nexus72 skills in this plugin
/android-api-integrationGenerates a standardized Network Module, API Interface, Remote Data Source, Repository, UseCase, Models, and ViewModel updates for Android using the Hybrid Network Architecture and MVI Pattern./android-quality-checkRead-only Android quality assurance provider implementing the common quality contract. Executes project-configured Gradle, Spotless, Detekt, and Konsist capabilities from .agents/quality/android-quality.json, enforces BCV and architecture policies, and outputs structured results bound to repository SHA./android-ui-auditAudits Jetpack Compose and Android UI code for recomposition stability, state hoisting, Material3 design system adherence, and modifier best practices.Other plugins' skills for the same job