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.01376 | $0.01376 |
| Opus 5.5 | $0.00550 | $0.00550 |
| Sonnet 5.5 | $0.00275 | $0.00275 |
| Haiku 4.5 | $0.00138 | $0.00138 |
Grade A, and why
voice-edge 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 4d 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 — 100 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 格式化与静态检查(Format & Lint)
- 要求:任何对 Python 文件的修改,必须在最终交付前运行并通过 Ruff 格式化与静态检查,确保风格统一且 0 Error / 0 Warning。
- 执行命令:
ruff format voice_edge.py ruff check voice_edge.py # 或者全局检查 ruff check . - 配置规则:遵循
pyproject.toml中的[tool.ruff.lint]配置(包含E,F,B,ASYNC,RUF等规则)。不要随意修改该规则集或使用# noqa逃避校验。
铁律 2:修改代码后必须同步环境变量登记表(ENV REGISTRY)
- 机制:
voice_edge.py顶部维护了一份环境变量登记表 (ENV REGISTRY),汇总了全局 197+ 个环境变量的默认值与定义代码行号。 - 要求:只要在代码中增删行、重构函数或新增环境变量,必须运行自动修复命令以重新通过 AST 对齐登记表行号:
python voice_edge.py --fix-env-registry # 或 uv run main --fix-env-registry - 输出确认:确保看到输出
ENV REGISTRY updated: ...或ENV REGISTRY already current: ...。
铁律 3:必须通过全量自测试(Self-Test)
- 要求:在交付前,必须运行全量内置自测,确保全部测试用例 100% 通过。
- 执行命令:
python voice_edge.py --self-test # 或 uv run main --self-test - 基线要求:当前基线为 115/115 passed。不得出现任何
❌ Self-test failed。
铁律 4:严禁编写低价值或虚假测试(No Pseudo-Tests)
- 要求:
- 自测用例必须真实驱动实际生产执行链路(Real Execution Path),对核心业务逻辑具备实质性断言。
- 严禁伪测试:坚决禁止编写「即使把生产代码的核心修复逻辑删除,测试仍然能通过」的低价值虚假测试。
- 严禁为了虚增测试数量而仅对静态数据结构做无意义断言,或者构造脱离生产运行状态的孤立 Mock。
铁律 5:严禁未经允许擅自提交代码(No Unauthorized Git Commit)
- 要求:AI Agent 绝对禁止在没有得到用户明确许可的情况下自动执行
git commit。 - 规范:所有修改在完成验证(通过自测与 Ruff)后,必须保留在工作区中,向用户汇报修改内容并等待用户指示或审查授权。
铁律 6:绝对禁止暂存或提交 .memory/ 目录
- 要求:
.memory/目录(包含每日记录、长期记忆MEMORY.md以及各专项业务设计规范如 OpenCode 缓存机制等)仅用于本地 Agent 运行上下文维护。绝对不要执行git add .memory/或将其提交到版本控制中(DO NOT stage or commit.memory/)。
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.
- 4d ago Changed · -8 lines · -97 tokens per session a5c3099c16eb
- 12d 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 6d ago), licensed MIT. It adds 1,376 tokens to every session, about $0.0055 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-10-07.
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).
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.
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).
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.
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).
deepseek-harness AGENTS.md
AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.