agentleFS
Microsoft AzureKnown publisherAzure/typespec-azure/.github/copilot-instructions.md

typespec-azure

Copilot instructions27 starsChanged 2 years agoMITView on GitHub

This document serves as an index to task-specific instructions for GitHub Copilot. Each task has its own detailed instructions file in the .github/prompts directory. This repo pins its development tools with mise via mise.toml and mise.lock: Node.js, pnpm, Python, uv, Go, Java, and Maven.

The file

Show its rules and text

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

16 rules. About 0 are common, 2 are distinctive, and 14 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 14

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Very specific:

    Check for mise first (mise --version).

    line 9
  2. Very specific:

    Run mise install from the repo root to install the pinned versions.

    line 11
  3. Very specific:

    Use mise ls --current to confirm which tool versions are active for this repo.

    line 13
  4. Very specific:

    If mise is not installed, fall back to the tools on PATH, but match the versions in mise.toml and the packageManager field in package.json.

    line 14
  5. Very specific:

    Use pnpm as the package manager (prefix with mise exec -- when mise is installed but not activated in the shell)

    line 19
  6. Very specific:

    Use pnpm install to install dependencies

    line 20
  7. Very specific:

    Use pnpm build to build every package

    line 21
  8. Very specific:

    Use pnpm -r --filter "<pkgName>..." build to build to a specific package <pkgName>

    line 22
  9. Very specific:

    Use pnpm format to format all files

    line 23
  10. Very specific:

    Always run pnpm format && pnpm lint before committing.

    line 27
  11. Distinctive:

    Always describe changes (see "Describing changes" section below).

    line 28
  12. Very specific:

    Do not commit the file core or pnpm-lock.yaml unless your change specifically requires updating them (e.g., the nightly bot updates the …

    line 29
  13. Very specific:

    Use pnpm change add to add a change description for the touched packages

    line 34
  14. Very specific:

    When creating worktrees or branches for new work, base them off the main Azure fork's main branch (Azure/typespec-azure).

    line 39
  15. Very specific:

    When creating worktrees (which clone the repo), always clone recursively with --recurse-submodules and run git submodule update --init if …

    line 40
  16. Distinctive:

    When pushing changes and creating pull requests, push to your personal fork and open PRs against the main Azure fork's main branch.

    line 42

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

Copilot Instructions

This document serves as an index to task-specific instructions for GitHub Copilot. Each task has its own detailed instructions file in the .github/prompts directory.

Development Environment (mise)

This repo pins its development tools with mise via mise.toml and mise.lock: Node.js, pnpm, Python, uv, Go, Java, and Maven.

  • Check for mise first (mise --version). If it is installed, prefer the mise-managed tools over whatever happens to be on PATH — a globally installed node/pnpm/python is often the wrong version or misconfigured.
  • A fresh clone or git worktree is untrusted, so mise refuses to load its config. If you see Config files in ... are not trusted, run mise trust from the repo root, then continue.
  • Run mise install from the repo root to install the pinned versions. It is a fast no-op (mise all tools are installed) when everything is already present, so it is safe to run before other setup.
  • Non-interactive shells (including the ones agents run commands in) usually do not have mise activated, so the pinned tools are not on PATH. Prefix commands with mise exec -- (for example mise exec -- pnpm install, mise exec -- pnpm build, mise exec -- python --version). Without it, commands can fail with confusing errors such as The packageManager dependency "pnpm@..." in pnpm-lock.yaml must use a registry package path.
  • Use mise ls --current to confirm which tool versions are active for this repo.
  • If mise is not installed, fall back to the tools on PATH, but match the versions in mise.toml and the packageManager field in package.json.

Install and Build

  • Packages are located in the packages folder
  • Use pnpm as the package manager (prefix with mise exec -- when mise is installed but not activated in the shell)
  • Use pnpm install to install dependencies
  • Use pnpm build to build every package
  • Use pnpm -r --filter "<pkgName>..." build to build to a specific package <pkgName>
  • Use pnpm format to format all files

Commit Rules

  • Always run pnpm format && pnpm lint before committing.
  • Always describe changes (see "Describing changes" section below).
  • Do not commit the file core or pnpm-lock.yaml unless your change specifically requires updating them (e.g., the nightly bot updates the core submodule dependency). If these appear in your staged changes unintentionally, unstage them before committing.

Describing changes

  • Repo use @chronus/chronus for changelogs
  • Use pnpm change add to add a change description for the touched packages
  • Types of changes are described in .chronus/config.yaml

Branch and PR Workflow

  • When creating worktrees or branches for new work, base them off the main Azure fork's main branch (Azure/typespec-azure). Depending on the user's local git remote setup, this may be called upstream or origin.
  • When creating worktrees (which clone the repo), always clone recursively with --recurse-submodules and run git submodule update --init if the core/ submodule is missing or not at the correct commit. See CONTRIBUTING.md - Cloning recursively for details.
  • A new clone or worktree also needs mise trust (and mise install if tools are missing) before pnpm and other tools will work — see Development Environment (mise).
  • When pushing changes and creating pull requests, push to your personal fork and open PRs against the main Azure fork's main branch.

Available Task Instructions

  • Testserver Generation: Instructions for generating TypeSpec HTTP spec test servers

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.