Skip to content

Auto-resolve graph location from git worktrees (git-common-dir) #2008

Description

@uitholland

Problem. The graph (graphify-out/) lives in the main checkout. Running graphify explain from a git worktree fails hard ("graph file not found"), so every worktree-based workflow needs a wrapper like:

(cd "$(git rev-parse --path-format=absolute --git-common-dir)/.." && graphify explain "<symbol>")

With AI-agent workflows (Claude Code etc.) increasingly running every task in its own worktree, this is a growing friction point: the workaround has to be carried in project rules and breaks when the cwd disappears mid-session.

Proposal. On startup, when no graphify-out/ is found in the current root, detect a worktree via git rev-parse --git-common-dir and fall back to the main checkout's graph (read-only). A --graph-dir override would also help.

Environment. graphifyy 0.8.36, macOS, ~1.8k-file PHP/JS repo, graph built code-only (no LLM pass).

Activity

  1. HerenderKumar commented on Jul 20, 2026

    @HerenderKumar
    Contributor

    PR up: #2064

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions