b02e532563
Move flat docs/diagrams/*.puml into a hierarchy matching the source
package structure:
docs/diagrams/
├── bootstrap-sequence.puml (cross-cutting)
├── events-diagram.puml (cross-feature)
├── util/
│ ├── command-class-diagram.puml
│ ├── database-diagram.puml
│ ├── messages-class-diagram.puml
│ ├── broadcasts-class-diagram.puml
│ └── gui-class-diagram.puml
└── features/
├── team/
│ ├── team-class-diagram.puml
│ ├── team-config-class-diagram.puml
│ ├── builtin-commands-diagram.puml
│ ├── team-create-sequence.puml
│ ├── team-create-activity.puml
│ └── team-join-sequence.puml
├── player/
│ └── player-class-diagram.puml
└── moderation/
└── moderation-class-diagram.puml
README.md diagram index split into 4 sections (overview, util,
features/team, features/player, features/moderation) for readability;
all links updated. features.md auto-updated by sed for the new paths.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
70 lines
1.8 KiB
Plaintext
70 lines
1.8 KiB
Plaintext
@startuml team-create-sequence
|
|
title CR-Core — Create Team via command framework (sequence diagram)
|
|
|
|
actor Player
|
|
participant "BaseCommand\n(TeamCommand)" as Base
|
|
participant "SubCommand\n(TeamCreateSub)" as Sub
|
|
participant "TeamService" as Service
|
|
participant "TeamRepository" as Repo
|
|
participant "Team" as Team
|
|
|
|
Player -> Base : /team create <name> <tag> <color>
|
|
activate Base
|
|
|
|
Base -> Base : route args[0]="create" → TeamCreateSub
|
|
Base -> Base : check permission + playerOnly
|
|
Base -> Sub : buildContext(sender, label, subArgs)
|
|
activate Sub
|
|
Sub -> Sub : parse name (STRING) / tag (STRING) / color (enumOf TeamColor)
|
|
Sub --> Base : CommandContext
|
|
deactivate Sub
|
|
|
|
Base -> Sub : execute(ctx)
|
|
activate Sub
|
|
|
|
Sub -> Service : createTeam(name, tag, color, playerId)
|
|
activate Service
|
|
|
|
Service -> Service : validateName(name)
|
|
Service -> Repo : findByName(name)
|
|
activate Repo
|
|
Repo --> Service : Optional.empty()
|
|
deactivate Repo
|
|
|
|
Service -> Service : validateTag(tag)
|
|
Service -> Repo : findByTag(tag)
|
|
activate Repo
|
|
Repo --> Service : Optional.empty()
|
|
deactivate Repo
|
|
|
|
Service -> Service : validateLeader(playerId)
|
|
Service -> Repo : findByMember(playerId)
|
|
activate Repo
|
|
Repo --> Service : Optional.empty()
|
|
deactivate Repo
|
|
|
|
Service -> Team : newTeam(UUID.randomUUID(), name, tag, color, playerId, PRIVATE)
|
|
activate Team
|
|
Team -> Team : add newMember(playerId, LEADER)
|
|
Team --> Service : team
|
|
deactivate Team
|
|
|
|
Service -> Service : onBeforeSave(team)
|
|
Service -> Repo : save(team)
|
|
activate Repo
|
|
Repo --> Service : team
|
|
deactivate Repo
|
|
Service -> Service : onAfterCreate(team)
|
|
|
|
Service --> Sub : team
|
|
deactivate Service
|
|
|
|
Sub --> Base : CommandResult.success("Team created")
|
|
deactivate Sub
|
|
|
|
Base -> Base : handleResult → sender.sendMessage(green text)
|
|
Base --> Player : "Team <name> created"
|
|
deactivate Base
|
|
|
|
@enduml
|