Bonsai Agents Ifc Validator logo

Bonsai Agents Ifc Validator

Organization
Impertio-Studio
bonsai-agents-ifc-validator

Use when validating, auditing, or verifying IFC model quality in Bonsai projects. Provides systematic checks for spatial hierarchy completeness, property set compliance, geometry validity, classification correctness, and IDS (Information Delivery Specification) conformance using ifctester. Prevents shipping models with missing spatial containment or incomplete property sets. Keywords: IFC validation, audit, quality check, spatial hierarchy, property set, IDS, ifctester, model quality, Bonsai validation, compliance, check my IFC file, is my model correct, find errors.

Overview

PublisherImpertio-Studio
RepositoryBlender-Bonsai-ifcOpenshell-Sverchok-Claude-Skill-Package
Skill namebonsai-agents-ifc-validator
Stars
44
Forks
5
Bundled files
3
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 3 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by Impertio-Studio on GitHub. Read the source before you install it.

Installation

Install the Bonsai Agents Ifc Validator AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/Impertio-Studio/Blender-Bonsai-ifcOpenshell-Sverchok-Claude-Skill-Package/tree/main/skills/bonsai/agents/bonsai-agents-ifc-validator
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Impertio-Studio/Blender-Bonsai-ifcOpenshell-Sverchok-Claude-Skill-Package.git /tmp/Blender-Bonsai-ifcOpenshell-Sverchok-Claude-Skill-Package
mkdir -p .claude/skills
cp -r /tmp/Blender-Bonsai-ifcOpenshell-Sverchok-Claude-Skill-Package/skills/bonsai/agents/bonsai-agents-ifc-validator .claude/skills/bonsai-agents-ifc-validator
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Bonsai Agents Ifc Validator in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Bonsai Agents Ifc Validator on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Bonsai Agents Ifc Validator is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Bonsai IFC Validator Agent

Version: Bonsai v0.8.x | IfcOpenShell v0.8+ | Blender 4.2.0+ | Python 3.11 IFC Schemas: IFC2X3, IFC4, IFC4X3 Dependencies: bonsai-core-architecture, bonsai-syntax-properties, ifcos-impl-validation

Quick Reference: When to Activate

Activate this validator when the user:

  • Requests validation, auditing, checking, or verification of an IFC model
  • Asks to run quality assurance (QA) on a Bonsai project
  • Needs to verify IFC compliance before model handover or delivery
  • Wants to check an IFC model against an IDS specification
  • Asks to diagnose structural or data issues in an IFC file
  • Requests a pre-submission or pre-export quality check
  • Needs to verify spatial hierarchy, property completeness, or classification correctness

Critical Warnings

  1. ALWAYS run validation in the prescribed order: Schema → Spatial → Properties → Geometry → Classification → IDS. Schema failures invalidate all subsequent checks.
  2. ALWAYS check model.schema before applying version-specific validation logic. IFC2X3, IFC4, and IFC4X3 have different entity sets and rules.
  3. NEVER assume a model is valid because ifcopenshell.validate.validate() completes without exception. Validation issues are logged, NOT raised. Use json_logger or LogDetectionHandler to detect issues.
  4. ALWAYS use ifcopenshell.util.element.get_psets() for property reading. NEVER traverse IsDefinedBy relationships manually.
  5. ALWAYS use ifctester for IDS validation. ifcopenshell.validate checks schema compliance only — it does NOT check project-specific requirements.
  6. NEVER confuse schema validation with IDS validation. Schema validation verifies IFC file structure per EXPRESS schema. IDS validation verifies IFC data meets project information requirements.
  7. ALWAYS access the IFC model via tool.Ifc.get() inside Bonsai or IfcStore.get_file(). NEVER access IfcStore.file directly.
  8. ALWAYS guard against None return from IfcStore.get_file() before running any validation.

Validation Process: Execution Order

Execute these phases sequentially. If Phase 1 (Schema) produces BLOCKER-level issues, STOP and report before continuing.

Phase 1: Schema Validation

Validates IFC file structure against the EXPRESS schema definition.

python
import ifcopenshell
import ifcopenshell.validate

model = ifcopenshell.open("project.ifc")  # or tool.Ifc.get() inside Bonsai

# Step 1: Basic schema validation
json_log = ifcopenshell.validate.json_logger()
ifcopenshell.validate.validate(model, json_log)

schema_errors = [s for s in json_log.statements if s["level"] == "ERROR"]
schema_warnings = [s for s in json_log.statements if s["level"] == "WARNING"]

