koku-metrics-operator: Instructions file for Codex

AGENTS.md

koku-metrics-operator AGENTS.md is an instructions file for Codex, OpenCode from project-koku/koku-metrics-operator. It costs 1,124 tokens per session, scanned A, original, Apache-2.0.

Project instructions for Koku Metrics Operator, a Go program that runs on Kubernetes and sends OpenShift cluster cost metrics to Red Hat’s cost-management service.

In plain words
What is it for?
Use them when changing, testing, documenting, or releasing this Kubernetes operator, especially across upstream and downstream branches.
Why use it?
They explain the project structure, development process, and important differences between the main codebase and its downstream version.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: reads .claude/ paths; mentions AGENTS.md.

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

Reuse

Borrowing it

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

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 koku-metrics-operator AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/project-koku/koku-metrics-operator/agents-md"><img src="https://agentmods.dev/badge/instructions/project-koku/koku-metrics-operator/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,124 This file is loaded in full into every session.
When invoked 1,124 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.01124 $0.01124
Opus 5 $0.00562 $0.00562
Sonnet 5 $0.00225 $0.00225
Haiku 4.5 $0.00112 $0.00112

Measured 9d ago against content hash 7459a322171d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

koku-metrics-operator 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 9d 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 · 107 lines

How it starts

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

AGENTS.md - koku-metrics-operator

Project Context

Kubernetes operator (Go, Operator SDK) that collects OpenShift cluster metrics and uploads them to Red Hat's cost management service. Installed and managed via OLM. CRD: CostManagementMetricsConfig (alias: MetricsConfig).

Documentation

Critical: Upstream vs Downstream

Always develop on main (upstream) first. Downstream receives ported changes.

Upstream (main) Downstream
Name koku-metrics-operator costmanagement-metrics-operator
CI GitHub Actions (.github/workflows/) Konflux/Tekton (.tekton/)
Dockerfile docker.io base images brew.registry.redhat.io base images

Do NOT modify .tekton/ on upstream or .github/workflows/ on downstream. Makefile/Dockerfile differences between branches are intentional (e.g., CGO_ENABLED=0 upstream vs CGO_ENABLED=1 downstream for FIPS).

Tech Stack

  • Go (see go.mod for version) / Operator SDK / controller-runtime
  • Ginkgo v2 + Gomega for testing
  • OpenShift 4.5+ / Prometheus / OLM

Key Architectural Facts

  • Reconciler requeues every 5 minutes; packaging/upload gated by upload_cycle (default 6 hours)
  • Basic auth is deprecated -- use token or service-account auth only
  • internal/storage/storage.go reads the owning ClusterServiceVersion to patch Deployment volume mounts
  • OLM bundle generated by make bundle (not committed to repo)
  • Query lookback window defaults to 14 days (Prometheus query range, not report retention)
  • Report retention controlled by max_reports_to_store (default 30)
  • CRD changes can break existing clusters -- never remove fields, change types, or make optional fields required

Read the full file on GitHub · 107 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. 9d ago First seen · 107 lines · 1,124 tokens per session scan A 7459a322171d

Subscribe to this mod's changes

koku-metrics-operator AGENTS.md is an instructions file published in the GitHub repository project-koku/koku-metrics-operator (20 stars, last pushed yesterday), licensed Apache-2.0. It adds 1,124 tokens to every session, about $0.0056 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