metis: Instructions file for Codex

AGENTS.md

metis AGENTS.md is an instructions file for Codex, OpenCode from Wholiver/metis. It costs 12,814 tokens per session, scanned B, original, MIT.

Repository instructions for coding agents working on Metis, including how to begin tasks, where major parts of the project live, and which application modes may be affected. Metis is a software project with command-line, desktop, and developer-tool parts.

In plain words
What is it for?
Use them at the start of every Metis task to check existing changes, find relevant code and tests, read nested instructions, consider affected interfaces such as terminal, printed, JSON, or desktop modes, and choose appropriate validation.
Why use it?
They keep automated code changes aligned with the repository's existing structure, conventions, compatibility needs, and testing expectations.

Instructions file for CodexOpenCode

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

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

Reuse

Borrowing it

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/wholiver/metis/agents-md"><img src="https://agentmods.dev/badge/instructions/wholiver/metis/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 12,814 This file is loaded in full into every session.
When invoked 12,814 The same file — it is already loaded in full.
Security scan B 1 finding. 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.12814 $0.12814
Opus 5.5 $0.05126 $0.05126
Sonnet 5.5 $0.02563 $0.02563
Haiku 4.5 $0.01281 $0.01281

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

Security

Grade B, and why

metis AGENTS.md scanned grade B with 1 finding 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 15d 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

`desktop/scripts/package-macos.mjs` generates a styled DMG with a Retina-ready TIFF background (`desktop/public/assets/dmg-background.svg`), centered arrow, 660x480 window bounds, left `Metis.app` (165, 175), right `Appl
AGENTS.md · 397 lines

How it starts

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

Agent Development Guide

This file is for AI coding agents contributing to Metis. Treat it as repository-level operating guidance. User and system instructions always take precedence.

Objective

Help developers change Metis quickly without sacrificing scope control, compatibility, or verification. Prefer evidence from the repository over assumptions.

Start Every Task

  1. Restate the requested outcome and concrete acceptance criteria.
  2. Read git status --short and strictly preserve unrelated user changes and dirty worktree files.
  3. Search for relevant code, tests, docs, and existing abstractions before editing.
  4. Read the nearest applicable AGENTS.md if a nested one exists.
  5. Identify affected modes and surfaces:
    • CLI / TUI: Interactive terminal UI (src/modes/interactive/, vendor/metis-tui/)
    • Headless / Print: Non-interactive execution (src/modes/print-mode.ts)
    • RPC / JSON: Programmatic streaming and JSON protocols (src/modes/rpc/, src/rpc-entry.ts)
    • Server: HTTP / SSE server engine (src/modes/server/)
    • Desktop: Electron host (desktop/main.cjs) + React frontend (desktop/src/)
    • SDK / Core: Public API and core session management (src/core/agent-session.ts, src/core/sdk.ts)
    • Extensions & Packages: User extensions, MCP, package manager (src/core/extensions/, src/core/package-manager.ts)
  6. Decide the smallest validation set that can prove the change works.

If .codegraph/ exists and its tools work, use CodeGraph before broad text search for code understanding (codegraph explore "<query>", codegraph node <symbol-or-file>). If the index is missing or malformed, state that once and fall back to rg and targeted file reads.

Fast Investigation & Search Protocols (Efficiency & Anti-Hang)

  1. NEVER run bare git grep --untracked or unconstrained grep -r at repo root: The repository contains massive untracked directories (node_modules, desktop/renderer/assets, eval_results/, temporary benchmarks, .codegraph). Bare untracked searches crawl gigabytes of assets and will hang or spawn background tasks that eat minutes of time.
  2. Always use scoped rg (ripgrep) or targeted paths:
    • For Desktop frontend: rg "keyword" desktop/src/
    • For Core / Server: rg "keyword" src/
    • When searching root, always exclude heavy dirs: rg --glob '!node_modules' --glob '!desktop/renderer' --glob '!eval_results' --glob '!dist' "keyword"
  3. Correlate git status --short with search: If a feature was recently added or is work-in-progress, its files may be untracked (?? desktop/src/components/harness/). Run git status --short first to spot untracked candidate directories, then inspect them directly (view_file or rg "keyword" <untracked_dir>/).
  4. Fast-Path UI & Styling Diagnosis (No Over-Engineering): When user reports UI sizing, alignment, or spacing discrepancies (e.g. "搜索尺寸小了,和右侧同步"):
    • DO NOT write ad-hoc Python PNG decoders, binary decompression scripts, or pixel-sampling loops. That burns 5–10 minutes on trivial CSS properties.
    • Directly inspect the JSX and Tailwind/CSS box model:
      • Height & Box Model: Does one element use h-[28px] with border (border-box outer height = 28px) while the adjacent button uses h-[28px] with shadow-btn (1px spread box-shadow makes outer visual height = 30px)?
      • Typography: Is text text-[12px] while the sibling button is text-[12.5px]?
      • Width & Padding: Is an input w-24 / w-28 (112px) cramped because padding (pl-8 pr-7 = 60px) leaves only 52px for text?
      • Surface & Hover: Does the input use bg-field while the button uses bg-surface?
    • Rapid Verification:
      • Run targeted Vitest: npm test -- test/desktop-react-*.test.ts (executes in <1s).
      • Run Desktop build: npm --prefix desktop run build (Vite builds in ~3s).

Read the full file on GitHub · 397 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. 15d ago Changed · +38 lines · +2,255 tokens per session 562120560115
  2. 20d ago Changed · +2 lines · +313 tokens per session 84bd80657260
  3. 22d ago Changed · +29 lines · +1,056 tokens per session 3e444f830022
  4. 29d ago Changed · +71 lines · +3,501 tokens per session 7678c50f8eec
  5. 1mo ago Changed · +15 lines · +1,697 tokens per session scan A → B 89ad17b5cb73
  6. 1mo ago Changed · +88 lines · +2,101 tokens per session e81fbc477e4c
  7. 1mo ago Changed · +23 lines · +392 tokens per session fc7188b6a624
  8. 2mo ago First seen · 131 lines · 1,499 tokens per session scan A 02f62f3fa626

Subscribe to this mod's changes

metis AGENTS.md is an instructions file published in the GitHub repository Wholiver/metis (431 stars, last pushed yesterday), licensed MIT. It adds 12,814 tokens to every session, about $0.0513 per session on Opus 5.5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories

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 · 9,715 tokens

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,461 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, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 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,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,750 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 · 4,261 tokens