Skip to content

Commit e284885

Browse files
rysweetUbuntuclaude
authored
feat(skills): Add consensus-voting skill for multi-agent decisions (#1620)
* feat(skills): Add consensus-voting skill for multi-agent decisions Add new skill for weighted multi-agent voting: - Invokes multiple agents in parallel for critical decisions - Weighted voting based on domain expertise - Auto-triggers for security, auth, data-handling - Three modes: supermajority (66%), simple-majority (50%), unanimous - Integrates with debate-workflow and n-version-workflow Part of Issue #1611 Enhancement 10 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix(skill): Remove unimplemented adaptive calibration from consensus-voting Removes references to "adaptive" weight calibration mode that was documented but never implemented, violating Zero-BS philosophy (no stubs/placeholders). Keeps only the implemented "static" calibration mode. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Ubuntu <azureuser@amplihack2.yb0a3bvkdghunmsjr4s3fnfhra.phxx.internal.cloudapp.net> Co-authored-by: Claude <noreply@anthropic.com>
1 parent 06848d1 commit e284885

File tree

2 files changed

+547
-0
lines changed

2 files changed

+547
-0
lines changed
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
# Consensus Voting Skill
2+
3+
Multi-agent consensus voting with domain-weighted expertise for critical decisions.
4+
5+
## Quick Start
6+
7+
### Auto-Activation
8+
9+
The skill automatically activates when working with:
10+
11+
- Security implementations (authentication, authorization)
12+
- Encryption and cryptographic code
13+
- Sensitive data handling (PII, credentials)
14+
- Permission and access control changes
15+
16+
### Explicit Trigger
17+
18+
```bash
19+
/amplihack:consensus-vote "Should we use JWT or session cookies for auth?"
20+
```
21+
22+
Or invoke programmatically:
23+
24+
```python
25+
Skill(skill="consensus-voting")
26+
```
27+
28+
## How It Works
29+
30+
1. **Domain Detection** - Analyzes change to determine expertise area
31+
2. **Agent Selection** - Selects relevant agents with domain-specific weights
32+
3. **Voting** - Each agent votes with confidence level
33+
4. **Weighted Calculation** - Applies expertise weights to votes
34+
5. **Threshold Check** - Validates against voting mode (supermajority default)
35+
6. **Result Report** - Documents decision with reasoning and dissent
36+
37+
## Key Concept: Weighted Voting
38+
39+
Unlike simple majority voting, this skill weights votes by domain expertise:
40+
41+
| Domain | Top Expert (3x) | Strong (2x) | Standard (1x) |
42+
| --------- | --------------- | ----------------- | ---------------- |
43+
| Security | security | architect | reviewer, tester |
44+
| Auth | security | architect | reviewer, tester |
45+
| Data | security | architect | reviewer, tester |
46+
| Algorithm | optimizer | architect, tester | reviewer |
47+
48+
## When to Use vs Alternatives
49+
50+
| Scenario | Use This | Alternative |
51+
| ---------------------- | ---------------- | ------------------ |
52+
| Binary security choice | consensus-voting | - |
53+
| Complex trade-offs | - | debate-workflow |
54+
| Code generation | - | n-version-workflow |
55+
| Design exploration | - | debate-workflow |
56+
| Risk validation | consensus-voting | - |
57+
58+
## Voting Modes
59+
60+
- **supermajority** (66%+) - Default for security, requires strong consensus
61+
- **simple-majority** (50%+) - Faster decisions, lower bar
62+
- **unanimous** (100%) - Highest bar, all must agree
63+
64+
## Example Output
65+
66+
```markdown
67+
## Consensus Voting Result
68+
69+
**Decision:** Use argon2id for password hashing
70+
**Domain:** AUTH
71+
**Threshold:** Supermajority (66%+)
72+
**Result:** PASSED (68.2%)
73+
74+
### Vote Summary
75+
76+
| Agent | Weight | Vote | Confidence |
77+
| --------- | ------ | -------- | ---------- |
78+
| security | 2.5 | argon2id | HIGH |
79+
| architect | 2.0 | argon2id | MEDIUM |
80+
| reviewer | 1.5 | bcrypt | HIGH |
81+
| tester | 1.5 | argon2id | MEDIUM |
82+
83+
### Key Reasoning
84+
85+
- **security (2.5):** "OWASP current recommendation, memory-hard"
86+
87+
### Dissenting View
88+
89+
- **reviewer (1.5):** "bcrypt more battle-tested in production"
90+
```
91+
92+
## Integration
93+
94+
### With Debate Workflow
95+
96+
When voting fails to reach consensus, escalate:
97+
98+
```
99+
No consensus (52.1%) → Invoke debate-workflow
100+
```
101+
102+
### With N-Version Workflow
103+
104+
Use voting to select between N-version implementations:
105+
106+
```
107+
N-version → 3 implementations → Consensus vote → Winner
108+
```
109+
110+
## Files
111+
112+
- `SKILL.md` - Full skill definition with execution process
113+
- `README.md` - This documentation (usage guide)
114+
115+
## Philosophy Alignment
116+
117+
- **Evidence-Based:** All votes require reasoning
118+
- **Expertise-Weighted:** Domain knowledge matters
119+
- **Transparent:** Dissent documented, not hidden
120+
- **Appropriate Rigor:** Auto-triggers for high-risk domains

0 commit comments

Comments
 (0)