wenlan
AGENTS.md351 starsChanged 4 months agoApache-2.0View on GitHub
Wenlan is a local-first agent memory system. This monorepo ships the daemon, CLI, shared wire types, business-logic core, MCP server, and Tauri desktop app. Keep this file to repository-wide behavior. Detailed facts, flag receipts, eval methodology, and historical decisions belong in the owning reference or runbook and are read only when the task needs them. The default Cargo workspace covers the five daemon crates; the desktop app must be selected explicitly with -p wenlan-app. - During implementation, run the smallest…
- Commits and pushes
1 other project uses a version of this.
Adopted by
Most recently taken up by
- 7xuanlu/wenlanword for word, first seen Jul 14, 2026
Other versions1 project uses a version of this.
Word for word · 1
- 7xuanlu/wenlan★ 358100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
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 32,671 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 repository15 other files it gives its agents.
- app/AGENTS.mdAGENTS.md
- e2e/AGENTS.mdAGENTS.md
- preview/AGENTS.mdAGENTS.md
- scripts/AGENTS.mdAGENTS.md
- src/AGENTS.mdAGENTS.md
- app/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- e2e/CLAUDE.mdCLAUDE.md
- preview/CLAUDE.mdCLAUDE.md
- scripts/CLAUDE.mdCLAUDE.md
- src/CLAUDE.mdCLAUDE.md
- proveSkill
- run-wenlan-appSkill
- run-wenlanSkill
- verifySkill
The file
We split this AGENTS.md into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
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
- Distinctive: line 6
Keep this file to repository-wide behavior.
- Very specific: line 34
Before publishing a stable head, run the affected-package and reverse-dependency closure selected by the existing CI planner, or locally …
- Very specific: line 59
Never hold a tokio::sync::RwLock guard across .await.
- Very specific: line 93
Use conventional PR titles because release-please uses the squash title for the changelog.
≈ “Common” is an estimate: at least 1 in 5 of the 41,581 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
Wenlan is a local-first agent memory system. This monorepo ships the daemon, CLI, shared wire types, business-logic core, MCP server, and Tauri desktop app.
Keep this file to repository-wide behavior. Detailed facts, flag receipts, eval methodology, and historical decisions belong in the owning reference or runbook and are read only when the task needs them.
Start here
| Work | Read |
| Business logic, storage, retrieval, enrichment | crates/wenlan-core/AGENTS.md |
| HTTP daemon and runtime workers | crates/wenlan-server/AGENTS.md |
| Desktop app and frontend | app/AGENTS.md or the closest nested AGENTS.md |
| Anything that changes what a person sees or how an AI tool behaves for them | docs/ux/spec.md (agreed UX rules, each with an id and a test) |
| React frontend (Tauri UI) | src/AGENTS.md |
| Browser e2e tests | e2e/AGENTS.md |
| Browser-only preview harness | preview/AGENTS.md |
| Release, sidecar, and repo-inventory scripts | scripts/AGENTS.md |
| Eval fixtures and artifacts | app/eval/AGENTS.md |
| Rust eval runners and experiment design | crates/wenlan-core/src/eval/AGENTS.md |
| Test routing and CI layers | docs/test-layers.md |
| Platform and release work | docs/cross-platform.md, docs/RELEASING.md |
| Live daemon/app verification | .claude/skills/run-wenlan/SKILL.md, then the relevant verify/prove skill |
Build and verification
The default Cargo workspace covers the five daemon crates; the desktop app must be
selected explicitly with -p wenlan-app.
- During implementation, run the smallest test that exercises the changed behavior.
- Before publishing a stable head, run the affected-package and reverse-dependency
closure selected by the existing CI planner, or locally via
WENLAN_PUSH_FULL=1 git push(pre-push is fast/non-compiling by default; CI is the required gate). - The full workspace suite is the CI/main backstop, not a per-worker or per-review-pass default. Do not rerun an unchanged, trustworthy receipt without a concrete reason.
- Eval quality runs, live GPU smokes, and deployed checks are measurement lanes. Run them only when the change or requested evidence requires them.
- A missing fixture or unavailable gate is
unchecked, never a pass. Followdocs/ci-flake-policy.mdbefore rerunning or quarantining an intermittent CI failure.
Hooks install automatically via package.json's postinstall
(scripts/install-git-hooks.mjs) when you run pnpm install. The manual fallback for
a checkout without pnpm install is git config core.hooksPath .githooks. Do not
claim hooks are active without checking the current worktree.
Repository invariants
wenlan-corestays framework-agnostic: no Tauri or Axum dependencies.wenlan-typesstays lightweight: its production dependencies are onlyanyhow,serde, andserde_json. Shared wire shapes live there; do not addchrono,tokio, or other heavy dependencies.wenlan-serverowns HTTP framing and the single database writer. Business logic belongs inwenlan-core; the app and CLI use daemon APIs.- MCP wrappers typed-deserialize daemon responses; do not pass arbitrary
serde_json::Valueenvelopes through the boundary. - Never hold a
tokio::sync::RwLockguard across.await; snapshot state and drop the guard first. - Canonical write-time enrichment routing: see
crates/wenlan-core/AGENTS.md("Core invariants"). - Dev and production use the same daemon port and data roots by default. Isolated tests
that can create pages must isolate the daemon port,
WENLAN_DATA_DIR, and the configured knowledge/page path, then verify the live daemon reports those scratch paths. For a scratch daemon, the CLI readsWENLAN_HOST(a full URL such ashttp://127.0.0.1:17917, not a port),wenlan-mcptakes--origin-url, and aWENLAN_DATA_DIRother than the installed app's root puts the default pages folder at$WENLAN_DATA_DIR/pages; such a daemon refuses aknowledge_pathinside the real pages folder. - Request defaults:
WENLAN_AGENT_NAMEsupplies the CLI identity when no explicit agent name is given;WENLAN_DEFAULT_SPACEis an overridable CLI/MCP fallback, while the strictWENLAN_SPACElock wins over both explicit and default values. - Daemon recovery: on a connect failure to a loopback host the CLI starts the registered
background service once and re-polls health before failing.
WENLAN_NO_AUTOSTART=1turns that off — every test harness and CI job must set it so a run can never start the developer's daemon. Theautostart.offmarker file in the data root is the persistent equivalent (wenlan background offwrites it). - Preserve cross-platform behavior on macOS arm64, Linux x86_64/aarch64, and Windows
x86_64. Read
docs/cross-platform.mdbefore changing platform conditionals or release matrices. - For platform bugs, check the equivalent Windows, macOS, and Linux paths in the same change. Add regression coverage for each applicable platform; never treat one platform's pass as evidence for another, and report untested paths.
Git and release
Coding agents do not open GitHub issues on their own. Put flaky tests, follow-ups,
and ideas in the PR description or the task's handoff instead. Open an issue only
when the maintainer asks for one in that task, or a workflow under
.github/workflows/ opens it by design.
Use conventional PR titles because release-please uses the squash title for the
changelog. Version changes must keep version.txt, .release-please-manifest.json, the
workspace version, and the app version surfaces in lockstep; the existing verifier is
the authority.
PRs land on main only through the merge queue (gh pr merge <number> enqueues), so
never update a branch and rerun CI by hand to land it. Queue the Release PR alone and
last, as docs/RELEASING.md describes.
Removing a worktree also removes its gitignored artifacts. Before cleanup, check for the only copy of eval databases, model downloads, or other valuable caches and migrate them to their documented external cache location.
Documentation ownership
An AGENTS.md instruction must change agent behavior in that directory. Module maps,
environment-flag wiring, experimental receipts, benchmark statistics, and long-form
rationale go in the closest REFERENCE.md or existing docs/ page. Link to them from
the short instruction file; do not copy them back into always-loaded context.
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.

