|
| 1 | +# GitHub Copilot Agents Configuration |
| 2 | + |
| 3 | +This repository contains configuration and instructions for GitHub Copilot agents to assist with development tasks. |
| 4 | + |
| 5 | +## Repository Overview |
| 6 | + |
| 7 | +**DotnetToolWrapper** is a .NET 8.0, 9.0, and 10.0 console application that serves as a wrapper for native |
| 8 | +applications packaged as [.NET Tools](https://learn.microsoft.com/en-us/dotnet/core/tools/global-tools). |
| 9 | + |
| 10 | +## Project Structure |
| 11 | + |
| 12 | +```text |
| 13 | +DotnetToolWrapper/ |
| 14 | +├── .github/ |
| 15 | +│ └── workflows/ # GitHub Actions workflows |
| 16 | +│ ├── build.yaml # Reusable build workflow |
| 17 | +│ ├── build_on_push.yaml # Triggered on push events |
| 18 | +│ └── release.yaml # Release workflow |
| 19 | +├── src/ |
| 20 | +│ └── DemaConsulting.DotnetToolWrapper/ |
| 21 | +│ ├── Program.cs # Main application logic |
| 22 | +│ └── DemaConsulting.DotnetToolWrapper.csproj |
| 23 | +├── .cspell.json # Spelling check configuration |
| 24 | +├── .markdownlint.json # Markdown linting configuration |
| 25 | +├── README.md # Project documentation |
| 26 | +├── LICENSE # MIT License |
| 27 | +└── spdx-workflow.yaml # SBOM enhancement workflow |
| 28 | +``` |
| 29 | + |
| 30 | +## Key Technologies |
| 31 | + |
| 32 | +- **.NET 8.0, 9.0, 10.0**: Multi-targeted framework versions |
| 33 | +- **C# 12**: Programming language |
| 34 | +- **GitHub Actions**: CI/CD automation |
| 35 | +- **SBOM Tools**: Software Bill of Materials generation |
| 36 | + |
| 37 | +## Development Guidelines |
| 38 | + |
| 39 | +### Building the Project |
| 40 | + |
| 41 | +```bash |
| 42 | +dotnet restore |
| 43 | +dotnet build --configuration Release |
| 44 | +``` |
| 45 | + |
| 46 | +### Code Standards |
| 47 | + |
| 48 | +- **Language Version**: C# 12 |
| 49 | +- **Nullable Reference Types**: Enabled |
| 50 | +- **Implicit Usings**: Enabled |
| 51 | +- **Target Frameworks**: net8.0, net9.0, net10.0 |
| 52 | + |
| 53 | +### Workflow Structure |
| 54 | + |
| 55 | +The project uses a modular workflow approach: |
| 56 | + |
| 57 | +1. **build_on_push.yaml**: Triggers on every push, calls the reusable build workflow |
| 58 | +2. **build.yaml**: Reusable workflow that performs the actual build, SBOM generation, and artifact upload |
| 59 | +3. **release.yaml**: Handles release-specific tasks |
| 60 | + |
| 61 | +### Quality Checks |
| 62 | + |
| 63 | +Quality checks are automated through GitHub Actions: |
| 64 | + |
| 65 | +- **Spelling**: Checked using `cspell` against `.cspell.json` configuration |
| 66 | +- **Markdown Linting**: Validated using `markdownlint-cli` against `.markdownlint.json` configuration |
| 67 | + |
| 68 | +## Agent Instructions |
| 69 | + |
| 70 | +### When Working with Code |
| 71 | + |
| 72 | +1. **Multi-targeting**: Always ensure changes are compatible with .NET 8.0, 9.0, and 10.0 |
| 73 | +2. **Cross-platform**: The tool must work on Windows, Linux, FreeBSD, and macOS |
| 74 | +3. **Architecture Support**: Support x86, x64, ARM, ARM64, WASM, and S390x architectures |
| 75 | + |
| 76 | +### When Modifying Workflows |
| 77 | + |
| 78 | +1. Preserve the reusable workflow pattern |
| 79 | +2. Update both `build.yaml` and `build_on_push.yaml` if needed |
| 80 | +3. Ensure SBOM generation continues to work |
| 81 | + |
| 82 | +### When Updating Documentation |
| 83 | + |
| 84 | +1. Follow the markdown linting rules in `.markdownlint.json` |
| 85 | +2. Check spelling against `.cspell.json` dictionary |
| 86 | +3. Keep README.md synchronized with actual functionality |
| 87 | + |
| 88 | +## Common Tasks |
| 89 | + |
| 90 | +### Adding New Dependencies |
| 91 | + |
| 92 | +Update the `.csproj` file in `src/DemaConsulting.DotnetToolWrapper/` |
| 93 | + |
| 94 | +### Modifying Build Output |
| 95 | + |
| 96 | +Edit the "Create Drop Folder" step in `.github/workflows/build.yaml` |
| 97 | + |
| 98 | +### Updating Supported Frameworks |
| 99 | + |
| 100 | +1. Modify `<TargetFrameworks>` in the `.csproj` file |
| 101 | +2. Update workflow files to include new framework versions |
| 102 | +3. Update the "Create Drop Folder" step to copy artifacts for new frameworks |
| 103 | + |
| 104 | +## Testing Changes |
| 105 | + |
| 106 | +Before committing: |
| 107 | + |
| 108 | +1. Build locally: `dotnet build --configuration Release` |
| 109 | +2. Run spelling checks: `npx cspell "**/*.md"` |
| 110 | +3. Run markdown linting: `npx markdownlint "**/*.md"` |
| 111 | + |
| 112 | +## Contact |
| 113 | + |
| 114 | +For questions or issues, please refer to the repository's issue tracker on GitHub. |
0 commit comments