Skip to content

Correct task-product input/output semantics in ifcos-impl-sequence - #1

Open
PahlawanJoey wants to merge 1 commit into
Impertio-Studio:mainfrom
PahlawanJoey:phase-fix-sequence-product-direction
Open

Correct task-product input/output semantics in ifcos-impl-sequence#1
PahlawanJoey wants to merge 1 commit into
Impertio-Studio:mainfrom
PahlawanJoey:phase-fix-sequence-product-direction

Conversation

@PahlawanJoey

@PahlawanJoey PahlawanJoey commented Aug 2, 2026

Copy link
Copy Markdown

repro_ap10.py

Summary

This PR corrects the task-to-product relationship documented by the ifcos-impl-sequence skill.

The current AP-10 guidance reverses IFC input/output semantics:

  • A product constructed or installed by a task is a task output and should be linked using sequence.assign_product.

  • A product used, consumed, demolished, maintained, or otherwise operated on by a task is a task input and should be linked using sequence.assign_process.

The affected guidance has been made consistent across the skill, examples, anti-patterns, and method reference.

Problem

AP-10 currently presents sequence.assign_process as the standard way to link a construction task to the product it creates, while marking sequence.assign_product as incorrect.

This contradicts:

  • the decision tree elsewhere in the same skill;

  • the existing assign_product method reference;

  • the official IfcOpenShell API documentation;

  • the behaviour of ifcopenshell.util.sequence.

It also incorrectly describes assign_product as meaning that a product “controls” a task. IFC controls use IfcRelAssignsToControl, which is a different relationship.

Correct IFC semantics

Purpose | IfcOpenShell API | IFC relationship | Standard query -- | -- | -- | -- Product built or installed by a task | sequence.assign_product(relating_product=product, related_object=task) | IfcRelAssignsToProduct | get_task_outputs(task) Product used or operated on by a task | sequence.assign_process(relating_process=task, related_object=product) | IfcRelAssignsToProcess / IfcTask.OperatesOn | get_task_inputs(task) Control assigned to a task | Control assignment API | IfcRelAssignsToControl | Separate control relationship

A minimal verification is:

sequence.assign_product(
    model,
    relating_product=constructed_wall,
    related_object=construction_task,
)

assert constructed_wall in ifcopenshell.util.sequence.get_task_outputs(
construction_task
)

sequence.assign_process(
model,
relating_process=demolition_task,
related_object=existing_wall,
)

assert existing_wall in ifcopenshell.util.sequence.get_task_inputs(
demolition_task
)

Following the previous AP-10 recommendation causes a newly constructed wall to appear as an input in OperatesOn, while get_task_outputs(task) remains empty.

Additional API correction

The general v0.8+ warning about passing products as a list incorrectly used assign_process as an example.

In IfcOpenShell 0.8.5:

  • sequence.assign_process accepts one related_object;

  • sequence.assign_product accepts one related_object.

The updated text names APIs that actually use list arguments and avoids applying that rule to APIs with singular parameters.

Files updated

  • skills/ifcopenshell/impl/ifcos-impl-sequence/SKILL.md

  • skills/ifcopenshell/impl/ifcos-impl-sequence/references/anti-patterns.md

  • skills/ifcopenshell/impl/ifcos-impl-sequence/references/examples.md

  • skills/ifcopenshell/impl/ifcos-impl-sequence/references/methods.md

References

This is a documentation-only correction; no runtime code is changed.

@PahlawanJoey PahlawanJoey changed the title task-product assignmen Correct task-product input/output semantics in ifcos-impl-sequence Aug 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant