--- name: loin-to-ids description: Turn information requirements (an EIR, a BIM requirements table, a Level of Information Need per ISO 7817-1, or plain-language rules like "every wall needs a fire rating") into a machine-checkable buildingSMART IDS 1.0 file, via an editable CSV the information manager approves. Use when the user asks to write an IDS, formalise model requirements, "convertir requisitos de información en IDS", define LOIN/LOD per element, or prepare checks for a BIM model. --- # From information requirements to IDS ## Why Requirements written in PDFs are argued about; requirements in IDS are checked in seconds by any IDS-capable tool (IfcOpenShell/ifctester, Solibri, BIMcollab, usBIM, Revit add-ins…). The CSV in the middle keeps the human in control. ## Inputs - The source of requirements: EIR/OIR/AIR excerpt, BEP section, LOIN table, or the user's rules. - The IFC version the deliverables will use (IFC4 by default; IFC4X3_ADD2 for infrastructure; IFC2X3 only if the authoring tool forces it). - The project milestone/stage the requirements apply to. ## Procedure 1. Extract one row per requirement into `loin.csv` with columns: `spec, entity, predefined, facet, pset, name, datatype, value, cardinality, instructions` (see the script header). Rules: - Prefer standard property sets (Pset_WallCommon, Pset_DoorCommon, Pset_SpaceCommon…) and their standard property names. If the requirement needs a custom property, use a project pset with a prefix the team agrees on (e.g. `ACME_Cost`) and mark it in `instructions`. - Use IFC data types (IFCLABEL, IFCBOOLEAN, IFCLENGTHMEASURE, IFCAREAMEASURE, IFCREAL, IFCINTEGER). - Use `~regex` in `value` for patterns (e.g. `~(EI|REI)\s?(30|60|90|120)`), exact text otherwise, empty for "must exist". - Requirements that depend on geometry (clearances, areas computed from shape) cannot be expressed in IDS: list them separately as "manual or rule-based checks". 2. Show the CSV to the user as a table. **Get explicit approval** from the person responsible for information management before generating. 3. `pip install ifctester` then `python scripts/loin_to_ids.py loin.csv --out requirements.ids --title " - " --ifc IFC4` (add `--author name@company.com` if they want it in the header). 4. Test it on a sample model with the `ifc-ids-validation` skill. A specification with 0 applicable elements means the applicability is wrong; fix it before publishing. 5. Hand over `requirements.ids` + `loin.csv` + the list of non-IDS checks. ## Output - Approved CSV, the .ids file, a one-paragraph summary (specifications, requirements, IFC version), and the manual-checks list. ## Never - Never invent requirements the source does not state; ask, or list them as "suggested, pending approval". - Never use a property name from memory as if it were standard: if unsure it exists in the IFC version, check the buildingSMART documentation (ifc43-docs.standards.buildingsmart.org) or mark it as custom.