Repository navigation
Add AGENTS.md files with a CI-checked related_files header - #470
Closed
huangzesen wants to merge 2 commits into
Closed
huangzesen wants to merge 2 commits into
huangzesen wants to merge 2 commits into
Conversation
Adds agent-facing docs (AGENTS.md, read natively by Codex, Claude Code, Gemini CLI, Cursor, Copilot and others) for the repository root and idl/projects/themis, plus tooling that keeps them honest: - .github/scripts/check_agents_md.py and the agents_md workflow check that every AGENTS.md starts with a YAML header holding exactly related_files and maintenance. Malformed headers fail; missing paths, described but unlisted files, and one-way parent/child links only warn. The workflow also runs weekly after the mirror sync, because the mirror's own pushes don't trigger workflows. - .github/scripts/build_agents_map.py builds .agents/map/ (Mermaid MAP.md and graph.json) from the related_files headers. It is opt-in: the agents-map skill in .agents/skills/ tells agents to rebuild the map only after a human agrees. - mirror_bleeding_edge.yml now excludes AGENTS.md files and .agents/ from its rsync --delete, so the weekly sync keeps them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Superseded by #471, which includes these commits plus the AGENTS.md files for the whole tree. I've combined them into one PR so they can't conflict depending on which one is merged first, as happened in pyspedas (#1491/#1492). |
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.
What this adds
AGENTS.md files are the cross-tool place for coding-agent instructions; Codex, Claude Code, Gemini CLI, Cursor, Copilot and others read them. This PR adds two, plus CI that keeps them accurate. It follows the same pattern as spedas/pyspedas#1491.
AGENTS.mdcovers:idl/general/missions/andidl/projects/!PATH, duplicate file names, routines called by name from strings)@tplot_com)idl/projects/themis/AGENTS.mdis a pilot for one mission. It tracesthm_load_fgmthroughthm_load_xxx,spd_downloadandspd_cdf2tplot.Header rule
Every AGENTS.md starts with a YAML header with exactly two fields:
No folder has to have an AGENTS.md, but any that exists must have this header.
CI:
.github/workflows/agents_md.ymlIt runs
.github/scripts/check_agents_md.pyon every push and PR, and weekly an hour after the mirror sync. The mirror's own pushes useGITHUB_TOKEN, so they don't trigger workflows. The weekly run catches upstream renames that break a header.maintenanceor body.Change to the mirror workflow
mirror_bleeding_edge.ymlnow adds--exclude "AGENTS.md"and--exclude "/.agents/"to itsrsync --delete. Without them, the next sync would delete these files. Everything else underidl/is still replaced by the upstream snapshot as before. I checked this with a local rsync run.Opt-in map
.github/scripts/build_agents_map.pybuilds.agents/map/MAP.md(Mermaid diagrams, which GitHub renders) and.agents/map/graph.jsonfrom the headers. Nothing runs it automatically. The skill in.agents/skills/agents-map/SKILL.mdtells agents to rebuild the map only after a human agrees.Checking locally
These files exist only in the GitHub mirror; nothing changes in the upstream SVN repository.
🤖 Generated with Claude Code