# uncomplect

To complect is to braid things together. To uncomplect is to pull the strands apart, so each piece does one job and can be changed or deleted on its own.

This site hosts two agent skills, the principles behind them, a glossary of the terms they use, and a bibliography of every source they quote. Every page is also Markdown, and the whole corpus is a read-only MCP server.

## Skills
- [uncomplect](/skills/uncomplect): Pressure-test a stateful system or replacement design through Rich Hickey's simplicity and complection, Greg Young's deletability, Ousterhout's deep modules, DDD boundaries, typed effects, explicit lifecycle modeling, and Lauren Tan's agent-sized context. Use when the user asks "what would Rich Hickey do", "optimize for deletion", "make this simpler", "define this error out of existence", "review this state machine", "design it twice", or wants to replace a working prototype without preserving its accidental architecture.
- [durability](/skills/durability): Design or review crash recovery, retries, duplicate delivery, overload, worker ownership, replay, and durable timers in Effect applications. Use when work can outlive a request, a worker loses progress, retries repeat writes, or a queue grows under failure.

## Principles
- [Separate what was braided](/principles/separate-what-was-braided): Complection is two independent concerns woven together so that neither can change alone.
- [Make the interface deep](/principles/make-the-interface-deep): A deep module hides a hard problem behind a small interface.
- [Optimize for deletion](/principles/optimize-for-deletion): Build small programs you can replace when their model stops fitting reality.
- [Put authority in the right boundary](/principles/put-authority-in-the-right-boundary): A read model can report a decision, but only the aggregate that owns the invariant makes it.
- [Keep the pure core pure](/principles/keep-the-pure-core-pure): An effect system earns its place at effectful boundaries.
- [Make essential time visible](/principles/make-essential-time-visible): Use an explicit state machine when modes change which events are legal, or when work needs cancellation, retries, resumability, or child work.
- [Make the separation stick](/principles/make-the-separation-stick): Agents copy the patterns they find, so a separation must live in code, types, or checks rather than in one reviewer's head.
- [Admission control protects recovery](/principles/admission-controls-new-work): Refuse or defer work that cannot be served usefully under current load.
- [Backpressure reaches the producer](/principles/backpressure-reaches-the-producer): Bounded consumption helps only when upstream respects waiting or refusal.
- [Bulkheads isolate scarce capacity](/principles/bulkheads-isolate-capacity): Reserve independent capacity for workloads that must not starve each other.
- [Checkpoints follow the promised commit](/principles/checkpoints-follow-commits): Persist state and progress together when one store can transact both.
- [Circuit breakers have state](/principles/circuit-breakers-have-state): A breaker stops doomed calls and controls probes before restoring traffic.
- [Cleanup can be an idempotent postcondition](/principles/cleanup-can-be-an-idempotent-postcondition): Already-absent state can be success when absence is the operation’s intended result.
- [Dead letters need a return path](/principles/dead-letters-need-a-return-path): Exhausted work needs durable evidence, an owner, and deliberate redrive.
- [Durability starts with a recovery record](/principles/durability): A reading order for storage, replay, worker ownership, overload, and recovery tests.
- [Durable timers need recovery](/principles/durable-timers-need-recovery): Persist scheduled intent when losing a worker must not lose its deadlines.
- [Durable work needs storage](/principles/durable-work-needs-storage): A restarted worker cannot recover intent that existed only in memory.
- [Effect is not BEAM](/principles/effect-is-not-beam): Fibers share a runtime; scope ownership does not supply isolated heaps or OTP restart strategies.
- [Every task needs an owner](/principles/every-task-needs-an-owner): Give child work a lifetime, a failure observer, and a recovery decision.
- [Failures keep their meaning](/principles/failures-keep-their-meaning): Expected refusals, infrastructure faults, and defects need different policies.
- [Golden signals expose overload](/principles/golden-signals-expose-overload): Measure latency, traffic, errors, and saturation, including failed work.
- [Old events must still decode](/principles/old-events-must-still-decode): Retained data needs compatibility rules before recovery depends on it.
- [Pure cores reduce timeline coupling](/principles/pure-cores-reduce-timelines): Move deterministic rules out of time-dependent actions and shared mutable state.
- [Queries need result bounds](/principles/queries-need-result-bounds): Limit result cardinality before the driver materializes an oversized response.
- [Recovery needs model tests](/principles/recovery-needs-model-tests): Test sequences of failures and recoveries against explicit invariants.
- [Replay needs stable inputs](/principles/replay-needs-stable-inputs): Historical processing must not silently depend on today’s clock or external decisions.
- [Request lifetime is not durability](/principles/request-lifetime-is-not-durability): Worker waitUntil has a shared post-response allowance; required work needs a durable marker and redrive.
- [Restart must reconstruct known state](/principles/restart-from-known-state): Execution recovery and state recovery need separate contracts.
- [Retry load needs a budget](/principles/retry-load-needs-a-budget): One retry owner must control attempts, delay, and aggregate load.
- [Retry needs idempotent effects](/principles/retry-needs-idempotency): Repeating an operation must preserve its intended observable result.
- [Shared schemas need a transition period](/principles/schema-changes-need-a-transition): Keep old and new representations usable while consumers migrate.
- [Steady state recycles resources](/principles/steady-state-recycles-resources): Every accumulation needs a deliberate recycling policy.
- [Supervision chooses what restarts](/principles/supervision-is-a-recovery-policy): Restart policy follows dependency shape and bounds repeated recovery.
- [Timeouts bound waiting](/principles/timeouts-bound-waiting): A local timeout stops waiting; it does not prove the remote action never happened.

