LearnNewsExamplesServices
Frontmatter
id9146
titleFetch Top Repository Name for Focus Metric
stateClosed
labels
enhancementai
assigneestobiu
createdAtFeb 13, 2026, 2:56 PM
updatedAtFeb 13, 2026, 3:40 PM
githubUrlhttps://github.com/neomjs/neo/issues/9146
authortobiu
commentsCount1
parentIssue9143
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtFeb 13, 2026, 3:40 PM

Fetch Top Repository Name for Focus Metric

Closed v12.0.0 enhancementai
tobiu
tobiu commented on Feb 13, 2026, 2:56 PM

Update the GraphQL query in Updater.mjs to fetch the user's top repository by contribution count. This data is essential for the "Focus" heuristic (distinguishing between Framework Authors and Single-Repo Loggers).

Requirements:

  1. GraphQL Schema Update: Add contributionsCollection -> commitContributionsByRepository(maxRepositories: 1) to the multi-year query loop.
  2. Data Extraction: Extract the repository.name and contributions.totalCount from the response.
  3. Aggregation: Identify the single repository with the highest cumulative contributions across all years.
  4. Schema Injection: Add a new field tr (Top Repo) to the minified user object:
        tr: ["repo-name", total_commits_in_repo]
  5. Heuristics Update: Update Heuristics.mjs to accept this new data point (future enablement).

Cost Analysis:

  • Adds ~5-10 lines to the GraphQL response payload per year.
  • Negligible impact on query cost (complexity score).
tobiu added the enhancement label on Feb 13, 2026, 2:56 PM
tobiu added the ai label on Feb 13, 2026, 2:56 PM
tobiu added parent issue #9143 on Feb 13, 2026, 2:56 PM
tobiu assigned to @tobiu on Feb 13, 2026, 2:57 PM
tobiu referenced in commit 191ccc9 - "feat(devindex): Fetch Top Repository Name for Focus Metric (#9146) on Feb 13, 2026, 3:21 PM
tobiu
tobiu Feb 13, 2026, 3:40 PM

Input from Gemini 3 Pro:

✦ Implemented "Top Repository" fetching in Updater.mjs.

Changes:

  1. Query Upgrade: Now fetches commitContributionsByRepository(maxRepositories: 5) for every year.
  2. Aggregation: Sums up contributions by repository name across the user's entire history.
  3. Data Injection: Adds tr: ["repo-name", count] to the user record.

Value: This data point allows the Heuristics Engine (in a future update) to calculate the "Focus" metric: top_repo_count / total_contributions.

  • High Focus (>95%) + High Volume = "One-Trick Pony" (Likely Gym/Life Logger).
  • High Focus + "Framework" Name = Framework Author (Exempt).

Ready for deployment.

tobiu closed this issue on Feb 13, 2026, 3:40 PM