bifrost AGENTS.md

A set of development rules for Bifrost, a software project with Rust backend code, a web interface, tests, and automated checks called CI. It defines how to classify work and what evidence is needed before calling it complete.

In plain words
What is it for?
Use it to decide whether a task is development, read-only review, CI troubleshooting, or documentation work, then select the relevant formatting, type, unit, integration, or end-to-end checks.
Why use it?
It prevents unnecessary tests and missed checks by matching verification to the files and behavior changed, while requiring review and follow-up for implementation work.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/bifrost-proxy/bifrost/agents-md
Clone the repo
git clone --depth 1 https://github.com/bifrost-proxy/bifrost

Made for: Codex, OpenCode.

Per session 16,937 This file is loaded in full into every session.
When invoked 16,937 The same file — it is already loaded in full.
Security scan A 1 finding. Scan, not verified.
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 $0.16937 $0.16937
Opus 5 $0.08469 $0.08469
Sonnet 5 $0.03387 $0.03387
Haiku 4.5 $0.01694 $0.01694

Measured 2d ago against content hash 2dd935757818, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

bifrost 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 2d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- **CI/Pages 看护**:推送部署仓库后必须跟进 `bifrost-proxy/bifrost-proxy.github.io` 的 `Pages` 与 `pages-build-deployment` runs 到 success,并用 `curl -L https://bifrost-proxy.github.io/` 验证线上根站已经是源站同步后的首页,不是旧跳转页或手写分叉页。
AGENTS.md · 698 lines

How it starts

The opening of the file, as written. The whole thing — 698 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Bifrost 项目开发规则

执行心法

任何人都会犯错,但我们可以通过反复检查、持续改进,终将达到巅峰水平。 Agent 必须把 review、修复和复测视为高质量交付的常态,而不是额外负担;任何没有证据支撑的“已完成”“应该可以”“看起来没问题”都不能作为完成依据。

执行模式与完成定义

任务模式判定

  1. 开发模式(默认):用户要求实现、修复、优化、改造、补齐、提交、推送,或要求 Agent 自主完成时,必须执行本文的通用交付闭环,并按“变更类型与验证路由”只选择适用的专项流程;除非用户明确说“不要提交 / 不要推送 / 不用建 MR / 不用盯 CI”,否则开发完成后必须默认提交、推送、创建或更新 MR/PR,并跟进适用的远端 CI 到全绿或给出明确阻塞归因。
  2. 检查模式(只读):用户明确说“仅检查 / 不要修改代码 / 只 review / 先分析”时,只能读取、运行安全检查并给出 findings;未经用户明确同意不得编辑文件、提交或推送。
  3. CI 闭环模式:用户要求分析 CI、修到 CI 绿、推送后盯 CI、进入 fix-push-watch,或任一开发任务完成后已 push 需要默认远端 CI 看护时,必须加载 .agents/skills/github-actions-pat/,并按 GitHub Actions CI 分析与 fix-push-watch 闭环执行。
  4. 文档/流程变更模式:仅修改文档、流程或测试说明时,只执行格式、链接、结构和内容一致性等针对性检查;默认不触发 Rust 编译/测试、覆盖率、E2E 或 human_tests/

变更类型与验证路由(先判定,后执行)

验证范围必须由实际影响面决定,不能因为“修改了仓库文件”就运行所有测试。任务开始时先根据 diff、依赖关系和运行时影响选择下表中的一类或多类;混合变更取各类适用验证的并集,影响面无法确认时才升级验证范围。

变更类型 典型范围 默认必做验证 默认不适用
Rust 后端/代理/协议生产代码 crates/*/src/**/*.rs、服务端行为、共享协议 受影响 crate 单元测试、Rust fmt/clippy、make coverage-changed、按风险选择相关 E2E;大范围或跨 crate 变更再执行 workspace/local-ci 无关前端测试
前端行为/状态/API 集成 WebUI/desktop 的 TS/TSX/JS 逻辑、路由、状态管理、接口调用 前端格式化、类型检查、受影响单元/组件测试;用户链路变化时做相关 UI/E2E 或真实场景验证 Rust coverage、Cargo workspace、Rust E2E(共享协议或后端同时变化除外)
纯 UI 视觉 样式、布局、图标、主题、纯展示文案 前端格式化/类型检查、受影响页面的亮暗主题和视觉检查;有现成快照时更新并验证 Rust coverage/build、仓库级 E2E;无需为纯视觉改动强制新增 human_tests/ 文档
Skill/脚本/工具链 .agents/skills/、skill 自带脚本、独立工具脚本 如提供则运行 quick_validate.py,并执行自带单元/脚本测试、shell/语法检查;涉及外部真实流程时只验证该流程 Rust coverage/build、仓库级 E2E、human_tests/(除非修改 Bifrost 产品运行时行为)
文档/流程/配置说明 Markdown、设计文档、AGENTS.md、说明性配置 Markdown/格式、链接、结构、一致性检查和两轮 review Rust coverage/build、前后端 E2E、human_tests/

补充原则:

  • 文件后缀不是唯一判断依据;脚本若改变产品启动、发布或协议行为,应按受影响的运行时表面追加验证。
  • human_tests/ 只用于自动测试不足以证明的用户可感知运行时行为、真实账号/设备/浏览器链路或高风险回归,不是所有开发任务的默认门禁。
  • rust-project-validate、Cargo workspace 测试和 Rust 覆盖率只在 Rust/后端影响范围内启用;前端、Skill、文档或流程变更不得为了“流程完整”空跑这些检查。
  • 最终验证矩阵只列适用项;不适用项可按变更类型统一说明,无需逐项制造占位任务。

Read the full file on GitHub · 698 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. 2d ago First seen · 698 lines · 16,937 tokens per session scan A 2dd935757818

Subscribe to this mod's changes

bifrost AGENTS.md is an instructions file published in the GitHub repository bifrost-proxy/bifrost (124 stars, last pushed 3d ago), licensed MIT. It adds 16,937 tokens to every session, about $0.0847 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.