Repository navigation
v1.6.0
Complexity Analyzers v1.6.0 — Explainable Analysis, Regression Detection & MCP Integration
Version 1.6.0 introduces Complexity Analysis vNext, a significant expansion of Complexity Analyzers beyond traditional Roslyn diagnostics.
This release focuses on making algorithmic complexity analysis more reliable, explainable, reproducible, and suitable for integration into development workflows, CI pipelines, and AI-assisted engineering tools.
The existing Roslyn analyzer remains backward compatible, while new capabilities are delivered through a separate .NET CLI and a local MCP server.
Highlights
1. More Reliable Complexity Analysis
Improved static analysis provides more conservative and explicit complexity estimates.
Expanded analysis of loops, recursion, collections, and LINQ operations.
Improved handling of loop-bound mutations and unstable conditions.
Recognition of supported deferred LINQ execution and collection operation costs.
Explicit complexity guarantees and assumptions, including worst-case, expected, amortized, and conditional estimates.
Conservative
Unknownclassification when available evidence is insufficient.
Why it matters: Complexity estimates should reflect what static analysis can actually establish, rather than presenting uncertain conclusions as facts.
2. Explainable Complexity Results
Complexity analysis now supports structured evidence explaining how an estimate was derived.
Deterministic evidence traces with source locations.
Explicit assumptions and uncertainty reasons.
Bounded evidence collection to preserve analysis performance.
Optional evidence exposure through CLI JSON reports.
Why it matters: Developers can investigate why a method received a particular complexity classification instead of relying on an opaque diagnostic.
3. Complexity Regression Detection
This release introduces deterministic snapshots and comparison capabilities for tracking complexity changes over time.
Versioned JSON snapshots with stable member identities.
Baseline-versus-current complexity comparisons.
Classification of regressions, improvements, equivalent results, and inconclusive comparisons.
Explicit handling of added, removed, and ambiguously matched members.
Optional quality gates using
--fail-on-regression.
Why it matters: Teams can identify proven asymptotic complexity regressions during code review and CI without treating uncertain comparisons as failures.
4. New .NET CLI and SARIF Reporting
ComplexityAnalysis.Tool is available as a separately packaged local .NET Tool.
Capabilities include:
Project and solution analysis (
.csproj,.sln,.slnx).Console and deterministic JSON reporting.
Evidence-rich complexity snapshots.
Baseline comparison.
SARIF 2.1.0 export with stable fingerprints.
Optional regression quality gates.
Why it matters: Complexity analysis can extend beyond IDE diagnostics into automated validation, reporting, and engineering quality workflows.
5. Local MCP Server for AI-Assisted Engineering
A new ComplexityAnalysis.Mcp project exposes complexity analysis through the Model Context Protocol (MCP).
The local, read-only server provides three tools:
MCP Tool | Capability -- | -- analyze_project | Analyze a project or solution and return complexity results with evidence query_member_evidence | Retrieve evidence for a specific analyzed member compare_snapshots | Compare complexity snapshots and identify changesThe server uses standard input/output (stdio) and includes security controls for allowed filesystem roots, symbolic links, workload limits, timeouts, and cancellation.
Why it matters: AI-assisted development tools can consume deterministic complexity evidence instead of relying exclusively on language-model reasoning about algorithmic behavior.
The MCP server performs local analysis only. It does not modify source files, execute arbitrary commands, or require external services.
6. CI Integration and Software Supply Chain Security
This release also strengthens engineering quality and release integrity.
Opt-in GitHub Actions complexity regression checks.
Reviewed sample baseline and retained JSON comparison artifacts.
CodeQL security scanning and dependency review.
Release provenance and SPDX Software Bill of Materials (SBOM).
Updated dependencies, SDK tooling, and GitHub Actions.
Linux CI runner migration to Ubuntu 26.04.
Refactoring to reduce internal cognitive complexity and improve maintainability.
These changes make complexity analysis easier to adopt in existing CI processes while reinforcing software supply chain transparency.
Compatibility
The release preserves compatibility with existing analyzer consumers.
Existing diagnostic IDs, default severities, and configuration behavior remain unchanged.
The Roslyn analyzer continues targeting
netstandard2.0.CLI and MCP dependencies remain isolated from the analyzer package.
Existing projects can continue using the analyzer without adopting the new tooling.
The additional capabilities are optional and can be introduced incrementally.
Validation
The Complexity Analysis vNext implementation was validated through:
1,239 passing automated tests in the integration PR.
Analyzer and CLI package contract tests.
Consumer validation on .NET 8, .NET 9, and .NET 10.
Structural and performance contract tests.
Deterministic snapshot and regression comparison tests.
MCP server security and functionality tests.
Successful CI, SonarQube, release, and CodeQL workflows.
Known Limitations
Complexity Analyzers intentionally favors conservative conclusions.
Analysis may return
Unknownwhen sufficient semantic evidence is unavailable.Snapshot matching does not infer renames when identity correspondence is ambiguous.
MCP integration is local and read-only, not a hosted remote service.
Regression checks are opt-in; teams must establish representative baselines for their projects.
These boundaries are intentional and help maintain trustworthy results.
Full Changelog
Major implementation: Complexity Analysis vNext — PR #114
All changes: Compare v1.5.0...v1.6.0
Complexity Analyzers v1.6.0 moves algorithmic complexity analysis beyond diagnostics toward explainable, reproducible, and automation-ready engineering workflows.
# Complexity Analyzers v1.6.0 — Explainable Analysis, Regression Detection & MCP IntegrationVersion 1.6.0 introduces Complexity Analysis vNext, a significant expansion of Complexity Analyzers beyond traditional Roslyn diagnostics.
This release focuses on making algorithmic complexity analysis more reliable, explainable, reproducible, and suitable for integration into development workflows, CI pipelines, and AI-assisted engineering tools.
The existing Roslyn analyzer remains backward compatible, while new capabilities are delivered through a separate .NET CLI and a local MCP server.
Highlights
1. More Reliable Complexity Analysis
Improved static analysis provides more conservative and explicit complexity estimates.
- Expanded analysis of loops, recursion, collections, and LINQ operations.
- Improved handling of loop-bound mutations and unstable conditions.
- Recognition of supported deferred LINQ execution and collection operation costs.
- Explicit complexity guarantees and assumptions, including worst-case, expected, amortized, and conditional estimates.
- Conservative
Unknownclassification when available evidence is insufficient.
Why it matters: Complexity estimates should reflect what static analysis can actually establish, rather than presenting uncertain conclusions as facts.
2. Explainable Complexity Results
Complexity analysis now supports structured evidence explaining how an estimate was derived.
- Deterministic evidence traces with source locations.
- Explicit assumptions and uncertainty reasons.
- Bounded evidence collection to preserve analysis performance.
- Optional evidence exposure through CLI JSON reports.
Why it matters: Developers can investigate why a method received a particular complexity classification instead of relying on an opaque diagnostic.
3. Complexity Regression Detection
This release introduces deterministic snapshots and comparison capabilities for tracking complexity changes over time.
- Versioned JSON snapshots with stable member identities.
- Baseline-versus-current complexity comparisons.
- Classification of regressions, improvements, equivalent results, and inconclusive comparisons.
- Explicit handling of added, removed, and ambiguously matched members.
- Optional quality gates using
--fail-on-regression.
Why it matters: Teams can identify proven asymptotic complexity regressions during code review and CI without treating uncertain comparisons as failures.
4. New .NET CLI and SARIF Reporting
ComplexityAnalysis.Tool is available as a separately packaged local .NET Tool.
Capabilities include:
- Project and solution analysis (
.csproj,.sln,.slnx). - Console and deterministic JSON reporting.
- Evidence-rich complexity snapshots.
- Baseline comparison.
- SARIF 2.1.0 export with stable fingerprints.
- Optional regression quality gates.
Why it matters: Complexity analysis can extend beyond IDE diagnostics into automated validation, reporting, and engineering quality workflows.
5. Local MCP Server for AI-Assisted Engineering
A new ComplexityAnalysis.Mcp project exposes complexity analysis through the Model Context Protocol (MCP).
The local, read-only server provides three tools:
| MCP Tool | Capability |
|---|---|
analyze_project |
Analyze a project or solution and return complexity results with evidence |
query_member_evidence |
Retrieve evidence for a specific analyzed member |
compare_snapshots |
Compare complexity snapshots and identify changes |
The server uses standard input/output (stdio) and includes security controls for allowed filesystem roots, symbolic links, workload limits, timeouts, and cancellation.
Why it matters: AI-assisted development tools can consume deterministic complexity evidence instead of relying exclusively on language-model reasoning about algorithmic behavior.
The MCP server performs local analysis only. It does not modify source files, execute arbitrary commands, or require external services.
6. CI Integration and Software Supply Chain Security
This release also strengthens engineering quality and release integrity.
- Opt-in GitHub Actions complexity regression checks.
- Reviewed sample baseline and retained JSON comparison artifacts.
- CodeQL security scanning and dependency review.
- Release provenance and SPDX Software Bill of Materials (SBOM).
- Updated dependencies, SDK tooling, and GitHub Actions.
- Linux CI runner migration to Ubuntu 26.04.
- Refactoring to reduce internal cognitive complexity and improve maintainability.
These changes make complexity analysis easier to adopt in existing CI processes while reinforcing software supply chain transparency.
Compatibility
The release preserves compatibility with existing analyzer consumers.
- Existing diagnostic IDs, default severities, and configuration behavior remain unchanged.
- The Roslyn analyzer continues targeting
netstandard2.0. - CLI and MCP dependencies remain isolated from the analyzer package.
- Existing projects can continue using the analyzer without adopting the new tooling.
The additional capabilities are optional and can be introduced incrementally.
Validation
The Complexity Analysis vNext implementation was validated through:
- 1,239 passing automated tests in the integration PR.
- Analyzer and CLI package contract tests.
- Consumer validation on .NET 8, .NET 9, and .NET 10.
- Structural and performance contract tests.
- Deterministic snapshot and regression comparison tests.
- MCP server security and functionality tests.
- Successful CI, SonarQube, release, and CodeQL workflows.
Known Limitations
Complexity Analyzers intentionally favors conservative conclusions.
- Analysis may return
Unknownwhen sufficient semantic evidence is unavailable. - Snapshot matching does not infer renames when identity correspondence is ambiguous.
- MCP integration is local and read-only, not a hosted remote service.
- Regression checks are opt-in; teams must establish representative baselines for their projects.
These boundaries are intentional and help maintain trustworthy results.
Full Changelog
Major implementation: [Complexity Analysis vNext — PR #114](#114)
All changes: [Compare v1.5.0...v1.6.0](v1.5.0...v1.6.0)
Complexity Analyzers v1.6.0 moves algorithmic complexity analysis beyond diagnostics toward explainable, reproducible, and automation-ready engineering workflows.