Skip to content

TypeSpec review: use the .NET code-review skill's C# naming rules instead of a restated copy #47839

Open

Description

@m-nash

Summary

Azure/azure-sdk-for-net#62615, merged Oct 30, makes the code-review skill the review standard for every .NET SDK PR. That includes its C# naming rules: Naming — Review-Only and the H2 naming checks.

This repo restates those rules in the azure-typespec-sdk-naming skill:

The TypeSpec review doesn't use them either. typespec-review.instructions.md is applied to .tsp files by Copilot code review and the ARM API Review workflow. Its rules cover REST naming; its only check on SDK names is @@clientName casing (§2.8). C# naming problems introduced in a spec PR therefore surface only when the generated .NET PR is reviewed, which is the late rework loop Azure/azure-sdk-tools#17269 is meant to remove.

Make the TypeSpec review check C#-visible names against the .NET rules, and make the skill link to those rules instead of restating them.

Why

Proposal

  1. Link, don't restate. Replace the rule tables in both C# references with links to the canonical sections on azure-sdk-for-net main, not a SHA. Keep only TypeSpec-specific guidance: target and profile selection, language-scoped @@clientName, wire-name preservation, emitter defaults (Reference C# emitter naming conversions in naming skill #47556), emitter-synthesized types, shipped-API compatibility, and apply/validate.
  2. Reconcile before deleting. Diff each restated rule against the canonical ones. Move rules that exist only here into azure-sdk-for-net, or drop them on purpose. Fix conflicts in azure-sdk-for-net, including its own Mgmt-Naming-Conventions.md, where Options → Config (L62) and Data/Info for *Operation (L87) originate. The canonical rules need a fix too: they suggest *Data for a non-Operation<T> *Operation model (L265) while reserving *Data for the ARM resource trio (L376).
  3. Use the skill in the TypeSpec review. In §2.8, when a PR adds or changes C#-visible names (C#-scoped @@clientName overrides, or new public models, properties, or operations in a project that emits C#), apply azure-typespec-sdk-naming in read-only review mode. Copilot code review already loads a skill this way. Align the §2.8 casing rule with the skill.
  4. Keep one TypeSpec-side copy. Make the same change to the azure-sdk-tools copy ([C# Naming] Consume C# naming rules from azure-sdk-for-net instead of restating them azure-sdk-tools#17371), or delete one of the copies.

Open question

Confirm that Copilot code review and the ARM API Review workflow can fetch cross-repo rules at review time; the #47625 prototype already fetches and pins the canonical .NET skill. If they can't, generate the copy from azure-sdk-for-net with a drift check instead of maintaining it by hand.

Acceptance criteria

  • azure-typespec-sdk-naming defines no C# naming rules of its own; its C# profiles link to the azure-sdk-for-net code-review skill on main.
  • No links to azure-sdk-mgmt-pr-review or pinned PR-branch SHAs remain.
  • typespec-review.instructions.md routes C#-visible naming changes to azure-typespec-sdk-naming in review mode, and its @@clientName casing rule agrees with the skill.
  • Evals cover the divergences above (CreatedAt, an *Options payload model), and the existing naming evals still pass (azure-typespec-author 007001–007014, azure-typespec-sdk-naming/evals).

Related


🤖 m-nash-copilot

Activity

  1. added
    EngSysThis issue is impacting the engineering system.
    on Nov 2, 2026
  2. self-assigned this
    on Nov 2, 2026
  3. added
    bugThis issue requires a change to an existing behavior in the product in order to be resolved.
    on Nov 2, 2026
  4. github-actions commented on Nov 2, 2026

    @github-actions

    Issue triage

    Update the repository's TypeSpec review and SDK-naming skill to use the canonical .NET C# naming rules, remove stale restated rules and links, align casing guidance, and add coverage for known divergences.

    Routing: EngSys. This concerns repository-owned Copilot/ARM review instructions, skills, synchronization, and evaluation behavior under .github, so it is an engineering-system issue rather than a service REST contract issue.

    Automated initial triage, not a resolution or relevance assessment. Workflow run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

EngSysThis issue is impacting the engineering system.bugThis issue requires a change to an existing behavior in the product in order to be resolved.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions