Yuxi AGENTS.md

A set of project instructions for working on Yuxi, a knowledge-base and multi-agent application built with LangGraph, FastAPI, Vue, and data-storage services.

In plain words
What is it for?
Planning and implementing Yuxi changes, locating the correct code owners, following its review and evidence process, and running the appropriate tests.
Why use it?
It gives an agent the project's architecture, testing rules, workflow, and facts that must not be broken before making changes.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/xerrors/yuxi/agents-md
Clone the repo
git clone --depth 1 https://github.com/xerrors/Yuxi

Made for: Codex, OpenCode.

Per session 1,873 This file is loaded in full into every session.
When invoked 1,873 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.01873 $0.01873
Opus 5 $0.00937 $0.00937
Sonnet 5 $0.00375 $0.00375
Haiku 4.5 $0.00187 $0.00187

Measured yesterday against content hash 70fc05bf1261, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

Yuxi 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 yesterday.

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 · 78 lines

How it starts

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

Yuxi Agent 开发约定

Yuxi 是基于 LangGraph、FastAPI、Vue 和多种持久化服务构建的知识库与多智能体平台。Docker Compose 是开发拓扑的事实来源;修改不熟悉的模块前先阅读 ARCHITECTURE.md,再用符号搜索确认真实实现。

每次任务先加载什么

  • ARCHITECTURE.md:稳定边界、主链路和架构不变量。
  • Yuxi Spec Loop:非平凡变更从提案、证据到收敛的流程。
  • 工程信任系统:语义 Owner、证据、决策记录、派生审计和 gate 规则。
  • 测试规范:unit、integration、E2E 的职责与命令。
  • 贡献指南:分支、独立 Review、commit 和 PR 流程。
  • 用户在当前任务中的明确要求优先于本文件;修改 backend/web/docs/ 时同时遵循该子树的 AGENTS.md。子树规则只补充本目录,不复制回根文件。

任务与决策

  1. 开始实现前,把请求压缩为可验证的目标、非目标和验收主张;多步任务先给出每步带验证方式的简短计划。
  2. 假设显式记录后继续;只有当不同解释会改变验收结果、数据、安全或外部状态时才阻塞询问,并把候选解释一并列出而不是默默选择其一。存在明显更简单的方案时,先说明取舍再动手。
  3. 把"可以""也可以""类似这样""例如"当作简单方向,不是设计更大机制、配置项或兼容层的许可。
  4. 在真实语义 Owner 处闭合受影响的工程主张:源码、数据约束或当前契约拥有事实;独立 oracle 与负向案例证明它;实际 workflow 或可问责 Reviewer 产生拒绝后果。不要建立可独立编辑的中央主张清单或 claim ID 体系。
  5. 非平凡变更必须新增或更新一份 tracked 决策记录。记录问题、当前决定、真实替代项、后果和验证,不保存推理流水账或实现过程叙事。
  6. docs/vibe/ 只用于本地临时计划,被 Git 忽略,不是组织记忆,也不能作为已完成事实的唯一来源。
  7. 只修改验收标准需要的范围;不顺手重构、格式化或添加想象中的配置、兼容层和扩展点。

不能破坏的系统事实

  • HTTP 路由保持薄;用例流程属于 yuxi.services,持久化查询属于 yuxi.repositories
  • 普通请求先在 PostgreSQL 中持久化 Message 和 AgentRunRequest;只有 ready FIFO 队头创建 AgentRun,且每次投递 ARQ 前 owning transaction 都已提交。Redis 负责投递、短期事件、取消和缓存,不拥有最终业务状态。
  • 同一用户、Agent、线程的普通请求按 FIFO 串行派发;Request 和 Run 是不同状态模型。
  • AgentRun 的输出、事件、artifact 和错误必须绑定同一 request/run;禁止从相邻 Run 猜测结果。
  • 非终态 Run 必须有明确执行 Owner、lease/heartbeat 或等价机制,以及崩溃后的可观察结局。
  • /api/system/health 只表达进程 liveness;接流量前置条件由 /api/system/ready 证明,业务正确性仍由真实链路测试证明。
  • LangGraph checkpoint 只使用 PostgreSQL;API、worker 与 Agent 不提供本地后端选择或静默降级。
  • 权限在后端依赖与 repository 可见性查询处最终执行;前端守卫、prompt、schema omission 和 UI 隐藏不是授权边界。
  • LITE 的 shipping 启动、路由注册和能力发现不得导入或初始化知识库、图谱和评估的重运行时;仍保留的附件解析入口只在真实解析动作发生时惰性加载 parser。
  • 沙盒虚拟路径、对象 URL 和宿主机路径不可混用;所有用户路径必须在 owning filesystem boundary 校验。

证据规则

  • Agent 的完成报告、HTTP 200、日志关键词或 mock 调用次数都不是最终事实;重新读取数据库、文件、对象、DOM 或协议结果。
  • 每个新 guard 都要有一个能恢复目标缺陷并使其在正确原因上失败的负向测试。
  • 测试从最小相关集合开始,再按风险扩大;不要用 unit 结果替代真实 PostgreSQL、真实 HTTP、worker 或浏览器语义。
  • Expected output、snapshot 和 fixture 只能显式更新并审阅;CI 不得一边生成 oracle 一边验证 oracle。
  • 实际执行命令、结果和未执行原因写入 PR;未验证不能写成通过。

Read the full file on GitHub · 78 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. yesterday First seen · 78 lines · 1,873 tokens per session scan A 70fc05bf1261

Subscribe to this mod's changes

Yuxi AGENTS.md is an instructions file published in the GitHub repository xerrors/Yuxi (6,591 stars, last pushed yesterday), licensed MIT. It adds 1,873 tokens to every session, about $0.0094 per session on Opus 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

full-stack-ai-agent-template CLAUDE.md

Instructions for vstorm-co/full-stack-ai-agent-template, covering claude.md, project overview, commands, install dependencies and run tests.

vstorm-co/full-stack-ai-agent-template · 1,305 tokens

full-stack-ai-agent-template AGENTS.md

Instructions for vstorm-co/full-stack-ai-agent-template, covering agents.md, project overview, commands, cli and architecture.

vstorm-co/full-stack-ai-agent-template · 979 tokens

txtify CLAUDE.md

Instructions for lkmeta/txtify, covering txtify — agent guide, architecture (read this before touching job flow), commands, invariants & known traps and conventions.

lkmeta/txtify · 1,409 tokens

openharness AGENTS.md

Instructions for mifunedev/openharness, covering open harness — orchestrator, what open harness is, 1. agent work stays inside the sandbox, 2. coding-harness choice does not change the workspace and 3. remote and unattended operation are normal.

mifunedev/openharness · 2,014 tokens

pulse8-ai-cortex-knowledge-vault AGENTS.md

Instructions for synpulse8-opensource/pulse8-ai-cortex-knowledge-vault, covering agents.md — pulse8.ai cortex, repository map, environment variables, essential commands and dependencies.

synpulse8-opensource/pulse8-ai-cortex-knowledge-vault · 974 tokens

GooFish-AIMonitor AGENTS.md

Instructions for tristanwqy/GooFish-AIMonitor, covering agents.md — 给 ai 协作者的工程指南, 黄金规则(先读这条), 验证命令(完成前必跑), 代码地图 and 数据模型要点.

tristanwqy/GooFish-AIMonitor · 1,839 tokens