SuperAPI AI Directory

ifc-agents-quality-checker

Testing & quality

View repository

Updated 10-15 22:18

About this skill

IFC Quality Checker (Orchestration)

Drive a complete, scored quality audit over an IFC file. This is an ORCHESTRATION skill : it audits seven information-completeness dimensions, scores each with a deterministic rubric, produces one quality report, and routes every gap to the skill that holds the detailed fix.

This skill answers one question : the file is valid, but is it any USE. A model can pass every buildingSMART validation stage and still be near-worthless downstream : walls with no properties, no materials, no classification, no quantities, sitting at the origin with no georeferencing. Validity is the floor, not the goal.

This skill does NOT itself teach the fixes. It is the auditor ; the syntax, impl, and errors skills are the remediation. It does NOT run the schema-conformance pipeline either : that is ifc-agents-file-validator.

Quick Reference

The three-tier model : validity, completeness, requirements

ALWAYS place every check in exactly one tier:

Tier Question Owner
1. Schema validity Does the file obey the IFC standard ifc-agents-file-validator
2. Information completeness Does the file carry the generic data any consumer needs THIS skill
3. Project requirements Does the file carry what a specific project demanded IDS (out of package scope)

This skill owns tier 2 ONLY. NEVER audit tier-1 schema rules here : route them to ifc-agents-file-validator. NEVER audit tier-3 project-specific demands here : those are expressed in IDS, which this package does not cover. Tier 2 is the GENERIC completeness every downstream use (facility management, quantity take-off, energy and structural analysis, cost) needs regardless of project.

Validity gate : audit quality only on a valid file

ALWAYS confirm tier 1 first. Run ifc-agents-file-validator and require zero stage 1, 2, or 3 errors before this audit. A quality score on an invalid file is meaningless : a malformed file cannot be measured for coverage. If validation reports errors, STOP and route to ifc-agents-file-validator.

The seven completeness dimensions

# Dimension Weight What it measures Route for gaps
1 Spatial containment 20 every physical element placed in the spatial tree ifc-errors-spatial-structure, ifc-impl-spatial-decomposition
2 Property sets 20 elements carry the relevant Pset_ properties ifc-errors-property-set-mistakes, ifc-impl-data-enrichment
3 Geometry representation 15 every element has a usable shape representation ifc-errors-geometry-issues, ifc-syntax-geometry-representations
4 Materials 15 elements carry material associations ifc-syntax-materials, ifc-impl-data-enrichment
5 Classifications 10 elements carry classification references ifc-syntax-classifications, ifc-impl-data-enrichment
6 Quantities 10 elements carry measured quantities for take-off ifc-syntax-quantities, ifc-impl-property-extraction
7 Georeferencing 10 the model is locatable in a real-world CRS ifc-syntax-georeferencing

Weights sum to 100. They are FIXED : ALWAYS use these exact weights so two audits of the same file produce the same score.

Scoring rubric (deterministic)

For each dimension, compute coverage = elements satisfying the check / elements in scope, as a percentage. Then:

  • coverage = 100% : status COMPLETE.
  • 1% <= coverage <= 99% : status PARTIAL.
  • coverage = 0% : status ABSENT.

dimension score = weight * coverage. overall score = sum of dimension scores, 0 to 100. Grade bands, applied ALWAYS:

Overall score Grade
90 to 100 A
75 to 89 B
50 to 74 C
25 to 49 D
0 to 24 F

A dimension that is genuinely out of scope (for example precise georeferencing on a coordination-only model) is marked not applicable : drop it and renormalise the remaining weights to sum to 100. NEVER score a not-applicable dimension as 0.

Decision Trees

Is this a quality gap, a validity error, or a project requirement

The finding under review ...
├─ breaks an EXPRESS rule, a normative Gherkin rule, or the STEP syntax
│   -> tier 1, schema validity. Route to ifc-agents-file-validator.
├─ is generic data any consumer needs, missing or thin (no Pset, no material,
│   no class, no quantity, no georeferencing, an orphan element)
│   -> tier 2. This skill. Score it under the matching dimension.
└─ is a project-, client-, or nation-specific demand (a named Pset required by
    this contract, a specific LOD)
    -> tier 3. IDS territory. Out of this package's scope. Do NOT score it.

Which dimension does a symptom map to

