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

Function buildRoutingTable

scripts/generate-routing.js:65–90  ·  view source on GitHub ↗
(projectRoot)

Source from the content-addressed store, hash-verified

63 demoData: {
64 begin: '// <!-- BEGIN GENERATED: routing-data -->',
65 end: '// <!-- END GENERATED: routing-data -->',
66 },
67 demoExactData: {
68 begin: '// <!-- BEGIN GENERATED: exact-command-data -->',
69 end: '// <!-- END GENERATED: exact-command-data -->',
70 },
71};
72
73function buildRoutingTable(projectRoot) {
74 const catalog = buildSkillCatalog(projectRoot);
75 const missing = [];
76 const skills = [];
77
78 for (const skill of catalog.skills) {
79 if (EXCLUDED_SKILLS.includes(skill.name)) continue;
80 if (!Array.isArray(skill.triggerKeywords) || skill.triggerKeywords.length === 0) {
81 missing.push(skill.name);
82 continue;
83 }
84 skills.push({
85 name: skill.name,
86 keywords: skill.triggerKeywords,
87 description: skill.description,
88 productBundle: skill.productBundle,
89 });
90 }
91
92 if (missing.length > 0) {
93 throw new Error(`skills missing trigger_keywords frontmatter: ${missing.join(', ')}`);

Callers 2

expectedSurfacesFunction · 0.85

Calls 1

buildSkillCatalogFunction · 0.85

Tested by

no test coverage detected