# Artifact Inventory

## Purpose

This document explains the structure and update rules for
[artifacts/index.csv](artifacts/index.csv:1).

`artifacts/index.csv` is the machine-readable registry of final and near-final
deliverables in `artifacts/`.

It complements:
- [docs/pipeline.md](docs/pipeline.md:1)
- [docs/status-workflow.md](docs/status-workflow.md:1)
- [docs/data-inventory.md](docs/data-inventory.md:1)

## Schema

Columns:

- `artifact_id`
  Stable identifier for the artifact.

- `path`
  Repository-relative path under `artifacts/`.

- `kind`
  Use:
  - `report` for narrative deliverables
  - `inventory` for machine-readable registries

- `producer`
  Script or process responsible for the artifact. Use `manual_analysis` for
  hand-maintained deliverables and `scripts/...` when a script owns the file or
  part of it.

- `inputs`
  Pipe-delimited list of upstream datasets or documents.

- `status`
  Use:
  - `active` for current maintained artifacts
  - `partial` for artifacts that are useful but still inherit open analytical gaps
  - `stale` when the artifact is no longer current
  - `deprecated` when kept for history only

- `notes`
  Short operational description.

## Commands

```bash
make validate-artifact-index
make artifact-index-report
```

Both targets currently run [scripts/validate_artifact_inventory.py](scripts/validate_artifact_inventory.py:1).

## Update Rules

Add or update an entry when:
1. a new deliverable appears in `artifacts/`;
2. an artifact changes owner from manual to scripted or vice versa;
3. the upstream inputs change materially;
4. the artifact becomes partial, stale, or deprecated.
