agentleFS
AFK-surfAFK-surf/monoid/AGENTS.md

monoid

AGENTS.md68 starsChanged 16 days agoMITView on GitHub

These rules apply to the whole repository. Each part has its own AGENTS.md beside its code, loaded when tools touch that directory. monoid (also built as still.fail, the same code under its other name: client/i18n/brand.ts) runs coding-agent sessions in team chats (Slack, Feishu, Comma, and its own chats) on user-owned stations driven by Claude Code, Codex, and other runtimes.

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. AFK-surf/still.fail★ 69100% 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 35,117 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 repository12 other files it gives its agents.

The file

We split this AGENTS.md into the rules it gives an agent

12 rules. About 0 are common, 4 are distinctive, and 8 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.

  • 8

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Update any AGENTS.md made untrue by a change in the same change.

    line 21
  2. Distinctive:

    Put unchecked owner rules and non-obvious pitfalls in the narrowest directory's AGENTS.md, once, concisely.

    line 22
  3. Very specific:

    Follow .agents/skills/ste-writing/SKILL.md for commits and PR text.

    line 38
  4. Very specific:

    Add trailers only for user-visible changes (scripts/changelog.ts): Changelog: in Chinese (修复:…, 新增:…, 改进:…), Changelog-parts: (station, …

    line 39
  5. Very specific:

    Run sh scripts/check.sh full origin/main..HEAD (narrow with STILLFAIL_CHECK_PART) for the part you changed before a PR.

    line 44
  6. Very specific:

    Add Stable: yes only for urgent fixes that cannot wait a day for stable (crash, data loss, lockout, broken updater).

    line 45
  7. Very specific:

    Update both web/public/privacy.html and web/public/en/privacy.html in the same PR for new data, third parties, or retention changes.

    line 47
  8. Very specific:

    Keep tests deterministic with test clocks and simulated networks (docs/development.md).

    line 48
  9. Distinctive:

    Never ask people to tell the two locks apart.

    line 53
  10. Distinctive:

    Only a person changes their own devices.

    line 54
  11. Distinctive:

    Every error, refusal, and wait tells the person what to do next.

    line 56
  12. Very specific:

    Only accounts, sign-in, workspaces, members, roles, invitations, station lists, and member credentials depend on cloud/.

    line 74

≈ “Common” is an estimate: at least 1 in 5 of the 45,344 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

Working on monoid (for agents)

These rules apply to the whole repository. Each part has its own AGENTS.md beside its code, loaded when tools touch that directory.

The parts

monoid (also built as still.fail, the same code under its other name: client/i18n/brand.ts) runs coding-agent sessions in team chats (Slack, Feishu, Comma, and its own chats) on user-owned stations driven by Claude Code, Codex, and other runtimes.

  • station/: TypeScript station on bundled Node + Effect (scripts/station-bundle.sh), prebuilt native parts (station/native), and slimmed MoonBit reader/builder (station/mb/src/reader, detached from the frozen station_main which lives only in stillfail-reader-harness for tests). Holds chats, sessions, agents, jobs, and accounts over the mesh. Cutover sync rule: while cutting over to the pure-Pion station (pion/station-main/), every behavioral change to station/src/ must update pion/station-main/ in the same PR (scripts/station-pion-sync.ts; strictly Node-runtime-only fixes require a Node-Station-Only: <reason> trailer).
  • cloud/: Cloudflare Workers for accounts, workspaces, member credentials, and relays. People only.
  • client/core-ts/: TypeScript + Effect client core for every app (accounts, station links, SQLite cache, views). UIs only render it. client/shell (Rust) is native IO, client/iroh-wasm is browser iroh, client/i18n/catalog holds shared zh/en strings with matching keys.
  • apps/mbui/: single app for Android, iOS, macOS, Windows, Linux, and web in MoonBit on libs/ui (ui.monoid: unified UI framework and component library). libs/comma-ui is Comma's component library.
  • libs/base/: program-agnostic MoonBit base (Rust shell binding, sql, scheduler, mesh wire/device side, hash, net). station/mb uses shell-free packages.
  • libs/client-core/: first MoonBit client-core slice on libs/base (zero-write chat open, MdStore, FrameOutbox). Unused in production yet.
  • web/: web host for the mbui app, Preact pages, and web/ui. apps/extension sends browser pages to a chat.
  • website/: official site. rules/: shared MoonBit lock/vault rules built to JS. scripts/: checks, releases, CI plan. vendor/: patched upstream code (see its README).
  • docs/: build, run, and operate guides (docs/development.md, docs/operations.md, station setup notes) and release notes. Design lives in code comments and AGENTS.md. A comment naming another docs/ file refers to a design doc deleted in #4614 (git show ec9da461f6^:docs/<name>.md), which stays its format or protocol spec.

These files are kept true

  • Update any AGENTS.md made untrue by a change in the same change. scripts/check.sh rejects missing paths.
  • Put unchecked owner rules and non-obvious pitfalls in the narrowest directory's AGENTS.md, once, concisely. Do not repeat code or comments. State the rule and its reason without attribution or date annotations.
  • Pair every new directory AGENTS.md with a one-line CLAUDE.md containing @AGENTS.md.

Changes, checks and CI

Pull requests and evidence

  • Open one PR per request from origin/main. Split only when a maintainer asks. External contributors open one PR per issue.
  • Squash each task into one commit before its first PR. Append commits after that without squashing.
  • For requests from still.fail, use the requester's GitHub account when local gh has it. Otherwise use CommaBot and add Co-authored-by: Name <requester-email> to commits. For other sources, use the existing gh identity without CommaBot.
  • End the PR description with the model(s) used and test frameworks run.
  • Attach before-and-after images for UI changes, plus a short video for animation or timing changes. Upload evidence to GitHub and link it in the PR. Never commit PR-only assets.
  • Merging to main deploys beta (.github/workflows/pipeline.yml, scripts/plan.sh), so keep main releasable. Bug fixes merge once latest checks pass. Product or visible changes need owner approval.

Commit and pull request messages

  • Follow .agents/skills/ste-writing/SKILL.md for commits and PR text. Write PR titles and descriptions in English. Use {type}({scope}): {description} for commit subjects (for example feat(server): add mesh routes).
  • Add trailers only for user-visible changes (scripts/changelog.ts): Changelog: in Chinese (修复:…, 新增:…, 改进:…), Changelog-parts: (station, web, android, desktop, cloud), and Fixes: FB-<n>.
  • For gated features (client/core-ts/src/features.ts), add Changelog-channel: beta for beta or betaOnly experimental features. For experimental features, name where to enable them (新增:实验性功能「对话列表看板视图」中,…). Write a stable line when opening to stable. Override prior lines in docs/changelog-notes.json.

Checks and compatibility

  • Run sh scripts/check.sh full origin/main..HEAD (narrow with STILLFAIL_CHECK_PART) for the part you changed before a PR. Git hooks run quick checks, and CI runs full checks.
  • Add Stable: yes only for urgent fixes that cannot wait a day for stable (crash, data loss, lockout, broken updater). .github/stable-plan.py cherry-picks only those onto yesterday's main.
  • Older stations and newer cores coexist. Drop compat shims 7 days after replacement ships, raising OLDEST_CORE (station/src/api/oldest.ts) and OLDEST_STATION (client/core-ts/src/station/oldest.ts). Migrate DBs forward only. Keep existing commands and shared links working.
  • Update both web/public/privacy.html and web/public/en/privacy.html in the same PR for new data, third parties, or retention changes.
  • Keep tests deterministic with test clocks and simulated networks (docs/development.md). Never add sleeps, retries, or longer deadlines. Put non-deterministic checks in scripts/side.sh. Never rerun a flaky check green: find and remove the uncontrolled input.

To people there is one safe mode

  • A person's own lock is the root of trust for their devices. A workspace lock keeps the roster (members, stations) and follows each person's lock for their devices.
  • Never ask people to tell the two locks apart. Keep 安全模式, 受信任设备, and 批准 as one flow. Never send people to 个人锁 to enter a workspace or name it where the workspace lock appeared.
  • Only a person changes their own devices. Owners and admins remove a member, never someone else's single device.
  • Safe-mode members get a personal lock automatically (client/core-ts/src/views/lock.ts ownLockFor, vouchersIn) with no re-approval. Do not widen that rule (never by device id, never the approver of a device already on the lock), and do not narrow it without owner approval.
  • Every error, refusal, and wait tells the person what to do next. Leave no dead ends.

No polling between still.fail's own parts

client/core-ts/, station/, and cloud/ never poll each other on a timer. The owning part pushes changes over existing sockets (cloud/src/types.ts /v1/events, station presence socket) or event streams. Readers read on notification, on first show, and on reconnect. Never long-poll: serve a stream.

Allow a timer only for: heartbeats or pings, local machine sampling (CPU, memory, network), failure retries with backoff or timeouts/deadlines, burst debouncing, or external systems without push (registries, provider quotas, third-party feeds).

scripts/check.sh rejects new timers in those three parts unless marked timer: with the reason. Drop old-part support rather than poll it.

No way into a station from outside

still.fail has no public entrance. A station is reached only over the mesh (station/src/mesh/), admitting workspace stations by key and members by cloud-signed credentials. All other station listeners stay local (127.0.0.1, Unix socket, or launcher fd). Never add bind-address settings, tunnels (Tailcat, ngrok, cloudflared, Tailscale funnel), port forwards, or inbound webhooks. Stations connect outbound to cloud, Slack Socket Mode, Feishu, and Comma.

cloud/ stores no chats and proxies no station requests. Stations serve workspace-wide operations over the mesh. scripts/check.sh rejects non-local station listeners and tunnel names in station/ or cloud/.

The cloud is the account system and nothing else

Only accounts, sign-in, workspaces, members, roles, invitations, station lists, and member credentials depend on cloud/. Everything else flows over the mesh and works with the cloud down, slow, or withholding data. Relays carry only end-to-end encrypted packets. Push notifications (cloud/src/push.ts) are the sole exception.

Cloud-signed data is not enough because the cloud can still delay or withhold it. Put no new feature state in cloud/.

Locks live on stations (station/src/cloud/AGENTS.md, client/core-ts/src/views/AGENTS.md, rules/AGENTS.md). Devices read and submit locks to stations, stations sync via fork choice, and unaccepted entries stay pending on the signing device (client/core-ts/src/lock-pending.ts) unless the lock names no stations. Cloud fallback and mirroring exist only for older parts and go 7 days after new stations ship.

Lock threat model (rules/protocol/lock.spthy):

  • The adversary is the cloud and every station except the one queried. Only signatures of devices on a lock decide. Neither cloud nor station arbitrates order.
  • Settle forks by fork choice and re-signing. Hand unresolvable conflicts (mutual removal, full takeover, all signers lost) to the person with a way out.

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.