codex-java-lsp-mcp: Instructions file for Codex

AGENTS.md

codex-java-lsp-mcp AGENTS.md is an instructions file for Codex, OpenCode from lkyprogramer/codex-java-lsp-mcp. It costs 1,080 tokens per session, scanned A, original, Apache-2.0.

A repository instruction file for a Java language-server project, with a specific rule for long-running tests and acceptance checks on Mac. It says to prepare background scripts, logs and a final handoff when those checks take a long time.

In plain words
What is it for?
Use it when carrying out long Mac tests, cold-start indexing or several verification steps that need staged logs and an automatic continuation mechanism.
Why use it?
It helps prevent lengthy verification work from being run without progress tracking or a clear final result. The available description does not specify further coding behaviour.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md.

This is lkyprogramer/codex-java-lsp-mcp's own configuration. It tells Codex and OpenCode how to work on codex-java-lsp-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 codex-java-lsp-mcp configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/lkyprogramer/codex-java-lsp-mcp/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/lkyprogramer/codex-java-lsp-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 codex-java-lsp-mcp AGENTS.md

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

agentmods 80×15 button for codex-java-lsp-mcp AGENTS.md

Your own site · 80×15
<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>
Per session 1,080 This file is loaded in full into every session.
When invoked 1,080 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.01080 $0.01080
Opus 5.5 $0.00432 $0.00432
Sonnet 5.5 $0.00216 $0.00216
Haiku 4.5 $0.00108 $0.00108

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

Security

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.

AGENTS.md · 39 lines

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)。
  • 汇报时区分:已运行并通过 / 已运行但失败(附错误)/ 未运行(说明原因)。

Read the full file on GitHub · 39 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 Changed · +33 lines · +981 tokens per session 6712677b2737
  2. 3d ago First seen · 6 lines · 99 tokens per session scan A 66d765481d7c

Subscribe to this mod's changes

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.

Related

codex-java-lsp-mcp AGENTS.md compared with instructions from other repositories

codex-java-lsp-mcp AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
codex-java-lsp-mcp AGENTS.mdlkyprogramer/codex-java-lsp-mcpInstructions file1yesterdayApache-2.0A1,080Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file196ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file144kyesterdayMITA8,130Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file196ktodayMITA5,685GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file150ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file196ktodayMITA3,153GitHub Copilot
generative-ai-for-beginners AGENTS.mdmicrosoft/generative-ai-for-beginnersInstructions file124ktodayMITA2,981Codex, OpenCode