# Interface IHigherOrderVoting

Interface for Opinion-Wise higher-order voting.

interface IHigherOrderVoting {
aggregateWithCorrelation(
votes: ReadonlyMap<
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;
},
>,
correlationMatrix: CorrelationMatrix,
): HigherOrderVotingResult;
estimateCorrelation(tracker: ICorrelationTracker): CorrelationMatrix;
computeISP(
votes: ReadonlyMap<
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;
},
>,
independentSubsets: readonly IndependentSubset[],
): HigherOrderVotingResult;
aggregate(
votes: ReadonlyMap<
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;
},
>,
tracker: ICorrelationTracker,
): HigherOrderVotingResult;
getConfig(): HigherOrderVotingConfig;
}

#### Implemented by

- OWVoting

- Defined in packages/nexus-agents/src/consensus/higher-order-types.ts:322

##### Index

### Methods

aggregateWithCorrelation
estimateCorrelation
computeISP
aggregate
getConfig

## Methods

### aggregateWithCorrelation

- aggregateWithCorrelation(
  votes: ReadonlyMap<
  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;
  },
  >,
  correlationMatrix: CorrelationMatrix,
  ): HigherOrderVotingResult

  Aggregate votes using Bayesian correlation-aware method.

  #### Parameters

  - votes: ReadonlyMap<
    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;
    },
    >
  - correlationMatrix: CorrelationMatrix

  #### Returns HigherOrderVotingResult

  - Defined in packages/nexus-agents/src/consensus/higher-order-types.ts:326

### estimateCorrelation

- estimateCorrelation(tracker: ICorrelationTracker): CorrelationMatrix

  Estimate correlation matrix from voting history.

  #### Parameters

  - tracker: ICorrelationTracker

  #### Returns CorrelationMatrix

  - Defined in packages/nexus-agents/src/consensus/higher-order-types.ts:334

### computeISP

- computeISP(
  votes: ReadonlyMap<
  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;
  },
  >,
  independentSubsets: readonly IndependentSubset[],
  ): HigherOrderVotingResult

  Compute result using Independent Subset Partition method.

  #### Parameters

  - votes: ReadonlyMap<
    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;
    },
    >
  - independentSubsets: readonly IndependentSubset[]

  #### Returns HigherOrderVotingResult

  - Defined in packages/nexus-agents/src/consensus/higher-order-types.ts:339

### aggregate

- aggregate(
  votes: ReadonlyMap<
  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;
  },
  >,
  tracker: ICorrelationTracker,
  ): HigherOrderVotingResult

  Full pipeline: estimate correlation, compute result.

  #### Parameters

  - votes: ReadonlyMap<
    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;
    },
    >
  - tracker: ICorrelationTracker

  #### Returns HigherOrderVotingResult

  - Defined in packages/nexus-agents/src/consensus/higher-order-types.ts:347

### getConfig

- getConfig(): HigherOrderVotingConfig

  Get the current configuration.

  #### Returns HigherOrderVotingConfig

  - Defined in packages/nexus-agents/src/consensus/higher-order-types.ts:355