MCPcopy Create free account
hub / github.com/SethGammon/Citadel / syncProjectScripts

Function syncProjectScripts

scripts/codex-compat.js:611–630  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

609 // it overlays anything that might have slipped in.
610 const content = fs.readFileSync(sourcePath, 'utf8');
611 const fm = parseFrontmatter(content);
612 if (fm.name || fm.description) {
613 generateOpenAIYaml(targetDir, fm);
614 }
615
616 synced++;
617 }
618
619 console.log(` ${synced} skills synced (full directory tree).`);
620}
621
622function syncProjectScripts() {
623 console.log('Syncing script delegates to .citadel/scripts/...');
624
625 const sourceDir = path.join(CITADEL_ROOT, 'scripts');
626 if (!fs.existsSync(sourceDir)) {
627 console.log(' No scripts/ directory found, skipping.');
628 return;
629 }
630
631 writeFile(path.join(PROJECT_ROOT, '.citadel', 'plugin-root.txt'), CITADEL_ROOT);
632 writeFile(
633 path.join(PROJECT_ROOT, '.citadel', 'scripts', 'package.json'),

Callers 1

mainFunction · 0.85

Calls 2

writeFileFunction · 0.70
generateDelegateFunction · 0.70

Tested by

no test coverage detected