agentleFS
josixjosix/agent-flow/skills/verification-gates/SKILL.md

verification-gates

Skill8 starsChanged 17 days agoMITView on GitHub

This skill should be used when handling verification steps, quality gates, pre-commit checks, test failures, lint errors, build verification, or mandatory validation before task completion.

  • Reads credentials

3 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

10 rules. 0 are common, 10 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 10

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Non-Negotiable Quality: Every code change must pass all applicable gates

    line 17
  2. Distinctive:

    Fail-Fast, Fix-First: When any gate fails, work stops until resolved

    line 21
  3. Distinctive:

    Run test suite with appropriate framework

    line 87
  4. Distinctive:

    Run linters if present

    line 89
  5. Distinctive:

    Run verification after every significant change

    line 155
  6. Distinctive:

    Add tests for new features

    line 158
  7. Distinctive:

    Run full suite before PR

    line 159
  8. Distinctive:

    Commit with failing tests

    line 166
  9. Distinctive:

    User explicitly requests skip: - Must be documented

    line 187
  10. Distinctive:

    Task is purely exploratory: - No production impact

    line 189

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Verification Gates

Overview

Verification gates are mandatory quality checkpoints that must pass before any implementation work is considered complete. These gates prevent broken code from being committed, ensure type safety, maintain code style consistency, and validate that all tests pass.

Owner Agent: Alphonse (Verifier Agent)

Key Principles

  1. Non-Negotiable Quality: Every code change must pass all applicable gates
  2. Automated Enforcement: Gates are triggered automatically via hooks
  3. Clear Feedback: Failures provide actionable error messages
  4. Project-Aware: Commands adapt to detected project type and tooling
  5. Fail-Fast, Fix-First: When any gate fails, work stops until resolved

Verification Hierarchy

Loid (Executor)          Alphonse (Verifier)
     |                         |
Quick sanity tests       Full verification gate
during implementation    before completion
     |                         |
     +----------> Handoff >----+

Gate Types

Pre-Commit Gates

CheckExample CommandTimeout
Lintnpm run lint / ruff check30s
Formatnpm run format:check / black --check15s
Quick TestsChanged file tests only60s

Pre-Complete Gates

CheckExample CommandTimeout
Full Test Suitenpm test / pytest300s
Type Checkingnpx tsc --noEmit / mypy .120s
LintingFull codebase lint60s
Buildnpm run build / python -m build180s

Security Gates

Triggered by changes to sensitive files or security-critical code:

CheckTriggerAction
Credential Scan*.env, *secret*, *.keyBlock + Alert
Permission CheckAuth/ACL codeRequire review
Dependency AuditPackage filesnpm audit / pip-audit

Verification Commands

Quick Reference by Language

ActionNode.jsPythonGoRust
Testnpm testpytestgo test ./...cargo test
Typesnpx tsc --noEmitmypy .go buildcargo check
Lintnpm run lintruff check .golangci-lint runcargo clippy
Buildnpm run buildpython -m buildgo buildcargo build

For complete command reference, see references/verification-commands.md.


Verification Process

Alphonse Verification Steps

  1. Identify project type (Node.js, Python, Go, Rust, Java)
  2. Run test suite with appropriate framework
  3. Execute type checking if configured
  4. Run linters if present
  5. Attempt production build
  6. Report structured results

Standard Output Format

## Verification Results

### Tests
- Status: [PASS | FAIL]
- Output: [Summary of test execution]

### Type Check
- Status: [PASS | FAIL | SKIPPED (<why>) | COVERED (Lawliet)]
- Errors: [List of type errors if any]

### Lint
- Status: [PASS | FAIL | SKIPPED (<why>) | COVERED (Lawliet)]
- Warnings: [Count and summary]

### Build
- Status: [PASS | FAIL | SKIPPED (<why>)]
- Issues: [Build errors if any]

### Overall: [VERIFIED | FAILED | ENVIRONMENT_BLOCKED]

COVERED (Lawliet): in the parallel /orchestrate Phase 4+5 flow, Lawliet runs type check and lint concurrently, so Alphonse reports them as covered instead of re-running them.


Failure Handling

Failure Severity

TypeSeverityAction
Test FailureBLOCKINGFix and re-run
Type ErrorBLOCKINGResolve types
Lint ErrorBLOCKINGAuto-fix or manual
Build FailureBLOCKINGFix compilation
Security AlertCRITICALImmediate remediation
TimeoutWARNINGRetry up to 2x (30s apart), then report FAILED
Flaky TestWARNINGRetry 3x, then fix

These are gate-failure labels for Alphonse's verification. They are separate from the ERROR/WARNING/INFO review-finding scale. The machine-read verdict is Alphonse's ### Overall: VERIFIED | FAILED | ENVIRONMENT_BLOCKED.

Escalation Path

Alphonse's ### Overall verdict decides the route:

  • VERIFIED: proceed.
  • FAILED: Loid fixes within the capped review-fix rounds, then re-verify.
  • ENVIRONMENT_BLOCKED: warn and proceed with the caveat (not routed to Loid).

At the round cap, open failures go to the Phase 6 report, and the orchestrator pauses only when one is unsafe to ship.

For detailed failure protocols, see references/failure-handling.md.


Best Practices

DO

  • Run verification after every significant change
  • Fix failures immediately
  • Trust Alphonse's verdict
  • Add tests for new features
  • Run full suite before PR

DON'T

  • Skip verification to save time
  • Suppress type errors with any
  • Disable lint rules without justification
  • Commit with failing tests
  • Use --no-verify flag
  • Mark tasks complete without verification

Gate Selection Guide

ScenarioGate TypeChecks Run
Small code fixPre-CommitLint, format, affected tests
New feature completePre-CompleteFull suite, types, lint, build
Security-related changeSecurityCredential scan, audit, permissions
Cross-service changeIntegrationE2E, contracts, compatibility

Override Rules

Verification gates can ONLY be skipped when:

  1. User explicitly requests skip - Must be documented
  2. No code changes were made - Documentation-only tasks
  3. Task is purely exploratory - No production impact

Override Documentation Required:

## Verification Override

Reason: [Explicit reason for skipping]
Requested by: [User or escalation source]
Risk Assessment: [Low/Medium/High]
Compensating Controls: [What will catch issues later]

Multi-reviewer disagreement (Codex co-review)

Disagreement rule: See the canonical truth table and Divergence Cap in references/codex-co-review.md. The summary: any cited Lawliet ERROR/WARNING blocks (even under APPROVED); Codex flips the verdict only with a file:line-cited ERROR/WARNING — INFO is advisory; Codex runs only under standard/thorough with codex.available: true.


Additional Resources

Reference Files

  • references/verification-commands.md - Complete command reference
  • references/project-detection.md - Project type detection details
  • references/failure-handling.md - Failure handling protocols
  • references/codex-co-review.md - /orchestrate Phase 4 Codex co-review, truth table, Divergence Cap
  • references/intent-ledger.md - /orchestrate Phase 6 Intent Ledger template

Examples

  • examples/verification-scenarios.md - Worked verification examples

Related Files

FilePurpose
scripts/load-project-context.shProject type detection
hooks/scripts/verify-completion.shPre-complete gate implementation
hooks/scripts/validate-changes.shSecurity validation
agents/Alphonse.mdVerifier agent definition

Related Skills

  • task-classification: Determines when verification is required
  • agent-behavior-constraints: Model routing and tool access

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.