diff --git a/src/detect.ts b/src/detect.ts index 54e1882..5f377b7 100644 --- a/src/detect.ts +++ b/src/detect.ts @@ -60,3 +60,15 @@ export function matchReadPathToSkill( } return null; } + +/** Read-path detection only when trackReadPaths is enabled (SPEC §6.2, §3). */ +export function matchReadPathToSkillWhenEnabled( + path: string, + skills: readonly SkillPathMeta[], + trackReadPaths: boolean, +): SkillPathMeta | null { + if (!trackReadPaths) { + return null; + } + return matchReadPathToSkill(path, skills); +}