Skip to content

overlay M1: the overlay layer contract - a behaviour block on /api/overlay #398

Description

@lex00

M1 of #397. The overlay layer contract: GET /api/overlay (src/server.ts:2580) gains a per-entity behaviour block sourced from the lexicon's report.

What

GET /api/overlay today carries the live drift overlay for ?env=. It needs a second, optional block per entity: cost per hour, headroom, an error-rate expectation, a resilience verdict, a right-size hint, and provenance (engine, version, stated tolerance, modeled or validated). The pattern to copy is the carve lens: a peelability score computed once by an advisor, rendered as a colour and a scored overlay, with the runbook lines as copy buttons and no execute button (src/carve-lens.ts:342,375, docs/using/carve.mdx:461-469).

Do

Add the behaviour block to the overlay payload, keyed the same way the drift overlay already keys its entities. Pin the JSON shape with a golden test the way the existing overlay fixtures are pinned. When the lexicon's report has no block for an entity, that entity's overlay carries no behaviour field at all, not a zeroed one.

Proof

A fixture overlay carrying the behaviour block renders the new fields. A fixture overlay without the block renders exactly as today, with nothing invented in its place.

Refs #397.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    behaviour-overlayCost, headroom and resilience from a behavioral engine, drawn as a colour on the node

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions