Borrowing it
Nothing to install: this file belongs to Miles128/NoteAI. 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/Miles128/NoteAI/main/AGENTS.mdgit clone --depth 1 https://github.com/Miles128/NoteAIWrote 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/miles128/noteai/agents-md)<a href="https://agentmods.dev/instructions/miles128/noteai/agents-md"><img src="https://agentmods.dev/badge/instructions/miles128/noteai/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/miles128/noteai/agents-md"><img src="https://agentmods.dev/badge/instructions/miles128/noteai/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.04513 | $0.04513 |
| Opus 5.5 | $0.01805 | $0.01805 |
| Sonnet 5.5 | $0.00903 | $0.00903 |
| Haiku 4.5 | $0.00451 | $0.00451 |
Grade A, and why
NoteAI 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 5d 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.
How it starts
The opening of the file, as written. The whole thing — 139 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
本文件为 AI 编码助手(Claude Code、Codex、Jcode、Trae Agent 等)提供 NoteAI 仓库的工作指南。它合并了原 AGENTS.md 与 .trae/rules/project_rules.md,以当前代码实际为准。
1. 项目规则
1.1 模块化要求
- 项目必须模块化:每个功能模块独立成文件/目录,职责单一,禁止在单文件中混合多个不相关功能。
- 前端模块化:JS/CSS 按功能拆分文件,通过统一入口加载,禁止所有代码堆在一个文件中。
- 后端模块化:Python 按功能拆分模块(如
ingest_pipeline.py、wiki_utils.py),通过__init__.py统一导出。 - 模块间通信:通过明确的接口/函数调用交互,禁止模块间直接操作彼此内部状态。
1.2 技术架构
- 前端:Tauri v2 + TypeScript(
webui/js/*.ts,esbuild 打包)。构建入口scripts/build-webui.mjs(npm run build:webui),产物为webui/dist/main.js(ESM + 分包)与经典 IIFE bundle(storage.bundle.js、error-handler.bundle.js,供 index.html 在模块前同步加载);webui/dist/已 gitignore,TauribeforeDevCommand/beforeBuildCommand自动构建。 - 后端:Python sidecar,通过 stdin/stdout JSON-RPC 与前端通信。
- 前端调用后端:统一使用
window.api对象(定义在webui/js/api.ts),禁止使用其他兼容层。 - 模块契约:模块仍以 IIFE 挂载
window.*(如window.SettingsComponents、window.I18nModule),无虚拟 DOM;webui/js/main.mjs是打包入口,动态 import 控制加载顺序。TS 类型检查:webui/js/tsconfig.json+tsc --noEmit。 - 界面风格:整体对标 Obsidian 应用。
1.3 Prompt 管理
所有传递给大模型的系统提示词必须放在 prompts/ 目录下,禁止在业务代码中直接内联定义系统提示词。
prompts/yaml/*.yaml是单一事实来源;prompts/__init__.py通过prompts/loader.py在导入时解析为常量。- 提示词中可包含占位变量(如
{topic_name}、{content}),业务代码使用.format()填充。 - 新增提示词:先在
prompts/yaml/添加 YAML,再在prompts/__init__.py导出对应常量。
1.4 应用启动
桌面 App 本身就是 Tauri 应用:Tauri 壳加载 webui/ 并拉起 Python sidecar。启动方式:
uv run python run.py # 开发者启动器(推荐):检查 Python 依赖 + Tauri CLI 后执行 cargo tauri dev
cargo tauri dev # 等效命令:依赖已就绪时直接启动 Tauri 开发模式
禁止直接用浏览器打开 webui/index.html 或用 python -m http.server 等方式启动(前端必须经由 Tauri IPC 调 sidecar)。
不要与 python/main.py(sidecar 进程入口,由 Tauri 壳拉起)混淆。
1.5 依赖管理
使用 uv 管理 Python 依赖,禁止直接使用系统 pip install:
uv sync --extra dev --extra rag --extra ingest # 安装依赖(RAG 与采集转换链默认包含)
uv run pytest # 运行测试
依赖声明于 pyproject.toml;uv.lock 提交入库。前端依赖走 npm(package.json)。
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.
- 5d ago Changed · +1 tokens per session c91cf8b7dc9c
- 13d ago Changed · +2 lines · +525 tokens per session b6975e4e19db
- 1mo ago Changed · +24 tokens per session 97e579f4e2f3
- 1mo ago Changed · +1 lines · +330 tokens per session 5586ff9388a1
- 1mo ago Changed · +1 lines · +132 tokens per session e1cfd2096b2f
- 2mo ago First seen · 135 lines · 3,501 tokens per session scan A 3ad13e3b2d17
NoteAI AGENTS.md is an instructions file published in the GitHub repository Miles128/NoteAI (5 stars, last pushed 6d ago), licensed Unlicense. It adds 4,513 tokens to every session, about $0.0181 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-08-31.
NoteAI AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| NoteAI AGENTS.mdMiles128/NoteAI | Instructions file | 5 | 6d ago | Unlicense | A | 4,513 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | yesterday | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | today | MIT | A | 4,680 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 5,516 | GitHub Copilot |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 275k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |