control_loop
Skill2 starsChanged 3 months agoMITView on GitHub
Close the system into a self-improving loop — measure routing outcomes (local %, token savings, escalation/success rates) and adapt the effort→tier thresholds the auto-router reads, so it gets better at keeping work local without failing. Use to see routing stats, tune the router from real outcomes, or reset thresholds. Also use when the user wants the system to adapt/learn its routing automatically.
In this repository75 other files it gives its agents.
- AGENTS.mdAGENTS.md
- clean-cacheSkill
- agent-cacheSkill
- app_testSkill
- asset-qualitySkill
- auto_distillSkill
- auto-memorySkill
- auto_routerSkill
- benchSkill
- bootstrapSkill
- botte-proxySkill
- cacheSkill
- capabilitiesSkill
- cardinalSkill
- cavemanSkill
- checkupSkill
- clarificationSkill
- clusterSkill
- code_fingerprintSkill
- completion_proofSkill
- conductorSkill
- context_budgetSkill
- context_profilerSkill
- context_slicerSkill
- context_windowsSkill
- cost_estimatorSkill
- cwe_kbSkill
- dag_optimizerSkill
- dashboardSkill
- decision-ladderSkill
- demoSkill
- diff_languageSkill
- directives_auditSkill
- docgenSkill
- docs_stewardSkill
- eventsSkill
- fallow_likeSkill
- fast_contextSkill
- fixSkill
- harness_deltaSkill
- hermes-bridgeSkill
- hf_provenanceSkill
- infra_advisorSkill
- ingestSkill
- llm_backendsSkill
- llm_mcpSkill
- loaderSkill
- mcp_gatewaySkill
- meta_harnessSkill
- metricsSkill
- migration_auditSkill
- monte_cristoSkill
- mousquetairesSkill
- nlp_deterministicSkill
- nn_auditSkill
- prefix-prunerSkill
- prefix_treeSkill
- preflightSkill
- prompt_improverSkill
- reportSkill
- The first 60 shown.
The file
Files
control_loop — the router that learns
The final systemic loop: every routing decision + outcome is recorded, and the effort→tier thresholds (read live by [[auto_router]]) are nudged from the data — keep more work local when local is reliable, escalate sooner when it isn't.
python -m skills.control_loop.cli analyze # local %, savings, escalation/success
python -m skills.control_loop.cli adapt # proposed threshold change + why
python -m skills.control_loop.cli adapt --apply # write it; the router uses it next time
python -m skills.control_loop.cli reset # back to defaultsHow the loop closes
- Measure —
auto_router.runrecords each call to~/.botte/control-ledger.jsonl(effort, tier, local/cloud, tokens saved, escalated, success). - Analyze — aggregate: local %, escalation rate, success rate, tokens saved.
- Adapt — conservative rule, needs ≥10 samples, small steps, clamped:
- local reliable (success ≥85%, escalation <15%) → raise the LOCAL boundary (keep more work local → more savings).
- local insufficient (escalation >30%) → lower it (escalate borderline sooner).
- Apply — write
~/.botte/routing-thresholds.json;auto_router.effortreads it live, so the next decisions reflect what actually worked.
This is the Karpathy/second-brain pattern applied to routing: the system gets
smarter from its own outcomes. Exposed via [[llm_mcp]] as routing_stats.
Related: [[auto_router]], [[conductor]], [[metrics]].
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

