125 lines
3.1 KiB
Plaintext
125 lines
3.1 KiB
Plaintext
@startuml voting-system
|
|
!theme plain
|
|
title Feature Discussion Voting and Promotion System
|
|
|
|
start
|
|
|
|
:Discussion file updated;
|
|
|
|
partition "Vote Parsing (workflow.py)" {
|
|
:Read staged discussion.md content;
|
|
|
|
:Parse all lines matching:
|
|
**- ParticipantName: ... VOTE: VALUE**;
|
|
|
|
:Track latest vote per participant\n(most recent wins);
|
|
|
|
:Count eligible voters based on\n**allow_agent_votes** rule;
|
|
|
|
note right
|
|
**Vote Format:**
|
|
Name: ParticipantName
|
|
Comment text.
|
|
VOTE: READY
|
|
|
|
Name: AI_BotName
|
|
Comment.
|
|
VOTE: CHANGES
|
|
|
|
**Valid Values:**
|
|
- READY (approve)
|
|
- CHANGES (needs work)
|
|
- REJECT (block)
|
|
end note
|
|
}
|
|
|
|
partition "Promotion Logic (AI-powered)" {
|
|
:AI reads promotion_rule from header:
|
|
- allow_agent_votes: true/false
|
|
- ready_min_eligible_votes: N or "all"
|
|
- reject_min_eligible_votes: N or "all";
|
|
|
|
if (allow_agent_votes == false?) then (yes)
|
|
:Exclude voters with\nnames starting with "AI_";
|
|
endif
|
|
|
|
:Count eligible READY votes;
|
|
:Count eligible REJECT votes;
|
|
:Count CHANGES votes (neutral);
|
|
|
|
if (READY threshold met AND\nREJECT threshold NOT met?) then (yes)
|
|
if (Current stage == feature?) then (yes)
|
|
:Update status to\n**READY_FOR_DESIGN**;
|
|
:AI generates\ndesign.discussion.md;
|
|
else if (Current stage == design?) then (yes)
|
|
:Update status to\n**READY_FOR_IMPLEMENTATION**;
|
|
:AI generates\nimplementation.discussion.md;
|
|
else if (Current stage == implementation?) then (yes)
|
|
:Verify all checkboxes checked\nAND ≥1 human READY vote;
|
|
if (Requirements met?) then (yes)
|
|
:Update status to\n**READY_FOR_TESTING**;
|
|
:AI generates\ntesting discussion artefacts;
|
|
else
|
|
:Keep status **OPEN** (await more progress);
|
|
endif
|
|
else (review stage)
|
|
:Update status to\n**APPROVED**;
|
|
endif
|
|
else if (REJECT threshold met AND\nREADY threshold NOT met?) then (no)
|
|
if (Current stage == feature?) then (yes)
|
|
:Update status to\n**FEATURE_REJECTED**;
|
|
else if (Current stage == design?) then (yes)
|
|
:Update status to\n**DESIGN_REJECTED**;
|
|
else (other stages)
|
|
:Update status to\n**NEEDS_CHANGES**;
|
|
endif
|
|
else (no)
|
|
:Keep status as **OPEN** or **UNDER_REVIEW**;
|
|
endif
|
|
}
|
|
|
|
partition "Summary Update (summary.py)" {
|
|
:Update VOTES section in .sum.md;
|
|
note right
|
|
Example block written into the summary file:
|
|
<!-- SUMMARY:VOTES START -->
|
|
## Votes (latest per participant)
|
|
READY: X • CHANGES: Y • REJECT: Z
|
|
- Alice: READY
|
|
- Bob: CHANGES
|
|
<!-- SUMMARY:VOTES END -->
|
|
end note
|
|
|
|
:Auto-stage updated .sum.md file;
|
|
}
|
|
|
|
:Include in commit;
|
|
|
|
stop
|
|
|
|
legend bottom
|
|
Example Promotion Rules:
|
|
|
|
Simple Majority (2 approvals):
|
|
ready_min_eligible_votes: 2
|
|
reject_min_eligible_votes: 1
|
|
allow_agent_votes: false
|
|
|
|
Unanimous (everyone must approve):
|
|
ready_min_eligible_votes: "all"
|
|
reject_min_eligible_votes: 1
|
|
allow_agent_votes: false
|
|
|
|
Include AI votes:
|
|
ready_min_eligible_votes: 3
|
|
allow_agent_votes: true
|
|
|
|
Implementation human gate:
|
|
ready_min_eligible_votes: 1
|
|
allow_agent_votes: true
|
|
# workflow enforces ≥1 human READY
|
|
# and completion of all tasks
|
|
endlegend
|
|
|
|
@enduml
|