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

Function alternativesFor

scripts/route-preview.js:328–347  ·  view source on GitHub ↗
(_input, matches)

Source from the content-addressed store, hash-verified

326 if ((selected === '/archon' || selected.startsWith('/fleet')) && words(input).length < 20) {
327 return {
328 selected: '/marshal',
329 reason: 'proportionality downgraded campaign-level routing because the input is brief.',
330 };
331 }
332 return { selected, reason: null };
333}
334
335function alternativesFor(_input, matches) {
336 const alternatives = [];
337 for (const item of matches.slice(0, 4)) {
338 alternatives.push({
339 route: item.route,
340 why: `matched ${item.matches.join(', ')}`,
341 });
342 }
343
344 if (!alternatives.some((item) => item.route === '/marshal')) {
345 alternatives.push({ route: '/marshal', why: 'safe fallback for unclear multi-step work' });
346 }
347 if (!alternatives.some((item) => item.route === '/archon')) {
348 alternatives.push({ route: '/archon', why: 'use only when persistence or phases are needed' });
349 }
350 if (!alternatives.some((item) => item.route === '/fleet --quick')) {

Callers 1

selectRouteFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected