* Load .tmpl files for each skill and return the names of those that have * `interactive: true` in frontmatter.
()
| 62 | * `interactive: true` in frontmatter. |
| 63 | */ |
| 64 | function findInteractiveSkills(): string[] { |
| 65 | const interactive: string[] = []; |
| 66 | for (const skill of SKILL_GLOBS) { |
| 67 | const tmplPath = path.join(ROOT, skill, 'SKILL.md.tmpl'); |
| 68 | if (!fs.existsSync(tmplPath)) continue; |
| 69 | const content = fs.readFileSync(tmplPath, 'utf-8'); |
| 70 | // Frontmatter lives between the first '---' and the next '---'. |
| 71 | const fmEnd = content.indexOf('\n---', 4); |
| 72 | if (fmEnd < 0) continue; |
| 73 | const frontmatter = content.slice(0, fmEnd); |
| 74 | if (/^interactive:\s*true\s*$/m.test(frontmatter)) { |
| 75 | interactive.push(skill); |
| 76 | } |
| 77 | } |
| 78 | return interactive; |
| 79 | } |
| 80 | |
| 81 | /** |
| 82 | * Scan a test file's contents for any of the supported real-interactive |
no test coverage detected