---
id: 03-adr-022-amendment-and-evaluate-library-skill
epic: compliance-manifests-pii-retention-subprocessors
title: ADR-022 amendment for sub-processor fields and evaluate-library skill update
type: technical-story
status: done
feature: tooling
depends-on: [01-pii-retention-type-primitives]
blocks: []
created: 2026-05-18T17:52:09Z
updated: 2026-05-18T18:46:05.473Z
---

## Goal

Amend ADR-022 to add the discriminated-union sub-processor fields to every library trace frontmatter (`is-sub-processor`, `processes-pii`, and conditionally `data-sent`, `region`, `dpa-signed`, `sccs-required`, `contact`). Update `.claude/skills/evaluate-library/SKILL.md` to prompt for these new fields during trace authoring. Backfill existing `docs/library-decisions/*.md` traces so they comply with the amended schema.

## Why

Without the skill update, a developer running `/evaluate-library` today produces a trace missing the sub-processor fields, causing `emit-sub-processors.mjs` (Story 06) to silently skip it. Making the skill ask the questions in one pass prevents traces that require a later backfill amendment.

## Done when

- `docs/decisions/ADR-022.md` documents the discriminated-union sub-processor frontmatter specification: `is-sub-processor: boolean`, `processes-pii: boolean`, and the 5 conditional required fields when `is-sub-processor: true`.
- `.claude/skills/evaluate-library/SKILL.md` updated with two new prompts ("is this library a sub-processor?" / "does it process PII in-process?"), conditional prompt for the 5 required sub-processor fields, and an updated trace frontmatter template.
- All existing `docs/library-decisions/*.md` traces gain `is-sub-processor` + `processes-pii` fields (with `false` / `false` as the baseline for non-sub-processors, or correct values where applicable).
- `pnpm typecheck && pnpm lint && pnpm test && pnpm conformance && pnpm fallow:audit && pnpm coverage:diff` all pass.

## In scope

- `docs/decisions/ADR-022.md` — sub-processor discriminated union specification.
- `.claude/skills/evaluate-library/SKILL.md` — new prompts + updated trace template.
- All existing `docs/library-decisions/*.md` traces — `is-sub-processor` + `processes-pii` field additions.

## Out of scope

- `emit-sub-processors.mjs` generator implementation (Story 06).
- Weekly `dpa-signed` staleness check in CI — that is an ADR-023 cross-reference; document it, but do not implement the cron here.

## Tasks

- [x] Amend `docs/decisions/ADR-022.md` with the sub-processor discriminated union frontmatter spec, update `.claude/skills/evaluate-library/SKILL.md` with new prompts and trace template, and backfill all existing `docs/library-decisions/*.md` traces with `is-sub-processor` + `processes-pii` fields — all gates pass on this commit.
