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 91eede421faaa553["π requirements/Functional/Operations"]
subgraph 60a9b8fe38a9d536["π Behaviors.md"]
40714cbda978a508["Create Element Override Behavior"];
class 40714cbda978a508 default;
click 40714cbda978a508 "Behaviors.html#create-element-override-behavior";
2a2729a903e6692f["Merge Content Transformation Behavior"];
class 2a2729a903e6692f default;
click 2a2729a903e6692f "Behaviors.html#merge-content-transformation-behavior";
end
subgraph efce051cd2e037ec["π Constraints.md"]
3e506d76554b3740["Merge Type Compatibility Constraint"];
class 3e506d76554b3740 default;
click 3e506d76554b3740 "Constraints.html#merge-type-compatibility-constraint";
1dc0e8b76789ffce["Target Location Constraint"];
class 1dc0e8b76789ffce default;
click 1dc0e8b76789ffce "Constraints.html#target-location-constraint";
end
subgraph e1e686bef27807d6["π ElementManipulation.md"]
bf9a2f73b67492b9["Create Element Operation
π requirements/Functional/Operations/Constraints.md#target-location-constraint
π requirements/Functional/Operations/Behaviors.md#element-ordering-behavior"];
class bf9a2f73b67492b9 systemRequirement;
click bf9a2f73b67492b9 "ElementManipulation.html#create-element-operation";
591265fa14ecd72d["Delete Element Operation"];
class 591265fa14ecd72d systemRequirement;
click 591265fa14ecd72d "ElementManipulation.html#delete-element-operation";
cab861a199d11c3c["Element Manipulation File Persistence
π requirements/Functional/Operations/Behaviors.md#element-ordering-behavior"];
class cab861a199d11c3c systemRequirement;
click cab861a199d11c3c "ElementManipulation.html#element-manipulation-file-persistence";
451abcac00b45de4["Merge Element Operation"];
class 451abcac00b45de4 systemRequirement;
click 451abcac00b45de4 "ElementManipulation.html#merge-element-operation";
c68daf5bfafc5a05["Move Element Operation
π requirements/Functional/Operations/Constraints.md#target-location-constraint
π requirements/Functional/Operations/Behaviors.md#element-ordering-behavior"];
class c68daf5bfafc5a05 systemRequirement;
click c68daf5bfafc5a05 "ElementManipulation.html#move-element-operation";
b9c9829782477a6c["Move File Operation
π requirements/Functional/Operations/Constraints.md#target-location-constraint"];
class b9c9829782477a6c systemRequirement;
click b9c9829782477a6c "ElementManipulation.html#move-file-operation";
f006550e707e055f["Relation Consistency Maintenance"];
class f006550e707e055f systemRequirement;
click f006550e707e055f "ElementManipulation.html#relation-consistency-maintenance";
8f31bcc56d19f6e9["Rename Element Operation"];
class 8f31bcc56d19f6e9 systemRequirement;
click 8f31bcc56d19f6e9 "ElementManipulation.html#rename-element-operation";
9cdb6297e49a3802["Target Location Validation and Auto-Creation
π requirements/Functional/Core/Specifications.md#git-repository-scope-specification"];
class 9cdb6297e49a3802 systemRequirement;
click 9cdb6297e49a3802 "ElementManipulation.html#target-location-validation-and-auto-creation";
end
subgraph 7c2e7eef0051f760["π Specifications.md"]
3c85593db589fd04["Create Element Workflow Specification"];
class 3c85593db589fd04 default;
click 3c85593db589fd04 "Specifications.html#create-element-workflow-specification";
bc1f889f5f12a980["Delete Element Workflow Specification"];
class bc1f889f5f12a980 default;
click bc1f889f5f12a980 "Specifications.html#delete-element-workflow-specification";
9a6c593ffee9a214["Merge Element Workflow Specification"];
class 9a6c593ffee9a214 default;
click 9a6c593ffee9a214 "Specifications.html#merge-element-workflow-specification";
c75283445bce637a["Move Element Workflow Specification"];
class c75283445bce637a default;
click c75283445bce637a "Specifications.html#move-element-workflow-specification";
4366fe5150f6d7c2["Orphaned Children Error Message Specification"];
class 4366fe5150f6d7c2 default;
click 4366fe5150f6d7c2 "Specifications.html#orphaned-children-error-message-specification";
86e301b42cc16d0d["Relation Validation Specification"];
class 86e301b42cc16d0d default;
click 86e301b42cc16d0d "Specifications.html#relation-validation-specification";
end
end
subgraph 75874bcc96c01d2f["π requirements/Functional/Operations/Verifications"]
subgraph 264302f069db5bdb["π ElementManipulationVerifications.md"]
221f6c008823a4d0["Create Element Override Test
π requirements/Functional/Operations/Behaviors.md#create-element-override-behavior"];
class 221f6c008823a4d0 verification;
click 221f6c008823a4d0 "Verifications/ElementManipulationVerifications.html#create-element-override-test";
d5bf7d0addaf6d19["Create Element Test"];
class d5bf7d0addaf6d19 verification;
click d5bf7d0addaf6d19 "Verifications/ElementManipulationVerifications.html#create-element-test";
bfd28e1e74918526["Delete Element Test"];
class bfd28e1e74918526 verification;
click bfd28e1e74918526 "Verifications/ElementManipulationVerifications.html#delete-element-test";
362774efb36e2279["File Persistence Test
π requirements/Functional/Operations/Behaviors.md#element-ordering-behavior"];
class 362774efb36e2279 verification;
click 362774efb36e2279 "Verifications/ElementManipulationVerifications.html#file-persistence-test";
c7b35d6963f1017["Merge Elements Test"];
class c7b35d6963f1017 verification;
click c7b35d6963f1017 "Verifications/ElementManipulationVerifications.html#merge-elements-test";
9ae2cd53e62b6a33["Move Element Test"];
class 9ae2cd53e62b6a33 verification;
click 9ae2cd53e62b6a33 "Verifications/ElementManipulationVerifications.html#move-element-test";
af599fec38b8c0bf["Move File Squash Test"];
class af599fec38b8c0bf verification;
click af599fec38b8c0bf "Verifications/ElementManipulationVerifications.html#move-file-squash-test";
81422a9a6525acd7["Relation Consistency Test"];
class 81422a9a6525acd7 verification;
click 81422a9a6525acd7 "Verifications/ElementManipulationVerifications.html#relation-consistency-test";
c0a8cdea5e5972df["Target Location Validation Test"];
class c0a8cdea5e5972df verification;
click c0a8cdea5e5972df "Verifications/ElementManipulationVerifications.html#target-location-validation-test";
end
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";
end
end
25bf5cc42f41e395["cli.rs"];
class 25bf5cc42f41e395 default;
click 25bf5cc42f41e395 "../../../cli/src/cli.rs";
bf9a2f73b67492b9 -->|satisfiedBy| 25bf5cc42f41e395;
993c12e82435a78e["crud.rs"];
class 993c12e82435a78e default;
click 993c12e82435a78e "../../../core/src/crud.rs";
bf9a2f73b67492b9 -->|satisfiedBy| 993c12e82435a78e;
d07e49b06be4058e["diff.rs"];
class d07e49b06be4058e default;
click d07e49b06be4058e "../../../core/src/diff.rs";
bf9a2f73b67492b9 -->|satisfiedBy| d07e49b06be4058e;
95cf526671ec752c["graph_registry.rs"];
class 95cf526671ec752c default;
click 95cf526671ec752c "../../../core/src/graph_registry.rs";
bf9a2f73b67492b9 -->|satisfiedBy| 95cf526671ec752c;
35bd98d101f36b62["parser.rs"];
class 35bd98d101f36b62 default;
click 35bd98d101f36b62 "../../../core/src/parser.rs";
bf9a2f73b67492b9 -->|satisfiedBy| 35bd98d101f36b62;
bdf9762d399478a5["utils.rs"];
class bdf9762d399478a5 default;
click bdf9762d399478a5 "../../../core/src/utils.rs";
bf9a2f73b67492b9 -->|satisfiedBy| bdf9762d399478a5;
bf9a2f73b67492b9 -->|satisfiedBy| 40714cbda978a508;
bf9a2f73b67492b9 -->|satisfiedBy| 3c85593db589fd04;
bf9a2f73b67492b9 -->|satisfiedBy| 86e301b42cc16d0d;
bf9a2f73b67492b9 -.->|verifiedBy| 221f6c008823a4d0;
bf9a2f73b67492b9 -.->|verifiedBy| d5bf7d0addaf6d19;
591265fa14ecd72d -->|satisfiedBy| 25bf5cc42f41e395;
591265fa14ecd72d -->|satisfiedBy| 993c12e82435a78e;
591265fa14ecd72d -->|satisfiedBy| d07e49b06be4058e;
591265fa14ecd72d -->|satisfiedBy| 95cf526671ec752c;
591265fa14ecd72d -->|satisfiedBy| bc1f889f5f12a980;
591265fa14ecd72d -->|satisfiedBy| 4366fe5150f6d7c2;
591265fa14ecd72d -.->|verifiedBy| bfd28e1e74918526;
cab861a199d11c3c -->|satisfiedBy| 993c12e82435a78e;
cab861a199d11c3c -->|satisfiedBy| 95cf526671ec752c;
cab861a199d11c3c -.->|verifiedBy| 362774efb36e2279;
cab861a199d11c3c -.->|verifiedBy| c89bd750e0ad5b9d;
451abcac00b45de4 -->|satisfiedBy| 993c12e82435a78e;
451abcac00b45de4 -->|satisfiedBy| d07e49b06be4058e;
451abcac00b45de4 -->|satisfiedBy| 95cf526671ec752c;
451abcac00b45de4 -->|satisfiedBy| 2a2729a903e6692f;
451abcac00b45de4 -->|satisfiedBy| 3e506d76554b3740;
451abcac00b45de4 -->|satisfiedBy| 9a6c593ffee9a214;
451abcac00b45de4 -.->|verifiedBy| c7b35d6963f1017;
c68daf5bfafc5a05 -->|satisfiedBy| 25bf5cc42f41e395;
c68daf5bfafc5a05 -->|satisfiedBy| 993c12e82435a78e;
c68daf5bfafc5a05 -->|satisfiedBy| d07e49b06be4058e;
c68daf5bfafc5a05 -->|satisfiedBy| 95cf526671ec752c;
c68daf5bfafc5a05 -->|satisfiedBy| c75283445bce637a;
c68daf5bfafc5a05 -.->|verifiedBy| 9ae2cd53e62b6a33;
b9c9829782477a6c -.->|verifiedBy| af599fec38b8c0bf;
f006550e707e055f -->|satisfiedBy| 95cf526671ec752c;
f006550e707e055f -.->|verifiedBy| 81422a9a6525acd7;
8f31bcc56d19f6e9 -->|satisfiedBy| 993c12e82435a78e;
8f31bcc56d19f6e9 -->|satisfiedBy| d07e49b06be4058e;
8f31bcc56d19f6e9 -->|satisfiedBy| 95cf526671ec752c;
9cdb6297e49a3802 -->|satisfiedBy| 95cf526671ec752c;
9cdb6297e49a3802 -->|satisfiedBy| bdf9762d399478a5;
9cdb6297e49a3802 -->|satisfiedBy| 1dc0e8b76789ffce;
9cdb6297e49a3802 -.->|verifiedBy| c0a8cdea5e5972df;
7f91546dcec3d680["test.sh"];
class 7f91546dcec3d680 default;
click 7f91546dcec3d680 "../../../tests/test-crud-manipulation/test.sh";
d5bf7d0addaf6d19 -->|satisfiedBy| 7f91546dcec3d680;
bfd28e1e74918526 -->|satisfiedBy| 7f91546dcec3d680;
3ca44151e0210bb1["test.sh"];
class 3ca44151e0210bb1 default;
click 3ca44151e0210bb1 "../../../tests/test-crud-file-persistence/test.sh";
362774efb36e2279 -->|satisfiedBy| 3ca44151e0210bb1;
81623fde4ecde03d["test.sh"];
class 81623fde4ecde03d default;
click 81623fde4ecde03d "../../../tests/test-element-ordering/test.sh";
c89bd750e0ad5b9d -->|satisfiedBy| 81623fde4ecde03d;
99e20055749fc61e["test.sh"];
class 99e20055749fc61e default;
click 99e20055749fc61e "../../../tests/test-crud-empty-file-cleanup/test.sh";
9ae2cd53e62b6a33 -->|satisfiedBy| 99e20055749fc61e;
9ae2cd53e62b6a33 -->|satisfiedBy| 7f91546dcec3d680;
6d7253e029455f50["test.sh"];
class 6d7253e029455f50 default;
click 6d7253e029455f50 "../../../tests/test-crud-mv-file-squash/test.sh";
af599fec38b8c0bf -->|satisfiedBy| 6d7253e029455f50;
87a76fd329b99a81["test.sh"];
class 87a76fd329b99a81 default;
click 87a76fd329b99a81 "../../../tests/test-crud-relation-consistency/test.sh";
81422a9a6525acd7 -->|satisfiedBy| 87a76fd329b99a81;
cf7b1e3aeef95d4["test.sh"];
class cf7b1e3aeef95d4 default;
click cf7b1e3aeef95d4 "../../../tests/test-crud-target-location-validation/test.sh";
c0a8cdea5e5972df -->|satisfiedBy| cf7b1e3aeef95d4;
Create Element Operation
The system shall provide the capability to create new model elements by accepting a full element definition string in Markdown format, validating the element structure and relations, and inserting it into the target file.
Metadata
Attachments
Relations
Delete Element Operation
The system shall provide the capability to delete existing model elements while automatically removing or updating all relations that reference the deleted element, and removing empty files when no elements remain.
Metadata
Relations
Element Manipulation File Persistence
The system shall persist all element manipulation operations to the source files in storage, synchronizing changes from the in-memory model to the file system and reordering elements following the Element Ordering Behavior.
Metadata
Attachments
Relations
Merge Element Operation
The system shall provide the capability to merge multiple source elements into a target element, consolidating content, relations, and attachments while enforcing type compatibility and removing source elements after successful merge.
Metadata
Relations
Move Element Operation
The system shall provide the capability to move existing model elements to different file locations while automatically updating all relations that reference the moved element, creating target files if needed, and removing empty source files when no elements remain.
Metadata
Attachments
Relations
Move File Operation
The system shall provide the capability to move entire specification files with all their elements to a new location in the repository while updating all relation references throughout the model.
Details
When moving a file, the system shall:
- Accept source file path (relative to git repository root)
- Accept target file path (relative to git repository root)
- Accept optional squashing flag
- Validate both source and target paths
- Move the physical file from source to target location
- Update all element identifiers within the file to reflect the new file path
- Update all relation references (both forward and backward) throughout the model that point to any element in the moved file
- Preserve all file content, structure, and formatting
- Provide updates report following Diff Output Format Specification
The system shall reject the operation with a clear error message if:
- The source file does not exist
- The target file already exists (unless βsquash flag is provided)
- The source or target paths fail validation
Squash Mode Behavior:
When the βsquash flag is provided and the target file already exists, the system shall:
- Move all elements from the source file to the target end of file
- Remove the source file after all elements have been successfully moved
- Preserve element ordering from the source file when inserting into target section
Metadata
Attachments
Relations
Relation Consistency Maintenance
The system shall maintain bidirectional relation consistency when elements are manipulated, ensuring that forward and backward relations remain synchronized.
Details
When manipulating elements, the system shall ensure:
- If element A derives from element B, then B must have a derive relation to A
- If element A is verified by verification V, then V must have a verify relation to A
- When an element is deleted, both forward and backward relations are removed
- When an element is moved, both forward and backward relations are updated
- After any manipulation operation, the model remains in a valid state with no dangling relations
Validation:
- The system shall validate relation consistency after each manipulation operation
- The system shall report any inconsistencies detected during manipulation
- The system shall prevent operations that would leave the model in an inconsistent state
Metadata
Relations
Rename Element Operation
The system shall provide the capability to rename existing model elements by changing their heading text while updating all relation references and the registry.
Details
When renaming an element, the system shall:
- Accept the current element name and the new element name
- Validate that the current element exists in the model registry
- Validate that the new name is globally unique in the model registry
- Update the elementβs heading text in the markdown file
- Update all relation references (both forward and backward) to use the new element identifier
- Update the element identifier in the registry
- Provide updates report following Diff Output Format Specification
The system shall reject the operation with a clear error message if:
- The element does not exist
- The new name conflicts with an existing element
Metadata
Relations
Target Location Validation and Auto-Creation
The system shall validate target file paths for element manipulation operations and automatically create files when they do not exist, subject to path safety constraints.
Details
The system shall define target location validation constraints.
Metadata
Attachments
Relations