kb-mcp: Instructions file for Codex

AGENTS.md

kb-mcp AGENTS.md is an instructions file for Codex, OpenCode from HelloTomBruce/kb-mcp. It costs 1,231 tokens per session, scanned A, a copy of iroha GEMINI.md, MIT.

Repository-specific instructions for the kb-mcp project. The description does not include the actual instructions.

In plain words
What is it for?
For following the documented development conventions of HelloTomBruce/kb-mcp.
Why use it?
It can guide work on that repository, but there is not enough information here to explain the rules it contains.

Instructions file for CodexOpenCode

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

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

Reuse

Borrowing it

Nothing to install: this file belongs to HelloTomBruce/kb-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/HelloTomBruce/kb-mcp/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/HelloTomBruce/kb-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 kb-mcp AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/hellotombruce/kb-mcp/agents-md/github.svg)](https://agentmods.dev/instructions/hellotombruce/kb-mcp/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/hellotombruce/kb-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/hellotombruce/kb-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 kb-mcp AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/hellotombruce/kb-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/hellotombruce/kb-mcp/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,231 This file is loaded in full into every session.
When invoked 1,231 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 89% copy Near-identical to another mod 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.01231 $0.01231
Opus 5.5 $0.00492 $0.00492
Sonnet 5.5 $0.00246 $0.00246
Haiku 4.5 $0.00123 $0.00123

Measured 7d ago against content hash a91e0775b2c1, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

kb-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 7d ago.

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.

Origin

This is a copy

89% identical to iroha GEMINI.md — 64 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

AGENTS.md · 64 lines

What it actually says

红线

  • 未经用户主动要求,禁止提交代码
  • 在执行 git push 推送远程仓库前,必须在本地完整运行并全绿通过以下 CI 质量体检流水线:
    # 1. 代码格式化与规范修复
    uvx ruff format . && uvx ruff check --fix .
    # 2. 静态类型检查
    uvx --with ".[dev,vec,v0_8]" mypy src/
    # 3. 全量单测验证
    uvx --with ".[dev,vec,v0_8]" pytest -q
    
    若有前端代码(web/)修改,需先在 web/ 目录执行 npm run build 确保前端构建无报错。只有全部通过后方可执行 push。

kb-mcp AI 协同开发规约:代码与 DocMind 产品文档双向维护

本项目已接入 DocMind 知识工作台(结构化 PRD 思维导图与文档系统)。 在任何功能迭代、Bug 修复、MCP 工具扩展或架构重构过程中,代码与 DocMind 中的产品文档必须通过 MCP 保持双向同步。

1. DocMind 基础设施信息

  • MCP 服务:DocMind(SSE: http://127.0.0.1:6001/sse)
  • 项目定位:完全通过 DocMind MCP 接口操作维护,无需关心本地物理路径。操作前直接调用:
    activate_project({ "name": "kb-mcp" })
    
  • 核心需求模块树(14 个全景模块):
    • 01 产品概述与定位:AI 原生知识库服务、双向链接、Token 保护与定位
    • 02 文档模型与强 Schema 类型体系:Frontmatter 校验、Schema 强类型约束
    • 03 多模式智能搜索与 RAG 管线:BM25 + 向量混合检索、Token 预算保护
    • 04 语义嵌入与异步队列:异步 Embedding、批量处理与队列重试
    • 05 版本控制与审计:快照历史、Diff 审计、软删除与恢复
    • 06 类型化知识图谱:关系词汇定义、双向链接拓扑、影响分析与决策链
    • 07 Git 团队协作与智能合并:三方智能合并、冲突预防、文件变更监听
    • 08 多 Vault 管理与跨库检索:多工作区路由、跨库隔离与联邦检索
    • 09 智能计划任务调度:APScheduler 定时任务、备份与自动化维护
    • 10 MCP 协议服务层:24+ 个标准 MCP 工具定义与 JSON-RPC 协议
    • 11 CLI 命令行工具:kb 命令行体系、交互式终端工具
    • 12 Web 管理控制台:Vue/SPA 控制台、知识图谱可视化、文档编辑器
    • 13 健康诊断与数据维护:kb_doctor 诊断、ContextGuard 与孤岛检测
    • 14 技术架构与数据模型:Python 后端架构、SQLite 虚表与数据存储

2. 迭代协同标准工作流 (AI 必须严格执行)

阶段一:任务开始(需求对齐与状态流转)

  1. 激活项目并查阅规格:
    • 接收任务后,先调用 activate_project({ "name": "kb-mcp" });
    • 调用 search_requirements 或 get_requirement_detail 查阅目标模块的产品定义与技术约定(例如改动 MCP 工具查阅模块 10,改动图谱查阅模块 06,改动 Web 控制台查阅模块 12);
    • 若用户提出新功能或新增工具,调用 add_node 在对应模块下创建需求节点并补充规格草案。
  2. 状态流转:
    • 调用 update_requirement_status(node_id, "in_progress")。

阶段二:代码实现与红线检查

  • 严格遵守顶部的质量红线(ruff format/check、mypy 类型检查、pytest 全绿、web build 成功);
  • 未经用户明确要求,严禁私自提交 git commit。

阶段三:交付闭环(文档同步与状态闭环)

  1. 同步更新产品文档:
    • 编码完成后,若涉及新增/修改 MCP 工具入参输出、Schema 规则变动、图谱词汇扩展、CLI 命令增删或 Web 界面调整,必须同时调用 update_node 同步更新 DocMind 对应模块的 Markdown 需求规格;
    • 严禁“只改代码不改 PRD”导致文档漂移。
  2. 状态闭环:
    • 调用 update_requirement_status(node_id, "completed")。
  3. 交付报告输出:
    • 汇报时向用户清晰列出代码修改文件清单,以及同步更新的 DocMind PRD 模块名称与变更点。
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. 7d ago Changed · +52 lines · +1,036 tokens per session a91e0775b2c1
  2. 28d ago Changed · +10 lines · +181 tokens per session eec30e6b0740
  3. 1mo ago Changed · +1 lines 196dd011ed89
  4. 1mo ago First seen · 1 lines e3b0c44298fc

Subscribe to this mod's changes

kb-mcp AGENTS.md is an instructions file published in the GitHub repository HelloTomBruce/kb-mcp (0 stars, last pushed 2d ago), licensed MIT. It adds 1,231 tokens to every session, about $0.0049 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 89% identical to iroha GEMINI.md, differing in 64 lines, and is treated as a copy.

Related

Other instructions, from other repositories

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 · 9,649 tokens

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,384 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, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 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,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,731 tokens

deno copilot-instructions.md

Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.

denoland/deno · 3,077 tokens