MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / writeCandidate

Function writeCandidate

src/skills/learning/candidate-store.ts:33–40  ·  view source on GitHub ↗
(c: CandidateSkill)

Source from the content-addressed store, hash-verified

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. */
36export 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}

Callers 3

executeMethod · 0.85
curateCandidatesFunction · 0.85
runSandboxedMethod · 0.85

Calls 2

candidatesDirFunction · 0.85
infoMethod · 0.80

Tested by

no test coverage detected