feat: quick wins umbrella — 7 single-query capabilities on existing data #30

Open
opened 2026-07-20 22:38:44 +02:00 by buildagent · 2 comments
Member

Quick-wins section of the 2026-07-20 index-data brainstorm (_prdoc/records/brainstorm-2026-07-20-index-data-catalog.md). Each is one query / one JSON field on data that already exists:

  1. Expose symbol_edges.weight in find_callers/find_callees output + sort by it — materialized and populated (754/4109 edges have weight>1, max 20) but no tool surfaces it.
  2. dependency_usage — GROUP BY over refs WHERE target_id IS NULL AND qualifier IS NOT NULL: measured external-API surface (std::fs 510 refs/16 fns, tempfile 323/2, rusqlite 92/8) for dependency-upgrade planning, from call sites rather than manifests.
  3. parity_matrix — GROUP BY over symbols in parallel file groups; automates the 6-language parity review rule. Already earned its keep: found the recursion-DoS test missing in rust.rs → real DoS fix in v0.5.19.
  4. suggest_placement — rank files by how many of the new code's dependencies they already call (validated: index.rs matched 3/3 deps, weight 14).
  5. similar_files exact mode — GROUP BY the existing outline_hash column (finds the m0016–m0019 migration template family instantly).
  6. index_health KPIs in project_overview — per-file resolved/unresolved-qualified/unresolved-bare split so agents know where find_callers is trustworthy (db.rs dense) vs where to fall back to search_text (local_index.rs 10.8%).
  7. coupling_metrics — Ca/Ce/instability per file as a repo_map or get_dependencies enrichment ("db.rs: Ca=31, I=0.03 — 31 files break if you touch it").
Quick-wins section of the 2026-07-20 index-data brainstorm (`_prdoc/records/brainstorm-2026-07-20-index-data-catalog.md`). Each is one query / one JSON field on data that already exists: 1. **Expose `symbol_edges.weight`** in find_callers/find_callees output + sort by it — materialized and populated (754/4109 edges have weight>1, max 20) but no tool surfaces it. 2. **dependency_usage** — GROUP BY over `refs WHERE target_id IS NULL AND qualifier IS NOT NULL`: measured external-API surface (std::fs 510 refs/16 fns, tempfile 323/2, rusqlite 92/8) for dependency-upgrade planning, from call sites rather than manifests. 3. **parity_matrix** — GROUP BY over symbols in parallel file groups; automates the 6-language parity review rule. Already earned its keep: found the recursion-DoS test missing in rust.rs → real DoS fix in v0.5.19. 4. **suggest_placement** — rank files by how many of the new code's dependencies they already call (validated: index.rs matched 3/3 deps, weight 14). 5. **similar_files exact mode** — GROUP BY the existing `outline_hash` column (finds the m0016–m0019 migration template family instantly). 6. **index_health KPIs in project_overview** — per-file resolved/unresolved-qualified/unresolved-bare split so agents know where find_callers is trustworthy (db.rs dense) vs where to fall back to search_text (local_index.rs 10.8%). 7. **coupling_metrics** — Ca/Ce/instability per file as a repo_map or get_dependencies enrichment ("db.rs: Ca=31, I=0.03 — 31 files break if you touch it").
Author
Member

Triage: split and retire the umbrella

