Spectre.Forge.Critic behaviour (Spectre v0.3.0)

Copy Markdown View Source

Compiled adapter contract for model-backed Forge critique, including Prism.

Core passes only the portable Reflection projection and redacted Experience snapshot. Adapter modules are registered by host code; model output can return opinion and a proposed falsifiable case, never executable code.

Summary

Functions

Returns the compiled critic adapter contract version.

Runs each compiled critic and returns attributed, digest-bound results.

Callbacks

critique(map, map, keyword)

@callback critique(map(), map(), keyword()) :: {:ok, map()} | {:error, term()}

id()

@callback id() :: String.t()

profile_ref()

@callback profile_ref() :: String.t()

version()

@callback version() :: pos_integer()

Functions

contract_version()

@spec contract_version() :: pos_integer()

Returns the compiled critic adapter contract version.

run(critics, reflection, snapshot, opts \\ [])

Runs each compiled critic and returns attributed, digest-bound results.