COMPO · 3.00 · SHAPE SYSTEM

Форма:
роли и
schema.

Первый модуль темы 3. Он определяет Shape как объект с локальной geometry, semantic/operational role, отдельным transform contract и ссылками на topology/paint descriptors. Форма здесь — вычислимая геометрия и объектная оболочка, а не visual mass, whitespace или global composition.

ModuleCompo 3.00
ScopeShape schema / roles
Ownscontracts, not scores
Topic3 · FORM
Files7 / 7
Next4.00

Форма как объект, не как score

00 / module api

3.00 задаёт объектную оболочку Shape и распределяет ownership. Он не решает, какая форма «красивая», не считает visual mass и не строит scene free-space.

SCOPE

Canonical Shape schema, role taxonomy, geometry union и boundaries для 3.01–3.06.

BOUNDARY

Локальная геометрия Shape отделена от ObjectTransform, visual mass и scene occupancy.

FINALITY

ENTRYPOINT / SCHEMA ONLY. Никакого localShapeScore в 3.00.

SHAPE ≠ VISUAL MASS. Геометрия может предоставить силуэт/region, но каноническая площадь силуэта, occupancy и perceived weight принадлежат теме 4. Scene occupied/free space принадлежит теме 5.

ShapeRole: зачем форма существует

01 / role taxonomy

Role задаёт semantic/operational назначение формы. Он не выводится автоматически из rectangle/circle/path и не подменяет topology.

RoleНазначениеClass
contentосновная значимая форма/объектsemantic
containerформа-контейнер для дочернего содержимогоstructural
panelлокальная плоскость/секция интерфейса или постераstructural
frameзамкнутое обрамление области/контентаstructural
maskоперационная геометрия clipping/maskingoperational
accentлокальная вспомогательная/акцентная формаvisual
decorationдекоративная форма без обязательной content-semanticsvisual
annotationформа, поддерживающая подпись/метку/выноскуsemantic
role = stable semantic / operational class subrole = local specialization rigidity = hard | soft | free FORBIDDEN: rectangle_panel as a role inferred from geometry convex_shape as a role heavy_shape as a role whitespace_shape as a role USE: role="panel", geometry.kind="PRIMITIVE" role="mask", geometry.kind="PATH" role="accent", topologyRef → convexity descriptor

Canonical Shape schema

02 / canonical object

Shape хранит идентичность, локальную геометрию и ссылки на внешние/дочерние descriptors. World-space geometry не хранится как второй независимый источник истины.

Shape

Shape {
  id,
  role: ShapeRole,
  subrole?,
  rigidity: "hard|soft|free",

  geometry: ShapeGeometry,     // LOCAL
  transformRef?,               // ObjectTransform
  paintRef?,                   // 3.04
  topologyRef?,                // 3.03 / 3.04

  source: ShapeGeometrySource,
  visibility,
  zIndex?,
  children[],
  provenance
}

Identity contract

shape.id          = stable object identity
geometry.version  = geometry revision
transform.version = transform revision
paint.version     = paint/topology revision

worldGeometry =
  derive(geometry, ObjectTransform)

NEVER:
  mutate local points because
  world rotation changed
LOCAL GEOMETRY IS CANONICAL. Position/rotation/scale/reflection/skew применяются отдельным transform contract. 3.05 связывает Shape с ним; он не должен запекаться в path без explicit bake operation.

ShapeGeometry union

03 / discriminated union

3.00 задаёт только union-interface. Конкретные параметры и вычисления принадлежат 3.01, 3.02 и 3.04.

3.01

PRIMITIVE

PrimitiveShapeGeometry {
  kind:"PRIMITIVE",
  family:
    "RECT|ELLIPSE|POLYGON|STAR|...",
  params,
  localBounds
}
3.02

PATH

PathShapeGeometry {
  kind:"PATH",
  closed,
  segments[],
  windingHint?,
  localBounds
}
3.04

COMPOUND

CompoundShapeGeometry {
  kind:"COMPOUND",
  outerRegionRef,
  holeRegionRefs[],
  fillRule,
  booleanSourceRefs[]
}
INTERFACE ≠ OWNERSHIP OF VALUES. 3.00 может описать поля union, но не становится владельцем primitive metrics, contour descriptors или hole/convexity metrics.

Local geometry и ObjectTransform

04 / coordinate spaces

MAIN отдельно требует вынести ObjectTransform в Core. Поэтому 3.00 сразу проектируется под общий transform contract, а 3.05 становится shape-side specialization/adapter, а не вторым универсальным owner.

LOCAL SHAPE SPACE geometry points / primitive params ↓ ObjectTransform position rotation scale reflection optional skew ↓ WORLD / SCENE VIEW derived geometry for relations/rendering RULES: local geometry remains immutable under view transform transform change ≠ geometry revision geometry edit ≠ transform revision bakeTransform is explicit migration, never implicit
3.05

