LevelingOptions#

The options of a resource leveling run: which resources, tasks and dates it acts on, the detection bucket, the selection order and how tasks may move. It's the options_json argument of JsonProject#level, and the level field of EvaluateOptions and SuggestOptions. Every field is optional, so "{}" gives the defaults.

Fields#

Field Type Required Default Description
scope object no whole project Resources, tasks and date range the run acts on.
basis "hour" | "day" no derived Detection bucket: "hour" or "day". Derived from config.duration_unit: "day" for day, "hour" for hour and minute.
order "id" | "standard" | "priority" no "standard" Which contender moves first in an overallocated bucket. "id": the task later in input order. "standard": dependencies, then slack, dates, priority and constraints decide. "priority": lower task priority moves first, then as "standard".
withinSlackOnly boolean no false Caps each delay or pause at the task's total slack.
clearFirst boolean no true Clears leveling_delay and pauses on in-scope tasks before leveling.
allowSplits boolean no true Allows pauses proposals. With false, every correction is a whole-task delay, and existing pauses are kept but never extended.
step "minimal" | "skip" no "minimal" Proposal size. "minimal" moves a task past one overallocated bucket. "skip" moves it past the whole overallocated window that starts there.

An omitted field and a null field both mean the default. Unknown fields fail with parse; there's no maxRounds option. A value of the wrong JSON type (for example "allowSplits": "no") fails with parse, and an unknown string for basis, order or step fails with validation and no path. See Wire format.

The selection orders and step sizes are explained in Leveling resources.

Scope fields#

Field Type Required Default Description
resources Id[] no all resources Resources whose overallocation is resolved. Each id must exist (validation, path: "scope.resources").
tasks Id[] no all tasks Tasks the run may move. Each id must exist (validation, path: "scope.tasks").
from DateValue no no lower bound Start of the triggering range. Buckets whose start lies in [from, to) trigger leveling. Tasks can still land after to.
to DateValue no no upper bound End of the triggering range, exclusive.

Unknown fields in scope also fail with parse. Overallocation outside the range stays in the result with the reason out-of-scope.

Used by#

Example#

{
  "scope": {
    "resources": ["dev"],
    "from": "2026-08-10",
    "to": "2026-09-01"
  },
  "order": "priority",
  "withinSlackOnly": true,
  "allowSplits": false
}

Every field left out keeps its default: basis derived from the project, clearFirst: true, step: "minimal".