ja-output-harness: Instructions file for Codex

AGENTS.md

ja-output-harness AGENTS.md is an instructions file for Codex, OpenCode from Sora-bluesky/ja-output-harness. It costs 1,682 tokens per session, scanned A, original, MIT.

Repository-specific instructions for a coding agent working on a Japanese-output quality tool. They describe the project, its Python tools, important files, and coding rules.

In plain words
What is it for?
Use them when editing this project, especially when changing lint rules, configuration, the MCP server, installers, or tests.
Why use it?
They give the agent the local context and constraints needed to make changes that fit the repository.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: reads ~/.codex or $CODEX_HOME, but also the file is AGENTS.md. Also seen: mentions AGENTS.md; mentions Codex.

This is Sora-bluesky/ja-output-harness's own configuration. It tells Codex and OpenCode how to work on ja-output-harness 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 ja-output-harness configures →

Reuse

Borrowing it

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

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 ja-output-harness AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/sora-bluesky/ja-output-harness/agents-md"><img src="https://agentmods.dev/badge/instructions/sora-bluesky/ja-output-harness/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,682 This file is loaded in full into every session.
When invoked 1,682 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.01682 $0.01682
Opus 5 $0.00841 $0.00841
Sonnet 5 $0.00336 $0.00336
Haiku 4.5 $0.00168 $0.00168

Measured 9d ago against content hash a511c23de5d6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

ja-output-harness 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 9d 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 · 91 lines

How it starts

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

AGENTS.md — ja-output-harness

Codex がこのリポジトリで作業する時に参照する規約。グローバルの ~/.codex/AGENTS.md に上書きせず、追加の制約として作用する。

このリポジトリについて

ja-output-harness は、OpenAI Codex(CLI / App 両対応)の日本語出力を Codex 公式の Stop hook で品質担保する 暫定ハーネス。既定モード(strict-lite, v0.4.1 以降)では Stop hook が同じターン内で言い直しを発火させる。Codex CLI と Codex App は同じ Rust バイナリを共有し、~/.codex/ 配下の設定を同じ場所から読むため、本ハーネスは両者に同時反映される。OpenAI が Codex 本体に日本語自然化を公式実装した時点で archive する前提で設計されている。詳細は docs/DEPRECATION.md を参照。

技術スタック

  • Python 3.11+
  • uv で依存管理
  • mcp[cli](FastMCP パターン)で MCP サーバー実装
  • pyyaml で設定読み込み
  • pytest + ruff でテスト・Lint

重要ファイル

パス 役割
src/ja_output_harness/rules.py Lint ロジック(純関数)
src/ja_output_harness/server.py FastMCP サーバー。finalize ツールを公開
config/banned_terms.yaml 禁止語・閾値の単一情報源
config/agents_rule.md ユーザーの ~/.codex/AGENTS.md に追記される品質ゲート規約本文
scripts/install.{ps1,sh} OS 別インストーラー
tests/test_rules.py 単体テスト 28 件
tests/fixtures/codex_*.txt 実 Codex 出力の before/after fixture

コーディング規約

  • すべての lint ルールは rules.py の純関数として実装する(副作用なし、入力は (text, cfg)、出力は list[Violation]
  • 新しい禁止語は config/banned_terms.yamlbanned に追加する
  • 新しいルールタイプを追加する場合、rules.pydetect_* 関数を追加し、lint() で組み合わせる
  • テストは fixture ベースで記述、tests/fixtures/ に実データを置く
  • コミットメッセージは英語(Conventional Commits 準拠)
  • CI は pytest matrix(Windows / Linux × Python 3.11 / 3.12)+ gitleaks の 5 チェック必須

ブランチ保護

main は保護されている:

  • PR 経由のマージ必須(approval は 0 でも可)
  • CI 5 チェック全通過必須
  • Linear history 必須(squash / rebase のみ)
  • force push / delete 禁止
  • Admin は緊急時に bypass 可

つまり、直接 main への push は禁止。feature branch → PR → CI → squash merge の流れを守る。

自分たちの dogfooding

このツール自身が日本語技術文の品質ゲートなので、このリポで作業する Codex の日本語出力も同じルールに従う:

  • コード識別子(ファイル名・関数名・変数名・ブランチ名・PR 番号・タスク ID・パラメータ名・コマンド名)は必ずバッククォートで囲む
  • 既定の strict-lite モードでは Stop hook が自動で検品するため、進捗報告・学習ノート・コミットメッセージ(内容)・PR 説明・リリースノート等は特別な呼び出し無しでそのまま書いてよい。違反があれば Codex が同じターン内で言い直す。strict モードで運用している場合のみ mcp__jp_lint__finalize を明示的に通す
  • 禁止語(slice, parity, done, active, ready, squash, dispatch, handoff, regression, fail-close, fast-forward, contract drift)は使わず言い換える
  • 1 文あたり識別子は 2 個まで、文字数は 80 文字(識別子含む文は 50 文字)以内
  • VOICEVOX で音読される場面を想像して書く

Read the full file on GitHub · 91 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. 9d ago First seen · 91 lines · 1,682 tokens per session scan A a511c23de5d6

Subscribe to this mod's changes

ja-output-harness AGENTS.md is an instructions file published in the GitHub repository Sora-bluesky/ja-output-harness (1 stars, last pushed 4mo ago), licensed MIT. It adds 1,682 tokens to every session, about $0.0084 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-08-31.

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

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

deepseek-harness AGENTS.md

AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.

deepseek-ai/deepseek-harness · 3,735 tokens