# agent-audit reads field lists from a reference file, not hardcoded script arrays **Amended by ADR-0025 (2026-09-15).** `agent-audit` was removed and its flow merged with `skill-audit`'s into `factory-audit`. Read `agent-audit` below as `factory-audit`'s agent flow; the reference file this ADR is about is now `factory-audit/references/agent-field-inventory.md`. The decision is unchanged — the field lists still live in a reference file read at runtime, not in script arrays. `agent-audit`'s `validate.sh` checks for Claude Code-only fields in Copilot files and silently-ignored fields in plugin agents. Rather than hardcoding those field lists in the script, the script reads `references/field-inventory.md` at runtime. This keeps field list maintenance decoupled from script logic and preserves a provenance chain back to the research corpus that sourced the lists. ## Considered options **Hardcode in validate.sh (rejected)** — field lists live as literal arrays in the bash/python script. Rejected because: (1) the lists came from research docs (`claude-code-plugins/agent-definition.md` and `github-copilot-plugins/agent-definition.md`) and should maintain a provenance chain back to those sources via `source_keys` frontmatter; (2) both provider APIs evolve — updating a structured markdown file is lower friction than editing a script and less likely to introduce bugs; (3) it breaks the bidirectional reference principle already established for this repo, where research-derived content carries explicit source attribution. ## Consequences - `validate.sh` must parse `references/field-inventory.md` to extract field lists — the file format must be machine-parseable (section headings the script can grep, or a simple list structure). - `field-inventory.md` carries `source_keys` frontmatter referencing `claude-code-plugins-docs` and `github-custom-agents-configuration` slugs. - The script exits with a clear error if `references/field-inventory.md` is not found — fail-fast, not silent. - Field list updates (new provider field, deprecated field) require only editing `field-inventory.md`; no script change needed.