From 72f9d7cf67577960cf64453de24d70c0642cc0b8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 10 Dec 2025 14:44:00 +0000 Subject: [PATCH 1/4] Initial plan From e5c5b266cf3e8a551b1ea1a0039e8435eb18fded Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 10 Dec 2025 14:46:50 +0000 Subject: [PATCH 2/4] Create Copilot setup workflow and AGENTS.md file Co-authored-by: stephenfuqua <9324390+stephenfuqua@users.noreply.github.com> --- .github/workflows/copilot-setup-steps.yml | 26 +++++++ AGENTS.md | 88 +++++++++++++++++++++++ 2 files changed, 114 insertions(+) create mode 100644 .github/workflows/copilot-setup-steps.yml create mode 100644 AGENTS.md diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml new file mode 100644 index 0000000..e23c265 --- /dev/null +++ b/.github/workflows/copilot-setup-steps.yml @@ -0,0 +1,26 @@ +# SPDX-License-Identifier: Apache-2.0 +# Licensed to the Ed-Fi Alliance under one or more agreements. +# The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0. +# See the LICENSE and NOTICES files in the project root for more information. + +name: Copilot Setup Steps +on: + workflow_dispatch: + +jobs: + setup: + name: Setup + runs-on: ubuntu-latest + + defaults: + run: + working-directory: ./src + + steps: + - uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # v2.4.0 + - name: Setup .NET + uses: actions/setup-dotnet@499789684c9a0d41c9b3f0d66a785ba17b1d51ab # v1.9.0 + with: + dotnet-version: 6.0.x + - name: Restore dependencies + run: dotnet restore Ed-Fi-SDG.sln diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..d68ef50 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,88 @@ +# Agent Instructions + +This document provides instructions for AI coding agents working on this repository. + +## Project Overview + +This is a C# .NET project for the Ed-Fi Sample Data Generator (SDG), which produces realistic, cohesive, and fictional datasets for use in demonstrations and testing. + +## Development Environment + +### Prerequisites + +- .NET 6.0 SDK or later +- A C# compatible IDE (Visual Studio, Visual Studio Code, or JetBrains Rider) + +### Setup Steps + +1. Clone the repository +2. Navigate to the `src` directory +3. Run `dotnet restore Ed-Fi-SDG.sln` to restore dependencies +4. Run `dotnet build` to build the solution +5. Run `dotnet test` to execute tests + +## C# Coding Standards + +### General Guidelines + +- Follow the existing code style and conventions in the repository +- Use meaningful variable and method names +- Keep methods small and focused on a single responsibility +- Write XML documentation comments for public APIs +- Prefer composition over inheritance where appropriate + +### Naming Conventions + +- Use PascalCase for class names, method names, and public properties +- Use camelCase for local variables and private fields +- Use UPPER_CASE for constants +- Prefix interface names with 'I' (e.g., `IService`) +- Use async suffix for asynchronous methods (e.g., `GetDataAsync`) + +### Code Organization + +- Keep related classes in appropriate namespaces +- One class per file (except for small, tightly coupled helper classes) +- Place unit tests in corresponding test projects +- Use dependency injection for loose coupling + +### Error Handling + +- Use exceptions for exceptional conditions, not flow control +- Catch specific exceptions rather than generic Exception +- Provide meaningful error messages +- Clean up resources properly using `using` statements or try-finally blocks + +### Testing + +- Write unit tests for new functionality +- Follow the Arrange-Act-Assert pattern in tests +- Use descriptive test method names that explain what is being tested +- Ensure tests are isolated and can run independently + +## Building and Testing + +### Build the Solution + +```bash +cd src +dotnet build Ed-Fi-SDG.sln +``` + +### Run Tests + +```bash +cd src +dotnet test +``` + +### Run Specific Tests + +```bash +cd src +dotnet test --filter "FullyQualifiedName~YourTestNamespace" +``` + +## License + +This project is licensed under the Apache License, Version 2.0. See the LICENSE file for details. From 654df0a9b8ceeb209b983fe3ea5863560e5d0a50 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 10 Dec 2025 14:48:38 +0000 Subject: [PATCH 3/4] Add explicit permissions to Copilot setup workflow Co-authored-by: stephenfuqua <9324390+stephenfuqua@users.noreply.github.com> --- .github/workflows/copilot-setup-steps.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml index e23c265..5aff8fd 100644 --- a/.github/workflows/copilot-setup-steps.yml +++ b/.github/workflows/copilot-setup-steps.yml @@ -11,6 +11,8 @@ jobs: setup: name: Setup runs-on: ubuntu-latest + permissions: + contents: read defaults: run: From 3d69259175397b78fab5ac3621e95e40c903dda1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 10 Dec 2025 14:58:46 +0000 Subject: [PATCH 4/4] Address PR review feedback: update actions versions, add PR trigger, and emphasize editorconfig Co-authored-by: stephenfuqua <9324390+stephenfuqua@users.noreply.github.com> --- .github/workflows/copilot-setup-steps.yml | 7 +++++-- AGENTS.md | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml index 5aff8fd..73d9654 100644 --- a/.github/workflows/copilot-setup-steps.yml +++ b/.github/workflows/copilot-setup-steps.yml @@ -5,6 +5,9 @@ name: Copilot Setup Steps on: + pull_request: + paths: + - '.github/workflows/copilot-setup-steps.yml' workflow_dispatch: jobs: @@ -19,9 +22,9 @@ jobs: working-directory: ./src steps: - - uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # v2.4.0 + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - name: Setup .NET - uses: actions/setup-dotnet@499789684c9a0d41c9b3f0d66a785ba17b1d51ab # v1.9.0 + uses: actions/setup-dotnet@2016bd2012dba4e32de620c46fe006a3ac9f0602 # v5.0.1 with: dotnet-version: 6.0.x - name: Restore dependencies diff --git a/AGENTS.md b/AGENTS.md index d68ef50..1b2b8ce 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -26,6 +26,7 @@ This is a C# .NET project for the Ed-Fi Sample Data Generator (SDG), which produ ### General Guidelines - Follow the existing code style and conventions in the repository +- Adhere to the `.editorconfig` file settings for formatting and style - Use meaningful variable and method names - Keep methods small and focused on a single responsibility - Write XML documentation comments for public APIs