pub struct PackContext {
pub cwd: PathBuf,
pub os: String,
pub shell: String,
pub date: String,
pub headless: bool,
pub strip_identity: bool,
}Expand description
Dynamic, per-run context a pack’s preamble is rendered against.
Deliberately small (like ToolCtx, ADR-0003 rejects god-object contexts): the fields
a harness’s real prompt needs (Task 13) — cwd/OS/shell/date + the headless identity
branch. Grows only if a ported prompt needs more.
Fields§
§cwd: PathBufAbsolute working directory shown to the model.
os: StringTarget OS label (e.g. macos).
shell: StringLogin shell (e.g. /bin/zsh).
date: StringCurrent date, preformatted (the preamble stays a pure function of context).
headless: boolHeadless run → autonomous identity branch (vs interactive). See Task 13.
strip_identity: boolStrip identity-revealing sentences from the rendered prompt (e.g. grok’s
“You are Grok released by xAI.” and the <user_guide> block naming the
Grok Build TUI). Default false = faithful reproduction (user
decision, 2026-07-18); true is for A/B runs where the harness’s
self-identity would contaminate the comparison. Post-processing on the
rendered output only — the verbatim template copies are never edited.
Trait Implementations§
Source§impl Clone for PackContext
impl Clone for PackContext
Source§fn clone(&self) -> PackContext
fn clone(&self) -> PackContext
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more