---
title: Bounded contexts
description: The map of Enterium's bounded contexts — what each module owns, and how they are allowed to talk to each other.
locale: en
version: 0.2.0
canonical: https://enterium-developer-docs.pages.dev/developers/platform/contexts/
---

> Documentation index: https://enterium-developer-docs.pages.dev/developers/llms.txt — every page of this portal has a Markdown twin at <route>.md; the frozen API contract is at https://enterium-developer-docs.pages.dev/developers/api/openapi.json.

The backend is split into bounded contexts, one package per context.
Each context owns its tables, logic, schemas and router; isolation is
enforced by an import linter in CI. This page is the map.

## Content production

| Context | Owns |
| --- | --- |
| `research` | The accumulating per-contract knowledge base (research facts and related tables): enrichment, freshness, hygiene and conflict handling. The foundation of retrieval-grounded generation. |
| `retrieval` | The universal vector primitive: chunking, embeddings, similarity search and reranking over pgvector. Used by research, publish and quality. |
| `publish` | The publication conveyor: payload assembly, the registry of published URLs, the hub client, topic and batch deduplication, the grounding gate, quarantine, and topic feedback. |
| `quality` | Post-publish article scoring: verification, claim checking against sources, brand-safety signals, language consistency, stale-publish detection. |
| `competitors` | Lifecycle of a contract's competitor lists: candidate mining, the registry, and safe application into brand-defense declarations. |

## Execution and operations

| Context | Owns |
| --- | --- |
| `runs` | Tracking and orchestration of pipeline executions: the version catalog, run events and projections, metering, autoscaling, staging and reconciliation. |
| `integrations` | The **only** channel to external services (LLM, web search, image generation, storage, DNS): a declarative connection registry, pluggable secret backends, typed capability adapters and a health monitor. |
| `ops` | The live operational snapshot that powers the dashboard and agent status reads. |
| `analytics` | Search and traffic data (weekly search-console time series per instance) and derived analytics: scoring, topic performance, scheduling. |
| `cockpit` | A read-only aggregator for the per-contract dashboard. |

## Knowledge and process

| Context | Owns |
| --- | --- |
| `tickets` | The incident / defect / improvement tracker (the board agents write to). |
| `tasks` | Human-assignable work tasks with statuses and notes. |
| `chatlog` | The searchable archive of the team's working chat. |
| `specs` | The registry linking features to their SPEC documents (traceability). |

## Shared layers outside contexts

Some foundational layers predate the context split and live flat under
the backend package:

- `auth/` — JWT issuance, scopes and the agent grant model
  (see [Authentication](../../guides/authentication/)).
- `lifecycle/` — the entity state-machine engine inherited from the
  platform's metamodel (see [Data model](../data-model/)).
- `db/models/` — the ORM layer.
- `api/v1/` — the REST routers (about 28 of them, grouped by capability).
- `native/` — the immutable pipeline version directories themselves.

## The interaction rule

A context reaches another context **only** through that context's public
`contracts.py` or an event — never by importing internals, never by touching
foreign tables. Examples of real seams: the publish gate reads quality
verdicts through the quality contract; deduplication embeds text through the
retrieval contract; every LLM call anywhere goes through an integrations
adapter. If you are tracing behaviour across modules, start at the target
context's `contracts.py` — it is the complete public surface.
