---
name: L3 Framework Contract - {{instance_name}}
description: L3 technical contract every component of {{instance_name}} implements. Names eval methodology and thresholds, per-call cost ceiling, telemetry schema (the reproducibility quadruple as floor), auth model, and guardrail layering. Every L5 instance inherits this.
type: layer-artifact
layer: L3
populated_from: Q5 (framework contract), Q4 (red lines drive guardrail layering), Q9 (compliance shapes telemetry and auth)
---

# L3 Framework Contract - {{instance_name}}

- **Last reviewed:** {{capture_date}}
- **Review cadence:** quarterly + on every model bump + on every cost ceiling breach
- **Status:** active

> *Build-flavored template. The maturity rows below name build-mode aspects (eval methodology, guardrail layering, etc.). Operator / decider / creator deployments use the same contract shape with translated content per layer (per ADR-0006). The deploy skill renders the mode that matches Q1.*

## Maturity self-assessment

| Aspect | State | Evidence |
|--------|-------|----------|
| Eval methodology specified | none / stubbed / partial / mature | ... |
| Eval thresholds quantified | none / stubbed / partial / mature | ... |
| Per-call cost ceiling set | none / stubbed / partial / mature | ... |
| Telemetry schema defined | none / stubbed / partial / mature | ... |
| Auth model decided | none / stubbed / partial / mature | ... |
| Guardrail layering defined | none / stubbed / partial / mature | ... |

A mature L3 has every aspect concrete enough that an engineer building a new instance can implement the contract without further interpretation. A stubbed L3 has section headers but no values; that is a failed L3.

**No eval baseline equals no ship.** This is policy, not preference. A stubbed eval section blocks every L5 instance shipping under this contract.

## Eval methodology (from Q5)

- **Methodology:** {{eval_methodology}}
- **Closes-by date (if `none-yet`):** {{closes_by_date}}
- **Eval dataset source:** {{dataset_origin}}
- **Eval dataset size:** {{n_examples}}
- **Eval refresh cadence:** {{refresh_cadence}}
- **Score thresholds for ship:** {{ship_threshold_per_metric}}

Example shape: "Methodology: `hybrid` - LLM-judge for fluency / faithfulness on {{n_examples}} curated examples + human-review on a 10% sample. Dataset: extracted from {{production_log}} between {{date_range}}, redacted via {{redaction_pipeline}}. Refresh: quarterly + on every model bump. Ship threshold: faithfulness >= 0.92, fluency >= 0.85, human-pass >= 0.95."

If `none-yet`, this section names a closes-by date and the L5 instances under this contract ship under a temporary `pre-eval` status that surfaces in every dashboard.

## Per-call cost ceiling (from Q5)

- **Ceiling:** ${{cost_ceiling_dollars}}
- **Method:** {{measurement_method}}
- **Action on breach:** {{breach_action}}
- **Override path:** {{override_when_legitimate}}

Example: "Ceiling: $0.12 per call. Measurement: aggregate token cost across all model calls in one component invocation; tools-call costs included; latency cost not included. Action on breach: log + soft-fail + alert {{ops_team}}; second consecutive breach hard-fails the call. Override: `COST-EXTEND-{NNNN}` ticket signed by {{owner_role}} for 7 days; logged in `runbooks/`."

## Telemetry schema (from Q5 + Q9)

Every component invocation emits, at minimum, the **reproducibility quadruple**:

- `model_version` - exact model identifier including version suffix
- `prompt_version` - hash or tag of the prompt template
- `tools_version` - identifier for the tool set, including each tool's version
- `data_snapshot_version` - identifier for any data the component conditioned on

Plus, for this contract:

- `request_id` - unique per invocation
- `tenant_id` - if multi-tenant; required if Q9 names any compliance regime
- `latency_ttfb_ms` and `latency_total_ms`
- `token_input` and `token_output`
- `cost_estimate_usd` - computed against the cost ceiling
- `quality_signal` - eval score, user explicit, user implicit, or null
- `guardrail_trips` - list of guardrail layer + tier if any
- {{additional_fields_required_by_compliance}}

Telemetry destination: {{telemetry_destination}}
Retention per Q9 obligations: {{telemetry_retention}}

## Auth model (from Q5)

- **Model:** {{auth_model}}
- **Caller identity carrier:** {{identity_token_format}}
- **Tenant scoping:** {{tenant_scoping_mechanism}}
- **Token issuance:** {{issuance_path}}
- **Token rotation:** {{rotation_cadence}}
- **Anonymous calls:** {{permitted_or_rejected}}

Example: "Model: `tenant-scoped-jwt`. Carrier: bearer JWT in `Authorization` header; signed by {{idp_name}}. Tenant scoping: `tenant_id` claim mandatory; mismatched claim hard-rejects. Issuance: {{issuance_path}}. Rotation: 90 days. Anonymous: rejected at the API gateway."

## Guardrail layering (from Q4 red lines)

The four guardrail layers, each filling its role. Single-layer defenses fail silently; four-layer defenses catch what any one would miss.

| Layer | Purpose | Implementation for `{{instance_name}}` |
|-------|---------|---------------------------------------|
| Input | Reject obviously bad inputs before model call | {{input_guardrail_implementation}} |
| Prompt | System prompt content that sets red lines for the model | {{prompt_guardrail_implementation}} |
| Output | Inspect output before returning to caller | {{output_guardrail_implementation}} |
| Post-hoc | Async / batch checks on logged outputs | {{posthoc_guardrail_implementation}} |

Each implementation references the red lines from L2 it enforces. Output that trips a guardrail is rejected, not silently fixed; rejection is logged as a `guardrail_trips` telemetry field.

## Reproducibility note

This contract pins these versions for V1 ship:

- Model: {{pinned_model_version}}
- Prompt template version: {{pinned_prompt_version}}
- Tool set version: {{pinned_tools_version}}
- Eval dataset snapshot: {{pinned_eval_data_snapshot}}

Bumping any pin invalidates the eval baseline; re-run eval against the new pin before shipping.

## Inheritance and dependencies

This L3 inherits from: `policies/strategy.md` (L0 primary metric drives ship thresholds), `policies/philosophy.md` (L2 red lines drive guardrail layering).

This L3 is inherited by: every L5 instance dossier; the L4 platform kit implements this contract as concrete code.

## Cross-references inside this instance

- `policies/philosophy.md` (L2) - red lines this contract enforces
- `kit/contracts/{{instance_name}}-contract.json` (L4) - machine-readable form of this contract for kit consumers
- `kit/eval-harness/` (L4) - the eval harness that runs against this contract
- `kit/guardrails/` (L4) - the guardrail runtime that enforces this contract
- `decisions/` - ADRs that touch model choice, eval methodology, or cost ceiling live here
