conflict-detector

L1-L4 conflict detection between a proposed T4 task and pending-confirm sibling tasks. L1 (file overlap) + L2 (function/region overlap) ship in v3.7.0-beta.2 as deterministic bash. L3 (semantic LLM) + L4 (architectural LLM) are stubbed for v3.7.0-rc.1.

Best use case

conflict-detector is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

L1-L4 conflict detection between a proposed T4 task and pending-confirm sibling tasks. L1 (file overlap) + L2 (function/region overlap) ship in v3.7.0-beta.2 as deterministic bash. L3 (semantic LLM) + L4 (architectural LLM) are stubbed for v3.7.0-rc.1.

Teams using conflict-detector should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/conflict-detector/SKILL.md --create-dirs "https://raw.githubusercontent.com/nguyenthienthanh/aura-frog/main/aura-frog/skills/conflict-detector/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/conflict-detector/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How conflict-detector Compares

Feature / Agentconflict-detectorStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

L1-L4 conflict detection between a proposed T4 task and pending-confirm sibling tasks. L1 (file overlap) + L2 (function/region overlap) ship in v3.7.0-beta.2 as deterministic bash. L3 (semantic LLM) + L4 (architectural LLM) are stubbed for v3.7.0-rc.1.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

> **AI-consumed reference.** Optimized for Claude to read during execution.
> Human-readable explanation: see [docs/architecture/HIERARCHICAL_PLANNING.md](../../../docs/architecture/HIERARCHICAL_PLANNING.md)
> or [docs/getting-started/](../../../docs/getting-started/) depending on topic.


# Conflict Detector

**STATUS — v3.7.0-beta.2.** L1+L2 functional; L3+L4 stubbed pending LLM-dispatch infrastructure in rc.1.

## Five conflict types (per spec §21.1)

```toon
types[5]{type,definition,detection_layer,cost}:
  C1,File-level overlap,L1,free
  C2,Function/region overlap,L2,cheap (~10ms regex)
  C3,Schema/contract conflict,L2,cheap
  C4,Semantic intent conflict,L3,LLM (stubbed in beta.2)
  C5,Architectural conflict,L4,LLM-rare (stubbed in beta.2)
```

## Layer dispatch (per spec §21.3)

```
ON dispatch_request(task):
    L1 = check-l1-files.sh         ← always run, free
    IF L1.overlap AND L1.confidence >= 0.95:
      RETURN conflict(L1)
    IF L1.overlap (low confidence):
      L2 = check-l2-syntactic.sh   ← drill into overlapping files
      IF L2.overlap:
        RETURN conflict(L2)

    IF task.tier <= 2 OR task.creates_new_pattern:
      L4 = check-architectural (LLM, stubbed)  ← skipped in beta.2
      IF L4.contradicts: RETURN conflict(L4)

    IF task.parent has any pending-confirm sibling:
      L3 = check-semantic (LLM, stubbed)       ← skipped in beta.2
      IF L3.contradicts: RETURN conflict(L3)

    RETURN clear
```

## Disable

Set `AF_CONFLICT_LLM_DISABLED=true` to short-circuit L3+L4 dispatch even after they land in rc.1+ — useful for cost-sensitive sessions. L1+L2 (deterministic bash) always run; the env var only affects the LLM-backed layers. In v3.7.0-beta.2 / rc.1 it is effectively a no-op because L3+L4 are already stubbed; documented for forward compatibility with v3.7.x patch releases.

## Behavior

1. Resolve proposed task's `artifacts[].path` from its plan node frontmatter
2. Resolve pending-confirm siblings (status: planned with parent T3 active, or status: blocked-on-confirm)
3. Run `scripts/conflicts/check-l1-files.sh` with task + siblings artifact lists
4. If L1 returns overlap with confidence < 0.95 OR file-overlap is ambiguous → run `check-l2-syntactic.sh` on the overlapping files
5. **L3 (semantic)**: in beta.2, return `{layer:L3, status:stubbed_for_rc1}`. In rc.1, dispatch an LLM call comparing intents; cache result in `conflict_cache.jsonl`.
6. **L4 (architectural)**: in beta.2, return `{layer:L4, status:stubbed_for_rc1}`. In rc.1, dispatch an LLM call comparing against `permanent_memory.md` decisions.
7. Append finding to `.claude/plans/conflicts.jsonl` (per spec §21.4) if conflict found

## Conflict record schema (.claude/plans/conflicts.jsonl)

```json
{
  "conflict_id": "CONFLICT-00007",
  "detected_at": "2026-05-07T10:30:00Z",
  "detected_by": "pre-dispatch-conflict-check.cjs",
  "layer": "L1",
  "type": "file_overlap",
  "participants": [{"task": "TASK-00125", "role": "proposed"},
                   {"task": "TASK-00120", "role": "pending-confirm"}],
  "overlap": {"files": ["src/auth.py"], "functions": null, "schema_elements": null},
  "confidence": 1.0,
  "arbitration": null,
  "actions_taken": [],
  "resolution": null,
  "resolved_at": null
}
```

`conflict-arbiter` agent fills in `arbitration` and `resolution` later.

## Latency targets (per spec §21.7)

```toon
latency[6]{layer,p95,hard_cap}:
  L1,<100ms,500ms
  L2,<300ms,1s
  L3 cached,<50ms,100ms
  L3 cold,<3s,10s (rc.1)
  L4 cached,<50ms,100ms
  L4 cold,<8s,20s (rc.1)
```

If hard cap hit: log warning, **proceed assuming conflict** (fail-safe — better to slow down than to silently overwrite).

## What this skill does NOT do

- Does NOT execute L3/L4 in beta.2 (stubs return placeholder findings)
- Does NOT mutate plan tree state (writes to conflicts.jsonl only; conflict-arbiter agent does the freeze/replan/escalate)
- Does NOT decide resolution (that's conflict-arbiter)
- Does NOT block tool calls directly (pre-dispatch-conflict-check hook does, based on this skill's findings)
- Does NOT cross project boundaries — per project, per .claude/plans/

## Tie-Ins

- **Spec:** §21 (full conflict detection)
- **Scripts:** `scripts/conflicts/check-l1-files.sh`, `scripts/conflicts/check-l2-syntactic.sh`
- **Agent:** `conflict-arbiter` — sole consumer of conflict findings (decides resolution)
- **Hook:** `hooks/pre-dispatch-conflict-check.cjs` — primary auto-trigger (PreToolUse)
- **Hook:** `hooks/post-execute-conflict-rescan.cjs` — re-runs detection on frozen tasks after blocker `done`
- **Command:** `/aura-frog:plan-conflicts` — manual list/show/resolve
- **Rule:** `rules/workflow/conflict-arbitration-policy.md` — arbiter decision table
- **Rule:** `rules/workflow/plan-lifecycle.md` — frozen state semantics + cascade
- **Future (rc.1):** L3/L4 LLM dispatchers + `conflict_cache.jsonl` LRU

Related Skills

extension-detector

14
from nguyenthienthanh/aura-frog

Detects when a new project-level skill / rule / command would reduce friction. Asks the user for confirmation before creating anything. NEVER writes plugin-level files — only `.claude/skills/`, `.claude/rules/`, `.claude/commands/` in the user's project.

agent-detector

14
from nguyenthienthanh/aura-frog

CRITICAL: MUST run for EVERY message. Detects agent, complexity, AND model automatically. Without this, tasks route to wrong agents and use wrong models, degrading quality and wasting tokens.

vue-expert

14
from nguyenthienthanh/aura-frog

Vue 3 gotchas and decision criteria. Covers reactivity traps, Composition API pitfalls, and Pinia patterns.

typescript-expert

14
from nguyenthienthanh/aura-frog

TypeScript gotchas and decision criteria covering nullish coalescing pitfalls (|| vs ??), strict tsconfig settings (noUncheckedIndexedAccess, exactOptionalPropertyTypes), type guard patterns, discriminated unions, and as const vs enum. Use when writing TypeScript, configuring tsconfig, implementing type guards, or debugging null/undefined errors.

tree-of-thoughts

14
from nguyenthienthanh/aura-frog

Branch, evaluate, prune, expand — structured search over solution space. Use for architecture with multi-step decisions, refactor planning, or complex debug hypothesis trees. Paper: Yao et al. 2023.

test-writer

14
from nguyenthienthanh/aura-frog

Write tests with TDD following structured patterns. Ensures consistent AAA structure, proper coverage targets, and framework-specific conventions. Without this skill, tests lack consistent naming, miss coverage targets, and skip anti-pattern checks.

stitch-design

14
from nguyenthienthanh/aura-frog

Generate UI designs using Google Stitch AI with optimized prompts

session-continuation

14
from nguyenthienthanh/aura-frog

Manage workflow state across sessions with handoff and resume. TOON-based state persistence.

sequential-thinking

14
from nguyenthienthanh/aura-frog

Structured thinking process for complex analysis. Supports revision, branching, and dynamic adjustment.

self-improve

14
from nguyenthienthanh/aura-frog

Apply learned improvements to the Aura Frog plugin. Updates rules, adjusts agent routing, modifies workflow configurations, and generates knowledge base entries.

self-healing-orchestrator

14
from nguyenthienthanh/aura-frog

Proposes patches for F2 (local-logic) and F3 (local-design) failures. NEVER applies without user approval. Confidence ≥0.7 to propose; below that, escalates raw findings. Counts toward replan_budget. Per-task: max 1; per-session: max 5.

self-consistency

14
from nguyenthienthanh/aura-frog

Generate N independent reasoning paths and vote on the answer. Use for architectural trade-offs, ambiguous design decisions, or when single-path reasoning risks locking onto the first plausible answer. Paper: Wang et al. 2022.