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 8735c0a811307e57["π requirements/Functional/Core"]
subgraph 98067cc5207d6b91["π Validation.md"]
327e10e1bebd5bde["Excluded File Relation Validation"];
class 327e10e1bebd5bde systemRequirement;
click 327e10e1bebd5bde "../Core/Validation.html#excluded-file-relation-validation";
end
end
subgraph 91eede421faaa553["π requirements/Functional/Operations"]
subgraph 60a9b8fe38a9d536["π Behaviors.md"]
dcccf1b1262f00fa["Format Duplicate Removal Behavior"];
class dcccf1b1262f00fa default;
click dcccf1b1262f00fa "Behaviors.html#format-duplicate-removal-behavior";
end
subgraph e87e3ee72f8fcc8a["π Formatting.md"]
5b7b8187ae0d5398["Document Structure Normalization"];
class 5b7b8187ae0d5398 systemRequirement;
click 5b7b8187ae0d5398 "Formatting.html#document-structure-normalization";
6a890183d80718cc["Element Ordering Normalization
π requirements/Functional/Operations/Behaviors.md#element-ordering-behavior"];
class 6a890183d80718cc systemRequirement;
click 6a890183d80718cc "Formatting.html#element-ordering-normalization";
3126a7da8d2fc941["File Pattern Exclusion for Format"];
class 3126a7da8d2fc941 systemRequirement;
click 3126a7da8d2fc941 "Formatting.html#file-pattern-exclusion-for-format";
358f8e948bf99775["Format Consistency Enforcement"];
class 358f8e948bf99775 systemRequirement;
click 358f8e948bf99775 "Formatting.html#format-consistency-enforcement";
4f647826dc3d196c["Format Duplicate Removal"];
class 4f647826dc3d196c systemRequirement;
click 4f647826dc3d196c "Formatting.html#format-duplicate-removal";
c1a2476e356893a8["Formatting Output"];
class c1a2476e356893a8 systemRequirement;
click c1a2476e356893a8 "Formatting.html#formatting-output";
9bbe93242c4454b["Full Relations Insertion
π RelationTypes.md"];
class 9bbe93242c4454b systemRequirement;
click 9bbe93242c4454b "Formatting.html#full-relations-insertion";
d4eb33161647a801["Git-Style Diff Output for Format"];
class d4eb33161647a801 userRequirement;
click d4eb33161647a801 "Formatting.html#git-style-diff-output-for-format";
a39347281679d203["Model Formatting"];
class a39347281679d203 userRequirement;
click a39347281679d203 "Formatting.html#model-formatting";
ed769d861bf7b2cd["Relation Ordering Normalization"];
class ed769d861bf7b2cd systemRequirement;
click ed769d861bf7b2cd "Formatting.html#relation-ordering-normalization";
1e0f7595bc684d1["Replace Absolute Links with Relative Links"];
class 1e0f7595bc684d1 systemRequirement;
click 1e0f7595bc684d1 "Formatting.html#replace-absolute-links-with-relative-links";
end
subgraph 7c2e7eef0051f760["π Specifications.md"]
7f30e57cc80e9b87["Document Structure Specification"];
class 7f30e57cc80e9b87 default;
click 7f30e57cc80e9b87 "Specifications.html#document-structure-specification";
7d378fffc473b5bd["Format Consistency Specification"];
class 7d378fffc473b5bd default;
click 7d378fffc473b5bd "Specifications.html#format-consistency-specification";
fe3801f2ec107a8a["Relation Ordering Specification"];
class fe3801f2ec107a8a default;
click fe3801f2ec107a8a "Specifications.html#relation-ordering-specification";
end
end
subgraph 75874bcc96c01d2f["π requirements/Functional/Operations/Verifications"]
subgraph cae715fe712bf6a2["π FormattingVerifications.md"]
c89bd750e0ad5b9d["Element Ordering Verification
π requirements/Functional/Operations/Behaviors.md#element-ordering-behavior"];
class c89bd750e0ad5b9d verification;
click c89bd750e0ad5b9d "Verifications/FormattingVerifications.html#element-ordering-verification";
ccbfdf0d74ac48bf["Format Command Requirements Verification"];
class ccbfdf0d74ac48bf verification;
click ccbfdf0d74ac48bf "Verifications/FormattingVerifications.html#format-command-requirements-verification";
29d28d35a64a722d["Format Duplicate Removal Test"];
class 29d28d35a64a722d verification;
click 29d28d35a64a722d "Verifications/FormattingVerifications.html#format-duplicate-removal-test";
5df244b54d1b239c["Full Relations Insertion Verification"];
class 5df244b54d1b239c verification;
click 5df244b54d1b239c "Verifications/FormattingVerifications.html#full-relations-insertion-verification";
753442551dab9958["Relation Ordering Verification"];
class 753442551dab9958 verification;
click 753442551dab9958 "Verifications/FormattingVerifications.html#relation-ordering-verification";
end
end
95cf526671ec752c["graph_registry.rs"];
class 95cf526671ec752c default;
click 95cf526671ec752c "../../../core/src/graph_registry.rs";
5b7b8187ae0d5398 -->|satisfiedBy| 95cf526671ec752c;
35bd98d101f36b62["parser.rs"];
class 35bd98d101f36b62 default;
click 35bd98d101f36b62 "../../../core/src/parser.rs";
5b7b8187ae0d5398 -->|satisfiedBy| 35bd98d101f36b62;
5b7b8187ae0d5398 -->|satisfiedBy| 7f30e57cc80e9b87;
5b7b8187ae0d5398 -.->|verifiedBy| ccbfdf0d74ac48bf;
6a890183d80718cc -.->|verifiedBy| c89bd750e0ad5b9d;
3126a7da8d2fc941 -.->|deriveReqT| 327e10e1bebd5bde;
bdf9762d399478a5["utils.rs"];
class bdf9762d399478a5 default;
click bdf9762d399478a5 "../../../core/src/utils.rs";
3126a7da8d2fc941 -->|satisfiedBy| bdf9762d399478a5;
358f8e948bf99775 -.->|deriveReqT| 5b7b8187ae0d5398;
358f8e948bf99775 -.->|deriveReqT| 6a890183d80718cc;
358f8e948bf99775 -.->|deriveReqT| 4f647826dc3d196c;
358f8e948bf99775 -.->|deriveReqT| ed769d861bf7b2cd;
79d54e418e36893["format.rs"];
class 79d54e418e36893 default;
click 79d54e418e36893 "../../../core/src/format.rs";
358f8e948bf99775 -->|satisfiedBy| 79d54e418e36893;
358f8e948bf99775 -->|satisfiedBy| 7d378fffc473b5bd;
358f8e948bf99775 -.->|verifiedBy| ccbfdf0d74ac48bf;
4f647826dc3d196c -->|satisfiedBy| 79d54e418e36893;
4f647826dc3d196c -->|satisfiedBy| dcccf1b1262f00fa;
4f647826dc3d196c -.->|verifiedBy| 29d28d35a64a722d;
c1a2476e356893a8 -.->|deriveReqT| d4eb33161647a801;
9bbe93242c4454b -.->|verifiedBy| 5df244b54d1b239c;
d07e49b06be4058e["diff.rs"];
class d07e49b06be4058e default;
click d07e49b06be4058e "../../../core/src/diff.rs";
d4eb33161647a801 -->|satisfiedBy| d07e49b06be4058e;
d4eb33161647a801 -->|satisfiedBy| 79d54e418e36893;
d4eb33161647a801 -.->|verifiedBy| ccbfdf0d74ac48bf;
a39347281679d203 -.->|deriveReqT| 358f8e948bf99775;
a39347281679d203 -.->|deriveReqT| c1a2476e356893a8;
a39347281679d203 -.->|deriveReqT| 9bbe93242c4454b;
a39347281679d203 -.->|deriveReqT| 1e0f7595bc684d1;
ed769d861bf7b2cd -->|satisfiedBy| 95cf526671ec752c;
ed769d861bf7b2cd -->|satisfiedBy| fe3801f2ec107a8a;
ed769d861bf7b2cd -.->|verifiedBy| 753442551dab9958;
1e0f7595bc684d1 -.->|verifiedBy| ccbfdf0d74ac48bf;
aaf45a054cfa1d47["test.sh"];
class aaf45a054cfa1d47 default;
click aaf45a054cfa1d47 "../../../tests/test-advanced-format/test.sh";
ccbfdf0d74ac48bf -->|satisfiedBy| aaf45a054cfa1d47;
81623fde4ecde03d["test.sh"];
class 81623fde4ecde03d default;
click 81623fde4ecde03d "../../../tests/test-element-ordering/test.sh";
c89bd750e0ad5b9d -->|satisfiedBy| 81623fde4ecde03d;
327e10e1bebd5bde -->|satisfiedBy| 35bd98d101f36b62;
327e10e1bebd5bde -.->|verifiedBy| 2d8c79b0a3233f70;
4179509ffe0be04b["test.sh"];
class 4179509ffe0be04b default;
click 4179509ffe0be04b "../../../tests/test-duplicate-detection/test.sh";
29d28d35a64a722d -->|satisfiedBy| 4179509ffe0be04b;
2a806c95f3f078e4["test.sh"];
class 2a806c95f3f078e4 default;
click 2a806c95f3f078e4 "../../../tests/test-format-full-relations/test.sh";
5df244b54d1b239c -->|satisfiedBy| 2a806c95f3f078e4;
753442551dab9958 -->|satisfiedBy| aaf45a054cfa1d47;
The system shall respect configured excluded filename patterns when performing formatting operations, ensuring that files intentionally excluded from processing do not receive inappropriate formatting suggestions.
Metadata
Relations
The system shall provide formatting capabilities to normalize and standardize System models for consistency and readability.
Metadata
Relations
The system shall provide formatting capability to ensure consistent formatting in requirements documents.
Details
- The system shall detect and fix formatting inconsistencies following clearly defined specifications
- The system shall maintain consistent formatting across all requirements documents
Metadata
Relations
Document Structure Normalization
When generating formatted output, the system shall ensure all documents follow a consistent hierarchical structure.
Details
When generating formatted output, the system shall:
- Always output
# Elements as the page header (all specification files must have this header)
- Add a default section header
## Elements when elements exist without an explicit section header
- Preserve existing section headers when present (starting with
## )
- Correctly distinguish between level 1 headers (
# ) and level 2 or deeper headers (##, ###)
Default Header Names:
- Page header: Always
# Elements (required for all specification files)
- Section header: βElementsβ (the default section name used by parser)
Normalization Rules:
- If document has
# Elements then ### (no ##): Add section header only
- If document has
# Elements and ##: No header additions needed
Metadata
Relations
Element Ordering Normalization
When formatting or persisting specification files, the system shall reorder elements following the Element Ordering Behavior.
Metadata
Attachments
Relations
The system shall remove duplicate entries within the same subsection during format fix operations.
Details
A behavior defines the detailed deduplication rules.
This operation only removes within-section duplicates (entries repeated in the same Relations or Attachments subsection). Cross-section duplicates are semantic errors that require user resolution.
Metadata
Relations
Relation Ordering Normalization
When formatting or persisting specification files, the system shall sort relations within each element for deterministic and consistent output.
Details
Relations are sorted using the following criteria:
- Primary sort: Alphabetically by relation type name (e.g.,
derivedFrom before satisfiedBy, trace before verifiedBy)
- Secondary sort: Alphabetically by target identifier within the same relation type
This ensures:
- Deterministic output regardless of parsing order or HashMap iteration order
- Consistent diffs when comparing formatted files
- Predictable relation ordering for review and verification
Metadata
Relations
The system shall display formatting changes suggestion in similar manner as git diffs.
Metadata
Relations
The system shall display formatting change suggestions in a git-style diff format, color-coded when possible, to clearly show what modifications will be or have been made to the documents.
Metadata
Relations
Full Relations Insertion
When the βwith-full-relations flag is provided, the system shall insert all registered relations into elements, including both user-created and auto-generated relations.
Details
Auto-generated relations are inverse relations created by the parser during model loading but not persisted to files by default. See Relation Types Specification for opposite relation pairs.
When βwith-full-relations is active:
- All relations from the model registry are written to the Relations subsection
- Relations are sorted according to the Relation Ordering Normalization requirement
Metadata
Attachments
Relations
Replace Absolute Links with Relative Links
The system shall replace absolute links with relative links, where applicable and contextually appropriate, to conform to repository standards and enhance portability.
Metadata
Relations