Index of every page on this site: llms.txt
All skills
hamzaabduljabbar avatar

/autoconst-spec-compliance-claude

@c25af8d
Run it yourself

Cross-check a live Revit model against its written CSI construction spec (Div 03/07/08/09), and produce a color-coded Excel compliance report with PASS/FAIL/MISSING per element, each finding cited to the exact spec §section and page number. Use when the user asks to compare a Revit model to a spec book, verify that model data (concrete strength, fire ratings, room finishes, hardware, U/R values) matches what the spec requires, or audit a model for compliance before a milestone submittal. Reads the spec once into a SQLite index, auto-extracts rules with page anchors, discovers the model's actual parameter names (no hardcoded assumptions), then runs the check. Requires Revit MCP with the model open + Poppler pdftotext installed.

  • 14 files
  • 3 MB
  • Updated 4 months ago
  • GitHub
Use this Skill: https://skilld.dev/gh/hamzaabduljabbar/autoconst-spec-compliance-claude/autoconst-spec-compliance-claude

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈193 tokens for metadata: the name and description. ≈1.9k when used: this file. ≈70k more on demand in 3 files.

Description uses 9.5% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈760 characters, or 9.5%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Spec vs Model Compliance

Contractors and BIM leads get handed a written spec and a Revit model and are supposed to prove the model matches the spec before every submittal. Nobody does it by hand — a 300-page spec × a model with 5,000 elements is thousands of manual checks. So violations ship. Then RFIs and change orders.

This skill reads the spec once, extracts every checkable requirement (with the page number attached), scans the Revit model's actual parameters, and produces an Excel report with PASS / FAIL / MISSING on every element × rule, each finding citing the exact §section p.page the rule came from.

Cousin of BIM Health Scorecard: same engine shape, but rules come from an external spec PDF rather than a fixed rulebook.


The reliability rule (do not skip)

Every finding cites a spec clause and page. PASS ≠ compliant; MISSING ≠ FAIL.

Result Meaning What to tell the user
PASS data present in the model and satisfies the rule Green
FAIL data present in the model and violates the rule Red — the modeler must fix
MISSING rule applies but the model has no value for it Amber — the modeler must populate

Auto-rule extraction is pattern-based (high recall, non-zero noise). The report always carries the raw source_text from the spec so the user can verify each rule before acting on it.

Auto-discovery of parameters emits a confidence-banded binding map (BOUND ≥0.8 / REVIEW 0.5–0.8 / UNBOUND). The user should review the map before running scoring on a spec with unusual concept coverage.


Workflow

Scripts live in scripts/. Run with py on Windows (or python3). Requires Poppler pdftotext (for spec ingestion) and Revit MCP + the target model open (for model extraction).

1. Index the spec (one-time per spec)

pdftotext -layout your-spec.pdf work/spec_full.txt
py scripts/build_index_us.py work/spec_full.txt outputs/spec_index.db

Output: SQLite database with divisions, items, requirements (page-anchored shall/must/submit/test sentences), refs (ASTM/ACI/NFPA citations), and FTS5 tables.

Handles both 6-digit MasterFormat (03 30 53) and legacy 5-digit CSI (03310).

2. Extract rules from the index

py scripts/rules_from_index.py outputs/spec_index.db rules.csv

Output: rules.csv with one row per rule, each carrying:

  • spec_clause = §section p.page back-reference to the index
  • source_text = the actual spec sentence
  • element_set, parameter, operator, expected, unit
  • status = checkable (scored) or reference_only (carried but not scored)

Item-level completeness rules are added automatically: if a Div 08 section body mentions fire rating anywhere, the tool adds "every door in the model shall have fire_rating populated" — cited to that section.

3. Extract the Revit model + discover parameter bindings

With the model open in Revit and Revit MCP connected:

py scripts/param_discovery.py param_inventory.json
py scripts/revit_extract.py > model.json

param_discovery.py scans the model's actual parameter names and fuzzy-matches each spec concept to whatever parameter really holds it — no hardcoded param names. Emits bindings.json with BOUND/REVIEW/UNBOUND status per concept, so the user can confirm the map before scoring.

