Skip to content

Run all agents: apply improvements across API, tests, docs, requirements, and CI consistency#23

Merged
Malcolmnixon merged 5 commits intomainfrom
copilot/run-agents-for-improvements
Mar 2, 2026
Merged

Run all agents: apply improvements across API, tests, docs, requirements, and CI consistency#23
Malcolmnixon merged 5 commits intomainfrom
copilot/run-agents-for-improvements

Conversation

Copy link
Contributor

Copilot AI commented Mar 2, 2026

Ran all repository agents (requirements, software-developer, test-developer, technical-writer, code-quality, repo-consistency) to identify and apply improvements.

Description

API (DemoClass.cs)

  • Added public const string DefaultPrefix = "Hello" — eliminates magic string, provides stable API contract
  • Added public string Prefix => _prefix — exposes active prefix for inspection
  • Strengthened argument validation: ThrowIfNullThrowIfNullOrEmpty (rejects empty strings too)
  • Added <exception> XML tags; documented private field; added literate method comments

Tests (DemoClassTests.cs)

  • Assert.Throws<T>Assert.ThrowsExactly<T> — enforces exact exception type (MSTest v4)
  • Added 5 tests: empty-string rejection (constructor + DemoMethod), DefaultPrefix value, Prefix round-trip, default constructor stores DefaultPrefix
  • Removed non-XML-doc section separator comment blocks to match existing code style

Requirements (requirements.yaml)

  • TMPL-REQ-008: Library shall support a customizable greeting prefix
  • TMPL-REQ-009: Library shall reject null and empty arguments with ArgumentException
  • All 9 tests now have requirement traceability

Documentation

  • docs/guide/guide.md: added DefaultPrefix, Prefix, and ArgumentException (empty-string) to API reference
  • README.md: added .NET Standard 2.0 to multi-runtime support list (was in csproj but missing from README)

CI / Consistency fixes

  • build.yaml: actions/upload-artifact remains at v7 (original version; erroneous bump reverted)
  • CONTRIBUTING.md: fixed encoding description (UTF-8, not UTF-8 with BOM); fixed Assert.HasCount argument order
  • AGENTS.md: same encoding description fix

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Code quality improvement

Related Issues

Pre-Submission Checklist

Build and Test

  • Code builds successfully: dotnet build --configuration Release
  • All unit tests pass: dotnet test --configuration Release
  • Code produces zero warnings

Code Quality

  • Code formatting is correct: dotnet format --verify-no-changes
  • New code has appropriate XML documentation comments
  • Static analyzer warnings have been addressed

Quality Checks

  • Spell checker passes: cspell "**/*.{md,cs}"
  • Markdown linter passes: markdownlint "**/*.md"
  • YAML linter passes: yamllint .

Testing

  • Added unit tests for new functionality
  • Updated existing tests if behavior changed
  • All tests follow the AAA (Arrange, Act, Assert) pattern
  • Test coverage is maintained or improved

Documentation

  • Updated README.md (if applicable)
  • Updated ARCHITECTURE.md (if applicable)
  • Added code examples for new features (if applicable)
  • Updated requirements.yaml (if applicable)

Additional Notes

ArgumentException.ThrowIfNullOrEmpty is polyfilled for netstandard2.0 via the existing Polyfill package (<PolyArgumentExceptions>true</PolyArgumentExceptions>). No new dependencies introduced.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Code improvements:
- Add DefaultPrefix constant and Prefix property to DemoClass
- Strengthen argument validation to reject empty strings (ThrowIfNullOrEmpty)
- Add XML documentation for all new members with literate comments
- Add tests for DefaultPrefix, Prefix property, and empty-string validation
- Update requirements.yaml with TMPL-REQ-008 and TMPL-REQ-009
- Update user guide with DefaultPrefix, Prefix, and exception documentation
- Fix README to mention .NET Standard 2.0 target framework

Consistency fixes (repo-consistency-agent review):
- Upgrade actions/upload-artifact from v7 to v8 (matches download-artifact@v8)
- Fix CONTRIBUTING.md: encoding is UTF-8 (not UTF-8 with BOM)
- Fix CONTRIBUTING.md: Assert.HasCount(expectedCount, collection) argument order
- Fix AGENTS.md: encoding is UTF-8 (not UTF-8+BOM)
Copilot AI changed the title [WIP] Run agents to check for improvements Run all agents: apply improvements across API, tests, docs, requirements, and CI consistency Mar 2, 2026
[TestClass]
public class DemoClassTests
{
// -------------------------------------------------------------------------
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are these non-xml-doc comment-blocks about?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those were non-standard section separator banners added by the test-developer agent — not consistent with the repo's style. Removed in 628e657.

Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
@Malcolmnixon
Copy link
Contributor

@copilot Lint issues encountered - please fix.

Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 2, 2026

@copilot Lint issues encountered - please fix.

The CI failure was actions/upload-artifact@v8 — v8 doesn't exist. The repo-consistency agent had incorrectly bumped it from v7 to v8 trying to match download-artifact@v8. Fixed in dc34fef by changing all upload-artifact references to v4 (current stable).

@Malcolmnixon
Copy link
Contributor

@copilot Woah, why is upload-artifact being dropped to v4 - it should stay at v7

Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 2, 2026

@copilot Woah, why is upload-artifact being dropped to v4 - it should stay at v7

Reverted to v7 in 95c946e — that was a mistake on my part. The v4 change was incorrect.

@Malcolmnixon Malcolmnixon marked this pull request as ready for review March 2, 2026 21:49
@Malcolmnixon Malcolmnixon merged commit 5b592c2 into main Mar 2, 2026
5 checks passed
@Malcolmnixon Malcolmnixon deleted the copilot/run-agents-for-improvements branch March 2, 2026 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants