# RetrieX Patch 43O - Prompt Measurement Evidence Vocabulary Maps

## Goal

Continue the p43 YAML/list/map consolidation with a larger but still behavior-preserving config-structure patch.

This patch centralizes prompt measurement-evidence term lists in `vocabulary.yaml` while keeping prompt rules, labels, answer templates and parameter definitions in `prompt.yaml`.

## Scope

Changed files:

- `config/retriex/prompt.yaml`
- `config/retriex/vocabulary.yaml`
- `src/Config/PromptBuilderConfig.php`
- `patch_history/RETRIEX_PATCH_43O_PROMPT_MEASUREMENT_EVIDENCE_VOCABULARY_MAPS_README.md`

## Changes

- Moved `measurement_evidence_guard.accessory_lookup_guard_terms` from `prompt.yaml` into vocabulary view:
  - `prompt.measurement_evidence_guard.accessory_lookup_guard_terms`
- Moved `measurement_evidence_guard.accessory_lookup_passthrough_terms` from `prompt.yaml` into vocabulary view:
  - `prompt.measurement_evidence_guard.accessory_lookup_passthrough_terms`
- Moved per-parameter `request_terms`, `positive_terms`, and `non_equivalent_terms` from `prompt.yaml` into vocabulary maps:
  - `prompt.measurement_evidence_guard.request_terms`
  - `prompt.measurement_evidence_guard.positive_terms`
  - `prompt.measurement_evidence_guard.non_equivalent_terms`
- Added `measurement_evidence_guard.vocabulary_views` and `measurement_evidence_guard.vocabulary_maps` references in `prompt.yaml`.
- Added `PromptBuilderConfig` vocabulary-map resolving for measurement-evidence parameters.
- Kept local per-parameter list overrides supported: if a parameter defines `request_terms`, `positive_terms`, or `non_equivalent_terms` locally, that local list still wins.

## Non-goals

This patch intentionally does not change:

- Fachlogik / runtime product-selection behavior
- Scoring
- Retrieval
- Prompt rules
- Prompt wording
- Admin UI
- PHP-core hardcoded fachliche Listen

## Effective-value validation

The effective measurement-evidence output was compared against the p43N base and remained identical:

- accessory lookup guard terms: 7 / identical
- accessory lookup passthrough terms: 9 / identical
- measurement evidence parameters: 3 / identical
  - `ph`: request 5, positive 4, non-equivalent 7
  - `redox`: request 4, positive 4, non-equivalent 0
  - `free_chlorine`: request 4, positive 4, non-equivalent 3

## Local checks run

```bash
php -l src/Config/PromptBuilderConfig.php
php -l src/Config/DomainVocabularyConfig.php
php -l src/Config/AgentRunnerConfig.php
php -l src/Config/SearchRepairConfig.php
php -l src/Config/GovernanceConfig.php
php -l src/Config/LanguageCleanupConfig.php
python3 YAML parse check for config/retriex/*.yaml
python3 effective p43N-vs-p43O prompt measurement evidence comparison
php PromptBuilderConfig vocabulary resolver check
```

All checks above passed.

## Console checks

The Symfony console checks could not be executed in this artifact environment because the uploaded ZIP does not contain `vendor/`:

```text
PHP Fatal error: Uncaught LogicException: Dependencies are missing. Try running "composer install".
```

Please run in the project environment:

```bash
bin/console mto:agent:config:validate
bin/console mto:agent:regression:test
bin/console mto:agent:config:audit-source --details
bin/console mto:agent:config:audit-patterns --details
```
