diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index b687954..e320391 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -33,7 +33,7 @@ ] }, "demaconsulting.reqstream": { - "version": "1.10.0", + "version": "1.11.0", "commands": [ "reqstream" ] diff --git a/docs/reqstream/quality.yaml b/docs/reqstream/quality.yaml new file mode 100644 index 0000000..60ad77f --- /dev/null +++ b/docs/reqstream/quality.yaml @@ -0,0 +1,171 @@ +--- +# Repository quality requirements +# +# These requirements express repository/process-level quality outcomes that are +# satisfied through the CI pipeline's use of off-the-shelf compliance and +# documentation tools. They are distinct from the ReviewMark product requirements +# in review-mark.yaml: each requirement here states WHAT quality outcome the +# repository needs (e.g. "changes are peer reviewed"), never HOW that outcome is +# currently achieved. The OTS tool that currently satisfies each outcome is +# recorded only as a `children` link, never in the requirement title or +# justification, so that satisfying the outcome by different or additional means +# in the future would not require rewriting the requirement itself. +sections: + - title: Repository Quality Requirements + requirements: + - id: ReviewMark-Quality-BuildIntegrity + title: >- + Every release shall carry a documented record of the CI build that + produced it, captured automatically from pipeline metadata. + justification: | + Regulated and quality-conscious consumers of ReviewMark require assurance that + each release artifact was produced by a specific, auditable build rather than + an ad-hoc or undocumented process. Capturing build provenance (workflow run + identity, commit, timestamp) automatically as part of the CI pipeline, rather + than relying on manual record-keeping, ensures the record is always present, + accurate, and resistant to after-the-fact tampering. + This requirement is satisfied by its children: it is a non-atomic (grouping) + requirement, and verification evidence is carried by the atomic child requirement's + tests. + tags: [quality] + children: + - BuildMark-Core-GenerateBuildNotes + + - id: ReviewMark-Quality-TraceableVersions + title: >- + Every release shall have version information traceable to its source + commit and build. + justification: | + Consumers and auditors need to know exactly which tool and dependency + versions produced a given release artifact, to reproduce builds, diagnose + defects, and confirm license and security compliance. Capturing version + information automatically as part of the release pipeline prevents version + drift and the manual record-keeping errors that would otherwise undermine + traceability. + This requirement is satisfied by its children: it is a non-atomic (grouping) + requirement, and verification evidence is carried by each atomic child requirement's + tests. + tags: [quality] + children: + - ReviewMark-OTS-VersionMark-Capture + - ReviewMark-OTS-VersionMark-Report + + - id: ReviewMark-Quality-StaticAnalysis + title: >- + Code shall be automatically scanned for defects, vulnerabilities, and + quality regressions before merge. + justification: | + Manual code review alone cannot reliably catch every security vulnerability, + code smell, or quality regression introduced by a change. Automated static + analysis on every pull request, with results captured as auditable reports, + provides continuous, objective quality and security assurance that scales + with the size of the codebase and does not depend solely on reviewer + attentiveness. + This requirement is satisfied by its children: it is a non-atomic (grouping) + requirement, and verification evidence is carried by each atomic child requirement's + tests. + tags: [quality] + children: + - ReviewMark-OTS-SarifMark + - ReviewMark-OTS-SonarMark + + - id: ReviewMark-Quality-PeerReview + title: >- + Every change shall receive documented, enforced peer review evidence + before merge. + justification: | + Peer review is a core defense against defects and unintended behavior + reaching production, but review activity that is not tracked cannot be + audited or enforced. Generating a review plan identifying the reviews + required for a change, and a review report documenting the reviews actually + completed, provides objective, auditable evidence that the review process + was followed, supporting compliance and quality assurance activities. + Because this repository builds ReviewMark itself, an earlier released + version of the tool is used in CI to scan, plan, report, and enforce + review coverage for the repository's own source (a project cannot treat + its own package as OTS). + This requirement is satisfied by its children: it is a non-atomic (grouping) + requirement, and verification evidence is carried by each atomic child requirement's + tests. + tags: [quality] + children: + - ReviewMark-OTS-ReviewMark-Scan + - ReviewMark-OTS-ReviewMark-Enforce + - ReviewMark-OTS-ReviewMark-Plan + - ReviewMark-OTS-ReviewMark-Report + + - id: ReviewMark-Quality-DocumentationGeneration + title: >- + Repository documentation shall be generated in reviewable and + distributable formats and validated before release. + justification: | + Design, verification, review, and user-guide documentation authored in + Markdown must be converted into distributable formats (HTML for review, + PDF for archival and distribution) as part of the release pipeline, and + each generated document must be validated to confirm it exists, is + well-formed, and contains the expected content, so that a broken + conversion step cannot silently ship incomplete or corrupt compliance + documentation. + This requirement is satisfied by its children: it is a non-atomic (grouping) + requirement, and verification evidence is carried by each atomic child requirement's + tests. + tags: [quality] + children: + - ReviewMark-Pandoc-ConvertMarkdown + - ReviewMark-OTS-WeasyPrint + - ReviewMark-OTS-FileAssert + + - id: ReviewMark-Quality-TestInfrastructure + title: >- + The project's own developer test suite shall execute automatically + and report results in every CI run. + justification: | + Requirements traceability depends on evidence that tests actually executed + and passed; that evidence has no value unless the test framework reliably + discovers, runs, and reports every test method on every CI run, across all + supported platforms and .NET versions, without manual intervention. + This requirement is satisfied by its children: it is a non-atomic (grouping) + requirement, and verification evidence is carried by each atomic child requirement's + tests. + tags: [quality] + children: + - ReviewMark-OTS-xUnit-Execute + - ReviewMark-OTS-xUnit-Report + + - id: ReviewMark-Quality-RequirementsTraceability + title: >- + Every requirement shall be linked to passing tests and enforced as part + of the release pipeline. + justification: | + Requirements that are not linked to verifying tests, or whose tests are not + checked as part of the pipeline, provide no real assurance that the software + behaves as documented. Automatically enforcing requirements-to-test + traceability on every CI run ensures untested or orphaned requirements are + caught before release rather than discovered later. + This requirement is satisfied by its children: it is a non-atomic (grouping) + requirement, and verification evidence is carried by the atomic child requirement's + tests. + tags: [quality] + children: + - ReviewMark-OTS-ReqStream + + - id: ReviewMark-Quality-ArchitectureTraceability + title: >- + The project's software structure shall be modeled, validated, and + rendered independent of source code, so its architecture can be + queried and reviewed without reading implementation. + justification: | + Reviewers, auditors, and automated agents need to understand system + structure and responsibilities without reading through source code line by + line. Maintaining an explicit architecture model that is automatically + validated for structural correctness and rendered as diagrams embedded in + design documentation ensures the documented architecture remains + internally consistent and stays usable as a standalone reference. + This requirement is satisfied by its children: it is a non-atomic (grouping) + requirement, and verification evidence is carried by each atomic child requirement's + tests. + tags: [quality] + children: + - ReviewMark-OTS-SysML2Tools-Lint + - ReviewMark-OTS-SysML2Tools-Render + - ReviewMark-OTS-SysML2Tools diff --git a/docs/reqstream/review-mark.yaml b/docs/reqstream/review-mark.yaml index fe312d4..4bdcb9a 100644 --- a/docs/reqstream/review-mark.yaml +++ b/docs/reqstream/review-mark.yaml @@ -11,6 +11,7 @@ sections: In regulated environments, auditors require evidence that every file subject to review is covered by at least one named review-set. The Review Plan document provides this evidence automatically on each CI/CD run, replacing manual tracking spreadsheets. + tags: [system] tests: - ReviewMark_PlanFlag_WithDefinitionFile_GeneratesReviewPlan children: @@ -25,6 +26,7 @@ sections: that the reviewed files have not changed since the review was conducted. The Review Report provides this evidence automatically, showing Current, Stale, Missing, or Failed status for each review-set. + tags: [system] tests: - ReviewMark_ReportFlag_WithDefinitionFile_GeneratesReviewReport children: @@ -32,6 +34,7 @@ sections: - ReviewMark-Configuration-Fingerprinting - ReviewMark-Configuration-ReportGeneration - ReviewMark-Indexing-LoadEvidence + - ReviewMark-Indexing-CreateEvidence - id: ReviewMark-System-Enforce title: The tool shall return a non-zero exit code when enforcement is enabled and any review-set is not current. @@ -42,6 +45,7 @@ sections: review-set, or when the Review Report shows that any review-set has Stale, Missing, or Failed status. This makes incomplete file coverage, out-of-date reviews, and failed reviews all build-breaking conditions. + tags: [system] tests: - ReviewMark_EnforceFlag_WithNoEvidence_ReturnsNonZero children: @@ -57,6 +61,7 @@ sections: intervention. Reading credentials from environment variables (username-env and password-env) avoids storing secrets in the configuration file and integrates cleanly with CI/CD secret management. + tags: [system] tests: - ReviewMark_LintFlag_WithValidConfig_ProducesNoOutput - ReviewMarkConfiguration_Parse_EvidenceSourceWithCredentials_ParsedCorrectly @@ -70,6 +75,7 @@ sections: Keywords field. The --index command scans a directory of such PDFs and writes an index.json, enabling the evidence store to be refreshed after new review PDFs are added without manual maintenance of the index file. + tags: [system] tests: - ReviewMark_IndexFlag_OnEmptyDirectory_CreatesIndexJson children: @@ -88,6 +94,7 @@ sections: repeated --index flags allows users to aggregate evidence from all relevant locations into a single index.json without requiring separate tool invocations or manual merging. + tags: [system] tests: - ReviewMark_IndexFlag_WithRepeat_ScansAllPaths children: @@ -100,6 +107,7 @@ sections: Regulated environments require tool qualification evidence to demonstrate that the tool functions correctly in its specific deployment environment. The --validate flag triggers a built-in test suite that exercises core tool behaviors and produces a pass/fail report. + tags: [system] tests: - ReviewMark_ValidateFlag_Invoked_RunsValidation children: @@ -113,16 +121,19 @@ sections: justification: | Users need to quickly identify the version of the tool they are using for troubleshooting and compatibility verification. + tags: [system] tests: - ReviewMark_VersionFlag_Invoked_OutputsVersion children: - ReviewMark-Cmd-Version - ReviewMark-Program-Dispatch + - ReviewMark-Program-ExecuteOperation - id: ReviewMark-System-Help title: The tool shall display usage information when the --help flag is provided. justification: | Users need access to command-line usage documentation without requiring external resources. + tags: [system] tests: - ReviewMark_HelpFlag_Invoked_OutputsUsageInformation children: @@ -133,6 +144,7 @@ sections: justification: | Allows users to target an evidence store or project directory without changing the process working directory, enabling consistent scripting and CI/CD usage. + tags: [system] tests: - ReviewMark_DirFlag_Invoked_OverridesWorkingDirectory children: @@ -143,6 +155,7 @@ sections: justification: | When preparing for a review, the reviewer needs the review set ID, its title, its current fingerprint, and the full sorted list of files to be reviewed. + tags: [system] tests: - ReviewMark_ElaborateFlag_WithValidId_OutputsElaboration children: @@ -156,6 +169,7 @@ sections: Users need a way to verify that the .reviewmark.yaml configuration file is valid before running the main tool. Reporting only the issue messages (not a banner or summary) keeps the output suitable for direct use in linting scripts and CI pipelines. + tags: [system] tests: - ReviewMark_LintFlag_WithValidConfig_ProducesNoOutput - ReviewMark_LintFlag_WithInvalidConfig_ReportsOnlyIssueMessages @@ -169,17 +183,20 @@ sections: Suppressing all output on successful lint (silence-on-success) allows the exit code alone to signal whether the file is valid. This follows the Unix convention and improves integration with linting scripts and CI pipelines. + tags: [system] tests: - ReviewMark_LintFlag_WithValidConfig_ProducesNoOutput children: - ReviewMark-Cmd-Lint - ReviewMark-Program-LintVerbosity + - ReviewMark-Cmd-LintSilence - id: ReviewMark-System-Silent title: The tool shall support --silent flag to suppress console output. justification: | Enables automated scripts and CI/CD pipelines to run the tool without cluttering output logs when only the exit code is needed. + tags: [system] tests: - ReviewMark_SilentFlag_Invoked_SuppressesOutput children: @@ -190,6 +207,7 @@ sections: justification: | Provides persistent logging for debugging and audit trails when running in CI/CD environments where console output may not be captured. + tags: [system] tests: - ReviewMark_LogFlag_Invoked_WritesOutputToFile children: @@ -202,6 +220,7 @@ sections: justification: | Allows users to set the heading depth once and have it apply to the review plan, review report, and self-validation report. Default depth is 1 when not specified. + tags: [system] tests: - ReviewMark_DepthFlag_Invoked_SetsDefaultHeadingDepth - ReviewMark_DepthFlag_WithValidate_SetsValidationHeadingDepth @@ -216,6 +235,7 @@ sections: Allows the review plan to be embedded at any heading level within a larger Markdown document, overriding the --depth default when specified. Default depth is 1 when neither --plan-depth nor --depth is specified. + tags: [system] tests: - ReviewMark_DepthFlag_Invoked_SetsDefaultHeadingDepth - ReviewMark_PlanDepthFlag_Invoked_OverridesPlanHeadingOnly @@ -230,6 +250,7 @@ sections: Allows the review report to be embedded at any heading level within a larger Markdown document, overriding the --depth default when specified. Default depth is 1 when neither --report-depth nor --depth is specified. + tags: [system] tests: - ReviewMark_DepthFlag_Invoked_SetsDefaultHeadingDepth - ReviewMark_ReportDepthFlag_Invoked_OverridesReportHeadingOnly @@ -241,6 +262,7 @@ sections: justification: | Providing clear feedback for invalid arguments helps users quickly correct mistakes and prevents silent misconfiguration in automated environments. + tags: [system] tests: - ReviewMark_UnknownArgument_Provided_ReturnsNonZeroAndError children: @@ -255,6 +277,7 @@ sections: justification: | Enables integration with CI/CD systems and requirements traceability tools that expect standard TRX or JUnit XML test result formats. + tags: [system] tests: - ReviewMark_ValidateFlag_WithTrxResultsPath_GeneratesTrxFile - ReviewMark_ValidateFlag_WithXmlResultsPath_GeneratesJUnitFile @@ -270,6 +293,7 @@ sections: for example when targeting a different project directory or using a non-standard file name. The --definition flag enables ReviewMark to be used with multiple configurations in the same repository or CI/CD pipeline. + tags: [system] tests: - ReviewMark_PlanFlag_WithDefinitionFile_GeneratesReviewPlan children: @@ -283,6 +307,7 @@ sections: runtimes so that teams can use ReviewMark regardless of their development or CI/CD platform. Supporting .NET 8 (LTS), 9, and 10 ensures long-term compatibility and access to the latest runtime features. + tags: [system] tests: - ReviewMark_VersionFlag_Invoked_OutputsVersion children: @@ -301,6 +326,7 @@ sections: derived from the command-line arguments, and all output channels and exit-code state must be managed consistently for the full duration of an invocation. This ensures predictable, auditable behavior in both interactive and CI/CD environments. + tags: [system] tests: - ReviewMark_VersionFlag_Invoked_OutputsVersion - ReviewMark_UnknownArgument_Provided_ReturnsNonZeroAndError diff --git a/docs/reqstream/review-mark/configuration.yaml b/docs/reqstream/review-mark/configuration.yaml index 4fad15c..7cb31ae 100644 --- a/docs/reqstream/review-mark/configuration.yaml +++ b/docs/reqstream/review-mark/configuration.yaml @@ -21,6 +21,10 @@ sections: - ReviewMark-GlobMatcher-NullPatternsRejection - ReviewMark-GlobMatcher-EmptyBaseDirectoryRejection - ReviewMark-GlobMatcher-PathNormalization + - ReviewMark-Config-ContextExcludedFromCoverage + - ReviewMark-Config-PathsConstrainedToNeedsReview + - ReviewMark-Config-GetFilesUnconstrainedWhenNoConstraint + - ReviewMark-Config-NeedsReviewAbsentUnconstrained - id: ReviewMark-Configuration-Fingerprinting title: The tool shall compute content-based fingerprints for review-sets to detect file changes. @@ -32,7 +36,7 @@ sections: tests: - Configuration_Fingerprinting_ContentModified_FingerprintDiffers - Configuration_Fingerprinting_FileRenamed_FingerprintUnchanged - children: [ReviewMark-Config-Reading] + children: [ReviewMark-Config-Reading, ReviewMark-Config-ContextExcludedFromFingerprint] - id: ReviewMark-Configuration-PlanGeneration title: The tool shall generate a Review Plan Markdown document listing review-set coverage. @@ -79,6 +83,10 @@ sections: - ReviewMark-Config-ElaborationMarkdownDepth - ReviewMark-Config-ElaborationMarkdownDepthValidation - ReviewMark-Config-ElaborationNullRejection + - ReviewMark-Config-ContextParsing + - ReviewMark-Config-ContextInElaboration + - ReviewMark-Config-ContextDeduplication + - ReviewMark-Config-ContextExclusionPatterns - id: ReviewMark-Configuration-MalformedYaml title: The tool shall return a null configuration with diagnostic issues when the YAML file is malformed. diff --git a/docs/reqstream/review-mark/configuration/glob-matcher.yaml b/docs/reqstream/review-mark/configuration/glob-matcher.yaml index d0290ca..0c53f5f 100644 --- a/docs/reqstream/review-mark/configuration/glob-matcher.yaml +++ b/docs/reqstream/review-mark/configuration/glob-matcher.yaml @@ -25,6 +25,9 @@ sections: - GlobMatcher_GetMatchingFiles_NoMatchingFiles_ReturnsEmptyList - GlobMatcher_GetMatchingFiles_EmptyPatterns_ReturnsEmptyList - GlobMatcher_GetMatchingFiles_MultipleIncludePatterns_ReturnsAllMatching + children: + - ReviewMark-OTS-FileSystemGlobbing-WildcardMatching + - ReviewMark-OTS-FileSystemGlobbing-ExclusionPrefix - id: ReviewMark-GlobMatcher-NullBaseDirectoryRejection title: The GlobMatcher shall reject a null baseDirectory parameter with an ArgumentNullException. diff --git a/docs/reqstream/review-mark/configuration/review-mark-configuration.yaml b/docs/reqstream/review-mark/configuration/review-mark-configuration.yaml index f3d17c3..f5b7018 100644 --- a/docs/reqstream/review-mark/configuration/review-mark-configuration.yaml +++ b/docs/reqstream/review-mark/configuration/review-mark-configuration.yaml @@ -29,6 +29,10 @@ sections: - ReviewMarkConfiguration_Load_FileshareRelativeLocation_ResolvesToAbsolutePath - ReviewMarkConfiguration_Parse_NoneEvidenceSource_ParsedCorrectly - ReviewMarkConfiguration_Parse_NoneEvidenceSource_NoLocationRequired + children: + - ReviewMark-OTS-YamlDotNet-Deserialize + - ReviewMark-OTS-YamlDotNet-ErrorHandling + - ReviewMark-OTS-YamlDotNet-UnknownKeys - id: ReviewMark-Config-Loading title: >- diff --git a/docs/reqstream/review-mark/indexing.yaml b/docs/reqstream/review-mark/indexing.yaml index 6903de8..75d87e6 100644 --- a/docs/reqstream/review-mark/indexing.yaml +++ b/docs/reqstream/review-mark/indexing.yaml @@ -72,4 +72,4 @@ sections: tests: - Indexing_SafePathCombine_WithIndexPath_LoadsIndex - Indexing_SafePathCombine_WithTraversalInputs_Throws - children: [ReviewMark-PathHelpers-SafeCombine, ReviewMark-PathHelpers-NullRejection] + children: [ReviewMark-PathHelpers-SafeCombine, ReviewMark-PathHelpers-NullRejection, ReviewMark-PathHelpers-TraversalRejection] diff --git a/docs/reqstream/review-mark/indexing/review-index.yaml b/docs/reqstream/review-mark/indexing/review-index.yaml index 28f92f4..0ec3bc9 100644 --- a/docs/reqstream/review-mark/indexing/review-index.yaml +++ b/docs/reqstream/review-mark/indexing/review-index.yaml @@ -90,6 +90,8 @@ sections: - ReviewIndex_Scan_PdfWithNoKeywords_SkipsWithWarning - ReviewIndex_Scan_NoMatchingFiles_LeavesIndexEmpty - ReviewIndex_Scan_MultiplePdfs_PopulatesAllEntries + children: + - ReviewMark-OTS-PDFsharp-ReadMetadata - id: ReviewMark-Index-Freshness title: >- diff --git a/docs/reqstream/review-mark/self-test/validation.yaml b/docs/reqstream/review-mark/self-test/validation.yaml index 535176e..aede25f 100644 --- a/docs/reqstream/review-mark/self-test/validation.yaml +++ b/docs/reqstream/review-mark/self-test/validation.yaml @@ -34,3 +34,6 @@ sections: - Validation_Run_WithXmlResultsFile_WritesFile - Validation_Run_WithResultsFileInNewDirectory_CreatesDirectory - Validation_Run_WithUnsupportedResultsFileExtension_WritesError + children: + - ReviewMark-OTS-TestResults-TrxSerialize + - ReviewMark-OTS-TestResults-JUnitSerialize diff --git a/requirements.yaml b/requirements.yaml index 1917ed2..bd0550a 100644 --- a/requirements.yaml +++ b/requirements.yaml @@ -1,6 +1,8 @@ --- +root-tags: [system, quality] includes: - docs/reqstream/review-mark.yaml + - docs/reqstream/quality.yaml - docs/reqstream/review-mark/platform-requirements.yaml - docs/reqstream/review-mark/program.yaml - docs/reqstream/review-mark/cli.yaml