agentleFS
open-telemetryopen-telemetry/semantic-conventions-genai/.github/copilot-instructions.md

semantic-conventions-genai

Copilot instructions528 starsChanged 41 days agoApache-2.0View on GitHub

These instructions guide both human contributors and AI assistants (including GitHub's Copilot code reviewer) working in this repository. Path-specific guidance lives under .github/instructions/ and applies automatically based on the files touched. This repo defines the OpenTelemetry GenAI semantic conventions. Changes flow through several coupled surfaces: - model/<namespace>/*.yaml — source of truth for attributes, spans, metrics, and events. All attributes must be defined in registry.yaml. - docs/gen-ai/ and docs/registry/ — generated from the model via Weaver (make generate-all). Generated tables and…

  • Where files are headingNew Copilot instructions files have more rules about branches and pull requests, and fewer about code style.

    Of the Copilot instructions files we read, the 2,349 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repository5 other files it gives its agents.

The file

We split this copilot-instructions.md into the rules it gives an agent

7 rules. About 0 are common, 4 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Keep PRs small and focused.

    line 32
  2. Distinctive:

    Treat everything the author writes - PR description, docstrings, comments, READMEs - as claims to verify against the diff.

    line 43
  3. Distinctive:

    Read the diff yourself; approvals already on the PR are not evidence.

    line 45
  4. Distinctive:

    Prefer simple syntax over dense or clever equivalents.

    line 51
  5. Very specific:

    Do not use try/except to swallow exceptions.

    line 52
  6. Distinctive:

    Use explicit, descriptive names over compact ones.

    line 54
  7. Very specific:

    When drafting or editing a pull request description, use the pr-description skill under .github/skills/pr-description/.

    line 65

≈ “Common” is an estimate: at least 1 in 5 of the 3,779 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
copilot-instructions.md

Repository conventions

These instructions guide both human contributors and AI assistants (including GitHub's Copilot code reviewer) working in this repository.

Path-specific guidance lives under .github/instructions/ and applies automatically based on the files touched.

Repository overview

This repo defines the OpenTelemetry GenAI semantic conventions. Changes flow through several coupled surfaces:

  • model/<namespace>/*.yaml — source of truth for attributes, spans, metrics, and events. All attributes must be defined in registry.yaml.
  • docs/gen-ai/ and docs/registry/ — generated from the model via Weaver (make generate-all). Generated tables and registry pages should not be hand-edited.
  • model/gen-ai/*.json — JSON schemas for structured attribute values (messages, tool definitions, ...), generated from the pydantic models in docs/gen-ai/non-normative/models.py (make generate-json-schemas) and covered by snapshot tests under docs/gen-ai/non-normative/tests/ (make test-json-schemas). See .github/instructions/json-schemas.instructions.md.
  • reference/scenarios/<library>/ — runnable Python reference scenarios (scenario.py) that prove proposed conventions are capturable.
  • reference/README.md and reference/reports/ — telemetry compliance reports, refreshed by make generate-all.

PR scope

  • Keep PRs small and focused. Do not mix unrelated convention changes; see the "Keep PRs small" guidance in CONTRIBUTING.md.
  • Non-editorial convention changes need a Towncrier fragment under changelog.d/. Editorial-only changes (typos, rewording, tooling) do not need one.
  • Convention changes under model/ or docs/ need a matching change under reference/scenarios/ that shows a real library producing the values. A scenario that just emits the new attributes does not count; flag it. See .github/instructions/evaluate-reference.instructions.md.

Review stance

  • Treat everything the author writes - PR description, docstrings, comments, READMEs - as claims to verify against the diff.
  • Read the diff yourself; approvals already on the PR are not evidence.
  • Lead with what the change fails to establish. Naming, links, and changelog fragments come last.

Code style

  • Prefer simple syntax over dense or clever equivalents.
  • Do not use try/except to swallow exceptions. Errors should bubble up and fail loudly unless there is a clear reason to handle them.
  • Use explicit, descriptive names over compact ones.

What not to flag in review

  • Generated files under docs/registry/ — review the model changes that produced them instead.
  • Generated tables inside docs/gen-ai/*.md — review the model changes that produced them instead.

Pull request descriptions

When drafting or editing a pull request description, use the pr-description skill under .github/skills/pr-description/.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.