# AUTO_GEN Product-pack

`AUTO_GEN Product-pack` is a tracked mirror of the **live production metadata state**.

Purpose:

1. show what production is actually running right now
2. make pack-vs-live drift review visible in Git
3. help business and engineering review whether a requested change really reached production

Rules:

1. this directory is generated from the live production metadata database
2. do not hand-edit files under `live/`
3. this is a **mirror**, not the install/build source of truth
4. this is not the pack that bootstrap/deploy consumes

Layout:

```text
packs/AUTO_GEN_Product-pack/
  README.md
  .last-generated.json
  .mirror-source.json
  .mirror-state.json
  live/
    objects/
    record_types/
    validation/
    permissions/
    report_types/
    layouts/
    relationships/
    field_mappings/
    flow_definitions/
  reports/
    final-pack-vs-autogen-product-pack.md
    final-pack-vs-autogen-product-pack.json
```

Generation contract:

1. source DB: production metadata database
2. export mode: `pack`
3. sync script: `scripts/product_pack_live/sync_product_pack_from_prod.py`
4. workflow: `.github/workflows/sync-product-pack.yml`
5. scheduled sync only runs automatically after this workflow exists on the repository default branch
6. the workflow updates the dedicated `product-pack-live` branch, not `main`

Mirror state:

1. `.mirror-source.json` records stable source metadata for the mirror contract
2. `.mirror-state.json` records stable content fingerprint and component summary counts
3. `.last-generated.json` records the latest successful generation timestamp in UTC
4. `.mirror-source.json` and `.mirror-state.json` are designed to avoid timestamp-only churn

Interpretation rule:

1. `live/` answers "what prod actually has"
2. `reports/final-pack-vs-autogen-product-pack.*` answers "what the checked-in final pack says vs what prod actually has"
3. use the `AUTO_GEN_` prefix to make it explicit that this directory is generated, not hand-authored
4. `../AUTO_GEN_product_l2_filter_pack/reports/l2-vs-autogen-filter-pack.*` answers "within the L2 target scope, what the manual Salesforce-PingCAP-L2 pack still lacks vs live metadata"
