kelos AGENTS.md

A project guide for AI coding assistants, documenting the repository’s conventions, commands, layout, and review rules.

In plain words
What is it for?
Following Makefile commands, writing tests, handling logs and secrets, comparing Kubernetes values, and preparing pull requests or releases.
Why use it?
It reduces guesswork and helps assistants make smaller, safer changes that fit the project.

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

Made for: Codex, OpenCode.

Per session 1,640 This file is loaded in full into every session.
When invoked 1,640 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.01640 $0.01640
Opus 5 $0.00820 $0.00820
Sonnet 5 $0.00328 $0.00328
Haiku 4.5 $0.00164 $0.00164

Measured yesterday against content hash 07e1d3867c22, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

kelos 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 yesterday.

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 · 49 lines

How it starts

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

Project Conventions for AI Assistants

Rules for AI Assistants

  • Use Makefile targets instead of discovering build/test commands yourself.
  • Keep changes minimal. Do not refactor, reorganize, or 'improve' code beyond what was explicitly requested.
  • For CI/release workflows, always use existing Makefile targets rather than reimplementing build logic in YAML.
  • Better tests. Always try to add or improve tests(including integration, e2e) when modifying code.
  • Logging conventions. Start log messages with capital letters and do not end with punctuation.
  • Commit messages. Do not include PR links in commit messages.
  • Kubernetes resource comparison. Use semantic .Equal() or .Cmp() methods for resource.Quantity comparisons, not reflect.DeepEqual — structurally different Quantity values can be semantically identical (e.g., 1000m vs 1 CPU).
  • Never use os.Getenv() for secrets as Go flag defaults. Go's flag package prints default values in usage/help output, which leaks secret values. Instead, use an empty default and read the env var after flag.Parse().
  • Fail fast on invalid configuration. Do not silently fall back to degraded behavior (e.g., unauthenticated requests) when configuration or credentials are invalid or missing. Return an error or exit immediately instead of returning nil or empty values that mask the failure.
  • Keep API surfaces minimal. When adding new API fields, types, or CRD changes, include only what is immediately needed. Do not add speculative fields — API is hard to change once shipped. Start with the minimum viable API and extend in follow-up PRs.
  • API changes must preserve backward compatibility for existing manifests. Existing in-cluster resources must continue to apply after a CRD update. Do not change a field's kind (scalar ↔ array, string ↔ object) on an existing field; do not add MinLength, Required, or other tightening validation to a field that previously accepted absence/empty values; when replacing a field, mark the old one +deprecated and keep it functional rather than removing it. When the schema must change, sweep examples/, self-development/, and any in-tree YAMLs that use the old form and update them in the same PR.
  • Maintain API changes only in the latest Kelos API version. Add new CRD fields, validation, enum values, constants, and user-facing API behavior only to the latest served/storage API version. Older served versions are compatibility surfaces: keep them served, convertible, and backward-compatible, but do not add new capabilities there unless required to preserve existing manifests or implement conversion/migration compatibility.
  • Import versioned Kelos APIs with aliases. Prefer aliasing the current versioned API import as kelos when a file uses only one API version. Use explicit aliases like kelosv1alpha1 only when a file genuinely needs multiple versions.
  • Docs must match implementation, not aspiration. When writing or updating docs, READMEs, or comments, describe only what the code actually does. Do not document unimplemented behavior, overstate guarantees, or describe security checks (e.g., HMAC validation) that aren't enforced. Before describing a contract ("X is filtered", "Y is validated"), verify the code enforces it — partial enforcement should be documented as partial.
  • Keep docs/reference.md user-facing. Document API fields, configuration, validation, defaults, and observable operational behavior. Do not describe controller or runtime implementation details unless users need them to configure, operate, or troubleshoot Kelos. Prefer outcomes over mechanisms, and remove nonessential internal detail instead of moving it to a separate architecture document.
  • Do not use Gomega's global Expect() inside Eventually polling blocks. Gomega does not retry on Expect failures — a transient API error short-circuits the poller and fails the test on the first blip instead of retrying. In e2e WaitFor* helpers, either inline the call and return a zero-value on error, or use the Eventually(func(g Gomega) { ... }) form so failed assertions are caught and retried.
  • CLI error messages must name the resource. When a CLI command fails for a named resource (task, spawner, workspace, etc.), include the resource name in the returned error so operators piping or batching invocations get an actionable signal. fmt.Errorf("task %s failed", name), not errors.New("task failed").
  • Test the happy path, not only the early-return guards. When a handler has both early-return guards and a primary action (post a message, create a resource, emit a metric), unit tests must include at least one positive case verifying the primary action runs with the right arguments — not just the no-op branches. If the production code lacks a seam, add one (interface, function field, fake client) so the happy path is covered.
  • Avoid vacuous substring assertions in printer/formatter tests. When asserting a label: value line is emitted, match against the full "label: value" string (or a regex), not the bare value — bare values often collide with the resource's Name or other surrounding context in the fixture and pass even when the line is missing.
  • Keep CRD enum docstrings consistent with the +kubebuilder:validation:Enum marker. If the godoc says "empty matches both", either include "" in the enum list so field: "" is accepted, or rephrase to "Omit to match both" so no one writes the explicit empty form. A docstring that invites a value the API server then rejects is a worse contract than either alternative.
  • Qualify cross-CRD field references with the owning kind in docs. In a CRD reference section, write Task.spec.podOverrides.env rather than bare podOverrides.env when describing a field that lives on a sibling CRD. A reader of one CRD's reference page should be able to locate the cited field without already knowing the layout of the others.

Read the full file on GitHub · 49 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. yesterday First seen · 49 lines · 1,640 tokens per session scan A 07e1d3867c22

Subscribe to this mod's changes

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