feat(generation): FAQ-weighted docs budget tilts depth toward asked-about modules#781
Conversation
…bout modules Documentation depth followed graph centrality alone, blind to what developers actually ask about. This weights it by real usage. A demand aggregator mines get_answer citations and search_codebase hits from the local session transcript stream into per-file question counts, which the generation planner rolls up to its wiki-page module granularity. The file_page budget is then reallocated across modules by demand: - total conserved (reallocation, not inflation) - every module floored so cold modules keep a lean baseline - deterministic and inspectable via the page_selection.demand_tilt log - exact passthrough when there is no session history, so repos without transcripts are byte-identical to before Wired into the shared selection path, so full generation and incremental update both honor it; the cost estimator stays demand-free so estimates never drift. Kill switch generation.faq_weighting (default on). A one-line summary surfaces on init and update when usage shaped the run.
|
✅ Health: 7.6 (unchanged) 📋 At a glance 🚨 Change risk: high (riskier than 76% of this repo's commits · raw 9.5/10)
🩹 Review priority (files here with the most recent bug-fix history — defects cluster, so review these first)
🔎 More signals (3)🔥 Hotspots touched (5)
2 more
🔗 Hidden coupling (2 files)
💀 Dead code (1 finding)
📊 Full report · ⭐ Star Repowise · 📥 Install bot · Last updated 2026-07-11 13:30 UTC |
What
Documentation depth is chosen by graph centrality alone, blind to what developers actually ask about. This weights it by real usage: modules people query get documented deeper, cold ones get the lean treatment, at no change to the total budget.
How
core/sessions/miners/demand.py): a read-only, local sweep of the session transcript stream that minesget_answercitations andsearch_codebasehits into per-file question counts. No network, no LLM.selection/budget.py::allocate_module_file_pages): the planner rolls per-file demand up to its own wiki-page module granularity and redistributes thefile_pagebudget across modules by demand.Guarantees:
page_selection.demand_tiltlog prints per-module demand, baseline vs. allocated pages, and candidates so a human can audit the reallocation.Wiring
Added at the single selection path both full generation and incremental update funnel through, so both honor it. The cost estimator stays demand-free, so its estimate never drifts (counts are conserved). Kill switch
generation.faq_weighting(default on). A one-line summary surfaces on init and update when usage shaped the run, and stays silent otherwise.Tests