fabro/lib/apps/fabro-server
Bryan Helmkamp 713d340db7
Render the run title prompt with Jinja instead of string replacement
The prompt used hand-rolled `{placeholder}` substitution via `str::replace`.
The app already has a MiniJinja layer for exactly this, and every other
checked-in prompt uses it, so use it here too.

`prompts/run_title.md` becomes `prompts/run_title.md.j2` with `{{ inputs.* }}`
variables, rendered through `fabro_template::render_named`. Strict undefined
handling now catches a variable the template asks for and the caller does not
supply, which the old `.replace()` chain silently left as literal text.

`build_title_prompt` returns `Result` accordingly. A checked-in template that
will not render is a bug rather than a transient failure, so the caller logs
it at `warn` — louder than the `debug` used for a generation miss — and keeps
the deterministic title.

Re-checked against claude-haiku-4-5: same titles as before the change.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-27 17:23:16 -04:00
..
migrations refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
src Render the run title prompt with Jinja instead of string replacement 2026-07-27 17:23:16 -04:00
tests feat(agent): add gpt56 profile for GPT-5.6 Sol, Terra, and Luna 2026-07-25 10:42:32 -04:00
build.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
Cargo.toml Render the run title prompt with Jinja instead of string replacement 2026-07-27 17:23:16 -04:00