# Interface IVotingProtocol

Interface for the multi-round voting protocol. (Source: Issue #100, arXiv:2512.21352)

interface IVotingProtocol {
createSession(
topic: string,
committee: string[],
config?: Partial<VotingProtocolConfig>,
): VotingSession;
startAnalysisRound(sessionId: string): Promise<VotingRound>;
submitFindings(
sessionId: string,
agentId: string,
findings: {
agentId: string;
category:
| "security"
| "documentation"
| "design"
| "performance"
| "bug"
| "other"
| "style";
severity: "critical"
| "suggestion"
| "minor"
| "major";
description: string;
location?: string;
suggestion?: string;
confidence: number;
timestamp?: string;
}[],
): Promise<void>;
startDeliberationRound(sessionId: string): Promise<VotingRound>;
voteOnFinding(
sessionId: string,
vote: {
agentId: string;
findingId: string;
agree: boolean;
reasoning?: string;
amendedSeverity?: "critical" | "suggestion" | "minor" | "major";
},
): Promise<void>;
startConsensusRound(sessionId: string): Promise<VotingRound>;
submitFinalVote(
sessionId: string,
agentId: string,
vote: {
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;
},
): Promise<void>;
getResult(sessionId: string): Promise<VotingProtocolResult | null>;
detectSycophancy(sessionId: string): SycophancyReport;
getSession(sessionId: string): VotingSession | undefined;
}

#### Implemented by

- VotingProtocol

- Defined in packages/nexus-agents/src/consensus/types-voting-protocol.ts:172

##### Index

### Methods

createSession
startAnalysisRound
submitFindings
startDeliberationRound
voteOnFinding
startConsensusRound
submitFinalVote
getResult
detectSycophancy
getSession

## Methods

### createSession

- createSession(
  topic: string,
  committee: string[],
  config?: Partial<VotingProtocolConfig>,
  ): VotingSession

  Create a new voting session with a committee

  #### Parameters

  - topic: string
  - committee: string[]
  - `Optional` config: Partial<VotingProtocolConfig>

  #### Returns VotingSession

  - Defined in packages/nexus-agents/src/consensus/types-voting-protocol.ts:174

### startAnalysisRound

- startAnalysisRound(sessionId: string): Promise<VotingRound>

  Start the analysis round (Round 1)

  #### Parameters

  - sessionId: string

  #### Returns Promise<VotingRound>

  - Defined in packages/nexus-agents/src/consensus/types-voting-protocol.ts:181

### submitFindings

- submitFindings(
  sessionId: string,
  agentId: string,
  findings: {
  agentId: string;
  category:
  | "security"
  | "documentation"
  | "design"
  | "performance"
  | "bug"
  | "other"
  | "style";
  severity: "critical"
  | "suggestion"
  | "minor"
  | "major";
  description: string;
  location?: string;
  suggestion?: string;
  confidence: number;
  timestamp?: string;
  }[],
  ): Promise<void>

  Submit findings from an agent during analysis

  #### Parameters

  - sessionId: string
  - agentId: string
  - findings: {
    agentId: string;
    category:
    | "security"
    | "documentation"
    | "design"
    | "performance"
    | "bug"
    | "other"
    | "style";
    severity: "critical"
    | "suggestion"
    | "minor"
    | "major";
    description: string;
    location?: string;
    suggestion?: string;
    confidence: number;
    timestamp?: string;
    }[]

  #### Returns Promise<void>

  - Defined in packages/nexus-agents/src/consensus/types-voting-protocol.ts:184

### startDeliberationRound

- startDeliberationRound(sessionId: string): Promise<VotingRound>

  Start the deliberation round (Round 2)

  #### Parameters

  - sessionId: string

  #### Returns Promise<VotingRound>

  - Defined in packages/nexus-agents/src/consensus/types-voting-protocol.ts:187

### voteOnFinding

- voteOnFinding(
  sessionId: string,
  vote: {
  agentId: string;
  findingId: string;
  agree: boolean;
  reasoning?: string;
  amendedSeverity?: "critical" | "suggestion" | "minor" | "major";
  },
  ): Promise<void>

  Vote on findings during deliberation

  #### Parameters

  - sessionId: string
  - vote: {
    agentId: string;
    findingId: string;
    agree: boolean;
    reasoning?: string;
    amendedSeverity?: "critical" | "suggestion" | "minor" | "major";
    }

  #### Returns Promise<void>

  - Defined in packages/nexus-agents/src/consensus/types-voting-protocol.ts:190

### startConsensusRound

- startConsensusRound(sessionId: string): Promise<VotingRound>

  Start the consensus round (Round 3)

  #### Parameters

  - sessionId: string

  #### Returns Promise<VotingRound>

  - Defined in packages/nexus-agents/src/consensus/types-voting-protocol.ts:193

### submitFinalVote

- submitFinalVote(
  sessionId: string,
  agentId: string,
  vote: {
  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;
  },
  ): Promise<void>

  Submit final vote during consensus

  #### Parameters

  - sessionId: string
  - agentId: string
  - vote: {
    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;
    }

    - ##### decision: "approve" | "reject" | "abstain"

    - ##### reasoning: string

    - ##### confidence: number

    - ##### `Optional` conditions?: string[]

    - ##### `Optional` rejectionCategories?: (
      | "YAGNI"
      | "DRY_VIOLATION"
      | "OVER_ENGINEERING"
      | "SCOPE_CREEP"
      | "SECURITY_RISK"
      | "MISALIGNED"
      | "INSUFFICIENT_EVIDENCE"
      )[]

      Structured rejection categories for reject→refine→re-vote loops (Issue #1213).

    - ##### `Optional` 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;
      }[]

      Pre-verified PR-review findings (#2245 v4 follow-up). Optional; populated only when the voter emits the structured top-level array.

    - ##### `Optional` timestamp?: string

  #### Returns Promise<void>

  - Defined in packages/nexus-agents/src/consensus/types-voting-protocol.ts:196

### getResult

- getResult(sessionId: string): Promise<VotingProtocolResult | null>

  Get the final result (closes session if complete)

  #### Parameters

  - sessionId: string

  #### Returns Promise<VotingProtocolResult | null>

  - Defined in packages/nexus-agents/src/consensus/types-voting-protocol.ts:199

### detectSycophancy

- detectSycophancy(sessionId: string): SycophancyReport

  Check for sycophancy in the current round

  #### Parameters

  - sessionId: string

  #### Returns SycophancyReport

  - Defined in packages/nexus-agents/src/consensus/types-voting-protocol.ts:202

### getSession

- getSession(sessionId: string): VotingSession | undefined

  Get the current session state

  #### Parameters

  - sessionId: string

  #### Returns VotingSession | undefined

  - Defined in packages/nexus-agents/src/consensus/types-voting-protocol.ts:205