# P2-003 evidence pack — hierarchical taste models

## Work-package charter

- **Task ID:** `P2-003`
- **Owner:** Shared contracts and evaluation-governance maintainers;
  implementation owner: Elikem Agudogo
- **Accountable product:** Shared V1–V9 autonomous-content platform
- **Priority:** P2
- **Target milestone:** 2026-07-15 SOTA gap-closure program
- **Risk tier:** High privacy, minority-preference erasure, manipulation, and
  hard-constraint trade-off risk
- **Dependencies:** Zod, the canonical `@oshun/contracts` common export,
  product-owned consent/deletion systems, manipulation detection, and
  independently versioned safety/rights/factuality/accessibility policies
- **Affected schemas and content slots:** New strict hierarchical-taste policy,
  node, and decision contracts plus common/root exports. No production
  preference record, learned model, user cohort, or content slot changed.
- **Rollout strategy:** Publish the contract as a fail-closed governance
  boundary, require each adopter to populate all five hierarchy levels and exact
  hard-constraint references, and admit optimization only after its own
  privacy/consent/data-quality review
- **Rollback strategy:** Revert the source commit and exports together before
  any adopter persists these records. Do not flatten stored child nodes into a
  global vector or treat a missing contract as permission to optimize.
- **Evidence-pack location:** This file

## Closure mapping

Source commit `64d87fdf18c2a464f0c7486e27564fa392f52c70` implements the three
checked ledger requirements:

1. `TASTE_HIERARCHY_LEVELS` fixes the exact product → tenant → locale →
   expert-cohort → user order. Every child must reference a node at the
   immediately broader level, so a minority cohort or user cannot be silently
   collapsed into one majority vector.
2. The policy requires bounded differential privacy, a per-subject contribution
   cap, independent aggregate and user sample floors, an uncertainty threshold,
   opt-out and deletion support, and a manipulation-detection reference.
   Undersampled, uncertain, opted-out, deleted, or flagged nodes are excluded
   from optimization and routed to broader fallback.
3. Safety, rights, factuality, and accessibility are an exact separate
   constraint vocabulary with independently referenced policies. They are never
   preference-vector entries and cannot be traded against taste score.

This is a governance definition and evaluator, not a trained taste model or
production preference corpus.

## Verification record

The current refresh ran against repository commit
`47adfe1d4b4e4017a141faa785fdc0980cf18de7` on `app-dev-server`, Linux
`6.8.0-134-generic` x86_64, Node.js `v24.15.0`, pnpm `10.25.0`, TypeScript
`6.0.3`, ESLint `10.4.0`, and Vitest `4.1.7`. No model/provider credential,
database, or customer data was used.

| UTC interval                                      | Exit | Exact command and result                                                                                                                                                                                      |
| ------------------------------------------------- | ---: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 2026-07-29T11:21:38.029Z–2026-07-29T11:22:05.706Z |    0 | `pnpm verify:contracts:hierarchical-taste-governance` — targeted ESLint passed with zero warnings; the focused contract suite passed 15/15; `libs/contracts/tsconfig.lib.json` production typechecking passed |

The implementation publication at `2026-07-24T14:51:44Z` also passed the
targeted contracts build and the repository's staged gates. The current
task-scoped command above is the admitted refresh; it does not rely on an Nx
cache or a historical pass.

## Test and negative evidence

- **Value/contract:** The positive case requires the complete five-level
  hierarchy, exact immediate parentage, and five usable nodes.
- **Negative/adversarial:** Parameterized fixtures remove each of the five
  levels; another binds locale directly to product; five fixtures independently
  exercise insufficient data, excess uncertainty, opt-out, deletion, and
  manipulation fallback; malformed privacy/consent controls fail schema
  admission; duplicate identities produce a deterministic blocker.
- **Hard-constraint non-substitution:** The test requires exactly safety,
  rights, factuality, and accessibility outside the preference vector.
- **Integration/E2E/UI/accessibility/performance:** Inapplicable to this
  schema-only package. No persistence adapter, API route, rendered surface,
  accessibility behavior, production data aggregation, training job, or latency
  boundary changed. Product adopters must add those avenues at their invoked
  boundary.

## Artifact, authority, and blocker disposition

| Current artifact                                                  | SHA-256                                                            |
| ----------------------------------------------------------------- | ------------------------------------------------------------------ |
| `libs/contracts/src/common/hierarchical-taste-governance.ts`      | `b0c6382c722fbb525b285eaf2264e6ea18d528f628f99de870f53e4b0da11591` |
| `libs/contracts/src/common/hierarchical-taste-governance.spec.ts` | `1ce1ec83d6e76a230c2cf8b8a2ece5171db535fa09d117cac4d768a9d0bb77d4` |
| `libs/contracts/src/common/index.ts`                              | `a557ed7f6dc5614b63cf60fc33ad6109c5831757a845125d016df710dd5e0d25` |
| `package.json`                                                    | `c6f342a2399a4708ca7dcbe9d0f484f5da8915dc67c6a01cd10bc62884ef5c10` |
| `.github/workflows/content-slot-contract.yml`                     | `37e02a066006145bd238e8a89cd250d3d1149da372f81a38dfefc8469d550b19` |

- There is no artifact release, source/canon/rubric change, production policy
  instance, runtime placement, screenshot, or media probe for this contract-only
  package.
- No policy requires a human reviewer signature to publish the schema. No human
  approval is fabricated; future production aggregation/training requires its
  own privacy, consent, and product authority.
- No P2-003 implementation blocker remains. Production taste data, learned
  parameters, subgroup outcomes, and adoption evidence are deliberately not
  claimed by this package and must be supplied by an adopting product.
- Generated capability/status views do not advertise a production taste model.
  The completed-work-package admission verifier derives P2-003's evidence status
  from the checked ledger state and this task-specific pack; no generated green
  production claim is hand-edited.
