Add optional justification field for requirements with PDF generation#94
Add optional justification field for requirements with PDF generation#94Malcolmnixon merged 12 commits intomainfrom
Conversation
Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
…uirements.yaml - Added justification feature to README.md features list - Documented --justifications and --justifications-depth CLI options - Added justification field to YAML format examples with multiline syntax - Created new 'Justifications Export' section with usage examples - Added meaningful justifications to all requirements in requirements.yaml - Updated ARCHITECTURE.md to include justification field in data model - Updated Context and Requirements class documentation in ARCHITECTURE.md - Added justifications report to report generation documentation All justifications explain WHY requirements exist, not WHAT they do, and use the YAML multiline format (|) for better readability.
Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
|
@copilot The README.md examples have double-quotes around the requirement titles. Again please only use double-quotes where needed. |
|
@copilot Also lets modify the examples so when demonstrating test-source-linking they don't use the full github agent names, but use "windows" and "ubuntu". |
Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Fixed in ddc0e36. Removed unnecessary double-quotes from all YAML examples in README.md - titles, IDs, and test names now use unquoted strings as per YAML best practices. |
|
@copilot And remember to review the users guide for the new functionality and for unnecessary quotes. |
Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
…quotes Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Fixed in deadee9. Updated the user guide (docs/guide/guide.md) with comprehensive justifications documentation including:
|
|
@copilot Hey, you didn't add building a ReqStream Requirements Justification PDF document as I put in my original ticket. |
Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Fixed in 8513809. Added complete PDF generation infrastructure for requirements justifications: Created:
Updated build workflow to:
The PDF will be automatically generated in the CI/CD pipeline and uploaded as a build artifact along with the other documentation PDFs (User Guide, Requirements, Trace Matrix, Code Quality). |
Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
|
@copilot Unfortunately building section headings consisting of both the requirement ID and Title result in names too long for the table of contents. I think the section heading needs to just be the ID and then the section contents needs to list the requirement title followed by the justification. |
Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Fixed in fa199a1. Changed justifications format to use ID-only headers with title in bold: New format: ## REQ-001
**The requirement title**
Justification text...This creates much shorter table of contents entries while maintaining full context in the document body. Updated all tests and documentation to match the new format. |
Pull Request
Description
Adds optional
justificationfield to requirements YAML schema and a new export format that renders justifications in narrative markdown (vs. the table format used for requirements reports). Includes automated PDF generation of the requirements justifications document.YAML Schema Extension:
justificationfield on requirements (optional, string)|) for readabilityNew Export Command:
--justifications <file>exports narrative document with requirement ID, title, and justification text--justifications-depth <depth>controls markdown header levels (default: 1)--reportand--matrixin a single invocation for efficiencyJustifications Format:
## REQ-001)**The requirement title**)PDF Generation:
docs/justifications/directory with Pandoc configurationWorkflow Optimization:
Example:
Generates:
Changes:
Requirementclass withJustificationpropertyExportJustifications()method toRequirementsclassContextwithJustificationsFileandJustificationsDepthproperties--justificationsand--justifications-depthType of Change
Related Issues
Feature request for documenting requirement rationale with justification fields and generating justification reports, including automated PDF generation.
Pre-Submission Checklist
Before submitting this pull request, ensure you have completed the following:
Build and Test
dotnet build --configuration Releasedotnet test --configuration ReleaseCode Quality
dotnet format --verify-no-changesQuality Checks
Please run the following checks before submitting:
cspell "**/*.{md,cs}"markdownlint "**/*.md"yamllint '**/*.{yml,yaml}'Testing
Documentation
Additional Notes
Test Coverage: Added 5 new tests covering justification parsing and export scenarios (simple, nested, with/without justifications, custom depth). Total: 117 tests passing.
Security: CodeQL analysis found 0 alerts. No security implications from this feature.
YAML Style: All YAML examples in documentation (README.md, ARCHITECTURE.md, docs/guide/guide.md) follow best practices with unquoted strings for simple values and simplified naming conventions, improving readability and consistency across the project.
User Guide Updates: The user guide (docs/guide/guide.md) has been comprehensively updated to document the justification feature, including new sections, command-line options, examples, and best practices.
PDF Generation: The CI/CD pipeline now automatically generates "ReqStream Requirements Justifications.pdf" from the project's requirements.yaml file. The PDF is generated using Pandoc and Weasyprint, following the same pattern as other documentation PDFs (User Guide, Requirements, Trace Matrix, Code Quality). The PDF includes:
Performance: Optimized the build workflow to combine multiple reqstream invocations into a single command, reducing redundant file parsing and improving build efficiency.
Format Optimization: Updated justifications export format to use ID-only headers (e.g.,
## REQ-001) with bold titles on separate lines. This keeps table of contents entries concise while preserving full context in the document body.Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.