(c: CandidateSkill)
| 31 | evidence?: number; |
| 32 | } |
| 33 | |
| 34 | /** Write (or replace) a candidate. Candidates are always machine-owned, so replacing a |
| 35 | * prior candidate of the same name is fine — they never collide with active skills. */ |
| 36 | export async function writeCandidate(c: CandidateSkill): Promise<string> { |
| 37 | const dir = path.join(candidatesDir(), c.name); |
| 38 | await fs.mkdir(dir, { recursive: true }); |
| 39 | const file = path.join(dir, 'SKILL.md'); |
| 40 | await fs.writeFile(file, c.skillMd, 'utf-8'); |
| 41 | logger.info('Skill candidate captured (quarantined)', { name: c.name, dir }); |
| 42 | return file; |
| 43 | } |
no test coverage detected