trusty_code/prompt/mod.rs
1//! System-prompt assembly layer (parity-spec โ `docs/trusty-code/parity-spec.md`).
2//!
3//! Why: The model-comparison harness must drive the *same* system instruction
4//! surface through every model so a comparison measures the model, not the
5//! scaffolding (parity-spec ยง1). This module owns that surface: the
6//! byte-identical BASE preamble, its version token, and the fixed-order
7//! assembler that merges the BASE preamble with the per-agent prompt, project
8//! `CLAUDE.md` context, and the optional per-tier fallback guidance.
9//! What: Re-exports [`BASE_PREAMBLE`], [`BASE_PREAMBLE_VERSION`],
10//! [`PromptAssembler`], [`assemble_system_prompt`], and (#2059)
11//! [`assemble_system_prompt_for_mode`] โ the `HarnessMode`-branching entry
12//! point `task::executor`/`runner::in_process` call. Its `skills_catalog`
13//! parameter (#2069) is P1B's first token-efficiency layer to actually land:
14//! `DailyDriver` appends the cheap, always-cached skill metadata catalog
15//! (`crate::skills::format_skill_catalog`); `Parity` ignores it.
16//! Test: `prompt::tests::*` (via `assembler.rs`'s inline test include).
17
18mod assembler;
19mod preamble;
20mod version;
21
22pub use assembler::{
23 DISCOVERY_GUIDANCE, PromptAssembler, assemble_system_prompt, assemble_system_prompt_for_mode,
24};
25pub use preamble::BASE_PREAMBLE;
26pub use version::BASE_PREAMBLE_VERSION;