# WDMaker Site Verification Checklist

**Purpose**: Detailed verification procedures for individual sites and batches
**Scope**: Design compliance, implementation quality, finalization status
**Audience**: QA teams, verification specialists, detail-oriented operators

---

## Part 1: Individual Site Verification Checklist

### Template: Verifying a Single Site at Each Phase

#### Phase 1: Design Verification (After DESIGN.md Generated)

**Site Name**: `[DOMAIN]`
**Batch**: `[BATCH_NUMBER]`
**Date**: `[DATE]`

**1. Design File Exists**
- [ ] File location: `.smbatcher/designs/[domain]-DESIGN.md`
- [ ] File is readable: `ls -l .smbatcher/designs/[domain]-DESIGN.md`
- [ ] File size > 500 bytes (not empty): `wc -c .smbatcher/designs/[domain]-DESIGN.md`
- [ ] File has no truncation errors: `tail -20 .smbatcher/designs/[domain]-DESIGN.md`

**2. Design Content Structure**
- [ ] Contains color palette section
- [ ] Contains typography section
- [ ] Contains layout section
- [ ] Contains interactive features section
- [ ] Contains domain-specific requirements section
- [ ] Contains visual hierarchy notes

**3. Color Palette Validation**
- [ ] Primary color defined in hex format (e.g., `#XXXXXX`)
- [ ] Secondary color defined
- [ ] Accent color defined
- [ ] Background color defined
- [ ] Text color (primary) defined
- [ ] Text color (secondary) defined
- [ ] All colors are valid hex codes (no typos)
- [ ] Colors are consistent with brand guidelines

**Verification Command**:
```bash
grep -E "#[0-9A-Fa-f]{6}" .smbatcher/designs/[domain]-DESIGN.md | wc -l
# Expected: At least 4-6 color definitions
```

**4. Typography Validation**
- [ ] Primary font family specified (e.g., "Helvetica, Arial, sans-serif")
- [ ] Secondary font family specified
- [ ] Heading font sizes defined
- [ ] Body font size defined
- [ ] Line height specified
- [ ] Letter spacing specified

**Verification Command**:
```bash
grep -i "font\|size\|weight" .smbatcher/designs/[domain]-DESIGN.md | wc -l
# Expected: At least 6-8 typography specifications
```

**5. Layout Validation**
- [ ] Grid system described (columns, spacing)
- [ ] Breakpoints defined for responsive design
- [ ] Container width/padding specified
- [ ] Spacing/margin rules defined

**6. Domain Specificity**
- [ ] Design reflects domain purpose/category
- [ ] Design appropriate for target audience
- [ ] Special considerations documented

**Verification Result**:
- [ ] PASS (all checks)
- [ ] FAIL (missing critical sections) → Document which sections missing
- [ ] PASS WITH NOTES (minor issues but acceptable)

---

#### Phase 2: Implementation Verification (After Files Generated)

**Site Name**: `[DOMAIN]`
**Implementation Batch**: `[BATCH_NUMBER]`
**Date**: `[DATE]`

**1. Generated Files Exist**
- [ ] index.html exists: `ls -la sites/[domain]-v1/index.html`
- [ ] styles.css exists: `ls -la sites/[domain]-v1/styles.css`
- [ ] script.js exists: `ls -la sites/[domain]-v1/script.js`
- [ ] All files > 0 bytes (not empty)

**Size Validation**:
```bash
# Expected minimum sizes
ls -l sites/[domain]-v1/
# index.html: > 1KB
# styles.css: > 0.5KB
# script.js: > 0.5KB
```

**2. HTML Validation**
- [ ] File contains proper HTML5 structure
- [ ] Contains `<!DOCTYPE html>`
- [ ] Contains `<html>` tags
- [ ] Contains `<head>` with metadata
- [ ] Contains `<body>` with content
- [ ] No syntax errors: `grep -c ">"  sites/[domain]-v1/index.html` (should have balanced tags)

**Verification Command**:
```bash
# Count opening and closing tags
echo "Opening divs: $(grep -o '<div' sites/[domain]-v1/index.html | wc -l)"
echo "Closing divs: $(grep -o '</div>' sites/[domain]-v1/index.html | wc -l)"
# These should match
```

