agentleFS
wenlan-appwenlan-app/wenlan/AGENTS.md

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

  • Other versions1 project uses a version of this.

    Word for word · 1

    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.

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
  1. Distinctive:

    Keep this file to repository-wide behavior.

    line 6
  2. Very specific:

    Before publishing a stable head, run the affected-package and reverse-dependency closure selected by the existing CI planner, or locally …

    line 34
  3. Very specific:

    Never hold a tokio::sync::RwLock guard across .await.

    line 59
  4. Very specific:

    Use conventional PR titles because release-please uses the squash title for the changelog.

    line 93

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

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

WorkRead
Business logic, storage, retrieval, enrichmentcrates/wenlan-core/AGENTS.md
HTTP daemon and runtime workerscrates/wenlan-server/AGENTS.md
Desktop app and frontendapp/AGENTS.md or the closest nested AGENTS.md
Anything that changes what a person sees or how an AI tool behaves for themdocs/ux/spec.md (agreed UX rules, each with an id and a test)
React frontend (Tauri UI)src/AGENTS.md
Browser e2e testse2e/AGENTS.md
Browser-only preview harnesspreview/AGENTS.md
Release, sidecar, and repo-inventory scriptsscripts/AGENTS.md
Eval fixtures and artifactsapp/eval/AGENTS.md
Rust eval runners and experiment designcrates/wenlan-core/src/eval/AGENTS.md
Test routing and CI layersdocs/test-layers.md
Platform and release workdocs/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. Follow docs/ci-flake-policy.md before 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-core stays framework-agnostic: no Tauri or Axum dependencies.
  • wenlan-types stays lightweight: its production dependencies are only anyhow, serde, and serde_json. Shared wire shapes live there; do not add chrono, tokio, or other heavy dependencies.
  • wenlan-server owns HTTP framing and the single database writer. Business logic belongs in wenlan-core; the app and CLI use daemon APIs.
  • MCP wrappers typed-deserialize daemon responses; do not pass arbitrary serde_json::Value envelopes through the boundary.
  • Never hold a tokio::sync::RwLock guard 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 reads WENLAN_HOST (a full URL such as http://127.0.0.1:17917, not a port), wenlan-mcp takes --origin-url, and a WENLAN_DATA_DIR other than the installed app's root puts the default pages folder at $WENLAN_DATA_DIR/pages; such a daemon refuses a knowledge_path inside the real pages folder.
  • Request defaults: WENLAN_AGENT_NAME supplies the CLI identity when no explicit agent name is given; WENLAN_DEFAULT_SPACE is an overridable CLI/MCP fallback, while the strict WENLAN_SPACE lock 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=1 turns that off — every test harness and CI job must set it so a run can never start the developer's daemon. The autostart.off marker file in the data root is the persistent equivalent (wenlan background off writes it).
  • Preserve cross-platform behavior on macOS arm64, Linux x86_64/aarch64, and Windows x86_64. Read docs/cross-platform.md before 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.