> ## Documentation Index
> Fetch the complete documentation index at: https://meganharrisonconsulting.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Verification

> Checks that prove Project Intelligence is current, source-linked, and using the intended writer.

## Required Checks

Run these checks before calling Project Intelligence active:

```bash theme={null}
npm run rag:verify:source-lifecycle
npm run rag:verify:project-intelligence-live-paths
npm run docs:verify:project-intelligence
```

## Packet Version Read-Back

Use this read-back to prove which compiler is active:

```sql theme={null}
select
  compiler_version,
  packet_version,
  freshness_status,
  count(*) as rows,
  count(*) filter (where packet_type = 'current') as current_rows,
  count(*) filter (
    where packet_type = 'current'
      and generated_at > now() - interval '36 hours'
  ) as current_fresh_36h,
  max(generated_at) as newest_generated_at
from intelligence_packets
group by compiler_version, packet_version, freshness_status
order by newest_generated_at desc nulls last;
```

Passing result:

* Active client-project current packets are written by
  `project_intelligence_synthesis_v1`.
* Current packets are fresh inside the expected window.
* Legacy packet versions are absent from current client-project ownership or are
  explicitly documented as historical/fallback rows.

## Evidence Checks

Packet freshness alone is not enough. A valid packet must also prove source
coverage:

* Source documents are assigned to projects or review status.
* Source documents are indexed in RAG.
* Generated packet content cites real source document IDs.
* Source lifecycle rows reach `project_intelligence_updated`.
* The project page renders the same current packet that the database read-back
  identifies.

## Documentation Guardrail

The docs verifier fails if the docs site stops naming:

* `project_intelligence_synthesis_v1`
* `backend/src/services/intelligence/project_intelligence.py`
* the current activation requirement

This prevents the docs from drifting back into separate, contradictory sources
of truth.
