Skip to content

Commit 5692ce8

Browse files
committed
feat: update coding rules for message classes and component lifecycle management
1 parent 6024955 commit 5692ce8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

AGENTS.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ Before changing code or examples, read:
4646
- Do not put component startup logic in `__init__()`. IoP/IRIS allocates
4747
components with `__new__()` and calls `on_init()` as the startup hook.
4848
- Use `on_tear_down()` for cleanup when a component becomes inactive.
49-
- Use regular `Message` or `PydanticMessage` classes for Python messages.
49+
- Use `@dataclass` on regular `Message` classes. Do not decorate
50+
`PydanticMessage` classes with `@dataclass`.
5051
- Use `PersistentMessage` only when a native persistent IRIS message body is
5152
required.
5253
- Avoid raw `CLASSES` entries for new production components. Use `CLASSES` only

0 commit comments

Comments
 (0)