compact-adviser
AGENTS.md227 starsChanged 56 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.
- Reads credentials
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.
In this repository3 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- codex-adapterSkill
- judge-evaluationSkill
The file
We split this AGENTS.md into the rules it gives an agent
6 rules. About 0 are common, 4 are distinctive, and 2 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.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 10
Every package README is generated from the root README.md.
- Very specific: line 15
Do not hand-edit CHANGELOG.md or .release-please-manifest.json.
- Distinctive: line 19
Keep this file for knowledge useful to almost every future agent session in this project.
- Distinctive: line 20
Do not repeat what the codebase already shows.
- Distinctive: line 21
Prefer rewriting or pruning existing entries over appending new ones.
- Distinctive: line 22
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.
VISION.mdat the repo root is the project's acceptance policy: what this product owns, what it refuses, and the accept/resist tests a change is measured against. Read it before proposing a feature or a policy change.- The judge question set,
score(),floorFor()and theTYPESAFE_BASEresolvertypesafeEndpoint()(https for any host, http only for 127.0.0.1,[::1]or localhost) must stay byte-identical acrosspackages/pi-extension/src/judge.ts,packages/claude-mod/lib/judge.ts,packages/codex-plugin/src/judge.ts, andpackages/grok-plugin/lib/judge.ts; the TypeSafe request/response log line builders in each package'slog.tsmust match, as must thecooldownReasongates in each package'sstate.ts, the redaction helpers incontext.ts/snapshot.ts,disable.ts, and the judge-profile parser inprofile.ts.packages/pi-extension/test/lockstep.test.tsandtest/profile.test.tsenforce all of it across every host package. Tune every copy or none. shellWrittenPaths()— the conservative parser that recognises files written through shell redirection,tee, and in-placesedfor thesavedArtifactslimb — is another byte-identical quad copy:packages/pi-extension/src/context.ts,packages/claude-mod/lib/snapshot.ts,packages/codex-plugin/src/rollout.ts,packages/grok-plugin/lib/snapshot.ts; lockstep.test.ts compares its outputs. Only the host wiring differs: pi watches tool namebash, ClaudeBash, Grokrun_terminal_command, Codexshell/local_shell/unified_execplus theexecprogram wrapper, whose input is aconst r = await tools.exec_command({cmd: "...", ...}); text(r.output);program the recognised-shape parser in rollout.ts reads the shell line out of (all extracted in rollout.ts into the tool use'spaths, with the codex snapshot'sWRITE_TOOLSlisting those names). A Codex host contributes shell-written artifacts only when it emits one of those names, and anexecprogram beyond that one shape still yields nothing.- Claude Code
$.env.gettakes a literal variable name, never a constant, and every name it reads must also be listed inpackages/claude-mod/scripts/validate.mjs(claude plugin validate --strictcompares them). - Claude Code hooks cannot
import "node:fs"and the plugin-test isolate has noprocess;$.fs.writereplaces the whole file, so Claude writes one jsonl per session (~/.claude/compact-adviser-requests-<sessionId>.jsonl). Pi TypeSafe jsonl writes useappendFileSync(O_APPEND) inpackages/pi-extension/src/log.ts. - Every package README is generated from the root
README.md; never hand-edit them. See "Package READMEs" inCONTRIBUTING.mdfor the mechanism (scripts/generate-package-readme.mjs,npm run sync-readmes, and the drift checks in each package'scheck). - CI:
.github/workflows/ci.ymlruns acheck-*and ane2e-*job per host package on push/PR. Pin every host binary in.github/host-versions.env. - Grok host facts, measured against 1.0.34 and asserted by
packages/grok-plugin/scripts/live-e2e.mjs: Grok lists a plugin'shooks/hooks.jsonbut never loads it into a session, socompact-adviser installregisters the same handlers in${GROK_HOME:-~/.grok}/hooks/; the status row is the only hint surface and only the user's ownconfig.tomlcan enable it;signals.jsonfield names are undocumented, so unreadable usage takes the strictest floor. The e2e drives the realgrok agent … stdiooffline through--xai-api-base-urlplusXAI_API_KEY, answering the OpenAI Responses API shape.lastPromptIdskips a later serial Stop of the same turn but is not an atomic claim, so concurrent plugin+user-hook starts can both ask TypeSafe; follow up with a session-state claim only if Grok starts loading plugin hooks (live-e2e would then seehook_countabove 6). packages/grok-pluginships as TypeScript with no build step and no dependencies: Node's own type stripping runs it, so nothing there may use non-erasable syntax (no enums, no constructor parameter properties).- Release: release-please at repo root with extra-files version bumps;
npm publish --access public --provenancefrompackages/pi-extensionvia GitHub OIDC. NoNPM_TOKEN. SeeCONTRIBUTING.md. - Do not hand-edit
CHANGELOG.mdor.release-please-manifest.json.
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.

