vscode-cosmosdb
Copilot instructions200 starsChanged 4 months agoMITView on GitHub
NEVER use npm run compile - always use npm run build to build the project.
In this repository6 other files it gives its agents.
The file
We split this copilot-instructions.md into the rules it gives an agent
8 rules. About 0 are common, 3 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 22
Do not make direct changes to localization files inside the l10n/ (e.g., bundle.l10n.json, bundle.l10n.[lang].json, etc.) folder or …
- Very specific: line 24
After modifying any localizable strings, always run npm run l10n to update strings.
- Very specific: line 30
When auditing keys, the source-of-truth catalog of all extracted l10n.t() template strings is l10n/bundle.l10n.json (regenerated by npm run …
- Very specific: line 34
When implementing or modifying UI in React/Fluent UI webviews (for example under src/webviews/), use the accessibility-aria-expert skill.
- Distinctive: line 36
Keep all user-facing accessibility messages localizable and follow the Localization rules above.
- Very specific: line 40
When adding, modifying, or reviewing telemetry — any callWithTelemetryAndErrorHandling call, any context.telemetry.properties/measurements …
- Distinctive: line 45
Before finishing work, agents must run the following steps in order:
- Distinctive: line 60
Do not infer success from a clean git status: the formatter may have exited before processing files.
≈ “Common” is an estimate: at least 1 in 5 of the 1,644 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
GitHub Copilot Instructions for vscode-cosmosdb
Critical Build Commands
| Command | Purpose |
npm run build | Build the project (use this, NOT npm run compile) |
npm run lint | Check for linting errors |
npm run prettier-fix | Format code |
npm run l10n | Update localization files after changing user-facing strings |
NEVER use
npm run compile- always usenpm run buildto build the project.
Code Style
- Wrap comments at 120 characters, the same as the code line width — do not wrap comments at 80. This applies to
//line comments and/* */block comments. When reflowing, preserve URLs on their own line, blank//paragraph separators, and lint directives (e.g.// oxlint-disable-next-line ...). - Break comment lines at logical boundaries, not greedily at the character limit. Prefer breaks at the end of a sentence or clause so each line reads as a coherent unit, and keep the lines reasonably balanced. Never leave a dangling orphan line with just a word or two (e.g. a lone
// 3).or// path.); pull an earlier word down so the last line is substantial. - The repository is formatted with oxfmt (
npm run prettier-fix), not Prettier. Never runnpx prettier— it uses different defaults (e.g. quote style) and will diverge from the repo format.
Localization
- Do not make direct changes to localization files inside the
l10n/(e.g.,bundle.l10n.json,bundle.l10n.[lang].json, etc.) folder orpackage.[lang].nls.jsonfiles (e.g.,package.nls.de.json,package.nls.fr.json, etc.). - To update strings used in
package.json, modifypackage.nls.jsononly. Do not update the actual translation files. - After modifying any localizable strings, always run
npm run l10nto update strings. - Each
l10n.t()translation key (the template string) must be 500 characters or fewer. If a string exceeds this limit, split it into multiple separatel10n.t()calls and concatenate them (e.g.,l10n.t('Part one.') + l10n.t('Part two.')). - Do not wrap non-translatable content in
l10n.t(). If a string has no translatable words after removing{placeholders}, drop the wrapper and use a plain template literal instead. Examples:`${percent}%`(notl10n.t('{percent}%')),`${label} — ${share}`(notl10n.t('{label} — {share}')). Pure symbols/units/format strings gain nothing from localization. - Keep decorative symbols out of the translation key. Emoji and other decoration should be concatenated in code, not embedded in the key — e.g.
'❌ ' + l10n.t('Command failed:'), notl10n.t('❌ Command failed:'). - Do not hardcode punctuation that is locale-dependent. In particular, keep a trailing colon inside the translated string (e.g.
l10n.t('Database:')), do not rewrite it asl10n.t('Database') + ':'. Colon spacing/glyph varies by locale (French uses a narrow no-break spaceType :, CJK uses fullwidth:), so translators must control it. - Distinguish label-colon from sentence-colon: a trailing colon that is natural sentence punctuation introducing following detail (e.g.
l10n.t('The query has syntax errors:')) is fine and should be left as-is; it is not the same anti-pattern as a short UI label. - When auditing keys, the source-of-truth catalog of all extracted
l10n.t()template strings isl10n/bundle.l10n.json(regenerated bynpm run l10n).
Accessibility Skill Routing
- When implementing or modifying UI in React/Fluent UI webviews (for example under
src/webviews/), use theaccessibility-aria-expertskill. - Apply the skill for ARIA labeling, tooltip accessibility, keyboard/focus behavior, status announcements, and dialog focus management.
- Keep all user-facing accessibility messages localizable and follow the Localization rules above.
Telemetry Skill Routing
- When adding, modifying, or reviewing telemetry — any
callWithTelemetryAndErrorHandlingcall, anycontext.telemetry.properties/measurementsassignment, any helper that mutates anIActionContextto record stats, or any new telemetry event name — use thetelemetry-best-practicesskill. - Apply the skill specifically to verify that no PII/EUII (file names, paths, resource names, IDs, queries, free-form user input, raw error messages) is emitted, and that properties vs. measurements, naming, and error categorization follow the repo conventions.
Validation Before Finishing
Before finishing work, agents must run the following steps in order:
Verify every command's exit code. A command has passed only when its process exits with code
0; seeing the npm command banner or no error output is not sufficient. Some tools in this repository can terminate silently with exit code255. When the execution tool does not report the exit code reliably, capture and print it explicitly, and fail the shell command when it is nonzero. Do not continue to the next validation step after a nonzero exit.
- Localization — If any user-facing strings were added, modified, or removed, run:
npm run l10n - Formatting — Run oxfmt and verify that it exits with code
0:
Do not infer success from a cleannpm run prettier-fixgit status: the formatter may have exited before processing files. - Linting — Run the complete lint suite to confirm there are no linting errors:
npm run lint - Build — Run all configured TypeScript build targets:
npm run build
An agent must not finish or terminate until every applicable step above has been run and its zero exit code verified. Skipping these steps or trusting output without checking the process result leads to CI failures.
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.

