101 lines
2.4 KiB
Plaintext
101 lines
2.4 KiB
Plaintext
@startuml Turn Execution Sequence
|
|
!theme plain
|
|
skinparam sequenceMessageAlign center
|
|
skinparam responseMessageBelowArrow true
|
|
|
|
title Discussion Turn Execution
|
|
|
|
actor User
|
|
participant "CLI" as CLI
|
|
participant "Runner" as Runner
|
|
participant "discussion-parser" as Parser
|
|
participant "discussion-mention-router" as Router
|
|
participant "discussion-{participant}" as Participant
|
|
participant "discussion-turn-appender" as Appender
|
|
participant "discussion-vote-counter" as VoteCounter
|
|
participant "discussion-status-promoter" as Promoter
|
|
database "discussion.md" as File
|
|
|
|
User -> CLI: discussions turn file.md @architect @security
|
|
activate CLI
|
|
|
|
CLI -> Runner: run_pipeline_turn(path, participants)
|
|
activate Runner
|
|
|
|
Runner -> File: read content
|
|
File --> Runner: markdown content
|
|
|
|
== Step 1: Parse Discussion ==
|
|
|
|
Runner -> Parser: stdin: markdown content
|
|
activate Parser
|
|
Parser --> Runner: JSON (metadata, comments, votes)
|
|
deactivate Parser
|
|
|
|
== Step 2: Route Mentions (if no participants specified) ==
|
|
|
|
alt participants not specified
|
|
Runner -> Router: stdin: parser JSON
|
|
activate Router
|
|
Router --> Runner: JSON (participants_to_call)
|
|
deactivate Router
|
|
end
|
|
|
|
== Step 3: Call Participants (parallel) ==
|
|
|
|
par for each participant
|
|
Runner -> Participant: stdin: markdown, --callout
|
|
activate Participant
|
|
note right of Participant
|
|
AI generates response
|
|
based on discussion
|
|
and phase context
|
|
end note
|
|
Participant --> Runner: JSON {comment, vote}
|
|
deactivate Participant
|
|
end
|
|
|
|
== Step 4: Append Responses ==
|
|
|
|
Runner -> Appender: stdin: markdown + responses JSON
|
|
activate Appender
|
|
Appender --> Runner: updated markdown
|
|
deactivate Appender
|
|
|
|
Runner -> File: write updated content
|
|
|
|
== Step 5: Count Votes (if voting phase) ==
|
|
|
|
alt phase has voting enabled
|
|
Runner -> Parser: stdin: updated markdown
|
|
activate Parser
|
|
Parser --> Runner: JSON
|
|
deactivate Parser
|
|
|
|
Runner -> VoteCounter: stdin: parser JSON
|
|
activate VoteCounter
|
|
VoteCounter --> Runner: JSON (vote_summary, consensus)
|
|
deactivate VoteCounter
|
|
end
|
|
|
|
== Step 6: Check Status Promotion ==
|
|
|
|
alt voting phase with consensus
|
|
Runner -> Promoter: stdin: vote-counter JSON
|
|
activate Promoter
|
|
Promoter --> Runner: JSON (should_promote, new_status)
|
|
deactivate Promoter
|
|
|
|
opt should_promote = true
|
|
Runner -> File: update status header
|
|
end
|
|
end
|
|
|
|
Runner --> CLI: TurnResult
|
|
deactivate Runner
|
|
|
|
CLI --> User: Summary (responses, votes, consensus)
|
|
deactivate CLI
|
|
|
|
@enduml
|