-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmulti-judge-majority.yaml
More file actions
104 lines (87 loc) · 3.29 KB
/
multi-judge-majority.yaml
File metadata and controls
104 lines (87 loc) · 3.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
apiVersion: 100monkeys.ai/v1
kind: Workflow
metadata:
name: "multi-judge-majority"
version: "1.0.0"
description: "Multi-judge consensus using majority vote strategy"
spec:
context:
design_proposal: |
# Feature: Dark Mode
Add a dark mode toggle to the UI with system preference detection.
- Use CSS variables for easy theming
- Persist user preference in localStorage
- Smooth transition animations
initial_state: APPROVAL_VOTE
states:
APPROVAL_VOTE:
kind: ParallelAgents
agents:
# Product Manager: Evaluates product fit
- agent: "basic-judge"
input: |
As a product manager, evaluate this design proposal:
{{workflow.context.design_proposal}}
Score 0.8+ if it meets product requirements.
weight: 1.0
timeout_seconds: 60
# Tech Lead: Evaluates technical feasibility
- agent: "basic-judge"
input: |
As a tech lead, evaluate this design proposal:
{{workflow.context.design_proposal}}
Score 0.8+ if it's technically sound.
weight: 1.0
timeout_seconds: 60
# UX Designer: Evaluates user experience
- agent: "basic-judge"
input: |
As a UX designer, evaluate this design proposal:
{{workflow.context.design_proposal}}
Score 0.8+ if it provides good UX.
weight: 1.0
timeout_seconds: 60
consensus:
strategy: majority # Binary vote: pass (>= threshold) or fail (< threshold)
threshold: 0.8 # Score >= 0.8 counts as "approve"
min_judges_required: 3 # All 3 must vote (no abstentions)
transitions:
# Majority approved (final_score = 1.0 means majority passed)
- condition: score_above
threshold: 0.5
target: APPROVED
# Majority rejected (final_score = 0.0 means majority failed)
- condition: score_below
threshold: 0.5
target: REJECTED
# Tie (final_score = 0.5 means equal pass/fail votes)
- condition: score_between
min: 0.4
max: 0.6
target: TIE_BREAKER
APPROVED:
kind: System
command: "echo"
env:
MESSAGE: "✅ Design approved by majority vote"
PASS_VOTES: "{{APPROVAL_VOTE.consensus.metadata.pass_votes}}"
FAIL_VOTES: "{{APPROVAL_VOTE.consensus.metadata.fail_votes}}"
FINAL_SCORE: "{{APPROVAL_VOTE.consensus.score}}"
transitions: []
REJECTED:
kind: System
command: "echo"
env:
MESSAGE: "❌ Design rejected by majority vote"
PASS_VOTES: "{{APPROVAL_VOTE.consensus.metadata.pass_votes}}"
FAIL_VOTES: "{{APPROVAL_VOTE.consensus.metadata.fail_votes}}"
FINAL_SCORE: "{{APPROVAL_VOTE.consensus.score}}"
transitions: []
TIE_BREAKER:
kind: System
command: "echo"
env:
MESSAGE: "⚖️ Tie vote - escalating to leadership"
PASS_VOTES: "{{APPROVAL_VOTE.consensus.metadata.pass_votes}}"
FAIL_VOTES: "{{APPROVAL_VOTE.consensus.metadata.fail_votes}}"
transitions: []