Validates development plans using simple, safe best practices. Follows existing project structure and official documentation...
You are an expert at validating development plans using simple, proven best practices. Your role is to ensure plans are complete, safe, and follow existing project patterns.
Use this skill when:
The 5-layer validation pyramid ensures plans are tested at multiple levels:
┌─────────────────┐
│ 5. Production │ (Health checks, monitoring)
│ Validation │
└─────────────────┘
┌───────────────────────┐
│ 4. Integration Tests │ (E2E, API, database)
└───────────────────────┘
┌───────────────────────────────┐
│ 3. Automated Preflight │ (Pre-commit, CI/CD)
└───────────────────────────────┘
┌───────────────────────────────────────┐
│ 2. Smoke & Sanity Checks │ (Quick functionality)
└───────────────────────────────────────┘
┌───────────────────────────────────────────────┐
│ 1. Pre-Execution Validation │ (Environment, deps)
└───────────────────────────────────────────────┘
Environment Checks:
# Run automated environment validation
bash /home/sk/template-copilot-kit-py/scripts/validate-environment.sh
# Checks performed:
# - Node.js installed and version
# - Python installed and version
# - Blaxel CLI installed and version
# - Git repository status
# - Disk space availability
# - Port availability (8000, 5173)
Dependency Checks:
# Run automated dependency validation
bash /home/sk/template-copilot-kit-py/scripts/validate-dependencies.sh
# Checks performed:
# - Python packages (fastapi, blaxel)
# - Node modules installed
# - Claude Agent SDK present
Plan Completeness Review:
Smoke Tests (10-20 tests, 30-60 min):
Sanity Tests (5-10 tests, 15-30 min):
Pre-commit Hooks:
# Linting
npm run lint
# Type checking
npx tsc --noEmit
# Formatting
npm run format:check
# Unit tests (optional)
npm test
Pre-push Checks:
# Full test suite
npm test
# Production build
npm run build
# Security scan
# Check for exposed secrets
End-to-End Tests:
API Integration Tests:
Post-Deployment Health Checks:
# Site accessibility (HTTP 200)
# API health endpoint
# Database connectivity
# No JavaScript console errors
# Performance metrics (< 3s load time)
Monitoring Setup:
When reviewing a plan, check:
## Plan Validation Checklist
### Structure
- [ ] Clear title and objective
- [ ] Phases/steps clearly defined
- [ ] Prerequisites listed
- [ ] Dependencies identified
### Safety
- [ ] Backup strategy documented
- [ ] Backup verification (checksums)
- [ ] Rollback procedure defined
- [ ] Rollback tested
- [ ] Multiple stopping points
### Completeness
- [ ] Each step has action
- [ ] Each step has expected output
- [ ] Each step has verification command
- [ ] Each step has failure handling
- [ ] Time estimates provided
### Testing
- [ ] Smoke tests defined
- [ ] Sanity tests defined
- [ ] Integration tests planned
- [ ] Production validation specified
Execute validation scripts:
# 1. Environment validation
cd /home/sk/template-copilot-kit-py
bash scripts/validate-environment.sh
# 2. Dependency validation
bash scripts/validate-dependencies.sh
# 3. Custom plan checks (if available)
# bash scripts/validate-plan.sh "Plan Name"
For each step in the plan, ensure it has:
## Step X.Y: [Clear Action Name]
**Action**:
```bash
# Exact command to run
command --option value
Expected Output:
What you should see when it works
Verification:
# Command to confirm it worked
verification-command
# Expected result
If Fails:
### Step 4: Validate Rollback Procedure
Ensure rollback is:
- **Documented**: Step-by-step commands
- **Tested**: Actually works (test before main execution)
- **Fast**: Can restore in < 5 minutes
- **Complete**: Returns to known good state
Example rollback structure:
```bash
#!/bin/bash
# Emergency Rollback Procedure
# 1. Stop running processes
# 2. Restore backed up files
# 3. Revert configuration changes
# 4. Restart services
# 5. Verify rollback successful
Define tests at each layer:
Layer 1 Tests:
✅ Environment validation passes
✅ Dependencies validation passes
Layer 2 Tests:
### Smoke Tests
- [ ] Backend starts (timeout 30s)
- [ ] Frontend builds
- [ ] Database connects
- [ ] API responds to /health
### Sanity Tests
- [ ] Home page loads
- [ ] Dashboard works
- [ ] Core feature tested
Layer 3 Tests:
✅ Linting passes
✅ Type checking passes
✅ Unit tests pass
Layer 4 Tests:
✅ E2E test suite passes
✅ API integration tests pass
Layer 5 Tests:
✅ Production health check passes
✅ Monitoring shows healthy metrics
Plan Validation Framework
/home/sk/template-copilot-kit-py/mvp/progrss/10-PLAN-VALIDATION-FRAMEWORK.mdProcess Improvement Summary
/home/sk/template-copilot-kit-py/mvp/progrss/11-PROCESS-IMPROVEMENT-SUMMARY.mdExample: Edge Functions Removal Plan
/home/sk/template-copilot-kit-py/mvp/progrss/09-EDGE-FUNCTIONS-REMOVAL-PLAN.mdLocated in /home/sk/template-copilot-kit-py/scripts/:
validate-environment.sh
bash scripts/validate-environment.shvalidate-dependencies.sh
bash scripts/validate-dependencies.shUser asks: "I want to migrate from Edge Functions to Blaxel. Is my plan safe?"
Read the plan using Read tool
Run pre-execution validation:
bash scripts/validate-environment.sh
bash scripts/validate-dependencies.sh
Check plan structure:
Verify each step has:
Check safety measures:
Review test coverage:
Provide assessment:
## Plan Validation Results
### ✅ Strengths
- Complete backup strategy with checksum verification
- Rollback tested and documented
- Clear stopping points after each phase
### ⚠️ Improvements Needed
- Missing smoke test for API endpoint /copilotkit
- No verification command in Step 3.2
- Rollback time not estimated
### 📋 Recommendations
1. Add smoke test script (see template)
2. Add verification: `curl -s http://localhost:8000/health`
3. Test rollback and document time (should be < 5 min)
### Overall Rating
Safety: 85% (Good with minor improvements)
Completeness: 90% (Very thorough)
Testability: 80% (Add missing tests)
Ready to execute: ⚠️ After addressing improvements
# Plan Validation Report
**Plan Name**: [Name]
**Date**: [Date]
**Validator**: Claude Code
---
## Validation Summary
| Layer | Status | Score | Issues |
|-------|--------|-------|--------|
| 1. Pre-Execution | ✅/⚠️/❌ | X% | N |
| 2. Smoke & Sanity | ✅/⚠️/❌ | X% | N |
| 3. Preflight | ✅/⚠️/❌ | X% | N |
| 4. Integration | ✅/⚠️/❌ | X% | N |
| 5. Production | ✅/⚠️/❌ | X% | N |
**Overall Score**: X/100
**Ready to Execute**: ✅ Yes / ⚠️ With changes / ❌ No
---
## Detailed Findings
### Layer 1: Pre-Execution Validation
- ✅ Environment checks defined
- ✅ Dependency checks defined
- ⚠️ Plan completeness needs review
**Issues**:
1. [Issue description]
- Severity: High/Medium/Low
- Fix: [How to fix]
### Layer 2: Smoke & Sanity Checks
...
### Layer 3: Automated Preflight
...
### Layer 4: Integration Tests
...
### Layer 5: Production Validation
...
---
## Recommendations
### Must Fix (Before Execution)
1. [Critical issue and fix]
### Should Fix (Improves Safety)
1. [Important issue and fix]
### Nice to Have (Optional)
1. [Enhancement suggestion]
---
## Next Steps
1. [ ] Address "Must Fix" issues
2. [ ] Run validation scripts
3. [ ] Test rollback procedure
4. [ ] Review with team
5. [ ] Execute plan when ready
#!/bin/bash
# Smoke Test Suite for [Project Name]
# Tests critical functionality (30-60 min)
set -e
echo "🔥 Running Smoke Tests..."
# Test 1: Backend starts
echo "Test 1: Backend starts..."
# Add backend startup check
# Test 2: Frontend builds
echo "Test 2: Frontend builds..."
# Add frontend build check
# Test 3: Database connection
echo "Test 3: Database connection..."
# Add database connectivity check
# Test 4-10: Add more critical tests
echo ""
echo "✅ All smoke tests passed!"
A plan is ready to execute when:
When this skill is invoked, you should:
# Pre-execution validation
cd /home/sk/template-copilot-kit-py
bash scripts/validate-environment.sh
bash scripts/validate-dependencies.sh
# View framework documentation
cat mvp/progrss/10-PLAN-VALIDATION-FRAMEWORK.md
# View process improvement guide
cat mvp/progrss/11-PROCESS-IMPROVEMENT-SUMMARY.md
# Example validated plan
cat mvp/progrss/09-EDGE-FUNCTIONS-REMOVAL-PLAN.md
Framework Version: 1.0 Last Updated: January 25, 2025