Skip to main content
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 a CityJSON to IFC Conversion and Schedule Dispatcher

Format
Code-aware
Lines
182
Sections
11
Linked challenge
Build a CityJSON to IFC Conversion and Schedule Dispatcher

Prompt source

Original prompt text with formatting preserved for inspection.

182 lines
11 sections
No variables
1 code block
## Build
Parse municipal CityJSON models to generate Industry Foundation Classes assets via ifccityjson and ifccsv utilities. Audit geometric conversions and export structured procurement quantity schedules for contractor coordination.

## User
Municipal BIM Coordinator

## Workflow
1. Ingest CityJSON 2.0 objects and validate mandatory transform and CityObjects structures.
2. Execute ifccityjson conversion routines to synthesize IFC building elements and spatial hierarchies.
3. Extract component quantities and dimensional schedules into tabular form using ifccsv conventions.
4. Flag untranslated geometries or invalid property attributes and present a reviewable conversion summary.

## Interface
Web dashboard showing CityJSON 3D previews, conversion progress logs, CSV quantity tables, and an interactive issue approval panel.

## Data
Download open CityJSON 2.0 sample models from the official CityJSON GitHub repository or generate synthetic CityJSON test files with bounding boxes.
Starter examples below are synthetic. They are not downloaded records.

## Source
[IfcOpenShell](https://raw.githubusercontent.com/IfcOpenShell/IfcOpenShell/v0.8.0/README.md)
Utilizes IfcOpenShell's ifccityjson utility to translate CityJSON models into IFC and ifccsv to extract property and schedule summaries.

## Tools
ray-serve, pydantic, fastapi.
Ray Serve provides scalable microservice deployment to execute heavy IfcOpenShell CLI conversion pipelines asynchronously without blocking user requests.
Local or hosted LLM capable of structured JSON analysis to interpret schema conversion anomalies and summarize takeoff schedules.

## 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
- Validates CityJSON transform objects and verifies all CityObjects contain recognized types before translation.
- Executes simulated ifccityjson conversion and creates standard IFC building entities for each input structure.
- Generates an ifccsv-compliant tabular quantity takeoff matching component count and bounding dimensions.
- Identifies missing parent references or unparseable LoD geometries as blocking coordination flags.

## Starter Examples
```json
[
  {
    "input": {
      "cityjson_document": {
        "type": "CityJSON",
        "version": "2.0",
        "transform": {
          "scale": [
            0.01,
            0.01,
            0.01
          ],
          "translate": [
            10000,
            20000,
            0
          ]
        },
        "CityObjects": {
          "BLD_001": {
            "type": "Building",
            "attributes": {
              "measuredHeight": 12.5,
              "roofType": "flat",
              "function": "Commercial"
            },
            "geographicalExtent": [
              10000,
              20000,
              0,
              10040,
              20030,
              12.5
            ]
          }
        },
        "vertices": [
          [
            0,
            0,
            0
          ],
          [
            4000,
            0,
            0
          ],
          [
            4000,
            3000,
            0
          ],
          [
            0,
            3000,
            0
          ]
        ]
      },
      "conversion_options": {
        "target_schema": "IFC4",
        "export_quantities_csv": true
      }
    },
    "expected_output": {
      "conversion_status": "COMPLETED",
      "ifc_model_summary": {
        "schema": "IFC4",
        "entity_count": 1,
        "mapped_entities": [
          {
            "source_id": "BLD_001",
            "ifc_type": "IfcBuilding",
            "spatial_dimensions": {
              "length_m": 40,
              "width_m": 30,
              "height_m": 12.5
            }
          }
        ]
      },
      "schedule_csv_rows": [
        {
          "Identifier": "BLD_001",
          "IfcType": "IfcBuilding",
          "Function": "Commercial",
          "FootprintArea_m2": 1200,
          "Volume_m3": 15000
        }
      ],
      "validation_flags": []
    }
  },
  {
    "input": {
      "cityjson_document": {
        "type": "CityJSON",
        "version": "2.0",
        "transform": {
          "scale": [
            1,
            1,
            1
          ],
          "translate": [
            0,
            0,
            0
          ]
        },
        "CityObjects": {
          "BLD_PART_09": {
            "type": "BuildingPart",
            "attributes": {
              "roofType": "gable"
            }
          }
        },
        "vertices": []
      },
      "conversion_options": {
        "target_schema": "IFC4",
        "export_quantities_csv": true
      }
    },
    "expected_output": {
      "conversion_status": "FAILED",
      "ifc_model_summary": {
        "schema": "IFC4",
        "entity_count": 0,
        "mapped_entities": []
      },
      "schedule_csv_rows": [],
      "validation_flags": [
        {
          "object_id": "BLD_PART_09",
          "severity": "ERROR",
          "issue": "Missing mandatory 'parents' member for 2nd-level City Object 'BuildingPart'."
        },
        {
          "object_id": "BLD_PART_09",
          "severity": "WARNING",
          "issue": "Missing geometry and geographicalExtent definitions."
        }
      ]
    }
  }
]
```

## Safety
Ensures models are only previewed and simulated; no real-world municipal zoning registrations or construction changes are dispatched automatically.
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.