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.
- CLAUDE.mdCLAUDE.md
- arch-guardSkill
- builder-previewSkill
- features-auditSkill
- features-updateSkill
- screen-validatorSkill
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
- Very specific: line 31
Every tmux/git/compose call: argv list, no shell, timeout, fixed binary.
- Very specific: line 33
Every mutation: POST + CSRF + Origin check + logged-in session + tier check + audit line (+ unlocked session when require_unlock = true).
- Distinctive: line 42
Never print, log, commit or send pm's token/TOTP (or the optional dev token).
- Very specific: line 44
No host-specific values in code or defaults: hosts, URLs, paths and topics come from pm.toml.
- Very specific: line 57
Never use native browser popups (alert, confirm, prompt, window.open).
- Very specific: line 65
Read docs/ARCHITECTURE.md before a code change and check your diff against it.
- Very specific: line 68
Add tests with every change.
≈ “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
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
| Area | Code | Rules / docs |
| Classic UI (built-in default theme) | src/pm/web/themes/classic/templates, src/pm/static | docs/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/dt | docs/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) |
| Plugins | src/pm/web/plugins.py (entry point pm.plugins) | docs/CONFIG.md "Theme and plugins" |
| Deploy examples | deploy/ | docs/INSTALL.md, docs/operations.md |
| Dev instance, screenshots, UI tests | tools/devpm.py, tools/uishot.py, tools/ui.sh | docs/DEV-TESTING-PLAN.md |
| Agents and skills (Claude Code) | .claude/agents, .claude/skills | arch-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>/mdmay open any.mdfile 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>/;classicis the built-in one and the fallback. Followdocs/UI-RULES.md,docs/UI-CONDUCT.mdanddocs/UI-GLOSSARY.mdfor classic. A new theme brings its own rules and its owntokens.css; never change another theme's files for yours. - The
dttheme (pm v7, keyboard-driven shell) ships with polymux: templates and static insrc/pm/web/themes/dt/, Python insrc/pm/web/dt/(a first-party plugin), picked per browser with?ui=dtor Settings › UI theme. Its rules aredocs/themes/dt/CONDUCT.md(start atdocs/themes/dt/README.md); classic'sdocs/UI-*.mddo 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). Usewindow.pmConfirm/window.pmPrompt(static/js/dialog.js) orhx-confirm/data-confirm(dt: its own layers, V7-UI-4).tests/test_no_native_popups.pyenforces 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.mdbefore a code change and check your diff against it;./tools/check.sh(=make check) anduv run pytestmust pass. Never add a new top-level module insrc/pm/or a new copy of a shared helper. - Add tests with every change. Do not edit
CHANGELOG.mdorFEATURES.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, andpmctl merge-checkin 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 contextat session start; save what a later agent needs and cannot read from the repo withpmctl memory add(never secrets; memory is kept outside the repo).
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.

