Skip to content
Agentmart
Submit a tool

AGENTS.md · nano-muse/nanoMuse

AGENTS.md from nano-muse/nanoMuse: 101 lines covering Repository layout, Commands, Conventions, Wire contracts and more.

Template by nano-muse

IndexedGPL-3.0★ 2,486
Write a review

Install

Works with Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Claude Code. Read the repository before you give any tool access to your data.

curl -fsSL https://raw.githubusercontent.com/nano-muse/nanoMuse/main/AGENTS.md -o AGENTS.md

Read it and adapt it to your project before use.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

The AGENTS.md file that nano-muse/nanoMuse (2,502 stars) keeps for coding agents. It has 101 lines in 7 sections: Repository layout; Commands; Conventions; Wire contracts; Platform notes; Writing a release; Editing these instructions. Use it as a model for your own project's instructions.

Use cases: prompt-engineering

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

What's in it

An AGENTS.md file: instructions coding agents (Codex, Cursor, Copilot, Gemini CLI and others) read before working in a repo.

For
Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Claude Code
Length
101 lines
File
AGENTS.md

Sections

  1. Repository layout
  2. Commands
  3. Conventions
  4. Wire contracts
  5. Platform notes
  6. Writing a release
  7. Editing these instructions

First lines (shown under the repo's GPL-3.0 license)

# AGENTS.md

nanoMuse is an open-source personal agent for every device a person owns: a phone app (Android and iOS, built on OpenMinis), a desktop app (a DeepSeek Harness plugin in an Electron shell), a Python runtime for the hands, a web console, and the relay that signs people in and lets their devices talk. Everything is GPL-3.0-or-later; read [CONTRIBUTING.md](CONTRIBUTING.md) first and [docs/architecture.md](docs/architecture.md) before touching the runtime.

## Repository layout

```
nanomuse/               Python runtime: agent loop, Sentinel, tools, hands (phone/computer operators), server for the web app
cloud/                  nanoMuse Cloud, the relay: FastAPI + SQLite; sign-in, models, hub, conversation sync, console at /app
web/                    the web console (Vite + React); `npm run build` writes nanomuse/server/static/, which is committed
harness/dsh-nanomuse/   the desktop app proper: a DeepSeek Harness plugin (TypeScript, React client, i18n in src/client/locales.ts)
harness/desktop/        the Electron shell around dsh + the plugin; ships the Python runtime for the hands
android/                OpenMinis 1.13 subtree (GPL-3.0); do not restructure
android/src/android     the Android app; ours lives in io.github.nanomuse.* and res/values*/nm_strings.xml
android/src/ios         the iOS app; ours lives in NanoMuse/ (Swift), strings in Localizable.xcstrings
demo/                   the showcase (recorded traces, pages under site/)
docs/                   user and contributor docs; the VitePress site in website/ projects this directory
scripts/                release, rebrand, icon and catalogue generators; self-host.sh
tests/                  pytest for the Python runtime (MockLLM only, no network)
website/                VitePress config for the docs site (srcDir ../docs)
```

## Commands

Run the checks for the area you changed. CI runs the same lines on Node 22; the Python matrix also runs on macOS and Windows runners.

```sh
# Python runtime (nanomuse/, tests/, scripts/)
uv venv && uv pip install -e ".[dev]"
ruff check nanomuse tests scripts && ruff format --check nanomuse tests scripts
mypy
python -m pytest -q -m "not live"

# Relay (cloud/); its admin console under cloud/console/ builds into nanomuse_cloud/console/admin/, which is committed
cd cloud && pip install -e ".[dev]" && ruff check . && ruff format --check . && pytest
cd cloud/console && npm ci && npm run check && npm run build

# Web console (web/); the built app under nanomuse/server/static/ is committed; rebuild and commit it
cd web && npm ci && npm run check && npm run build

# Desktop plugin (harness/dsh-nanomuse/)
cd harness/dsh-nanomuse && pnpm install --frozen-lockfile && pnpm build && pnpm typecheck && pnpm test
# from the repository root (the scripts live in scripts/, not in the plugin)
node scripts/connectors-json.mjs --check        # the phones' copies of the connectors catalogue are current
node scripts/providers-json.mjs --check         # the clients' copies of the provider catalogue are current

# Desktop shell (harness/desktop/)
cd harness/desktop && npm ci && npm run typecheck && npm test

# Android (android/src/android); JDK 21, NDK r27c; natives first: bash scripts/android/build-natives.sh
cd android/src/android && ./gradlew :app:assembleDebug --console=plain --no-daemon
./gradlew :app:testDebugUnitTest --tests 'io.github.nanomuse.*' --tests 'com.openminis.app.provider.*' --tests 'com.openminis.app.sandbox.*' --console=plain --no-daemon # our unit tests and the two upstream packages we edit; CI runs them too

# iOS (android/src/ios); macOS only; the device build must finish with zero warnings in NanoMuse/
xcodebuild build -project Minis.xcodeproj -scheme Minis -configuration Debug -destination 'generic/platform=iOS' CODE_SIGNING_ALLOWED=NO

# Docs site (website/)
cd website && npm ci && npm run docs:build       # also the dead-link check; `npm run docs:dev` serves it
```

## Conventions

- **Two trees, two sets of rules.** `android/` is an upstream subtree we must keep pullable: new code in new files (`io.github.nanomuse.*`, `NanoMuse/*.swift`); an edit inside an upstream file carries a `// nanoMuse:` comment, one change per spot; never rename the Kotlin package, the Gradle namespace or the sandbox paths. Rebranding is `scripts/rebrand.py` (plus `gen-android-icons.py`, `gen-ios-icons.py`), idempotent; fix the script, not the miss. Details in [CONTRIBUTING.md](CONTRIBUTING.md).
- **Our Android strings** live in `res/values*/nm_strings.xml` with `nm_` keys; upstream's `strings.xml` stays theirs.
- **Generated files are regenerated, not edited.** The connectors catalogue is `harness/dsh-nanomuse/src/connectors-catalogue.ts`; `node scripts/connectors-json.mjs` writes the phones' `connectors.json` and CI runs `--check`. The own-key provider catalogue is `nanomuse/llm/providers.json` (ids, base URLs, key pages, capabilities, defaults, verified against the vendors' docs); `node scripts/providers-json.mjs` writes the desktop's and the phones' `providers.json` and CI runs `--check`. The ideas lists `ideas.en.json`/`ideas.zh.json` under `harness/dsh-nanomuse/assets/` must be byte-identical to the Android app's copies under `app/src/main/assets/nanomuse/` and the iPhone app's under `NanoMuse/Resources/` (`tests/fences.test.mjs` checks). The web build writes `nanomuse/server/static/`; commit it with the change.
- **Lock files resolve against the public registry only.** After any `npm install`, every `resolved` URL in the lock file must point at `https://registry.npmjs.org/`; CI greps for anything else. A private mirror's host never lands in the repository.
- **Every string in every locale.** A user-visible string is added in English first, then 简体中文, then every other locale the file already has: `nm_strings.xml` per `values-*`, `Localizable.xcstrings`, `locales.ts` (`en` and `zh`), the relay's console and e-mail templates. Never assume a +86 number, a Chinese app or Beijing time; SMS codes reach mainland-China numbers only, so a sign-in screen says so and points to e-mail.
- **Voice.** Plain, specific, human sentences; say what a thing does. No marketing words, no exclamation marks, no superlatives. No em or en dashes in new text: commas, colons and full stops instead (a dash stays where it is data: a number range in a table, code). Chinese copy is written as Chinese, not word for word from the English, follows the same rule, avoids 颠覆, 王炸, 保姆级, 一键 and 赋能, and uses the terms of the [glossary in CONTRIBUTING.md](CONTRIBUTING.md#translating-the-docs) (非营利, never 非盈利; `nanoMuse Cloud` is never translated). Never copy Meta's UI text verbatim; describe the same behaviour in our words.
- **Facts come from the repository.** Every feature, number and provider count in a README, a page or a release note must be verifiable in the code or a catalogue; a shipped feature is never called a demo or coming soon; copy about the avatar does not say how many pictures or poses it has.
- **The ten READMEs move together.** `README.md` and the nine under `docs/readme/` share one structure and change in the same commit; the badge row is two lines, the longer first; a *News* line is one short sentence with the date in inline code and at most one emoji, newest first, and only a milestone release gets one ([CONTRIBUTING.md](CONTRIBUTING.md#the-ten-readmes)).
- **Docs accompany code.** A change that alters what a person sees or does updates the page under `docs/` in the same change, and adds a line under *Unreleased* in `CHANGELOG.md` (past tense, concrete, user-facing).
- **No version bumps outside release commits.** `pyproject.toml`, `cloud/pyproject.toml`, the two `harness/*/package.json`, the Android `versionName`/`versionCode` and the iOS `MARKETING_VERSION` move together in the release commit only.
- **Commits** follow Conventional Commits (`feat(android): …`, `fix(relay): …`), carry a DCO sign-off (`git commit -s`), and are merged by rebase or merge commit, never squash.
- **No secrets, ever.** No keys, tokens, phone numbers, e-mail addresses or private hosts in code, docs, tests or fixtures; the one address allowed is the maintainer's contact in the READMEs' *Maintainers* table, there at his request. `config/config.toml` and `cloud/.env` are git-ignored; secrets reach the model as `{{vault:NAME}}` and nothing else.
- **Some material stays out of the repository.** Muse's system prompt, Meta's brand screenshots, anything decompiled or intercepted from the Muse app, and internal planning (budgets, capacity estimates, promotion drafts). A screenshot we publish has order numbers, names, addresses, hostnames and keys masked.
- **Issues and outside pull requests** are handled as [CONTRIBUTING.md](CONTRIBUTING.md#issues-and-pull-requests-maintainers) says: labels on every issue and every pull request (the *Labels* workflow adds the platform and the kind), a fix says `For #N` (never `Fixes`, `Closes` or `Resolves`, which would close the issue on merge), a landed fix gets the `fixed on main` label and a reply, the issue stays open until a maintainer decides to close it, a contributor's commit is never rewritten.
- **Everything that acts goes through the Sentinel** with an honest `risk`; tests use `MockLLM`; Ruff line length 100; type hints everywhere.

## Wire contracts

The three protocols are documented and versioned; change the doc in the same change as the code, and keep old clients working for one release.

- **Hub frames**: devices of one account talking through the relay (`/v1/hub`): [docs/hub.md](docs/hub.md); implementations in `nanomuse/hub/`, `harness/dsh-nanomuse/src/hub.ts`, the phones' `Hub*` files.
- **Conversation sync and accounts**: [docs/cloud.md](docs/cloud.md); the relay's own README is [cloud/README.md](cloud/README.md).
- **The operator**: how the hands see a screen and act on it, phone and computer alike: [docs/gui.md](docs/gui.md).

## Platform notes

- **iOS** targets iOS 16; use the `.nmOnChange(of:)` helper, not the two-parameter `onChange` (iOS 17+). The device build treats warnings in `NanoMuse/` as failures. Xcode and TestFlight details: [docs/ios.md](docs/ios.md).
- **Android** builds with JDK 21, SDK CMake 3.22.1, NDK r27c, Go 1.25+; phone features are tested on real arm64 hardware (the emulator cannot run the APK).
- **Desktop** is a dsh plugin: profile overlays in `cordis.patch.yml`, the relay URL in the plugin's `config.baseURL`; [docs/desktop.md](docs/desktop.md). The Electron shell and the plugin carry the same version.
- **CI** uses Node 22 for every JavaScript job; keep `engines` and lock files compatible with it even when you develop on a newer Node.

## Writing a release

One branch and one pull request per version; `scripts/release-bump.sh` moves the version files, `scripts/rebrand.py` writes the phones' versions, `scripts/release-docs.py` opens the `CHANGELOG.md` block and moves the READMEs' download links (the *News* lists are milestones and stay as written; a major version gets a hand-written line), and `scripts/release-apk.sh <version>` builds and publishes (the tag `v*` starts the desktop, harness and Docker workflows). The notes are `docs/releases/v<version>.md` in the shape of [docs/release-notes-template.md](docs/release-notes-template.md): a short story, *Highlights*, *Upgrade Notes*, *Community*, English first and the same in Chinese in a collapsed block. Move the *Unreleased* bullets of `CHANGELOG.md` under the new version in the same commit as the version bump. The codename is one capitalised English word never used before (`CHANGELOG.md` lists the used ones); every release is published as *Latest*, never as a pre-release, and ships installers, the APK, the TestFlight build and the Docker image, no terminal builds; a release goes out as soon as a fix people are waiting for is on `main` (a crash, a security issue, an app that will not install), otherwise every few days, and a maintainer taps through the main flows on a phone before tagging. The maintainers' recipe is in [CONTRIBUTING.md](CONTRIBUTING.md#releasing-maintainers).

## Editing these instructions

`CLAUDE.md` is a symlink to this file; edit `AGENTS.md`. Keep it under 150 lines: one fact, one home; link the page that owns the detail rather than restating it.

Signals

Stars
2,486
Forks
293
Open issues
89
Last commit (this folder)
Oct 24, 2026 (6 days ago)
Last release
Oct 24, 2026 (6 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
GPL-3.0
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from nano-muse

Cite this page

AGENTS.md · nano-muse/nanoMuse. Agent Mart. https://agentmart.dev/templates/nano-muse-nanomuse-agents-md (last updated 2026-10-24)