agentleFS
dungtqdungtq/polymux/AGENTS.md

polymux

AGENTS.md2 starsChanged 31 days agoMITView on GitHub

polymux (command pm) is a web control plane for projects, git, tmux and coding agents on one Linux host. Setup: docs/INSTALL.md; every pm.toml key: docs/CONFIG.md; code layout and rules: docs/ARCHITECTURE.md. The two themes never mix: classic rules do not apply to dt files, dt rules do not apply to classic files, and work for one theme does not change the other's files. Checks: ./tools/check.sh (= make check: ruff + architecture gate), uv run pytest, and for UI changes ./tools/ui.sh (=…

  • 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 repository6 other files it gives its agents.

The file

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

7 rules. About 0 are common, 1 is distinctive, and 6 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.

  • 6

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Very specific:

    Every tmux/git/compose call: argv list, no shell, timeout, fixed binary.

    line 31
  2. Very specific:

    Every mutation: POST + CSRF + Origin check + logged-in session + tier check + audit line (+ unlocked session when require_unlock = true).

    line 33
  3. Distinctive:

    Never print, log, commit or send pm's token/TOTP (or the optional dev token).

    line 42
  4. Very specific:

    No host-specific values in code or defaults: hosts, URLs, paths and topics come from pm.toml.

    line 44
  5. Very specific:

    Never use native browser popups (alert, confirm, prompt, window.open).

    line 57
  6. Very specific:

    Read docs/ARCHITECTURE.md before a code change and check your diff against it.

    line 65
  7. Very specific:

    Add tests with every change.

    line 68

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

polymux — agent and contributor guide

polymux (command pm) is a web control plane for projects, git, tmux and coding agents on one Linux host. Setup: docs/INSTALL.md; every pm.toml key: docs/CONFIG.md; code layout and rules: docs/ARCHITECTURE.md.

Where things are

AreaCodeRules / docs
Classic UI (built-in default theme)src/pm/web/themes/classic/templates, src/pm/staticdocs/UI-RULES.md, docs/UI-CONDUCT.md, docs/UI-GLOSSARY.md
dt UI (second theme, internally "pm v7")src/pm/web/dt, src/pm/web/themes/dt, tests/web/dtdocs/themes/dt/README.md first, then docs/themes/dt/CONDUCT.md (V7-* ids), docs/themes/dt/CODE.md
Core Python (domain, routes, security)src/pm/**docs/ARCHITECTURE.md (packages, shared helpers, limits)
Pluginssrc/pm/web/plugins.py (entry point pm.plugins)docs/CONFIG.md "Theme and plugins"
Deploy examplesdeploy/docs/INSTALL.md, docs/operations.md
Dev instance, screenshots, UI teststools/devpm.py, tools/uishot.py, tools/ui.shdocs/DEV-TESTING-PLAN.md
Agents and skills (Claude Code).claude/agents, .claude/skillsarch-guard, screen-validator, builder-preview; maintainer only (need the tracker DB): features-keeper, features-update, features-audit

The two themes never mix: classic rules do not apply to dt files, dt rules do not apply to classic files, and work for one theme does not change the other's files.

Checks: ./tools/check.sh (= make check: ruff + architecture gate), uv run pytest, and for UI changes ./tools/ui.sh (= make ui: screenshot smoke + uv run pytest -m ui).

Stack

Python 3.13, uv, FastAPI + Jinja2 + uvicorn, vendored HTMX (+ SSE ext), no JS build step. Runs on the host as a systemd user unit (not Docker), behind a TLS reverse proxy.

Hard rules

  • Every tmux/git/compose call: argv list, no shell, timeout, fixed binary. tmux targets by id ($ @ %) only. User values after --.
  • Every mutation: POST + CSRF + Origin check + logged-in session + tier check + audit line (+ unlocked session when require_unlock = true). Fail closed if the audit write fails. Plugin routes use the same guards (mutation_guard); the loader refuses plugins that do not.
  • Pane text is ANSI-stripped and masked on every frame; never logged, indexed or sent to ntfy. Exception: the terminal stream is raw tmux output, unmasked, but still never logged, indexed or sent to ntfy.
  • Markdown reader: /a/<agent>/md may open any .md file on disk (logged-in session only); paths with a hidden folder are refused except ~/.claude/plans. Symlinks are resolved and re-checked.
  • Library viewer: /agents/library/view (logged-in session only) reads only a file the agent inventory lists (fsread.read_listed); symlinks are resolved and re-checked, and a hidden folder is allowed only inside a listed path.
  • Never print, log, commit or send pm's token/TOTP (or the optional dev token).
  • Tests use a fake tmux or a private -L pmtest-* socket; never the user's default tmux server.
  • No host-specific values in code or defaults: hosts, URLs, paths and topics come from pm.toml. Private or personal features go into a plugin (docs/CONFIG.md "Theme and plugins"), not into the core.

UI

  • Themes live in src/pm/web/themes/<name>/; classic is the built-in one and the fallback. Follow docs/UI-RULES.md, docs/UI-CONDUCT.md and docs/UI-GLOSSARY.md for classic. A new theme brings its own rules and its own tokens.css; never change another theme's files for yours.
  • The dt theme (pm v7, keyboard-driven shell) ships with polymux: templates and static in src/pm/web/themes/dt/, Python in src/pm/web/dt/ (a first-party plugin), picked per browser with ?ui=dt or Settings › UI theme. Its rules are docs/themes/dt/CONDUCT.md (start at docs/themes/dt/README.md); classic's docs/UI-*.md do not apply to it, and dt work does not change classic files.
  • Classic row colours: hover --hover, selected/open row --accent-soft, nothing else filled or starred.
  • Never use native browser popups (alert, confirm, prompt, window.open). Use window.pmConfirm / window.pmPrompt (static/js/dialog.js) or hx-confirm / data-confirm (dt: its own layers, V7-UI-4). tests/test_no_native_popups.py enforces it.
  • UI changes: check them on the dev instance (tools/devpm.py, tools/uishot.py --smoke, docs/DEV-TESTING-PLAN.md) in light and dark, desktop and phone width, and read the screenshots.

Working style

  • Read docs/ARCHITECTURE.md before a code change and check your diff against it; ./tools/check.sh (= make check) and uv run pytest must pass. Never add a new top-level module in src/pm/ or a new copy of a shared helper.
  • Add tests with every change. Do not edit CHANGELOG.md or FEATURES.md (generated); describe user-visible changes in the PR and the maintainer adds the entries.
  • One topic per pull request; describe what changed and how you checked it (CONTRIBUTING.md).
  • Several agents at once (with pm installed): pmctl claim add "<task>" --path '<glob>' before implementing, pmctl claim done N --commit <sha> after, and pmctl merge-check in the branch's work tree before merging (exit 1 = another agent's claim or work tree touches the same files: do not merge, coordinate first). tmux-agents (deploy/tmux-agents/) wraps these and messages the other agents.
  • Project memory: pmctl memory context at session start; save what a later agent needs and cannot read from the repo with pmctl memory add (never secrets; memory is kept outside the repo).

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.