Rename the agent guidance to AGENTS.md and explain the Babel domain it assumes - #31
Merged
Conversation
AGENTS.md is the filename coding agents other than Claude Code look for, and the guidance in it was never Claude-specific. CLAUDE.md stays as a two-line pointer so Claude Code still finds it. Renamed first, before the rework that follows, so the substantive edits land in the final filename and read as edits rather than as a delete plus an add. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
AGENTS.md had grown to 396 lines by accretion, and ~90 of those were downloader invariants that an agent needs rarely but that sat above the orientation it needs every session. They move near-verbatim to docs/downloading.md — the wording is hard-won and each rule records a specific failure — with a four-sentence summary and a pointer left behind. Deduplicated the rest. The DuckDB spill was described in three places, the caching model in three, and the never-commit-the-internal-URL rule in three; each is now stated once, where it belongs, and referenced from elsewhere. "Important Notes" is deleted outright: all three bullets restated earlier sections. The command examples now point at README.md, which documents every flag and is the user-facing reference. Three factual corrections along the way: - MissingBabelFileError is raised on *any* 404, not only for `duckdb/` paths, as the file claimed in two places. downloader.py:546 has no path condition. - CI budgeting pointed only at #18; #28 now covers the same ground more precisely. - "recreated as #20-#24" predates #20 merging. README.md's configuration table was missing BABEL_ALLOW_VERSION_MISMATCH, which env.default has carried since #27. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
AGENTS.md described this repository's internals well and the system it belongs to not at all, so an agent reading the Concord.parquet query code had no model of the data. Add a Domain context section covering only the terms the code actually uses: clique, preferred identifier, concord, conflation, Biolink type, and NodeNorm's relationship to a specific Babel release. The section it earns most is the boundary between concords and cliques. Babel's own AGENTS.md says to answer clique-membership questions from a finished build "never from the concords that fed it" — and concords are exactly what this tool reads. That is not a bug: `xrefs` reports the evidence Babel read, which is what you want when a merge looks wrong, while NodeNorm reports the verdict. Written down so nobody "improves" xrefs into a clique oracle. Summarised with links rather than copied, so it cannot drift from upstream unnoticed — and the parts upstream does not document are marked as such. Neither Babel's README nor its releases/ARTIFACTS.md describes Concord.parquet, Identifiers.parquet or Metadata.parquet; the schema given here is what this repository's code assumes, verified against real files, and is labelled that way rather than presented as a published contract. Release naming, `latest` and VERSION.txt are undocumented upstream too. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This was referenced Sep 1, 2026
Capitalised filename, to match how documentation files are named here. Renamed in two steps because macOS is case-insensitive by default, so a direct `git mv` between names differing only in case is a no-op on the working tree. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
CLAUDE.md pointed at AGENTS.md with a Markdown link, which Claude Code does not follow — it would have to decide to go and read the file. A bare `@AGENTS.md` line is an import directive, so the content arrives without that step. The explanatory sentence says the line is a directive and must stay unquoted and outside any code span, since an import inside backticks or a fenced block is ignored and "tidying" it into a code span would silently stop the import working. Co-Authored-By: Claude Opus 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.
CLAUDE.mdhad grown to 396 lines by accretion — each hard-won rule from a review round appended wherever it fit. It was accurate about this repository's internals and silent about the system those internals exist to read: it never said what Babel is, what a clique or a concord is, or why NodeNorm's version matters. An agent arriving at theConcord.parquetquery code had no model of the data.This renames the file to
AGENTS.md, gives it that missing context, moves the deep caching invariants todocs/, and removes what was being said twice. Documentation only — no change tosrc/.What's here
Renamed to
AGENTS.md, the filename coding agents other than Claude Code look for; the guidance was never Claude-specific.CLAUDE.mdremains as a four-line pointer, so Claude Code still finds it. Four test docstrings that referenced the old name are updated. The rename is the first commit, so the substantive edits that follow read as edits rather than as a delete plus an add.A Domain context section covering only the terms this codebase actually uses — clique, preferred identifier, concord, conflation, Biolink type — and NodeNorm's relationship to a specific Babel release. It is a summary with links rather than copied upstream prose, so it cannot drift from upstream unnoticed.
The part that earns the most space is the boundary between concords and cliques. Babel's own
AGENTS.mdsays to answer clique-membership questions from a finished build "never from the concords that fed it" — and concords are exactly what this tool reads. That is not a defect, it is the purpose:xrefsreports the evidence Babel read, which is what you want when a merge looks wrong, while NodeNorm reports the verdict. Written down explicitly so that nobody later "improves"xrefsinto a clique oracle.The caching invariants moved to
docs/Downloading.md— near-verbatim, because the wording is hard-won and each rule records a specific failure that actually happened.AGENTS.mdkeeps a four-sentence summary and a pointer. That is ~90 lines an agent needs rarely, which had been sitting above the orientation it needs every session.Deduplication. The DuckDB spill directory was described in three places, the caching model in three, and the never-commit-the-internal-URL rule in three. Each is now stated once, where it belongs.
## Important Notesis deleted outright — all three of its bullets restated earlier sections. The command examples now point atREADME.md, which documents every flag and is the user-facing reference.Four factual corrections:
MissingBabelFileErroris raised on any 404, not only forduckdb/paths, as the file claimed in two places.downloader.py:546has no path condition.README.md's configuration table was missingBABEL_ALLOW_VERSION_MISMATCH, whichenv.defaulthas carried since Skip absent test dependencies, and stop unit runs deleting the integration cache #27.What upstream does not document
Worth recording, because it shaped what could honestly be written. Neither Babel's
README.mdnor itsreleases/ARTIFACTS.mddescribesConcord.parquet,Identifiers.parquetorMetadata.parquet.conflate/drug_chemical_conflateand the/statusbabel_versionfield are absent from NodeNormalization's README.So the file schema in the new section is what this repository's code assumes, verified against real files — and it is labelled that way rather than presented as a published contract. Release naming,
latestandVERSION.txtare undocumented upstream too. Filed upstream as NCATSTranslator/Babel#1077, which links back to the Domain context section as the shortest statement of what is missing.What it deliberately does not do
search-xrefs— that is Add search-xrefs command with OLS4 and MyChem.info providers #21, not onmain.docs/— those are context an agent needs often, and spreading them costs more than the length saves.Verification
272 unit tests pass and ruff is clean (no source changes, so both should be unchanged). Every relative link and intra-file anchor in
AGENTS.md,docs/Downloading.mdandCLAUDE.mdresolves, no.pyfile still referencesCLAUDE.md, and the symbols the reworked text names were re-checked against the code.Nothing is blocking this merge.
One thing to judge:
AGENTS.mdis 370 lines, down from 396, with a further 84 indocs/. Total documentation went up, because the Domain context section came out at 61 lines rather than the ~25 originally scoped. The extra went on the concord/clique boundary above. If that reads as too much for an agent file, the obvious trim is## Testing(73 lines, now the largest section).