AgentSkillsCN

Otp Supervision

类型注解与行为协议

SKILL.md
--- frontmatter
lesson_style: summary
title: OTP Supervision and Resilience
tags:
  - elixir
  - otp
  - supervision
links:
  - target: "[[concurrency]]"
    rel: prereq
  - target: "[[error-handling]]"
    rel: related
  - target: "[[typespecs-and-behaviours]]"
    rel: related
source_lessons:
  - https://elixirschool.com/en/lessons/advanced/otp_supervisors
  - https://elixirschool.com/en/lessons/advanced/behaviours
content_origin: Summarized from Elixir School lessons in paraphrased form. Not verbatim text.

Summary of the source lessons: supervision trees define fault boundaries and restart semantics so systems recover predictably. The lessons cover supervisor strategies, child specs, DynamicSupervisor, and task supervision patterns for ephemeral work.

Build this on top of process design from [[concurrency]], align restart behavior with policy decisions in [[error-handling]], and make component interfaces explicit using [[typespecs-and-behaviours]].