---
name: L4 Platform Kit - {{instance_name}}
description: L4 platform kit for {{instance_name}}. Branches by Q6 posture - greenfield (this deployment scaffolds the kit), partial-internal (extends an existing one), mature-internal-mirror (mirrors from elsewhere), mature-external-mirror (mirrors from external source), or mirror-this-kit (kit eats its own output). Operator's Q6 answer determines which sections are filled.
type: layer-artifact
layer: L4
populated_from: Q6 (platform kit posture), Q5 (the contract this kit implements)
---

# L4 Platform Kit - {{instance_name}}

- **Last reviewed:** {{capture_date}}
- **Review cadence:** quarterly + on every L3 contract revision + on every model bump
- **Status:** active

> *Build-flavored template. The maturity rows below name build-mode kit components (prompt library, eval harness, guardrail runtime, etc.). Operator / decider / creator deployments use the same toolkit shape with translated content per layer (per ADR-0006). The deploy skill renders the mode that matches Q1.*

## Maturity self-assessment

| Aspect | State | Evidence |
|--------|-------|----------|
| Posture decided (one of five from Q6) | none / stubbed / partial / mature | ... |
| L3 contract implemented in code | none / stubbed / partial / mature | ... |
| Prompt library exists | none / stubbed / partial / mature | ... |
| Eval harness exists | none / stubbed / partial / mature | ... |
| Guardrail runtime exists | none / stubbed / partial / mature | ... |
| Telemetry plumbing exists | none / stubbed / partial / mature | ... |
| Mirror discipline (if any source exists) | none / stubbed / partial / mature | ... |

A mature L4 has every kit component live and at least one L5 instance consuming it. A partial L4 has some components but not all; the gap is named per row.

## Posture (from Q6)

**Selected posture:** `{{platform_kit_posture}}`

The posture determines which sections below apply. Sections that do not apply to the selected posture should read: "N/A - posture is `{{posture}}`; this section applies only to `{{other_posture}}`."

---

## Branch A: posture = `greenfield`

This deployment scaffolds the platform kit. Use this branch when no kit exists upstream.

### Kit components to scaffold

- **Prompt library** at `kit/prompts/`
  - One prompt file per capability the L5 instances need
  - Frontmatter: `Last reviewed`, `Review cadence: quarterly + on model bump`, `Status`
  - Versioned by content hash; `prompt_version` telemetry field references the hash
- **Eval harness** at `kit/eval-harness/`
  - Reads eval dataset from `kit/eval-data/`
  - Runs methodology from L3 contract; emits scores against L3 ship thresholds
  - CI-runnable; pre-merge gate
- **Guardrail runtime** at `kit/guardrails/`
  - Four layers per L3 contract (input, prompt, output, post-hoc)
  - Each guardrail references the L2 red line it enforces
- **Telemetry plumbing** at `kit/telemetry/`
  - Emits the schema named in L3 contract
  - Destination: {{telemetry_destination_from_Q9}}
- **L3 contract artifact** at `kit/contracts/{{instance_name}}-contract.json`
  - Machine-readable form of `policies/framework-contract.md`
  - Versioned alongside the prompt library

### Initial ADRs the scaffolding requires

The deploy skill should write ADR stubs for the following decisions; operator fills the rationale:

- ADR-{NNNN}: model family and size choice for `{{instance_name}}`
- ADR-{NNNN}: prompt library structure (one-file-per-capability vs. composed-from-fragments)
- ADR-{NNNN}: eval harness implementation choice (custom vs. {{eval_framework}})

### Mirror posture for L5 consumers

This kit is the source. L5 instances mirror from `kit/` into their own trees with `MIRRORED FROM: kit/{component}/` headers. Updates flow kit-to-consumer via re-sync; consumers do not push back into the kit.

---

## Branch B: posture = `partial-internal`

A partial kit exists at `{{source_path}}`. This deployment extends it.

### Components to inherit from `{{source_path}}`

List the components already present in the source, with current maturity:

| Component | Source path | Maturity at source | Action for this deployment |
|-----------|-------------|-------------------|-----------------------------|
| Prompt library | {{source}}/prompts/ | mature | mirror as-is |
| Eval harness | {{source}}/eval/ | partial | extend with {{additional_evals}} |
| Guardrail runtime | {{source}}/guardrails/ | none | scaffold per Branch A |
| Telemetry plumbing | {{source}}/telemetry/ | mature | mirror as-is |
| L3 contract | {{source}}/contracts/ | partial | extend per `policies/framework-contract.md` |

### Mirror direction

`{{source_path}}` -> `kit/`. One-way. Updates at source flow to this deployment via scheduled re-sync; this deployment does not push back unless an explicit ADR authorizes it.

### ADRs needed

- ADR-{NNNN}: extension scope (what we add vs. what stays at source)
- ADR-{NNNN}: re-sync cadence and conflict resolution

---

## Branch C: posture = `mature-internal-mirror`

A mature kit exists at `{{source_path}}`. This deployment mirrors from it.

### Mirror manifest

| Component | Source path | Mirror path | Last sync | Drift status |
|-----------|-------------|-------------|-----------|--------------|
| Prompt library | {{source}}/prompts/ | kit/prompts/ | {{date}} | live / declared-but-inactive |
| Eval harness | {{source}}/eval/ | kit/eval-harness/ | {{date}} | live / declared-but-inactive |
| Guardrail runtime | {{source}}/guardrails/ | kit/guardrails/ | {{date}} | live / declared-but-inactive |
| Telemetry plumbing | {{source}}/telemetry/ | kit/telemetry/ | {{date}} | live / declared-but-inactive |
| L3 contract | {{source}}/contracts/ | kit/contracts/ | {{date}} | live / declared-but-inactive |

Each mirrored file carries `MIRRORED FROM: {{source}}/...` as the first non-frontmatter line, plus a sync date.

### Drift discipline

- Re-sync cadence: {{sync_cadence}}
- Drift detection: `architect-kit-mirror` skill runs at {{cadence}}; output goes to `inbox/from-{{source_pod}}.md`
- Resolution path: drift triggers a ticket; resolution either re-syncs (clean) or supersedes the mirror with an ADR

---

## Branch D: posture = `mature-external-mirror`

A mature kit exists outside this organization (open source or partner). This deployment mirrors from it.

### External source

- **Source:** {{external_source_url_or_repo}}
- **License:** {{license}}
- **Mirror cadence:** {{cadence}}
- **Local-only modifications:** {{modifications_overlay_path}}

### Mirror manifest

Same shape as Branch C but with external paths.

### Compliance considerations

External-source mirroring requires:
- License compliance check (logged in `decisions/ADR-{NNNN}-{external-mirror}.md`)
- Security review of external code if any executable component
- Update to `policies/philosophy.md` (L2) if external code introduces telemetry or PII handling that does not match local L2

---

## Branch E: posture = `mirror-this-kit`

The deployment uses the deployment kit (the same kit that landed this instance) as the platform kit. The kit eats its own output.

### Mirror manifest

| Component | Source path | Mirror path |
|-----------|-------------|-------------|
| Skills | (kit)/skills/ | kit/skills/ |
| Templates | (kit)/templates/ | kit/templates/ |
| Bootstrap brief | (kit)/BOOTSTRAP-BRIEF.md | kit/STANDARD.md |
| Skill inventory | (kit)/SKILL-INVENTORY.md | kit/INVENTORY.md |

### Recursive consideration

This branch creates a mirror-of-mirror situation when L5 instances mirror from this L4 kit. The `architect-kit-mirror` skill must reason about mirror chains, not just mirror pairs. When an upstream change lands, downstream instances need staged re-sync.

---

## Reproducibility pin

The L4 platform kit pins, per L3 contract:

- `kit_version` = {{semver_or_hash}}
- `model_family` = {{model_family}}
- `prompt_library_version` = {{hash_or_tag}}
- `eval_harness_version` = {{hash_or_tag}}

Bumping `kit_version` invalidates downstream eval baselines and triggers re-evaluation across L5 consumers.

## Inheritance and dependencies

This L4 implements: `policies/framework-contract.md` (L3) as concrete code.

This L4 is inherited by: every L5 instance dossier (via mirror or via direct dependency).

## Cross-references inside this instance

- `policies/framework-contract.md` (L3) - the contract this kit implements
- `decisions/` - ADRs that touch kit posture, mirror direction, or external source live here
- `inbox/from-{{source_pod}}.md` - inbox for mirror sync events (if posture B, C, D, or E)
- `skills/architect-kit-mirror/` - the discipline-encoding skill for mirror operations