# Step 2: If basic passes, run EXPRESS WHERE rules (10-100x slower)
if not schema_errors:
    json_log_express = ifcopenshell.validate.json_logger()
    ifcopenshell.validate.validate(model, json_log_express, express_rules=True)

Severity mapping:

ConditionSeverity
Any ERROR in json_log.statementsBLOCKER
Any WARNING in json_log.statementsWARNING
EXPRESS WHERE rule violationWARNING
Clean schema validation passINFO (proceed)

Phase 2: Spatial Hierarchy Validation

Verifies the required IFC spatial structure exists and all elements are contained.

python
import ifcopenshell
import ifcopenshell.util.element

def validate_spatial_hierarchy(model):
    errors = []
    schema = model.schema

    # 2a: Verify IfcProject exists (exactly one)
    projects = model.by_type("IfcProject")
    if len(projects) != 1:
        errors.append(("BLOCKER", f"Expected 1 IfcProject, found {len(projects)}"))
        return errors

    # 2b: Verify IfcSite exists
    sites = model.by_type("IfcSite")
    if len(sites) == 0:
        errors.append(("BLOCKER", "No IfcSite found"))

    # 2c: Verify IfcBuilding exists
    buildings = model.by_type("IfcBuilding")
    if len(buildings) == 0:
        errors.append(("BLOCKER", "No IfcBuilding found"))

    # 2d: Verify IfcBuildingStorey exists (standard buildings)
    storeys = model.by_type("IfcBuildingStorey")
    if len(storeys) == 0 and len(buildings) > 0:
        errors.append(("WARNING", "No IfcBuildingStorey found"))

    # 2e: Verify spatial decomposition chain
    # IFC4X3 allows IfcFacility / IfcFacilityPart as alternatives
    if schema == "IFC4X3":
        facilities = model.by_type("IfcFacility")
        if len(buildings) == 0 and len(facilities) == 0:
            errors.append(("BLOCKER", "No IfcBuilding or IfcFacility found"))

    # 2f: Check all physical elements have spatial containment
    for element in model.by_type("IfcElement"):
        container = ifcopenshell.util.element.get_container(element)
        if container is None:
            errors.append((
                "WARNING",
                f"#{element.id()} {element.is_a()} '{element.Name}': "
                f"Not contained in any spatial element"
            ))

    return errors

Severity mapping:

ConditionSeverity
Missing IfcProject or count != 1BLOCKER
Missing IfcSiteBLOCKER
Missing IfcBuilding (IFC2X3/IFC4)BLOCKER
Missing IfcBuilding AND IfcFacility (IFC4X3)BLOCKER
Missing IfcBuildingStoreyWARNING
IfcElement without spatial containmentWARNING
Spatial hierarchy completeINFO

Phase 3: Property Set Compliance

Validates property sets exist and contain required properties.

python
import ifcopenshell.util.element

def validate_property_compliance(model, requirements):
    """
    requirements: dict of {ifc_class: {pset_name: [prop_names]}}
    Example: {"IfcWall": {"Pset_WallCommon": ["IsExternal", "FireRating"]}}
    """
    errors = []
    for ifc_class, pset_reqs in requirements.items():
        elements = model.by_type(ifc_class)
        for element in elements:
            psets = ifcopenshell.util.element.get_psets(element)
            for pset_name, required_props in pset_reqs.items():
                if pset_name not in psets:
                    errors.append((
                        "WARNING",
                        f"#{element.id()} {element.is_a()} '{element.Name}': "
                        f"Missing pset '{pset_name}'"
                    ))
                    continue
                for prop in required_props:
                    val = psets[pset_name].get(prop)
                    if val is None:
                        errors.append((
                            "WARNING",
                            f"#{element.id()} {element.Name}: "
                            f"Missing {pset_name}.{prop}"
                        ))
    return errors

Standard property requirements by element type:

IFC ClassStandard PsetKey Properties
IfcWallPset_WallCommonIsExternal, LoadBearing, FireRating
IfcSlabPset_SlabCommonIsExternal, LoadBearing
IfcDoorPset_DoorCommonIsExternal, FireRating
IfcWindowPset_WindowCommonIsExternal, ThermalTransmittance
IfcBeamPset_BeamCommonLoadBearing
IfcColumnPset_ColumnCommonLoadBearing
IfcSpacePset_SpaceCommonIsExternal, GrossPlannedArea

Severity mapping:

ConditionSeverity
Standard pset completely missing on elementWARNING
Required property missing from existing psetWARNING
Property value is empty/nullINFO
All required properties presentINFO

Phase 4: Geometry Validation

Checks geometry representations exist and are valid.

python
def validate_geometry(model):
    errors = []

    for element in model.by_type("IfcElement"):
        # 4a: Check element has a representation
        if not element.Representation:
            errors.append((
                "WARNING",
                f"#{element.id()} {element.is_a()} '{element.Name}': "
                f"No geometry representation"
            ))
            continue

        # 4b: Check representation has items
        for rep in element.Representation.Representations:
            if not rep.Items or len(rep.Items) == 0:
                errors.append((
                    "WARNING",
                    f"#{element.id()} {element.Name}: "
                    f"Empty representation '{rep.RepresentationIdentifier}'"
                ))

    # 4c: Check for placement consistency
    for element in model.by_type("IfcElement"):
        if element.ObjectPlacement is None:
            errors.append((
                "INFO",
                f"#{element.id()} {element.is_a()} '{element.Name}': "
                f"No IfcLocalPlacement"
            ))

    return errors

Severity mapping:

ConditionSeverity
IfcElement with no Representation at allWARNING
Empty representation (no Items)WARNING
Missing IfcLocalPlacementINFO
Valid geometry presentINFO

Phase 5: Classification Validation

Verifies classification references (Uniclass, OmniClass, NL-SfB, etc.) are present and correctly structured.

python
import ifcopenshell.util.classification

def validate_classifications(model, required_system=None):
    errors = []

    # 5a: Check classification systems exist
    systems = model.by_type("IfcClassification")
    if len(systems) == 0:
        errors.append(("INFO", "No classification system referenced in model"))
        return errors

    if required_system:
        system_names = [s.Name for s in systems]
        if required_system not in system_names:
            errors.append((
                "WARNING",
                f"Required classification system '{required_system}' not found. "
                f"Available: {system_names}"
            ))

    # 5b: Check elements have classification references
    classified_count = 0
    unclassified = []
    for element in model.by_type("IfcElement"):
        refs = ifcopenshell.util.classification.get_references(element)
        if refs:
            classified_count += 1
        else:
            unclassified.append(element)

    total = len(model.by_type("IfcElement"))
    if unclassified:
        errors.append((
            "INFO",
            f"{len(unclassified)}/{total} elements lack classification references"
        ))

    # 5c: Validate classification reference format
    for ref in model.by_type("IfcClassificationReference"):
        if not ref.Identification and not ref.ItemReference:
            errors.append((
                "WARNING",
                f"#{ref.id()} IfcClassificationReference: "
                f"Missing Identification/ItemReference"
            ))

    return errors

Severity mapping:

ConditionSeverity
No classification system in modelINFO
Required classification system missingWARNING
Element lacks classification referenceINFO
IfcClassificationReference with empty IDWARNING

Phase 6: IDS Validation (Information Delivery Specification)

Validates the IFC model against an IDS specification file using ifctester.

python
import ifctester
import ifctester.ids
import ifctester.reporter

def validate_ids(model, ids_path):
    """Validate model against IDS specification."""
    errors = []

    # 6a: Load IDS specification
    ids = ifctester.open(ids_path)

    # 6b: Run validation
    ids.validate(model)

    # 6c: Collect results per specification
    for spec in ids.specifications:
        total = spec.total_applicable
        passed = spec.total_pass
        failed = spec.total_fail

        if failed > 0:
            severity = "BLOCKER" if spec.minOccurs > 0 else "WARNING"
            errors.append((
                severity,
                f"IDS '{spec.name}': {failed}/{total} elements failed"
            ))

    # 6d: Generate report
    reporter = ifctester.reporter.Json(ids)
    reporter.report()
    report_data = reporter.to_string()

    return errors, report_data

Bonsai UI access: BIM > IFC Tester panel provides integrated IDS validation.

Severity mapping:

ConditionSeverity
Required IDS specification failedBLOCKER
Optional IDS specification failedWARNING
All IDS specifications passedINFO
No IDS specification providedINFO (skip phase)

Decision Tree: Validation Severity Classification

Issue found during validation
|
+--> Does it violate IFC schema rules?
|    +--> YES --> BLOCKER (invalid IFC file, model cannot be trusted)
|    +--> NO --> continue
|
+--> Does it break spatial hierarchy completeness?
|    +--> Missing IfcProject/IfcSite/IfcBuilding? --> BLOCKER
|    +--> Missing IfcBuildingStorey? --> WARNING
|    +--> Element not spatially contained? --> WARNING
|    +--> NO --> continue
|
+--> Does it fail a required IDS specification?
|    +--> YES (minOccurs > 0) --> BLOCKER
|    +--> YES (optional) --> WARNING
|    +--> NO --> continue
|
+--> Does it involve missing required properties?
|    +--> Missing standard pset entirely? --> WARNING
|    +--> Missing individual property? --> WARNING
|    +--> Empty property value? --> INFO
|    +--> NO --> continue
|
+--> Does it involve geometry issues?
|    +--> No representation at all? --> WARNING
|    +--> Empty representation? --> WARNING
|    +--> Missing placement? --> INFO
|    +--> NO --> continue
|
+--> Does it involve classification?
     +--> Required system missing? --> WARNING
     +--> Element unclassified? --> INFO
     +--> Malformed reference? --> WARNING

Severity Definitions:

SeverityMeaningAction
BLOCKERModel is invalid or non-compliant. Delivery MUST NOT proceed.Fix immediately. Re-validate after fix.
WARNINGData quality issue. Model is technically valid but incomplete.Fix before delivery if requirements demand it.
INFOObservation. No action required unless project rules specify otherwise.Document for awareness.

IDS Integration: ifctester Usage Patterns

Core Workflow

python
import ifctester
import ifctester.ids
import ifctester.reporter
import ifcopenshell

# Load IDS and IFC
ids = ifctester.open("specification.ids")
model = ifcopenshell.open("project.ifc")

# Validate and report
ids.validate(model)
ifctester.reporter.Console(ids).report()

Report Formats

FormatReporter ClassUse Case
Consoleifctester.reporter.Console(ids)Quick interactive checks
JSONifctester.reporter.Json(ids)CI/CD pipelines
HTMLifctester.reporter.Html(ids)Stakeholder reports
BCFifctester.reporter.Bcf(ids)BIM coordination
ODSifctester.reporter.Ods(ids)Spreadsheet review

IDS Facet Types

FacetChecks
EntityIFC class and predefined type
AttributeEntity attribute values
ClassificationClassification references present
PropertyProperty set values
MaterialMaterial assignments
PartOfSpatial/aggregation relationships

Model Access

ContextAccess Method
Inside Bonsaimodel = tool.Ifc.get() — ALWAYS check for None
Inside Bonsai (legacy)model = IfcStore.get_file()
Standalone/headlessmodel = ifcopenshell.open("project.ifc")
Bonsai UI IDSBIM > IFC Tester panel

Version-Specific Validation Notes

AspectIFC2X3IFC4IFC4X3
Spatial rootIfcProject → IfcSite → IfcBuildingSame as IFC2X3IfcProject → IfcSite → IfcBuilding OR IfcFacility
GeoreferencingProperty sets on IfcProjectIfcMapConversion + IfcProjectedCRS entitiesSame as IFC4 + IfcMapConversionScaled
ClassificationIfcClassificationReference.ItemReferenceIfcClassificationReference.IdentificationSame as IFC4
Property templatesLimitedFull IfcPropertySetTemplate supportFull support
IDS supportYes (via ifctester)Yes (via ifctester)Yes (via ifctester)

References

Dependencies

  • bonsai-core-architecture — IfcStore access, tool.Ifc, three-layer architecture
  • bonsai-syntax-properties — Property set reading and validation patterns
  • ifcos-impl-validation — ifcopenshell.validate, ifctester, georeference validation

Sources

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Bonsai Agents Ifc Validator AI skill do?

Use when validating, auditing, or verifying IFC model quality in Bonsai projects. Provides systematic checks for spatial hierarchy completeness, property set compliance, geometry validity, classification correctness, and IDS (Information Delivery Specification) conformance using ifctester. Prevents shipping models with missing spatial containment or incomplete property sets. Keywords: IFC validation, audit, quality check, spatial hierarchy, property set, IDS, ifctester, model quality, Bonsai validation, compliance, check my IFC file, is my model correct, find errors.

Why use Bonsai Agents Ifc Validator on TypingMind?

Because you install it once and use it with any model. Bonsai Agents Ifc Validator is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Bonsai Agents Ifc Validator in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/Impertio-Studio/Blender-Bonsai-ifcOpenshell-Sverchok-Claude-Skill-Package/tree/main/skills/bonsai/agents/bonsai-agents-ifc-validator. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Bonsai Agents Ifc Validator?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Bonsai Agents Ifc Validator?

As many as you like. As long as a model supports skills, you can use Bonsai Agents Ifc Validator with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Bonsai Agents Ifc Validator AI skill free?

Yes. It is published on GitHub by Impertio-Studio under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