Summary
In RepoMapBuilder.Build() at src/CodeIndex/Database/RepoMapBuilder.cs:78-100+, the entrypoint detection uses language-specific name hints (line 17-39) and path hints (line 40-63) with a simple match-first strategy. However, when multiple candidate entrypoints exist in the same language, or when heuristic hints are weak (e.g., Python "app" matching dozens of helper modules), the Build() result provides no confidence metric. This makes it risky for AI clients to trust the entrypoint list without independent validation, yet there's no structured way to report confidence.
Where
src/CodeIndex/Database/RepoMapBuilder.cs:17-39 (EntrypointNameHints dictionary)
src/CodeIndex/Database/RepoMapBuilder.cs:40-63 (EntrypointPathHints dictionary)
src/CodeIndex/Database/RepoMapBuilder.cs:78-100 (Build method signature)
Suggested approach
- Add a
EntrypointMatch record that includes (symbol_name, kind, path, language, match_type: name|path, confidence: 0.0..1.0, hint_rank: int)
- For each language, score path hints higher than name hints, and prefer files in the repo root or conventional locations
- Compute confidence as (matches_multiple_heuristics ? 0.8 : matches_single_heuristic ? 0.5 : 0.2) and adjust downward if hint_name is ambiguous (matches_count > 1)
- Return a
RepoMapResult that includes entrypoints: List<EntrypointMatch> instead of bare symbol names
- Document the confidence intervals in USER_GUIDE so clients know when to treat results as advisory
- Add
--min-entrypoint-confidence <0.0..1.0> flag to filter weak matches at query time
Summary
In
RepoMapBuilder.Build()at src/CodeIndex/Database/RepoMapBuilder.cs:78-100+, the entrypoint detection uses language-specific name hints (line 17-39) and path hints (line 40-63) with a simple match-first strategy. However, when multiple candidate entrypoints exist in the same language, or when heuristic hints are weak (e.g., Python "app" matching dozens of helper modules), theBuild()result provides no confidence metric. This makes it risky for AI clients to trust the entrypoint list without independent validation, yet there's no structured way to report confidence.Where
src/CodeIndex/Database/RepoMapBuilder.cs:17-39(EntrypointNameHints dictionary)src/CodeIndex/Database/RepoMapBuilder.cs:40-63(EntrypointPathHints dictionary)src/CodeIndex/Database/RepoMapBuilder.cs:78-100(Build method signature)Suggested approach
EntrypointMatchrecord that includes (symbol_name, kind, path, language, match_type: name|path, confidence: 0.0..1.0, hint_rank: int)RepoMapResultthat includesentrypoints: List<EntrypointMatch>instead of bare symbol names--min-entrypoint-confidence <0.0..1.0>flag to filter weak matches at query time