gh-axi
AGENTS.md361 starsChanged 53 days agoMITView on GitHub
This file is the project's committed home for project-intrinsic agent knowledge: build, test, release, architecture, and sharp-edge notes that should travel with the code. Command behavior is owned by README.md. Contributor workflow, release-please, generated files, and implementation invariants are owned by CONTRIBUTING.md. Follow the section named below instead of restating it here. After a dependency change, run pnpm exec prettier --write pnpm-lock.yaml. Do not hand-edit skills/gh-axi/SKILL.md, CHANGELOG.md, or .release-please-manifest.json. CONTRIBUTING.md owns the no-mistakes path, release-please, paths-ignore, and the pinned require-no-mistakes…
- Installs packages
- Commits and pushes
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,700 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
The file
We split this AGENTS.md into the rules it gives an agent
7 rules. About 0 are common, 4 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 13
Do not pass a RepoContext into ghJson from gist or project.
- Very specific: line 14
Every *_FLAGS entry must appear in the matching flags{<sub>}: help section.
- Very specific: line 31
After a dependency change, run pnpm exec prettier --write pnpm-lock.yaml.
- Distinctive: line 40
Keep this file for knowledge useful to almost every future agent session in this project.
- Distinctive: line 41
Do not repeat what the codebase already shows.
- Distinctive: line 42
Prefer rewriting or pruning existing entries over appending new ones.
- Distinctive: line 43
When updating this file, preserve this bar for all agents and keep entries concise.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Project agent memory
This file is the project's committed home for project-intrinsic agent knowledge: build, test, release, architecture, and sharp-edge notes that should travel with the code.
Command behavior is owned by README.md. Contributor workflow, release-please, generated files, and implementation invariants are owned by CONTRIBUTING.md. Follow the section named below instead of restating it here.
- VISION.md is the product scope: parity with
ghthrough an AXI interface, and no GitHub capability thatghcannot provide. - The installable skill stays a stub that defers to the CLI. Never restate CLI-owned instructions in
src/skill.tsorskills/gh-axi/SKILL.md(README Development). gh-axi updateis the SDK built-in, not a local command.TOP_HELPinsrc/cli.tsis only a prefix of rendered--help(README Development).--hostnamecomes after the command and wins overGH_HOST. SetGH_HOSTfor the child only when the flag is present.resolveHost()is the host used when building or parsing URLs (README Global flags).- Secret values never appear in argv, stdout, or error text.
secret setis stdin-only, rejects--body/-b, and throws on an interactive TTY instead of waiting. Unknown secret flags are echoed by name only.secret listandvariable listhave no--limit. Variable values are not secrets (README Usage). - A malformed or unsupported secret scope is rejected, never silently falls back to repository scope (README Usage).
- Do not pass a
RepoContextintoghJsonfromgistorproject.gh projectis owner-scoped:--ownerdefaults to the repo owner, else@me(CONTRIBUTING.md Implementation invariants). - Every
*_FLAGSentry must appear in the matchingflags{<sub>}:help section. Matching is whole-token.UNDOCUMENTED_ON_PURPOSEis only for a flag that always fails. Mark a repeatable flag(repeatable)in help. - Repeatable flags must use
getAllFlagsortakeAllFlags.getFlagandtakeFlagkeep only the first value. Reject a dangling or blank value. - Mirror
gh's mutually exclusivepr mergeswitches locally, on the raw argv, before anyghcall. Reject--flag=valueon boolean merge switches the same way. mapGhErrorreturns on the first matching pattern, so a narrower pattern must sit ahead of a broader one.src/version.tsimports Node builtins only. Do not add a wall-clock timing assertion to the version fast-path test. Do not rebuild the shareddistfrom an individual suite (README Development).stackis a strict non-interactive adapter overgithub/gh-stack. Preserve stderr and the exactStackErrorexit code. Do not replaceghRawwithghExecormapGhError. Stack commands act only on the current working directory repo and never prompt (CONTRIBUTING.md Implementation invariants).--attachrequires gh >= 2.99.0. Live upload tests useGH_AXI_TEST_REPOset to a captain-owned test repo, never a product repo.
Development
pnpm install --frozen-lockfile
pnpm run build
pnpm test
pnpm run build:skillAfter a dependency change, run pnpm exec prettier --write pnpm-lock.yaml. Do not hand-edit skills/gh-axi/SKILL.md, CHANGELOG.md, or .release-please-manifest.json.
Release and the contribution gate
CONTRIBUTING.md owns the no-mistakes path, release-please, paths-ignore, and the pinned require-no-mistakes action. Human-authored PRs targeting main go through git push no-mistakes, not a direct push to origin.
The require-no-mistakes gate action is pinned to an immutable commit SHA, never @main (CONTRIBUTING.md Release and gate maintenance).
Maintaining this file
Keep this file for knowledge useful to almost every future agent session in this project. Do not repeat what the codebase already shows; point to the authoritative file or command instead. Prefer rewriting or pruning existing entries over appending new ones. When updating this file, preserve this bar for all agents and keep entries concise.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

