Shared standards submodule for .NET projects. Contains:
| File | Purpose |
|---|---|
CLAUDE.md |
Claude Code instructions — coding conventions, build commands, workflow rules |
.editorconfig |
Editor formatting rules and Roslyn analyzer severity overrides |
global.json |
.NET SDK version pin with roll-forward policy |
nuget.config |
NuGet package sources and source mapping |
# From the root of your consuming repo
git submodule add <this-repo-url> standards
git submodule update --init --recursiveThis creates a standards/ folder tracked as a submodule.
Each file must be reachable from the repo root so that the relevant tooling picks it up automatically. The approach differs by file type.
EditorConfig has no import mechanism. Copy the file to your repo root:
cp standards/.editorconfig .editorconfigWhen updating the submodule, re-copy if the shared rules have changed. If your repo has its own overrides, keep them in your .editorconfig below the copied block and note which sections are local additions.
global.json has no import mechanism. Copy it to your repo root and set the SDK version your projects require:
cp standards/global.json global.jsonThe rollForward: latestMinor policy accepts any newer minor SDK in the same major band, so you only need to update version when moving to a new major.
nuget.config has no import mechanism. Copy it to your repo root:
cp standards/nuget.config nuget.configUncomment the internal feed blocks if your organisation uses a private NuGet feed.
Copy to your repo root so Claude Code picks it up automatically:
cp standards/CLAUDE.md CLAUDE.mdAdd any repo-specific instructions below the copied content.
To pull the latest standards into a consuming repo:
git submodule update --remote --merge standards
git add standards
git commit -m "chore: update standards submodule"To pin a specific commit instead of tracking main:
cd standards
git checkout <commit-sha>
cd ..
git add standards
git commit -m "chore: pin standards to <commit-sha>"git clone --recurse-submodules <repo-url>
# Or if already cloned without --recurse-submodules:
git submodule update --init --recursive