defaultSkillRoots function

({List<String> projectRoots, List<String> userRoots}) defaultSkillRoots({
  1. required String cwd,
  2. String? homeDir,
})

The default skill roots for a host: <cwd>/.fah/skills + <cwd>/.agents/skills (project) and, when a home directory exists, ~/.fah/skills + ~/.agents/skills (user). Web/sandbox hosts pass their sandbox cwd and no home (the sandbox FS carries project skills).

Implementation

({List<String> projectRoots, List<String> userRoots}) defaultSkillRoots({
  required String cwd,
  String? homeDir,
}) {
  return (
    projectRoots: ['$cwd/.fah/skills', '$cwd/.agents/skills'],
    userRoots: homeDir == null
        ? const <String>[]
        : ['$homeDir/.fah/skills', '$homeDir/.agents/skills'],
  );
}