voice-edge: Instructions file for Codex

AGENTS.md

voice-edge AGENTS.md is an instructions file for Codex, OpenCode from woniuzfb/voice-edge. It costs 1,376 tokens per session, scanned A, original, MIT.

Repository instructions for a voice application that uses local machine-learning models, speech recognition, text-to-speech, keyboard shortcuts, and several service connections. They require code checks, environment-variable record updates, and self-tests after changes.

In plain words
What is it for?
Guiding changes to the Python application, running Ruff code checks, updating the environment-variable registry, and running the built-in tests.
Why use it?
They define the checks an agent must perform so changes follow the project's rules and do not leave its configuration records or tests out of date.

Instructions file for CodexOpenCode

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

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

Reuse

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.

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

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 voice-edge AGENTS.md

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

agentmods 80×15 button for voice-edge AGENTS.md

Your own site · 80×15
<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>
Per session 1,376 This file is loaded in full into every session.
When invoked 1,376 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.01376 $0.01376
Opus 5.5 $0.00550 $0.00550
Sonnet 5.5 $0.00275 $0.00275
Haiku 4.5 $0.00138 $0.00138

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

Security

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.

AGENTS.md · 100 lines

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)
  • 主要能力:本地 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/)。

Read the full file on GitHub · 100 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. 4d ago Changed · -8 lines · -97 tokens per session a5c3099c16eb
  2. 12d ago First seen · 108 lines · 1,473 tokens per session scan A f589c859f82e

Subscribe to this mod's changes

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.

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,257 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

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.

deepseek-ai/deepseek-harness · 4,159 tokens