Borrowing it
Nothing to install: this file belongs to lujoai/Lujo-MCP. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/lujoai/Lujo-MCP/main/AGENTS.mdgit clone --depth 1 https://github.com/lujoai/Lujo-MCPWrote 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.
[](https://agentmods.dev/instructions/lujoai/lujo-mcp/agents-md)<a href="https://agentmods.dev/instructions/lujoai/lujo-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/lujoai/lujo-mcp/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.
<a href="https://agentmods.dev/instructions/lujoai/lujo-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/lujoai/lujo-mcp/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.01341 | $0.01341 |
| Opus 5 | $0.00671 | $0.00671 |
| Sonnet 5 | $0.00268 | $0.00268 |
| Haiku 4.5 | $0.00134 | $0.00134 |
Grade A, and why
Lujo-MCP 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.
How it starts
The opening of the file, as written. The whole thing — 274 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Lujo-MCP 项目执行规则
本文件是 Lujo-MCP 的项目级 Codex 规则。
同时遵守全局 AGENTS.md。
全局规则负责:
- Plus 额度控制
- Main / Luna-Max 分工
- 多智能体策略
- Git 通用规则
- 上下文效率
本文件只补充 Lujo-MCP 项目自己的架构、不变量、 测试、存储、安全与开发纪律。
1. 开始修改代码之前
任何 AI 修改 Lujo-MCP 代码前必须先阅读:
AGENTS.mddocs/internal/AI_HANDOFF.md中 Architecture Frozen- 当前任务直接相关的
DEV_PLAN - 当前任务直接相关的
CODE_REVIEW - 本任务涉及的实现与测试
不需要每轮完整读取所有历史版本记录。
不要每次重新读取:
- 完整 CHANGELOG 历史
- CODE_REVIEW 所有历史发布记录
- DEV_PLAN 所有旧版本
- 所有 DESIGN 文档
- 整个仓库
只读取当前任务所需部分。
2. Architecture Frozen
严格遵守 AI_HANDOFF.md 中 Architecture Frozen 的规则。
新增能力前必须先判断:
- 属于哪个 Layer
- 为什么属于这个 Layer
- 要修改哪些文件
- 是否改变依赖方向
- 是否跨越架构冻结边界
如果 Layer 归属不明确:
先停止实现, 由主智能体判断。
不得让子智能体自行突破 Architecture Frozen。
3. 产品定位
当前产品定位:
- 单用户
- 本地自用
- 本地安装
- 供 Claude / Codex / Trae 等宿主智能体调用
- Lujo 负责采集、关联和查询运行现场
- 宿主智能体负责推理和修改业务代码
默认不把 Lujo 当成中央多人共享服务。
中央共享 PostgreSQL 下的多人 / 多项目隔离 目前不是承诺支持的产品场景。
未经明确立项:
不得新增:
- project_id
- tenant_id
- namespace
- 多租户 schema
- 强制 session_id
4. 必须保持的核心不变量
任何修改不得破坏:
stdio
- stdout 必须保持纯 MCP 协议
- 日志必须走 stderr
- 不得向 stdout 输出 debug 信息
Security
- 脱敏必须发生在存储边界之前
- 路径白名单必须保留
- 认证保持 fail-closed
- 安全默认值不得静默放宽
Storage
STORAGE_BACKEND默认保持memory- 不得未经明确计划改变默认持久化行为
- memory 与 PostgreSQL 应尽可能保持行为语义一致
HTTP / stdio
HTTP 与 stdio 应尽可能:
- 共用 handler
- 共用校验
- 共用门控
- 共用工具失败语义
不得让两个传输层长期产生不同业务契约。
MCP Tool errors
工具真正失败时必须通过正确的:
isError
语义暴露。
验证类工具的“验证结论为失败”与“工具执行失败” 不得混为一谈。
5. session_id 与项目隔离
当前契约:
session_id 缺省 = 不过滤
不要把它写成:
- 必填
- 总是必须传
- 所有工具都必须有 session_id
memory 后端默认按 Lujo 进程隔离。
stdio-only:
--no-http
时不同宿主窗口的进程天然隔离。
多个项目同时启用 HTTP 采集时:
每个项目使用不同:
--http-port
Browser SDK 的 endpoint 必须指向对应 Lujo 实例。
未经正式立项:
不要通过 schema 增加 project 维度解决该问题。
6. PostgreSQL / asyncpg
测试默认必须保持与开发者真实 PostgreSQL 隔离。
不得因为本机 .env 配置 PostgreSQL,
让普通 unit / integration / e2e 测试意外写入真实数据库。
真库测试必须显式开启。
当前长期需要单独验证的 PG / asyncpg 风险包括:
- PG error upsert 节流键目前需要核实
(fingerprint, session)语义。
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.
- yesterday First seen · 274 lines · 1,341 tokens per session scan A e881239ba015
Lujo-MCP AGENTS.md is an instructions file published in the GitHub repository lujoai/Lujo-MCP (1 stars, last pushed today), licensed MIT. It adds 1,341 tokens to every session, about $0.0067 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-09-10.
Other instructions, from other repositories
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.
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
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).
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
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.