# ClaimPrism extension and premium boundary

ClaimPrism exposes a small extension API for additional analysis and UI layers. The premium product now uses the same source codebase as the Free edition; Freemius deployment generates the separate Free and Pro packages.

Premium-only code must be guarded with the Freemius entitlement API and must not be required for the Free plugin to load or provide its advertised functionality. Never use UI hiding alone as an entitlement check.

## Filters

### `claimprism_post_types`

Receives the array of WordPress post types scanned by the core plugin.

### `claimprism_rules`

Receives the complete deterministic rule array. Premium modules can add jurisdiction or sector rule packs while leaving the free rules visible and functional.

### `claimprism_post_text`

Receives the text assembled for a saved `WP_Post` and the post object. Intended for extra locally available content sources.

### `claimprism_findings`

Receives the deduplicated findings plus normalized text and content metadata. Intended for additional analysis layers that return the same finding shape.

### `claimprism_evidence_entries`

Receives sanitized evidence entries immediately before they are stored, plus the content ID.

### `claimprism_evidence_alerts`

Receives the expiry-alert list and the look-ahead window in days.

## Actions

### `claimprism_post_scanned`

Runs after saved content is scanned and findings are persisted. Arguments: content ID, findings and `WP_Post`.

### `claimprism_batch_completed`

Runs after each full-store background batch. Arguments: job state, number of items processed in the batch and findings encountered in the batch.

### `claimprism_evidence_saved`

Runs after evidence is saved or cleared. Arguments: content ID and the final evidence array.

### `claimprism_dashboard_after_progress`

Runs after the core scan-progress panel. Arguments: job state and finding summary.

## Compatibility rule

Extensions must treat these hooks as the public boundary. They must not write directly to ClaimPrism's findings table or mutate internal job options. ClaimPrism Free must remain useful when no premium entitlement is active.
