Ok, we like the idea, even if all this is going to be very complex!
Let's say we create two new commands !startsub/!endsub which are used to mark subpart of a PlantUML diagram.
(Note that we used exclamation mark here, and not arobase)
file1.puml:
@startuml
A -> A : stuff1
!startsub BASIC
B -> B : stuff2
!endsub
C -> C : stuff3
!startsub BASIC
D -> D : stuff4
!endsub
@enduml
This file file1.puml would be rendered exactly as if it were:
@startuml
A -> A : stuff1
B -> B : stuff2
C -> C : stuff3
D -> D : stuff4
@enduml
which is your need, if I understand correctly
However, this would allow you to have another file2.puml like this:
@startuml
title this contains only B and D
!includesub file1.puml!BASIC
@enduml
This file would be rendered exactly as if:
@startuml
title this contains only B and D
B -> B : stuff2
D -> D : stuff4
@enduml
Do we have correctly get the needs ?
Thanks