Get Started

Sentinel Engine

Catch out-of-sync dependencies

The Sentinel Engine monitors coupled files and alerts when they become out of sync. If File A was updated but its coupled File B hasn't been touched in over 7 days, it may indicate a forgotten dependency.

Overview

The Sentinel Engine builds on the Entanglement Engine by actively monitoring coupled files for staleness. When you're about to modify a file, Sentinel checks if any of its coupled files are suspiciously out of date, which could indicate forgotten synchronization requirements.

How It Works

  1. Load Coupling Data: Retrieves the coupling relationships identified by the Entanglement Engine.
  2. Check Last Modified: For each coupled file, checks when it was last modified using git log.
  3. Calculate Staleness: Compares the time gap between the target file and its coupled files.
  4. Generate Warnings: Warns when coupled files exceed the staleness threshold (default 7 days).

Technical Details

Combines coupling data from the Entanglement Engine with `git log --format=%ai` to get last modification timestamps. Calculates date differences and applies the staleness threshold. Supports per-file threshold overrides for files that are expected to update less frequently.

Use Cases

Configuration Drift Detection

Catch when code changes but configuration files aren't updated.

API Contract Violations

Detect when API implementations change but clients haven't been updated.

Documentation Staleness

Identify when code changes but related documentation lags behind.

Configuration Options

OptionDefaultDescription
stalenessThreshold7Days of inactivity before flagging as stale
warningLevel"warning"Alert level: "info", "warning", or "error"
excludePatterns["*.md", "*.txt"]File patterns to exclude from staleness checks
Sentinel Engine | Memoria Features | Memoria