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

Function applyProportionality

scripts/route-preview.js:312–326  ·  view source on GitHub ↗
(input, selected, dimensions)

Source from the content-addressed store, hash-verified

310}
311
312function fallbackReason(selected, dimensions) {
313 if (selected === '/fleet --quick') return 'the request signals independent parallel work.';
314 if (selected === '/archon') return 'the request appears persistent or campaign-sized.';
315 if (selected === 'direct-edit') return 'the request appears small enough for a direct edit.';
316 return 'the request needs sequencing but not campaign persistence yet.';
317}
318
319function applyProportionality(input, selected, dimensions) {
320 if (selected.startsWith('/fleet') && dimensions.scope === 'single-file') {
321 return {
322 selected: '/marshal',
323 reason: 'proportionality downgraded Fleet because the request mentions a single file.',
324 };
325 }
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.',

Callers 1

selectRouteFunction · 0.85

Calls 1

wordsFunction · 0.85

Tested by

no test coverage detected