rooftrace-ai

Implements perimeter-first AI roof tracing with calibration, topology, and immutable measurement revisions.

Updated Sep 24, 2025
One-click install
npx skills add https://github.com/chriso789/pitch-1 --skill rooftrace-ai-chriso789
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: rooftrace-ai
Source: https://github.com/chriso789/pitch-1/tree/main/.agents/skills/rooftrace-ai
Command: npx skills add https://github.com/chriso789/pitch-1 --skill rooftrace-ai-chriso789

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Roof measurement in a CRM often relies on unreliable global-mask calculations that silently produce wrong areas and can overwrite estimates. This Skill defines a perimeter-first implementation contract for the RoofTrace AI feature in PITCH CRM's Measure Lab, ensuring AI-assisted roof traces are calibrated, gated, reviewed, and saved as measurement drafts without ever auto-writing estimates. ## Core Features & Use Cases - Perimeter-First Tracing Workflow: Enforces a 7-stage pipeline (source, calibrate, outer perimeter, topology, pitch, review, approve) where the outer eave perimeter must be accepted before any facet, ridge, hip, or valley data is trusted. - Hard Quality Gates: Blocks approval when scale confidence is below 0.85, the perimeter self-intersects, facets fall outside the perimeter, or topology lines cross, and flags low-confidence penetrations or stale imagery. - Immutable Revisions & Measurement Drafts: Approval creates a versioned, immutable revision that writes only to measurement_drafts, never touching estimates, materials, or labor rows. - Use Case: An estimator uploads an aerial image for a job, calibrates scale from a known dimension, accepts the AI-proposed perimeter, edits facets, sets a 6/12 pitch, and approves a revision that produces exactly one measurement draft for later estimate building. ## Quick Start Load this Skill when implementing or modifying the RoofTrace AI tracing workbench, the roof_trace_sessions, roof_trace_revisions, roof_trace_jobs, or measurement_drafts tables, or any Measure Lab perimeter-first measurement logic.

Frequently Asked Questions about rooftrace-ai

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement AI roof measurement in a CRM?▼

Use a perimeter-first workflow: detect and score the outer eave perimeter before trusting any facet, ridge, or valley data. Calibrate scale from plan annotations, GIS footprints, or user reference lines, and require manual confirmation when confidence falls below 0.85.

How do I prevent AI roof traces from overwriting estimates?▼

Write approved traces only to a measurement_drafts table with statuses ready, applied, or superseded. Never let the tracing pipeline create or modify estimate, estimate_lines, supplier, material, or labor rows; waste and pricing stay an estimate-template concern.

What database schema supports versioned roof measurements?▼

Use four tenant-scoped tables: roof_trace_sessions, roof_trace_revisions with a unique(session_id, revision) constraint and draft/approved/superseded states, roof_trace_jobs for async worker stages, and measurement_drafts. Enable row-level security on all four tables.

Can roof pitch be detected from flat aerial imagery?▼

No. Pitch must come only from plan annotations, LiDAR/DSM data, or a verified user value. When no supported evidence exists, mark the facet as needs_pitch_review and keep an unknown_pitch_plan_area_sqft subtotal rather than fabricating slope areas.

Why does a roof trace approval get blocked?▼

Approval is blocked when there is no valid outer perimeter, scale confidence is below 0.85, a facet falls outside the perimeter, topology lines intersect, or critical warnings are unresolved. Low-confidence penetrations and imagery older than 36 months only trigger flags.

Where should AI roof image analysis run in the architecture?▼

All image and PDF analysis runs in the pitch-worker-api service via POST /v1/roof-trace/sessions/:sessionId/run, never in the browser or a Supabase database function. The browser polls roof_trace_jobs or uses realtime instead of long-waiting on the request.