# Interface IVotingStrategy

Interface for voting strategy implementations.

interface IVotingStrategy {
algorithm:
| "simple_majority"
| "supermajority"
| "unanimous"
| "proof_of_learning"
| "opinion_wise"
| "higher_order";
calculateOutcome(
votes: Map<
string,
{
decision: "approve"
| "reject"
| "abstain";
reasoning: string;
confidence: number;
conditions?: string[];
rejectionCategories?: (
| "YAGNI"
| "DRY_VIOLATION"
| "OVER_ENGINEERING"
| "SCOPE_CREEP"
| "SECURITY_RISK"
| "MISALIGNED"
| "INSUFFICIENT_EVIDENCE"
)[];
findings?: {
summary: string;
location: string;
severity: "low"
| "medium"
| "high"
| "critical";
gate: {
reread_cited_line: "failed" | "skipped" | "passed";
traced_call_path: "failed" | "skipped" | "passed";
named_assertion: string;
ruled_out_language_non_issue: "failed" | "skipped" | "passed";
};
claim: string;
}[];
timestamp?: string;
},
>,
weights?: Map<string, number>,
): VotingOutcome;
}

#### Implemented by

- HigherOrderVotingStrategy
- OWVoting

- Defined in packages/nexus-agents/src/consensus/strategies.ts:21

##### Index

### Properties

algorithm

### Methods

calculateOutcome

## Properties

### `Readonly` algorithm

algorithm:
| "simple_majority"
| "supermajority"
| "unanimous"
| "proof_of_learning"
| "opinion_wise"
| "higher_order"

- Defined in packages/nexus-agents/src/consensus/strategies.ts:22

## Methods

### calculateOutcome

- calculateOutcome(
  votes: Map<
  string,
  {
  decision: "approve"
  | "reject"
  | "abstain";
  reasoning: string;
  confidence: number;
  conditions?: string[];
  rejectionCategories?: (
  | "YAGNI"
  | "DRY_VIOLATION"
  | "OVER_ENGINEERING"
  | "SCOPE_CREEP"
  | "SECURITY_RISK"
  | "MISALIGNED"
  | "INSUFFICIENT_EVIDENCE"
  )[];
  findings?: {
  summary: string;
  location: string;
  severity: "low"
  | "medium"
  | "high"
  | "critical";
  gate: {
  reread_cited_line: "failed" | "skipped" | "passed";
  traced_call_path: "failed" | "skipped" | "passed";
  named_assertion: string;
  ruled_out_language_non_issue: "failed" | "skipped" | "passed";
  };
  claim: string;
  }[];
  timestamp?: string;
  },
  >,
  weights?: Map<string, number>,
  ): VotingOutcome

  #### Parameters

  - votes: Map<
    string,
    {
    decision: "approve"
    | "reject"
    | "abstain";
    reasoning: string;
    confidence: number;
    conditions?: string[];
    rejectionCategories?: (
    | "YAGNI"
    | "DRY_VIOLATION"
    | "OVER_ENGINEERING"
    | "SCOPE_CREEP"
    | "SECURITY_RISK"
    | "MISALIGNED"
    | "INSUFFICIENT_EVIDENCE"
    )[];
    findings?: {
    summary: string;
    location: string;
    severity: "low"
    | "medium"
    | "high"
    | "critical";
    gate: {
    reread_cited_line: "failed" | "skipped" | "passed";
    traced_call_path: "failed" | "skipped" | "passed";
    named_assertion: string;
    ruled_out_language_non_issue: "failed" | "skipped" | "passed";
    };
    claim: string;
    }[];
    timestamp?: string;
    },
    >
  - `Optional` weights: Map<string, number>

  #### Returns VotingOutcome

  - Defined in packages/nexus-agents/src/consensus/strategies.ts:23