Thank you for your interest in contributing to md2docx! This document provides guidelines for contributing to the project.
- Development Status
- Getting Started
- Development Workflow
- Code Standards
- Testing Requirements
- Submitting Changes
Current Phase: Phase 1 - MVP Implementation (In Progress)
We are currently building the foundational architecture and basic conversion capabilities. See PROGRESS.md for detailed progress.
Priority Areas:
- Core layer implementation (OpenXmlDocumentBuilder)
- Styling layer (YAML configuration, text transformers)
- Test coverage expansion (target: 80%)
- .NET 8.0 SDK
- Docker Desktop (optional)
- Git
- Code editor (Visual Studio Code recommended)
# Clone the repository
git clone https://github.com/forest6511/md2docx.git
cd md2docx
# Install Git hooks (quality gates)
./.claude/hooks/install.sh
# Restore dependencies
cd csharp-version
dotnet restore src/MarkdownToDocx.sln
# Build the solution
dotnet build src/MarkdownToDocx.sln
# Run tests
dotnet test src/MarkdownToDocx.slngit checkout -b feature/your-feature-nameBranch naming convention:
feature/- New featuresfix/- Bug fixesrefactor/- Code refactoringdocs/- Documentation updatestest/- Test additions
- Follow Code Standards
- Write tests for new functionality
- Update documentation as needed
# Run all tests
dotnet test src/MarkdownToDocx.sln
# Check code coverage (target: 80%)
dotnet test src/MarkdownToDocx.sln /p:CollectCoverage=true
# Build documentation (if applicable)
dotnet build -c Release# Stage your changes
git add .
# Commit with conventional commit message
git commit -m "feat: add vertical text provider implementation"Commit message format:
feat:- New featuresfix:- Bug fixesdocs:- Documentation changestest:- Test additionsrefactor:- Code refactoringchore:- Build, CI/CD, dependencies
IMPORTANT: All changes MUST be reviewed by Codex before pushing.
The pre-push Git hook automatically triggers Codex review. If blocked, address the issues before pushing.
# Push your branch
git push origin feature/your-feature-name
# Create pull request on GitHub- Language Version: C# 12 with .NET 8.0
- Nullable Reference Types: Enabled
- File-Scoped Namespaces: Preferred
- Record Types: Use for immutable models
Example:
namespace MarkdownToDocx.Core.Models;
/// <summary>
/// Represents page configuration for a Word document
/// </summary>
public sealed record PageConfiguration
{
public required UInt32Value Width { get; init; }
public required UInt32Value Height { get; init; }
}- Single Responsibility: One class, one purpose
- Open/Closed: Open for extension, closed for modification
- Liskov Substitution: Derived classes substitutable for base
- Interface Segregation: Small, focused interfaces
- Dependency Inversion: Depend on abstractions, not concretions
- Coverage Target: ≥80%
- Framework: xUnit + FluentAssertions
- Naming:
{MethodName}_{Scenario}_Should{ExpectedBehavior}
Example:
[Fact]
public void Parse_WithNullInput_ShouldThrowArgumentNullException()
{
// Arrange
string? markdown = null;
// Act
Action act = () => _parser.Parse(markdown!);
// Assert
act.Should().Throw<ArgumentNullException>()
.WithParameterName("markdown");
}# Run all tests
dotnet test src/MarkdownToDocx.sln
# Run with coverage
dotnet test src/MarkdownToDocx.sln /p:CollectCoverage=true- Code follows style guidelines
- All tests passing
- Test coverage ≥80% for new code
- Documentation updated
- Codex review passed
- No breaking changes
By contributing, you agree that your contributions will be licensed under the MIT License.
Thank you for contributing to md2docx! 🎉