Continuous distance до edge
7.03 измеряет отношение content geometry к явно выбранной keep-in boundary. Никакой edge reference не выводится из content автоматически.
Canvas trim / safe keep-in / explicit custom rect.
Signed raw + optional ShortN clearance.
Only via explicit model.
RectKeepInBoundaryRef
Baseline reference всегда имеет внутреннюю сторону — именно относительно неё определяется знак.
RectKeepInBoundaryRef {
referenceRef,
canvasRef,
referenceKind:
CANVAS_TRIM |
SAFE_KEEP_IN |
CUSTOM_RECT_KEEP_IN,
rect: {
x0, y0, x1, y1
},
unit,
coordinateFrame:
CANVAS_TOP_LEFT_Y_DOWN,
sourceOwner,
confidence,
provenance
}
Какие edges реально измерять
Query обязан явно задать subset edges: это не скрытый универсальный all-edges vote.
EdgeClearanceQuery {
queryRef,
contentRef,
referenceRef,
edges: [
TOP | RIGHT |
BOTTOM | LEFT
],
geometryMode:
FULL_SUPPORT |
BOUNDING_BOX |
ANCHOR_SET |
CUSTOM_REGION,
geometryRef?,
anchorRefs[]?,
customRegionRef?,
missingGeometryPolicy,
normalizationMode:
RAW_ONLY |
RAW_AND_SHORT_N,
normalizationContextRef?,
confidence,
provenance
}
Знак несёт semantic relation
Для прямоугольной keep-in boundary формула exact и ориентирована внутрь.
Minimum signed clearance
Одна агрегированная величина допустима только как минимум по явно выбранным edges.
Unsigned distance отдельно
`abs(clearance)` полезен для proximity, но не заменяет signed metric.
Evidence strength сохраняется
Прямоугольный edge distance зависит только от extrema, но источник extrema всё равно важен.
FULL_SUPPORT
Exact/declared support extrema от geometry owner.
BOUNDING_BOX
Approximation unless bbox itself is canonical support extent.
ANCHOR_SET
Minimum relation only among explicitly protected/query anchors.
CUSTOM_REGION
Owner supplies per-edge signed distances.
Нормализация через 6.03
Clearance — Euclidean length, поэтому используется только isotropic short-side normalization.
7.01 и 7.02 можно сверять, но не пере-владеть
Одни и те же extrema дают полезные invariant cross-checks.
Bridge to 7.02
Только numeric cross-check. Bleed intent/compliance остаётся 7.02.
Bridge to 7.01
При том же safe rect/evidence. Не создавать второй independent vote.
Tension — policy-dependent descriptor
Без explicit model proximity нельзя называть `TIGHT`, `NEAR` или `RELAXED`.
EdgeTensionModel {
modelRef,
tightMaxShortN:
finite > 0,
nearMaxShortN:
finite > tightMaxShortN,
applyTo:
INSIDE_KEEP_IN_CLEARANCE,
source,
confidence,
provenance
}
CROSSED / CONTACT / TIGHT / NEAR / RELAXED
Класс описывает режим proximity, а не качество композиции.
Коррелированные формы не голосуют отдельно
Raw, normalized и absolute clearance — representations одной evidence family.
MetricResult {
key,
owner: "Compo7.03",
value,
applicability,
confidence,
status,
provenance,
scoringGroup:
"edge-clearance-local",
independentVoteAllowed:
false,
dependsOn[],
derivedFrom[],
evidence
}
Что остаётся дальше
7.03 — measurement owner, но не policy/repair engine.
| Question | Owner |
|---|---|
| Где zone/boundary? | 6.00 / 7.00 / 7.05 source owner |
| Hard safe containment? | 7.01 |
| Bleed intent / exit permission? | 7.02 |
| Signed clearance / tension class? | 7.03 |
| Какая role должна иметь какой target/model? | 7.04 |
| Dynamic platform overlay? | 7.05 |
| Violation / repair / score? | 7.06 |
Измеряем, но не двигаем
7.03 не должен превращать distance measurement в скрытый layout solver.
Visual Lab
Положительный, нулевой и отрицательный clearance должны читаться как разные состояния.
Clearance/tension regression
Проверяем все четыре edges, sign/contact/crossing, minimum edge, geometry modes, ShortN invariance, 7.01/7.02 bridges, explicit tension model и ownership barriers.
DATA FOR LAYOUT ENGINE
Machine-readable 7.03 contract.
{
"module": "Compo 7.03",
"name": "edge_clearance_and_edge_tension",
"version": "1.1-final",
"canonical_main_title": "Edge clearance / edge tension",
"topic": "07_ПОЛЯ_SAFE_ZONES_И_BLEED",
"scope": "SIGNED_CONTENT_TO_EDGE_CLEARANCE_NORMALIZATION_NEAREST_EDGE_AND_POLICY_DEPENDENT_TENSION_CLASS",
"consumes": [
"explicit owner-qualified RectKeepInBoundaryRef or custom EdgeReferenceSet",
"content geometry/support extrema from owner-qualified modules",
"optional Compo6.03.CanvasNormalizationContext for SHORT_N output",
"optional Compo7.00 zone geometry as reference only",
"optional Compo7.01 containment evidence for lineage/cross-check only",
"optional Compo7.02 trim crossing evidence for lineage/cross-check only",
"explicit EdgeClearanceQuery",
"optional explicit EdgeTensionModel"
],
"provides": [
"RectKeepInBoundaryRef",
"EdgeClearanceQuery",
"PerEdgeClearanceResult",
"EdgeClearanceDescriptor",
"EdgeTensionModel",
"EdgeTensionDescriptor",
"MetricResult[edge.clearance.signedRaw]",
"MetricResult[edge.clearance.signedShortN]",
"MetricResult[edge.clearance.minimumSignedRaw]",
"MetricResult[edge.clearance.minimumSignedShortN]",
"MetricResult[edge.clearance.absoluteBoundaryDistanceRaw]",
"MetricResult[edge.clearance.absoluteBoundaryDistanceShortN]",
"edgeMetricRef for downstream 7.04/7.06"
],
"owns_metrics": [
"edge.clearance.signedRaw",
"edge.clearance.signedShortN",
"edge.clearance.minimumSignedRaw",
"edge.clearance.minimumSignedShortN",
"edge.clearance.absoluteBoundaryDistanceRaw",
"edge.clearance.absoluteBoundaryDistanceShortN"
],
"descriptors_only": [
"edge.clearance.referenceRef",
"edge.clearance.referenceKind",
"edge.clearance.edge",
"edge.clearance.relation",
"edge.clearance.nearestCriticalEdge",
"edge.clearance.geometryMode",
"edge.clearance.approximation",
"edge.clearance.status",
"edge.tension.modelRef",
"edge.tension.class",
"edge.tension.status",
"edge.tension.confidence"
],
"rect_keep_in_boundary_schema": {
"referenceRef": "stable owner-qualified ref",
"canvasRef": "canvas identity",
"referenceKind": "CANVAS_TRIM|SAFE_KEEP_IN|CUSTOM_RECT_KEEP_IN",
"rect": "{x0,y0,x1,y1} finite with x1>=x0 and y1>=y0",
"unit": "PX|CANVAS_UNIT|MM",
"coordinateFrame": "CANVAS_TOP_LEFT_Y_DOWN",
"sourceOwner": "Compo6.00 / Compo7.00 / explicit external owner",
"confidence": "0..1",
"provenance": "object",
"keep_in_semantics": "positive signed clearance points toward the interior of this rectangle"
},
"edge_clearance_query_schema": {
"queryRef": "stable ref",
"contentRef": "owner-qualified content/object ref",
"referenceRef": "RectKeepInBoundaryRef or custom EdgeReferenceSet",
"edges": "non-empty subset of TOP|RIGHT|BOTTOM|LEFT",
"geometryMode": "FULL_SUPPORT|BOUNDING_BOX|ANCHOR_SET|CUSTOM_REGION",
"geometryRef": "required for FULL_SUPPORT/BOUNDING_BOX",
"anchorRefs": "required for ANCHOR_SET",
"customRegionRef": "required for CUSTOM_REGION",
"missingGeometryPolicy": "N_A|INVALID",
"normalizationMode": "RAW_ONLY|RAW_AND_SHORT_N",
"normalizationContextRef": "required for RAW_AND_SHORT_N",
"confidence": "0..1",
"provenance": "object"
},
"signed_clearance_semantics": {
"TOP": "clearance = geometry.minY - reference.y0",
"RIGHT": "clearance = reference.x1 - geometry.maxX",
"BOTTOM": "clearance = reference.y1 - geometry.maxY",
"LEFT": "clearance = geometry.minX - reference.x0",
"positive": "geometry extent lies on keep-in side of that edge",
"zero": "touch/contact",
"negative": "geometry extends beyond that edge",
"relation": "INSIDE_CLEAR if >0; CONTACT if ==0 within numerical EPS; CROSSED if <0",
"minimumSignedClearance": "minimum over explicitly queried edges only",
"nearestCriticalEdge": "edge attaining minimumSignedClearance; lexical edge order breaks exact ties"
},
"absolute_boundary_distance": {
"formula": "abs(signedClearance)",
"meaning": "unsigned perpendicular distance between the queried support extremum and edge line",
"warning": "does not replace signed relation because inside +10 and crossed -10 have the same absolute distance"
},
"geometry_modes": {
"FULL_SUPPORT": "owner supplies exact/declared minX/minY/maxX/maxY extrema of actual support; baseline runtime requires extrema explicitly; approximation=false",
"BOUNDING_BOX": "owner supplies bbox; baseline runtime requires bbox explicitly; approximation=true unless bboxIsCanonicalSupportExtent=true",
"ANCHOR_SET": "per-edge clearance is minimum signed clearance among declared anchors; says nothing about unbound shape support",
"CUSTOM_REGION": "owner adapter supplies per-edge signed clearances directly",
"no_internal_rasterization": "7.03 does not construct alpha masks, contours or crop geometry itself"
},
"normalization": {
"RAW_ONLY": "raw unit follows reference unit",
"RAW_AND_SHORT_N": "signedShortN = signedRaw / CanvasNormalizationContext.shortSide",
"absoluteShortN": "abs(signedRaw)/shortSide",
"minimumSignedShortN": "minimumSignedRaw/shortSide",
"required_context": "same canvas, compatible sourceUnit, positive finite shortSide",
"uv_forbidden": "AXIS_FRACTION_UV is not an Euclidean clearance space"
},
"edge_tension_model_schema": {
"modelRef": "stable explicit policy ref",
"tightMaxShortN": "finite >0",
"nearMaxShortN": "finite > tightMaxShortN",
"applyTo": "INSIDE_KEEP_IN_CLEARANCE",
"source": "STYLE_PRESET|EMPIRICAL|INITIAL_HEURISTIC",
"confidence": "0..1",
"provenance": "object",
"no_default": "if model is absent or ShortN clearance is unavailable, tensionClass=N_A"
},
"edge_tension_classification": {
"CROSSED": "signedShortN < 0",
"CONTACT": "signedShortN == 0 within implementation EPS",
"TIGHT": "0 < signedShortN <= tightMaxShortN",
"NEAR": "tightMaxShortN < signedShortN <= nearMaxShortN",
"RELAXED": "signedShortN > nearMaxShortN",
"N_A": "no compatible normalized clearance or no explicit model",
"important": "class names describe proximity regimes under one model; they do not express good/bad quality"
},
"metric_result_policy": {
"owner": "Compo7.03",
"scoringGroup": "edge-clearance-local",
"independentVoteAllowed": false,
"componentOf": null,
"direct_score": "none in 7.03",
"reason": "raw/normalized/absolute forms are correlated representations of the same edge evidence and must not vote independently"
},
"cross_module_relations": {
"7.01": "for rectangular safe containment, maxOutsideDistance can be cross-checked as max(0,-minimumSignedClearance) over the same queried safe edges, but it remains 7.01 diagnostic lineage",
"7.02": "for one trim edge, outsideDepth can be cross-checked as max(0,-signedClearance), but 7.02 owns bleed semantics and exit compliance",
"7.04": "may choose which reference/edges/tension model apply to a semantic role; 7.03 does not author those choices",
"7.05": "may supply dynamic reference geometry; 7.03 only measures the resolved snapshot",
"7.06": "may convert explicit target/policy deviations into violations/repair/scoring without double-counting correlated clearance metrics"
},
"ownership_map": {
"7.00": "margin/safe/bleed zone geometry",
"7.01": "hard-safe protected-content containment",
"7.02": "bleed/intentional edge-exit policy and outside depth",
"7.03": "continuous signed clearance, normalized clearance, nearest critical edge and policy-dependent tension class",
"7.04": "role-dependent edge/reference/tension-policy selection",
"7.05": "platform overlays and dynamic reference geometry",
"7.06": "violations, repair, target-aware scoring and Topic7 regression"
},
"metric_policy": {
"signed_clearance": "continuous geometric metric",
"absolute_distance": "diagnostic geometric metric",
"tension_class": "policy-dependent descriptor only",
"direct_scoring": "FORBIDDEN in 7.03",
"more_clearance_is_better": "FORBIDDEN",
"less_clearance_is_more_dynamic": "FORBIDDEN",
"contact_is_bad": "FORBIDDEN without downstream target/policy"
},
"hard_constraints": [
"7.03 owns continuous signed clearance to explicit keep-in edge references and policy-dependent edge-tension descriptors only.",
"Clearance reference geometry must be explicit and owner-qualified; 7.03 must not infer safe/trim/grid boundaries from content.",
"Signed clearance is positive on the keep-in side, zero on boundary contact and negative after crossing outward.",
"TOP clearance = minY - yTop; RIGHT = xRight - maxX; BOTTOM = yBottom - maxY; LEFT = minX - xLeft for rectangular keep-in references.",
"For a fully inside object, minimum signed clearance is the nearest keep-in edge clearance.",
"For an object crossing one or more edges, minimum signed clearance is the deepest signed breach among queried edges.",
"A 7.03 signed clearance crossing may numerically imply max(0,-clearance) outside depth, but 7.02 remains owner of bleed outsideDepth and intentional-exit compliance.",
"A 7.01 safe-containment outside-distance diagnostic is not an independent scoring vote beside 7.03 clearance; shared evidence lineage must remain explicit.",
"SHORT_N normalization requires a compatible Compo6.03 CanvasNormalizationContext and divides raw clearance by canvas shortSide.",
"AXIS_FRACTION_UV is forbidden for Euclidean clearance.",
"BOUNDING_BOX mode is approximation evidence; FULL_SUPPORT may use exact extrema supplied by its owner; ANCHOR_SET only describes declared anchors.",
"Missing geometry is N_A or INVALID according explicit query policy; never zero.",
"Edge tension classification requires an explicit EdgeTensionModel; no model means tensionClass=N_A.",
"Tension thresholds are descriptive policy parameters, not universal aesthetic laws.",
"CROSSED / CONTACT / TIGHT / NEAR / RELAXED have no built-in quality ordering.",
"7.03 does not author role-dependent edge targets or thresholds; 7.04 owns role policy selection.",
"7.03 does not own platform overlay lifecycle; 7.05 owns dynamic overlay source geometry.",
"7.03 does not construct violation severity, repair requests or target-aware scores; 7.06 owns them.",
"7.03 does not mutate object geometry.",
"N/A != 0.",
"No beautyScore."
],
"hard_rules": [
"7.03 owns continuous signed clearance to explicit keep-in edge references and policy-dependent edge-tension descriptors only.",
"Clearance reference geometry must be explicit and owner-qualified; 7.03 must not infer safe/trim/grid boundaries from content.",
"Signed clearance is positive on the keep-in side, zero on boundary contact and negative after crossing outward.",
"TOP clearance = minY - yTop; RIGHT = xRight - maxX; BOTTOM = yBottom - maxY; LEFT = minX - xLeft for rectangular keep-in references.",
"For a fully inside object, minimum signed clearance is the nearest keep-in edge clearance.",
"For an object crossing one or more edges, minimum signed clearance is the deepest signed breach among queried edges.",
"A 7.03 signed clearance crossing may numerically imply max(0,-clearance) outside depth, but 7.02 remains owner of bleed outsideDepth and intentional-exit compliance.",
"A 7.01 safe-containment outside-distance diagnostic is not an independent scoring vote beside 7.03 clearance; shared evidence lineage must remain explicit.",
"SHORT_N normalization requires a compatible Compo6.03 CanvasNormalizationContext and divides raw clearance by canvas shortSide.",
"AXIS_FRACTION_UV is forbidden for Euclidean clearance.",
"BOUNDING_BOX mode is approximation evidence; FULL_SUPPORT may use exact extrema supplied by its owner; ANCHOR_SET only describes declared anchors.",
"Missing geometry is N_A or INVALID according explicit query policy; never zero.",
"Edge tension classification requires an explicit EdgeTensionModel; no model means tensionClass=N_A.",
"Tension thresholds are descriptive policy parameters, not universal aesthetic laws.",
"CROSSED / CONTACT / TIGHT / NEAR / RELAXED have no built-in quality ordering.",
"7.03 does not author role-dependent edge targets or thresholds; 7.04 owns role policy selection.",
"7.03 does not own platform overlay lifecycle; 7.05 owns dynamic overlay source geometry.",
"7.03 does not construct violation severity, repair requests or target-aware scores; 7.06 owns them.",
"7.03 does not mutate object geometry.",
"N/A != 0.",
"No beautyScore."
],
"soft_constraints": [],
"preferences": [],
"overrides_allowed_by": [
"7.04 may select a different explicit EdgeTensionModel/reference set for a role",
"7.05 may replace dynamic reference geometry by versioned overlay state",
"neither may silently mutate a 7.03 result already tied to a prior referenceRef/modelRef"
],
"initial_heuristics": {
"numeric_epsilon": {
"value": 1e-12,
"provenance": "IMPLEMENTATION_HEURISTIC",
"note": "only determines numerical zero/contact in the reference runner"
}
},
"candidate_generation": {
"geometry_candidates": "NONE",
"layout_candidates": "NONE",
"reason": "7.03 is a measurement/descriptor owner; repair/candidate generation begins downstream through 7.06 and layout owners"
},
"correction_policy": {
"foreign_content_mutation": "FORBIDDEN",
"missing_reference": "route to Compo6.00/7.00/7.05 or explicit source owner",
"missing_geometry": "route to content geometry owner",
"missing_normalization": "route to Compo6.03 or return raw-only result",
"role_policy_question": "route to Compo7.04",
"platform_dynamic_question": "route to Compo7.05",
"violation_repair_scoring": "route to Compo7.06",
"bleed_intent_question": "route to Compo7.02"
},
"deferred_inputs": [
"Compo7.04 role-dependent reference/tension model selection",
"Compo7.05 dynamic platform edge references",
"Compo7.06 violation/repair/scoring/tests",
"future non-rect signed-distance adapters with explicit inward normals"
],
"recompute_when": [
"reference boundary geometry/version changes",
"queried edge set changes",
"content support/extrema/anchors change",
"geometryMode changes",
"Compo6.03 normalizationContext changes",
"EdgeTensionModel changes"
],
"tests": [
"positive/zero/negative signed clearance",
"all four edges",
"minimum/nearest edge",
"bbox/full-support/anchors/custom",
"ShortN scale invariance",
"UV forbidden by contract",
"7.02 outsideDepth bridge",
"7.01 outside diagnostic bridge",
"explicit tension model",
"no model N_A",
"no scoring/role/platform leakage"
],
"finality": "SIGNED_EDGE_CLEARANCE_AND_POLICY_DEPENDENT_TENSION_ONLY",
"style_preset_values": []
}