Shape transform logic

Применение transform к bounds/path/topology, reflection semantics, transform invariance и bake-policy.

CORE

Canonical ObjectTransform

Универсальная schema position/rotation/scale/reflection/skew должна жить выше object-type topics и переиспользоваться другими объектами.

Silhouette, holes и topology

05 / topology refs

Shape shell содержит ссылки, но не смешивает все вычисления в одном объекте. Silhouette readability и region topology разделены по владельцам.

DataOwner3.00 treatment
closed/open contour fact3.02 / 3.03referenced descriptor
componentCount / holeCount3.03 / 3.04topologyRef
fillRule / outer/holes3.04paint/topology ref
convexity / concavity3.04descriptor; not role
contour readability3.03target/context-aware fit
silhouette area / occupancy / density4.01DEFERRED consumer
scene free-space regions5.xxDEFERRED consumer
DO NOT EXPORT shape.visualMass FROM TOPIC 3. Даже если area нужна как внутренний промежуточный расчёт convexity, канонический mass/occupancy contract остаётся у темы 4.

Ownership 3.00–3.06

06 / module map

Тема 3 компактная: генератор, scorer и regression объединены в 3.06, поэтому ранние файлы должны особенно чётко отдавать provenance и не дублировать descriptors.

ModuleDomainOwns / provides
3.00Shape schema / rolesShape, ShapeRole, ShapeGeometry union, ownership map; no geometry quality score
3.01primitive / parametricPrimitiveShapeGeometry params and primitive-family descriptors
3.02organic / path contourPathShapeGeometry, contour path construction and local path descriptors
3.03silhouette / readability / topologysilhouette topology + contour readability interpretation
3.04fill / outline / holes / convexitypaint-region topology, holes, convexity/concavity descriptors
3.05shape transformsshape-side use of canonical ObjectTransform; transform-derived geometry views
3.06generator / scoring / testsbounded ShapeCandidate generation, target-aware local scoring, regression suite

Pipeline формы

07 / topic pipeline

Финальная цель темы — получить shape candidates и local shape scoring, но без захвата mass/space/global composition.

SEMANTIC SHAPE REQUEST ↓ 3.00 Shape shell / role / rigidity ↓ 3.01 PRIMITIVE or 3.02 PATH ↓ ↓ └──── canonical local ShapeGeometry ────┘ ↓ 3.04 optional compound/fill/holes topology ↓ 3.05 ObjectTransform → derived world view ↓ 3.03 silhouette / contour readability / topology evidence ↓ 3.06 bounded ShapeCandidate generation + target-aware local shape scoring + regression tests ↓ Topic 4 consumes region/silhouette → visual mass Topic 5 consumes occupied geometry → free-space model Future global owners combine everything

Что тема 3 намеренно не владеет

08 / cross-topic barriers

Это обязательные barriers, чтобы форма не превратилась в универсальный контейнер всех объектных метрик.

TOPIC 4

Visual mass

silhouette area, occupancy, density, contextual weight.

TOPIC 5

Negative space

scene free-space mask, connected empty regions, breathing room.

TOPIC 6/8

Canvas / grid

format normalization and occupancy registry are external contracts.

GLOBAL

Balance / hierarchy

shape may provide evidence, but does not own scene-wide judgment.

Визуальная лаборатория schema

09 / visual reference

SVG показывает четыре разных cases одной Shape schema: primitive, organic path, compound region с hole и transformed view. Это именно различие representations, а не ranking.

A · PRIMITIVE geometry.kind = PRIMITIVE B · ORGANIC PATH geometry.kind = PATH C · COMPOUND + HOLE outer region + hole D · TRANSFORMED VIEW local geometry unchanged THE SAME SCHEMA SHELL: Shape { role, geometry, transformRef?, paintRef?, topologyRef?, provenance } geometry representation ≠ semantic role shape geometry ≠ visual mass · shape region ≠ scene negative space ObjectTransform ≠ baked local geometry

Детерминированные schema tests

10 / schema regression

3.00 не тестирует geometry algorithms будущих 3.01–3.05. Эти barriers проверяют только canonical shell и ownership.

Tests not run yet.

DATA FOR LAYOUT ENGINE

11 / machine contract

Machine-readable entrypoint темы 3.