revit_extract.py pulls doors, rooms, and walls with the resolution chain (instance param → type param → material structural asset → geometry material) for concrete strength.

4. Run the engine + build the report

py -c "from scripts.engine import run; import scripts.report as R; \
       rules, results = run('rules.csv', 'model.json'); \
       R.build(results, rules, 'compliance-report.xlsx', project='...', model='...')"

Output: compliance-report.xlsx with 5 sheets:

  • Summary — grade A–F, scorecard, per-division rollup
  • Failures — every FAIL with element ref, actual vs expected, spec cite
  • Missing Data — every MISSING with same cite
  • Passes — for completeness
  • Rules Applied — every rule loaded, checkable + reference_only

Grade: A ≥95%, B ≥85%, C ≥70%, D ≥50%, else F. Compliance % = PASS / (PASS+FAIL). MISSING is reported separately — an unpopulated field is not a false pass.


What this skill covers

Concept Element Operator Coverage
Fire rating doors min_minutes, exists Div 08
Fire rating walls exists Div 07
Concrete strength (fc_psi) walls min Div 03
U-value doors, walls max Div 07
R-value doors, walls min Div 07
Hardware assignment doors exists Div 08
Frame material doors exists Div 08
Mark, width, height doors exists Div 08
Floor / wall / ceiling / base finish rooms exists, in_list Div 09

Anything the auto-classifier can't confidently bind is carried as reference_only and shown on the Rules Applied sheet — nothing from the spec is silently dropped.


Proof points (measured, not claimed)

Blind test — 3H Housing Revit model × US federal VA hospital spec book, neither the tool nor the author had processed before:

Metric Value
VA specs indexed 338 pages → 956 page-anchored requirements in ~2 sec
Auto-extracted rules 8 checkable + 954 reference_only
Element-checks produced 559 (57 doors × 3 + 52 rooms × 4 + 180 walls × 2)
Findings 79 PASS · 0 FAIL · 480 MISSING
Every finding cites §08 14 00 p.187 (verifiable in the PDF in 5 sec)

Real defects surfaced on prior test runs:

  • 27 walls FAIL fc ≥ 4000 psi (they're 3500 psi cores) on Baytown Div 03 spec
  • 57 doors MISSING fire_rating (field exists in Revit but blank)
  • 156 rooms MISSING wall/ceiling/base finish (only Floor Finish populated)

Known limitations (be honest)

  • Auto-rule count is spec-dependent. Prose-heavy specs (like the VA one) produce fewer checkable rules than tabular schedules. The 8-rule VA result covers the structural bones; niche concepts (acoustic, flame spread, fire-stopping) currently fall through to reference_only. Adding them is ~5 min per concept — see scripts/rules_from_index.py for the pattern.
  • Concept vocabulary is fixed. The classifier only recognizes concepts in its dictionary. When a real client's spec surfaces a gap, add the concept there.
  • Concrete cover, rebar details, and mix design live in submittals, not the Revit model. The tool correctly reports these as reference_only — a spec compliance tool can't check what the model doesn't carry.
  • Revit MCP must be connected and the target model must be open. Windows Python launcher is py, not python/python3 (Store aliases are broken).

File layout

spec-model-compliance/
├── SKILL.md
├── README.md
├── scripts/
│   ├── build_index_us.py       # PDF → SQLite index
│   ├── rules_from_index.py     # SQLite → rules.csv (with page cites)
│   ├── param_discovery.py      # scan Revit params → binding map
│   ├── revit_extract.py        # pull doors/rooms/walls via Revit MCP
│   ├── engine.py               # deterministic PASS/FAIL/MISSING scorer
│   └── report.py               # 5-sheet color-coded Excel builder
└── examples/
    ├── inputs/                 # sample spec PDF + parameter inventory
    └── outputs/                # sample compliance-report.xlsx

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at c25af8d. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 months ago.

Steadyupdated 4 months ago

README badge

README badge for hamzaabduljabbar/autoconst-spec-compliance-claude