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.
- AGENTS.mdAGENTS.md
- reference/AGENTS.mdAGENTS.md
- pr-descriptionSkill
- referenceSkill
- unslopSkill
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
- Very specific: line 32
Keep PRs small and focused.
- Distinctive: line 43
Treat everything the author writes - PR description, docstrings, comments, READMEs - as claims to verify against the diff.
- Distinctive: line 45
Read the diff yourself; approvals already on the PR are not evidence.
- Distinctive: line 51
Prefer simple syntax over dense or clever equivalents.
- Very specific: line 52
Do not use try/except to swallow exceptions.
- Distinctive: line 54
Use explicit, descriptive names over compact ones.
- Very specific: line 65
When drafting or editing a pull request description, use the pr-description skill under .github/skills/pr-description/.
≈ “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.
Files
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 inregistry.yaml.docs/gen-ai/anddocs/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 indocs/gen-ai/non-normative/models.py(make generate-json-schemas) and covered by snapshot tests underdocs/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.mdandreference/reports/— telemetry compliance reports, refreshed bymake 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/ordocs/need a matching change underreference/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/exceptto 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/.
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.

