Hook system
Hook system
Hooks keep session state and pressure under ~/.puax/sessions/. v3.4 added breakthrough de-escalation and compaction protection. v4 lets the same events call puax_tick.
Pieces
State
Pressure, tried paths, interventions. A break under about two hours can resume.
L0–L4
Failures raise it. A breakthrough can lower it.
Six events
UserPromptSubmit, PostToolUse, PreToolUse, PreCompact, SessionStart, Stop. Native hooks call the tick.
Compaction
puax_update_reasoning_state saves the chain and the approaches already tried.
Session tools
| Tool | Job |
|---|---|
puax_start_session | Start, and load the evolution baseline |
puax_end_session / puax_reset_session | End or reset |
puax_get_pressure_level | Read the level |
puax_handle_breakthrough | Lower pressure after a real win |
puax_tick | The v4 beat that can replace a hand-rolled sequence |
Quiz
After three failures and then a success, which tool drops the pressure?