Downstream symptom ...
├─ "element missing from the model tree / facility-management export"
│   -> Dimension 1, spatial containment.
├─ "schedules and parameter views are empty"
│   -> Dimension 2, property sets.
├─ "element has no shape / nothing draws in the viewer"
│   -> Dimension 3, geometry representation.
├─ "material take-off / material schedule is empty"
│   -> Dimension 4, materials.
├─ "cannot filter or cost by classification code"
│   -> Dimension 5, classifications.
├─ "quantity take-off returns nothing"
│   -> Dimension 6, quantities.
└─ "model sits at the origin, will not align with survey or GIS"
    -> Dimension 7, georeferencing.

Georeferencing depth by version

What schema is the file ?
├─ IFC2x3
│   -> precise CRS georeferencing entities do not exist. Check IfcSite
│      RefLatitude, RefLongitude, RefElevation only. Present = COMPLETE for
│      this version ; absent = ABSENT.
└─ IFC4 or IFC4.3
    -> check IfcMapConversion plus IfcProjectedCRS (precise). Present = COMPLETE.
       Only IfcSite RefLatitude/RefLongitude present = PARTIAL (coarse only).
       Neither = ABSENT.

Patterns

Pattern 1 : run the quality audit in order

ALWAYS run the audit as an ordered pass:

1. Validity gate : run ifc-agents-file-validator. Require zero tier-1 errors.
   If errors exist, STOP and route there. Do not score.
2. Determine the file schema (IFC2x3, IFC4, IFC4.3) and the declared MVD.
   Schema decides which entities the audit checks (Pattern 5, version notes).
3. Build the element scope : the set of physical element occurrences. In
   IFC2x3 and IFC4 these are IfcBuildingElement subtypes ; in IFC4.3 they are
   IfcBuiltElement subtypes (the entity was renamed and made non-abstract).
4. Audit dimensions 1 to 7 (Patterns 2 to 5), each producing a coverage %.
5. Score and grade (Pattern 6). Emit one report.

NEVER score before the validity gate passes.

Pattern 2 : audit spatial containment (dimension 1)

For every physical element occurrence, check it is contained in exactly one spatial level through IfcRelContainedInSpatialStructure, and that the spatial tree is complete from IfcProject down.

  • coverage = contained elements / total physical elements.
  • An element with zero containment links is an orphan : it does not count as covered.
  • ALSO confirm the tree itself : an IfcProject, at least one IfcSite, and an unbroken IfcRelAggregates chain. A broken tree caps this dimension at PARTIAL regardless of element coverage.

Route gaps to ifc-errors-spatial-structure and ifc-impl-spatial-decomposition.

Pattern 3 : audit property sets and quantities (dimensions 2 and 6)

Properties and quantities share the same attachment machinery : both are IfcPropertySetDefinition subtypes attached through IfcRelDefinesByProperties (on occurrences) or the type object's HasPropertySets (on types). Audit them as two dimensions.

Dimension 2, property sets:

  • For each element, check it carries the standardised common property set for its class : an IfcPropertySet named Pset_<Class>Common (for example Pset_WallCommon on IfcWall), resolving type-level and occurrence-level property sets and letting the occurrence win on a name collision.
  • coverage = elements with their Pset_*Common / total elements.
  • A custom property set whose Name uses the reserved Pset_ prefix is a defect : flag it and route to ifc-errors-property-set-mistakes. It does NOT count as coverage.

Dimension 6, quantities:

  • For each element, check it carries an IfcElementQuantity with the relevant measured quantities. IFC4 and IFC4.3 standardise the Qto_ prefix (for example Qto_WallBaseQuantities) ; IFC2x3 used a BaseQuantities-style convention, so for IFC2x3 check for the presence of an IfcElementQuantity, NEVER for a Qto_ name.
  • coverage = elements with measured quantities / total elements.

Route property gaps to ifc-errors-property-set-mistakes and ifc-impl-data-enrichment ; quantity gaps to ifc-syntax-quantities and ifc-impl-property-extraction.

Pattern 4 : audit materials and classifications (dimensions 4 and 5)

Dimension 4, materials:

  • For each element, check a material association exists : an IfcRelAssociatesMaterial whose RelatedObjects includes the element (or its type) and whose RelatingMaterial is an IfcMaterial, IfcMaterialLayerSet, IfcMaterialProfileSet, IfcMaterialConstituentSet, or a usage of one.
  • coverage = elements with a material association / total elements.

