Repository navigation
🧹 chore: commit the graphify code graph - #110
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #110 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 12 12
Lines 290 290
=========================================
Hits 290 290 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Track graphify-out/graph.json, rebuild it with a pinned graphify-update commit hook, and tell contributors and agents it exists. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
b85adce to
69fff90
Compare
There was a problem hiding this comment.
🟡 Changes recommended
The change still has an unresolved critical cross-platform pre-commit hook issue (entry: env ... will break on Windows despite CI running windows-latest), alongside a minor documentation typo in AGENTS.md.
2 open issues
What changed in this PR
Adds a committed Graphify code graph and supporting contributor/automation scaffolding so humans and coding agents can query repository structure without grepping.
Changes:
- Commit
graphify-out/graph.jsonand configure Git attributes/ignore rules to treat it as generated and mergeable. - Add a
graphify-updatepre-commit hook (plus nox/CI adjustments) and a scheduled GitHub Actions workflow to detect drift and open a PR. - Document usage and contributor setup in
AGENTS.md,.github/CONTRIBUTING.md, andREADME.md.
| File | Description |
|---|---|
| README.md | Adds a pointer for contributors/agents to the code-graph docs. |
| noxfile.py | Skips graphify-update during the nox “precommit” session run. |
| graphify-out/graph.json | Adds the committed Graphify graph snapshot. |
| AGENTS.md | New agent-facing instructions for using the committed graph. |
| .pre-commit-config.yaml | Adds/updates hooks and introduces the local graphify-update hook. |
| .graphifyignore | Limits Graphify indexing scope to src/. |
| .gitignore | Ignores all graphify-out/* except the tracked graph.json. |
| .github/workflows/graphify.yml | Adds a scheduled/manual drift-check workflow that opens a PR on change. |
| .github/CONTRIBUTING.md | Documents the graph, rebuild behavior, and merge-driver setup. |
| .gitattributes | Marks the graph as generated, disables diffs, and assigns a merge driver. |
Review effort: Lite
Copilot was unable to complete this review at the selected tier due to model policy or plan restrictions.
…S.md run-on Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… are not indexed Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The graph's communities differ on 3.11, so both must build with the same Python. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>


Commits the graphify code graph (
graphify-out/graph.json, 203 nodes, 190 KB) so every clone and every coding agent can query the repository instead of grepping it. Extraction is local tree-sitter parsing, with no model call and no network.What this adds
.graphifyignorelimits the index to the package source undersrc/; tests, benchmarks, docs, CI, config and Markdown are all out..gitignoretracksgraph.jsonand nothing else ingraphify-out/, and.gitattributesmarks it generated and keeps it out of diffs.graphify-updatehook in.pre-commit-config.yaml, pinned tographifyy==0.9.119with no extras. It runsgraphify update . --forceon every commit, including commits that only delete files. Like a formatter, it rebuilds and fails; stagegraph.jsonand commit again. The hook is skipped for pre-commit.ci (ci.skip) and for theprecommitnox session behind the requiredFormatcheck, because the graph is not byte-reproducible across platforms. The existingno-commit-to-branchskip is kept.graph.jsonis excluded fromcheck-added-large-files,end-of-file-fixer,prettierandcodespell..github/workflows/graphify.ymlrebuilds on Mondays (and on demand) and opens one pull request if the graph moved. It never pushes tomain, and it usessign-commits: trueto satisfy the signed-commits ruleset.AGENTS.mdcarrying the agent rules for the graph, a "The code graph" section in.github/CONTRIBUTING.md, and a one-line pointer in the README. There is no docs site, so no docs page.Needs a maintainer
mainrequires the "Milestone Check", which is pending with "Please set the milestone!". I did not pick one (open:v0.9.x,v0.10.0). The drift job picks the newest open milestone for its own pull requests, for the same reason..github/is covered by CODEOWNERS.Run benchmarksfails with CodSpeed'sUnsupported system, before any benchmark runs. This PR touches neither the workflow norbenchmarks/, and the check is not required.The drift job mints a GitHub App token from the secrets
GRAPHIFY_APP_IDandGRAPHIFY_APP_PRIVATE_KEY, which do not exist yet.github.tokenis read-only here and Actions may not open pull requests, and the repository has no other bot-PR credential. Until the App is created, the weekly run fails at the token step. That is deliberate and commented in the workflow.Each clone also needs a one-time merge-driver setup (git will not take a merge-driver command from a tracked file); it is in the CONTRIBUTING section.
Checked
graph.json(sha256e1cca85b…); the committed file is that one.src/).graph.jsoncleanly with the driver registered and conflicts without it.graphify querywith no build step.nox -s precommit(theFormatjob's command) leaves the graph untouched andcheck-useless-excludespasses.main.🤖 Generated with Claude Code
The hook and the drift job both build with Python 3.12: the graph's communities differ on 3.11, so the repository's 3.11 floor is the wrong pin. The graph covers
src/only, so it cannot say which tests cover a symbol; CONTRIBUTING and AGENTS.md say so.