Borrowing it
Nothing to install: this file belongs to lkyprogramer/codex-java-lsp-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/lkyprogramer/codex-java-lsp-mcp/main/AGENTS.mdgit clone --depth 1 https://github.com/lkyprogramer/codex-java-lsp-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/lkyprogramer/codex-java-lsp-mcp/agents-md)<a href="https://agentmods.dev/instructions/lkyprogramer/codex-java-lsp-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/lkyprogramer/codex-java-lsp-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/lkyprogramer/codex-java-lsp-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/lkyprogramer/codex-java-lsp-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.01080 | $0.01080 |
| Opus 5.5 | $0.00432 | $0.00432 |
| Sonnet 5.5 | $0.00216 | $0.00216 |
| Haiku 4.5 | $0.00108 | $0.00108 |
Grade A, and why
codex-java-lsp-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 — 39 lines — stays where its author put it; the contents beside it link to each section on GitHub.
仓库工作约定
真源与边界
- 当前状态只看 HANDOFF.md 开头的两节"当前…";
docs/phase-*、docs/deep下带日期的计划和报告是历史,不作为实现依据。例外:docs/deep/ilv2-mac-manual/是现行执行合同。 - 生产可达性以
scripts/ilv2-mac-removed-paths.mjs为准;test-only 文件的问题不按生产缺陷处理。 - 公共工具面固定 5 个(
java_status、java_symbol、java_impact、java_diagnostics、java_runtime);不修改目标 Java repo;JDT 是可选增强,静态路径正确性优先。
实现规则
- 写新 helper 前先用 rg 找现有实现:
- 写事务:
src/java-index/sql/driver.ts的withTransaction(总是开新事务);可能被嵌套调用的写入口用同文件的runInWriteTx(已在事务中就加入)。 - SQLite 整数列转 number:
driver.ts的toSafeInt(超出安全整数即抛错)。 - 原子写文件(tmp 再 rename):
src/atomic-file.ts的writeFileAtomic(async)和writeFileAtomicSync;新代码不得再手写 tmp+rename。例外:snapshot-store的 observations 和publication-history故意用固定 tmp 名,崩溃后最多残留一个文件,不要迁移。 - 分块绑定:
driver.ts的bindChunks,extraBinds必填,填同一语句里其余?的个数。
- 写事务:
- 降级的 catch 先调用
src/runtime/intelligence-error.ts的rethrowIfTerminal(error)(DEADLINE_EXCEEDED、CANCELLED必须抛到请求边界);降级处必须注释原因;对外错误用JavaIntelligenceError(code, message, cause),不得丢失 code 和 cause。 - 不新增
any、as unknown as、非空断言!;外部输入用 zod 或类型守卫收窄。 - 新建的 child、stream、server、worker 必须监听
error;timer 和 fd 必须有释放点;close、dispose、shutdown 用 try/finally 和Promise.allSettled保证异常安全。 - 跨进程锁和 lease 不得"检查后直接 rm";回收前必须在锁内重新确认 ownerToken。
- 偏移和列号必须标明单位(byte / UTF-16 / line),跨单位必须显式换算,并测试非 ASCII 输入。
- 测试或验证专用行为必须由
JAVA_LSP_ISOLATED_VALIDATION=1或显式选项门控,默认关闭。 - 不新增被 .gitignore 忽略的跟踪文件;
artifacts/v3-*是冻结的历史证据,只读,不在artifacts/下新增跟踪文件。新增脚本须被 package.json、其他脚本或 scripts/README.md 引用。
机器门禁
npm run lint(eslint,基线eslint-suppressions.json)和npm run check:hygiene(基线scripts/repo-hygiene-baseline.json)都在gate:pr里,只拦新增问题。- 基线只减不增:修掉存量后用
npm run lint:prune收紧;check-repo-hygiene.mjs --write-baseline只用于经评审的重置,不得用来放行新问题。
测试
- 修缺陷先写一个会失败的回归测试;必须覆盖的边界:空、上限、上限+1、非 ASCII、取消、deadline。
- 不得削弱断言、扩大 mock、skip 测试或用 sleep 等待。
测试与验证
- Mac 长时间验收预计超过 5 分钟、涉及多道工程门或需要索引冷启动时,执行前阅读 Mac 长时间测试验证规范。按规范准备后台脚本、阶段日志和终态交接。需要自动接续时,将 Heartbeat 绑定到当前对话。
- 迭代中运行
npm run gate:pr;提交前按 README 运行 compile 与 full 两个 profile(在线 runtime 并存时,npm run不能作为正式证据,见 README)。 - 汇报时区分:已运行并通过 / 已运行但失败(附错误)/ 未运行(说明原因)。
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 Changed · +33 lines · +981 tokens per session 6712677b2737
- 3d ago First seen · 6 lines · 99 tokens per session scan A 66d765481d7c
codex-java-lsp-mcp AGENTS.md is an instructions file published in the GitHub repository lkyprogramer/codex-java-lsp-mcp (1 stars, last pushed yesterday), licensed Apache-2.0. It adds 1,080 tokens to every session, about $0.0043 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-11-14.
codex-java-lsp-mcp AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| codex-java-lsp-mcp AGENTS.mdlkyprogramer/codex-java-lsp-mcp | Instructions file | 1 | yesterday | Apache-2.0 | A | 1,080 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 196k | today | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 144k | yesterday | MIT | A | 8,130 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 196k | today | MIT | A | 5,685 | GitHub Copilot |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 150k | today | MIT | A | 4,680 | Codex, OpenCode |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 196k | today | MIT | A | 3,153 | GitHub Copilot |
| generative-ai-for-beginners AGENTS.mdmicrosoft/generative-ai-for-beginners | Instructions file | 124k | today | MIT | A | 2,981 | Codex, OpenCode |