Skip to content

how to integrate with multi repo project #1177

Open

Description

@alireza-salehi

what is the best practice to integrate it with vscode when working on a project with following structure and always opening vscode in project-root:

project-root (no git repo)
--docs git repo
--backend git repo
--modules
----module1 git repo
----module2 git repo
--frontend git repo

i need to ask a question and it checks backend, frontend, modules... automatically.

also is it possible to integrate context-mode? is ther any integration with graphify? or combine benefit?

Activity

  1. FolatheDuckofDuckingburg commented on Jun 7, 2026

    @FolatheDuckofDuckingburg
    Contributor

    Working with a nested sub-repository setup in VS Code (where the project-root is not a git repository, but multiple sub-directories inside it are) can confuse standard AI extensions. Because they typically look for a single .git folder at the root to map the workspace, they often miss changes inside your backend, frontend, or modules/module1 repositories.

    To get cross-repo checking working seamlessly, combine context-mode, and integrate Graphify, you can follow this best-practice blueprint.

    1. Setting Up the VS Code Workspace
      Since your project root isn't a git repo, VS Code needs to be told explicitly that this is a Multi-Root Workspace. This allows your AI extensions (like Copilot Chat or Cursor) to treat each sub-repo as an active context boundary.

    Open your project-root folder in VS Code.

    Go to File > Save Workspace As... and save a file named project.code-workspace in your root folder.

    Edit that file to look like this:

    JSON

    {
    "folders": [
    { "name": "Root", "path": "." },
    { "name": "Backend", "path": "backend" },
    { "name": "Frontend", "path": "frontend" },
    { "name": "Docs", "path": "docs" },
    { "name": "Module-1", "path": "modules/module1" },
    { "name": "Module-2", "path": "modules/module2" }
    ],
    "settings": {
    "git.autoRepositoryDetection": "subfolders"
    }
    }
    💡 Why this works: Setting "git.autoRepositoryDetection": "subfolders" forces VS Code to track every inner git repo simultaneously. When you ask a question, your AI assistant will naturally parse paths across folders.

    1. Integrating Graphify (The Context Reducer)
      Graphify turns your fragmented directories into an interconnected, queryable knowledge graph. It bridges the gap between your docs repo, your frontend, and your backend by extracting AST trees and semantic relationships.

    Because Graphify reads paths recursively, you can run it directly from your non-git project-root to index the entire cluster.

    Setup Steps:
    Install Graphify globally using uv or pipx (use the package name graphifyy with a double 'y' on PyPI):

    Bash

    uv tool install graphifyy
    Register the skill with your active AI assistant framework (it instantly injects hooks into VS Code Copilot Chat, Cursor Rules, Claude Code, and more):

    Bash

    graphify install
    Build your unified graph from the root:

    Bash

    graphify .
    Graphify will generate a folder named graphify-out/ at your root containing GRAPH_REPORT.md and graph.json. Your AI assistant will automatically read this report first whenever you initiate a prompt, giving it instant structural awareness of how frontend routes connect to backend APIs.

    1. Activating Context-Mode / Agent Mode
      To force the AI to look through all repositories automatically without you manually attaching files like @backend or @frontend every time, you must leverage Context-Mode / Agent Mode rules.

    Depending on your editor platform, create a universal routing file at your non-git root directory:

    For Cursor: Create a file at project-root/.cursor/rules/graphify.mdc

    For Claude Code / Copilot / Custom Agents: Create a CLAUDE.md or AGENTS.md at your root.

    Add these exact instructions inside it:

    Markdown

    Global Multi-Repo Context Rules

    You are an expert developer working in a multi-repository workspace.
    The current workspace consists of unlinked sub-repositories (backend, frontend, docs, and nested modules/).

    Context Protocol:

    1. BEFORE answering any question, you MUST inspect graphify-out/GRAPH_REPORT.md to map dependencies across services.
    2. If a query mentions an API, data model, or route, automatically search files in BOTH backend/ and frontend/ to ensure full-stack alignment.
    3. Do not assume the root directory has a Git state; use absolute or relative-to-root routing when reading target sub-modules.
    4. The Combined Benefit (The Workflow)
      By hooking Graphify and your Multi-Root workspace together, you achieve Zero-Grep Architecture Tracking:

    Automated Syncing: You can run graphify hook install at the root. Even though the root isn't a git repo, Graphify can attach post-commit hooks to your sub-repos so that modifying code inside module1 silently updates the global graph.json layout.

    Context Preservation: When you ask, "How does updating the authentication model in module1 affect the frontend?", the AI doesn't just search the frontend file text. It tracks the call-graph edges mapped out by Graphify from modules/module1/ straight into frontend/src/.

  2. OxCom commented on Sep 25, 2026

    @OxCom

    I have some not ideal solution, however it works for me: mesh
    Idea is quite simple: the solution is wrapper on existing graphify repositories and provides own mcp that use graphify to query multiple repositories that are registered in configuration file. The agent could work with specific repositories by using ID of it and do cross project requests. It does not change the initial graphify structure and works on top of it.

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