fix: suppress misleading RelationshipCount in local mode CriticalFiles#301
Merged
claude[bot] merged 1 commit intomainfrom Feb 28, 2026
Merged
fix: suppress misleading RelationshipCount in local mode CriticalFiles#301claude[bot] merged 1 commit intomainfrom
claude[bot] merged 1 commit intomainfrom
Conversation
In local mode, computeTopFiles always produced RelationshipCount=1 for every file because files are grouped by top-level directory (each belongs to exactly one domain). This made the "N relationships" label noise rather than signal. Changes: - computeTopFiles now sets RelationshipCount=0 for all local-mode files - Files are ranked by a heuristic: well-known entry points (main, app, server, index, init) score higher; then shorter paths (closer to root); then alpha - Template skips "— N relationships" when RelationshipCount is 0 - truncateToTokenBudget likewise omits the count when it is 0 Co-Authored-By: Grey Newell <greyshipscode@gmail.com> Co-Authored-By: claude[bot] <claude[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
In local mode,
computeTopFilesalways producedRelationshipCount = 1for every file because files are grouped by top-level directory — each file belongs to exactly one domain. The template then renderedcmd/run.go — 1 relationshipsfor every entry, which was noise rather than signal.Changes
internal/local/local.go—computeTopFilesRelationshipCount = 0for all local-mode files (suppresses the count in output)main,app,server,index,init) score higherentryPointPriorityhelperinternal/template/render.go— template + truncated renderer— N relationshipswhenRelationshipCountis 0truncateToTokenBudget: same — omits the count when it is 0Fixes #299
Generated with Claude Code