codegraph_explore: a character or symbol-only budget beside maxFiles
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- typescript
- 領域
- tooling
調査の方向性
src/mcp/tools.ts から始める。そこでは #1699 の doc tier が既にランク順でファイルごとの上限を消費しており、codegraph_explore の入力スキーマ (maxFiles) がどのようにセクションのレンダリングに流れるかを追跡する。どのバリアントを実装するかを決める (maxChars の予算 vs name (file:line) というシンボルのみの近傍)、その後、issue 本文に記載された計測済みの回答サイズに対して検証する。完了とは、新しい予算用パラメータが表の予測どおりに回答の文字数を変え、既存の maxFiles の挙動が保たれていることを指す。
索引モデルが issue の本文から書いたものです。
説明
Summary
maxFiles is the only size knob on codegraph_explore, and it counts files, not characters. Each file that makes the cut contributes whole symbol bodies plus its share of the blast-radius and relationships sections, so a small maxFiles does not give a small answer. Ask: a maxChars budget, or a mode that returns only the named symbols' source with caller names and no bodies for the neighbours.
Measured (1.6.0, Windows, ~500-file TypeScript/Vue repo)
One symbol query, the same every time, varying only maxFiles:
maxFiles |
answer size |
|---|---|
| 1 | 5.4k |
| 3 | 8.1k |
| 6 | 20.5k |
| 12 | 20.7k |
| unset | 7.7k |
Natural-language queries are worse: at maxFiles: 3 the answer was still 13–24k characters in 7 of 8 calls, because a file that matches on a prose term renders its matched sections whole.
Why it matters on the client side
Every later turn re-reads the whole context, so answer size is the cost that compounds. On a paired A/B (headless Claude Code, Opus, n = 12) the tool cut a discovery task from 5.67 to 3.33 calls and still raised cost per task by a median $0.13, and the ~21.7k-character mean answer is the reason (a bounded Read averages ~4.6k on the same repo). Telling the model about maxFiles in the repo rules did not help: a rule naming the cap changed calls +0.67 and cost −$0.14 per task, neither under p .3 at n = 9.
What did shrink answers was a shape change, not a count: the section-first doc tier in #1699 renders a markdown hit's top sections under a per-file source cap and drops the graph sections when no code file rendered, and the doc-question chain went from a median 4 calls to 1 with cost per cell $0.30 against $0.54. A code-side equivalent would be the ask here: a character budget the tool spends in rank order, or a symbols-only mode where neighbours appear as name (file:line) rather than as source.
Happy to send a PR for either if the maintainer has a preference; #1699's doc tier in src/mcp/tools.ts already spends a per-file cap in rank order, so maxChars is mostly plumbing a value from the input schema into the same place.
- 主要言語
- C
- スター
- 73.2k
- フォーク
- 4.7k
- 平均マージ
- 2時間 13分
- マージ済み PR(30日)
- 418
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
colbymchenry/codegraph のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
colbymchenry/codegraph#2634 ·
メンテナーはふだん 1 日以内に返信
-
Windows: bundled Node v24.16.0 can abort at exit (nodejs/node#56645); please bundle Node >= 24.20.0対応中かも @Ancienttwo が 2 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
colbymchenry/codegraph#2617 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1時間未満 初心者へのやさしさ 72/100
colbymchenry/codegraph#2482 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
colbymchenry/codegraph#1900 · コメント 2 件 · リアクション 5 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
colbymchenry/codegraph#1700 ·
メンテナーはふだん 1 日以内に返信
colbymchenry/codegraph の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
OpenPrinting/cups#1772 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
snowballstem/snowball#311 ·
-
tech-debt
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100