| name | ontology-as-code-intro |
| description | Use when introducing a team to Ontology-as-Code — explains the operational ontology concept, the 6-atom model (object/attribute/link/action/policy/event), how it differs from BI semantic layers, and the first steps to model one entity on LinkML. |
Ontology-as-Code — Introduction
Skill entry-point dạy một đội áp dụng Ontology-as-Code. Đọc ngắn, rồi áp dụng cho 1 entity thật.
Nguyên tắc
Đối xử với ontology (tầng ngữ nghĩa vận hành) như mã nguồn: plain text → Git → PR → CI.
Mô hình 6-atom
| Atom | Là gì | Native/Extension |
|---|
| ObjectType | thực thể nghiệp vụ | LinkML class (native) |
| AttributeType | thuộc tính | LinkML attributes (native) |
| LinkType | quan hệ | LinkML slot range→class (native) |
| ActionType | hành vi kinetic | annotations: x_actions + class (extension) |
| PolicyType | luật/ràng buộc | annotations: x_policy + class (extension) |
| EventType | sự kiện/state | annotations: x_events + class (extension) |
KHÔNG nhầm với
- BI semantic layer (SML/dbt) — model metric/dimension cho báo cáo. Khác tầng.
- Data schema thuần (LinkML gốc) — kit xây trên nó, thêm tầng kinetic.
3 bước đầu (áp dụng ngay)
- Chọn 1 entity → viết 1 ObjectType YAML (copy
templates/ontology/object-types/).
- Thêm 1 link + 1 action.
- Validate:
bash scripts/ontology-validate.sh <file>.
Ví dụ
Xem examples/nova-lending/ — ontology vận hành đầy đủ 6-atom,
validate + codegen chạy được.