@startuml uc-09-heal-at-temple autonumber title UC-09 Heal at Temple (design sequence) actor Player participant "TempleBoundary\n«/api/characters/{id}/heal»" as boundary <> participant "HealingService\nsb-api::routes::heal_character" as control <> == Heal == Player -> boundary : POST heal (optionally partial) boundary -> control : heal_character(character, partial) control -> control : missing HP\nfull: all; partial: half (ceil)\ncost = healed, min 1 gold alt already at full HP control --> boundary : 400 else gold < cost control --> boundary : 422 else ok control -> control : gold -= cost, HP restored, persist control --> boundary : {hp, max_hp, gold, healed: true} boundary --> Player : {hp, max_hp, gold, healed: true} end note over control : handler-side logic - recorded debt\n(Architecture Notebook D1, Q3) @enduml