Fetchium: Instructions file for Codex

AGENTS.md

Fetchium AGENTS.md is an instructions file for Codex, OpenCode from zuhabul/Fetchium. It costs 2,313 tokens per session, scanned A, original, Apache-2.0.

An AGENTS.md instruction file for the Fetchium codebase. It documents commands for compiling, building, testing, linting, formatting, and running the Rust project.

In plain words
What is it for?
Use it when developing Fetchium to run checks such as cargo test, cargo clippy, cargo fmt, and the project's command-line tools.
Why use it?
It tells coding agents how to check their changes using the repository's expected commands and standards.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions Claude Code; reads ~/.codex paths; mentions AGENTS.md.

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

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /home/echo/INFRASTRUCTURE_SOURCE_OF_TRUTH.md.

Reuse

Borrowing it

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

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 Fetchium AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/zuhabul/fetchium/agents-md"><img src="https://agentmods.dev/badge/instructions/zuhabul/fetchium/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,313 This file is loaded in full into every session.
When invoked 2,313 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.02313 $0.02313
Opus 5.5 $0.00925 $0.00925
Sonnet 5.5 $0.00463 $0.00463
Haiku 4.5 $0.00231 $0.00231

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

Security

Grade A, and why

Fetchium 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 · 282 lines

How it starts

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

AGENTS.md

Guidelines for AI agents (Claude Code, OpenAI Codex, Gemini CLI, etc.) working on the Fetchium codebase.

Build, Lint, and Test Commands

# Check compilation (fast, no linking)
cargo check

# Build the fetchium binary
cargo build -p fetchium-cli

# Build release binary
cargo build -p fetchium-cli --release

# Run all tests (currently 563, target: 0 failures)
cargo test

# Run tests for a specific crate
cargo test -p fetchium-core

# Run a single test by name
cargo test -p fetchium-core segment_type_roundtrip

# Lint (zero warnings policy — enforced in CI)
cargo clippy -- -D warnings

# Format code
cargo fmt

# Run the binary
./target/debug/fetchium --help
./target/debug/fetchium doctor
./target/debug/fetchium provider list

Current Status

  • Tests: 563 passing, 0 failing, 0 clippy warnings
  • Phases complete: 0–8 + Multi-provider AI system
  • Binary: ./target/debug/fetchium with 26 commands

Architecture

crates/
├── fetchium-core/     # All algorithms: search, extract, rank, validate, cache, AI, intelligence
├── fetchium-cli/      # Binary: clap derive CLI, one file per command in commands/
├── fetchium-mcp/      # Manual JSON-RPC 2.0 stdio MCP server (5 tools)
└── fetchium-api/      # axum 0.7 REST API server

Data flow: CLI args → FetchiumConfig → fetchium-core pipeline → formatted output

Key Module Map (fetchium-core/src/)

ai/
  credentials.rs      Subscription OAuth detection (Claude Code, Gemini CLI, Codex CLI)
  provider_client.rs  Multi-provider chat client with SSE streaming + fallback chain
  providers.rs        ProviderKind enum, ProvidersConfig, ProviderEntry
  pipeline.rs         run_ai_pipeline() — search → extract → sandwich → provider
  types.rs            AiConfig (providers: ProvidersConfig, fast_model: Option<String>)
  router.rs           select_model(), select_fast_model()
  sandwich.rs         Ms-PoE sandwich layout
  ollama.rs           OllamaClient (local Ollama server)
  prompt.rs           System prompts for synthesis/factual/fallback modes
  setup.rs            DeviceSpec, recommend_models(), format_setup_guide()

search/
  orchestrator.rs     Parallel backend dispatch + BM25 rerank + dedup
  duckduckgo.rs       DDG HTML scraper
  fallback.rs         FallbackChain async executor

extract/
  layer1.rs, layer2.rs  CEP CSS+readability extraction
  pipeline.rs         Speculative parallel extraction
  boilerplate.rs      QADD pre-filter (strips script/style/svg)
  cep_predictor.rs    Decision tree ML predictor for CEP layer selection

token/
  qatbe.rs            BM25 + hybrid embedding ranking, greedy knapsack
  scs.rs              8 segment types, token-efficient JSON
  pds.rs              4-tier progressive streaming
  counter.rs          Heuristic tokenizer + TokenBudget

rank/
  bm25.rs             tantivy-backed Bm25Scorer
  signals.rs          ScoringContext (batch embeddings), HyperFusion 8-signal ranking
  fusion.rs           hyperfusion_rank()

validate/
  cross_source.rs     V4 bigram-Jaccard clustering, negation-aware contradiction
  temporal.rs         V3 exponential decay, intent classification
  authority.rs        V1 domain tiers, SSL/redirect penalties
  rar.rs              5 reflection checkpoints R1-R5

intelligence/
  pie/               STM (source trust), FPM (failure patterns), QPM (query prediction), PKG
  edf.rs             Evidence decay function, domain half-lives
  cce.rs             Confidence calibration (isotonic interpolation)
  acs.rs             Adversarial content shield (shadow/active mode)
  crp.rs             Contradiction resolution protocol
  sgt.rs             Source genealogy tracker (bigram-Jaccard mutation detection)
  totr.rs            Tree-of-Thoughts research

export/
  pandoc.rs          PDF: typst (~1s) → xelatex → default; check_typst() for doctor
  bibtex.rs          Pure Rust BibTeX generator

embeddings/
  engine.rs          fastembed-rs singleton, embed() + embed_batch()
  cache.rs           SHA-256 keyed SQLite cache

qadd/pipeline.rs     5-step DOM pruning, chunked embed_batch (EMBED_BATCH_SIZE=128)

Read the full file on GitHub · 282 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 · 282 lines · 2,313 tokens per session scan A 0685cf3aed16

Subscribe to this mod's changes

Fetchium AGENTS.md is an instructions file published in the GitHub repository zuhabul/Fetchium (4 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 2,313 tokens to every session, about $0.0093 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-08-31.

Related

Fetchium AGENTS.md compared with instructions from other repositories

Fetchium AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
Fetchium AGENTS.mdzuhabul/FetchiumInstructions file44mo agoApache-2.0A2,313Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,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
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode