MCPcopy Create free account
hub / github.com/garrytan/gstack / getRegistryStats

Function getRegistryStats

scripts/question-registry.ts:628–647  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

626
627/** Registry stats, for /plan-tune stats */
628export function getRegistryStats() {
629 const all = Object.values(QUESTIONS as Record<string, QuestionDef>);
630 const bySkill: Record<string, number> = {};
631 const byCategory: Record<string, number> = {};
632 let oneWay = 0;
633 let twoWay = 0;
634 for (const q of all) {
635 bySkill[q.skill] = (bySkill[q.skill] ?? 0) + 1;
636 byCategory[q.category] = (byCategory[q.category] ?? 0) + 1;
637 if (q.door_type === 'one-way') oneWay++;
638 else twoWay++;
639 }
640 return {
641 total: all.length,
642 one_way: oneWay,
643 two_way: twoWay,
644 by_skill: bySkill,
645 by_category: byCategory,
646 };
647}

Callers 1

plan-tune.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected