@@ -12,6 +12,72 @@ follow-up #1).
1212
1313---
1414
15+ ## 0. Session-start prompt (copy-paste)
16+
17+ ```
18+ Implement L62: the CCX tolerance tier for isolated intersections.
19+
20+ READ FIRST, in order — then say what you're going to do before touching code:
21+ 1. docs/superpowers/issues/2026-08-18-ccx-3d-near-miss-tolerance-tier.md — the
22+ whole spec. §1 (membership contract), §4.2 (strict-envelope jurisdiction) and
23+ §4.6 (sub-level-set component discriminator) are OWNER-DECIDED: do not
24+ relitigate them, implement them.
25+ 2. git show 5d05ddc -- mmcore/numeric/intersection/ccx/_bez_ccx4.py — the
26+ doctrine being re-scoped (not reverted).
27+ 3. mmcore/numeric/intersection/ccx/_bez_ccx4.py — bez_ccx docstring (two-phase
28+ architecture), _strict_residual_ok (~:253), the L47 tolerance-overlap
29+ certificate (~:553), the typed-outcome plumbing (~:1266-1330).
30+ 4. mmcore/numeric/bern_sq_dist.py + mmcore/numeric/_bez_closest_point.py — the
31+ minimum-bounding machinery the tier should reuse, not reinvent.
32+ 5. docs/superpowers/specs/2026-07-12-theorem-first-overlap-methodology.md §2.
33+
34+ DECIDED — inherit, don't re-derive:
35+ - Membership is d_min <= tol (closed inequality) at every tol; topology correct
36+ at every tol. The strict roundoff envelope has NO membership role: it grades
37+ the metadata tag, powers the sub-atol topology guards, and covers the
38+ |coords| >~ atol/eps straddle tail (typed cannot-decide, never a guess).
39+ - Classify by connected components of {D^2 <= tol^2}: boundary-anchored both
40+ ends -> L47 overlap path; compact interior -> isolated tier (certified zeros
41+ inside -> exact roots only; zero-free -> exactly ONE contact at the certified
42+ argmin; elongated vs the param-tol mapping -> typed grazing band); single
43+ boundary touch -> endpoint contact (Phase 1 lifted from level 0 to tol^2).
44+ - certification: 'exact'|'tolerance' is metadata only.
45+
46+ ASK THE OWNER when you reach them (do not decide alone):
47+ - the band-bar: the relative rule (flip flanks <= K x median in-band residual
48+ => coincidence noise) — acceptance + the value of K;
49+ - the elongation bar separating point contact from typed band;
50+ - whether the tier applies in 2D (expected: yes, same predicate).
51+
52+ GATES — all must hold before calling it done:
53+ - tests/test_nccx4.py: the two strict xfails FIRE when the fix works — remove
54+ the pins; test_ground_truth 25/25, dedup count == 25.
55+ - A parameterized tol-scaling test over (gap, tol): exactly one intersection
56+ iff tol >= gap, count never exceeds one (values are instances, not constants).
57+ - A translated large-offset tolerance-contact case (acceptance must be
58+ translation-invariant; do not reopen the hole 5d05ddc closed).
59+ - tests/test_bez_ccx4.py stays green unchanged — the overlap/point boundary and
60+ the never-merge invariants must not move.
61+ - Full suite: python -m pytest tests -q -m "not slow" from the REPO ROOT,
62+ non-increasing; tools/check_imports.py and tools/check_layering.py exit 0.
63+
64+ DISCIPLINE:
65+ - Dedicated branch off tiny; L62 in commit subjects; confirm L62 is the next
66+ free ledger ID first (last known used: L61).
67+ - OUT OF SCOPE, do not touch: _bez_ssx5.py / _deflate.py (Q13/Q14); the
68+ linux-scoped FP-sensitivity xfails in test_csx4_exactness_contract.py /
69+ test_csx_overlap_tier.py; centering removal (separate empirical A/B item —
70+ the tier must work WITH the current certificate).
71+ - tests/test_nccx4.py builds fixtures by exec'ing the head of
72+ examples/ccx/multiple_int_3d.py, split at the line
73+ "from mmcore.numeric.intersection.ccx import" — keep that file's data section
74+ and marker stable.
75+ - Env: .venv/bin/python (3.14); pytest from the repo root; example viewers run
76+ from the poetry venv. CI on push: 15-leg build + gates (~50 min).
77+ ```
78+
79+ ---
80+
1581## 1. The contract (normative — owner formulation, 2026-08-18)
1682
1783Intersection existence is tolerance-determined, the standard CAD semantics:
0 commit comments