# Threadline v0.2.0 - Table of Contents

Audit platform for Elixir teams using Phoenix, Ecto, and PostgreSQL

## Pages

- Overview
  - [Threadline](readme.md)

- Reference
  - [Threadline domain reference](domain-reference.md)
  - [Brownfield continuity with Threadline capture](brownfield-continuity.md)
  - [Production checklist (Threadline)](production-checklist.md)

- Project
  - [Contributing to Threadline](contributing.md)
  - [Changelog](changelog.md)

## Modules

- [Threadline.Capture.Migration](Threadline.Capture.Migration.md): SQL DDL for the Threadline audit schema.
- [Threadline.Capture.RedactionPolicy](Threadline.Capture.RedactionPolicy.md): Validates trigger redaction options at codegen time (Mix / `TriggerSQL`).
- [Threadline.Capture.TriggerSQL](Threadline.Capture.TriggerSQL.md): Generates PL/pgSQL trigger DDL for Threadline audit capture.
- [Threadline.Query](Threadline.Query.md): Ecto query implementations for the Threadline public API.
- [Threadline.Semantics.Migration](Threadline.Semantics.Migration.md): DDL helpers for the Threadline semantics schema (Phase 2).
- [Threadline.Verify.CoveragePolicy](Threadline.Verify.CoveragePolicy.md): Pure policy for comparing `Threadline.Health.trigger_coverage/1` output with
host-configured expected audited table names.

- Core API
  - [Threadline](Threadline.md): Audit platform for Elixir teams using Phoenix, Ecto, and PostgreSQL.
  - [Threadline.Export](Threadline.Export.md): CSV and JSON export for audited row changes.
  - [Threadline.Retention](Threadline.Retention.md): Batched retention purge for `audit_changes` and empty `audit_transactions`.
  - [Threadline.Retention.Policy](Threadline.Retention.Policy.md): Validates **`config :threadline, :retention`** before purge runs.
  - [Threadline.Semantics.ActorRef](Threadline.Semantics.ActorRef.md): Value object representing the actor who performed an audited operation.
  - [Threadline.Semantics.AuditContext](Threadline.Semantics.AuditContext.md): Execution context for an audited request or job.

- Integration
  - [Threadline.Continuity](Threadline.Continuity.md): Brownfield cutover helpers for honest **T₀** semantics with Threadline capture.
  - [Threadline.Health](Threadline.Health.md): Health checks for Threadline infrastructure.
  - [Threadline.Job](Threadline.Job.md): Helpers for propagating audit context through background job `args` maps.
  - [Threadline.Plug](Threadline.Plug.md): Plug that extracts `AuditContext` from a `Plug.Conn` and stores it in
`conn.assigns[:audit_context]`.
  - [Threadline.Telemetry](Threadline.Telemetry.md): Telemetry integration helpers for Threadline.

- Schemas
  - [Threadline.Capture.AuditChange](Threadline.Capture.AuditChange.md): Ecto schema for the `audit_changes` table.
  - [Threadline.Capture.AuditTransaction](Threadline.Capture.AuditTransaction.md): Ecto schema for the `audit_transactions` table.
  - [Threadline.Semantics.AuditAction](Threadline.Semantics.AuditAction.md): Ecto schema for the `audit_actions` table.

## Mix Tasks

- Mix Tasks
  - [mix threadline.continuity](Mix.Tasks.Threadline.Continuity.md): Brownfield capture cutover helper — honest T0 semantics (see `guides/brownfield-continuity.md`).
  - [mix threadline.export](Mix.Tasks.Threadline.Export.md): Loads application config, starts the configured Ecto repo, and writes an export file
using `Threadline.Export` — **no** ad-hoc `Ecto.Query` in this task (parity with
`mix threadline.retention.purge`).
  - [mix threadline.gen.triggers](Mix.Tasks.Threadline.Gen.Triggers.md): Generates an Ecto migration that installs Threadline audit triggers on the
specified tables.
  - [mix threadline.install](Mix.Tasks.Threadline.Install.md): Generates an Ecto migration file for the Threadline audit schema.
  - [mix threadline.retention.purge](Mix.Tasks.Threadline.Retention.Purge.md): Delegates to `Threadline.Retention.purge/1` after loading application config and
starting the configured Ecto repo (same resolution pattern as `mix threadline.verify_coverage`).
  - [mix threadline.verify_coverage](Mix.Tasks.Threadline.VerifyCoverage.md): Verifies that tables listed in application config have Threadline audit
triggers installed, using the same catalog queries as `Threadline.Health.trigger_coverage/1`.

