feature

Lint and error codes

Lint checks your script before you snapshot or accept an agent edit — undeclared outputs, missing emit labels, bad timeframes, and similar mistakes.

Use this as a lookup when the Code tab or an agent tool reports a rule id or error. Fix the listed issue, re-lint, then save or propose again.

Cross-tier

Symptom / code

Tier

Fix

Undeclared output / result id

All

Declare before emit/publish

Module-level bar state

Indicator / definition

Use ctx.accum

Bad timeframe argument

Indicator / definition

Literal or input.timeframectx.params

Dependency empty / unavailable

All

Guard or fix declare

Budget / timeout

All

Trim work — Budgets

Definition / events

Rule / symptom

Severity

Fix

events/emit-missing-label

warn (+ runtime drop)

Pass non-empty opts.label on ctx.emit

Unknown event id

error / drop

events.declare the id

Reserved _displayLabel in payload schema

error

Remove — set via emit label

Hand-rolled emit dedupe

smell

Use oncePer

Drawing labels

API

When

Fix

ctx.mark

labelMode always/onHover without text

Pass text

ctx.range

labelMode === "always" without label

Pass label

ctx.note

missing price

Pass price

Study / pins

Symptom

Fix

Publish undeclared result

results.declare

pin_cell wrong kind

kind: "popover_layout"

missing_accepted_mockup

Accept mockup before rewrite

Dim mismatch on cells

Align dims with indexedBy

Multi-file (definition)

Symptom

Fix

Bare package import

Relative ./file.js only

meta() outside entry

Move to entry

Exported onBar from helper

Only entry exports onBar

Next

  1. Agent lint and dry-run

  2. Troubleshooting overview