# Two-Stage Hybrid Spec

**Owner:** frame-divergence-gate (E8). **Scope of this file:** the formal specification for combining Stage 1 and Stage 2 into one gate verdict. Dimension semantics live in `KUHNIAN_DIMENSIONS.md`. Index math lives in `DIVERGENCE_INDEX_CALCULUS.md`. Theta_q values live in `THETA_Q_CALIBRATION_DEFAULTS.md`. Runtime detectors live in `RUNTIME_CONVERGENCE_DETECTORS.md`. Zero overlap.

## Why hybrid is load-bearing

Kuhn's mature position, summarized in SEP and Sankey, treats incommensurability as **local and partial**. Translation failure is restricted to a small set of interdefined concepts; the rest of the frame remains tractable across translators. Kitcher (1993) and Bernstein (1983) extend this: rational bridging is possible across frames, just not uniform. These findings disqualify pure binary gate logic -- frames are never wholly commensurable or wholly incommensurable. They also disqualify pure continuous gate logic -- a single scalar cannot detect identity of declared axioms when the shared-concept surface is incidentally broad.

The gate therefore combines a binary structural check on **declared axioms** with a continuous divergence index on the **shared-concept surface**. Stage 1 catches declared-axiom identity; Stage 2 catches gradient similarity that declared axioms miss.

## Combining rule

The gate verdict function is:

```
verdict(S1, S2, preconditions) =
  REFUSED  if any precondition fails
  PASS     if S1 = PASS AND S2 = PASS
  FAIL     otherwise
```

This is an AND gate over the two stages. There is **no voting, no weighting, no tiebreaker**. Either stage failing produces overall FAIL.

## Preconditions (checked before either stage runs)

1. `e1_cleared = true` from Isolation Verifier.
2. Loaded-frame handle present from Frame Host.
3. RAM-frame declaration parseable on methodological, semantic, ontological dimensions.
4. `theta_q` supplied for `question_type` with `threshold_source` tag.

Any failure -> `REFUSED` with the corresponding `refusal_reason` (`E1_NOT_CLEARED`, `FRAME_HOST_NOT_LOADED`, `RAM_FRAME_UNPARSEABLE`, `MISSING_THETA`, or `REGISTRY_WRITE_FAILURE`).

## Refusal semantics

`REFUSED` is distinct from `FAIL`. `FAIL` means the two stages ran and the frame pair did not clear the bar. `REFUSED` means a precondition was missing and no gate decision was attempted. Both outcomes block the audit; the distinction matters for the Frame Registry record and for downstream diagnostics.

## Anti-collapse discipline

Three failure patterns the hybrid spec exists to prevent:

- **Pure binary collapse:** "They differ on one dimension, therefore PASS." Rejected: gradient similarity within Stage 1 PASS is exactly what Stage 2 catches.
- **Pure continuous collapse:** "D is high, therefore PASS." Rejected: identical declared axioms can coexist with a high D when the shared-concept surface is narrow.
- **Stage-skip collapse:** "Stage 1 was clean, no need for Stage 2" (or vice versa). Rejected: both stages are evaluated independently on every question.

If a downstream caller requests a "single-stage decision," refuse and cite this spec.

## Output shape

The gate emits `{verdict, frame_pair_id, stage1_binary_verdict, stage2_divergence_index, stage2_verdict, refusal_reason_if_any}`. The Frame Registry record is written in Step 6 of the operating logic and seals the decision trail.
