Claude
Skills
Sign in
Back

verification-loop

Included with Lifetime
$97 forever

Verification loop to ensure tasks are fully completed before moving on - implements feedback cycle from QA back to Development until all issues are resolved

Code Review

What this skill does


# Verification Loop Skill

Use this skill to implement a rigorous verification loop that ensures work is truly complete before moving to the next task. This prevents premature completion and enforces quality standards.

## When to Use
- After QA testing completes
- Before marking tasks as complete
- When QA finds issues
- After implementing fixes
- Throughout development workflow

## Why This Is Critical

### The Problem
Without a verification loop:
- ❌ Tasks marked complete with failing tests
- ❌ Issues discovered later in production
- ❌ QA findings ignored
- ❌ Work moves forward with bugs
- ❌ Accumulating technical debt

### The Solution
With a verification loop:
- ✅ All tests must pass before completion
- ✅ Issues fixed and retested
- ✅ QA findings addressed
- ✅ Quality enforced
- ✅ Clean, working code

## What This Skill Does

### 1. Define Completion Criteria
Establishes what "done" means:
- All tests pass (unit, integration, E2E)
- Build succeeds with 0 errors, 0 warnings
- Linting passes
- QA validation passes
- No console errors
- Screenshots verify visual correctness
- All acceptance criteria met

### 2. Collect QA Results
Gathers test outcomes:
- Test pass/fail status
- Error messages
- Failed assertions
- Console errors
- Screenshot evidence
- Performance metrics

### 3. Verify Completion
Checks if work meets all criteria:
```
IF all_tests_pass AND no_errors AND qa_approved:
  STATUS = COMPLETE
  NEXT_STEP = Move to next task
ELSE:
  STATUS = NEEDS_FIXES
  NEXT_STEP = Back to development
```

### 4. Feedback Loop
When issues found:
1. Document all failures
2. Prioritize fixes
3. Return to development
4. Implement fixes
5. Re-run QA
6. Verify fixes worked
7. Repeat until PASS

### 5. Track Verification Cycles
Monitors iterations:
- Cycle 1: Initial QA → 5 issues found
- Cycle 2: Fixes applied → 2 issues remain
- Cycle 3: More fixes → All tests pass ✅

## Verification Workflow

### Step 1: Define Acceptance Criteria
Before development starts:

```yaml
Task: Implement Schedule Calendar Page

Acceptance Criteria:
  Functionality:
    - [ ] Create schedule works
    - [ ] Edit schedule works
    - [ ] Delete schedule works
    - [ ] Calendar displays correctly
    - [ ] Filters work

  Code Quality:
    - [ ] npm run lint passes (0 errors)
    - [ ] npm run build succeeds
    - [ ] TypeScript types correct
    - [ ] No console errors

  QA Validation:
    - [ ] Playwright tests pass
    - [ ] Responsive on mobile (375px)
    - [ ] Responsive on desktop (1280px)
    - [ ] Screenshots captured
    - [ ] Touch targets 44px minimum
    - [ ] No horizontal scrolling

  Performance:
    - [ ] Page loads < 2s
    - [ ] Smooth 60fps scrolling
    - [ ] No memory leaks
```

### Step 2: Development Phase
Developer implements feature:
1. Write code
2. Run linter: `npm run lint`
3. Run build: `npm run build`
4. Fix any errors
5. Self-test functionality
6. Ready for QA

### Step 3: QA Phase
QA agent runs comprehensive tests:

```
QA Frontend Engineer:
  ✅ PASS: Create schedule functionality works
  ✅ PASS: Edit schedule functionality works
  ✅ PASS: Delete schedule functionality works
  ✅ PASS: Calendar displays correctly
  ❌ FAIL: Filters not working - clicking filter doesn't filter results
  ✅ PASS: npm run lint (0 errors)
  ✅ PASS: npm run build succeeds
  ❌ FAIL: Console error: "Cannot read property 'id' of undefined"
  ✅ PASS: Desktop responsive (1280px)
  ❌ FAIL: Mobile layout broken - horizontal scroll at 375px
  ❌ FAIL: Delete button touch target only 32px (needs 44px)
  ✅ PASS: Screenshots captured

QA Status: FAILED (4 issues)
```

### Step 4: Verification Check
Verification agent evaluates:

