Back to Prompt Library
implementation
Build the application
Inspect the original prompt language first, then copy or adapt it once you know how it fits your workflow.
Linked challenge: Build an IFC Spatial Topology Query Locator
Format
Code-aware
Lines
68
Sections
11
Linked challenge
Build an IFC Spatial Topology Query Locator
Prompt source
Original prompt text with formatting preserved for inspection.
68 lines
11 sections
No variables
1 code block
## Build
Extract exact containment hierarchies connecting localized equipment to parent site plots using the ifcquery utility. Traverse the spatial decomposition tree to map building components for facility management operations.
## User
Facility manager and BIM technician
## Workflow
1. Load IFC representations of commercial facilities via the ifcquery utility.
2. Traverse the spatial decomposition tree from IfcSite down to IfcSpace using a recursive function.
3. Identify disconnected equipment components lacking valid spatial containment relationships.
4. Output a flattened JSON topology map for facility management asset importing.
## Interface
Command-line interface with a tabular preview of spatial hierarchies and JSON export capabilities.
## Data
Utilize open buildingSMART sandbox IFC models or mock JSON hierarchy graphs representing spatial containment.
Starter examples below are synthetic. They are not downloaded records.
## Source
[IfcOpenShell](https://raw.githubusercontent.com/IfcOpenShell/IfcOpenShell/v0.8.0/README.md)
Utilizes the ifcquery CLI tool from the IfcOpenShell suite to inspect building model topologies.
## Tools
agno, ifcopenshell, pydantic.
Agno manages the workflow execution and maps graph traversal outputs into structured Pydantic data schemas.
General-purpose LLM for mapping complex spatial naming conventions to standard facility asset categories.
## Deliverables
Submit runnable source, pinned dependencies, setup commands, a working interface, example outputs, and a recorded end-to-end demo. Include tests and an action log.
## Acceptance
- Correctly traverses the containment tree to find the parent path of an asset.
- Accurately flags orphaned elements lacking spatial containment parents.
- Exports a strictly typed JSON topology dictionary representing the containment.
## Starter Examples
```json
[
{
"input": {
"query_target": "Pump-01",
"relationships": [
{
"parent": "Room-A",
"child": "Pump-01"
},
{
"parent": "Level-1",
"child": "Room-A"
}
]
},
"expected_output": {
"asset_id": "Pump-01",
"spatial_path": "Level-1/Room-A/Pump-01",
"is_orphaned": false,
"record_note": "simplified synthetic app record"
}
},
{
"input": {
"query_target": "Chiller-99",
"relationships": []
},
"expected_output": {
"asset_id": "Chiller-99",
"spatial_path": null,
"is_orphaned": true,
"record_note": "simplified synthetic app record"
}
}
]
```
## Safety
Performs read-only spatial inspections without altering original source IFC models.
Use mock external writes. Require human review before any real deployment.Adaptation plan
Keep the source stable, then change the prompt in a predictable order so the next run is easier to evaluate.
Keep stable
Hold the task contract and output shape stable so generated implementations remain comparable.
Tune next
Update libraries, interfaces, and environment assumptions to match the stack you actually run.
Verify after
Test failure handling, edge cases, and any code paths that depend on hidden context or secrets.