Lujo-MCP: Instructions file for Codex

AGENTS.md

Lujo-MCP AGENTS.md is an instructions file for Codex, OpenCode from lujoai/Lujo-MCP. It costs 1,341 tokens per session, scanned A, original, MIT.

Project-specific instructions for Lujo-MCP, a local service that collects, connects, and queries information about an agent's work. They define coding rules, fixed architecture boundaries, testing expectations, storage handling, and security requirements.

In plain words
What is it for?
Use them when an agent works on the Lujo-MCP repository. They guide task preparation, architecture decisions, secret handling, authentication, and the separation between the local service and the host agent.
Why use it?
They tell coding agents what to read and what must not be changed before modifying the project. This helps prevent unsafe security changes, broken protocol output, and accidental architecture changes.

Instructions file for CodexOpenCode

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

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

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/lujoai/Lujo-MCP/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/lujoai/Lujo-MCP

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 Lujo-MCP AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/lujoai/lujo-mcp/agents-md/github.svg)](https://agentmods.dev/instructions/lujoai/lujo-mcp/agents-md)
Your own site
<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.

agentmods 80×15 button for Lujo-MCP AGENTS.md

Your own site · 80×15
<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>
Per session 1,341 This file is loaded in full into every session.
When invoked 1,341 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.01341 $0.01341
Opus 5 $0.00671 $0.00671
Sonnet 5 $0.00268 $0.00268
Haiku 4.5 $0.00134 $0.00134

Measured yesterday against content hash e881239ba015, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

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.

AGENTS.md · 274 lines

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 代码前必须先阅读:

  1. AGENTS.md
  2. docs/internal/AI_HANDOFF.md 中 Architecture Frozen
  3. 当前任务直接相关的 DEV_PLAN
  4. 当前任务直接相关的 CODE_REVIEW
  5. 本任务涉及的实现与测试

不需要每轮完整读取所有历史版本记录。

不要每次重新读取:

  • 完整 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 风险包括:

  1. PG error upsert 节流键目前需要核实 (fingerprint, session) 语义。

Read the full file on GitHub · 274 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 · 274 lines · 1,341 tokens per session scan A e881239ba015

Subscribe to this mod's changes

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.

Related

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.

vercel/next.js · 7,296 tokens

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.

openai/codex · 5,153 tokens

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 · 6,785 tokens

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.

github/spec-kit · 7,104 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, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 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,469 tokens