---
name: mesh_inspect_drift
emoji: "🔍"
description: Perform a deep comparison between the Hub's local record and a node's
  physical file state.
skill_type: local
is_enabled: true
features:
- swarm_control
- agent_harness
config:
  parameters:
    type: object
    properties:
      node_id:
        type: string
        description: Target node ID.
      path:
        type: string
        description: Relative path to the file to inspect.
      session_id:
        type: string
        description: The workspace session ID.
    required:
    - node_id
    - path
    - session_id
is_system: true
---

# Mesh Inspect Drift

This capability performs a deep bitwise comparison between the Hub's local record (Ghost Mirror) and a node's physical file state to identify synchronization inconsistencies.

# Reconciliation Protocol

Use this tool when you suspect "Ghost Files" or when a node's behavior deviates from its reported file state.

### 1. Interpretation of Results
The tool returns a unified diff:
- **`+` (Plus)**: Content exists on the remote physical node but is MISSING from the Hub mirror.
- **`-` (Minus)**: Content exists on the Hub mirror but is MISSING from the physical node.
- **No Diff**: States are perfectly synchronized.

### 2. Resolution Workflow
If drift is detected, you should proceed as follows:
1.  **Analyze**: Determine if the drift is due to an out-of-band edit (e.g., user manual change) or a failed sync broadcast.
2.  **Harmonize**: Use the `mesh_sync_control` skill with the `resync` action to force a full hash-based reconciliation.
3.  **Verify**: Re-run `mesh_inspect_drift` to confirm the states are once again identical.

> [!IMPORTANT]
> **MESH INTEGRITY**
> Always investigate drift BEFORE attempting complex multi-node refactors to ensure you are starting from a consistent baseline.