**3. CSS Validation**
- [ ] Proper CSS syntax (no missing semicolons in obvious places)
- [ ] Color variables or hex codes present
- [ ] Font declarations present
- [ ] Media queries for responsive design
- [ ] File doesn't have obvious syntax errors

**Verification Command**:
```bash
# Look for colors in CSS
grep -E "#[0-9A-Fa-f]{6}|rgb|color" sites/[domain]-v1/styles.css | head -10
# Should show actual color definitions
```

**4. JavaScript Validation**
- [ ] File contains valid JavaScript syntax
- [ ] No obvious syntax errors (unclosed braces/brackets)
- [ ] Contains event listeners or interactive code
- [ ] Console would not immediately error

**Verification Command**:
```bash
# Count braces to check balance
echo "Opening braces: $(grep -o '{' sites/[domain]-v1/script.js | wc -l)"
echo "Closing braces: $(grep -o '}' sites/[domain]-v1/script.js | wc -l)"
# These should be equal or nearly equal
```

**5. Design Compliance Check**

For each specification from DESIGN.md:

**Colors**:
- [ ] Primary color from design used in CSS
- [ ] Secondary color present in styles
- [ ] Text color matches specification
- [ ] No hardcoded colors conflicting with design

**Verification Command**:
```bash
DESIGN_COLOR=$(grep "Primary.*:" .smbatcher/designs/[domain]-DESIGN.md | head -1)
IMPL_COLOR=$(grep -o "#[0-9A-Fa-f]{6}" sites/[domain]-v1/styles.css | head -1)
echo "Design specifies: $DESIGN_COLOR"
echo "Implementation uses: $IMPL_COLOR"
# These should match or be intentional variations
```

**Typography**:
- [ ] Primary font family in CSS
- [ ] Font sizes consistent with design
- [ ] Heading sizes appropriate
- [ ] Line height specified

**Layout**:
- [ ] Responsive breakpoints in CSS
- [ ] Container styling present
- [ ] Spacing consistent with design

**6. Functionality Check**
- [ ] Page loads without JavaScript errors (if possible to test)
- [ ] Interactive elements have event handlers
- [ ] No console errors expected
- [ ] Expected functionality described in design is present

**Verification Result**:
- [ ] PASS (all checks, design compliance 100%)
- [ ] PASS WITH MINOR ISSUES (small discrepancies, functionality intact)
- [ ] FAIL (missing critical files or major design violations)
- [ ] Percentage compliance: `_____ % of design specifications implemented`

---

#### Phase 3: Finalization Verification (After Status Marked Q)

**Site Name**: `[DOMAIN]`
**Final Status**: Q (Finalized)
**Finalization Date**: `[DATE]`

**1. Registry Status Check**
- [ ] Site appears in REGISTRY.md with status "Q"
- [ ] Batch assignment correct: `[BATCH_NUMBER]`
- [ ] Updated timestamp present
- [ ] No duplicate entries

**Verification Command**:
```bash
grep "^| [^|]*[domain][^|]*|" .smbatcher/REGISTRY.md
# Should show exactly one line with status Q
```

**2. All Files Present**
- [ ] index.html
- [ ] styles.css
- [ ] script.js
- [ ] All in correct location: `sites/[domain]-v1/`

**3. File Integrity**
- [ ] None of the files are corrupted (can be opened)
- [ ] Content matches expected implementation
- [ ] File timestamps reasonable (not from far future or past)

**Verification Command**:
```bash
# Check file modification times
ls -la sites/[domain]-v1/
# Should all be recent (within last few hours)
```

**4. Status Transition Complete**
- [ ] Previously at status "I" (implemented)
- [ ] Successfully transitioned to "Q"
- [ ] No errors during transition
- [ ] No temporary files left behind

**5. No Partial States**
- [ ] Not in temporary directory (.smbatcher/tmp/)
- [ ] Not awaiting verification
- [ ] Not partially implemented
- [ ] Not in failed state

