in-cluster-observability: Instructions file for Codex

AGENTS.md

in-cluster-observability AGENTS.md is an instructions file for Codex, OpenCode from gke-labs/in-cluster-observability. It costs 5,695 tokens per session, scanned A, original, Apache-2.0.

A repository guide for coding agents and developers working on an in-cluster observability system, which monitors software running inside Kubernetes. It describes the project’s current rewrite, structure, and working conventions.

In plain words
What is it for?
Use it before making substantial changes to understand the Go module, observability components, milestones, issue and pull-request tracking, and branch workflow.
Why use it?
It reduces guesswork about which code and documents are current, how the system is organised, and how changes should be tracked. It also prevents agents from relying on removed prototype code.

Instructions file for CodexOpenCode

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

This is gke-labs/in-cluster-observability's own configuration. It tells Codex and OpenCode how to work on in-cluster-observability 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 in-cluster-observability configures →

Reuse

Borrowing it

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

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 in-cluster-observability AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/gke-labs/in-cluster-observability/agents-md"><img src="https://agentmods.dev/badge/instructions/gke-labs/in-cluster-observability/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 5,695 This file is loaded in full into every session.
When invoked 5,695 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.05695 $0.05695
Opus 5 $0.02848 $0.02848
Sonnet 5 $0.01139 $0.01139
Haiku 4.5 $0.00570 $0.00570

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

Security

Grade A, and why

in-cluster-observability 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 8d 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 · 177 lines

How it starts

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

AGENTS.md

This file documents conventions and operational context for working in this repository. Both humans and agentic coding tools should read it before any non-trivial change. Keep it current as conventions evolve.

GEMINI.md is a stub that points back here so the two tools see the same content.

Current state

This repo is in the middle of a planned rewrite. The legacy POC code (Prometheus + eBPF agent at the root, OpenTelemetry sink/query pipeline under opentelemetry/, the obs/ logging library) was removed early in the rewrite. POC code is preserved on main and reachable via git log main -- <path>.

All code lives at the repo root as a single AP root and single Go module github.com/gke-labs/in-cluster-observability (per ADR-0015). Per ADR-0018, OBI runs as a sibling container in the agent DaemonSet pod, not as an embedded Go library — our agent is an OTLP receiver + OBI config writer.

