Documentation Index

Fetch the complete documentation index at: https://docs.aifabrix.ai/llms.txt

Use this file to discover all available pages before exploring further.

Configure Content Review

Prev Next

Integrator checklist to wire Content Review (product module at /content-review) for entityType: documentStorage Business Entities — required metadata, foreign keys, processing flags, upload validation, and steward handoff.

Content Review is the governed human step that completes document metadata before search, retrieval, and Role Assistant context. Operators see Needs Review in the queue; integrators declare what must be complete before Approve is enabled.

Assumes a document Business Entity already exists. Start from Build a document storage entity if not.

Prerequisites

  • Document storage Business Entity JSON with entityType: documentStorage and working sync
  • Target record Business Entities for required links (customer, deal, project) published and syncing
  • Steward roles with document read and governed save permissions for Content Review
  • Business sign-off on mandatory dimensions and links before AI or search exposure

Where it lives

Layer Location
Approval rules Same Business Entity manifest — not a separate product module
Product UI Content Review (/content-review) — pending queue, review panel, save draft, approve
Operator guide Operate Content Review
Concept narrative Document approval and governance

Manifest bands that drive Content Review eligibility:

  • foreignKeys[] — required links to record Business Entities
  • dimensions — required governed fields (sensitivity, lifecycle, owner)
  • labelKey — display title in the review panel
  • metadataSchema — canonical scalar fields stewards edit
  • documentStorage.processing — file path, enrichment, validation, notification flags

Runtime review APIs read these declarations; the UI does not hardcode vendor-specific fields.

How to set

  1. Declare join identity and display label — stewards need stable keys and a readable title:
{
  "key": "example-documents",
  "entityType": "documentStorage",
  "resourceType": "document",
  "primaryKey": ["externalId"],
  "labelKey": ["name"],
  "metadataSchema": {
    "type": "object",
    "properties": {
      "externalId": { "type": "string", "index": true },
      "name": { "type": "string", "index": true },
      "lifecycleStage": { "type": "string", "index": true },
      "sensitivityLabel": { "type": "string", "index": true },
      "linkedDealId": { "type": "string", "index": true }
    }
  }
}
  1. Add required foreign keys — Content Review stays blocked until required links resolve:
{
  "foreignKeys": [
    {
      "name": "linkedDeal",
      "fields": ["linkedDealId"],
      "targetDatasource": "example-deals",
      "required": true,
      "description": "Every document must link to an active deal before approval"
    }
  ]
}
  1. Mark required dimensions — map ABAC and approval eligibility to indexed metadata fields:
{
  "dimensions": {
    "sensitivity": {
      "type": "local",
      "field": "sensitivityLabel",
      "enabled": true
    },
    "lifecycleStage": {
      "type": "local",
      "field": "lifecycleStage",
      "enabled": true
    },
    "owner": {
      "type": "local",
      "field": "createdByEmail",
      "actor": "email",
      "enabled": true
    }
  }
}
  1. Enable document storage processing — binary path and sync behavior under documentStorage:
{
  "documentStorage": {
    "enabled": true,
    "twoPhaseSync": true,
    "processing": {
      "fileStoragePath": "/data/documents/example"
    }
  }
}

Processing flags control file storage, optional AI validation, enrichment, and steward notifications. Keep enrichment configuration within supported manifest bands only.

  1. Materialize governed fields in fieldMappings.attributes — stewards edit canonical metadata JSON; projections must align with metadataSchema and dimensions:
{
  "fieldMappings": {
    "attributes": {
      "lifecycleStage": {
        "expression": "{{raw.listItem.fields.LifecycleStage}}"
      },
      "sensitivityLabel": {
        "expression": "{{raw.listItem.fields.SensitivityLabel}}"
      },
      "linkedDealId": {
        "expression": "{{raw.listItem.fields.DealId}}"
      }
    }
  }
}
  1. Repair, validate, and publish:
aifabrix repair <systemKey> --expose
aifabrix datasource validate <datasourceKey>
aifabrix validate <systemKey>
aifabrix upload <systemKey> --probe
  1. Hand off to stewards — share Operate Content Review; confirm /content-review queue visibility and role assignments before E2E approval tests.

Content Review runtime contract

Governed saves use canonical metadata JSON on the per-entity record row. Physical columns are derived projections for search and ABAC — not a second write path.

Concern Behavior
Review load Materialized metadata, manifest-driven reviewFields, and metadataEtag for concurrency
Save draft / metadata update Patches canonical JSON; stale etag returns conflict
Read-only manifest fields Rejected on save — not silently ignored
FK picker Governed record search with ABAC (same as operators use in Content Review)
Approve Succeeds only when required FK and dimensions pass eligibility

Sync status needs_validation (shown as Needs Review in Content Review) means human completion is required before the document is embeddable for search paths that honor approval gates.

Defaults and examples

Concern Guidance
Required FK Set required: true only when business policy demands it — blocks Approve until resolved
Dimension options Static catalogs plus ABAC-projected values for steward scope
Confidence gating Low enrichment confidence routes to Content Review when validation flags require it
Empty queue Success — notifications still alert stewards on new arrivals
Vector / RAG Certify only after Content Review rules pass; vector Business Entity is a separate contract

Example minimal approval gate for a policy library linked to customers:

{
  "foreignKeys": [
    {
      "name": "owningCustomer",
      "fields": ["customerId"],
      "targetDatasource": "example-customers",
      "required": true
    }
  ],
  "dimensions": {
    "sensitivity": { "type": "local", "field": "classification", "enabled": true }
  }
}

Validate

aifabrix datasource validate <datasourceKey>
aifabrix validate <systemKey>
aifabrix upload <systemKey> --probe
aifabrix test-integration <systemKey>
aifabrix datasource test-e2e <datasourceKey> --app <systemKey> --verbose

Manual proof with a steward account:

  • Sync at least one document into Needs Review in Content Review
  • Confirm Approve disabled until required FK and dimensions are set
  • Save draft, refresh etag, approve, confirm status moves to validated/synced
  • Verify entitled search returns document; non-entitled user does not

Common mistakes

Mistake Fix
Required FK without syncing target entity Publish and sync record Business Entity first
Dimension field not in metadataSchema Add indexed property and field mapping
Stewards lack ABAC scope for FK search Fix dimensions/roles, not UI bypass
Skipping test-integration before steward UAT Run integration test after upload
Mixing vectorStore manifest for file-only Content Review Use documentStorage; add vector entity when RAG-ready
Training stewards on wrong nav label Use Content Review (/content-review), not generic admin paths

Limits

Provider-specific list envelopes and download URL patterns belong in document sync configuration — Content Review rules stay generic.

Bulk metadata update endpoints, when exposed, must follow the same atomic write, etag, FK validation, and audit rules as single-document save — confirm current API surface before building automation.