Borrowing it
Nothing to install: this file belongs to woniuzfb/voice-edge. 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/woniuzfb/voice-edge/main/AGENTS.mdgit clone --depth 1 https://github.com/woniuzfb/voice-edgeWrote 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/woniuzfb/voice-edge/agents-md)<a href="https://agentmods.dev/instructions/woniuzfb/voice-edge/agents-md"><img src="https://agentmods.dev/badge/instructions/woniuzfb/voice-edge/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/woniuzfb/voice-edge/agents-md"><img src="https://agentmods.dev/badge/instructions/woniuzfb/voice-edge/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.02937 | $0.02937 |
| Opus 5.5 | $0.01175 | $0.01175 |
| Sonnet 5.5 | $0.00587 | $0.00587 |
| Haiku 4.5 | $0.00294 | $0.00294 |
Grade A, and why
voice-edge AGENTS.md scanned grade A with 1 finding 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 20d 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.
Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
- **配置规则**:遵循 `pyproject.toml` 中的 `[tool.ruff.lint]` 与 Pyright 配置(包含 `E`, `F`, `B`, `ASYNC`, `RUF` 等规则)。不要随意修改该规则集或使用 `# noqa` 逃避校验;调用 `pyright` 时必须严格遵守铁律 9(直接运行 `uv run pyright voice_edge.py`,严禁 Python `subprocess.run(. How it starts
The opening of the file, as written. The whole thing — 141 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md — Voice Edge AI Agent Guidelines
本文档为所有在此代码库上工作的 AI Agent 提供指引与约束规范。在对项目进行任何修改前,请务必完整阅读并严格遵守以下准则。
1. 项目架构概述
- 单文件核心:核心业务逻辑集中于单个高内聚文件
voice_edge.py。 - 构建系统:采用标准
hatchling构建后端,Wheel 打包目标为voice_edge.py。 - 命令行入口:
- MCP 模式:
uv run main - HTTP 服务模式:
uv run main --http - 简写别名:
ve(uv run ve)
- MCP 模式:
- 主要能力:本地 MLX 模型推理、流式 Edge-TTS、faster-whisper / Apple Speech 转录、macOS 状态栏 HUD 与全局热键、小爱音箱桥接、OpenCode / OpenRouter / Browser 模型中继。
2. 核心铁律(强制执行)
铁律 1:代码必须经过 Ruff 格式化、Ruff 静态检查与 Pyright 类型检查(Format, Lint & Type Check)
- 要求:任何对 Python 文件的修改,必须在最终交付前运行并通过 Ruff 格式化、Ruff 静态检查与 Pyright 静态类型检查,确保风格统一且 0 Error / 0 Warning。
- 执行命令:
uv run ruff format voice_edge.py uv run ruff check voice_edge.py # 或者全局检查 uv run ruff check . uv run pyright voice_edge.py - 配置规则:遵循
pyproject.toml中的[tool.ruff.lint]与 Pyright 配置(包含E,F,B,ASYNC,RUF等规则)。不要随意修改该规则集或使用# noqa逃避校验;调用pyright时必须严格遵守铁律 9(直接运行uv run pyright voice_edge.py,严禁 Pythonsubprocess.run(..., timeout=...)套壳或分段调用)。
铁律 2:修改代码后必须同步环境变量登记表(ENV REGISTRY)
- 机制:
voice_edge.py顶部维护了一份环境变量登记表 (ENV REGISTRY),汇总了全局 197+ 个环境变量的默认值与定义代码行号。 - 要求:只要在代码中增删行、重构函数或新增环境变量,必须运行自动修复命令以重新通过 AST 对齐登记表行号:
uv run main --fix-env-registry - 输出确认:确保看到输出
ENV REGISTRY updated: ...或ENV REGISTRY already current: ...。
铁律 3:必须通过全量自测试(Self-Test)
- 要求:在交付前,必须运行全量内置自测,确保全部测试用例 100% 通过。
- 执行命令:
uv run main --self-test - 基线要求:不得出现任何
❌ Self-test failed。
铁律 4:严禁编写低价值或虚假测试(No Pseudo-Tests)
- 要求:
- 自测用例必须真实驱动实际生产执行链路(Real Execution Path),对核心业务逻辑具备实质性断言。
- 严禁伪测试:坚决禁止编写「即使把生产代码的核心修复逻辑删除,测试仍然能通过」的低价值虚假测试。
- 严禁为了虚增测试数量而仅对静态数据结构做无意义断言,或者构造脱离生产运行状态的孤立 Mock。
- 严禁真实外部路径、真实文件名与抓包样本值:测试代码(
--self-test与test/下 harness)中不得出现真实主目录、仓库或模型路径(如/Users/<name>/...),不得使用真实用户文件名 等真实业务/个人文件名,应统一使用test.pdf、sample_doc.pdf等纯虚构占位名),也不得直接照搬抓包中的真实动态 ID / 缓存键(如真实的blob_id、cache_key等,应使用/contrib_service/ttl_1d/selftest_blob_0001、00000000-0000-4000-8000-000000000001等明显的合成测试常量)。需要路径时用tempfile.mkdtemp()或虚构的绝对路径常量(如_SELFTEST_WORKSPACE = "/w/workspace");真机 harness 用Path(__file__).resolve().parents[1]定位仓库,状态库与缓存写入临时目录。
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.
- 20d ago Changed · +1 lines · +68 tokens per session 21fb3689a6ae
- 26d ago Changed · +6 lines · +279 tokens per session 05905d8b846f
- 29d ago Changed · +17 lines · +559 tokens per session adf2a971704d
- 1mo ago Changed 00fe6a649062
- 1mo ago Changed ac7a27100f16
- 1mo ago Changed · +17 lines · +655 tokens per session bc83e9396884
- 1mo ago Changed · -8 lines · -97 tokens per session a5c3099c16eb
- 1mo ago First seen · 108 lines · 1,473 tokens per session scan A f589c859f82e
voice-edge AGENTS.md is an instructions file published in the GitHub repository woniuzfb/voice-edge (0 stars, last pushed today), licensed MIT. It adds 2,937 tokens to every session, about $0.0117 per session on Opus 5.5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-07.
voice-edge AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| voice-edge AGENTS.mdwoniuzfb/voice-edge | Instructions file | 0 | today | MIT | A | 2,937 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 9,887 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 144k | today | MIT | A | 7,230 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 150k | today | MIT | A | 4,951 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 5,685 | GitHub Copilot |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 3,303 | GitHub Copilot |
| deno copilot-instructions.mddenoland/deno | Instructions file | 109k | yesterday | MIT | A | 3,077 | GitHub Copilot |