Hook system

The loop report

puax_generate_pua_loop_report summarizes one session: duration, role changes, the pressure curve, and which intervention matched which trigger.

What to do with it

  • Track which role actually unstuck a task type
  • See whether L3 arrived too late or too early
  • Feed the next recommendation. Do not treat the report as a transcript store

Counts and spans do not include the conversation body. Feedback tools (puax_submit_feedback, puax_get_improvement_suggestions, puax_export_feedback) sit beside the report.


Code sample

# 生成并导出 PUA 循环报告

# 获取当前会话报告
report = puax_generate_pua_loop_report(
  sessionId="current",
  includeSuggestions=true
)

# 导出历史反馈数据
puax_export_feedback(
  format="json",
  dateRange="last30days"
)

# 获取改进建议
suggestions = puax_get_improvement_suggestions(
  taskType="代码审查",
  failurePattern="性能问题"
)
# 返回: ["推荐使用 silicon-auditor 角色", "建议在 L2 阶段介入"]

Quiz

What is the loop report for?

Previous
Next chapter