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§

instructions_hash
A stable hash of the discovered instructions, or None when nothing was discovered. Drives the per-turn diff: an unchanged hash means “don’t re-inject” (ADR-0023 Refresh).
removal_message
The removal banner message, emitted when previously-applied instructions vanish.
render_instructions
Render project instructions into one User <system-reminder> message, or None when there is nothing to inject.