Verification Gates
Scannednpx machina-cli add skill rohitg00/skillkit/verification-gates --openclawVerification Gates
You are implementing verification gates - explicit checkpoints where work is validated before proceeding. This prevents cascading errors and ensures quality at each phase.
Core Principle
Never proceed to the next phase with unverified assumptions from the previous phase.
A verification gate is a deliberate pause to confirm that prerequisites are met before continuing.
Why Verification Gates Matter
Without gates:
Phase 1 → Phase 2 → Phase 3 → Phase 4
↑
└── Error discovered at Phase 4
Must redo Phases 2, 3, 4
With gates:
Phase 1 → [Gate] → Phase 2 → [Gate] → Phase 3 → [Gate] → Phase 4
↑
└── Error caught immediately
Only redo Phase 1
Standard Verification Gates
Gate 1: Requirements Verification
Before starting design:
- All requirements are documented and clear
- Ambiguities have been resolved with stakeholders
- Non-requirements are explicitly stated
- Acceptance criteria are defined
- Edge cases are identified
Actions:
- Review requirements document
- Identify any unclear items
- Get explicit confirmation on ambiguous points
- Document answers
Gate 2: Design Verification
Before starting implementation:
- Design addresses all requirements
- Technical approach is validated
- Interfaces are defined
- Data model is complete
- Error handling is planned
- Design has been reviewed (self or peer)
Actions:
- Walk through design against requirements
- Review with rubber duck or teammate
- Check for missing pieces
- Get approval to proceed
Gate 3: Implementation Verification
Before calling task complete:
- Code compiles/runs without errors
- All tests pass
- New code has test coverage
- Code follows project conventions
- No obvious bugs or issues
- Dependencies are appropriate
Actions:
- Run full test suite
- Self-review the diff
- Check for code smells
- Verify against acceptance criteria
Gate 4: Integration Verification
Before merging:
- Feature works end-to-end
- Integration tests pass
- No regression in existing functionality
- Performance is acceptable
- Documentation is updated
Actions:
- Test the full user flow
- Run integration test suite
- Compare performance metrics
- Review documentation changes
Gate 5: Deployment Verification
Before marking complete:
- Feature works in target environment
- Monitoring shows no errors
- Feature flags are properly configured
- Rollback plan exists
- Stakeholders can verify
Actions:
- Smoke test in environment
- Check error logs and metrics
- Get stakeholder sign-off
- Document deployment
Gate Types
Automated Gates
Gates that can be enforced automatically:
# CI Pipeline Gates
gates:
- name: lint
command: npm run lint
required: true
- name: type-check
command: npm run typecheck
required: true
- name: unit-tests
command: npm test
required: true
coverage: 80%
- name: build
command: npm run build
required: true
Manual Gates
Gates requiring human judgment:
## Manual Verification Checklist
Before Code Review:
- [ ] I've tested my changes locally
- [ ] I've written/updated tests
- [ ] I've read my own diff
- [ ] I've checked for security issues
- [ ] I've updated documentation
Before Deployment:
- [ ] Code review approved
- [ ] QA verified (if applicable)
- [ ] Stakeholder approved (if required)
- [ ] Deployment plan reviewed
Conditional Gates
Gates that apply in specific situations:
| Condition | Required Gates |
|---|---|
| Security-related | Security review |
| Public API change | API review + migration plan |
| Database change | DBA review + backup plan |
| Performance-sensitive | Performance test |
| Breaking change | Deprecation notice + migration |
Implementing Gates
In Your Workflow
Task Start
│
▼
┌─────────────────┐
│ Gate: Prereqs │ ← Verify before starting
│ - Requirements │
│ - Dependencies │
└────────┬────────┘
│
▼
Do the work
│
▼
┌─────────────────┐
│ Gate: Completion│ ← Verify before proceeding
│ - Tests pass │
│ - Code reviewed │
└────────┬────────┘
│
▼
Task Complete
Gate Documentation Template
## Gate: [Name]
**When:** [Before what action]
**Purpose:** [What this gate ensures]
**Checklist:**
- [ ] Item 1
- [ ] Item 2
- [ ] Item 3
**Verification Method:**
- [How to verify each item]
**Failure Actions:**
- [What to do if gate fails]
**Approver:** [Who can approve passage]
Common Gate Failures
"Just this once" Syndrome
- Problem: Skipping gates for urgent work
- Fix: Urgent work gets simpler gates, not no gates
Gate Inflation
- Problem: Too many gates slow everything down
- Fix: Only gates that catch real issues
Rubber Stamp Gates
- Problem: Gates passed without real verification
- Fix: Specific checklists, evidence requirements
Gate Metrics
Track gate effectiveness:
Gate Effectiveness = Issues caught at gate / Total issues
Gate Overhead = Time spent at gates / Total development time
Gate Value = (Cost of issue caught early) / (Gate overhead cost)
Good gates have:
- High effectiveness (catch most issues)
- Low overhead (quick to pass)
- High value (prevent expensive fixes)
Integration with CI/CD
# GitHub Actions example
jobs:
gate-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: npm ci
- run: npm run lint
gate-test:
needs: gate-lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: npm ci
- run: npm test
gate-build:
needs: gate-test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: npm ci
- run: npm run build
deploy:
needs: gate-build
# Only deploys if all gates pass
Quick Reference
| Phase | Gate Before | Key Checks |
|---|---|---|
| Design | Requirements | Clear, complete, approved |
| Implementation | Design | Reviewed, feasible |
| Review | Implementation | Tests, conventions, working |
| Merge | Review | Approved, conflicts resolved |
| Deploy | Merge | Environment ready, plan exists |
Integration with Other Skills
- design-first: Gates validate design before implementation
- task-decomposition: Gates between task phases
- testing/red-green-refactor: Tests are key gate criteria
- collaboration/structured-review: Review is a gate
Source
git clone https://github.com/rohitg00/skillkit/blob/main/packages/core/src/methodology/packs/planning/verification-gates/SKILL.mdView on GitHub Overview
Verification Gates are deliberate pauses that validate prerequisites before moving to the next phase, preventing cascading errors. They force formal checks at each phase to ensure assumptions are verified and stakeholders agree before work advances.
How This Skill Works
Each gate defines a criteria set for the phase (Gate 1: Requirements, Gate 2: Design, Gate 3: Implementation, Gate 4: Integration, Gate 5: Deployment). Gates can be automated in CI (lint, type-check, unit tests, build) or implemented as manual checklists. If any gate fails, progress stops and you revisit the preceding phase to fix blockers.
When to Use It
- Before starting design (Gate 1: Requirements Verification)
- Before starting implementation (Gate 2: Design Verification)
- Before declaring task complete (Gate 3: Implementation Verification)
- Before merging the feature (Gate 4: Integration Verification)
- Before marking deployment complete (Gate 5: Deployment Verification)
Quick Start
- Step 1: Define each gate's criteria (1–5) and map to your project.
- Step 2: Enable automated gates in CI (lint, type-check, unit tests) and craft manual checklists as needed.
- Step 3: Enforce the gate sequence in your workflow and rework any failed gate before proceeding.
Best Practices
- Document requirements clearly and resolve ambiguities before Gate 1.
- Walk the design against requirements, define interfaces, and plan error handling before Gate 2.
- Ensure code quality: tests pass, code follows conventions, and coverage exists before Gate 3.
- Validate end-to-end functionality and guard against regressions during Gate 4.
- Prepare deployment readiness: monitoring, error handling, rollback plan, and stakeholder sign-off for Gate 5.
Example Use Cases
- Use Gate 1 to lock down requirements for a new feature before any design work.
- Apply Gate 2 to verify the design covers all requirements and defines data interfaces before coding.
- Enforce Gate 3 to ensure the implementation passes tests and integrates with existing code.
- Run Gate 4 to verify end-to-end user flows and detect regressions before merging.
- Execute Gate 5 to confirm deployment readiness with monitoring and a rollback plan before production release.