Triggers
One-shot activation
activate_with_context detects, recommends, and activates. From v3.3 it injects the diagnosis protocol, so the agent must emit [PUAX-DIAGNOSIS]. You can set tone_variant to strict, yes, or mama, and language: en for the PIP layer.
message → hybrid detect → recommend (+ explanation)\n → flavor / method → diagnosis block → active roleShortcuts in the lesson
| Token | Effect |
|---|---|
@commander | military-commander |
@discipline | military-discipline |
@musk | shaman-musk |
@alibaba | current role, Alibaba flavor |
@pressure-up | pressure +1 |
With a host hook you rarely call this yourself. It remains the manual gearbox and one of the 13 public verbs.
Code sample
# 一键激活示例
# 完整的一键激活流程
activate_with_context(
context="帮我优化这个数据库查询,现在运行很慢",
taskType="performance-optimization",
autoActivate=true,
preferences={
"flavor": "字节",
"pressureLevel": "auto"
}
)
# 系统自动执行:
# 1. detect_trigger() - 检测是否需要干预
# 2. recommend_role() - 推荐最佳角色
# 3. get_methodology() - 获取五步法+检查清单
# 4. activate_role() - 激活角色并注入系统提示
# 返回结果:
{
"activated": true,
"role": "special-challenge-solver",
"flavor": "字节",
"systemPrompt": "...注入的系统提示...",
"methodology": {
"fiveSteps": [...],
"checklist": [...]
}
}
Quiz
Which of these is a shortcut trigger in the lesson?