AI-powered compliance checking for IBHS Wildfire Prepared Home Plus designation using Claude's vision capabilities.
This tool automatically analyzes building plan PDFs and checks them against the IBHS (Insurance Institute for Business & Home Safety) Wildfire Prepared Home Plus technical standards. It uses Claude's vision API to read and interpret architectural drawings, specifications, and notes.
- β Automated Plan Analysis: Reviews all plan sheets using AI vision
- π Comprehensive Checking: Covers all 32+ IBHS requirements across 16 categories
- π― Intelligent Synthesis: Aggregates findings across multiple sheets
- π Detailed Reports: Generates both JSON and HTML reports
- π Evidence Tracking: References specific plan sheet locations
- π‘ Recommendations: Provides actionable guidance for non-compliant items
- π Confidence Scoring: Each finding includes a confidence level
- Python 3.8+
- poppler-utils (for PDF to image conversion)
- anthropic (Claude API client)
- pdf2image
- Pillow
macOS:
brew install popplerUbuntu/Debian:
sudo apt-get install poppler-utilsWindows: Download and install poppler from: https://github.com/oschwartz10612/poppler-windows/releases/
git clone https://github.com/sumit0804/wildfire-compliance-checker.git
cd wildfire-compliance-checkerpip install -r requirements.txtGet your Anthropic API key from: https://console.anthropic.com/
Set as environment variable:
export ANTHROPIC_API_KEY='your-api-key-here'Or pass directly when running the tool.
Basic usage:
python compliance_checker.py /path/to/building_plans.pdfWith HTML report:
python compliance_checker.py /path/to/building_plans.pdf --htmlSpecify output path:
python compliance_checker.py /path/to/building_plans.pdf -o my_report.json --htmlWith API key:
python compliance_checker.py /path/to/building_plans.pdf --api-key sk-ant-xxxxxfrom compliance_checker import WildfireComplianceChecker
# Initialize checker
checker = WildfireComplianceChecker(api_key='your-api-key')
# Run compliance check
results = checker.check_compliance(
plan_pdf_path='path/to/plans.pdf',
output_path='compliance_report.json'
)
# Generate HTML report
html_path = checker.generate_html_report(
results_json_path='compliance_report.json',
output_html_path='compliance_report.html'
)
# Access results
summary = results['summary']
print(f"Compliance Rate: {summary['compliance_rate']}")
print(f"Critical Issues: {summary['critical_issues']}")The tool checks compliance with all IBHS Wildfire Prepared Home Plus requirements:
- Roof Assembly: Class A rating, noncombustible flashing, no wood shakes
- Gutters and Downspouts: Noncombustible materials, gutter covers
- Vents: ASTM E2886 compliance or mesh protection
- Exterior Walls: 100% noncombustible coverage
- Eaves and Soffits: Noncombustible enclosure
- Windows and Glazing: Tempered panes or fire-rated glazing
- Exterior Doors: Noncombustible or solid-core wood
- Underfloor and Projections: Noncombustible coverings
- Attached Decks and Stairs: All components noncombustible
- Additional Structures: Noncombustible within 30 feet
- Detached Structures: 30-foot separation, same standards
- Zone 0 (0-5 feet): Clear zone, noncombustible hardscape
- Zone 1 (5-30 feet): Vegetation spacing, no fuel bed
- Fences and Gates: Noncombustible within 5 feet
- Propane Tanks: 30-foot separation or clearance zones
- Hot Tubs and Saunas: 10-foot separation, noncombustible zone
{
"project_info": {
"plan_file": "building_plans.pdf",
"check_date": "2025-02-07T10:30:00",
"total_requirements": 32,
"total_sheets": 11
},
"summary": {
"total_requirements": 32,
"compliant": 24,
"non_compliant": 3,
"insufficient_info": 4,
"needs_review": 1,
"compliance_rate": "75.0%",
"critical_issues": 2,
"average_confidence": "82.5%"
},
"findings": [
{
"requirement_id": "1a",
"category": "Roof Assembly",
"status": "COMPLIANT",
"confidence": 0.95,
"finding_text": "...",
"evidence": ["Sheet 1: General Notes", "Sheet 3: Roof Plan"],
"recommendation": null
}
]
}The HTML report provides:
- Visual summary dashboard
- Compliance rate visualization
- Findings organized by category
- Color-coded status indicators
- Confidence bars
- Evidence references
- Actionable recommendations
- Converts each PDF page to high-resolution images (200 DPI)
- Maintains scale information for measurements
For each requirement:
- Claude analyzes each plan sheet with vision API
- Searches for relevant specifications, notes, and details
- Extracts material callouts and dimensions
- Identifies compliance evidence
- Aggregates findings across all sheets
- Determines overall compliance status
- Calculates confidence scores
- Generates recommendations
- Compiles comprehensive JSON results
- Generates formatted HTML report
- Provides actionable next steps
- COMPLIANT: Clear evidence requirement is met
- NON-COMPLIANT: Clear evidence requirement is not met
- INSUFFICIENT_INFO: Cannot determine from available plans
- NEEDS_REVIEW: Ambiguous or requires professional judgment
- AI Interpretation: While highly accurate, AI may misinterpret complex or ambiguous drawings
- Professional Review: This tool supplements but does not replace professional plan review
- Code Versions: Checks against current IBHS Plus standards (update requirements as needed)
- Visual Quality: Works best with clear, high-quality scanned plans
- API Costs: Uses Claude's vision API which has associated costs
- Plan Quality: Ensure PDFs are clear and readable
- Complete Sets: Include all relevant sheets (architectural, structural, MEP, landscape)
- Review Results: Always review findings, especially low-confidence items
- Professional Verification: Have critical findings verified by professionals
- Multiple Passes: For complex projects, consider reviewing questionable items manually
# Verify poppler installation
pdfinfo --version
# If issues persist, install latest poppler# Verify API key
echo $ANTHROPIC_API_KEY
# Check API quota at console.anthropic.com- Process sheets in batches
- Reduce DPI in
convert_pdf_to_images()(currently 200) - Split large plan sets into multiple files
Approximate Claude API costs (as of Feb 2025):
- Per plan sheet: ~$0.10-0.30 (depending on complexity)
- Typical plan set (10-15 sheets): ~$2-5 total
- Large commercial project (30+ sheets): ~$10-15
See the examples/ directory for:
- Sample plan PDFs
- Generated compliance reports
- Common compliance issues
Contributions welcome! Please:
- Fork the repository
- Create a feature branch
- Add tests for new requirements
- Submit a pull request
- Support for other wildfire standards (CAL FIRE, ICC)
- Measurement extraction for zone verification
- Multi-language support
- Web interface
- Batch processing for multiple projects
- Integration with plan review software
MIT License - see LICENSE file for details
This tool is provided for informational purposes only. Compliance determinations should be verified by licensed professionals. The tool's output does not constitute professional plan review, code compliance certification, or engineering approval.
- π Issues: https://github.com/sumit0804/wildfire-compliance-checker/issues
- π§ Email: support@example.com
- π Documentation: https://github.com/sumit0804/wildfire-compliance-checker/wiki
- IBHS for technical standards
- Anthropic for Claude API
- Building plan reviewers for domain expertise
Made with π₯ prevention in mind