ai-code-interface.el AGENTS.md

A repository instruction file for an Emacs Lisp project. It documents byte-compilation, tests, CI checks, formatting, and documentation checks.

In plain words
What is it for?
It helps coding agents compile Emacs Lisp, run one test file or the full test suite, perform CI-related checks, and run checkdoc on changed files.
Why use it?
It provides repeatable commands and rules for detecting compilation warnings, test failures, and documentation problems.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/tninja/ai-code-interface.el/agents-md
Clone the repo
git clone --depth 1 https://github.com/tninja/ai-code-interface.el

Made for: Codex, OpenCode.

Per session 2,539 This file is loaded in full into every session.
When invoked 2,539 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.02539 $0.02539
Opus 5 $0.01269 $0.01269
Sonnet 5 $0.00508 $0.00508
Haiku 4.5 $0.00254 $0.00254

Measured 2d ago against content hash 2f9028291324, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ai-code-interface.el 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 2d 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 · 214 lines

How it starts

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

AGENTS.md

This file provides guidance to coding agents working with code in this repository.

Common Development Commands

Byte Compilation

emacs -batch -f batch-byte-compile *.el
  • Treat new byte-compilation warnings as regressions when touching Emacs Lisp code.
  • Prefer reproducible batch verification first, ideally emacs -Q with the necessary load-path and dependencies configured for the target file.
  • If batch compilation fails to load required files or packages, treat that as a verification failure to resolve or report, not as a clean pass.
  • If emacs -Q cannot be made to work cleanly, compile files individually through emacsclient as a fallback to match the active Emacs session more closely.
  • For documentation hygiene on touched files, also run M-x checkdoc (or batch checkdoc-file) before wrapping up changes.

Running Tests

# Run a specific test file
emacs -batch -L . -l ert -l test/test_ai-code-change.el -f ert-run-tests-batch-and-exit

# Run all tests
emacs -batch -L . -l ert --eval "(mapc #'load-file (file-expand-wildcards \"test/test_*.el\"))" -f ert-run-tests-batch-and-exit

CI Testing

The project uses melpazoid for CI checks. The workflow is defined in .github/workflows/melpazoid.yml.

High-Level Architecture

Core Design Philosophy

This is a unified interface package for AI-assisted software development that abstracts over multiple AI coding CLI backends (Claude Code, Gemini CLI, OpenAI Codex, Pi, GitHub Copilot CLI, Opencode, Kilo, Grok CLI, Cursor CLI, CodeBuddy Code CLI, Kiro CLI). The package provides a consistent user experience across different AI tools while maintaining context-aware code actions and agile development workflows.

Backend System Architecture

The backend system is pluggable and defined in ai-code-backends.el. Each backend is registered as a property list in ai-code-backends:

(ai-code-backends
  '((claude-code
     :label "Claude Code"
     :require ai-code-claude-code
     :start   ai-code-claude-code
     :switch  ai-code-claude-code-switch-to-buffer
     :send    ai-code-claude-code-send-command
     :resume  ai-code-claude-code-resume
     :config  "~/.claude.json"
     :upgrade "npm install -g @anthropic-ai/claude-code@latest"
     :cli     "claude")
    ;; ... other backends
    ))

Read the full file on GitHub · 214 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. 2d ago First seen · 214 lines · 2,539 tokens per session scan A 2f9028291324

Subscribe to this mod's changes

ai-code-interface.el AGENTS.md is an instructions file published in the GitHub repository tninja/ai-code-interface.el (274 stars, last pushed 4d ago), licensed Apache-2.0. It adds 2,539 tokens to every session, about $0.0127 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-30.

Related

Other instructions, from other repositories

codex-usage-widget AGENTS.md

Instructions for ognjeeen/codex-usage-widget, covering agents.md, project, scope and decision discipline, authorization and repository safety and architecture boundaries.

ognjeeen/codex-usage-widget · 1,218 tokens

CodexClaw AGENTS.md

Instructions for MackDing/CodexClaw, covering repository guidelines, repo structure, start and dev commands, test commands and lint and format.

MackDing/CodexClaw · 649 tokens

codex-token-meter AGENTS.md

Instructions for prefect12/codex-token-meter, covering ai token meter development guide, project shape, build and verification, git workflow and ai token meter test loop.

prefect12/codex-token-meter · 1,357 tokens

codex-loop-orchestra AGENTS.md

Instructions for LEO001020/codex-loop-orchestra, covering loop discipline, 1. decomposition discipline (single-pass plan-and-solve), 3. return convention (all subagents, mandatory), 4. recoverable compression directive and 5. kernel trigger rules (ipybox, when enabled).

LEO001020/codex-loop-orchestra · 2,161 tokens

ai-session-search AGENTS.md

Instructions for lililib/ai-session-search, a project described as: Local-first full-text search and reusable context library for AI coding sessions across Claude Code, Codex, Cursor, OpenCode, Copilot CLI, and more. Source sessions stay read-only.

lililib/ai-session-search · 113 tokens

codex-switch AGENTS.md

AGENTS.md instructions for ChArLiEdance/codex-switch, covering repository agents and platform isolation.

ChArLiEdance/codex-switch · 227 tokens