Skip to content

feat(conflicts): auto-resolve pipeline with deterministic-first + LLM fallback #249

Closed

Description

@hurttlocker

Summary

Improve conflict-resolution UX with an automatic planner/executor that prioritizes deterministic resolutions and only uses LLM for ambiguous cases.

New CLI

cortex conflicts --auto-resolve [--dry-run] [--threshold 0.85] [--json] [--llm provider/model]

Behavior

  1. Deterministic first (no LLM)
  • For same normalized subject+predicate conflicts where one fact is strictly newer and has higher confidence, auto-resolve deterministically.
  1. LLM fallback only for ambiguous cases
  • Only conflicts that fail deterministic criteria are sent to LLM resolver.
  1. Dry-run planning output
  • Show plan with reasoning before writes.
  1. JSON output contract
  • Include per resolution: {winner, loser, method: "deterministic"|"llm", reason}
  1. Cleanup integration
  • Wire into cleanup as --resolve-conflicts (works with --dry-run + --dedup-facts).

Constraints

  • Extend existing conflict detection/resolution paths; do not rewrite store conflict engine.
  • Preserve v1.0.x stability.

Acceptance

  • Deterministic/LLM split visible in output
  • --dry-run does no writes
  • go test ./... passes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions