Add configuration for classdiagram extraction#26
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds configurable inclusion of class members (properties/fields and methods) to the class diagram pipeline (library → CLI → MCP), with accompanying specs and expanded test coverage, plus packaging/versioning workflow adjustments.
Changes:
- Add
includeProperties/includeFunctionsflags through analysis options and type extraction, and expose them via CLI + MCP. - Add unit/integration/contract tests to validate filtering behavior and backward-compatible defaults.
- Improve packaging metadata (icons) and automate version propagation in the publish workflow.
Reviewed changes
Copilot reviewed 28 out of 28 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/ProjGraph.Tests.Unit.ClassDiagram/TypeAnalyzerTests.cs | Adds unit tests for member-visibility filtering behavior. |
| tests/ProjGraph.Tests.Unit.ClassDiagram/AnalyzeFileUseCaseTests.cs | Updates expectations/calls for new analysis options. |
| tests/ProjGraph.Tests.Integration.Mcp/McpClassDiagramTests.cs | Adds MCP integration tests for new parameters and default behavior. |
| tests/ProjGraph.Tests.Integration.Cli/ClassDiagramCommandTests.cs | Adds CLI integration tests for new flags. |
| tests/ProjGraph.Tests.Contract/McpClassDiagramTests.cs | Extends contract test to require new MCP parameters/defaults. |
| src/ProjGraph.Mcp/ProjGraph.Mcp.csproj | Packs icon into MCP NuGet/tool package. |
| src/ProjGraph.Mcp/Program.cs | Extends GetClassDiagram tool signature and forwards flags to analysis service. |
| src/ProjGraph.Mcp/.mcp/server.json | Adds icon metadata for MCP server manifest. |
| src/ProjGraph.Lib.ClassDiagram/Infrastructure/TypeProcessor.cs | Passes member-visibility flags into type analysis. |
| src/ProjGraph.Lib.ClassDiagram/Infrastructure/TypeAnalyzer.cs | Implements member filtering based on new flags (with enum handling). |
| src/ProjGraph.Lib.ClassDiagram/Application/UseCases/AnalyzeFileUseCase.cs | Threads new flags into AnalysisOptions and changes inheritance default. |
| src/ProjGraph.Lib.ClassDiagram/Application/IClassAnalysisService.cs | Extends analysis service contract with new flags. |
| src/ProjGraph.Lib.ClassDiagram/Application/ClassAnalysisService.cs | Forwards new flags to the use case. |
| src/ProjGraph.Lib.ClassDiagram/Application/AnalysisOptions.cs | Adds IncludeProperties / IncludeFunctions to options model. |
| src/ProjGraph.Cli/ProjGraph.Cli.csproj | Packs icon into CLI NuGet/tool package; removes redundant global properties. |
| src/ProjGraph.Cli/Commands/ClassDiagramCommand.cs | Adds CLI options and forwards flags to analysis service. |
| specs/004-config-class-members/tasks.md | Adds implementation task checklist for feature 004. |
| specs/004-config-class-members/spec.md | Adds feature specification for configurable member visibility. |
| specs/004-config-class-members/research.md | Adds research notes and design decisions. |
| specs/004-config-class-members/quickstart.md | Adds quickstart usage examples (MCP). |
| specs/004-config-class-members/plan.md | Adds implementation plan and project structure references. |
| specs/004-config-class-members/data-model.md | Documents data model changes for options/member categories. |
| specs/004-config-class-members/contracts/mcp-tool.json | Adds MCP schema/contract sample for new parameters. |
| specs/004-config-class-members/checklists/requirements.md | Adds spec quality/requirements checklist. |
| README.md | Adds links to architecture/contributing/security docs. |
| Directory.Build.props | Removes global icon packaging; retains global build settings. |
| .github/workflows/publish.yml | Automates version injection into props + server.json before build/pack. |
| .github/agents/copilot-instructions.md | Updates agent guidance with feature 004 entry. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/ProjGraph.Lib.ClassDiagram/Application/UseCases/AnalyzeFileUseCase.cs
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces the feature "Configure Class Member Visibility" (feature 004), enabling users to control whether class properties and/or functions are displayed in generated class diagrams. The implementation is fully specified and planned, with supporting documentation, data model updates, and contract/schema changes. Additionally, the build and packaging workflow is improved for automated versioning, and some minor project file cleanups are included.
The most important changes are:
Feature: Configurable Class Member Visibility
specs/004-config-class-members/). This feature allows users to toggle the visibility of properties and/or functions in class diagrams, with defaults set to include both. The feature ensures that hiding members does not affect relationship discovery. [1] [2] [3] [4] [5] [6]GetClassDiagram) to acceptincludePropertiesandincludeFunctionsboolean parameters, defaulting totrue.Documentation and Guidelines
README.md..github/agents/copilot-instructions.mdto reflect the addition of feature 004. [1] [2]Build & Packaging Automation
publish.yml) to automatically extract the version from the tag and update bothDirectory.Build.propsandserver.jsonwith the correct version before building and packaging. This removes the need to pass the version as a parameter during build/pack steps. [1] [2]Project File Cleanups
<PackageIcon>property and the relatedicon.pngpackaging logic fromDirectory.Build.props. [1] [2]