Skip to content

Bosun: kg_conflicts CLIPS rule pack for deterministic conflict detection over the fact layer #155

Description

@se-jo-ma

Context. stargraph's differentiator is deterministic, provenance-typed, replayable governance via CLIPS rules rather than LLM routers. MemGraphRAG's Conflict-Detection agent is an LLM scanning for conflicts — exactly the non-deterministic dependency stargraph exists to replace. Encoding ontology-constraint / logical-inconsistency checks as a signable Bosun rule pack delivers the consistency benefit while preserving auditability (a genuine improvement over the paper's design for the regulated/air-gapped market). Pairs with the conflict-driven-deltas issue (rules detect → deltas resolve).

Proposal. Author a kg_conflicts Bosun pack.

  • Own deftemplate carrying triple slots (subject/predicate/object/confidence) + provenance.
  • defrules asserting bosun.violation(kind 'logical-inconsistency') when two facts share (subject, predicate) but differ on object.
  • Reuse the fathom-matches user-function pattern (safety_pii/rules.clp:34) for regex/granularity checks. Sign + version per manifest.

Where.

  • New pack alongside src/stargraph/bosun/safety_pii/ (rules.clp + manifest.yaml); scaffold via harbor:new-pack; register via register_packs() hook (plugin/hookspecs.py:78).

CRITICAL slot-shape mismatch (must define own template). The EXISTING stargraph.evidence deftemplate (safety_pii/rules.clp:22-25) carries slots (run_id, step, text) — NOT subject/predicate/object. kg_promotion asserts subject/predicate/object/source to that same template name (kg_promotion.py:150-169) via assert_with_provenance, so today those slots would not match safety_pii rule patterns. The conflict pack must declare its own evidence-fact deftemplate.

Acceptance criteria.

  • Pack defines its own triple-carrying deftemplate; asserts bosun.violation on same-(subject,predicate) divergent-object facts.
  • Signed + versioned per manifest.

Caveats. Temporal rules over t_valid/t_invalid have no data yet; CLIPS over the full fact layer faces the O(n²) cost the paper flags.


Source: arXiv:2606.00610v1 — "MemGraphRAG: Memory-based Multi-Agent System for Graph Retrieval-Augmented Generation". Distilled from arXiv-research/2606.00610v1/analysis.md; file refs verified against current main by the analysis pass.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium priority: roadmap gap or DX/toolingarea/bosunBosun rule packs + signingenhancementNew feature or requestsize/M<2 days: multi-file feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions