Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: colbymchenry/codegraph
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: kim4apple/codegraph
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 4 commits
  • 15 files changed
  • 3 contributors

Commits on May 19, 2026

  1. Configuration menu
    Copy the full SHA
    8125798 View commit details
    Browse the repository at this point in the history

Commits on May 20, 2026

  1. feat(mcp): steer agents to explore-first; fix Kotlin/Swift test detec…

    …tion (#191)
    
    * feat(mcp): steer agents to explore-first; fix Kotlin/Swift test detection
    
    Two changes from diagnosing why Claude Code's Explore agent wasn't using
    codegraph_explore on a benchmark run (37 calls / ~90k tokens via
    search+Read+grep, vs a general-purpose agent that led with explore: 13
    calls / ~55k tokens for the same question).
    
    1. Tool guidance reframed across server-instructions.ts,
       instructions-template.ts, and .cursor/rules/codegraph.mdc (+ the
       explore/search tool descriptions): codegraph_explore is the workhorse
       for understanding/architecture/"how does X work" questions. Seed it with
       the key symbol names (a quick search/context first if the question names
       nothing concrete), read its output, and fill gaps with node/Read —
       instead of searching then Reading each file. The old "search first to
       find names, then explore" wording was short-circuiting: agents searched,
       got file:line locations, and Read them, never reaching explore.
    
    2. isTestFile now recognizes Kotlin (*Test.kt, jvmTest/commonTest/
       androidTest source sets), Swift (*Tests.swift), and other camelCase test
       conventions, so test code is deprioritized in explore/context ranking.
       Previously only Java/JS/Python were known, letting tests dominate
       Kotlin/Swift exploration (OkHttp "trace a request" went from 8/9 test
       files to surfacing Call.kt/OkHttpClient.kt/Request.kt/Response.kt).
       Capital-led matching keeps latest.kt/manifest.kt unflagged.
    
    An IDF common-term down-weighting was prototyped for the cold-query case
    but dropped — it was a measured no-op (the "common" terms weren't actually
    common in the test indexes); the test-detection gap was the real cause.
    
    Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
    
    * chore(agent-eval): add agent-behavior eval harness for codegraph MCP usage
    
    Tooling to measure how a Claude Code agent actually uses the codegraph
    MCP tools on a real repo — does it lead with codegraph_explore, how many
    Read/Grep follow-ups, token cost — for validating tool-guidance changes
    (server-instructions, tool descriptions) against real agent behavior.
    
    - itrun.sh drives the real interactive TUI via tmux (the faithful
      Explore path). Hardened for unattended runs: type-and-verify prompt
      delivery (the ❯ glyph is drawn ~6s before the input accepts keys),
      auto-accepts the "trust this folder" dialog, busy-detection keys on
      the universal "(Ns · …)" spinner so the pre-stream thinking phase
      counts as busy, and fails loudly instead of capturing an empty pane.
    - parse-session.mjs reports the tool breakdown + token accounting
      (gen / fresh-in / cached-in / billable) from the session and subagent
      logs, consistent across main-thread and subagent runs; counts
      main-thread Bash in the grep verdict.
    - run-agent.sh / parse-run.mjs are the headless stream-json complement
      (exact per-tool tokens/cost via claude -p).
    - run-interactive-test.md documents how to run it and how completion is
      detected.
    
    Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
    
    ---------
    
    Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
    colbymchenry and claude authored May 20, 2026
    Configuration menu
    Copy the full SHA
    37cf566 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c88384b View commit details
    Browse the repository at this point in the history
  3. chore(release): add 0.7.12 changelog entry

    Folds all changes since 0.7.10 into 0.7.12 (0.7.11 was unpublished from
    npm): size-adaptive codegraph_explore output budget (#185/#187), line
    numbers in explore source sections (#188), explore-first tool guidance
    (#191), language-neutral source-omission markers, and Kotlin/Swift
    test-file detection (#191).
    
    Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
    colbymchenry and claude committed May 20, 2026
    Configuration menu
    Copy the full SHA
    3cf3f21 View commit details
    Browse the repository at this point in the history
Loading