Skip to content

The agent that grows with you

refactor(prompt): name the Skill Safety heading as a constant

kshitijk4poorc1685027af4e
diff --git a/agent/prompt_builder.py b/agent/prompt_builder.py
index bee0c8404cd..a8790f9dd82 100644
--- a/agent/prompt_builder.py
+++ b/agent/prompt_builder.py
@@ -255,9 +255,10 @@ SESSION_SEARCH_GUIDANCE = (
# patch-it coaching that used to open this block duplicated the ## Skills section (which teaches both "offer
# to save as a skill" and "fix it with skill_manage(action='patch')") and skill_manage's own schema. Only
# the compaction-pruning contract lives here — nothing else teaches it.
+SKILL_SAFETY_HEADING = "## Skill Safety Rule"
SKILLS_GUIDANCE = (
"When you work out a non-trivial workflow, record it with skill_manage for future reuse.\n\n"
- "## Skill Safety Rule\n"
+ f"{SKILL_SAFETY_HEADING}\n"
"A skill placeholder containing `[SKILL_PRUNED]` lost its content in context compression and is inaccessible — "
"reload it with skill_view(name='...') before acting on anything that depends on it. After reloading, ignore any "
"remaining `[SKILL_PRUNED]` markers for that same skill; they are historical artifacts of earlier compactions."