lr.Dotnet.GuidelinesForCodingAgents 2026.8.10.2057
lr.Dotnet.GuidelinesForCodingAgents
A NuGet package that deploys AI coding agent guideline files to consuming .NET projects at build time. Keeps AGENTS.md, .claude/CLAUDE.md, .github/copilot-instructions.md, and .junie/guidelines.md consistent across all lr .NET repositories.
How it works
When a project references this NuGet package, an MSBuild task runs before every build that:
- Discovers the repository root by walking up from the project directory looking for
.git,.sln,.slnx, ornuget.config - Deploys template files from configured template sets to the repository root
- Preserves user content — a
---separator in each file divides template content (above, always updated) from project-specific content (below, never overwritten)
Installation
Add the package reference to your project:
<PackageReference Include="lr.Dotnet.GuidelinesForCodingAgents" Version="*" />
On the next build, these files appear at your repository root:
AGENTS.md— Agent instructions for Junie, Claude, and GitHub Copilot.claude/CLAUDE.md— Claude Code project instructions.github/copilot-instructions.md— GitHub Copilot instructions.junie/guidelines.md— Junie guidelines
User content preservation
Each deployed file contains template content followed by a --- separator. Add project-specific instructions below the separator — they survive template updates:
# Agent Instructions
(template content — automatically updated)
---
## Project-Specific Instructions
(your content here — preserved across builds)
If a file already exists without a separator, the existing content is treated as user content and placed below the separator.
Configuration
Template sets
The default template set is std1. Override via MSBuild property:
<PropertyGroup>
<GuidelinesForCodingAgentsTemplateNames>std1</GuidelinesForCodingAgentsTemplateNames>
</PropertyGroup>
Multiple template sets are separated by ;. Later sets override earlier ones for files at the same path.
Project structure
lr.Dotnet.GuidelinesForCodingAgents/
├── msbuild/
│ ├── lr.Dotnet.GuidelinesForCodingAgents.props # Default MSBuild properties
│ ├── lr.Dotnet.GuidelinesForCodingAgents.targets # MSBuild task definition and target
│ └── DeployGuidelines.cs # RoslynCodeTaskFactory code fragment
├── templates/
│ └── std1/ # Default template set
│ ├── AGENTS.md
│ ├── .claude/CLAUDE.md
│ ├── .github/copilot-instructions.md
│ └── .junie/guidelines.md
├── docs/
│ ├── 10_Quickstart.md
│ ├── 20_Deployment.md
│ └── 80_Architecture.md
├── lr.Dotnet.GuidelinesForCodingAgents.csproj
├── lr.Dotnet.GuidelinesForCodingAgents.slnx
├── .github/workflows/dotnet.yml
├── pack-libs.sh
└── README.md
Documentation
| Document | Description |
|---|---|
| docs/10_Quickstart.md | Installation, deployed files, user content preservation, and customization |
| docs/20_Deployment.md | NuGet packaging, publishing, and the GitHub Actions workflow |
| docs/80_Architecture.md | Package structure, MSBuild task architecture, template system, and target folder discovery |
No packages depend on lr.Dotnet.GuidelinesForCodingAgents.
| Version | Downloads | Last updated |
|---|---|---|
| 2026.8.12.2235 | 4 | 08/12/2026 |
| 2026.8.10.2057 | 9 | 08/10/2026 |
| 2026.8.8.2211 | 128 | 08/08/2026 |
| 2026.8.8.1244 | 4 | 08/08/2026 |
| 2026.8.5.2131 | 27 | 08/05/2026 |