Debate Core Command Contract Proposal

Status

Pending approval. This file is a design proposal for the next debate-core command-contract pass, not the current implemented contract.

Problem

The current command contracts lag behind the current connector entity model.

The architectural problem is not just a missing field. The commands currently duplicate connector semantics in a thinner parallel shape, so the command layer drifts out of sync with the owned connector contracts.

Recommendation

Replace the current overloaded add-claim flow with connector-specific add-claim commands, and align connect commands with the owned connector create contracts.

Proposed command direction

import type { ConfidenceConnectorCreate, RelevanceConnectorCreate } from "./Connector.ts";
import type { ClaimCreate } from "./Claim.ts";

export interface AddConfidenceAttachedClaimCommand {
  type: "confidence/claim/add";
  claim: ClaimCreate;
  connector: Omit<ConfidenceConnectorCreate, "source">;
}

export interface AddRelevanceAttachedClaimCommand {
  type: "relevance/claim/add";
  claim: ClaimCreate;
  connector: Omit<RelevanceConnectorCreate, "source">;
}

export interface ConnectConfidenceCommand {
  type: "confidence/connect";
  connector: ConfidenceConnectorCreate;
}

export interface ConnectRelevanceCommand {
  type: "relevance/connect";
  connector: RelevanceConnectorCreate;
}

Why this shape

Execution semantics

Naming note

This proposal intentionally uses connector instead of connection in the command payload so the command contract directly references the owned entity shape.

Recommended cleanup in the same pass

Approval needed

Before implementation, approve or revise: