Skip to content

CLI + agent tool surface for the conflict journal (read + resolve), per ADR-068 §6 #2537

Closed

Description

@malibio

Overview

ADR-068 replaced the _possible_duplicate boolean flag with a generic conflict journal — a local-only conflict table with real resolution lifecycle (dismiss / adopt-existing / merge). The backend is substantially built: packages/core/src/services/node_service/conflicts.rs has real list_conflicts, conflicts_for_node, resolve_conflict, merge_nodes, reconcile_conflicts methods, and packages/desktop-app/src-tauri/src/commands/conflicts.rs wraps them as Tauri commands for the desktop app.

There is currently no way for an agent — the in-app local agent or an external CLI-spawned agent (Claude Code, Codex, etc.) — to see or act on the conflict journal. Confirmed via grep: zero conflict-related commands in packages/cli/src/, zero conflict tool registered in packages/agent/src/local_agent/tools.rs, zero mention in packages/skill/SKILL.md. Today the journal is only reachable through the desktop Tauri command layer.

This is plumbing over an already-decided interface, not a new architectural decision — see ADR-068 §6 ("one journal, one surface, one dismiss mechanism," not scoped to any particular client) and §5 (the three resolution actions and their semantics, already fully specified). No ADR change is needed to add a second caller of methods ADR-068 already settled the shape of.

Why this matters

The project's stated interaction model treats the agent as the preferred interface. A mechanism that only a desktop UI can reach — one that, per ADR-068 §6, doesn't even exist yet as a dedicated Conflicts view — means conflicts are currently invisible to the primary interaction surface. This closes that gap without waiting on the desktop UI (S2) to land.

In scope

  • nodespace conflicts list [--status open|resolved|dismissed] [--kind unique_field_collision|collection_name_collision] [--node <id>] — calls list_conflicts/conflicts_for_node; table output plus a JSON form for agent consumption
  • nodespace conflicts show <conflict-id> — full record including detail and any prior resolution
  • nodespace conflicts dismiss <conflict-id> — calls resolve_conflict with dismiss
  • nodespace conflicts adopt <conflict-id> --keep <node-id> — calls resolve_conflict with adopt-existing
  • nodespace conflicts merge <conflict-id> --survivor <node-id> — calls merge_nodes; merge stays user/agent-initiated only per ADR-068 §5, this just adds a second initiating client
  • Register an equivalent tool (or tools) in packages/agent/src/local_agent/tools.rs so the in-app agent's ReAct loop can inspect and act on the journal, mirroring the CLI's read/act split
  • SKILL.md entry documenting the new subcommands/tool for external CLI-spawned agents

Explicitly out of scope

  • No new resolution semantics beyond what resolve_conflict/merge_nodes already implement — no CLI-only auto-merge heuristics, no bypassing "merge is user-initiated only"
  • No DuplicateReactiveCreate handling — stays out of scope per ADR-068 §4, same as every other slice
  • No change to the journal's storage, identity derivation, or table schema
  • Does not implement or block on the desktop Conflicts UI (S2) — independent of it, not a substitute
  • No default-on automation — no agent auto-dismissing or auto-merging without an explicit, per-invocation command

Acceptance criteria

  • nodespace conflicts list and show work against a local DB with real UniqueFieldCollision/CollectionNameCollision records (reuse fixtures from person_duplicate_convergence_test.rs / collection_name_convergence_test.rs)
  • dismiss, adopt, merge subcommands call the corresponding NodeService methods and surface results/errors clearly
  • JSON output stable enough for agent parsing
  • Agent tool(s) registered and callable from the ReAct loop, with descriptions matching the CLI's semantics — read tools unrestricted; resolve/merge tools framed as explicit, user/agent-initiated actions only
  • SKILL.md updated
  • No GitHub issue number or ADR number referenced in code comments or doc body, per this repo's documentation standard — describe behavior directly

References

  • ADR-068: nodespace-docs/decisions/068-convergence-conflicts-are-records-not-flags.md — §5 (resolution actions), §6 (one surface, not client-scoped)
  • Backend: packages/core/src/services/node_service/conflicts.rs
  • Existing Tauri wrapper (reference implementation for what to mirror): packages/desktop-app/src-tauri/src/commands/conflicts.rs

Activity

  1. malibio commented on Sep 9, 2026

    @malibio
    CollaboratorAuthor

    Frontend: 4909 passed (237 test files), Duration 83.71s

  2. self-assigned this
    on Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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