Run the architecture quality gate
Evaluate machine-readable, verified findings against repository policy. Do not reinterpret or silently rewrite the policy.
Load the contract
Read these files completely:
../../resources/references/review-contract.md
../../resources/references/quality-gate.md
../../resources/references/evidence-provider-contract.md
Operating boundary
Advisory work does not invoke a Gate. Governed and Enforced repositories may
invoke it locally or in CI. A policy's product_mode is descriptive and never
changes the result of an explicit Gate invocation. Ignore informational
governance run manifests: they are trajectory metadata, not Reviews, Evidence
Provider runs, approvals, signatures, or gate inputs.
Procedure
- Locate the project
.architecture/ or portfolio
.architecture-portfolio/ policy, baseline, risk-acceptance registry, and
explicitly supplied or newest-by-performed_at verified review. For a
Greenfield chain, locate the explicitly supplied accepted Decision, its
approved Brief, and every Plan bound to that Decision.
- Validate all inputs before evaluating them.
For Review 1.2, first run:
python3 ../../resources/scripts/architecture_tool.py validate-coverage \
--project <repo> --review <verified-review.yaml>
- Run the deterministic gate:
python3 ../../resources/scripts/architecture_tool.py gate \
--project <repo> \
[--review <verified-review.yaml> | --decision <greenfield-decision.yaml>] \
[--base-commit <ancestor>] \
[--stage contract|finding|change|release|all] \
[--json] [--sarif-output <results.sarif>]
Use --portfolio <portfolio-root> for portfolio reviews.
Use --decision only for the Brief → Greenfield Decision → Plan path; it does
not synthesize a Review or Findings.
Resolve the script path from this Skill's directory.
- Report contract failures, missing required review workflows, Evidence
Provider resolution, changed paths and public-contract classifications,
exact blocking IDs, verification/signature failures, unauthorized or
overlapping roles, incomplete plans, expired acceptances and waivers,
baselined or waived findings, and accepted risks.
- Preserve exit codes:
0: pass;
1: policy failure;
2: invalid or missing input.
Integrity rules
- Gate only
kind: risk, verification.status: confirmed findings.
- Never upgrade severity or confidence during gate execution.
- Never let an unverified finding block unless policy explicitly sets
unverified_behavior: fail.
- Require an exact Finding fingerprint, reason, approval identity, and expiry
for every waiver.
- Require a separate authorized accepter and policy approver, compensating
controls, exact fingerprint, and expiry for every accepted risk.
- Treat expired baselines, waivers, and risk acceptances as inactive.
- Reject legacy
1.0 artifacts for enforcement while preserving migration
readability.
- Accept trusted 1.1 artifacts during the compatibility window; require 1.2
facts, knowledge selection, and critical-flow bindings for newly produced
artifacts.
- Require passed, hash-valid provider runs for configured release evidence and
V4/V5 verification.
- Require every complete plan item to cover its declared acceptance evidence
types with repository-contained, hash-valid evidence.
- Do not create a waiver or baseline entry merely to make CI pass.
- Do not modify product code, findings, policy, baseline, or waivers while running the gate.
If a user asks to change gate policy or accept risk, present the exact impact
and treat that as a separate governance decision. Never encode acceptance by
editing only finding.status.
1---2name: architecture-quality-gate3description: Deterministic architecture quality gate for verified review artifacts. Use in local checks or CI to validate architecture configuration, block configured confirmed severities, enforce review freshness, and honor explicit baselines or time-limited waivers. Never treats raw model findings as gate failures and never replaces finding verification.4---56# Run the architecture quality gate78Evaluate machine-readable, verified findings against repository policy. Do not reinterpret or silently rewrite the policy.910## Load the contract1112Read these files completely:1314- `../../resources/references/review-contract.md`15- `../../resources/references/quality-gate.md`16- `../../resources/references/evidence-provider-contract.md`1718## Operating boundary1920Advisory work does not invoke a Gate. Governed and Enforced repositories may21invoke it locally or in CI. A policy's `product_mode` is descriptive and never22changes the result of an explicit Gate invocation. Ignore informational23governance run manifests: they are trajectory metadata, not Reviews, Evidence24Provider runs, approvals, signatures, or gate inputs.2526## Procedure27281. Locate the project `.architecture/` or portfolio29 `.architecture-portfolio/` policy, baseline, risk-acceptance registry, and30 explicitly supplied or newest-by-`performed_at` verified review. For a31 Greenfield chain, locate the explicitly supplied accepted Decision, its32 approved Brief, and every Plan bound to that Decision.332. Validate all inputs before evaluating them.34 For Review 1.2, first run:3536```bash37python3 ../../resources/scripts/architecture_tool.py validate-coverage \38 --project <repo> --review <verified-review.yaml>39```403. Run the deterministic gate:4142```bash43python3 ../../resources/scripts/architecture_tool.py gate \44 --project <repo> \45 [--review <verified-review.yaml> | --decision <greenfield-decision.yaml>] \46 [--base-commit <ancestor>] \47 [--stage contract|finding|change|release|all] \48 [--json] [--sarif-output <results.sarif>]49```5051Use `--portfolio <portfolio-root>` for portfolio reviews.52Use `--decision` only for the Brief → Greenfield Decision → Plan path; it does53not synthesize a Review or Findings.5455Resolve the script path from this Skill's directory.56574. Report contract failures, missing required review workflows, Evidence58 Provider resolution, changed paths and public-contract classifications,59 exact blocking IDs, verification/signature failures, unauthorized or60 overlapping roles, incomplete plans, expired acceptances and waivers,61 baselined or waived findings, and accepted risks.625. Preserve exit codes:63 - `0`: pass;64 - `1`: policy failure;65 - `2`: invalid or missing input.6667## Integrity rules6869- Gate only `kind: risk`, `verification.status: confirmed` findings.70- Never upgrade severity or confidence during gate execution.71- Never let an unverified finding block unless policy explicitly sets `unverified_behavior: fail`.72- Require an exact Finding fingerprint, reason, approval identity, and expiry73 for every waiver.74- Require a separate authorized accepter and policy approver, compensating75 controls, exact fingerprint, and expiry for every accepted risk.76- Treat expired baselines, waivers, and risk acceptances as inactive.77- Reject legacy `1.0` artifacts for enforcement while preserving migration78 readability.79- Accept trusted 1.1 artifacts during the compatibility window; require 1.280 facts, knowledge selection, and critical-flow bindings for newly produced81 artifacts.82- Require passed, hash-valid provider runs for configured release evidence and83 V4/V5 verification.84- Require every complete plan item to cover its declared acceptance evidence85 types with repository-contained, hash-valid evidence.86- Do not create a waiver or baseline entry merely to make CI pass.87- Do not modify product code, findings, policy, baseline, or waivers while running the gate.8889If a user asks to change gate policy or accept risk, present the exact impact90and treat that as a separate governance decision. Never encode acceptance by91editing only `finding.status`.