How this skill was created / entered the system. Version DAG model — every change creates a new SkillRecord node:: Lineage rules: IMPORTED / CAPTURED → root node, no parent (parent_skill_ids = []) DERIVED → 1+ parents, new skill name, new directory FIXED
| 34 | |
| 35 | |
| 36 | class SkillOrigin(str, Enum): |
| 37 | """How this skill was created / entered the system. |
| 38 | |
| 39 | Version DAG model — every change creates a new SkillRecord node:: |
| 40 | |
| 41 | Lineage rules: |
| 42 | IMPORTED / CAPTURED → root node, no parent (parent_skill_ids = []) |
| 43 | DERIVED → 1+ parents, new skill name, new directory |
| 44 | FIXED → exactly 1 parent (previous version of same skill), |
| 45 | same ``name`` & ``path``, new ``skill_id``. |
| 46 | Files on disk are updated in-place; old directory |
| 47 | content (all files) is preserved via |
| 48 | ``content_snapshot`` dict in the DB. |
| 49 | Only the latest version is ``is_active=True``. |
| 50 | """ |
| 51 | |
| 52 | IMPORTED = "imported" # Initial import, no parent |
| 53 | CAPTURED = "captured" # Captured from a successful execution with no parent skill involved |
| 54 | DERIVED = "derived" # Derived from existing skill(s) (upgrade, wrap, compose, etc.) |
| 55 | FIXED = "fixed" # Fix of existing skill — new record, parent = previous version |
| 56 | |
| 57 | |
| 58 | _EVOLUTION_TO_ORIGIN: Dict["EvolutionType", "SkillOrigin"] = { |
no outgoing calls
no test coverage detected