**Finalization Result**:
- [ ] VERIFIED (ready for delivery)
- [ ] ISSUES FOUND (document below)
- [ ] RECERTIFICATION NEEDED

**Issues Found** (if any):
```
1. [Issue 1]
2. [Issue 2]
3. [Issue 3]
```

---

## Part 2: Batch-Level Verification

### Complete Batch 001 Verification Checklist

**Batch**: 001
**Target Sites**: 517 total
**Verification Date**: `[DATE]`

**Batch Status Overview**:
- [ ] Check total sites in batch: `tools/shared/list-sites.sh --batch 001 | wc -l`
  Expected: 517 sites
  Actual: _____ sites

**Design Phase Status**:
- [ ] Count designed sites: `ls .smbatcher/designs/*-DESIGN.md | wc -l`
  Expected: 517 (or all sites)
  Actual: _____ sites

- [ ] All designs valid: Random check 5 designs
  - [ ] Design 1: `____` - PASS / FAIL
  - [ ] Design 2: `____` - PASS / FAIL
  - [ ] Design 3: `____` - PASS / FAIL
  - [ ] Design 4: `____` - PASS / FAIL
  - [ ] Design 5: `____` - PASS / FAIL

**Implementation Status**:

Count by status:
```bash
O_COUNT=$(tools/shared/list-sites.sh --batch 001 --status "O" | wc -l)
i_COUNT=$(tools/shared/list-sites.sh --batch 001 --status "i" | wc -l)
I_COUNT=$(tools/shared/list-sites.sh --batch 001 --status "I" | wc -l)
Q_COUNT=$(tools/shared/list-sites.sh --batch 001 --status "Q" | wc -l)

echo "O status (Open): $O_COUNT"
echo "i status (In-progress): $i_COUNT"
echo "I status (Implemented): $I_COUNT"
echo "Q status (Finalized): $Q_COUNT"
echo "Total: $((O_COUNT + i_COUNT + I_COUNT + Q_COUNT))"
```

Expected progression:
- [ ] During execution: All at O initially, then move to i, then I
- [ ] Pre-finalization: All (or nearly all) at I
- [ ] Post-finalization: All at Q

**File Generation Verification**:

Sample 5 random sites and verify file generation:
- [ ] Site 1: `____` - Files exist: YES / NO - Design compliance: YES / NO
- [ ] Site 2: `____` - Files exist: YES / NO - Design compliance: YES / NO
- [ ] Site 3: `____` - Files exist: YES / NO - Design compliance: YES / NO
- [ ] Site 4: `____` - Files exist: YES / NO - Design compliance: YES / NO
- [ ] Site 5: `____` - Files exist: YES / NO - Design compliance: YES / NO

**Quality Metrics**:
- [ ] File generation success rate: _____ % (verified / total)
- [ ] Design compliance average: _____ %
- [ ] No obvious errors in samples: YES / NO

**Finalization Readiness**:
- [ ] All 517 sites at I status: YES / NO
  If NO, how many not ready? _____ sites
  Stuck status(es): _________

- [ ] Registry is consistent: YES / NO
- [ ] No duplicate entries: YES / NO
- [ ] No corrupted records: YES / NO

**Overall Batch Assessment**:
- [ ] READY FOR FINALIZATION (all at I, no issues)
- [ ] ALMOST READY (most at I, few lagging)
- [ ] NEEDS INVESTIGATION (issues found, check logs)
- [ ] NOT READY (significant problems, do not finalize)

**Notes**:
```
[Record any observations, issues, or interesting patterns]
```

---

### Batch 010 Verification Checklist

**Batch**: 010
**Target Sites**: 1 (single site)
**Site**: 20241204.com
**Verification Date**: `[DATE]`

**Design Phase**:
- [ ] DESIGN.md file exists: `.smbatcher/designs/20241204-DESIGN.md`
- [ ] Design is valid (check against design checklist above)
- [ ] Status before: ` -` (unassigned)
- [ ] Status after: `D` (designed)

**Implementation Phase**:
- [ ] index.html generated: `sites/20241204-v1/index.html`
- [ ] styles.css generated: `sites/20241204-v1/styles.css`
- [ ] script.js generated: `sites/20241204-v1/script.js`
- [ ] All files valid (check against implementation checklist above)
- [ ] Status transitions: O → i → I → Q

