KIP: Instructions file for Codex

AGENTS.md

KIP AGENTS.md is an instructions file for Codex, OpenCode from ldclabs/KIP. It costs 2,737 tokens per session, scanned A, original, MIT.

Repository-specific instructions for coding agents working on KIP, the Knowledge Interaction Protocol, a protocol for an agent's stored cognitive state. They define the project scope, sources of truth, workflow, and protocol rules that must be preserved.

In plain words
What is it for?
Use them before editing, searching, testing, reviewing, or committing KIP changes. They guide safe Git use, focused code searches, final diff review, and honest summaries of results.
Why use it?
They keep agents from overwriting existing work or treating filenames as reliable evidence of module boundaries. They also require reporting only checks that were actually run.

Instructions file for CodexOpenCode

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

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

Reuse

Borrowing it

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/ldclabs/kip/agents-md"><img src="https://agentmods.dev/badge/instructions/ldclabs/kip/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,737 This file is loaded in full into every session.
When invoked 2,737 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.02737 $0.02737
Opus 5.5 $0.01095 $0.01095
Sonnet 5.5 $0.00547 $0.00547
Haiku 4.5 $0.00274 $0.00274

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

Security

Grade A, and why

KIP 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 6d 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 · 233 lines

How it starts

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

AGENTS.md

Guidance for coding agents working in this repository. These instructions apply to the whole repository unless a more specific AGENTS.md exists below it. Explicit user instructions take precedence over this guidance.

Agent Workflow

  • Work independently as the current agent. Do not spawn or delegate work to subagents.
  • Before editing, run git status --short, confirm the current branch, and inspect existing diffs in the files you intend to change. Preserve the user's existing work; do not overwrite or revert unrelated files or changes.
  • Use rg for search and focused reads before editing. Do not assume module boundaries from filenames alone.
  • Before committing, review the final diff and stage only the files or hunks belonging to the requested task.
  • At completion, briefly summarize the changes, the checks actually run and their results, and any checks not run or blocked. Never report an unrun check as passing. When committing, include the branch and commit ID in the summary.

Project scope

KIP is the Knowledge Interaction Protocol: a cognitive state protocol for Agent memory. The repository contains the KIP 2.0 normative draft, reference Brain policies, grammars, schemas, conformance artifacts, bounded models, a TypeScript language toolkit and a VS Code extension.

This repository does not implement a production Cognitive Nexus or the complete Brain service. Those live in the sibling projects anda-db and anda-brain. Use their actual code when a task needs implementation evidence; do not infer their capabilities from this repository's specification or model tests. Change downstream repositories only when they are included in the requested scope.

Sources of truth and layout

  • SPECIFICATION.md: normative Core and runtime semantics, including final belief, temporal succession, dependency validity and recording repair. Read its Status section for the draft-identity rule, the scope gate and the companion list.
  • KIP-2.0-Memory-Interface.md: optional five-intent Agent-to-Brain binding.
  • brain/KIP-2.0-Validated-Learning.md and brain/KIP-2.0-Brain-Runtime.md: normative optional companions for Skill trials/evaluations and for durable workers, leases and dispatch. KIP-2.0-Cognitive-Consistency.md is only a redirect table to where its former sections now live.
  • KIP-2.0-Capsule-Specification.md, KIP-2.0-Optional-Profiles-and-Migration.md and KIP-2.0-Invariants.md: additional normative contracts and the stable invariant registry.
  • grammar/, schemas/, profiles/: normative syntax, wire/artifact shapes, the memory package ([email protected]), the general domain package, the kip:memory-default policy artifact and the Memory Interface levels.
  • KIPSyntax.md: informative model-facing syntax card. Its executable examples must agree with the grammar and toolkit.
  • brain/, SelfInstructions.md, SystemInstructions.md: reference cognitive policies and role cards. Algorithms here do not override protocol requirements.
  • packages/kip-lang/: lexer, parser, syntax AST, formatter, diagnostics, executable AST lowering, canonical JSON and host helpers. It does not execute KIP or supply an authorization boundary.
  • packages/vscode-kip/: editor integration consuming kip-lang.
  • conformance/: the executable engine suite, fixtures, portable vectors, reference models, adapter runners and digest tooling. See conformance/README.md before changing these.
  • formal/: bounded verification models and reports with explicit proof limits.
  • KIP-2.0-Architecture.md: informative rationale; normative contracts take precedence. Resolution/evidence reports describe their recorded revisions, not an evergreen certification of current code.
  • design/: frozen pre-consolidation rationale. Do not maintain it as a second specification. New rationale belongs in the current specification/architecture.
  • v1/: frozen historical protocol and integrations, outside the active pnpm workspace. v2/ is a navigation stub; current v2 sources are at the root.
  • migration/, post/, diagrams/: migration guidance, essays and supporting visuals. They do not supersede normative sources.

Read the full file on GitHub · 233 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. 6d ago Changed · +13 lines · +246 tokens per session 7b2544056a4b
  2. 21d ago First seen · 220 lines · 2,491 tokens per session scan A 434b3c2a1a17

Subscribe to this mod's changes

KIP AGENTS.md is an instructions file published in the GitHub repository ldclabs/KIP (87 stars, last pushed 7d ago), licensed MIT. It adds 2,737 tokens to every session, about $0.0109 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-09-25.

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,649 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,257 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

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,159 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,731 tokens