opentelemetry-distro-browser
AGENTS.md0 starsChanged 2 months agoMITView on GitHub
Avoid creating new Markdown (.md) files as part of routine work. Prefer updating existing documentation, subject to the README restrictions below. Only add a new document when explicitly requested by the user or when it adds clear, lasting value that existing documentation cannot cover. Do not create summary, planning, progress, or implementation-note Markdown files unless requested. Do not add README.md files inside source folders. This repository has one root README.md. Document code in TSDoc on the declarations themselves. Do not…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,736 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.
The file
We split this AGENTS.md into the rules it gives an agent
10 rules. About 0 are common, 9 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 5
Avoid creating new Markdown (.md) files as part of routine work.
- Distinctive: line 8
Do not create summary, planning, progress, or implementation-note Markdown files unless requested.
- Distinctive: line 12
Do not add README.md files inside source folders.
- Distinctive: line 13
Document code in TSDoc on the declarations themselves.
- Distinctive: line 15
Do not modify the root README.md during general updates unless the user explicitly requests README changes.
- Distinctive: line 19
When README changes are explicitly requested, preserve its existing structure, voice, and content unless the requested change requires …
- Distinctive: line 32
Treat minified browser bundle size as a design constraint for every change, not a final cleanup.
- Distinctive: line 35
Use type-only imports and exports for contracts so upstream SDK types add no runtime code.
- Distinctive: line 36
Prefer tree-shakeable modules and supported, focused public dependency entry points.
- Distinctive: line 39
Keep diagnostics concise and actionable.
≈ “Common” is an estimate: at least 1 in 5 of the 16,597 AGENTS.md 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 guidance
Markdown file creation
Avoid creating new Markdown (.md) files as part of routine work. Prefer updating existing
documentation, subject to the README restrictions below. Only add a new document when explicitly
requested by the user or when it adds clear, lasting value that existing documentation cannot cover.
Do not create summary, planning, progress, or implementation-note Markdown files unless requested.
README changes
Do not add README.md files inside source folders. This repository has one root README.md.
Document code in TSDoc on the declarations themselves.
Do not modify the root README.md during general updates unless the user explicitly requests
README changes. This includes feature work, bug fixes, dependency updates, tooling changes, and
formatting. Do not replace the existing README with generated summaries or generic project scaffolding.
When README changes are explicitly requested, preserve its existing structure, voice, and content unless the requested change requires otherwise, and keep edits limited to the requested scope.
JavaScript distro alignment
Use microsoft/opentelemetry-distro-javascript as a design reference. Align public APIs, configuration, naming, and initialization/lifecycle patterns where practical and compatible with the browser environment. Prefer established distro patterns over inventing alternatives, but do not pursue parity at the expense of browser bundle size. Explain necessary deviations and use the bundle-size checks below to evaluate runtime or dependency tradeoffs.
Browser bundle size
Treat minified browser bundle size as a design constraint for every change, not a final cleanup. Optimize the emitted production JavaScript rather than source length:
- Use type-only imports and exports for contracts so upstream SDK types add no runtime code.
- Prefer tree-shakeable modules and supported, focused public dependency entry points. Keep optional exporters and instrumentations out of unrelated bundles; avoid unnecessary runtime wrappers, duplicate helpers, polyfills, and type-only concepts emitted as runtime objects.
- Keep diagnostics concise and actionable. Do not sacrifice correctness, public API compatibility, useful error reporting, or readable source through hand-minification or unsafe property mangling.
- For runtime, dependency, or build changes, compare before/after sizes using the same production
build:
npm run buildfollowed bynpm run size. Check minified, gzip, and Brotli output, not unminified source size or summed dependency sizes. Investigate unexpected growth withreports/bundle-stats.htmland verify unused exports remain tree-shakeable.
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.