Dimension 5, classifications:

  • For each element, check an IfcRelAssociatesClassification exists whose RelatingClassification is an IfcClassificationReference (a code such as a Uniclass or OmniClass notation) or an IfcClassification.
  • coverage = classified elements / total elements.

Route material gaps to ifc-syntax-materials and ifc-impl-data-enrichment ; classification gaps to ifc-syntax-classifications and ifc-impl-data-enrichment.

Pattern 5 : audit geometry and georeferencing (dimensions 3 and 7)

Dimension 3, geometry representation:

  • For each element, check it has an IfcProductDefinitionShape with at least one usable IfcShapeRepresentation (typically a Body representation) bound to a valid representation context.
  • coverage = elements with a usable representation / total elements.
  • A degenerate or context-less representation does NOT count : route it to ifc-errors-geometry-issues.

Dimension 7, georeferencing : audit by version per the decision tree.

  • IFC4, IFC4.3 : COMPLETE when IfcMapConversion plus IfcProjectedCRS are present. PARTIAL when only IfcSite RefLatitude and RefLongitude are set. ABSENT when neither.
  • IFC2x3 : precise CRS entities do not exist. COMPLETE when IfcSite RefLatitude, RefLongitude, RefElevation are set ; ABSENT otherwise.

Georeferencing is a single model-level dimension, not a per-element coverage : score it directly as COMPLETE (100%), PARTIAL (50%), or ABSENT (0%). Route gaps to ifc-syntax-georeferencing.

Pattern 6 : produce the scored quality report

Emit one report with a fixed structure. ALWAYS show every dimension, its weight, coverage, status, and weighted score, then the overall score and grade.

IFC Model Quality Report
  File schema : <IFC2x3 | IFC4 | IFC4.3>      Declared MVD : <name>
  Validity gate : PASSED (ifc-agents-file-validator, 0 errors)

  Dimension              Weight  Coverage  Status     Score
  1 Spatial containment    20      __%     <status>   __._
  2 Property sets          20      __%     <status>   __._
  3 Geometry representation 15     __%     <status>   __._
  4 Materials              15      __%     <status>   __._
  5 Classifications        10      __%     <status>   __._
  6 Quantities             10      __%     <status>   __._
  7 Georeferencing         10      __%     <status>   __._

  Overall score : __ / 100        Grade : <A|B|C|D|F>

  Gaps and routes :
    <dimension> : <finding> -> <skill to fix it>

ALWAYS state the grade with the score. ALWAYS list, per gap, the owning skill so the reader can act. NEVER present a grade without the per-dimension breakdown : an opaque score hides which data is missing.

Reference Links

  • references/methods.md : the seven dimensions in full, the check entities per dimension, the scoring formula, version notes, the anti-pattern-to-dimension map.
  • references/examples.md : worked audits and complete sample reports.
  • references/anti-patterns.md : auditing mistakes and why each one is wrong.

Related skills

  • ifc-agents-file-validator : the tier-1 schema-conformance pipeline. ALWAYS run first.
  • ifc-core-validation : the conceptual validation model.
  • ifc-impl-data-enrichment : how to ADD the missing properties, materials, and classifications this audit reports.
  • ifc-errors-spatial-structure, ifc-errors-property-set-mistakes, ifc-errors-geometry-issues : the detailed fixes for each gap class.
  • ifc-syntax-property-sets, ifc-syntax-quantities, ifc-syntax-materials, ifc-syntax-classifications, ifc-syntax-georeferencing : the authoring syntax for each dimension.

Verified sources

The check entities (IfcRelContainedInSpatialStructure, IfcPropertySet, IfcRelDefinesByProperties, IfcElementQuantity, IfcRelAssociatesMaterial, IfcRelAssociatesClassification, IfcClassificationReference, IfcMapConversion, IfcProjectedCRS, IfcSite), the Pset_ and Qto_ conventions, and the version differences are verified 2026-05-20 against the buildingSMART IFC4.3, IFC4 ADD2 TC1, and IFC2x3 specifications recorded in SOURCES.md. The validity-pipeline boundary is sourced from the buildingSMART validation service documentation.