This guide helps you upgrade from SpecBridge v1.3 to v2.0.
- Overview
- Breaking Changes
- Automated Migration
- Manual Migration Steps
- Testing Your Migration
- Rollback Plan
- FAQ
SpecBridge v2.0 introduces significant performance improvements and new features while maintaining backward compatibility where possible.
✅ Plugin System - Create custom verifiers ✅ Severity-Weighted Compliance - More accurate scores ✅ Dashboard Caching - Sub-1-second load times ✅ Performance Optimizations - 30% faster verification
Estimated migration time:
- Small projects (<10 decisions): 15-30 minutes
- Medium projects (10-50 decisions): 1-2 hours
- Large projects (50+ decisions): 2-4 hours
Impact: Compliance scores will change, especially for projects with critical violations.
Before (v1.3):
compliance = 100 - min(violations * 10, 100)
All violations weighted equally.
After (v2.0):
weights = { critical: 40, high: 25, medium: 10, low: 2 }
weightedScore = sum(violations × severity weight)
baseCompliance = max(0, 100 - weightedScore)
compliance = baseCompliance × (1 - violationRate × 0.2)
Violations weighted by severity with coverage penalty.
Example Impact:
- 1 critical violation: 90% → 48-60%
- 5 low violations: 50% → 90%
- Mixed violations: More nuanced scoring
Action Required:
- Review and potentially adjust CI compliance thresholds
- Use
--legacy-complianceflag during transition
Impact: verifier field deprecated in favor of structured check block.
Before (v1.3):
constraints:
- id: c-1
verifier: naming
rule: "Use camelCase"After (v2.0 - Recommended):
constraints:
- id: c-1
check:
verifier: naming
params:
# Optional parameters
rule: "Use camelCase"Note: Old format still works but is deprecated.
Action Required:
- Run
specbridge migrateto auto-convert (optional but recommended) - Or keep old format (works in v2.0)
Impact: Dashboard server initialization changed.
Before (v1.3):
const app = createDashboardServer({ cwd, config });
app.listen(3000);After (v2.0):
const server = createDashboardServer({ cwd, config });
await server.start(); // Load cache and registry
server.getApp().listen(3000);Action Required:
- Update custom dashboard integrations
- CLI users: No change needed
npm install @ipation/specbridge@^2.0.0# Preview changes
specbridge migrate --dry-run
# Execute migration
specbridge migrateThe migration tool:
- ✅ Creates backup in
.specbridge/decisions.backup/ - ✅ Converts
verifier→check.verifierformat - ✅ Generates v1 vs v2 compliance comparison
- ✅ Validates all decisions
✓ Migration Summary:
Backup:
.specbridge/decisions.backup/2024-02-03_14-30-00/
Changes:
• Updated 12 decision file(s)
• All decisions validated successfully
Compliance Comparison:
v1.3 formula: 85%
v2.0 formula: 72%
Difference: -13.0%
⚠️ Note: Compliance score changed significantly.
Consider adjusting CI thresholds.
If you prefer manual migration or need custom adjustments:
cp -r .specbridge .specbridge.backupConvert verifier fields to check blocks:
# Find and replace in all .decision.yaml files
# OLD:
# verifier: naming
# NEW:
# check:
# verifier: namingUsing sed:
cd .specbridge/decisions
for file in *.decision.yaml; do
sed -i 's/^ verifier: \(.*\)$/ check:\n verifier: \1/' "$file"
done# v1.3 formula (for comparison)
specbridge report --legacy-compliance > compliance-v1.txt
# v2.0 formula
specbridge report > compliance-v2.txt
# Compare
diff compliance-v1.txt compliance-v2.txtUpdate your CI configuration based on new compliance scores:
# .github/workflows/verify.yml
# BEFORE
- name: Check Compliance
run: specbridge report --format json | jq -e '.summary.compliance >= 80'
# AFTER - Adjust threshold or use legacy mode temporarily
- name: Check Compliance
run: specbridge report --format json | jq -e '.summary.compliance >= 70'
# OR use legacy mode during transition
- name: Check Compliance (Legacy)
run: specbridge report --legacy-compliance --format json | jq -e '.summary.compliance >= 80'# Verify decisions load correctly
specbridge verify
# Check dashboard
specbridge dashboard
# Run tests
npm test- All decisions load without errors
- Verification runs successfully
- Dashboard loads (if used)
- CI pipeline passes
- Compliance scores understood
- Team notified of changes
# 1. Load decisions
specbridge verify --explain
# 2. Generate report
specbridge report --format console
# 3. Compare formulas
specbridge report --legacy-compliance > legacy.txt
specbridge report > new.txt
diff legacy.txt new.txt
# 4. Test dashboard (if used)
specbridge dashboard
curl http://localhost:3000/api/health
# 5. Run your tests
npm testCause: New formula weights critical violations more heavily.
Solution:
- This is expected behavior
- Review violations: Are they actually critical?
- Adjust thresholds in CI
- OR use
--legacy-compliancetemporarily
Cause: Typo in verifier ID or plugin not loaded.
Solution:
# Check available verifiers
specbridge verify --explain
# Verify decision syntax
# Ensure check.verifier matches available verifiersCause: Port in use or cache initialization failed.
Solution:
# Try different port
specbridge dashboard --port 3001
# Check logs for errors
# Ensure .specbridge/reports/ is writableIf you need to roll back to v1.3:
# Restore decisions
rm -rf .specbridge/decisions
cp -r .specbridge/decisions.backup/* .specbridge/decisions/
# Reinstall v1.3
npm install @ipation/[email protected]
# Verify
specbridge verify# If using version control
git checkout HEAD -- .specbridge/
npm install @ipation/[email protected]- Restore decision files from backup
- Downgrade package:
npm install @ipation/[email protected] - Clear cache:
rm -rf .specbridge/reports/ - Verify:
specbridge verify
No. The old verifier: format still works in v2.0. Migration is recommended but optional.
Yes, significantly. The new formula better reflects severity. Review and adjust thresholds.
Yes. Use --legacy-compliance flag to generate reports with v1.3 formula.
Yes, if you use the dashboard API programmatically. CLI usage unchanged.
See Plugin Development Guide. New in v2.0.1: Custom verifiers can now define paramsSchema for type-safe parameter validation.
Yes. You can:
- Install v2.0
- Use
--legacy-compliancein CI - Gradually adjust thresholds
- Eventually remove
--legacy-compliance
v2.0 is significantly faster (30% target). You should see improvements immediately.
- Enable results caching (automatic)
- Use instance pooling (automatic)
- Increase batch size (automatic)
- Monitor cache hit rates in logs
- Check GitHub Issues
- Read CHANGELOG.md
- Ask in Discussions
- Email [email protected]
# Monitor cache effectiveness
specbridge verify # First run
specbridge verify # Second run (should be faster)
# Check cache stats in logs# Create custom verifier
cp templates/verifiers/example-custom.ts .specbridge/verifiers/
# Monitor dashboard performance
specbridge dashboard
# Check response times < 1s
# Review severity-weighted scores
specbridge report --format console- Update team docs with new compliance formula
- Document custom verifiers (if any)
- Update CI/CD configuration docs
- Share migration experience with team
- Review breaking changes
- Plan CI threshold adjustments
- Communicate with team
- Schedule migration window
- Run
specbridge migrate --dry-run - Review changes
- Execute migration
- Update CI configuration
- Test thoroughly
- Monitor compliance trends
- Gather team feedback
- Fine-tune thresholds
- Document learnings
Need help migrating?
- 📚 Documentation
- 💬 Discussions
- 🐛 Report Issues
- ✉️ Email: [email protected]
Last Updated: 2024-02-03 SpecBridge Version: 2.0.0