```
Verification Check:
  Total Tests: 12
  Passed: 8
  Failed: 4
  Pass Rate: 67%

  Critical Issues:
    1. Filter functionality broken
    2. Console error (undefined property)
    3. Mobile horizontal scroll
    4. Touch target too small

  Status: INCOMPLETE
  Decision: RETURN TO DEVELOPMENT

  Next Steps:
    1. Fix filter click handler
    2. Fix undefined property error
    3. Fix mobile layout overflow
    4. Increase delete button size to 44px
    5. Re-run QA after fixes
```

### Step 5: Fix and Re-Test Cycle
Developer fixes issues:

```
Fix Cycle 1:
  Developer:
    - Fixed filter click handler
    - Added null check for undefined property
    - Fixed mobile overflow (removed fixed width)
    - Increased button size to 44px

  Re-run QA Frontend Engineer:
    ✅ PASS: Filters now working
    ✅ PASS: No console errors
    ✅ PASS: No horizontal scroll on mobile
    ✅ PASS: Delete button 44x44px

  QA Status: ALL TESTS PASS ✅

  Verification Check:
    Total Tests: 12
    Passed: 12
    Failed: 0
    Pass Rate: 100%

    Status: COMPLETE ✅
    Decision: APPROVE - Move to next task
```

### Step 6: Final Verification
Before marking complete:

```
Final Verification Checklist:
  Development:
    ✅ Code written and tested
    ✅ Linting passes
    ✅ Build succeeds
    ✅ No TypeScript errors

  QA Testing:
    ✅ All functionality tests pass
    ✅ Responsive tests pass
    ✅ Visual tests pass
    ✅ Performance acceptable
    ✅ No console errors

  Documentation:
    ✅ Code comments added
    ✅ Screenshots captured
    ✅ Test report generated

  Status: VERIFIED COMPLETE ✅

  OK to:
    ✅ Mark task as complete
    ✅ Move to next task
    ✅ Create git commit
```

## Verification State Machine

```
                 START
                   ↓
         [Development Complete]
                   ↓
              [Run QA Tests]
                   ↓
           ┌───────┴───────┐
           │               │
      [All Pass?]      [Any Fail?]
           │               │
           ↓               ↓
    [VERIFIED]      [NEEDS FIXES]
           │               │
           ↓               ↓
    [Move to Next]  [Document Issues]
                           ↓
                    [Prioritize Fixes]
                           ↓
                    [Return to Dev]
                           ↓
                    [Implement Fixes]
                           ↓
                    [Re-run QA Tests] ──┐
                           │            │
                           └────────────┘
                         (Loop until pass)
```

## Tracking Verification Cycles

### Cycle Tracking Template
```yaml
Feature: Schedule Calendar Page
Task: Implement CRUD operations

Cycle 1:
  Date: 2025-01-15
  QA Result: FAIL
  Issues Found: 5
  Critical: 2
  Details:
    - Filter not working
    - Console error
    - Mobile overflow
    - Touch target too small
    - Loading state missing
  Action: Return to development

Cycle 2:
  Date: 2025-01-15 (later)
  Fixes Applied:
    - Fixed filter handler
    - Added null check
    - Fixed mobile width
    - Increased button size
    - Added loading spinner
  QA Result: PASS ✅
  Issues Found: 0
  Action: APPROVED

Total Cycles: 2
Time to Completion: 4 hours
Status: VERIFIED COMPLETE
```

## Verification Checklist Generator

```javascript
function generateVerificationChecklist(task, requirements) {
  const checklist = {
    task: task.name,
    criteria: [],
    results: [],
    status: 'PENDING'
  }

  // Add functional requirements
  requirements.functional.forEach(req => {
    checklist.criteria.push({
      type: 'functional',
      description: req,
      status: 'PENDING',
      evidence: null
    })
  })

  // Add quality requirements
  checklist.criteria.push({
    type: 'quality',
    description: 'npm run lint passes',
    status: 'PENDING',
    evidence: null
  })

  checklist.criteria.push({
    type: 'quality',
    description: 'npm run build succeeds',
    status: 'PENDING',
    evidence: null
  })

  // Add QA requirements
  checklist.criteria.push({
    type: 'qa',
    description: 'Playwright tests pass',
    status: 'PENDING',
    evidence: null
  })

  checklist.criteria.push({
    type: 'qa',
    description: 'Mobile responsive (375px)',
    status: 'PENDING',
    evidence: 'screenshot required'
  })

  checklist.criteria.push({

Related in Code Review