graphify icon indicating copy to clipboard operation
graphify copied to clipboard

Should `.github` AI configuration files be included in knowledge graphs?

Open mvanderbend-msoft opened this issue 6 months ago • 1 comments

Context

I'm using graphify to generate knowledge graphs for repositories that contain GitHub Copilot / VS Code configuration in .github/. Currently, graphify's detect() function skips hidden directories (starting with .), which excludes the entire .github/ directory.

The Issue

Modern repositories often contain AI agent configuration in .github/:

  • .github/copilot-instructions.md - Root AI agent instructions
  • .github/instructions/*.instructions.md - Scoped instructions
  • .github/agents/*.agent.md - Custom agent definitions
  • .github/skills/*/SKILL.md - Executable workflow skills

These files represent how AI agents interact with the codebase. Without them, the knowledge graph shows what the code is but not how AI should work with it.

The Question

Should graphify include .github AI configuration files in knowledge graphs?

Options

A) Code + Docs Only (Current Behavior)

  • Clean separation: focus on application logic
  • Avoids GitHub workflow noise (Actions YAML, PR templates, etc.)

B) Code + Docs + AI Configuration

  • Complete picture: technical + AI interaction layers
  • May include irrelevant GitHub workflow files

C) Configurable Inclusion Add a filter option to detect():

detect(
    root=".",
    include_hidden_dirs=[".github"],
)

Use Case

I ran graphify on a Java REST API repository:

  • 8 code files (Java + PowerShell)
  • 6 document files (YAML, Markdown, HTML)
  • 9+ .github AI configuration files (excluded)

The graph correctly identified handler classes and build scripts, but completely missed the custom agents and instruction files that define how AI should work with this repository.

Request

Could you clarify the intended scope of graphify knowledge graphs? If AI configuration is out of scope, is there a recommended workaround? If it's within scope, I'd be happy to contribute a PR for configurable hidden directory inclusion.

mvanderbend-msoft avatar May 03 '26 15:05 mvanderbend-msoft

This is already supported via .graphifyinclude — create a .graphifyinclude file in your project root to opt specific hidden paths into traversal:\n\n\n.github/copilot-instructions.md\n.github/instructions/**\n.github/agents/**\n\n\nHidden directories are skipped by default to avoid GitHub Actions noise (YAML workflows, PR templates etc.) — the allowlist lets you pull in exactly the AI config files you want without including everything.

safishamsi avatar May 03 '26 16:05 safishamsi