hotplex: Instructions file for Codex

AGENTS.md

hotplex AGENTS.md is an instructions file for Codex, OpenCode from hrygo/hotplex. It costs 4,779 tokens per session, scanned A, original, Apache-2.0.

Project instructions stored in an AGENTS.md file for HotPlex, covering its Go code conventions, tests, workers, network protocol, persistence, database migrations, logging, and shutdown behavior.

In plain words
What is it for?
Use them when implementing, reviewing, testing, or restarting parts of the HotPlex project.
Why use it?
They give agents the project’s specific rules for changing code safely, including requirements that related adapters, SDKs, migrations, and tests stay in sync.

Instructions file for CodexOpenCode

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

This is hrygo/hotplex's own configuration. It tells Codex and OpenCode how to work on hotplex 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 hotplex configures →

Reuse

Borrowing it

Nothing to install: this file belongs to hrygo/hotplex. 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/hrygo/hotplex/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/hrygo/hotplex

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 hotplex AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/hrygo/hotplex/agents-md/github.svg)](https://agentmods.dev/instructions/hrygo/hotplex/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/hrygo/hotplex/agents-md"><img src="https://agentmods.dev/badge/instructions/hrygo/hotplex/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 hotplex AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/hrygo/hotplex/agents-md"><img src="https://agentmods.dev/badge/instructions/hrygo/hotplex/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 4,779 This file is loaded in full into every session.
When invoked 4,779 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.04779 $0.04779
Opus 5.5 $0.01912 $0.01912
Sonnet 5.5 $0.00956 $0.00956
Haiku 4.5 $0.00478 $0.00478

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

Security

Grade A, and why

hotplex 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 18d 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 · 210 lines

How it starts

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

HotPlex 项目知识库

最后更新: 2026-10-09 · 分支: main · 版本: v1.52.0 · 提交: 4119b288


约定与规范

必须遵守

  • Mutex: 显式 mu 字段,不嵌入,不传指针
  • 错误: Err 前缀(哨兵)、Error 后缀(自定义)、fmt.Errorf("%w") 包装
  • 日志: log/slog JSON handler(key 一律 snake_case,sloglint 强制 no-mixed-args)
  • 测试: testify/require、table-driven、t.Parallel()、单模块 ≤5s(-count=1 -race -shuffle=on)、禁止 time.Sleep 等待异步结果(改用 require.Eventually 或 channel 信号)
  • Worker 注册: init() + worker.Register() 模式
  • Worker 接口变更: 同步更新全部 adapter、测试 mock、internal/worker/noop 与 registry_test;新增能力须明确其在 CLI、单例和 RPC Worker 上的语义
  • AEP wire contract: 修改 pkg/events 的 Kind、Data 或 JSON tag 时,同步更新 Go SDK、三种示例 SDK、docs/reference/{aep-protocol,events}.md 与双向协议测试;新增字段必须向后兼容
  • 持久化输入: Gateway 负责 accept → ACK → Worker 投递,execution 只保存 SHA-256 payload 指纹,绝不保存 prompt、metadata 值、凭证或原始 Worker 错误
  • 数据库迁移: SQLite 与 PostgreSQL migration 必须成对新增;同步补 migration 与跨实例/条件更新测试,禁止只修一套方言
  • 关闭顺序: signal → cancel ctx → tracing → hub → bridge → sessionMgr → HTTP
  • 服务重启: 必须使用 hotplex service restart 原子指令,禁止手动拆分 stop && sleep && start(仅二进制替换场景需手动 stop 等待)
  • 非 main 分支 push: 非 main 分支本地验证通过后直接 commit + push,无需询问用户确认
  • Git Hooks: clone 后必须安装 hooks(底层目标为 make hooks;pre-commit 跑 gofmt + golangci-lint,pre-push 跑完整质量门禁),禁止跳过;rtk 可用时执行 rtk proxy make hooks,不可用时执行原生 make hooks 并说明回退原因
  • RTK 未过滤执行例外:以下规则仅适用于执行环境中可用 rtk(可用 command -v rtk 或 rtk --version 确认)。make docs-lint、make quality、make build、make hooks 存在输出解析失败记录;rtk 可用时必须分别通过 rtk proxy make docs-lint、rtk proxy make quality、rtk proxy make build、rtk proxy make hooks 执行,以保留原始诊断输出。rtk 不可用时,允许执行对应的原生 make 命令,但必须说明未经过 RTK 过滤与统计;不得因本规则擅自安装 RTK。

反模式(禁止)

  • ❌ sync.Mutex 嵌入或传指针
  • ❌ math/rand 用于加密
  • ❌ Shell 执行(仅允许 claude 二进制)
  • ❌ 硬编码路径分隔符
  • ❌ 直接使用 POSIX 信号
  • ❌ 用 sed/awk 插入或修改源码行(缩进不可控,必须用 Edit 工具)

代码编辑规则

  • Edit 工具优先:修改源码必须使用 Edit 工具,禁止用 sed -i 插入或修改代码行
  • Edit 匹配失败时:重新 Read 文件获取精确内容,用精确字符串重试 Edit;扩大上下文使其唯一
  • Go 文件 tab 缩进:Go 项目使用 tab 缩进(gofmt 标准)。使用 Edit 工具时,old_string 必须从 Read 输出中直接复制原文(保留 tab),禁止手敲空格缩进。Edit 匹配失败时先用 cat -A 确认实际空白字符
  • sed 适用场景:仅限非代码操作(config 快速替换、日志过滤等简单唯一 token 替换)

Read the full file on GitHub · 210 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. 18d ago Changed 0388f62b7a61
  2. 23d ago Changed · +1 tokens per session f3168dd0b6c0
  3. 1mo ago Changed · +6 lines · +196 tokens per session 3a7e03450937
  4. 1mo ago Changed · -2 tokens per session 578af0649a14
  5. 1mo ago Changed · +1 tokens per session b71b88987b84
  6. 1mo ago First seen · 204 lines · 4,583 tokens per session scan A 7289c2526c61

Subscribe to this mod's changes

hotplex AGENTS.md is an instructions file published in the GitHub repository hrygo/hotplex (51 stars, last pushed 19d ago), licensed Apache-2.0. It adds 4,779 tokens to every session, about $0.0191 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