These seven items no longer form one coherent deliverable:

  • absorb suggest_placement into context_pack (#35)
  • use edge weight internally for context/ranking; expose it additively where useful
  • fold index-health KPIs into project_overview / resolution_gaps
  • fold coupling metrics into repo_map / context ranking
  • move exact similar files to #27
  • retain dependency usage and parity matrix only as separate maintainer-facing issues if still desired

Close this umbrella once the surviving items have dedicated homes. Avoid expanding the MCP surface with seven single-query tools.

### Triage: split and retire the umbrella These seven items no longer form one coherent deliverable: - absorb `suggest_placement` into `context_pack` (#35) - use edge weight internally for context/ranking; expose it additively where useful - fold index-health KPIs into `project_overview` / `resolution_gaps` - fold coupling metrics into `repo_map` / context ranking - move exact similar files to #27 - retain dependency usage and parity matrix only as separate maintainer-facing issues if still desired Close this umbrella once the surviving items have dedicated homes. Avoid expanding the MCP surface with seven single-query tools.
Author
Member

Re-prioritized after the 2026-07-21 strategy + build-vs-buy studies

Two ultradeep multi-agent studies re-scored this umbrella. Net: one piece is promoted, one dropped, one deferred.

  • #30.6 index_health — PROMOTED, implementing now. The highest-value item in the whole umbrella. Since build-vs-buy settled "keep the hand-rolled resolver" and the ~20% resolution rate is a permanent, mostly-external denominator artifact (not a defect), the correct product response is to tell the agent where find_callers is trustworthy vs where to fall back to search_text. Delta over what already ships: project-level per-language resolution is already in project_overview; add per-file granularity + split the reported rate into external (unresolvable-by-design) vs internal-missed so the misleading 15–20% headline stops overstating the real quality gap. Shipping alongside #38.

  • #30.1 surface symbol_edges.weight + sort — DROPPED. Measured on the live DB: 80.8% of edges tie at weight 1, so the sort key ties for four-fifths of edges and adds almost no ranking signal. Not worth the surface area.

  • #30.7 coupling (Ca/Ce/instability) — DEFERRED. Computing authoritative-looking coupling numbers over an edge graph that resolves only ~20% of references manufactures exactly the false authority the honesty ethos forbids. Revisit only behind an explicit resolved-edge-basis disclosure, and after the #38 precision gate exists.

  • The remaining quick wins (#30.2 dependency_usage, #30.3 parity_matrix, #30.4 suggest_placement, #30.5 similar_files) are unaffected and stay in the backlog.

The gating priority is now #38 (the multilingual precision + zero-phantom regression gate) — it automates the manual-dogfood safety net that currently protects the resolver's zero-phantom guarantee (the moat's crown jewel), confirmed permanent by the build-vs-buy survey (stack-graphs archived; SCIP build-required). #30.6 ships with it.

## Re-prioritized after the 2026-07-21 strategy + build-vs-buy studies Two ultradeep multi-agent studies re-scored this umbrella. Net: **one piece is promoted, one dropped, one deferred.** - **#30.6 index_health — PROMOTED, implementing now.** The highest-value item in the whole umbrella. Since build-vs-buy settled "keep the hand-rolled resolver" and the ~20% resolution rate is a *permanent, mostly-external* denominator artifact (not a defect), the correct product response is to **tell the agent where `find_callers` is trustworthy vs where to fall back to `search_text`**. Delta over what already ships: project-level per-language resolution is already in `project_overview`; add **per-file** granularity + split the reported rate into *external (unresolvable-by-design)* vs *internal-missed* so the misleading 15–20% headline stops overstating the real quality gap. Shipping alongside #38. - **#30.1 surface `symbol_edges.weight` + sort — DROPPED.** Measured on the live DB: **80.8% of edges tie at weight 1**, so the sort key ties for four-fifths of edges and adds almost no ranking signal. Not worth the surface area. - **#30.7 coupling (Ca/Ce/instability) — DEFERRED.** Computing authoritative-looking coupling numbers over an edge graph that resolves only ~20% of references manufactures exactly the false authority the honesty ethos forbids. Revisit only behind an explicit resolved-edge-basis disclosure, and after the #38 precision gate exists. - The remaining quick wins (#30.2 dependency_usage, #30.3 parity_matrix, #30.4 suggest_placement, #30.5 similar_files) are unaffected and stay in the backlog. The gating priority is now **#38 (the multilingual precision + zero-phantom regression gate)** — it automates the manual-dogfood safety net that currently protects the resolver's zero-phantom guarantee (the moat's crown jewel), confirmed permanent by the build-vs-buy survey (stack-graphs archived; SCIP build-required). #30.6 ships with it.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
h-dv/code-index#30
No description provided.