(skill: string)
| 12 | // section still hold. For an uncarved skill (no sections dir) this is just the |
| 13 | // skeleton, so readSkillUnion is safe to use everywhere. |
| 14 | function readSkillUnion(skill: string): string { |
| 15 | let t = fs.readFileSync(path.join(ROOT, skill, 'SKILL.md'), 'utf-8'); |
| 16 | const secDir = path.join(ROOT, skill, 'sections'); |
| 17 | if (fs.existsSync(secDir)) { |
| 18 | for (const f of fs.readdirSync(secDir).sort()) { |
| 19 | if (f.endsWith('.md')) t += '\n' + fs.readFileSync(path.join(secDir, f), 'utf-8'); |
| 20 | } |
| 21 | } |
| 22 | return t; |
| 23 | } |
| 24 | function readShipUnion(): string { |
| 25 | return readSkillUnion('ship'); |
| 26 | } |
no outgoing calls
no test coverage detected