| 🗂️ Field | Value |
|---|---|
| Date | 2025-10-26 |
| Modified By | @copilot |
| Last Modified | 2025-10-26 |
| Title | Collaborators Contributing Guide |
| Author | CodeOwners |
| Document ID | SEC-CONTRIB-001 |
| Document Authority | @KyleC69 |
| Version | 2025-10-26.v4 |
Thank you for your interest in contributing to the AI-Assisted IT Manager project! We welcome contributions from developers of all skill levels.
- Code of Conduct
- Getting Started
- How to Contribute
- Development Workflow
- Coding Standards
- Pull Request Process
- Testing
- Documentation
- Community
We are committed to providing a welcoming and inclusive environment for all contributors. We expect everyone to:
- Be respectful and constructive
- Focus on what is best for the project and community
- Show empathy towards others
- Accept constructive criticism gracefully
- Help newcomers and be patient with questions
- Harassment or discrimination of any kind
- Trolling, insulting comments, or personal attacks
- Publishing others' private information
- Any conduct that would be inappropriate in a professional setting
Before contributing, ensure you have:
- Windows 10/11 or Windows Server 2019+
- Visual Studio 2022 or later
- .NET 9 SDK
- Git for version control
- PowerShell 7+ (for build scripts)
-
Fork the repository
# Click "Fork" on GitHub, then clone your fork git clone https://github.com/YOUR_USERNAME/ai-assisted-it-manager.git cd ai-assisted-it-manager
-
Add upstream remote
git remote add upstream https://github.com/OldSkoolzRoolz/ai-assisted-it-manager.git
-
Install dependencies
dotnet restore ITCompanion.sln
-
Build the solution
dotnet build ITCompanion.sln -c Debug -warnaserror /p:TreatWarningsAsErrors=true /p:AnalysisLevel=latest /p:EnforceCodeStyleInBuild=true
-
Run tests
dotnet test ITCompanion.sln --no-build --configuration Debug
- IDE: Visual Studio 2022+ recommended
- Extensions:
- ReSharper (optional, for enhanced code analysis)
- GitHub Copilot (optional, for AI-assisted coding)
- Configuration: Follow
.editorconfigfor code style
We welcome various types of contributions:
- Check existing issues first to avoid duplicates
- Include detailed steps to reproduce
- Provide error messages and logs
- Specify your environment (OS, .NET version, etc.)
- Clearly describe the feature and its benefits
- Explain the use case and rationale
- Consider implementation complexity
- Be open to discussion and alternatives
- Fix typos, clarify explanations
- Add examples and tutorials
- Update outdated information
- Improve onboarding guides
- Bug fixes
- New features
- Performance improvements
- Code refactoring
- Test coverage improvements
Before starting work on a significant change:
- Search for existing issues
- Create a new issue describing the change
- Apply appropriate labels (see Label Guide)
- Discuss the approach with maintainers
- Wait for approval before starting work
For small fixes (typos, minor bugs), you can skip this step.
Note: If you're unable to find labels when creating an issue, they may not be created in the repository yet. See the Labels Guide for instructions on creating them or contact maintainers.
Follow our branch naming conventions:
# For new features
git checkout -b feature/descriptive-name
# For bug fixes
git checkout -b bugfix/issue-description
# For documentation
git checkout -b docs/what-youre-updating
# For refactoring
git checkout -b refactor/what-youre-refactoring- Write clean, maintainable code
- Follow existing code style and patterns
- Add tests for new functionality
- Update documentation as needed
- Keep commits focused and atomic
# Build with warnings as errors
dotnet build ITCompanion.sln -c Debug -warnaserror /p:TreatWarningsAsErrors=true /p:AnalysisLevel=latest /p:EnforceCodeStyleInBuild=true
# Run all tests
dotnet test ITCompanion.sln --no-build --configuration Debug
# Run specific test project
dotnet test tests/YourTestProject/YourTestProject.csprojWrite clear, descriptive commit messages:
# Good commit messages
git commit -m "Fix crash when loading invalid ADMX files"
git commit -m "Add validation for policy settings dialog"
git commit -m "Update documentation for deployment process"
# Bad commit messages
git commit -m "fix bug"
git commit -m "updates"
git commit -m "WIP"# Fetch latest changes
git fetch upstream
# Rebase on master
git rebase upstream/master
# Or merge if you prefer
git merge upstream/mastergit push origin your-branch-nameImportant: All pull requests to master require approval from a code owner (@KyleC69 or @OldSkoolzRoolz). The master branch is treated as release-ready at all times.
- Go to your fork on GitHub
- Click "New Pull Request"
- Select your branch
- Fill out the PR template completely
- Link related issues
- Request review from code owners (@KyleC69 or @OldSkoolzRoolz)
Follow .NET coding conventions and project-specific guidelines:
- PascalCase: Classes, methods, properties, public fields
- camelCase: Local variables, parameters, private fields
- _camelCase: Private fields (with underscore prefix)
- SCREAMING_SNAKE_CASE: Constants
// 1. Using directives (sorted)
using System;
using System.Collections.Generic;
using Microsoft.Extensions.Logging;
// 2. Namespace
namespace KC.ITCompanion.ModuleName;
// 3. Class/interface with XML documentation
/// <summary>
/// Provides functionality for managing policies.
/// </summary>
public class PolicyManager
{
// 4. Fields (private first)
private readonly ILogger<PolicyManager> _logger;
// 5. Constructors
public PolicyManager(ILogger<PolicyManager> logger)
{
_logger = logger ?? throw new ArgumentNullException(nameof(logger));
}
// 6. Properties
public string CurrentPolicy { get; set; }
// 7. Methods (public first, then private)
public void LoadPolicy() { }
private void ValidatePolicy() { }
}All public APIs must have XML documentation:
/// <summary>
/// Loads a policy from the specified file path.
/// </summary>
/// <param name="filePath">The path to the policy file.</param>
/// <param name="cancellationToken">Cancellation token.</param>
/// <returns>A task representing the asynchronous operation.</returns>
/// <exception cref="ArgumentNullException">Thrown when filePath is null.</exception>
/// <exception cref="FileNotFoundException">Thrown when file does not exist.</exception>
public async Task LoadPolicyAsync(string filePath, CancellationToken cancellationToken = default)
{
// Implementation
}- Use
async/awaitfor I/O operations - Methods returning Task should end with
Asyncsuffix - Always pass
CancellationTokenin public async APIs - Use
ConfigureAwait(false)in library code (not UI code)
public async Task<Policy> LoadPolicyAsync(string path, CancellationToken cancellationToken)
{
var content = await File.ReadAllTextAsync(path, cancellationToken).ConfigureAwait(false);
return ParsePolicy(content);
}- Use exceptions for exceptional cases
- Validate arguments and throw appropriate exceptions
- Log errors appropriately
- Don't swallow exceptions without good reason
public void ProcessPolicy(Policy policy)
{
ArgumentNullException.ThrowIfNull(policy);
try
{
_logger.LogInformation("Processing policy: {PolicyName}", policy.Name);
// Process policy
}
catch (Exception ex)
{
_logger.LogError(ex, "Failed to process policy: {PolicyName}", policy.Name);
throw;
}
}All code must:
- Build without warnings (
-warnaserror) - Pass all analyzer checks
- Follow
.editorconfigrules - Have zero code style violations
# Verify your code meets requirements
dotnet build ITCompanion.sln -c Debug -warnaserror /p:TreatWarningsAsErrors=true /p:AnalysisLevel=latest /p:EnforceCodeStyleInBuild=true
dotnet format analyzers --verify-no-changes
dotnet format style --verify-no-changesBefore submitting, ensure:
- Code builds without warnings
- All tests pass
- New tests added for new functionality
- Documentation updated if needed
- XML docs added for public APIs
- CHANGELOG updated (for significant changes)
- Branch is up-to-date with master
- Commit messages are clear
- PR description is complete
Your PR should include:
## Description
Brief description of the changes
## Type of Change
- [ ] Bug fix (non-breaking change)
- [ ] New feature (non-breaking change)
- [ ] Breaking change
- [ ] Documentation update
## Related Issues
Fixes #123, Relates to #456
## Changes Made
- Detailed list of changes
- Include technical details
- Explain design decisions
## Testing
- How were changes tested?
- What test cases were added?
- Any manual testing performed?
## Screenshots (if applicable)
Include screenshots for UI changes
## Checklist
- [ ] Code follows project standards
- [ ] Tests pass locally
- [ ] Documentation updated
- [ ] No breaking changes (or documented)- Automated Checks: CI runs automatically
- Code Owner Review: Required approval from code owners
- Feedback: Address reviewer comments
- Approval: Get required approvals
- Merge: Maintainers will merge when ready
- Delete your feature branch
- Pull latest changes from master
- Close related issues (if not auto-closed)
- Celebrate! 🎉
tests/
├── ModuleName.Tests/
│ ├── UnitTests/
│ │ ├── ServiceTests.cs
│ │ └── HelperTests.cs
│ └── IntegrationTests/
│ └── EndToEndTests.cs
Follow AAA pattern (Arrange, Act, Assert):
[Fact]
public void LoadPolicy_WithValidPath_ReturnsPolicy()
{
// Arrange
var manager = new PolicyManager();
var path = "test-policy.xml";
// Act
var policy = manager.LoadPolicy(path);
// Assert
Assert.NotNull(policy);
Assert.Equal("TestPolicy", policy.Name);
}// Pattern: MethodName_Scenario_ExpectedResult
[Fact]
public void Add_TwoNumbers_ReturnsSum() { }
[Fact]
public void LoadPolicy_FileNotFound_ThrowsException() { }
[Fact]
public async Task SaveAsync_ValidPolicy_SavesSuccessfully() { }When to update documentation:
- Adding new features or functionality
- Changing existing behavior
- Fixing bugs that affect user-facing behavior
- Updating APIs or configuration
README.md: Project overview, getting starteddocs/: Technical documentationonboarding/: Setup guides, troubleshootingBRANCH_PROTECTION.md: Branch rules and collaborationCONTRIBUTING.md: This file
- Use clear, concise language
- Include code examples
- Add diagrams for complex concepts
- Keep formatting consistent
- Update DOCUMENTATION_VERSION_MANIFEST.md
- GitHub Issues: Bug reports, feature requests
- GitHub Discussions: General questions, ideas
- Pull Requests: Code review, technical discussions
- Read existing documentation
- Search closed issues
- Ask questions in Discussions
- Contact maintainers: @KyleC69, @OldSkoolzRoolz
Contributors who stick with us through Phase 1 may be offered:
- Paid roles in future releases
- Recognition in project documentation
- Contributor badges and credits
Start with:
- Good first issues (labeled
good first issue) - Documentation improvements
- Test coverage improvements
- Bug fixes
Take on:
- New features
- Complex bug fixes
- Architecture improvements
- Code reviews
Responsibilities may include:
- Design decisions
- Roadmap planning
- Mentoring new contributors
- Release management
If you have questions:
- Check documentation (README, docs/, onboarding/)
- Search existing issues and discussions
- Ask in GitHub Discussions
- Contact maintainers directly
Thank you for contributing to AI-Assisted IT Manager!
We appreciate your time and effort in making this project better. Every contribution, no matter how small, helps move the project forward.
Maintained By: @KyleC69, @OldSkoolzRoolz
Last Updated: 2025-12-17