stacklit
AGENTS.md131 starsChanged 7 days agoMITView on GitHub
Guide for agents and people working on the Stacklit repo itself. If you only want to use Stacklit on your own project, read README.md and docs/INSTALL.md. A Go CLI that indexes a codebase into stacklit.json (modules, exports, dependency edges, hints) plus a symbol graph, and serves it over MCP. Deterministic, no LLM, no network calls from the CLI. Module path github.com/glincker/stacklit, Go version from go.mod. CI runs vet and tests on Linux, macOS and Windows. Node is only needed for…
- 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,439 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, 2 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 38
Commit subjects: <type>: <description> with type one of feat, fix, perf, refactor, docs, test, chore.
- Distinctive: line 39
No em dashes or en dashes in code, comments, docs or commit messages.
- Very specific: line 40
Add a failing test first for behavior changes.
- Distinctive: line 42
Do not describe unmerged features as shipped.
- Very specific: line 43
Do not commit generated files (stacklit.json, docs/DEPENDENCIES.md) unless the change is about them.
- Very specific: line 45
Never commit secrets or .env files.
- Very specific: line 54
Read stacklit.json before broad searches.
≈ “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
AGENTS.md
Guide for agents and people working on the Stacklit repo itself. If you only want to use Stacklit on your own project, read README.md and docs/INSTALL.md.
What this is
A Go CLI that indexes a codebase into stacklit.json (modules, exports, dependency edges, hints) plus a symbol graph, and serves it over MCP. Deterministic, no LLM, no network calls from the CLI. Module path github.com/glincker/stacklit, Go version from go.mod.
Build and test
make build # ./stacklit
go vet ./...
go test ./... -race -count=1
go build -o /tmp/stacklit ./cmd/stacklit # try it on another repoCI runs vet and tests on Linux, macOS and Windows. Node is only needed for npm/.
Where things live
| Path | Holds |
cmd/stacklit | main package |
internal/cli | Cobra commands |
internal/parser, internal/graph | extractors and the dependency and symbol graph |
internal/engine, internal/renderer, internal/schema | pipeline, outputs, index types |
internal/mcp | MCP server (stdio) |
internal/setup | stacklit setup targets, hooks, the embedded skill |
skills/stacklit/SKILL.md | the skill; internal/setup/skill/SKILL.md and plugins/stacklit/skills/stacklit/SKILL.md must match it |
plugins/stacklit, .claude-plugin/ | Claude Code plugin and marketplace |
server.json, npm/ | MCP registry entry, npm wrapper |
scripts/ | install.sh, the llms-full.txt generator, sync helpers |
docs/ARCHITECTURE.md | pipeline detail |
Rules
- Commit subjects:
<type>: <description>with type one of feat, fix, perf, refactor, docs, test, chore. Keep them short. - No em dashes or en dashes in code, comments, docs or commit messages. Plain sentences, no marketing language.
- Add a failing test first for behavior changes. Parser tests sit next to the parsers and use
testdata/. - Claims about size or speed in docs must come from
bench/output. - Do not describe unmerged features as shipped.
- Do not commit generated files (
stacklit.json,docs/DEPENDENCIES.md) unless the change is about them; CI refreshes them. - Release files (
.goreleaser.yml,.github/workflows/release.yml) andnpm/package.jsonare owner-controlled. Ask before editing. - Never commit secrets or
.envfiles.
Keeping copies in sync
- Skill copies:
scripts/sync-plugin-skill.sh --check(run without--checkto fix). llms.txtis hand written.site/public/llms-full.txtis generated:sh scripts/gen-llms-full.sh, and--checkfails if it is stale.
Using Stacklit on this repo
Read stacklit.json before broad searches. stacklit query <name> finds a symbol, stacklit impact <name> shows what depends on it.
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.

