nexus: Instructions file for Codex

AGENTS.md

nexus AGENTS.md is an instructions file for Codex, OpenCode from nexus-research-lab/nexus. It costs 2,746 tokens per session, scanned A, original, Apache-2.0.

A set of project instructions for nexus-research-lab/nexus, a Go backend and React web application. It defines build checks, commit rules, and a documentation structure linking project rules to code and interfaces.

In plain words
What is it for?
Use it when modifying nexus, especially when choosing validation commands, writing commits, updating the changelog, or maintaining the project’s layered documentation.
Why use it?
It tells coding agents which checks to run for ordinary changes and when full testing is needed. It also keeps code, comments, specifications, and public interfaces aligned.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions subagents; mentions Claude Code; mentions AGENTS.md.

This is nexus-research-lab/nexus's own configuration. It tells Codex and OpenCode how to work on nexus itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything nexus configures →

Reuse

Borrowing it

Nothing to install: this file belongs to nexus-research-lab/nexus. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/nexus-research-lab/nexus/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/nexus-research-lab/nexus

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for nexus AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/nexus-research-lab/nexus/agents-md/github.svg)](https://agentmods.dev/instructions/nexus-research-lab/nexus/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/nexus-research-lab/nexus/agents-md"><img src="https://agentmods.dev/badge/instructions/nexus-research-lab/nexus/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for nexus AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/nexus-research-lab/nexus/agents-md"><img src="https://agentmods.dev/badge/instructions/nexus-research-lab/nexus/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,746 This file is loaded in full into every session.
When invoked 2,746 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.02746 $0.02746
Opus 5.5 $0.01098 $0.01098
Sonnet 5.5 $0.00549 $0.00549
Haiku 4.5 $0.00275 $0.00275

Measured 5d ago against content hash 7601c28a205e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

nexus AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 111 lines

How it starts

The opening of the file, as written. The whole thing — 111 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AGENTS.md

nexus — 用户运行的多 agent 桌面/网页应用;Go 后端 + React web。 技术栈:Go + net/http + WebSocket + SQLite/goose + React19 + Vite + Zustand。

本文件只保存项目宪法:构建门禁、文档分层、依赖方向与工程原则。产品合同一律写在 docs/specs/,见文末索引;不得在本文件追加产品行为细节。

Build & Validation Commands

  • make dev:同时启动同级 Nexus Control(8020)、Go 后端(8010)和前端(3000)
  • make check-architecture:检查生产导入方向与 textutil 私有副本;集成测试可继续通过 app 装配。
  • make check-go:默认 Go 门禁,只检查相对上游及当前工作树中发生变化的 Go 包
  • make check-go-fresh:对上述变化包禁用测试结果缓存
  • make check-go-full:显式运行 Go 全量 vet 与无缓存测试,仅用于发布、跨包基础设施变更或用户明确要求
  • make check:运行增量 Go 门禁、前端 lint、前端时间线行为测试、前端 typecheck
  • make check-backend:Go 后端增量校验,等价于 make check-go
  • make check-normalization:拒绝对已被证明裁剪过的值再调用 strings.TrimSpace(linux/darwin/windows 取交集,约 1 分钟),已并入 make check-go-full
  • make install:执行 go mod tidy 并安装前端依赖
  • NEXUS_SANDBOX_TEST_BINARY=/absolute/nxs make check-desktop-sandbox:显式桌面沙箱基线;macOS/Windows 原生验收入口与必测项见 docs/testing/desktop-sandbox-acceptance.md 与 docs/specs/desktop-sandbox-spec.md。

日常修改先跑目标包测试或 make check-go。Agent 不得默认执行 go test ./... 或 make check-go-full;只有发布、共享协议/基础设施变更、增量范围无法可靠判断,或用户明确要求全量时才执行。

Commit Style

Use English commit messages with an emoji prefix, for example :sparkles: Switch to the Go default runtime path. Keep user-visible changes reflected in CHANGELOG.md.

L1 — 文档地图

代码是机器相,注释是语义相,两相必须同构:任一相变化必须在另一相显现,否则视为未完成。 本仓采用三层分形文档:L1(本文件,项目宪法)→ L2(各 Go 包 doc.go 的 L2 头,成员清单 + 暴露接口)→ L3(业务文件顶部 INPUT/OUTPUT/POS 契约)。跨包产品语义只在 docs/specs/ 保留一份当前规范;internal/protocol 类型、nexus.command MCP schema 与 parser 是线格式真相,Skill 只说明模型决策,API Reference 只说明 transport。未来方案、交付计划和未实现字段必须明确标为 non-normative,不能混入当前规范或由多份文档重复定义。

<directory>
cmd/        - 可执行入口:nexus-server(单个 main.go 装配服务、自动迁移与 runtime 检查;平台实例锁由 infra/desktopinstance 装配)、nexusctl 资源 CLI、nexuscfg 配置 CLI、Linux runtime launcher
web/        - React 前端(features / store / shared / lib,见 web/AGENTS.md)
desktop/    - macOS AppKit/WKWebView、Windows WPF/WebView2 宿主与 Chromium browser-extension
skills/     - 随产品发布的平台内置 Skill(每个目录自含 SKILL.md、元数据、脚本与参考资料)
internal/   - 后端核心(各子包 L2 见其 doc.go):
  protocol/   - 跨 HTTP/WS/前端/运行时的协议真相源与 TS codegen 输入
  runtime/    - nxs/Claude Code 共用宿主主链:bridge client、manager 生命周期、workspace isolation Hook、桌面沙箱资源
  service/    - 业务服务;service/room 只持久化 Room,实时编排在 service/room/realtime;DM 与 Room realtime 共用的宿主依赖和阶段在 service/runtimehost
  chat/       - 对话领域(dm / room)
  handler/    - HTTP / WebSocket 处理器;team 是浏览器到可选多人服务的认证 gateway
  relay/      - Relay 独立跨仓合同;service/relay 是客户端,service/team 负责本机节点登记与执行;handler/team 直连 Relay
  message/    - runtime/SDK 消息 → Nexus 事件与 assistant 快照的投影
  echo/ automation/ - 主动跟进与定时任务领域模型
  mcp/        - 宿主自有工具统一挂在单一 `nexus` MCP server;`nexus.command` 承载 Goal/Execution/Automation/Subagent
  cli/        - nexusctl / nexuscfg 本地命令行装配;模型侧命令不经过 CLI
  app/        - HTTP 与 CLI 共用的显式服务装配、资源所有权与进程生命周期
  config/ storage/ infra/ migration/ version/ - 装配、持久化、基础设施与版本化迁移;infra/textutil 是只依赖标准库的字符串原语叶子包
docs/       - README.md 是索引;guides/ 面向用户与作者,operations/ 面向运维,testing/ 保存回归清单;验收证据留在本地或 CI artifact,不进入公开仓库,specs/ 保存当前维护者合同,explorations/ 保存 non-normative 在研专题
</directory>

Read the full file on GitHub · 111 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago Changed · +11 tokens per session 7601c28a205e
  2. 16d ago Changed · -43 lines · -9,705 tokens per session 909c6785d087
  3. 17d ago Changed · +28 tokens per session 3dbe07b9efa1
  4. 25d ago Changed · -25 lines · -355 tokens per session 7c12de299dfc
  5. 27d ago Changed · +35 tokens per session 8c4752304cee
  6. 28d ago Changed · +121 tokens per session 471c8e17d5bd
  7. 29d ago Changed · +11 lines · +435 tokens per session beab4a494d78
  8. 1mo ago Changed · +2 lines · +99 tokens per session 8747234ac1d8
  9. 1mo ago Changed · +6 lines · +215 tokens per session 2ef80314dd1e
  10. 1mo ago First seen · 160 lines · 11,862 tokens per session scan A 34638390bd66

Subscribe to this mod's changes

nexus AGENTS.md is an instructions file published in the GitHub repository nexus-research-lab/nexus (154 stars, last pushed 2d ago), licensed Apache-2.0. It adds 2,746 tokens to every session, about $0.0110 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 9,715 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,581 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,731 tokens

deno copilot-instructions.md

Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.

denoland/deno · 3,077 tokens