## Terms

[Complect](/terms/complect) · [Simple](/terms/simple) · [Easy](/terms/easy) · [Compose](/terms/compose) · [Recovery to known state](/terms/recovery-to-known-state) · [Failure isolation](/terms/failure-isolation) · [Recovery owner](/terms/recovery-owner) · [Restart domain](/terms/restart-domain) · [Restart budget](/terms/restart-budget) · [Rehydration](/terms/rehydration) · [Error kernel](/terms/error-kernel) · [Durable scheduled intent](/terms/durable-scheduled-intent) · [Idempotency](/terms/idempotency) · [Effectively-once boundary](/terms/effectively-once-boundary) · [Deterministic processing](/terms/deterministic-processing) · [Event-time policy](/terms/event-time-policy) · [Clean replay target](/terms/clean-replay-target) · [Schema compatibility](/terms/schema-compatibility) · [Timeout](/terms/timeout) · [Delayed retry](/terms/delayed-retry) · [Randomized exponential backoff](/terms/randomized-exponential-backoff) · [Retry budget](/terms/retry-budget) · [Deadline propagation](/terms/deadline-propagation) · [Cancellation propagation](/terms/cancellation-propagation) · [Circuit breaker](/terms/circuit-breaker) · [Bulkhead](/terms/bulkhead) · [Resource pool](/terms/resource-pool) · [Backpressure](/terms/backpressure) · [Admission control](/terms/admission-control) · [Load shedding](/terms/load-shedding) · [Steady state](/terms/steady-state) · [Result cardinality bound](/terms/result-cardinality-bound) · [Functional core](/terms/functional-core) · [Actions and calculations](/terms/actions-and-calculations) · [Timeline coupling](/terms/timeline-coupling) · [Domain error](/terms/domain-error) · [Applicative validation](/terms/applicative-validation) · [Idempotent postcondition](/terms/idempotent-postcondition) · [Exception masking](/terms/exception-masking) · [Exception aggregation](/terms/exception-aggregation) · [Error promotion](/terms/error-promotion) · [Deep failure boundary](/terms/deep-failure-boundary) · [Model-based testing](/terms/model-based-testing) · [Precondition](/terms/precondition) · [Postcondition](/terms/postcondition) · [Shrinking](/terms/shrinking) · [Fault injection](/terms/fault-injection) · [Hermetic test](/terms/hermetic-test) · [Four golden signals](/terms/four-golden-signals) · [Symptom-based paging](/terms/symptom-based-paging) · [Backfill](/terms/backfill) · [Transition period](/terms/transition-period) · [Backsliding prevention](/terms/backsliding-prevention)

## Elsewhere
- [rat-stack](https://ratstack.sh): the TypeScript stack these skills are written against.
- [Skills source](https://github.com/joelhooks/skills): the canonical skill files.
- [Bibliography](/bibliography): every source and checked quotation.
- [For agents](/agents): MCP, `llms.txt`, and raw skill files.
