zaivern-code: Instructions file for Codex

AGENTS.md

zaivern-code AGENTS.md is an instructions file for Codex, OpenCode from tacyan/zaivern-code. It costs 3,560 tokens per session, scanned A, original, Apache-2.0.

Repository instructions for developers and coding agents working on the Zaivern Code project. They define rules for protected changes, worktrees, supported platforms and tool versions, documentation language, and completion reports.

In plain words
What is it for?
Use them to guide safe Git worktree usage, review change scope, preserve existing edits, maintain Rust and platform compatibility, and report changes and verification results.
Why use it?
They reduce accidental changes to other people's work and make development, verification, and reporting consistent across contributors and sessions.

Instructions file for CodexOpenCode

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

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

Reuse

Borrowing it

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

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 zaivern-code AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/tacyan/zaivern-code/agents-md"><img src="https://agentmods.dev/badge/instructions/tacyan/zaivern-code/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 3,560 This file is loaded in full into every session.
When invoked 3,560 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.03560 $0.03560
Opus 5 $0.01780 $0.01780
Sonnet 5 $0.00712 $0.00712
Haiku 4.5 $0.00356 $0.00356

Measured today against content hash 1eae7af39707, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

zaivern-code 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 today.

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 · 86 lines

How it starts

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

AGENTS.md — Zaivern Code 開発ガイド

このリポジトリで作業するエージェント・開発者向けの現行ルール。 回答・進捗・完了報告は日本語で行い、着手前に変更対象と影響範囲を確認する。 ユーザーの明示的な依頼を優先する。適用できないルールは理由と代替策を報告する。 過去の事例は 履歴資料 の関連箇所だけ参照する。 履歴資料の命令形・測定値は、現在の指示・仕様・性能保証として扱わない。

作業と変更の保護

  • コード変更はブランチ+隔離ワークツリー(.Codex/worktrees/)で行い、main へ直接コミットしない。指定された未追跡の文書・設定は、元の内容を保全して指定場所へ反映してよい。
  • 着手時に Git の状態を確認する。他人の変更を上書き・削除しない。git stash は使わず、必要なら自分の変更だけを WIP コミットにする。
  • git checkout --git reset --hard、強制削除を他人の作業の整理に使わない。サブエージェントにも同じ制約を伝える。
  • 自分のワークツリーは、統合済み・未コミット変更なし・使用中のエージェントやプロセスなしを確認してから git worktree remove で片付ける。ブランチは原則 git branch -d で削除する。squash 統合等では内容の取り込みも確認する。
  • 積み上げた PR の土台が squash 統合された場合は差分を確認し、必要なら rebase --onto で取り込み済み変更を外す。共有履歴の変更前に利用状況を確認する。
  • 変更点は意味のある作業単位で差分を表示する。大きい差分は要点と完全な差分ファイルを提示する。
  • 完了報告には変更内容・検証結果・未確認事項を記す。依頼されていない公開・リリースは行わない。

実装と設計

  • 環境依存値を直書きしない。パスは std::env::temp_dir()、既存 API、設定から導出する。仕様上の定数・安定 ID は許可する。性能上の上限には根拠と到達時の挙動を持たせる。
  • macOS / Windows / Linux の対応を維持する。OS 専用 API は #[cfg(...)] 等で分離する。cfg!(...) だけでは対象外 OS の型検査を除外できない。非対応の場合は明示的に扱う。
  • egui は 0.29 系、rustc は 1.88+ を維持する。明示的な依存更新の依頼では互換性を別途検証する。
  • 保守する検証・生成・変換ツールは Rust を優先する。既存のシェルやフロントエンド環境は利用してよい。Python の保守ツールを新設しない。一度限りの作業スクリプトはリポジトリ外に置く。
  • エージェント固有のコマンド・フラグ・環境変数は agents.rs のカタログへ集約する。存在と実際の効果を区別し、未確認の設定を追加しない。
  • vendor/vt100 の独自修正(visible_rows、スクロールバック等)を維持し、更新時は差分と関連テストを確認する。
  • 負荷・データ量・遅延要件に基づいて設計する。全機能に巨大なアクセス数や DB 構成を一律に仮定しない。不要な抽象化・設定・依存を増やさない。
  • 永続キーは history::workspace_key / workspace_set_key に集約し、版に依存するハッシュを使わない。移行を維持する。詳細は キーの仕様 を参照する。
  • PTY・スクロールバック・セッションの寿命をビューから分離する。非表示ビューへの転送は上限と欠落表示を設け、ビューの都合で PTY の読み取りを停止させない。
  • エージェント状態は構造化プロトコル・公式フック・状態ファイルを優先する。画面解析は根拠と不確実性を示す。診断は既存の in-process 設計を優先する。
  • 承認を回避するフラグを自動注入しない。既存の承認経路と監査可能性を維持する。

機能の接続と UI

  • 新機能の登録は原則 src/features/<名前>.rs に閉じ、Cmd::Feature("<module>.<action>") を使う。生成一覧はコミットせず、ID の一意性と接頭辞を守る。
  • app.rs / palette.rs / feature.rs / main.rs の変更は必要な接続・基盤変更に限定し、理由を説明する。config.rs / keybinds.rs 等は並列作業時に担当を決めて統合する。
  • ZaivernApp のフィールドを接続のために公開しない。必要な操作を pub(crate) メソッドで提供する。実処理へ接続しない空の登録を置かない。
  • GUI 機能は UI 操作から、CLI 機能は CLI から、内部機能は製品コードから到達することを確認する。未接続の機能を完成済みと記載しない。
  • dead_code / never used 警告は補助であり、警告ゼロは到達可能性の証明ではない。未完成を警告抑制で隠さない。必要な抑制は範囲と理由を明示する。
  • 重複 UI は目的を確認して整理する。操作経路の数だけでキーボード操作やアクセシビリティを削らない。
  • 更新でレイアウトやフォーカスを不用意に変えない。空状態は次の操作を示し、狭い画面でも見切れを防ぐ。排他的なビューは単一の状態型で管理する。
  • 複雑なレイアウト判断は純粋関数に分け、境界サイズで検証する。CJK / IME、選択・コピー、フォーカスを重点的に確認する。
  • 打鍵表記は keybinds::format_shortcut / key_hint から生成し、OS 予約と再割り当てを考慮する。消費は既存の keybinds::consume_shortcut_compat を利用する。
  • UI スレッドで Git・外部プロセス・重い I/O を待たない。非同期結果と直近の値を使い、更新頻度と同時実行数を制御する。

Read the full file on GitHub · 86 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. today First seen · 86 lines · 3,560 tokens per session scan A 1eae7af39707

Subscribe to this mod's changes

zaivern-code AGENTS.md is an instructions file published in the GitHub repository tacyan/zaivern-code (8 stars, last pushed today), licensed Apache-2.0. It adds 3,560 tokens to every session, about $0.0178 per session on Opus 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-10.

Related

Other instructions, from other repositories

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,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 tokens

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 · 6,785 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 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, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 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,469 tokens