feat: add --depth as default markdown header depth for all reports#167
Merged
Malcolmnixon merged 5 commits intomainfrom Apr 14, 2026
Merged
Conversation
Agent-Logs-Url: https://github.com/demaconsulting/ReqStream/sessions/147eaa6a-1694-4d03-843c-953141e2cd4e Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Agent-Logs-Url: https://github.com/demaconsulting/ReqStream/sessions/147eaa6a-1694-4d03-843c-953141e2cd4e Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Agent-Logs-Url: https://github.com/demaconsulting/ReqStream/sessions/147eaa6a-1694-4d03-843c-953141e2cd4e Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Agent-Logs-Url: https://github.com/demaconsulting/ReqStream/sessions/147eaa6a-1694-4d03-843c-953141e2cd4e Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Agent-Logs-Url: https://github.com/demaconsulting/ReqStream/sessions/147eaa6a-1694-4d03-843c-953141e2cd4e Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
Malcolmnixon
April 14, 2026 10:38
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new global CLI option --depth <depth> to set the default starting Markdown header depth across all generated outputs (requirements report, trace matrix, justifications, and self-validation), while preserving existing per-report depth flags as overrides.
Changes:
- Introduced
Context.Depthand--depthparsing/validation, with per-report depths defaulting toDepthunless explicitly set. - Updated self-validation header rendering to respect
context.Depth. - Updated unit tests and documentation/help text to cover the new option and override behavior.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test/DemaConsulting.ReqStream.Tests/Cli/ContextTests.cs | Adds coverage for --depth defaulting/overrides and validation errors. |
| src/DemaConsulting.ReqStream/Cli/Context.cs | Implements Depth property and CLI parsing; wires per-report depth fallbacks. |
| src/DemaConsulting.ReqStream/SelfTest/Validation.cs | Uses context.Depth for the self-validation Markdown header. |
| src/DemaConsulting.ReqStream/Program.cs | Updates CLI help text to document --depth and override semantics. |
| README.md | Documents --depth and provides updated examples for header depth configuration. |
| docs/user_guide/introduction.md | Updates user guide options table, examples, and FAQ to include --depth. |
| docs/design/reqstream/cli/context.md | Updates design documentation for Context.Depth and override behavior. |
| docs/reqstream/reqstream/cli/context.yaml | Adds a requirement covering global default depth behavior + associated tests. |
| docs/reqstream/reqstream/cli/cli.yaml | Registers the new depth requirement in the CLI subsystem requirements list. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Pull Request
Description
Adds
--depth <depth>as a global default markdown header depth that applies to the self-validationreport, requirements report, trace matrix, and justifications output. Per-report flags
(
--report-depth,--matrix-depth,--justifications-depth) override it when specified.Behavior:
Implementation
Context.cs: AddedDepthproperty; per-report depth locals changed toint?— each fallsback to
Depthwhen not explicitly set;--depthparsed and validated like other depth argsValidation.cs:PrintValidationHeaderusesnew string('#', context.Depth)for theself-validation section heading
Program.cs: Help text updated to document--depthand note that specific depth flagsoverride it
Tests
ContextTests.cs: 4 new tests —--depthpropagates to all depths, per-report flag overridesdefault, missing-value error, invalid-value error
Documentation
README.md: Updated CLI options table and "Configuring Header Depth" sectiondocs/user_guide/introduction.md: Updated options table, examples, and FAQ entrydocs/design/reqstream/cli/context.md: AddedDepthproperty row; updatedCreate()descriptiondocs/reqstream/reqstream/cli/context.yaml: AddedReqStream-Command-Depthrequirementdocs/reqstream/reqstream/cli/cli.yaml: AddedReqStream-Command-Depthto subsystem childrenType of Change
Related Issues
Pre-Submission Checklist
Before submitting this pull request, ensure you have completed the following:
Build and Test
dotnet build --configuration Releasedotnet test --configuration Releasedotnet run --project src/DemaConsulting.ReqStream --configuration Release --framework net10.0--no-build -- --validateCode Quality
dotnet format --verify-no-changesQuality Checks
Please run the following checks before submitting:
cspell "**/*.{md,cs}"markdownlint "**/*.md"yamllint .Testing
Documentation
Additional Notes
Default depth is
1when--depthis not specified — no behavioral change for existing invocations.