What this thread does
The problem
The author of an r/dataengineering post (dylannalex01) says their team uses Claude Code heavily, but architecture insights, debugging fixes and ADRs end up in markdown folders inside single repos, so an agent working on one project knows nothing about decisions made in another. They asked whether to build a central knowledge base, for example files in S3 behind an MCP server.
The most detailed answer (one commenter)
- Keep everything in one
ai-docsrepository: a rootAGENTS.md, plusskills/,rules/anddocs/folders, with repo-specific subfolders. - Inside the dev container, add Makefile targets:
ai-set-rules <repo>links the relevant files into the project root with symlinks, andai-clear-rulesremoves them. The agent therefore loads only the rules for the repo you are in. - After each task, run a skill that updates the docs, so the central repo keeps learning.
This is one team's setup as described in a comment; I have not seen the scripts.
Other views in the thread
- A monorepo avoids the problem for code that lives together.
- Skills kept in a separate repo, or a shared Obsidian folder for a small team, also work according to commenters; one pointed to a public gist on an LLM-maintained wiki.
- A commenter warns that skills and architecture documents accumulate stale or wrong statements that mislead the agent; letting it discover context from the code is safer for fast-changing parts.
- Another commenter noted that retrieval alone is not understanding, so a pile of recalled notes is not enough.
Caveats
Claude Code's memory docs say .claude/rules/ supports symlinks, but a link whose target is outside the working directory is treated like an external import: it needs a one-time approval per project, and after that only rules without a paths field load. By default, a root AGENTS.md is read only when no CLAUDE.md or CLAUDE.local.md exists in the working directory or above it, so a symlinked AGENTS.md can be ignored in a repo that already has a CLAUDE.md; import it from CLAUDE.md instead. Keep linked rules short and review them like code. This is distinct from letting the agent write its own glossary or ADRs (see the thread on project glossaries and ADRs for agents); this one is about distribution across repos.
Sources
- Claude Code memory docs were read. Checked:
.claude/rules/supports symlinks to share rules across projects; symlinks pointing outside the working directory need external-import approval and only unconditional rules then load;@pathimports exist;AGENTS.mdis read by default only when noCLAUDE.mdorCLAUDE.local.mdis found in or above the working directory; the guidance to keep a CLAUDE.md under about 200 lines. This changed the caveat above.
Not checked: the Reddit post and comments (not openable from here), so the vote and comment counts, the ai-docs layout, the Makefile targets, the claim that stale docs mislead agents and the Obsidian, gist and monorepo suggestions are unverified; the scripts were not seen. Nothing was run.
Started from a post by @dylannalex01, packaged by the editor. Original post