**Finalization Phase**:
- [ ] Status at Q (finalized): YES / NO
- [ ] Registry updated correctly: YES / NO
- [ ] Final verification passed: YES / NO

**Final Status**:
- [ ] COMPLETE (site fully processed and finalized)
- [ ] PARTIAL (some phases complete, some pending)
- [ ] FAILED (one or more phases failed)

---

## Part 3: Project-Wide Verification (Final Stage)

### 99.6% Completion Verification

**Total Sites in Catalog**: 568
**Total Finalized Sites**: _____
**Completion Percentage**: _____ %
**Expected**: 566-568 finalized (99.6-100%)

**Final Site Distribution**:
- [ ] Q status: 566-568 sites
- [ ] I status: 0 sites (should all be Q)
- [ ] i status: 0 sites (should not have any in-progress)
- [ ] O status: 0 sites (should all be processed)
- [ ] - status: 0-2 sites (possibly unprocessable)

**Finalized Batch 001**:
- [ ] 517 sites at Q: YES / NO
- [ ] All Batch 001 sites accounted for: YES / NO

**Finalized Batch 010**:
- [ ] 1 site at Q: YES / NO
- [ ] 20241204.com processed: YES / NO

**Accounting for All 568 Sites**:
- [ ] Batch 001 (517 finalized) + Batch 010 (1 finalized) + Previous (48 finalized) = 566
- [ ] 2 sites unaccounted for - documented? YES / NO
  Reasons for missing 2 sites:
  1. ___________
  2. ___________

**Quality Assessment**:
- [ ] No corruption detected: YES / NO
- [ ] No duplicate files: YES / NO
- [ ] All files accessible: YES / NO
- [ ] No orphaned files: YES / NO

**Final Verification Result**:
- [ ] PROJECT COMPLETE - 566-568 sites (99.6-100%)
- [ ] PROJECT INCOMPLETE - Issues found below:

**Unresolved Issues** (if any):
```
1. ____________
2. ____________
3. ____________
```

---

## Part 4: Quick Verification Commands Reference

```bash
# Count sites by status
echo "Status Distribution:"
tools/shared/list-sites.sh | grep -E "^\|" | awk -F'|' '{print $4}' | sort | uniq -c

# Verify batch 001 design files
echo "Batch 001 design files:"
ls .smbatcher/designs/ | grep -c DESIGN

# Verify batch 001 implementations
echo "Batch 001 implementation count:"
ls -d sites/*-v1/ | wc -l

# Check for orphaned files
echo "Files in sites/ but not in registry:"
for dir in sites/*/; do
  domain=$(basename "$dir" | sed 's/-v1$//')
  if ! grep -q "$domain" .smbatcher/REGISTRY.md; then
    echo "  Orphaned: $dir"
  fi
done

# Verify registry integrity
echo "Registry integrity:"
wc -l .smbatcher/REGISTRY.md
echo "Unique domains in registry:"
grep "^|" .smbatcher/REGISTRY.md | awk -F'|' '{print $2}' | sort | uniq | wc -l

# Color palette verification
echo "Color usage across implementations:"
for dir in sites/*/; do
  echo "$(basename $dir): $(grep -o '#[0-9A-Fa-f]\{6\}' $dir/styles.css | sort -u | wc -l) colors"
done | head -10
```

---

## How to Use This Checklist

1. **During Implementation**: Use Phase 1-2 checklists for spot-checks
2. **Before Finalization**: Complete Batch-Level verification
3. **After Finalization**: Complete Phase 3 and Final Stage verifications
4. **For Quality Assurance**: Sample random sites using individual site checklist
5. **For Audit**: Use Part 4 commands to generate summary reports

**Recommended Schedule**:
- Before finalization: Run complete batch verification
- After finalization: Run final project-wide verification
- Post-project: Archive this checklist with verification results

---

*Site Verification Checklist: 2026-03-24*
*Purpose: Detailed quality assurance and compliance verification*
*Scope: Design, implementation, finalization phases*
