otel-as-code-plugin
AGENTS.md1 starsChanged 47 days agoApache-2.0View on GitHub
Cross-agent instructions for this repo, read by Codex (and other agents that honor AGENTS.md). Claude Code plugin-development specifics live in CLAUDE.md. All commands/…, skills/…/SKILL.md, and agents/… paths in these skills are relative to the otel-as-code repo root (the directory containing .agents/ and .codex/). Codex integration assumes otel-as-code is the repo you run Codex in — that root is the git root — so from any subdirectory of it, git rev-parse --show-toplevel resolves these paths. If otel-as-code is instead checked out…
- Reads credentials
In this repository18 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- otel-backendSkill
- otel-business-attrsSkill
- otel-collectorSkill
- otel-evaluateSkill
- otel-initSkill
- otel-instrumentSkill
- otel-remediateSkill
- otel-uninstrumentSkill
- semconv-disciplineSkill
- new-backendSkill
- validate-pluginSkill
- business-attr-uxSkill
- collector-topologySkill
- deployment-remediationSkill
- language-maturitySkill
- semconv-disciplineSkill
- terraform-patternsSkill
The file
Files
AGENTS.md — otel-as-code
Cross-agent instructions for this repo, read by Codex (and other agents that honor
AGENTS.md). Claude Code plugin-development specifics live in CLAUDE.md.
<!-- Maintainer note: Codex loads this file up to `project_doc_max_bytes` (32 KiB default) —
keep it lean. An `AGENTS.override.md` beside it, if present, takes precedence. -->What this is
otel-as-code is a toolkit for OpenTelemetry instrumentation and observability-as-code: instrument a codebase (Node.js / Python / Java / .NET), infer service identity from the repo, and generate vendor-neutral Terraform for Grafana / Datadog / New Relic / Dash0. It ships as a Claude Code plugin AND as Codex skills.
Using with Codex
Capabilities are exposed as Codex skills under .agents/skills/, discovered when this repo is
the working directory / repo root (or vendored into one). Invoke a workflow explicitly with
$name. Each skill is a thin bridge — it points at the canonical procedure in commands/,
skills/, and agents/ (the single source of truth), which you read and follow.
All commands/…, skills/…/SKILL.md, and agents/… paths in these skills are relative to the
otel-as-code repo root (the directory containing .agents/ and .codex/). Codex integration
assumes otel-as-code is the repo you run Codex in — that root is the git root — so from any
subdirectory of it, git rev-parse --show-toplevel resolves these paths. If otel-as-code is
instead checked out inside a different host repo, show-toplevel returns the host root (not
here), so resolve these paths against otel-as-code's own checkout directory, not the git root.
- Workflows:
$otel-init,$otel-instrument,$otel-uninstrument,$otel-evaluate,$otel-collector,$otel-business-attrs,$otel-backend,$otel-remediate. $semconv-discipline— OTel semantic-convention rules (also invoked implicitly when editing OTel code).
Codex differences to respect
- No subagent dispatch. Where a
commands/otel-*.mdsays "dispatch the<x>agent", readagents/<x>.mdand do that work inline yourself. - Hooks DO run in Codex.
.codex/hooks.jsonports the guardrails to Codex'sPreToolUse/PostToolUsehooks (matchingapply_patch/file edits) via thin adapters inhooks/codex/that reuse the samehooks/*.shlogic:write-guard→ PreToolUse: denies overwriting an existing generated bootstrap (tracing.*/telemetry.*/opentelemetry.*for any supported extension, plusotel-java.envandotelcol-*.yaml— the set is derived inhooks/otel-paths.sh) or aninfra/observability/<vendor>/*.tf. A denial means regenerate deliberately.apply_patchreports paths relative to the session cwd; the guard normalises them before matching the.claude/.otel-forcesentinel, so a relative entry there is honoured.- confirm-before-write → PreToolUse: denies writing an
otel-context.jsonthat carries an unconfirmed business attribute. NOTE: only whole-file writes are deep-checked; patch-style edits are not — so always present business attributes for explicit confirmation. Present them already namespaced (com.myorg.*); a barebiz.*name is a placeholder, never written. semconv-lint→ PostToolUse: surfaces semconv warnings on OTel file writes (advisory). They load only when Codex runs with otel-as-code as the git/project root: Codex discovers.codex/hooks.jsonat the project root, and the hook commands resolve the adapters fromgit rev-parse --show-toplevel(Codex's recommended anchor for repo-local hooks — there is no per-hook config-dir variable; only Codex plugins getPLUGIN_ROOT, which this bridge is not). Both conditions hold only when otel-as-code is that root, so when it is vendored inside another repo the Codex hooks do not load — a Codex platform constraint, not something the config can work around. The Claude Code hooks (hooks/hooks.json, resolved via${CLAUDE_PLUGIN_ROOT}) are unaffected and remain the guardrail in that setup. SessionEnd/session-summaryis not ported — Codex has SessionEnd, but its PR-changelog output has no natural Codex surface.
Conventions & architecture
Tool-agnostic conventions — the single-sourced SEMCONV_VERSION, the backends.txt vendor list,
and the Terraform snapshot layout — plus Claude Code plugin architecture (auto-discovery,
hooks/hooks.json, claude plugin validate) live in CLAUDE.md. Read its "Conventions" section;
they are not restated here, to keep a single source.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

