(skill: ProvenanceLike | undefined | null)
| 29 | * protected, so an unknown/legacy skill is never clobbered. |
| 30 | */ |
| 31 | export function isProtected(skill: ProvenanceLike | undefined | null): boolean { |
| 32 | if (!skill) return false; // nothing there to protect |
| 33 | if (skill.humanEdited) return true; // a human touched a captured skill → now protected |
| 34 | return (skill.provenance ?? 'user') !== 'machine'; |
| 35 | } |
| 36 | |
| 37 | /** A pristine, machine-captured skill the loop is free to replace/curate. */ |
| 38 | export function isMachineOwned(skill: ProvenanceLike | undefined | null): boolean { |
no outgoing calls
no test coverage detected