Repository navigation
docs: add .codegraph/basics.md as the org-standard agent entry point - #2381
Merged
Merged
Conversation
Every Optave repo is getting a committed .codegraph/basics.md that agents read to orient before touching unfamiliar code. This adds ours. The .gitignore rule must ignore the directory *contents* (.codegraph/*), not the directory (.codegraph/) — git refuses to descend into an ignored directory, which silently voids the !.codegraph/basics.md negation. Verified empirically. basics.md records verified numbers from a full self-build on 3.16.0 (1037 files, 21770 nodes, 44877 edges, 2 file-level cycles, quality 87/100) and flags that the -T dead-code figure is inflated ~3x by test fixtures (#2256).
Contributor
Greptile SummaryAdds the organization-standard Codegraph entry point and links it from the repository guidance.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Important Files Changed
Reviews (3): Last reviewed commit: "Merge branch 'main' into docs/codegraph-..." | Re-trigger Greptile |
The stats 'coupling hotspots' fan-out conflates intra-file containment with cross-file coupling: src/types.ts reports fan-out 1322 against 1323 symbols declared in that file. codegraph map reports 0 outbound for the same file. Swap the table to map-derived numbers and warn against substituting the stats figure, since the two commands use similar labels for different metrics.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
What
Adds
.codegraph/basics.mdto this repo — the committed, agent-facing entry point that Optave's organization instructions tell every agent to look for. This is the reference implementation; 14 other Optave repos are getting the same file in parallel, and therepo-foundrybootstrap kit is being updated so new repos get it by default.Why the
.gitignorechange matters.codegraph/was ignored wholesale. To commitbasics.mdwhile keeping the graph DB local, the rule must ignore the directory contents:.codegraph/(trailing slash) ignores the directory, and git then refuses to descend into it — which silently voids the negation. Verified empirically before writing this; the comment in.gitignorerecords it so nobody "simplifies" it back.Note that
git check-ignore -v .codegraph/basics.mdexits 0 on the correct config, because the negation pattern counts as a match.git status --porcelain -uallis the check that actually tells you.Contents
basics.mdrecords verified numbers from a full self-build on codegraph 3.16.0 — nothing estimated:It also flags two things that would otherwise mislead a reader:
-Tdead-code count is inflated ~3x. 431 of the 647-Tsymbols are hand-authored parser fixtures undertests/benchmarks/resolution/fixtures/, which-Tdoes not exclude. Real figure is ~216. Tracked in roles --role dead -T: hand-authored test fixture directories aren't excluded, causing reachability noise #2256, where I've added the detail that the predicate is defined in three places that must move together — the issue body named only two.src/.CLAUDE.mdgets a pointer to the new file at the top of the existing Codegraph Workflow section rather than a duplicate command list, so the two can't drift.