@startuml lagrange-hooks !include _lagrange.iuml ' One Claude Code turn: which hook runs when (claude/settings.template.json). autonumber actor User participant "Claude Code" as CC participant "cc-tab" as TAB participant "cc-recall" as REC participant "cc-secret-guard" as SG participant "cc-toolhint" as TH participant "cchist" as H participant "panel" as HS == SessionStart == CC -> TAB : state = started CC -> H : sync -q == UserPromptSubmit == User -> CC : prompt CC -> TAB : state = working CC -> REC : prompt JSON REC --> CC : up to 3 sessions == each tool call == CC -> TAB : pulse CC -> SG : Bash: check SG --> CC : allow / block CC -> TH : Bash: hint TAB -> HS : row update == Notification / Stop == CC -> TAB : waiting / done CC -> HS : notify (buttons) == PreCompact / SessionEnd == CC -> H : sync -q CC -> H : summarize --bg @enduml