agentleFS
MicrosoftKnown publishermicrosoft/vscode-cosmosdb/.github/copilot-instructions.md

vscode-cosmosdb

Copilot instructions200 starsChanged 4 months agoMITView on GitHub

NEVER use npm run compile - always use npm run build to build the project.

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
  1. Very specific:

    Do not make direct changes to localization files inside the l10n/ (e.g., bundle.l10n.json, bundle.l10n.[lang].json, etc.) folder or …

    line 22
  2. Very specific:

    After modifying any localizable strings, always run npm run l10n to update strings.

    line 24
  3. Very specific:

    When auditing keys, the source-of-truth catalog of all extracted l10n.t() template strings is l10n/bundle.l10n.json (regenerated by npm run …

    line 30
  4. Very specific:

    When implementing or modifying UI in React/Fluent UI webviews (for example under src/webviews/), use the accessibility-aria-expert skill.

    line 34
  5. Distinctive:

    Keep all user-facing accessibility messages localizable and follow the Localization rules above.

    line 36
  6. Very specific:

    When adding, modifying, or reviewing telemetry — any callWithTelemetryAndErrorHandling call, any context.telemetry.properties/measurements …

    line 40
  7. Distinctive:

    Before finishing work, agents must run the following steps in order:

    line 45
  8. Distinctive:

    Do not infer success from a clean git status: the formatter may have exited before processing files.

    line 60

≈ “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.

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

GitHub Copilot Instructions for vscode-cosmosdb

Critical Build Commands

CommandPurpose
npm run buildBuild the project (use this, NOT npm run compile)
npm run lintCheck for linting errors
npm run prettier-fixFormat code
npm run l10nUpdate localization files after changing user-facing strings

NEVER use npm run compile - always use npm run build to 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 run npx 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 or package.[lang].nls.json files (e.g., package.nls.de.json, package.nls.fr.json, etc.).
  • To update strings used in package.json, modify package.nls.json only. Do not update the actual translation files.
  • After modifying any localizable strings, always run npm run l10n to 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 separate l10n.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}%` (not l10n.t('{percent}%')), `${label} — ${share}` (not l10n.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:'), not l10n.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 as l10n.t('Database') + ':'. Colon spacing/glyph varies by locale (French uses a narrow no-break space Type :, 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 is l10n/bundle.l10n.json (regenerated by npm run l10n).

Accessibility Skill Routing

  • When implementing or modifying UI in React/Fluent UI webviews (for example under src/webviews/), use the accessibility-aria-expert skill.
  • 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 callWithTelemetryAndErrorHandling call, any context.telemetry.properties/measurements assignment, any helper that mutates an IActionContext to record stats, or any new telemetry event name — use the telemetry-best-practices skill.
  • 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 code 255. 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.

  1. Localization — If any user-facing strings were added, modified, or removed, run:
    npm run l10n
  2. Formatting — Run oxfmt and verify that it exits with code 0:
    npm run prettier-fix
    Do not infer success from a clean git status: the formatter may have exited before processing files.
  3. Linting — Run the complete lint suite to confirm there are no linting errors:
    npm run lint
  4. 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.

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.