Hook system

Pressure levels

L0 is calm. L4 is the ceiling. L2 and above inject a reframe: user view, attacker view, a different abstraction, or an inverted constraint.

L0
L0 — calm

No extra pressure.

L1
L1 — reminder

Keep the pace and the standard.

L2
L2 — warning

Change the approach. A reframe is injected.

L3
L3 — high

Read source, search, write the checklist.

L4
L4 — ceiling

Full discipline. Pair it with a task contract.

  • Read it with puax_get_pressure_level
  • After three failures and a success, puax_handle_breakthrough
  • A structured failure report is allowed. An empty "I can't" is not

Code sample

# Hook 会话骨架
puax_start_session(session_id="sess-demo")

# 每轮用户消息
puax_detect_trigger(
  session_id="sess-demo",
  event_type="UserPromptSubmit",
  context="又失败了,还是同一错误"
)

level = puax_get_pressure_level(session_id="sess-demo")

# 连续失败后终于修好
puax_handle_breakthrough(session_id="sess-demo")

# Compaction 前
puax_update_reasoning_state(
  session_id="sess-demo",
  triedApproaches=["方案A", "方案B"],
  peakPressureLevel="L3"
)

puax_end_session(session_id="sess-demo")
puax_record_evolution(...)

Quiz

What is the top pressure level?

Previous
Next