LabKit MATLAB Workbench

history

Framework public APIs become an explicit last resort

id: LK-20260720-public-api-escalation-order
date: 2026-07-20
sequence: 144
type: docs
compatibility: compatible
scope: Architecture guidance
scope: Agent skills

Context

A convenient framework helper can appear attractive for one App-specific need, but every public name becomes a long-lived compatibility and documentation commitment. Conversely, forcing unrelated behavior into an existing API can turn a focused contract into an ambiguous option bucket.

Decision and rationale

Use a consistent escalation order for new App behavior: keep it App-local, extend an existing focused API when the addition is natural, add private framework/runtime capability when shared implementation does not require an App-authored contract, and add a new public API only for stable use by multiple Apps or when the nearest existing API would otherwise lose a clear single purpose.

This makes a new public API the final solution without prohibiting one when a genuine reusable boundary has emerged.

Changes

User and data impact

Runtime behavior, public signatures, App calculations, projects, and exports are unchanged. The rule affects future design choices and review evidence.

Compatibility and migration

No additional migration applies beyond the compatibility information in the preceding impact section.

Validation

Evidence

The validation details above are the supporting evidence for this record.

Known limitations and follow-up

When a proposed public API crosses the stated threshold, record its consumers, ownership rationale, alternatives considered, and compatibility contract in the component history.