kiri: Instructions file for Codex

AGENTS.md

kiri AGENTS.md is an instructions file for Codex, OpenCode from CAPHTECH/kiri. It costs 3,751 tokens per session, scanned A, original, MIT.

A repository guide for the kiri TypeScript project. It explains where code, configuration, generated files, and tests belong, plus the commands and naming rules used to work on it.

In plain words
What is it for?
Use it when adding or changing kiri code, running its build, development server, lint, or tests, or working with its GitHub issues and MCP server.
Why use it?
It gives coding agents the project’s local rules in one place, reducing misplaced files, inconsistent code, and missed checks.

Instructions file for CodexOpenCode

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

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

Reuse

Borrowing it

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/caphtech/kiri/agents-md"><img src="https://agentmods.dev/badge/instructions/caphtech/kiri/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 3,751 This file is loaded in full into every session.
When invoked 3,751 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.03751 $0.03751
Opus 5.5 $0.01500 $0.01500
Sonnet 5.5 $0.00750 $0.00750
Haiku 4.5 $0.00375 $0.00375

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

Security

Grade A, and why

kiri 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 · 223 lines

How it starts

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

Repository Guidelines

プロジェクト構成とモジュール整理

本レポジトリの設計知は docs/overview.md を起点としたテーマ別ドキュメントに分割されています。TypeScript での実装を追加する際は src/indexer/(Git 走査と DuckDB 取り込み)、src/server/(MCP サーバー)、src/client/(CLI や Codex 用ユーティリティ)を基本フォルダとし、共通ロジックは src/shared/ に集約してください。設定スキーマは config/ に YAML で格納し、型定義を types/ へ配置します。生成物や DuckDB のワークファイルは var/ 以下にまとめ、テストは対象モジュールを鏡写しにした tests/indexer/*.spec.ts などへ置いてください。

GitHubを利用している。IssueはGitHubで管理している。GitHub mcpでアクセスする。

GitHub: CAPHTECH/kiri

ビルド・テスト・開発コマンド

Node.js 20 と pnpm を前提とします。主要コマンドは以下のとおりです。

  • pnpm install: 依存関係を解決し、node_modules を整備します。
  • pnpm run build: tsc --noEmit false で dist/ に ESM を出力します。
  • pnpm run dev: tsx src/server/main.ts --port 8765 を起動しホットリロードを有効化します。
  • pnpm run lint: eslint "src/**/*.{ts,tsx}" と prettier --check を実行します。
  • pnpm run test: vitest run --coverage を呼び出し、閾値 lines ≥ 0.8 を確認します。
  • pnpm run check: pnpm run lint と pnpm run test をまとめて実行します。 開発で固定化した診断コマンドは scripts/diag.ts に関数として追加し、pnpm exec tsx で再利用してください。

コーディングスタイルと命名

TypeScript 5 系を採用し、インデントは 2 スペース、セミコロンは常に付与します。変数・関数は camelCase、クラスと型は PascalCase、定数は SCREAMING_SNAKE_CASE を用いてください。tsconfig.json の strict と noUncheckedIndexedAccess は必ず有効化し、eslint-config-standard-with-typescript と prettier を pre-commit で実行します。SQL 定義は sql/ に .sql 拡張子で保存し、キーワードは大文字、識別子は snake_case に統一します。MCP ツール名は <領域>.<動詞>(例: context_bundle)の形式とし、例外メッセージは「原因→対処」を 2 文で記述してください。

テスト指針

テストは vitest を標準とし、tests/server/context_bundle.spec.ts のように対象モジュールを明示する命名を徹底します。DuckDB を利用するテストは tmp ディレクトリにワークファイルを生成し、afterEach で削除してください。検索品質など長時間の評価は tests/eval/*.spec.ts にゴールデンデータを置き、P@10 と TTFU をメトリクスとして vitest --runInBand で収集します。Pull Request では新規機能に対して 80% 以上のステートメントカバレッジを確保してください。

コミットとプルリクガイド

Conventional Commits を必須とし、例として feat(server): expose semantic rerank や chore(deps): bump duckdb-wasm の形式を用います。1 コミットで 1 論点を守り、生成物や var/ 配下は含めないでください。Pull Request では「目的」「実装概要」「検証手順」「残課題」を見出しとして記載し、関連 Issue があれば Closes #番号 で紐付けます。レビュー依頼前に pnpm run check の結果をログで共有し、性能差分がある場合はベンチ結果を表形式で添付してください。

Read the full file on GitHub · 223 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 · 223 lines · 3,751 tokens per session scan A aaed9fbdc1f4

Subscribe to this mod's changes

kiri AGENTS.md is an instructions file published in the GitHub repository CAPHTECH/kiri (153 stars, last pushed 8mo ago), licensed MIT. It adds 3,751 tokens to every session, about $0.0150 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-30.

Related

kiri AGENTS.md compared with instructions from other repositories

kiri AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
kiri AGENTS.mdCAPHTECH/kiriInstructions file1538mo agoMITA3,751Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file275k3d agoMITA4,313Codex, OpenCode