Milestone status:

  • v0.1 Foundation (#64#69) landed: AP root, public package skeletons, OBI adapter shell, container image, minimal DaemonSet.
  • v0.2 Capture MVP (#70#77) landed: OTLP receivers (gRPC + HTTP loopback), OBI config writer, AllowPID/BlockPID with reload coalescer, L4 TCP + HTTP/1.1 translation, OTel self-obs metrics, panic recovery + ModuleDegraded events, debug HTTP endpoint, contract-test harness. DaemonSet now has two containers (obi sibling + agent).
  • v0.3 (lean) — agent + OBI native enrichment (per ADR-0021, supersedes the original v0.3 "Storage MVP" plan). Adds: OBI v0.9 schema fixes in internal/obiconfig (discovery.instrument + open_ports string + target_pids), --obi-instrument-ports smoke-test seed, OTel SDK Prometheus exporter always-on with a forwarder that re-records OBI's translated metrics, --scrape-addr agent listener at :9090, RBAC for OBI's K8s metadata informer, DaemonSet refactor (right caps + OTEL_EBPF_CONFIG_PATH env var + /var/run/obi + /sys/fs/cgroup mounts). What we explicitly did not build: a separate internal/pidcache, internal/enricher, pkg/sink/promscrape, or pkg/store.MetricStore — OBI's K8s informer + the OTel SDK + this single forwarder replace all of them.
  • v0.4 Control Plane MVP in progress (per ADR-0022). Ships across 4 stacked phase PRs: design refresh + ADR (Phase 0), CRD types + gRPC stubs (Phase 1), reconciler + stream + leader election (Phase 2), RBAC + CR status + AgentStatus (Phase 3). Decisions pinned: API group ollie.gke-labs.dev, controller framework sigs.k8s.io/controller-runtime, codegen controller-gen only, validating webhook deferred to v0.5, identity broadcasting cut (OBI's informer covers source-side per ADR-0021). New binary cmd/ollie-controller/; new packages pkg/controller/{api/v1alpha1,pb,reconciler,stream,agentclient}/; new manifests k8s/{controller.yaml,controller-rbac.yaml,crds/}.
  • v0.4.5 Verification & Soundness landed (per ADR-0023, issues #150–#158, PRs #160–#167). The OBI boundary is now CI-checkable and the metrics path is sound: ap-e2e Kind presubmit exercising the real DaemonSet on every PR; contract fixtures recorded from the pinned OBI image (recorder in tests/contract/obi/record_test.go, provenance in testdata/translation/RECORDED.md), goldens freeze metric type/temporality/bucket layout; the agent re-emits OBI metrics via a const-metric Prometheus collector (cmd/ollie/forward.go) — cumulative totals pass through (OBI exports cumulative; the old forwarder inflated counters), histograms keep buckets, stale series evicted; pkg/capture lifecycle bugs fixed; DaemonSet production trim (PSA labels, tolerations, system-node-critical, tcpSocket probes, seccomp; CAP_SYS_ADMIN is empirically required by OBI's L7 path on v0.9.0 and v0.10.0 — re-attempt each bump); OBI image now otel/ebpf-instrument:v0.10.0 (no breaking wire changes; additive queue/processing sub-spans).
  • v0.5 Sinks + Query + HPA landed (milestone closed 2026-07-29; vertical slice PRs #170–#173, breadth PRs #174–#178). An HPA scales on OBI-captured metrics end to end, and every ADR-0024 egress surface ships: scrape, PromQL API + custom-metrics + remote read, OTLP push relays + remote-write, CEL streaming subscribe, iobsctl. The #157 gate had resolved as ADR-0024: extensibility via wire protocols, not a Go library — pkg/sink, pkg/obsapi, pkg/store, pkg/query, and pkg/topology are deleted; store/query land under internal/ shaped by the HPA slice. Implementation decisions pinned in ADR-0025 (vertical slice: tsdb.Open, registry self-scrape ingest, storage-layer fan-out via remote read with central PromQL, cmd/ollie-query, headless-Service discovery, hand-rolled custom-metrics API, self-signed TLS until v0.6 — landed as PRs #170–#173) and ADR-0026 (breadth: raw-OTLP tee on the bridge feeding a spans-only ring + OTLP relay egress + remote-write; agent-side CEL for streaming subscribe; iobsctl over public surfaces; #101–#103 closed as superseded by OBI's native dual-sided attribution; #90 webhook → v0.6).
  • v0.5.1 Hardening landed on v0.5.1/phase-1-hardening (per ADR-0027): an adversarial multi-agent review of the merged v0.5 tree surfaced a cluster-wide :6443 custom-metrics auth bypass (CRITICAL) and six HIGH correctness bugs that green-CI self-merge had masked. All seven are fixed with regression tests: :6443 now requires the aggregation front-proxy client cert (new internal/frontproxy, requestheader CA pinned as ClientCAs); the read fan-out runs agents as secondary queriers with a mid-stream error swallow so one dead agent degrades instead of aborting; self-obs series carry a k8s_node_name label so per-node series stop merging; the custom-metrics adapter 404s on NaN/Inf instead of feeding the HPA a garbage int64; the forwarder widens its label schema to the union instead of freezing first-seen; and direction joins the #144 allowlist so L4 flow datapoints stop collapsing. The MEDIUM/LOW backlog (enumerated in ADR-0027) rides v0.6.
  • v0.6 Hardening is next: TLS/CA everywhere the v0.5 posture deferred it (agent↔query hops, the custom-metrics APIService serving-cert CA bundle, the #90 validating webhook), HTTP/2 + gRPC capture modules, TLS uprobes, path templating, sampling, cardinality enforcement — plus the ADR-0027 MEDIUM/LOW backlog (HPA metricLabelSelector honoring, CEL per-span error isolation, drop-oldest span ring, TestIobsctl false-green, 400Mi agent memory limit, staleness markers, readiness gating on :9091).

Read the full file on GitHub · 177 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. 8d ago First seen · 177 lines · 5,695 tokens per session scan A c9d050eb03bf

Subscribe to this mod's changes

in-cluster-observability AGENTS.md is an instructions file published in the GitHub repository gke-labs/in-cluster-observability (2 stars, last pushed 5d ago), licensed Apache-2.0. It adds 5,695 tokens to every session, about $0.0285 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.

Related

Other instructions, from other repositories

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,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 tokens

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 · 6,785 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, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 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,469 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens