Merged
Conversation
- Implement serve command that exports HTML to temp directory and serves via HTTP - Add --host and --port options with defaults (localhost:8080) - Display clickable terminal URL using ANSI escape codes - Implement quiet mode for export operations using thread-local flag - Add info_println! macro for conditional output based on quiet mode - Use tiny_http for lightweight HTTP server implementation - Create serve.rs module for static file serving with proper Content-Type headers - Add serve command verification and e2e test - Update agent instructions with Playwright MCP for visual inspection - Update diagrams to include serve command traceability
Implements automatic detection of redundant verification relations where a verification verifies both a requirement and its ancestor. Redundant relations are identified during trace tree building and displayed in both markdown and JSON outputs. Changes: - Add redundant_relations field to VerificationTrace struct - Implement redundancy detection during trace tree traversal - Display redundant relations in markdown output with links - Include redundant_relations array in JSON output (empty if none) - Update specifications and tests for redundant relations feature - Add test cases and expected outputs for validation
Document when to use requirements-engineer and e2e-test-engineer agents for model management, specification updates, and test implementation tasks.
Changed format command behavior to be safer by default: - Default mode now previews changes without applying them - Added --fix flag to actually apply formatting changes - Removed --dry-run flag (no longer needed as it's the default) - Updated CLI help text to reflect new behavior This aligns the format command with the new lint command pattern where safe preview is the default and explicit action is required to make changes. Updated files: - CLI implementation (cli.rs) - Requirements and verifications - Test cases and expected outputs - Documentation (CLAUDE.md, specifications/CLAUDE.md, tests/CLAUDE.md) All tests passing.
Updated the requirements-engineer agent to include running 'reqvire lint --fix' as part of the feature addition workflow to automatically clean up redundant verify relations and other semantic issues after adding or modifying specifications and verifications.
Updated note to clarify that linting should be done after completing a logical unit of work (complete feature) rather than after each individual change.
Add comprehensive linting functionality to analyze model quality and detect redundant relations in requirements specifications. Core Features: - Detects redundant verify relations (auto-fixable) - Detects maybe-redundant hierarchical relations (manual review needed) - Supports --fix flag to automatically remove redundant verify relations - Supports --fixable and --auditable flags to filter output - Supports --json flag for programmatic processing - Markdown link formatting for all file references Architecture: - Created shared trace_tree_builder module to avoid code duplication - Added remove_element_relation method to GraphRegistry for bidirectional relation removal (removes verify and verifiedBy pairs) - Implemented apply_fixes method in LintReport to remove redundant relations - Reuses format_files infrastructure to rewrite markdown files after fixes Implementation Details: - lint.rs: Core linting logic with issue detection and fixing - trace_tree_builder.rs: Shared upward trace traversal logic - graph_registry.rs: Added remove_element_relation with bidirectional support - cli.rs: CLI handler with --fix flag support Test Coverage: - test-lint-command: Comprehensive e2e test with 6 test scenarios - Tests verify detection, filtering, JSON output, fix functionality - Updated test-cli-help-structure to include new lint command
- Increase page width to 95% viewport for better space utilization - Add pan/zoom controls to all Mermaid diagrams with directional navigation buttons - Include satisfiedBy relations to code files and external resources in model diagram - Position diagrams at top-center by default for better initial view - Make diagram container use full available height with proper flexbox layout Improves usability for users without touchscreens and ensures all requirement traceability links (including to implementation files) are visible in diagrams.
- Updated section diagrams, model diagrams, and verification trace diagrams - userRequirement: fill:#f9d6d6, stroke:#f55f5f - systemRequirement: fill:#fce4e4, stroke:#e68a8a - verification: fill:#d6f9d6, stroke:#5fd75f - Updated test expectations to match new color scheme
- Check for correct userRequirement, systemRequirement, and verification colors - Ensures future color changes are caught by the test suite
- Changed description from 'Output traceability matrix as SVG' to 'Output model as Cypher queries for graph database import' - Updated test expectations to match corrected help text
Collaborator
Author
|
/reqvire impact |
- Updated generate_model_diagram() to accept optional root_element_id parameter - When root_element_id is provided, generates focused diagram from that element - Adds collect_related_elements() to traverse graph from root element - Adds group_elements_by_file_filtered() to filter elements in diagram - Default behavior (None) maintains full model diagram generation - Enables future CLI support for focused model diagrams
Added sorting to ensure deterministic output in model command: - Sort elements within sections by identifier - Sort relations by source_id, target_id, and relation_type - Existing sorting for folders, files, and sections maintained This fixes the test-model-command test failure caused by HashMap iteration order being non-deterministic across runs.
Implement distinction between safe (auto-fixable) and unsafe (manual review) redundant hierarchical relations in the lint command. Safe redundant relations are those with a single unambiguous chain (A→B→C with redundant direct A→C). These can be safely auto-removed when using `reqvire lint --fix`. Unsafe redundant relations occur when multiple paths converge to the same ancestor (A→B→C and A→D→C with redundant direct A→C). These require manual review as both paths may have semantic meaning. Implementation: - Add SafeRedundantHierarchicalRelations variant to AutoFixableIssue - Implement path counting logic to distinguish single-chain from multi-path - Split detect_maybe_redundant_hierarchical_relations into safe/unsafe cases - Update apply_fixes to handle safe hierarchical relation removal - Add sorting for deterministic output in lint reports - Update test suite with comprehensive test cases Testing: - Extended test-lint-command with single-chain and multi-path examples - Verified diff-based test validation for file modifications - All tests pass successfully Traceability: - Satisfies: specifications/SystemRequirements/Requirements.md#safe-redundant-hierarchical-relations-auto-removal - Verified by: specifications/Verifications/Misc.md#lint-command-verification
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This PR introduces significant improvements to Reqvire's verification analysis capabilities, documentation serving, and CLI ergonomics.
🎯 Key Features
Automatically detects and reports redundant verification relations where a verification verifies both a requirement and its ancestor in the hierarchy.
Example:
OAuth Flow Test verifies:
New serve command provides local HTTP server for documentation preview without manual export steps.
Enhanced coverage reports now identify verifications without any verify relations.
Reorganized command structure for better usability:
HTML export no longer mutates source files: