Product 14 · SDK / CLI / MCP · Wave 2

Contradiction Detector

Agents accumulate beliefs, goals, and statements that silently conflict. Contradiction Detector keeps a local contradiction map, surfaces conflicting pairs, and tracks each one through open, resolved, or dismissed — so conflicts get reviewed instead of compounding.

Wave 2 · v0.1.1 · on npm
← Product 13: Cognitive Heat Monitor Next: Product 15 · Wave 2 High-Fidelity Witness →

Conflicts don't announce themselves. They compound.

Long-running agents accumulate state: beliefs written to memory, goals set early, statements made mid-session. Over time these drift into conflict — a goal that contradicts an earlier constraint, a belief asserted now that denies one stored before. Nothing in a typical runtime notices. Each new conflicting statement compounds the last, and the agent keeps reasoning on top of an inconsistent foundation.

By the time the inconsistency surfaces in a visibly wrong answer, the contradiction may be many turns old and hard to trace. There is usually no single place that holds the set of conflicts, no record of which were reviewed, and no way to mark one as genuinely resolved versus deliberately dismissed.

Contradiction Detector adds that place. It maintains a durable local map of detected contradictions and gives each one an explicit lifecycle — open until a human or the agent resolves or dismisses it — so conflicts are tracked and closed instead of silently accumulating.

Record → Review → Resolve

Conflicts are recorded into the map

Detected contradictions are stored as rows in the local contradictions table with a status. In the originating agent the detection upstream feeds this store; the productized tool exposes a record_contradiction write so any detector — yours or a Wave 1 source — can add a conflicting pair to the map with status open.

The agent reviews the map

Your agent or operator calls list_contradictions, optionally filtered by status and limit, to see open conflicts newest-first (GET /). Each entry carries the conflicting pair and metadata for review.

Each contradiction is resolved or dismissed

Call resolve_contradiction to mark a reviewed conflict resolved (PATCH /{id}/resolve), or dismiss_contradiction to mark it dismissed (PATCH /{id}/dismiss). The status change is durable, so the map reflects what has been handled.

Contradiction Detector is a decision-support layer. It surfaces and tracks conflicts; it does not decide which side is correct or auto-edit the agent's beliefs. There is no auto-resolution — the tool never picks a winning side, and it does not guarantee it finds every conflict in an agent's state.

Map, status lifecycle & review

Grounded in the originating agent's contradictions.py route, which serves the contradiction map and exposes status transitions. The route stores each contradiction as a row with a status and created_at, and supports filtering by status. The status lifecycle below is exact to source; the type taxonomy and severity that follow are proposed product framing (see the lineage note).

Status lifecycle Exact to source
StatusMeaningTransition
open Detected, not yet reviewed. Default state in the map. initial
resolved Reviewed and reconciled — one side corrected, or the conflict genuinely closed. PATCH /{id}/resolve
dismissed Reviewed and deliberately set aside as not a real conflict (or accepted tension). PATCH /{id}/dismiss
Contradiction types Proposed product framing

The source route is type-agnostic — it stores, lists, filters by status, and transitions. The typing below is layered on at productization and is not implemented in source.

TypeDescription
belief_vs_belief Two stored beliefs that cannot both hold.
goal_vs_constraint A goal that conflicts with an earlier constraint or guardrail.
statement_vs_memory A current statement that denies something stored in memory.
identity_inconsistency A claim that conflicts with the agent's recorded identity/state.
Severity Proposed — not shipped
FieldStatus
severity A low / medium / high field proposed at productization to prioritize the map. The originating agent's route does not currently store severity — treat it as a planned field, not a shipped one.

Resolution paths: resolve (reconcile and close), dismiss (set aside), or leave open for human review. There is no auto-resolution — the tool never picks a winning side.

Lineage note. The map, status filtering, and the resolve / dismiss lifecycle are exactly what the originating agent's contradictions.py route ships today. The contradiction-type taxonomy and the severity field are proposed product framing layered on a deliberately simple, type-agnostic store — they are not yet implemented in source.

MCP tools

The MCP tools below ship in the published package (v0.1.1). They were extracted from what the originating agent's contradictions.py route exposes today.

Map
list_contradictions
List contradictions newest-first, optionally filtered by status (open / resolved / dismissed) and limit (GET /).
record_contradiction
Add a detected conflicting pair to the local map with status open — a productized write over the store.
Lifecycle
resolve_contradiction
Mark a contradiction resolved by id (PATCH /{id}/resolve).
dismiss_contradiction
Mark a contradiction dismissed by id (PATCH /{id}/dismiss).
More tools in the package
get_contradiction
Fetch one contradiction by id with its conflicting pair, status, and metadata.
get_contradiction_summary
Return total / open / resolved / dismissed counts over the local map.

Install

Contradiction Detector is a CertaWorks Wave 2 product — built, tested, and published on npm. The commands below install the package — an SDK, a CLI, and an MCP server, consistent with the rest of the suite — so you can see exactly what it exposes.

Running it, or want to help shape what comes next? Use the feedback form below.

Status — published on npm (v0.1.1)

The package @certaworks/contradiction-detector is live on npm. Install it globally, or point your MCP client at it with the config below (its MCP server command is contradiction-detector-mcp).

npm package
npm install -g @certaworks/contradiction-detector
Claude Desktop config
{
  "mcpServers": {
    "contradiction-detector": {
      "command": "npx",
      "args": ["-y", "-p", "@certaworks/contradiction-detector", "contradiction-detector-mcp"]
    }
  }
}

What Contradiction Detector does and does not do

Does
  • Maintain a durable local map of detected contradictions
  • List conflicts newest-first with status and limit filtering
  • Track each contradiction through open / resolved / dismissed
  • Provide SDK, CLI, and MCP server surfaces
  • Keep all state local
Does Not
  • Decide which side of a conflict is correct
  • Auto-edit, delete, or overwrite the agent's beliefs or goals
  • Guarantee it finds every conflict in an agent's state
  • Replace human review of the agent's reasoning
  • Provide hosted storage, team accounts, or managed alerting (roadmap)

Using Contradiction Detector? Tell us how it goes

Contradiction Detector is part of CertaWorks Wave 2 — a second set of built tools productized from a working cognitive agent. It's on npm now. Tell us what you're running it against, what broke, or what you'd want next — we read every note.

← Product 13: Cognitive Heat Monitor Next: Product 15 · Wave 2 High-Fidelity Witness →