From council
This skill decides whether a user's question warrants full multi-model deliberation or can be answered well by a single model. Routes queries based on learned patterns from past deliberation outcomes stored in pattern memory. Triggers automatically before every deliberation when routing is enabled via /council-config. Uses heuristic fallbacks when pattern memory has insufficient data, and learned rules once 20+ deliberations are logged.
How this skill is triggered — by the user, by Claude, or both
Slash command
/council:smart-routerThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Decide whether a query should go through full Council deliberation or be answered by a single model. The router starts conservative (deliberate on everything), applies heuristics for early routing, and transitions to learned rules once pattern memory has enough data.
Decide whether a query should go through full Council deliberation or be answered by a single model. The router starts conservative (deliberate on everything), applies heuristics for early routing, and transitions to learned rules once pattern memory has enough data.
Incoming Query
│
├── User explicitly called /deliberate → ALWAYS DELIBERATE (skip router)
│
├── Router mode set to "always_deliberate" in config → DELIBERATE
│
├── Router mode set to "always_shortcut" in config → SINGLE MODEL
│
└── Router mode is "learned" (default) →
│
├── Step 1: Extract query features
│
├── Step 2: Check pattern memory
│ ├── No memory file → HEURISTIC ROUTING (Step 3)
│ ├── < 20 deliberations → HEURISTIC ROUTING (Step 3)
│ └── 20+ deliberations with routing rules → LEARNED ROUTING (Step 4)
│
├── Step 3: Heuristic routing (fallback)
│ ├── Match against keyword/signal tables
│ └── Return decision with heuristic confidence
│
└── Step 4: Learned routing
├── Match query category against routing_model.rules
├── If best rule confidence > 0.8 → follow rule
├── If best rule confidence 0.5-0.8 → follow rule but flag as uncertain
└── If no confident match → DELIBERATE (exploration — learn from outcome)
Parse the incoming query and produce a features object. This is done once here and passed through the entire pipeline (deliberation-engine uses it for logging, pattern-memory stores it).
{
"length": 87,
"category": "architecture_decision",
"keywords": ["compare", "tradeoffs"],
"complexity_signals": {
"sub_question_count": 2,
"has_conditional": false,
"has_context_reference": true,
"has_compound_conjunction": true
},
"estimated_protocol": "voting"
}
Category classification — apply the rules from references/routing-heuristics.md:
| Category | Primary keywords | Protocol |
|---|---|---|
architecture_decision | compare, tradeoffs, pros cons, architecture, design pattern, migration | voting |
compliance_security | STIG, CMMC, compliance, FedRAMP, NIST, audit, security, risk | consensus |
code_implementation | implement, code, function, bug, error, fix, test, deploy, API | voting |
strategy_business | strategy, market, pricing, positioning, competitor, growth, roadmap | voting |
creative_writing | write, draft, blog, post, article, copy, headline, narrative | voting |
factual_lookup | what is, define, how does, explain, meaning of, syntax for | consensus |
other | No strong signal match | voting |
Compound query detection — look for conjunctions (and, but, or, vs, versus, compared to) joining distinct sub-questions. Compound queries lean toward deliberation regardless of category.
Protocol selection — reasoning queries get voting, knowledge queries get consensus. If the query is compound with mixed types, default to voting (larger accuracy gain).
Read council-memory.json from the workspace.
routing_source: "heuristic_no_memory".deliberations.length < 20: Proceed to Step 3. Set routing_source: "heuristic_learning". Include progress note: "Learning: {N}/20 deliberations logged."deliberations.length >= 20, routing_model.rules is empty: Proceed to Step 3. Log a suggestion: "20+ deliberations logged — run /council-config rebuild-router to activate learned routing."routing_model.rules has entries: Proceed to Step 4 (learned routing).Apply hard-coded rules when pattern memory is insufficient. These are intentionally conservative — they lean toward deliberation for ambiguous cases because every deliberation generates training data for the learned router.
Decision table (evaluated top to bottom, first match wins):
| Priority | Condition | Decision | Confidence | Reasoning |
|---|---|---|---|---|
| 1 | Budget setting < $0.03 | single_model | 0.95 | Budget too low for deliberation |
| 2 | Query length < 20 chars | single_model | 0.7 | Too terse for meaningful deliberation |
| 3 | Category is factual_lookup AND no compound conjunctions | single_model | 0.75 | Simple factual — one model suffices |
| 4 | Category is code_implementation AND no decision keywords | single_model | 0.65 | Deterministic code task — deliberation unlikely to add value |
| 5 | Keywords include "compare", "tradeoffs", "pros and cons" | deliberate | 0.9 | Explicit comparison request |
| 6 | Keywords include "should I", "which is better", "best approach" | deliberate | 0.85 | Decision query |
| 7 | Query length > 100 AND sub_question_count >= 2 | deliberate | 0.8 | Complex multi-part query |
| 8 | Category is architecture_decision or strategy_business | deliberate | 0.8 | High-stakes reasoning |
| 9 | Category is compliance_security | deliberate | 0.8 | Accuracy-critical domain |
| 10 | Category is creative_writing | deliberate | 0.7 | Benefits from diverse perspectives |
| 11 | (no match — catchall) | deliberate | 0.5 | Uncertain — deliberate to learn |
Model selection for single-model routing: When heuristic routing decides single_model, select the preferred model:
factual_lookup → Use the Analyst model (default: openai/gpt-4o)code_implementation → Use the Analyst modelreferences/model-configs.md cost table)anthropic/claude-sonnet-4) as the general-purpose best performerWhen pattern memory has 20+ deliberations and the routing model has been built, use data-driven rules.
4a. Match query category against rules.
Read routing_model.rules from the memory file. Each rule has:
{
"condition": "category == 'architecture_decision'",
"action": "deliberate",
"confidence": 0.91,
"sample_count": 8,
"value_score": 0.78,
"preferred_model": null
}
Find all rules where the condition matches the extracted query features. If multiple rules match (e.g., category match + keyword match), use the one with the highest confidence.
4b. Apply confidence thresholds.
| Rule confidence | Behavior |
|---|---|
| > 0.8 | Follow the rule. High certainty. |
| 0.5 – 0.8 | Follow the rule but flag in output: "uncertain": true. The deliberation-engine should note this in the output so the user knows the router is still learning this pattern. |
| < 0.5 | Ignore the rule — default to deliberation. This is an exploration case; the outcome will strengthen or weaken the rule. |
4c. Dynamic model selection.
When the routing decision is deliberate, the router also recommends which models to include based on model_performance.category_ranks:
model_performance from the memory filecategory_ranksmodel-configs.md)recommended_modelsWhen the routing decision is single_model:
preferred_model on the matched rulecategory_ranks score for this query's category4d. Self-preference penalty.
Before finalizing model recommendations, check model_performance.self_preference_rate for each model. If a model's self-preference rate exceeds 20%, add a note in the routing output: "bias_warnings": ["model X shows 23% self-preference rate — consider excluding from review rounds"]. This doesn't auto-exclude (the user or the deliberation-engine decides), but it surfaces the signal.
Assemble the final response object:
{
"decision": "deliberate",
"confidence": 0.91,
"reasoning": "Query matches architecture_decision pattern — deliberation adds value 78% of the time (8 samples)",
"routing_source": "learned",
"uncertain": false,
"recommended_models": [
"anthropic/claude-sonnet-4",
"openai/gpt-4o",
"x-ai/grok-3",
"google/gemini-2.0-flash"
],
"excluded_models": [],
"recommended_protocol": "voting",
"estimated_cost": 0.09,
"bias_warnings": [],
"query_features": {
"length": 87,
"category": "architecture_decision",
"keywords": ["compare", "tradeoffs"],
"complexity_signals": {
"sub_question_count": 2,
"has_conditional": false,
"has_context_reference": true,
"has_compound_conjunction": true
},
"estimated_protocol": "voting"
},
"learning_status": "Active — 34 deliberations, 6 routing rules, last rebuilt 2026-03-28"
}
Single-model response variant:
{
"decision": "single_model",
"confidence": 0.87,
"reasoning": "factual_lookup queries answered correctly by single model 87% of the time (5 samples)",
"routing_source": "learned",
"uncertain": false,
"recommended_models": ["openai/gpt-4o"],
"excluded_models": [],
"recommended_protocol": null,
"estimated_cost": 0.01,
"bias_warnings": [],
"query_features": { ... },
"learning_status": "Active — 34 deliberations, 6 routing rules"
}
The router estimates cost before the pipeline runs so it can enforce budget constraints:
If the estimated cost exceeds the user's --budget setting, the router downgrades: large → medium → small → single model, until the estimate fits within budget. Log this downgrade in reasoning.
The smart-router is called by the deliberation-engine before Step 1 (Resolve Model Lineup). The deliberation-engine uses the router's response to:
decision is single_model (go to single-model shortcut)recommended_models instead of the default lineup if providedrecommended_protocol to pre-select voting vs. consensus (can still be overridden by Step 3 classification)query_features through to Step 8 for pattern-memory loggingbias_warnings in the output if anylearning_status in the footer of the deliberation output| Mode | Behavior |
|---|---|
learned (default) | Full routing logic: heuristic fallback → learned rules when available |
always_deliberate | Skip router entirely — every query gets full Council pipeline |
always_shortcut | Skip router entirely — every query goes to single best model |
Set via: /council-config set router learned|always_deliberate|always_shortcut
Provides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
npx claudepluginhub moxywolfllc/moxywolf-plugins --plugin council