ai-code-interface.el copilot-instructions.md

A set of project-specific rules for GitHub Copilot, an AI coding assistant, when working on an Emacs Lisp package. It describes the project, naming rules, file structure, testing tools, and coding style.

In plain words
What is it for?
Use it to guide AI-generated or AI-edited Emacs Lisp code, including modules, tests, package headers, configurable settings, and function declarations.
Why use it?
It gives the coding assistant the context needed to produce changes that match the existing project. This reduces inconsistent names, files, headers, and conventions.

Instructions file for GitHub Copilot

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/copilot-instructions
Clone the repo
git clone --depth 1 https://github.com/tninja/ai-code-interface.el

Made for: GitHub Copilot.

Per session 1,289 This file is loaded in full into every session.
When invoked 1,289 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.01289 $0.01289
Opus 5 $0.00645 $0.00645
Sonnet 5 $0.00258 $0.00258
Haiku 4.5 $0.00129 $0.00129

Measured 2d ago against content hash 49804dc3a61c, 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 copilot-instructions.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.

.github/copilot-instructions.md · 148 lines

How it starts

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

GitHub Copilot Instructions for ai-code-interface.el

Project Overview

This is ai-code-interface.el, an Emacs package that provides a uniform interface for AI-assisted software development across pluggable AI coding backends.

Language and Technology

  • Language: Emacs Lisp
  • Package System: Emacs package with use-package support
  • Version Control: Git with Magit integration
  • Testing Framework: ERT (Emacs Lisp Regression Testing)

Code Style and Conventions

File Naming

  • Main module: ai-code.el
  • Sub-modules: ai-code-*.el (e.g., ai-code-backends.el, ai-code-agile.el)
  • Tests: test_*.el (e.g., test_ai-code-change.el)

Emacs Lisp Conventions

  • Use lexical-binding: t in all files
  • Follow standard Emacs Lisp naming conventions:
    • Public functions: ai-code-function-name
    • Private functions: ai-code--function-name (double dash prefix)
    • Custom variables: ai-code-variable-name
  • Include proper header comments with:
    • Author
    • Version (when applicable)
    • Package-Requires
    • SPDX-License-Identifier: Apache-2.0
    • Commentary section
  • Use declare-function for forward declarations
  • Prefer defcustom for user-configurable variables
  • Use ;;;###autoload cookies for interactive commands

Code Organization

  • Group related functionality in separate modules
  • Use require statements at the beginning of files
  • Maintain clear separation between backend implementations and interface code

Testing

Running Tests

  • Tests use ERT (Emacs Lisp Regression Testing)
  • Test files are named with test_ prefix
  • Run tests with: emacs -batch -l ert -l <test-file>.el -f ert-run-tests-batch-and-exit

Test Conventions

  • Use ert-deftest for defining tests
  • Test names should be descriptive: test-module--function-name-scenario
  • Use with-temp-buffer for testing buffer-related functionality
  • Mock external dependencies with cl-letf when needed

Byte-compilation warnings

  • Treat new byte-compilation warnings as regressions when touching Emacs Lisp code.
  • For documentation hygiene on touched files, also run M-x checkdoc (or batch checkdoc-file) before wrapping up changes.

Read the full file on GitHub · 148 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 · 148 lines · 1,289 tokens per session scan A 49804dc3a61c

Subscribe to this mod's changes

ai-code-interface.el copilot-instructions.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 1,289 tokens to every session, about $0.0064 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-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

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

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