{
  "module": "Compo 3.00",
  "name": "shape_overview_roles_and_canonical_schema",
  "version": "1.1-final",
  "scope": "TOPIC_03_ENTRYPOINT_AND_CANONICAL_SHAPE_SCHEMA",
  "topic": "03_FORM_SILHOUETTE_CONTOUR",
  "planned_files": [
    "3.00",
    "3.01",
    "3.02",
    "3.03",
    "3.04",
    "3.05",
    "3.06"
  ],
  "consumes": [
    "Compo0.Scene/Object identity",
    "Compo0.ObjectTransform? (canonical target owner; Core migration tracked by 3.05)",
    "Canvas normalization context when available",
    "Compo2.22.MaskCropSeamResult? as optional external region source"
  ],
  "provides": [
    "Shape",
    "ShapeRole",
    "ShapeRigidity",
    "ShapeGeometry discriminated-union schema",
    "Shape.geometry variant slot: PRIMITIVE -> Compo3.01",
    "Shape.geometry variant slot: PATH -> Compo3.02",
    "Shape.geometry variant slot: COMPOUND -> Compo3.04",
    "Shape.topologyRef reference slot",
    "Shape.paintRef reference slot",
    "Shape.transformRef reference slot",
    "ShapeGeometrySource",
    "Topic3 ownership map"
  ],
  "owns_contracts": [
    "Shape object shell schema",
    "ShapeRole taxonomy",
    "ShapeGeometry discriminated-union registration",
    "reference slots topologyRef/paintRef/transformRef without re-owning referenced child contracts",
    "local-geometry versus transform separation",
    "topic-3 module decomposition"
  ],
  "owns_metrics": [],
  "roles": [
    "content",
    "container",
    "panel",
    "frame",
    "mask",
    "accent",
    "decoration",
    "annotation"
  ],
  "shape_schema": {
    "id": "string",
    "role": "ShapeRole",
    "subrole": "string|null",
    "rigidity": "hard|soft|free",
    "geometry": "ShapeGeometry",
    "transformRef": "ObjectTransformRef|null",
    "paintRef": "Shape.paintRef slot|null",
    "topologyRef": "Shape.topologyRef slot|null",
    "source": "ShapeGeometrySource",
    "visibility": "visible|hidden|conditional",
    "zIndex": "number|null",
    "children": "objectId[]",
    "provenance": "object"
  },
  "geometry_union": {
    "primitive": {
      "owner": "Compo3.01",
      "discriminator": "PRIMITIVE"
    },
    "path": {
      "owner": "Compo3.02",
      "discriminator": "PATH"
    },
    "compound": {
      "owner": "Compo3.04",
      "discriminator": "COMPOUND"
    }
  },
  "ownership_boundaries": {
    "raw_shape_geometry": "Topic3",
    "silhouette_readability": "Compo3.03",
    "holes_convexity_concavity": "Compo3.04",
    "object_transform_canonical_owner": "Compo0/Core target architecture",
    "shape_transform_adapter": "Compo3.05",
    "visual_mass_area_occupancy_density": "Topic4",
    "scene_occupied_and_free_space": "Topic5",
    "global_balance_hierarchy_eye_flow": "future global owners",
    "canvas_format_normalization": "Topic6",
    "grid_occupancy": "Topic8"
  },
  "hard_invariants": [
    "ONE_METRIC_ONE_OWNER",
    "N_A_NOT_ZERO",
    "LOCAL_NOT_GLOBAL",
    "GEOMETRY_NOT_INTERPRETATION",
    "DESCRIPTOR_NOT_SCORE",
    "LOCAL_GEOMETRY_NOT_OBJECT_TRANSFORM",
    "SHAPE_AREA_NOT_VISUAL_MASS_OWNER",
    "SHAPE_REGION_NOT_SCENE_FREE_SPACE_OWNER",
    "NO_FOREIGN_MUTATION",
    "NO_MAGIC_BEAUTYSCORE",
    "ENTRYPOINT_REFERENCE_SLOT_NOT_CHILD_CONTRACT_OWNER"
  ],
  "pipeline": [
    "3.00 create/validate canonical Shape shell",
    "3.01 or 3.02 construct local ShapeGeometry",
    "3.04 optionally construct compound region/holes and paint-region topology",
    "3.05 applies/reads canonical ObjectTransform to derive world-space view without rewriting local geometry",
    "3.03 derives silhouette/topology/readability evidence from transformed or local view as explicitly requested",
    "3.06 creates bounded shape candidates and performs target-aware local scoring/tests",
    "Topic4 consumes silhouette/region geometry to own visual mass",
    "Topic5 consumes occupied region geometry to build scene positive/negative space"
  ],
  "finality": "TOPIC_03_SCHEMA_AND_TAXONOMY_ONLY",
  "topic_status": "DONE_7_OF_7",
  "next_frontier": "Compo 4.00"
}
ARCHITECTURE CHECKPOINT · 3.00 OWNS SHAPE SCHEMA / ROLE TAXONOMY / GEOMETRY UNION ONLY. PRIMITIVES → 3.01; ORGANIC PATHS → 3.02; SILHOUETTE/READABILITY → 3.03; FILL/HOLES/CONVEXITY → 3.04; SHAPE-SIDE TRANSFORMS → 3.05; GENERATION/SCORING/TESTS → 3.06. VISUAL MASS → TOPIC 4. POSITIVE/NEGATIVE SPACE → TOPIC 5. NO BEAUTYSCORE.
VISITS / ...