# Style — Codex (per FVW v8 §22 + §42)

**Module ID:** `oscar.style`
**Status:** Constitutional (per §42 + latent doctrine, locally ratified).

## C1 — Behaviour Inventory
- `app/src/style/StyleIngestion.ts` (text extraction + features)
- `app/src/data/models/StyleProfile.ts`

## C2 — State Machine
Ingestion: file → text → features → profile → applied

## C3 — Side Effect List
- IDB write to style_profiles (DB v6)

## C4 — Input Validation Contract
- File input is a PDF (verified via File.type === 'application/pdf')

## C5 — Failure Modes
- Empty extracted text → empty profile
- Non-PDF files rejected

## C6 — User Simulation List
1. Upload PDF
2. Read extracted text length
3. See features (avg sentence length, vocab density, passive ratio)
4. Profile saved

## C7 — Reproducibility Test
Deterministic for same PDF.

## C8 — Shape Matrix
| Surface | Modes | Chips | States |
|---|---|---|---|
| Style ingestion | upload, ingest, profile | save, apply | — |

## C9 — State Shape Inventory
### C9.1 localStorage
None
### C9.2 In-memory
- StyleMetrics computed on demand
### C9.3 IDB
- style_profiles store (DB v6)

---

## END OF STYLE CODEX
