Skip to content

feat: implement C# AI-driven development pipeline template with changesets workflow#2

Merged
konard merged 5 commits intomainfrom
issue-1-bfccbf28dde2
Dec 27, 2025
Merged

feat: implement C# AI-driven development pipeline template with changesets workflow#2
konard merged 5 commits intomainfrom
issue-1-bfccbf28dde2

Conversation

@konard
Copy link
Member

@konard konard commented Dec 27, 2025

Summary

This PR implements a complete C# AI-driven development pipeline template, following the same patterns as the existing JS, Python, and Rust templates.

Project Structure

  • .NET 8.0 solution with library (src/MyPackage), tests (tests/MyPackage.Tests), and example projects (examples/)
  • Strict code analysis: Warnings as errors, all .NET analyzers enabled
  • EditorConfig: Consistent code style across all editors and IDEs
  • Directory.Build.props: Shared build configuration

Changesets Workflow (like JavaScript template)

  • .changeset/ directory with config.json and README.md
  • validate-changeset.mjs: Validates exactly one changeset per PR
  • merge-changesets.mjs: Merges multiple changesets using highest bump type
  • version-and-commit.mjs: Supports both changeset and instant release modes

CI/CD Pipeline (GitHub Actions)

  • Changeset validation job: Ensures PRs include a changeset file
  • Lint job: Format check, build with warnings as errors, file size check
  • Test job: Cross-platform testing (Ubuntu, macOS, Windows)
  • Build job: Release build and NuGet package creation
  • Release job: Automatic versioning and publishing when changesets are merged
  • Manual release: Supports instant and changeset-pr modes via workflow_dispatch

Helper Scripts (.mjs + bun)

  • check-file-size.mjs: Enforce 1000 line limit per C# file
  • bump-version.mjs: Version bumping utility
  • validate-changeset.mjs: PR changeset validation
  • merge-changesets.mjs: Merge multiple changesets
  • version-and-commit.mjs: CI/CD version management (changeset & instant modes)
  • create-github-release.mjs: GitHub release creation

Documentation

  • README.md: Comprehensive usage guide with examples
  • CONTRIBUTING.md: Development guidelines and workflow
  • .changeset/README.md: Changeset workflow instructions

Test plan

  • dotnet build --configuration Release succeeds
  • dotnet test passes all 21 tests
  • dotnet format --verify-no-changes passes
  • bun run scripts/check-file-size.mjs passes
  • CI workflow runs and passes on push

Closes #1

🤖 Generated with Claude Code

Adding CLAUDE.md with task information for AI processing.
This file will be removed when the task is complete.

Issue: #1
@konard konard self-assigned this Dec 27, 2025
This commit adds a complete C# project template with:

Project Structure:
- .NET 8.0 solution with library, tests, and example projects
- Strict code analysis (warnings as errors, all analyzers enabled)
- EditorConfig for consistent code style

CI/CD Pipeline:
- GitHub Actions workflow with lint, test, and build jobs
- Cross-platform testing (Ubuntu, macOS, Windows)
- Automatic version bumping and changelog collection
- Release automation with NuGet publishing support

Helper Scripts (.mjs/bun):
- check-file-size.mjs: Enforce 1000 line limit per file
- bump-version.mjs: Version bumping utility
- version-and-commit.mjs: CI/CD version management
- collect-changelog.mjs: Fragment-based changelog collection
- create-github-release.mjs: GitHub release creation

Documentation:
- Comprehensive README with usage examples
- CONTRIBUTING.md with development guidelines
- Fragment-based changelog system (like Changesets)

Closes #1

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@konard konard changed the title [WIP] Use best practices from JS, Python and Rust versions of templates to create similar template for C# development feat: implement C# AI-driven development pipeline template Dec 27, 2025
CA1515 requires types to be internal, but xUnit test classes must be
public for test discovery to work properly.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@konard konard marked this pull request as ready for review December 27, 2025 21:30
@konard
Copy link
Member Author

konard commented Dec 27, 2025

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Public pricing estimate: $12.477348 USD
  • Calculated by Anthropic: $7.388301 USD
  • Difference: $-5.089047 (-40.79%)
    📎 Log file uploaded as GitHub Gist (1033KB)
    🔗 View complete solution draft log

Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard
Copy link
Member Author

konard commented Dec 27, 2025

Can we also support .chagesets folder workflow similar to how it is done in JavaScript? That is critical feature that allows us to reduce number of merge conflicts, and make sure version bumps are done safely after pull request's merge to the default branch.

Do we have something similar to C# as we have in JavaScript and Python?

@konard konard marked this pull request as draft December 27, 2025 21:46
@konard
Copy link
Member Author

konard commented Dec 27, 2025

🤖 AI Work Session Started

Starting automated work session at 2025-12-27T21:46:56.829Z

The PR has been converted to draft mode while work is in progress.

This comment marks the beginning of an AI work session. Please wait working session to finish, and provide your feedback.

- Add `.changeset/` directory with config.json and README.md
- Add `validate-changeset.mjs` script for PR validation (validates exactly one changeset per PR)
- Add `merge-changesets.mjs` script for merging multiple changesets (uses highest bump type)
- Update `version-and-commit.mjs` to support both changeset and instant modes
- Update CI/CD workflow with changeset validation and automatic releases
- Remove old `changelog.d/` fragment-based system
- Update documentation in README.md and CONTRIBUTING.md

This brings the C# template in line with the JavaScript template's changesets workflow,
which reduces merge conflicts and ensures version bumps happen safely after PR merge.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@konard konard changed the title feat: implement C# AI-driven development pipeline template feat: implement C# AI-driven development pipeline template with changesets workflow Dec 27, 2025
@konard konard marked this pull request as ready for review December 27, 2025 22:01
@konard
Copy link
Member Author

konard commented Dec 27, 2025

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Public pricing estimate: $5.004452 USD
  • Calculated by Anthropic: $3.697641 USD
  • Difference: $-1.306811 (-26.11%)
    📎 Log file uploaded as GitHub Gist (1160KB)
    🔗 View complete solution draft log

Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard konard merged commit ec35117 into main Dec 27, 2025
9 checks passed
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.

Use best practices from JS, Python and Rust versions of templates to create similar template for C# development

1 participant