oni-comb-rs: Instructions file for Codex

AGENTS.md

oni-comb-rs AGENTS.md is an instructions file for Codex, OpenCode from j5ik2o/oni-comb-rs. It costs 7,754 tokens per session, scanned A, original, Apache-2.0.

Project instructions for oni-comb-rs, a Rust library for building parsers from smaller parsing components.

In plain words
What is it for?
Developing or testing the Rust parser library and its Cargo workspace.
Why use it?
They document the project's architecture and the commands used to build and test it.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md.

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

Reuse

Borrowing it

Nothing to install: this file belongs to j5ik2o/oni-comb-rs. 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/j5ik2o/oni-comb-rs/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/j5ik2o/oni-comb-rs

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 oni-comb-rs AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/j5ik2o/oni-comb-rs/agents-md/github.svg)](https://agentmods.dev/instructions/j5ik2o/oni-comb-rs/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/j5ik2o/oni-comb-rs/agents-md"><img src="https://agentmods.dev/badge/instructions/j5ik2o/oni-comb-rs/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 oni-comb-rs AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/j5ik2o/oni-comb-rs/agents-md"><img src="https://agentmods.dev/badge/instructions/j5ik2o/oni-comb-rs/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 7,754 This file is loaded in full into every session.
When invoked 7,754 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.07754 $0.07754
Opus 5.5 $0.03102 $0.03102
Sonnet 5.5 $0.01551 $0.01551
Haiku 4.5 $0.00775 $0.00775

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

Security

Grade A, and why

oni-comb-rs 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 2mo 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 · 744 lines

How it starts

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

  • 日本語でやりとりしてください

プロジェクト概要

oni-comb-rs は Rust 製パーサーコンビネータライブラリの v2 リブート版。旧 v1 の Rc<dyn Fn> ベース設計を捨て、trait + 具象コンビネータ型(Map, Zip, Or 等)で構成する。動的ディスパッチ・ヒープ確保を排し、Applicative/Alternative 主体で最適化しやすい設計を目指している。

ビルド・テスト

# ビルド
cargo build

# 全テスト実行
cargo test

# parser crateのみテスト
cargo test -p oni-comb-parser

# 特定テスト実行
cargo test -p oni-comb-parser -- test_name

# クリーンビルド
cargo clean && cargo build

アーキテクチャ

Cargo workspace 構成。現在のメンバーは parser クレートのみ。

コア型の階層

InputStream (trait)    -- 入力ストリーム抽象。Checkpoint による巻き戻しを提供
  └─ StrInputStream    -- &str 向け実装。Checkpoint = usize (byte offset)

Parser (trait)         -- parse_next(&mut self, &mut I) -> PResult<O, E>
  └─ ParserExt (trait) -- map/zip/zip_left/zip_right/or/attempt/cut/optional/many0/many1/sep_by0/sep_by1/chainl1/chainr1/flat_map/and_then のメソッドチェーン

Fail (enum)            -- Backtrack(E) | Cut(E) | Incomplete | ZeroProgress
PResult<T, E>          -- Result<T, Fail<E>>

モジュール構成 (modules/parser/src/)

モジュール 役割
input_stream.rs InputStream トレイト(Checkpoint, Slice, reset, is_eof)
str_input_stream.rs StrInputStream<'a> — &str 向け InputStream 実装
parser.rs Parser<I> トレイト(Output, Error, parse_next)
parser_ext.rs ParserExt<I> — 全 Parser に自動実装されるコンビネータメソッド
fail.rs Fail<E> enum と PResult 型エイリアス
combinator/ 各コンビネータの具象型(Map, Zip, ZipLeft, ZipRight, Or, Attempt, Cut, Optional, Many, Many1, SepBy0, SepBy1, ChainL1, ChainR1, FlatMap)
text/ テキスト専用パーサー(Char, Tag, Satisfy, TakeWhile0/1, Eof, Whitespace0/1, Identifier, Integer, QuotedString)

設計上の重要な判断

  • Fail::Backtrack vs Fail::Cut: or は Backtrack のみリカバリし、Cut はそのまま伝播。attempt は Cut を Backtrack に降格、cut は Backtrack を Cut に昇格
  • flat_map は実装済みだが Applicative 優先を推奨: ベンチマークで zip ≒ flat_map(同一型)を確認済み。ただし異種型分岐では Box<dyn Parser> が必要で ~15ns のオーバーヘッドが発生するため、Applicative (zip, or) を優先し flat_map は文脈依存の分岐に限定する方針
  • 再帰は boxed recursion: 再帰の結び目だけ Box<dyn Parser> に落とし、非再帰部分は具象型を維持
  • 入力型は当面 &str 限定: no_std/streaming/bytes は後回し
  • many/sep_by/chainl1 は専用ループコンビネータ: flat_map 再帰ではなくループで実装

Read the full file on GitHub · 744 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. 2mo ago First seen · 744 lines · 7,754 tokens per session scan A b00c3006062e

Subscribe to this mod's changes

oni-comb-rs AGENTS.md is an instructions file published in the GitHub repository j5ik2o/oni-comb-rs (41 stars, last pushed 5mo ago), licensed Apache-2.0. It adds 7,754 tokens to every session, about $0.0310 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-09-01.

Related

oni-comb-rs AGENTS.md compared with instructions from other repositories

oni-comb-rs AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
oni-comb-rs AGENTS.mdj5ik2o/oni-comb-rsInstructions file415mo agoApache-2.0A7,754Codex, OpenCode
flow-like copilot-instructions.mdRheosoph/flow-likeInstructions file972yesterdaynoneA1,349GitHub Copilot
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot