AGENTS.md instructions for /Users/thomi/Projects/entire-graph
This repository is Entire Graph (entire-graph), an Entire CLI plugin that
provides entity-level checkpoint context and a local-only semantic provider.
The binary is invoked through Entire as entire graph <command>.
The plugin manifest (entire-plugin.yml) registers the subcommand name
graph, so users type entire graph ....
The project was previously named entire-sem; do not reintroduce the old
name. References to Entire Brain (entire-brain) are intentional — that
is the separate downstream consumer that owns persistence, indexing, and
query, not an old name for this project.
Build, Test, Lint
Tasks are defined in mise.toml:
sh
mise run build # go build -o entire-graph ./cmd/entire-graph
mise run test # go test ./...
mise run test:ci # go test -race ./...
mise run fmt # gofmt -s -w .
mise run vet # go vet ./...
mise run check # fmt + vet + race tests + build
CI (.github/workflows/test.yml) runs vet, gofmt checks, build, and tests on
Linux, macOS, and Windows with Go 1.24. Building requires CGO because
tree-sitter grammars are native.
Using the plugin from an agent session
entire graph search --repo . --query "..." — ranked source regions with
bounded snippets (16 KiB serialized context budget by default). Reads the
working tree by default so dirty edits are visible; --head switches to
committed-tree semantics.
entire graph commit HEAD --json / entire graph diff --base A --head B --json —
entity-level semantic diff for judging whether a change is safe to keep.
entire graph checkpoint <id> --json — resolves the commit carrying an
Entire-Checkpoint: <id> trailer and diffs it against its first parent.
entire graph snapshot|symbols|edges --repo . --format ndjson — streamed
machine-readable graph records (schema 1.x, frozen GA contract; see
docs/adr/0001-ga-schema-contract.md).
entire graph capabilities --json / entire graph doctor --json — feature
detection and environment verification. All commands are local-only:
no network egress, no hosted model calls, no telemetry.
This repository also configures agent harnesses directly: .claude/settings.json
and .codex/ wire Entire session hooks into Claude Code and Codex, and both
define an entire-search subagent for checkpoint history search via
entire search --json.
Repository layout
cmd/entire-graph/ — thin main; all logic lives in internal/.
internal/cli/ — hand-rolled command dispatch and flag parsing (no CLI
framework by design). Keep new commands consistent with this style.
internal/sem/ — tree-sitter parsing, provider snapshots, semantic diff,
and hybrid search. This is the only package that should know about grammars.
internal/bench/, cmd/graph-bench/, bench/ — pinned-corpus benchmark
harness with throughput and RSS guardrails.
docs/ — provider requirements, v2 roadmap, language support matrix,
benchmarks, and the GA schema ADR.
Contract rules that agents must not break
Schema 1.x is a frozen GA contract: minor versions are additive-only;
breaking wire-format changes require a major bump (docs/adr/0001-ga-schema-contract.md).
The provider is no-egress: never add code that fetches remote sources,
calls hosted APIs, uploads telemetry, or downloads grammars at runtime.
compound-v1 symbol IDs must remain stable across ordinary body and
signature edits.
Unsupported or unparseable files must surface as machine-readable partial
failures, never silent drops.
Inventory-only languages must not be presented as semantically parsed
(docs/language-support.md).
I’m using the GitHub workflow to enumerate every open PR, inspect each diff and its checks, then I’ll report only actionable review findings (or explicitly say when a PR is clean). I’ll parallelize the code review once I know the PR set.
Assistant
There are six open PRs: #36–#40 plus the much larger #43. I’m splitting the independent reviews across agents now; no branches or files will be changed, and I’ll also verify current CI/status and synthesize duplicate or interacting findings across PRs.
Assistant
The six PR heads are all currently clean/mergeable and all seven CI jobs pass on each. I’ve found one credible semantic-diff edge case in #37 and am validating it against the repository’s duplicate-symbol model while the parallel reviews continue, especially the cache/provenance-heavy #43.
Assistant
The largest PR (#43) has several merge-blocking correctness gaps despite green CI: cache presence can change full-profile search results, and same-file overloads cannot be disambiguated in the new neighbors command. I’m finishing the adversarial checks around TypeScript call resolution, mirror deduplication, and the documented byte-budget contract before I consolidate the review.
Assistant
Reviewed all six open PRs. All are currently mergeable and have 7/7 passing checks, but I found 13 actionable issues.
[P1] Cached full snapshots change search results. A warm cache can introduce cross-file graph candidates absent from the equivalent cold search, contradicting the documented result-set parity guarantee. search.go:350
[P1] Same-file overloads cannot be selected in neighbors. Name, qualified name, and file are identical for overloads; there is no ID, signature, or line selector to resolve the ambiguity. neighbors.go:337
[P1] Cache identity omits the repository key. Adding or changing an origin without changing HEAD can return cached local/... compound IDs instead of the new gh/... IDs. Include and validate RepoKey. search_cache.go:475
[P2] --max-context-bytes 0 now fails. Zero is documented and previously supported as an unbounded context budget. search.go:552
[P2] Non-call relations are labeled “Callers” and “Callees.”EXTENDS, IMPLEMENTS, and IMPORTS output becomes semantically misleading. neighbors.go:648
[P2] TypeScript receiver calls can produce false inheritance edges. An unresolved call such as client.retry() inside a subclass can incorrectly resolve to Base.retry() without proving that client is or related to the inheritance chain.
I’m using the GitHub workflow to recheck #38–#40, merge them in order, and verify each merge landed cleanly.
Assistant
The three PRs are still open, non-draft, mergeable, and each has all seven checks passing. I’m confirming the repository’s merge convention before applying the merges.
Assistant
The current convention is squash merging, so I’m squash-merging exactly PRs #38, #39, and #40, pinned to the reviewed head SHAs.
Assistant
The connected GitHub app can inspect these PRs but lacks merge permission. I’m falling back to the authenticated GitHub CLI for the same pinned squash merges; no branches will be deleted.
Assistant
#38 and #39 are merged. GitHub is recalculating #40 against the updated main; its seven checks remain green, and I’m waiting for the final mergeability result before merging it.
Assistant
Squash-merged all three PRs after confirming green checks:
I’m moving to PR #36 and will address the two review findings: Unicode-safe grep behavior and correct propagation of invalid/non-tree revisions. I’ll preserve any unrelated workspace changes, add focused regressions, then run the relevant and full test suites before updating the PR.
Assistant
Because this is follow-up work on review findings, the GitHub workflow routes me through its review-feedback process before I modify the PR branch.
Assistant
PR #36 has no unresolved inline threads. Its existing discussion considers the locale pin resolved, but our review exposed the regression that the global pin introduces in Unicode git grep, plus the remaining invalid-revision classification gap. I’m treating those two as the complete fix scope.
Assistant
The initial targeted test hit a local toolchain mismatch (go frontend 1.26.1 with 1.24.13 standard-library artifacts), so I’m switching verification to the repository’s pinned mise runtime before judging test results.
Assistant
Both regressions now have focused coverage, and the targeted package tests pass. The implementation also narrows missing-file classification to Git’s actual path diagnostics and preserves the child PWD, closing two adjacent false-classification/environment hazards discovered during the audit.
Assistant
The repository-wide mise run check is still in the full race-test phase. Formatting, vet, build, and the non-semantic packages have passed; the long internal/sem race suite is the remaining check.
Assistant
PR #36’s fix now passes the full repository check, including the complete race suite. I’m preparing one focused commit and pushing it to the existing PR branch; I won’t post comments or alter review-thread state.
Assistant
The full check finished successfully. I’m doing one final cross-platform review of the exact diff before committing, particularly around Git’s Windows diagnostics and locale availability, then I’ll update PR #36.
Assistant
The fix is committed as 7d5db0d and pushed to PR #36. I’m verifying GitHub accepted that exact head and watching the refreshed CI matrix before handing it off.
Assistant
GitHub has accepted the new head and the lint plus all three platform builds are green. The Linux, macOS, and Windows test jobs are still running.
Assistant
Six of seven hosted checks are green. Only the slower Windows test job remains pending; there are no failures so far.
Yes—moving to PR #37 now. I’ll address both overload-pairing failures, add regressions for duplicate insertion and removal-plus-signature-edit, run the full check, then update the existing PR branch.
Assistant
The GitHub review workflow is guiding this pass: I’m checking PR #37’s current review context first, then I’ll modify only its two semantic-diff pairing behaviors.
Assistant
The pairing logic now uses exact content classes for duplicates and only unambiguous cross-signature identity anchors before its compatibility fallback. The focused cases pass; I’m adding one parser-backed Java regression so the fix is validated against real fingerprints, not only hand-constructed entities.
Assistant
The adversarial review caught and I corrected two subtle follow-ups: exact signatures now outrank copied/swapped bodies, and fallback matching is linear rather than quadratic. Output sorting also has complete overload tie-breaks. The expanded focused suite is green; I’m running the race/full validation now.
Assistant
The full repository check is in its final race-test package. I’m waiting for that result, then I’ll commit and update PR #37 if everything stays green.
Assistant
The full mise run check passed, including race tests. I’m applying the repository’s GitHub publishing workflow now to make the commit scope explicit and push only these two reviewed files to the existing PR branch.
Assistant
Scope is clean: only the overload matcher and its tests changed, with no unrelated worktree edits. The full check and whitespace validation are green, so I’m committing those two files to the existing PR branch now.
Assistant
Commit e9c5b9c is clean and contains exactly the intended matcher/test changes. I’m pushing it to PR #37, then I’ll watch the hosted checks through completion.
Assistant
The push landed, but GitHub reports PR #37 is now conflicting because main advanced while we were fixing it—likely from the earlier merges. I’m checking the exact overlap and will integrate main without rewriting the PR branch, then rerun validation.
Assistant
The overlap is mechanical: both branches added independent tests at the same insertion point. The production code merged automatically. I’m preserving both test blocks, then I’ll rerun formatting and the full validation on the combined tree.
Assistant
The merge resolution now contains both suites, with no conflict markers or whitespace issues. I’m running the full repository check again against the combined PR #37 + current main tree before finalizing the merge commit.
Assistant
The combined tree passes mise run check, including race tests. I’m finalizing the non-rewriting merge commit and will push it, then GitHub should recompute mergeability and start the hosted matrix.
Assistant
PR #37 is conflict-free and mergeable again. All seven hosted jobs are queued; I’m watching them through completion and will inspect any failure rather than stopping at the first status change.
Assistant
Lint and all three platform builds have passed. The three race-test jobs are still running; locally the same combined suite is already green.
Assistant
Six of seven hosted checks are green. Only the Windows race-test job remains pending; it has not failed or emitted an error.
Assistant
The remaining Windows job is actively running go test ./...—it is not stuck in the queue. I’m continuing to wait for its terminal result.
I’m checking the live PR queue so I don’t rely on the earlier snapshot. I’m using the GitHub orientation workflow to identify the next open PR and its current state.
Before that, #36 and #37 are both fixed, green, and mergeable—but still open. Recommended order: merge #36, merge #37, then tackle #43.
User
Make it so
Assistant
I’ll merge #36 and #37 in that order after one last live verification, then use the review-feedback workflow on #43 to inspect and implement any required fixes. I’m loading the GitHub merge and review procedures first so the external changes stay scoped.
Assistant
PR #36 is the exact reviewed head (7d5db0d), clean, mergeable, and 7/7 green. I’m squash-merging that PR now; I’m leaving its branch intact.
Assistant
PR #36 merged as d6e7f65. GitHub briefly returned “unknown” while recomputing #37 against the new base; I’m waiting for the definitive mergeability result before issuing its merge.
Assistant
PR #37 has recomputed clean against the newly advanced main; the reviewed head is unchanged and all seven checks remain green. I’m squash-merging #37 now.
Assistant
Both completed fixes are now merged: #36 as d6e7f65 and #37 as d7204db. I’m moving onto PR #43 now, starting with connector metadata, its changed-file list, and the complete review conversation before touching the branch.
Assistant
PR #43 is a much larger change set (27 files) and GitHub currently reports it conflicting with main. I’m checking out its exact head, then I’ll run the thread-aware comment audit and parallel code reviews across retrieval/cache, CLI behavior, and parser/protobuf changes before resolving the integration.
Assistant
The only review thread on #43 is already fixed at the current head: both tests are independently registered and pass when run together. I’m leaving the unresolved GitHub thread untouched, per review-write safety. While the parallel audit continues, I’m running the exact-head full check to establish a clean baseline before integrating main.
Assistant
The exact PR #43 head passes the full local check. The integration audit found one mechanical conflict only: both branches added independent gitutil tests at the same location. Production code auto-merges cleanly, including #36’s error classification and #38–#40/#37’s semantic fixes. I’m waiting for the two feature-area audits before applying that preserve-both resolution.
Assistant
The audit found several real merge blockers beyond the stale thread: cache-dependent search results, malformed proto3 being silently accepted, unstable nested-enum IDs, two TypeScript false/misresolved call edges, an unreachable overload in neighbors, the documented zero-byte budget regression, and one nondeterministic search tie. I’m integrating current main first, then I’ll patch each with a focused regression test.
Assistant
I’m carrying #43 through the finish line now: resolve the mainline integration, apply the review fixes, run the full Go check, then push and merge only if GitHub is fully green. I’ll leave the existing review thread untouched.
Assistant
The source conflict itself is resolved. The sandbox refused the bookkeeping write to Git’s index because its approval service hit a usage limit, so I’m continuing with the safe workspace edits and tests; I’ll return to the Git operation once the implementation is complete. I’ve split the independent parser, call-graph, and retrieval fixes so they can be hardened in parallel.
Assistant
The neighbor fix is in and its focused tests pass: exact stable symbol IDs now select a single overload, and ambiguity output exposes copyable IDs. The integration conflict’s combined Git tests also pass; the three deeper audits are still implementing their regression cases.
Assistant
Before any publish step, I’m applying the GitHub publishing skill’s scope and verification checks. It won’t alter the review thread; it governs the eventual commit/push handoff for the existing PR.
Assistant
The cache/parser patches are complete and their package suites pass. I also updated the neighbor help/README so overload disambiguation is discoverable, and added coverage proving --file still constrains exact-ID lookups. One TypeScript resolver patch and two adversarial cross-checks remain before the full race-tested build.
Assistant
The second-pass review caught two real edge cases before publish: valid single-quoted/hex proto2 syntax, and a late-cache race that could reintroduce full-graph expansion. Both now have dedicated owners and regression tests in progress. The intended warm-search recall behavior stays intact; I tightened the README to distinguish that from graph-scope correctness.
Assistant
The last TypeScript adversarial pass found three namespace corner cases—nested-relative calls, compact same-line declarations, and receiver shadowing. I’m fixing those without changing emitted symbol identities; after that, the only remaining local step is the repository’s full fmt + vet + race tests + build gate.
Assistant
The final namespace patch is taking longer because it has to distinguish declarations by byte position while keeping the public symbol schema and stable IDs untouched. I’m giving that precision work room to finish; everything else is already locally green.
Assistant
The adversarial snapshot exposed a release-blocking precision bug in compact one-line namespaces: line-based symbol blocks can invent callers and even choose the wrong overload. I’m replacing the heuristic with internal byte ranges (persisted only in the private cache, never the public schema) and narrowing shadow handling to lexical-safe cases. This is the final substantive correction before the full gate.
Assistant
The final TypeScript namespace hardening is in flight. Once it lands, I’ll run the full Go 1.24 check and report the one remaining publish constraint separately from code quality.
Assistant
The focused namespace and cache regressions are green, including same-line declarations, nested scopes, shadowed receivers, and cache round-tripping. The broader semantic suite and an independent range-propagation audit are running now.
Assistant
The semantic suite is green after the final scope correction. I’m starting the repository’s full release gate now: formatting, vet, race tests, and build across the Go 1.24 toolchain.
Assistant
Formatting, build, CLI, git utilities, and benchmark packages have passed. The race-enabled semantic package is the only long-running leg still underway; the compiler warnings shown so far are the repository’s native tree-sitter/macOS linker warnings, not test failures.
Assistant
The release gate passed, but the independent audit caught two real cache/range edge cases before publication: repository identity could stale-hit a full preindex after a remote rename, and synthetic/GraphQL same-line symbols could inherit sibling calls. I’m fixing those now and will rerun the gate; this is exactly the sort of last-mile defect worth catching locally.
Assistant
The remaining hardening now covers profile parity and real TypeScript semantics, not just the original happy path: inherited captures, function-scoped var, object/array destructuring, declaration merging, cached private metadata, and exact GraphQL/tool attribution. The cache identity fix is also implemented; focused reruns are finishing before the final full gate.
Assistant
All focused regressions and the full semantic package now pass with the audit fixes. I’m rerunning the complete release gate one final time on the settled tree; after that, only Git bookkeeping/publishing remains.
Assistant
The final gate is clean through format, vet, build, CLI, git utilities, and benchmarks. The race-enabled semantic run is still progressing; the independent audit is now clean with every reported reproducer verified.
Assistant
PR #43 is fully fixed and validated locally on codex/improve-search-retrieval.
Main merged; source conflict resolved.
Retrieval, cache identity, protobuf, neighbors, and TypeScript edge cases fixed.
mise run check passes: format, vet, race tests, and build.
Independent audit found no remaining release blockers.
Publishing is blocked only because the approval reviewer rejected the required Git index write (git add). Reply “retry publish” to authorize another attempt; I’ll stage, commit, push, verify CI, and squash-merge #43.
User
<environment_context>
<current_date>2026-07-21</current_date>
America/New_York
<workspace_roots>/Users/thomi/Projects/entire-graph/Users/thomi/.codex/visualizations/2026/07/20/019f80ed-65ac-7eb3-9c28-9885c0fbca91</workspace_roots><permission_profile type="managed"><file_system type="restricted">:root/Users/thomi/Projects/entire-graph/Users/thomi/.codex/visualizations/2026/07/20/019f80ed-65ac-7eb3-9c28-9885c0fbca91:slash_tmp:tmpdir/Users/thomi/Projects/entire-graph/.git/Users/thomi/.codex/visualizations/2026/07/20/019f80ed-65ac-7eb3-9c28-9885c0fbca91/.git/Users/thomi/Projects/entire-graph/.agents/Users/thomi/.codex/visualizations/2026/07/20/019f80ed-65ac-7eb3-9c28-9885c0fbca91/.agents/Users/thomi/Projects/entire-graph/.codex/Users/thomi/.codex/visualizations/2026/07/20/019f80ed-65ac-7eb3-9c28-9885c0fbca91/.codex</file_system></permission_profile>
- byte_range_audit: Volta
- namespace_bytes: Pasteur
- repo_key_cache_fix: Newton
</environment_context>
[P2] Mirror dedup can collapse distinct sibling services. Layouts such as services/api and services/worker are not recognized as separate monorepo units, so identical source/build fingerprints may cause one service’s result to disappear. search_mirror_dedup.go:117
[P2] Full-profile cache identity omits repository history state. Deepening or unshallowing a clone at the same HEAD leaves cached FILE_CHANGES_WITH relationships stale. search_cache.go:478
[P2] A missing option file hashes identically to a file containing missing. Deleting such an ignore/include file can reuse the previous cache and bypass the expected required-file error. search_cache.go:498
[P2] Forcing LC_ALL=C breaks Unicode case-insensitive grep. Worktree search preselection can omit valid Unicode case-folded matches in large repositories. Preserve LC_CTYPE for grep or constrain locale changes to error-message classification. git.go:124 and git.go:462
[P2] Invalid full object IDs and blob revisions can still be reported as absent files. Validate that rev^{tree} resolves before interpreting matching stderr as an ordinary missing path. git.go:296
[P2] Inserting an exact-signature duplicate causes phantom body changes. Occurrence-index pairing shifts every following duplicate. Match body hashes or fingerprints within each signature group first. analyze.go:431
[P2] Positional fallback mispairs simultaneous removal and signature edits. Survivors should be anchored through body/fingerprint similarity before remaining overloads are paired positionally. analyze.go:438
Recommendation: hold #36, #37, and #43 for changes; #38–#40 look ready based on this review. This was read-only—I did not submit or post GitHub reviews.