A one-off documentation pass (see pb-14) fixes today's gap; it does not stop next quarter's. The durable version is an agent that walks the catalog on a schedule, finds assets missing descriptions, owners, or tags, drafts proposals from lineage and query logs, and files them into a human approval queue.
Tier: Advanced · Workflow area: Docs, lineage & governance
This playbook builds that loop — the emphasis is on the guardrails that make an autonomous enrichment agent trustworthy: read-only access, proposals-not-writes, evidence per proposal, and an approval gate.
Don't start here if you have never run a supervised bulk documentation pass — automate a workflow you've validated manually, not one you're inventing.
Inventory the gaps via the catalog API. Every serious catalog exposes assets and their metadata over REST/GraphQL. Pull assets where description IS NULL, owner is unset, or required tags are missing, and rank by usage (query count from warehouse logs) so the agent works on assets people actually touch.
Assemble evidence per asset. For each gap, gather what a human documenter would look at: upstream lineage and upstream descriptions, the creating SQL or dbt model, top query patterns against the asset from query history (which columns get selected/joined/filtered), and most-frequent-querier teams (a strong ownership signal).
Draft proposals with structured output. Each proposal carries the drafted value and its evidence:
import anthropic
from pydantic import BaseModel
class EnrichmentProposal(BaseModel):
asset: str
field: str # description | owner | tag
proposed_value: str
evidence: list[str] # citations into lineage/query-log evidence
confidence: str # high | medium | low
class ProposalSet(BaseModel):
proposals: list[EnrichmentProposal]
client = anthropic.Anthropic()
response = client.messages.parse(
model="claude-opus-4-8",
max_tokens=16000,
thinking={"type": "adaptive"},
messages=[{"role": "user", "content": build_evidence_prompt(asset_bundle)}],
output_format=ProposalSet,
)
queue.extend(response.parsed_output.proposals)
The prompt rules mirror pb-14: derive from evidence, never invent business rules, propose owner only when query-log concentration is decisive, emit low-confidence-with-question instead of guessing. Run nightly batches through the batch API — enrichment is the definition of a non-latency-sensitive workload.
File into an approval queue, never write directly. Push proposals into the catalog's native suggestion/approval workflow if it has one (Atlan suggestions, DataHub proposals), else a lightweight review table or PR-based flow. The agent's credential is read-only on data and write-only to the proposal store — it must not be able to publish a tag or description itself. Approvals route by domain: proposals for finance-owned assets go to finance data owners.
Close the loop with feedback. Track accept/edit/reject per proposal type. Rejections are prompt fuel: fold recurring correction patterns back into the drafting prompt ("owners are teams, never individuals"; "never tag exports as deprecated"). Accept-rate per confidence band also validates whether your confidence field means anything.
Schedule and bound it. Run from your orchestrator (a nightly Airflow 3 DAG is fine) with hard bounds: max proposals per run (a reviewable number, e.g. 50), token budget per run, and an automatic pause if accept-rate drops below a floor — a degrading accept-rate means the agent is now generating review burden, not value.
The approval queue is the safety boundary. An enrichment agent with direct write access to catalog tags can silently corrupt governance metadata that downstream masking and access policies depend on. Proposals in, humans approve, always.
For a client's catalog, run the agent inside the client's environment with client-issued read-only credentials, and route the LLM calls through whatever provider arrangement the client has approved (their cloud's model endpoint, or self-hosted). Query-history evidence is the risky input — get explicit sign-off that query text may be processed, and always strip literals. Contract the deliverable as the system plus its metrics (accept-rate dashboard, coverage trend), not just enriched metadata: the accept-rate history is what lets the client trust and continue running the agent after handover.