# Regenold pathway adapter

`examples/regenold/adapter.py` is the executable boundary for the synthetic
AntifragileAI/Regenold walkthrough. It accepts a proposal from the partner
adapter and returns a stable EcoKure decision envelope:

```python
from examples.regenold.adapter import evaluate_proposal, load_control_pack

fixture = load_control_pack()
decision = evaluate_proposal(
    {
        "intended_purpose": "Synthetic customer support answer",
        "classification_basis": "Customer control owner supplied the basis",
        "interaction_notice": "AI-generated response",
        "content_marker": "synthetic",
        "training_record": "synthetic-record-001",
        "owner": "customer-governance-owner",
        "source_refs": ["source:eu-ai-act-article-6-v2026-01"],
    },
    control_pack=fixture,
    request_id="pilot-request-001",
    model={"provider": "synthetic", "model_id": "fixture-model", "version": "0"},
)
```

The envelope contains the request digest, control-pack digest and version,
source references, per-control missing fields, a bounded `PASS`, `BLOCK` or
`REVIEW` decision, and `actuation: false`. The adapter performs presence checks
only. It does not make a legal finding, call a model, store a secret, or send a
customer response.

The public three-outcome walkthrough is executable with `run_demo()`. It runs
the same DTL adapter for the frozen q01, q02 and q03 proposals, records both the
adapter vocabulary (`PASS`, `BLOCK`, `REVIEW`) and the reader-facing
`ABSTAIN_REVIEW` label for the incomplete q03 case, then runs the domain-neutral
change-impact engine. The signed public EvidencePack includes the resulting
request and decision digests, so the page is backed by the code path rather
than a second set of hand-written verdicts.

`run_change_impact()` converts the fixture's request dependencies to the
existing `ChangeControlEngine`. A changed Article 50 source therefore affects
q02 and q03, replays q02, holds q03 for review and preserves q01. A real pilot
must replace the fixture with customer-approved controls, source versions and a
partner-owned replay function, then record the reviewer decision in the signed
EvidencePack.

To export the complete offline artefact and verifier result locally:

```bash
python scripts/run_regenold_demo.py --output /tmp/regenold-demo-export.json
```

The export contains the runtime decisions, signed EvidencePack and verifier
result in one file. It is synthetic and does not connect to a partner system.

## Pilot handoff

The partner adapter should call this module in shadow mode after capturing the
original request, model/prompt metadata and source versions. It should treat
`BLOCK` as a hold, `REVIEW` as a named-human queue and `PASS` as a recorded
observation until the customer explicitly enables actuation. The customer owns
the data boundary and KMS key; AAF supplies reviewer identity where required.
