Elements
graph TD;
%% REQVIRE-AUTOGENERATED-DIAGRAM
%% Graph styling
classDef userRequirement fill:#D1C4E9,stroke:#7E57C2,stroke-width:2px;
classDef systemRequirement fill:#E1D8EE,stroke:#673AB7,stroke-width:1.5px;
classDef verification fill:#DCEDC8,stroke:#4CAF50,stroke-width:2px;
classDef folder fill:#FAFAFA,stroke:#9E9E9E,stroke-width:3px;
classDef file fill:#FFF8E1,stroke:#FFCA28,stroke-width:2px;
classDef default fill:#F5F5F5,stroke:#424242,stroke-width:1.5px;
subgraph 75874bcc96c01d2f["đ requirements/Functional/Operations/Verifications"]
subgraph 584acc9e5dd3c2cd["đ LintingVerifications.md"]
a967e55b50b57d2["Lint Command Verification"];
class a967e55b50b57d2 verification;
click a967e55b50b57d2 "LintingVerifications.html#lint-command-verification";
d57f3715f551dd1f["Redundant Hierarchical Attachment Test"];
class d57f3715f551dd1f verification;
click d57f3715f551dd1f "LintingVerifications.html#redundant-hierarchical-attachment-test";
end
end
627c92e05bc78e3b["test.sh"];
class 627c92e05bc78e3b default;
click 627c92e05bc78e3b "../../../../tests/test-lint-command/test.sh";
a967e55b50b57d2 -->|satisfiedBy| 627c92e05bc78e3b;
f6021060dbf21d0c["test.sh"];
class f6021060dbf21d0c default;
click f6021060dbf21d0c "../../../../tests/test-lint-redundant-attachments/test.sh";
d57f3715f551dd1f -->|satisfiedBy| f6021060dbf21d0c;
Lint Command Verification
This test verifies that the lint command analyzes model quality, detects issues in requirements relations, and provides categorized output distinguishing between auto-fixable issues and those requiring manual review.
Details
Acceptance Criteria:
Basic Command Functionality:
- System shall provide lint command that analyzes model quality
- System shall default to dry-run mode (report issues without applying fixes)
- System shall support âfixable flag to show only auto-fixable issues
- System shall support âauditable flag to show only issues requiring manual review
- System shall support âfix flag to automatically apply fixes for auto-fixable issues
- System shall support âjson flag for structured JSON output
- System shall show ALL issues when no filter flags are provided
- System shall exit with code 0 when no issues are found or fixes are successfully applied
- System shall exit with non-zero code on errors
Redundant Verify Relations Detection:
- System shall detect when a verification verifies both a leaf requirement and its ancestor
- System shall reuse verification trace tree logic for detection
- System shall report these as auto-fixable issues
- System shall show affected verification elements with file paths
- System shall list specific redundant verify relations
- System shall explain why relations are redundant
Maybe-Redundant Hierarchical Relations Detection:
- System shall detect when an element has derivedFrom to both a requirement and its ancestor
- System shall use virtual verification connected to all leaf requirements for detection
- System shall reuse trace tree building logic for consistency
- System shall report these as needs manual review issues
- System shall show affected elements with their derivedFrom relations
- System shall not suggest which relations to remove
Output Formatting:
- System shall categorize output into âAuto-fixable Issuesâ and âNeeds Manual Reviewâ sections
- Each issue shall include element identifier, file path, specific relations, and rationale
- JSON output shall include issue categorization, type, affected elements, relation details, and rationale
- System shall not suggest what to remove in output
Auto-fix Capability:
- System shall apply fixes only for auto-fixable issues when âfix is used
- System shall remove redundant verify relations from verification elements
- System shall remove safe redundant hierarchical derivation relations following single-chain constraint
- System shall NOT auto-remove hierarchical relations with multiple converging paths (requires manual review)
- System shall preserve all other content and formatting in files
- System shall report all changes made (files modified, relations removed)
- System shall not modify issues categorized as needs manual review
Test Criteria:
-
Command execution
- Lint command runs successfully with default behavior
- âfixable flag shows only auto-fixable issues
- âauditable flag shows only manual review issues
- âfix flag applies fixes for auto-fixable issues
- âjson flag produces structured JSON output
-
JSON output filtering
- âfixable âjson shows only auto_fixable items (needs_manual_review is empty array)
- âauditable âjson shows only needs_manual_review items (auto_fixable is empty array)
- âjson without filters shows both auto_fixable and needs_manual_review items
- JSON output correctly filters based on flags before serialization
-
Redundant verify detection
- Correctly identifies redundant verify relations using trace tree logic
- Reports verification elements with redundant relations
- Categorizes as auto-fixable
-
Hierarchical redundancy detection
- Creates virtual verification connected to leaf requirements
- Correctly identifies potentially redundant derivedFrom relations
- Categorizes as needs manual review
-
Output quality
- Clear categorization into auto-fixable and manual review sections
- Complete information for each issue
- JSON output has correct structure
- No suggestions on what to remove
-
Auto-fix functionality
- Removes redundant verify relations from markdown files
- Removes safe redundant hierarchical derivation relations (single-chain only)
- Does NOT auto-remove hierarchical relations with multiple converging paths
- Preserves file content and formatting
- Reports changes accurately
- Does not modify manual review issues
Metadata
Relations
Redundant Hierarchical Attachment Test
This test verifies that the lint command detects redundant attachments that exist on both child elements and their ancestors in the derivedFrom hierarchy, and can auto-fix by removing duplicates from children.
Details
Acceptance Criteria:
- System shall detect when a child element has the same attachment as an ancestor
- System shall report which attachment is redundant and on which ancestor it exists
- System shall categorize as auto-fixable
- System shall remove the redundant attachment from the child when âfix is used
- System shall preserve the attachment on the ancestor
Test Criteria:
- Create parent requirement with attachment
- Create child requirement derived from parent with same attachment
- Run lint âfixable to detect redundant attachment
- Verify issue is reported with correct element, attachment, and ancestor info
- Run lint âfix to apply fix
- Verify childâs attachment is removed
- Verify parentâs attachment is preserved
- Verify no more issues after fix
Metadata
Relations