# Project evaluations — LexAI

> Small, repeatable checks. Prefer a deterministic command or test over a prose reminder. The standing checks below are the baseline gates for any change.

## Standing gates (run on every change)

### E-BASE-01 — Typecheck

- **How to run:** `npm run typecheck`
- **Pass condition:** `tsc --noEmit` exits 0.
- **Cost:** fast.

### E-BASE-02 — Unit tests

- **How to run:** `npm test -- --run`
- **Pass condition:** vitest exits 0.
- **Note:** current unit tests exercise the `chrome.storage` mock, not the real handlers — passing does **not** prove provider routing or key decrypt. See TASKS #8.

### E-BASE-03 — Production build

- **How to run:** `npm run build`
- **Pass condition:** builds to `.output/chrome-mv3/`; bundle roughly ~166 KB baseline.
- **Cost:** fast (~3s).

### E-BASE-04 — Manual real-page check (behavior changes)

- **How to run:** `npm run build` → load unpacked `.output/chrome-mv3` → select text on a textarea and a contenteditable site → run an action → Replace.
- **Pass condition:** toolbar shows, result modal returns, Replace edits both target types.
- **Why manual:** selection/replace is DOM-timing-sensitive and has no automated coverage.

## Active failure-derived checks

_No failure-derived checks yet. Add one here when a verified regression gives a deterministic trigger — e.g. a guard that fails if the built `content.js` still contains `[LexAI` logs (T-03), or a test asserting the `onMessage` listener returns `true`._

## Eval template

```markdown
### E-YYYY-MM-DD-NN — [short check name]
- **Prevents:** [lesson ID and failure mode]
- **How to run:** `[exact command or steps]`
- **Pass condition:** [observable]
- **Cost:** fast | moderate | expensive
- **Last verified:** [date + result]
```

## Retired checks

_Move obsolete checks here with the reason and the lesson they covered._
