neutrino
AGENTS.md153 starsChanged 32 days agoMITView on GitHub
Neutrino: a personal developer infrastructure hub on one box — transparent proxy routing (xray), a FastAPI + React control panel, NetBird remote access, an AI gateway (CLIProxyAPI), and Gitea, Samba and Podman as modules. The hub runs on Linux in any network mode, and in server mode also on macOS and Windows. A device agent under agent/ reconciles modules on managed LAN machines. Ships as three packages and two apps: neutrino_hub (hub/), neutrino_agent (agent/) and neutrino_client (client/desktop/), and the Android…
- Installs packages
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 repository3 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- core-code-authorSkill
- doc-authorSkill
The file
We split this AGENTS.md into the rules it gives an agent
5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
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
- Very specific: line 16
Every agent working here — Claude Code, Codex, Cursor, or otherwise — follows the standard in skills/core-code-author/.
- Very specific: line 172
Do not put main(), argparse, or wiring-config classes in a library module — execution lives in neutrino_hub/cli/<name>.py, and each of …
- Very specific: line 188
No narrated reasoning: Not in comments, docstrings, UI copy, or error messages.
- Distinctive: line 199
Smallest change that works: No restructuring you were not asked for, no layer for a case nobody has.
- Distinctive: line 207
Never commit unasked: When work looks done, ask.
≈ “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.
Files
AGENTS.md
Neutrino: a personal developer infrastructure hub on one box — transparent
proxy routing (xray), a FastAPI + React control panel, NetBird remote access,
an AI gateway (CLIProxyAPI), and Gitea, Samba and Podman as modules. The
hub runs on Linux in any network mode, and in server mode also on macOS and
Windows. A device agent under agent/ reconciles modules on managed LAN
machines.
Ships as three packages and two apps: neutrino_hub (hub/),
neutrino_agent (agent/) and neutrino_client (client/desktop/), and the
Android app (client/android/, Kotlin) and the iOS app (client/ios/,
Swift, a client with fewer pages and no virtual network). The two apps are
AGPL-3.0; the rest is MIT.
Every agent working here — Claude Code, Codex, Cursor, or otherwise — follows
the standard in skills/core-code-author/. This file is the
index, not a second copy: when a rule changes, change it in skills/core-code-author/
and leave this pointing at it.
Reading order
Must read before writing any code:
| Document | What it settles |
| coding_style/layout.md | Where a file goes. under_score everywhere, no grab-bag dirs, library packages vs. neutrino_hub/cli/<name>.py, one constants.py per package. |
| design/architecture.md | config/ is the only source of truth; render → validate → apply; renderers are pure, appliers touch the system. |
| coding_style/comment.md | A comment names the thing and stops, the sentence shapes, KISS, English only, no narrated reasoning anywhere. |
| coding_style/exception.md | Python's own exceptions first; a package's own kinds live in its one exceptions.py; Raises: on every public docstring. |
| agent_work_rule/commit.md | Only the user decides a commit happens. One answerable author, no agent Co-Authored-By. One line Section: text of at most twenty words. |
| design/files.md | The five roots an installed hub uses on each system, the one question each answers, and the one Neutrino tree on macOS and Windows. |
| design/development.md | Running the hub from a checkout: --dev against a root of its own, what it changes on the machine, and why a checkout installs nothing. |
| design/privilege.md | Why the panel is root, what the unit narrows, why stepping down uses runuser and never sudo, and what holds on macOS and Windows. |
| kill_on_sight.md | The self-check to run before you say you are done. |
Selective read — open the one your change touches:
| Document | Open it when |
| coding_style/naming.md | Naming anything: is_/has_ bools, constant prefixes, banned terms. |
| coding_style/python.md | Writing Python: file and method order, black, Google docstrings. |
| coding_style/typescript.md | Touching hub/frontend/: no any, import type, API types mirror the backend models. |
| coding_style/kotlin.md | Touching client/android/: PascalCase files, ktlint, one Exceptions.kt, refusals as sealed results, no !!. |
| coding_style/swift.md | Touching client/ios/: PascalCase files, swift-format, one Error enum per target, no force unwrap. |
| coding_style/go.md | Touching transport/ or agent/sshserver/: gofmt and vet, lowercase package directories, one errors.go per package, errors wrapped with %w, no panic, every goroutine owned by a context. |
| design/protocol.md | Adding or renaming any endpoint, frame, kind or code: the three ports, path rules and the verb table, refusals as {code, params}, every route, the channel's frames, kinds and sections, versioning by protocol number. |
| design/transport.md | Touching transport/, the agent port, or anything a client or an App share reaches through it: the doors the first bytes pick, the member header and its per-hub magic, the knock and the handshake, the guest path of an App share, what each link holds, TCP first, the stream layer and its timings, the ways the port is reached, what the hub spends before admission and the limits on it, admission and the binding, an agent of 0.5, the local channel between each transport and its Python, and why the hub relays every stream; each design with its reason. |
| design/web_share.md | Touching share_page/ or what an App share's visitor sees: the files and the sites, the connection and its timeouts, the app in the page, what the page keeps, and the four screens. |
| design/demo.md | Touching demo/, or a type in hub/frontend/src/api_types.ts or a function of client/desktop/frontend/app.js the demo reads: what is real code and what is sample data, the build, and the two checks. |
| design/hub_components/network.md | Touching the router layer: the three engines the hub drives, which modes own a machine's network and which touch nothing, server mode and the system firewall on macOS and Windows, and why it does not build on NetworkManager. |
| design/hub_components/proxy.md | Touching the proxy: the scopes and what each diverts, exit selection, where every lookup resolves, what an overlay member can do, the consequences of a dead exit. |
| design/hub_components/ai.md | Touching the AI gateway: how a request routes, the gateway-owned model namespace, what each AI panel surface owns, metering, each model's context length and its table of known models. |
| design/agent.md | Touching the agent: the hub and root as its only authorities, the four module states and want, the root-only control socket, the platform layer for Linux, Windows and macOS. |
| design/agent/module_template.md | Touching any device module: the kinds by how a module runs and each runner, the run and the publish of a program run as an account, the hub side, what a module owns and what modules/shared/ holds, icons, the disk layout. |
| design/agent/module_install.md | Touching how software reaches a machine: the manifest and its platform entries, the five install methods (agent, builtin, system, hub, container), artifacts and digests, a Python environment, every download's sources, the source sets and how one source is chosen, the one presence check, module versions, what an uninstall removes. |
| design/agent/modules/ | Touching one device module: one page per module (terminal.md, remote_desktop.md, file_share.md, gitea.md, ollama.md, comfyui.md, containers.md, vscode.md, code_server.md, cloudcli.md, codeg.md, dsh.md, siyuan.md, hermes_webui.md, ayakaleaf.md, astrbot.md, codex.md, claude_code.md, opencode.md), design/agent/ai_tools.md beside them for the machine's AI tools setting, and design/agent/accounts.md for a machine's accounts: the default account, the one module table with the accounts each module serves, several, one or none, and what follows each account's AI switch. |
| design/tests.md | Writing or moving any test: the seven blocks (agent / client / hub / go / android / ios / integration), the mirror rule, what each area pins, what a change owes. |
| design/visual.md | Touching panel CSS: what the accent and the glow may mean, button tiers, frames. |
| design/ui_behavior.md | Touching panel pages or components: which idiom a screen reuses, per-panel apply bars, effect timing, ask before inventing an interaction. |
| design/client.md | Touching any client (client/desktop, client/android, client/ios): the one state document, the layout, the button rule, refresh, and every page's state machines; the three clients change together. |
| design/class_design.md | Adding a class: one concept per class, explicit __init__ kwargs. |
| design/class_hierarchy.md | Naming a class: the per-package <Domain><Thing><Role> families. |
| design/repository_tree.md | Adding a directory to the source tree, or unsure what an existing one is for. |
| misc/config.md | Touching config/: which files are secrets, how examples map to real ones. |
| misc/operations.md | Verifying an install, or running the appliance. |
| doc-author/ | Writing any .md: the gate before drafting, the kind of page, the rules and budgets, each language's register, the checklist after. |
| design/min_support.md | Changing a dependency, a build container, or a Depends or Requires line: the glibc floor of each package and what sets it, the versions the hub, the agent and the client require of the system, and how a build holds the floor. |
| agent_work_rule/release.md | Cutting a release: the tag, the changelog prefixes, and which package each platform installs. |
Commands
pip install -e "hub[dev]" # nhub, black, pytest, pytest-xdist, pytest-cov, detect-secrets
pip install -e agent # nagent
pip install -e client/desktop # nclient
black --check hub agent client packaging # REQUIRED before every commit
nhub scan-secrets # REQUIRED before every commit
cd hub && pytest -q -n 16 --dist loadgroup # hub tests
cd agent && pytest -q -n 16 --dist loadgroup # agent tests
cd client/desktop && pytest -q -n 16 --dist loadgroup # desktop client tests
cd transport && go vet ./... && go test -race ./... # the transport
cd agent/sshserver && go vet ./... && go test -race ./... # the agent's SSH server
cd client/android && ./gradlew test lint # Android app tests and lint
cd client/ios && xcodegen generate && xcodebuild test -scheme Neutrino \
-destination 'platform=iOS Simulator,name=iPhone 16'
# iOS app tests, on macOS
cd hub/frontend && npx prettier --check src && npx eslint src --max-warnings 0
cd hub/frontend && npm run build # REQUIRED after frontend changes
# builds into neutrino_hub/data/frontend/
sudo nhub apply --dry-run # render everything, no effects
sudo systemctl restart neutrino_hub_web # deploy the panel on an installed boxThe secret scan is a gate, not advice. A finding is either real and removed, or
safe and marked scan: allow on its line. Never narrow a rule to silence it.
Config
config/<module>/*.json is the only source of truth. Every change is a write
there, then render → validate → apply; the panel and nhub apply drive
the same pipeline, and nothing hand-edits /etc. Real files holding secrets are
.gitignored with a committed <name>.example.json beside them. Backing up
config/ reproduces the appliance. Details: misc/config.md.
Architecture
hub/
neutrino_hub/ The hub package. One top-level name, so nothing it
installs can collide in site-packages.
modules/<name>/ One feature module each: config.py / renderer.py /
ops.py / constants.py / provisioner.py. Pure library.
system/ Wrappers around OS invocations.
platforms/ What differs between Linux, macOS and Windows: the
roots, the process controller, the firewall.
utils/ Generic helpers shared by every package.
web/ FastAPI panel: routers/, auth, models.
cli/ Every entry point behind `nhub`.
data/ Ships inside the package: services/ unit templates,
manifests/ the device software catalog, examples/ the
committed *.example.json, frontend/ the built panel,
resources/ the icons copied in at build time.
frontend/ React + TypeScript source. Builds into data/frontend/.
tests/
agent/
neutrino_agent/ The device agent: Linux, Windows, macOS; root,
headless. Pure standard
library, no dependencies.
modules/<name>/ One device module each; modules/shared/ what every
module runner shares: the package and unpack
machinery, the account service layer, the forwarder.
sshserver/ The agent's own SSH server, a Go module of its own.
tests/
transport/ The Go module of the channel the hub, the agent and
the clients carry: the knock, the Noise handshake,
the yamux sessions, the relay, the local channel,
and the WebRTC gate of an App share's guests.
client/
desktop/
neutrino_client/ The client: a person's session on Linux, Windows or
macOS; a tray and a window.
frontend/ The client window's page: plain HTML/CSS/JS, no toolchain.
packaging/ deb and rpm builds of the compiled client, and the
payload every package stages.
tests/
android/ The Android app: Gradle, Kotlin, Jetpack Compose.
AGPL-3.0.
ios/ The iOS app: XcodeGen, Swift, SwiftUI. AGPL-3.0.
share_page/ The page an App share link opens in a visitor's
browser: plain JavaScript, hosted as static files.
demo/ The panel demo the website serves at /demo/: the fake
hub and its sample data around the panel's own source
and the client page.
packaging/ build/ one script per release target, shared/ what
they share, ci/ the post-install checks, install/ the
one-command install scripts, lab/ the VM lab,
integration/ the suite that runs on a box.
config/ Source of truth at runtime. Real files gitignored.
/etc/neutrino/hub once installed.
skills/core-code-author/ This standard. The single source of truth for rules.
skills/doc-author/ How every .md is written: the gate, the page kinds,
the two registers, the checklist.
images/ Source artwork and README screenshots. Ships nowhere
directly — packaging copies images/icons in at build
time.Do not put main(), argparse, or wiring-config classes in a library
module — execution lives in neutrino_hub/cli/<name>.py, and each of those is
a subcommand of nhub.
Full tree: design/repository_tree.md.
Conventions that bite
These are the ones agents get wrong most often. Each is spelled out with examples in the document named beside it.
- Renderers are pure. No
systemctl,nftoripin a renderer; effects belong in the apply layer. Do not break theconfig/ → render → applyseparation. (design/architecture.md) - Bools read as questions.
is_/has_on variables, attributes, Pydantic fields,config/JSON keys and TypeScript fields alike. (coding_style/naming.md) - No narrated reasoning. Not in comments, docstrings, UI copy, or error
messages. Rationale goes in the design pages, under
skills/core-code-author/design/. (coding_style/comment.md) - One exceptions table per package. A raise site uses Python's own kind
when one says it; a kind of the package's own is declared in
<package>/exceptions.pyand nowhere else, and every public docstring carriesRaises:. (coding_style/exception.md) - English only, including when translating comments you find. (coding_style/comment.md)
- Smallest change that works. No restructuring you were not asked for, no layer for a case nobody has. (coding_style/comment.md)
- A reset hands the network back before it replaces
config/, and takes no address off anything.config/is the only record of which interfaces had units on them, and an interface losing its address mid-reset drops the session that asked for it. (design/hub_components/network.md) - Never commit unasked. When work looks done, ask. A commit is a finished, tested feature. (agent_work_rule/commit.md)
sudonever appears in the hub's own code. The panel is already root, so reaching a service account isrunuser -u <account> --; sudo refuses to run under the unit'sNoNewPrivileges. (design/privilege.md)- Documents open with a definition and never end with a summary. No "note that", no recap section, no em dash inside a sentence, no verb a machine does not perform. (doc-author/SKILL.md)
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.

