Repository navigation
Conversation
…de graph and Obsidian vault Adds tools/codegraph: Python 3.9+ stdlib scripts that project every commit into a graph (package, targets, products, files, types, functions, framework imports, API probe sites), diff each against its first parent, and fold the deltas into a HEAD projection. Writes dependency matrices (modules, files, types; Markdown + CSV), a CycloneDX SBOM, and a gitignored Obsidian vault with one note per node and per commit. Language-specific code sits behind an adapter boundary (Swift + SwiftPM first); everything repo-specific is in codegraph.config.json. Verified: fold law holds on all 129 commits; byte-identical output across PYTHONHASHSEED 0/12345/random and across Python 3.9.25 and 3.13; a rerun writes nothing; 14 unit and end-to-end tests pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review findings verified against the graph, the code and numeric replicas. Corrects the earlier circuit review's claim that the hashValue schema hash fires T5 on every load: nothing reads the hash today, so the bug is latent. Appends the gitignored-vault decision to DECISIONS.md and documents the function-reference resolution gap in the codegraph README. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before: there was no repeatable way to see the codebase as a graph, or to replay how it changed. Review findings rested on reading files by hand, and an earlier circuit review overstated one bug.
After:
python3 tools/codegraph/codegraph.py --repo . --out codegraph-vaultwalks every commit and builds a graph of files, types, functions, imports, conformances, references and calls. It writes an Obsidian vault with a note per node and per commit, type, file and module matrices (Markdown plus CSV), a CycloneDX SBOM, and a graph-grounded findings page. Running it twice gives byte-identical output, and the current state equals a fold of the per-commit deltas over the log.The vault is derived output, so it is gitignored. Only the generator, its config, its tests and the review are committed (decision appended to DECISIONS.md).
How: Python 3.7+ stdlib only, no network. It reads git objects (ls-tree, cat-file) and never the working tree. Swift parsing and the SwiftPM manifest live behind an adapter (
cgcore/adapters), and all repo-specific settings are incodegraph.config.json.verify_determinism.pychecks hash-seed independence, idempotence, a clean copy of the committed generator, and the fold law for every commit.Proof (run on 61347c4):
python3 -m unittest discover -s tools/codegraph/tests: 14 tests OKpython3 tools/codegraph/verify_determinism.py: hash-seed independence (846 files), idempotence (written 0), clean copy identical, fold law 132/132 with mainline fold of 114 deltas == HEADReview:
docs/review/codegraph-review_v1.0.0_2026-11-27.md. It corrects the earlier claim that thehashValueschema hash fires T5 on every load (nothing reads the hash today, so it's latent). It also finds thatwidenUncertaintylowers the variance of the uninformed prior, that the 0.15 instability threshold and the mean-collapse test can't be reached, and that the circuit's outputs aren't wired into the weights yet.No Swift sources change, so the macOS build and tests are unaffected.
Generated by Claude Code