Skip to content

opsmill/nornir-infrahub / .agents/skills/quality-gates

quality-gates

Verified

Shared in-workflow quality gates for code/PR skills — the gate model, trust tiers, and the three primitives (evidence-before-done, independent judge, anti-gaming). DO NOT TRIGGER directly — referenced by consumer skills via relative path.

Quality Gates

Shared reference for turning a skill's critical steps from prompts into gates: enforced checkpoints with independent verification, required evidence, and a STOP-on-fail. Not invocable directly; consumer skills reference these files by relative path.

This is the CANONICAL copy. opsmill-repo/skills/quality-gates/ is a synced copy; if they diverge, this copy wins (see DECISION.md).

Contents

  • gates/gate-model.md — the 4 properties of a gate, the 3 trust tiers, and the hybrid ship-vs-verify judge policy.
  • gates/primitives/evidence-before-done.md — P1: no "done" claim without pasted output.
  • gates/primitives/independent-judge.md — P2: author≠judge via a fresh subagent.
  • gates/primitives/anti-gaming.md — P3: measure intent, not form; forbidden evasions.

Trust tiers (summary)

TierSkill doesRequired gates
T0advisory / read-onlyP1 + self-review
T1mutates a branch, no shipP1 (P2 optional)
T2ships / opens PR / merges / force-pushes / stamps a "complete" markerP1 + P2 + P3

Consumer Gate Mapping

Which skills declare which gates. Keep this in sync as consumers are wired.

SkillPluginTierShip gate (full P2)?
fixing-bugsdevT2yes — before AGENT_FIX_COMPLETE
test-driving-bugsdevT2yes — before AGENT_TEST_COMPLETE (local mode stamps the marker; PR mode also opens the draft PR; both require the ship gate)
prdevT2yes — before gh pr create
monitoring-pull-requestsdevT2yes — before declaring CI resolved
merging-branchesdevT2yes — before opening the draft PR
rebasedevT1 escalating to T2 at force-pushyes — the ship gate is mandatory before force-push (T2); branch-only rebases without force-push are T1
commitdevT1no
analyzing-bugsdevT0no
creating-issuesdevT0no (human is judge, R4)
grilling-ideasdevT0no (human is judge, R4)
auditing-repo-standardsrepoT0no
auditing-agentic-structurerepoT0/T1no
detecting-repo-driftrepoT2yes — before opening each PR

Adding a new consumer

A new code/PR skill that ships output (opens a PR, merges, force-pushes, stamps a completion marker) MUST declare a T2 ship gate. Propose any new primitive as an ADR in DECISION.md rather than copying gate logic into the consumer.

Hook enforcement (Claude Code only)

Under Claude Code, a PreToolUse hook (hooks/ship-gate-check.sh, registered in this plugin's .claude-plugin/plugin.json) enforces two deterministic gates on Bash commands — both opt-in per repo (.claude/quality-gates/enabled; the hook is a no-op until it exists) and both overridable with QUALITY_GATES_BYPASS=1:

  • Branch discipline: denies git commit / git push while on a protected branch (main, master, develop, stable, release/*). Create a feature branch first.
  • Ship-gate receipt (commit-bound): denies the irreversible ship actions — gh pr create/merge, git push --force*, and AGENT_FIX_COMPLETE/AGENT_TEST_COMPLETE marker stamps — unless a PASS/DEGRADED receipt exists for the current HEAD. The P2 judge writes .claude/quality-gates/receipts/<HEAD>.json on PASS; a new commit invalidates it.

Progressive enhancement: the prose gates are unchanged and remain the behaviour under Codex; the hook adds deterministic enforcement under Claude. Gitignore .claude/quality-gates/receipts/ in consuming repos.

Receipt format (ship-gate PASS)

On a ship-gate PASS the P2 judge writes a commit-bound receipt to .claude/quality-gates/receipts/<HEAD>.json. The authoritative field list and write steps (mkdir -p, git rev-parse HEAD, the PASS/DEGRADED verdicts) live in gates/primitives/independent-judge.md › Handling the verdict — kept in one place so the receipt shape can't drift between this overview and the procedure agents actually run.

Properties that matter here: a DEGRADED receipt (an accepted R2 re-read with no subagent) is allowed, but the hook surfaces it as a visible allow-reason. The receipt is commit-bound — a new commit changes HEAD, so a stale pass cannot authorise a later ship. Receipts live under .claude/quality-gates/receipts/ (gitignored); this is what the hook checks before allowing gh pr create / gh pr merge.

reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall