Thank you for your interest in contributing to ProjGraph! This guide will help you get started.
- .NET 10.0 SDK or later
- DocFX (for documentation):
dotnet tool install -g docfx - A code editor (VS Code or Rider recommended)
# Clone the repository
git clone https://github.com/HandyS11/ProjGraph.git
cd ProjGraph
# Restore dependencies
dotnet restore ProjGraph.slnx
# Build
dotnet build ProjGraph.slnx
# Run tests
dotnet test ProjGraph.slnxSee ARCHITECTURE.md for a detailed overview of the solution structure and design decisions.
- Create a branch from
developfor your change. - Make your changes with clear, focused commits.
- Add or update tests — all new features and bug fixes should have test coverage.
- Ensure the build passes — the project uses
TreatWarningsAsErrors=trueandEnforceCodeStyleInBuild=true. - Open a pull request against
develop.
- The project enforces code style at build time via
EnforceCodeStyleInBuild=true. - XML documentation is required on all public APIs (enforced via
TreatWarningsAsErrors). - Follow existing patterns — use-case classes for new features,
IDiagramRenderer<T>for new output formats.
# All tests
dotnet test ProjGraph.slnx
# Specific test project
dotnet test tests/ProjGraph.Tests.Unit.ClassDiagram
# Specific test class
dotnet test tests/ProjGraph.Tests.Unit.ClassDiagram --filter "ClassAnalysisDepthTests"| Project | Purpose |
|---|---|
Tests.Unit.* |
Unit tests per library |
Tests.Integration.Cli |
CLI end-to-end tests |
Tests.Integration.Mcp |
MCP tool integration tests |
Tests.Contract |
MCP contract validation & DI wiring |
Tests.Smoke.Aot |
Native AOT vs JIT parity for the CLI and MCP tools (skipped unless PROJGRAPH_SMOKE_* is set; CI runs it through .github/actions/native-tool-smoke) |
Tests.Shared |
Shared helpers (TestDirectory, TestPathHelper) |
Tests.Smoke.Aot compares Native AOT builds of the CLI and MCP server with the JIT build of the
same commit. It is skipped unless the PROJGRAPH_SMOKE_* variables are set. CI runs
.github/scripts/native-tool-smoke.sh through the .github/actions/native-tool-smoke action: it
packs the native tool packages, installs them with dotnet tool install, and tests the installed
tools. The aot-smoke job does this for linux-x64 on every PR, and pack.yml does it for every
release platform. Native AOT on Linux needs clang (or gcc) and zlib1g-dev.
Before a local native pack or publish, delete src/ProjGraph.Cli/bin/Release/net10.0/<rid> and
src/ProjGraph.Mcp/bin/Release/net10.0/<rid>: a pack reuses that folder's publish/ output and ships
whatever is left there.
To run the same check locally on Linux:
bash .github/scripts/native-tool-smoke.sh linux-x64 0.0.0-local.1For a quicker loop, test published binaries instead (run one publish at a time; each takes several GB of memory):
dotnet build ProjGraph.slnx -c Release
dotnet publish src/ProjGraph.Cli -c Release -r linux-x64 -o artifacts/native/cli
dotnet publish src/ProjGraph.Mcp -c Release -r linux-x64 -o artifacts/native/mcp
PROJGRAPH_SMOKE_CLI_NATIVE=artifacts/native/cli/ProjGraph.Cli \
PROJGRAPH_SMOKE_CLI_REFERENCE=src/ProjGraph.Cli/bin/Release/net10.0/ProjGraph.Cli.dll \
PROJGRAPH_SMOKE_MCP_NATIVE=artifacts/native/mcp/ProjGraph.Mcp \
PROJGRAPH_SMOKE_MCP_REFERENCE=src/ProjGraph.Mcp/bin/Release/net10.0/ProjGraph.Mcp.dll \
dotnet test tests/ProjGraph.Tests.Smoke.Aot -c Release --no-build- Add domain models to
ProjGraph.Coreif needed. - Implement the feature in the appropriate
Lib.*project following the use-case pattern. - Register services in the library's
DependencyInjection.cs. - Expose via CLI command and/or MCP tool.
- Add tests at the unit and integration levels.
Open an issue on GitHub with:
- A clear description of the problem or feature request.
- Steps to reproduce (for bugs).
- Expected vs actual behavior.
The project documentation is built with DocFX. Navigation and API configuration is located in the docfx/ directory.
To build and preview the documentation locally, use the provided scripts:
PowerShell (Windows):
./docfx/doc-serve.ps1Bash (Linux/macOS):
./docfx/doc-serve.shThese scripts will:
- Verify that DocFX is installed.
- Build the DocFX site.
- Serve it at
http://localhost:8080.
- .NET 10.0 SDK
docfxdotnet tool (dotnet tool install -g docfx)
All PRs must pass the documentation build with zero warnings (--warningsAsErrors).