> ## Documentation Index
> Fetch the complete documentation index at: https://docs.solya.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Size curves

> Define target size distributions and let rules flag plans that deviate.

A **size curve** is a target size mix — for example XS 10%, S 20%, M 35%, L 25%,
XL 10% — that a plan should respect. Rules can flag plans that deviate too far from the
curve.

## Scope

A size curve is typically scoped per **brand**. (Category and season scopes exist in the
model and are reserved for future use.)

## Rules

A curve is enforced by a size-curve rule from the catalog — for example a
deviation-percentage threshold. The rule uses the projected deviation between the plan's
size mix and the target curve, and **warns** (or blocks) when it exceeds the threshold.

```mermaid theme={null}
flowchart TD
  Define["Define target size mix<br/>e.g., XS 10% S 20% M 35%<br/>L 25% XL 10%"]
  Scope["Scoped per brand<br/>or category"]
  AttachRule["Attach size-curve rule<br/>from ruleset"]
  PlanCreated["Plan items added"]
  CalcMix["Calculate plan's<br/>projected size mix"]
  CalcDev["Calculate deviation<br/>vs target curve"]
  EvalThresh{Deviation exceeds<br/>threshold?}
  Block["Block: deviation<br/>too large"]
  Warn["Warn: deviation<br/>approaches threshold"]
  Proceed["Proceed:<br/>within threshold"]
  
  Define --> Scope
  Scope --> AttachRule
  AttachRule --> PlanCreated
  PlanCreated --> CalcMix
  CalcMix --> CalcDev
  CalcDev --> EvalThresh
  EvalThresh -->|Yes, block| Block
  EvalThresh -->|Yes, warn| Warn
  EvalThresh -->|No| Proceed
```

## Working with size curves

<Steps>
  <Step title="Open size curves">
    Go to **Intelligence layer → Size curves**.
  </Step>

  <Step title="Define the curve">
    Add one row per size with a target percentage. The percentages must sum to 100%.
  </Step>

  <Step title="Attach a rule">
    Add a size-curve deviation rule to the relevant ruleset and set its threshold.
  </Step>
</Steps>

<Note>
  You can also import a curve rather than entering each size by hand.
</Note>
