keke-agent AGENTS.md

A project guide for keke-agent, a terminal coding tool that can work with different AI vendors through replaceable plugins.

In plain words
What is it for?
Making structural changes to keke-agent while following its architecture, dependency layers, invariants, and automated checks.
Why use it?
It documents rules and checks that help keep the codebase modular, with vendor-specific code separated from the core and dependencies kept in order.

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/milisp/keke-agent/agents-md
Clone the repo
git clone --depth 1 https://github.com/milisp/keke-agent

Made for: Codex, OpenCode.

Per session 1,293 This file is loaded in full into every session.
When invoked 1,293 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.01293 $0.01293
Opus 5 $0.00647 $0.00647
Sonnet 5 $0.00259 $0.00259
Haiku 4.5 $0.00129 $0.00129

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

Security

Grade A, and why

keke-agent 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 · 103 lines

How it starts

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

keke — agent guide

keke is a multi-vendor terminal coding agent. Vendor-specific behavior lives in replaceable plugins; the engine does not know that ChatGPT or Grok exist.

Read docs/architecture.md before making structural changes.

Invariants

These are not style preferences. Each one exists because a reference implementation lost it and paid for it.

  1. Nothing vendor-specific in keke-core. No keke-provider-* or keke-auth-* dependency, no vendor name in a match arm. OpenAI's codex wrote "resist adding code to codex-core" in its own guide and codex-core still ended up depending on ~50 internal crates. Prose did not hold the line, so scripts/check-layering.py holds it instead and runs in CI.

  2. Dependencies point strictly downward by rank. Contract crates (tier 0) depend on nothing above them and not on each other except in the documented order. Adding a crate means adding it to RANK in the layering script.

  3. Contract crates stay dependency-light. keke-protocol, keke-tool, keke-auth-api, keke-provider-api, keke-plugin-api, keke-config-types, and keke-paths may use serde, futures, thiserror, schemars, and each other. No HTTP client, no runtime, no engine. This is what lets a vendor plugin authenticate without linking the world.

  4. RPITIT over #[async_trait]. Write fn f(&self, ..) -> impl Future<Output = T> + Send. Where a trait must be held as dyn, box explicitly at that one boundary — see keke_tool::ToolDyn and keke_plugin_api::ExtFuture. Do not reach for #[async_trait].

  5. Registration returns a disposer, or is composed once and frozen. A registry either hands back something whose drop removes the contribution, or is a builder that produces an immutable value. A contribution must never be able to outlive the thing that made it.

  6. Model-visible implies logged. Anything reaching a model request must be reconstructable from SessionEvents. Adding a new kind of model-visible input means adding a variant to keke_protocol::SessionEvent first.

Read the full file on GitHub · 103 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 · 103 lines · 1,293 tokens per session scan A 6943e9d2871f

Subscribe to this mod's changes

keke-agent AGENTS.md is an instructions file published in the GitHub repository milisp/keke-agent (2 stars, last pushed 2d ago), licensed Apache-2.0. It adds 1,293 tokens to every session, about $0.0065 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.