Skip to main content

Module render

Module render 

Source
Expand description

Rendering discovered project instructions into a conversation message (ADR-0023 §2).

The loader in crate::load produces a neutral ProjectInstructions; this turns it into one User-role <system-reminder> message and injects it (Slice 3). This is the “engine renders / injects the neutral value” half of ADR-0023 — a single format for every pack (fidelity is bounded to tools + prompt, ADR-0023 §1).

Why User and not Developer: injected framing is authored as User from the start so the conversation ⇄ payload conversion stays losslessly bidirectional (ADR-0013 amendment 2026-07-23) — a Developer-rendered-to-user fallback cannot be reversed.

Functions§

already_delivered
Whether the conversation already carries exactly this instructions body.
any_delivered
Whether the conversation carries any instructions message at all — including a removal notice.
instructions_hash
A stable hash of the discovered instructions, or None when nothing was discovered.
removal_delivered
Whether the most recent instructions message in the conversation is a removal notice — i.e. the “no instructions apply” state has already been announced.
removal_message
The removal banner message, emitted when previously-applied instructions vanish.
render_body
The instructions body, without the envelope or the replace banner — the unit the delivery check compares.
render_instructions
Render project instructions into one User <system-reminder> message, or None when there is nothing to inject.