Layered prompt rendering from embedded templates (#55)
CI / ci (push) Successful in 1m33s

Co-authored-by: dev_agent <dev_agent@cubecraftlabs.com>
This commit was merged in pull request #55.
This commit is contained in:
2026-10-05 08:15:35 -04:00
committed by approver_agent
parent 55c15b1b3a
commit 942ac42b86
15 changed files with 695 additions and 20 deletions
+8
View File
@@ -151,6 +151,14 @@ automatic** (D-021).
- **Skill harness** (`ai/harness`): prompt layering, validation of the
structured output, and **one repair retry**; if the repair also fails the
run fails — no silent fallback. Every call is recorded in `ai_runs`.
- **Prompt layering** (D-007): each skill version's prompt is a
`text/template` file embedded from `ai/skills/prompts/`
(`<skill>.v<version>.tmpl`). The system prompt is always, in order:
[1] the admin persona (`ai_settings.system_prompt`), [2] the skill's
instructions, [3] the household context block, [4] the output contract
with the JSON Schema — the contract is always last. The user message comes
from the skill's input. `checksums.txt` pins every template; changing one
without a version bump fails the tests.
## Recipe grounding