title: Voting Models description: Thresholds, consensus, and multi-stage votes.
Guardrails supports threshold-based voting out of the box. Each step has a threshold — the minimum number of approvals required to complete the step.
Flow::make()->anyOfRoles(['architect'])->signedBy(3, 'Architecture Vote')->build();Flow::make()
->anyOfRoles(['architect'])
->signedBy(2, 'Quorum') // at least 2 must sign
->anyOfRoles(['architect'])
->signedBy(3, 'Majority') // then total 3 approvals
->build();Flow::make()
->anyOfRoles(['eng_manager','design_manager'])
->signedBy(2, 'Eng+Design Vote')
->build();Notes
- Each signature is stored with the
signer_id(approver user id) and an optionalcomment. - Initiator can be included/preapproved; set
includeInitiator(true, true)on the builder or step meta.