NoteAI: Instructions file for Codex

AGENTS.md

NoteAI AGENTS.md is an instructions file for Codex, OpenCode from Miles128/NoteAI. It costs 4,513 tokens per session, scanned A, original, Unlicense.

A set of repository instructions for NoteAI, a desktop application built with Tauri and Python. It explains how the project should be structured, how its parts communicate, and where prompts for language models belong.

In plain words
What is it for?
Use it when changing NoteAI code, especially its HTML, CSS, JavaScript, Python, prompts, or Tauri startup process.
Why use it?
It gives coding agents project-specific rules, reducing inconsistent code structure and incorrect ways of starting or connecting the application.

Instructions file for CodexOpenCode

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

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

Reuse

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.

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

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 NoteAI AGENTS.md

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

agentmods 80×15 button for NoteAI AGENTS.md

Your own site · 80×15
<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>
Per session 4,513 This file is loaded in full into every session.
When invoked 4,513 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.04513 $0.04513
Opus 5.5 $0.01805 $0.01805
Sonnet 5.5 $0.00903 $0.00903
Haiku 4.5 $0.00451 $0.00451

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

Security

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.

AGENTS.md · 139 lines

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,Tauri beforeDevCommand/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)。

Read the full file on GitHub · 139 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. 5d ago Changed · +1 tokens per session c91cf8b7dc9c
  2. 13d ago Changed · +2 lines · +525 tokens per session b6975e4e19db
  3. 1mo ago Changed · +24 tokens per session 97e579f4e2f3
  4. 1mo ago Changed · +1 lines · +330 tokens per session 5586ff9388a1
  5. 1mo ago Changed · +1 lines · +132 tokens per session e1cfd2096b2f
  6. 2mo ago First seen · 135 lines · 3,501 tokens per session scan A 3ad13e3b2d17

Subscribe to this mod's changes

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.

Related

NoteAI AGENTS.md compared with instructions from other repositories

NoteAI AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
NoteAI AGENTS.mdMiles128/NoteAIInstructions file56d agoUnlicenseA4,513Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file275k2d agoMITA4,313Codex, OpenCode