---
library: "bootstrap"
slug: "TriGate"
name: "TriGate"
ref: "TriGate#04a9"
hash: "sema:TriGate#mh:SHA-256:04a9a7cc17d29dab76ee781b7d7a3f557f68d528788da12620a320ce53d6b44c"
type: "Primitives"
layer: "Infrastructure"
version: "0.11.0"
root: "a6a3d1ff0f982ee30430c5b42f3784c8ec901fd68482cfc1bc30899c1e5e48c5"
license: null
url: "https://semahash.org/vocabularies/bootstrap/patterns/TriGate"
---

# TriGate

Generic Red/Yellow/Green flow control

Infrastructure · Primitives

## Mechanism

A generic [Gate](https://semahash.org/vocabularies/bootstrap/patterns/Gate.md) traffic-light enforcement primitive. Wraps a [Judge](https://semahash.org/vocabularies/bootstrap/patterns/Judge.md) or [Condition](https://semahash.org/vocabularies/bootstrap/patterns/Condition.md) that returns a trinary status (Red/Yellow/Green) and yields a [Decision](https://semahash.org/vocabularies/bootstrap/patterns/Decision.md): Red -> CLOSE (halt execution). Yellow -> DEBT (proceed with the obligation recorded to [Ledger](https://semahash.org/vocabularies/bootstrap/patterns/Ledger.md)). Green -> OPEN (proceed).

## Invariants

- Fail-Closed: Red triggers immediate halt.
- Yellow appends a remediation item and records the obligation to [Ledger](https://semahash.org/vocabularies/bootstrap/patterns/Ledger.md). An unrecorded Yellow is a Green.

## Signature

- Gate(Judge)

## Failure modes

- Yellow read as Green: both states proceed, so the obligation exists only in the [Ledger](https://semahash.org/vocabularies/bootstrap/patterns/Ledger.md).
- Debt accumulating unread: the obligation is recorded and nothing consumes it.

## Where this came from

—

## Builds on

- [Decision](https://semahash.org/vocabularies/bootstrap/patterns/Decision.md) (yields)
- [Gate](https://semahash.org/vocabularies/bootstrap/patterns/Gate.md) (references)
- [Condition](https://semahash.org/vocabularies/bootstrap/patterns/Condition.md) (references)
- [Judge](https://semahash.org/vocabularies/bootstrap/patterns/Judge.md) (references)
- [Ledger](https://semahash.org/vocabularies/bootstrap/patterns/Ledger.md) (composes_with)

## Used by

- [ConceptBlend](https://semahash.org/vocabularies/bootstrap/patterns/ConceptBlend.md) (references)
- [Taper](https://semahash.org/vocabularies/bootstrap/patterns/Taper.md) (composes_with)

## Identity

- Library: bootstrap 0.11.0 (root a6a3d1ff0f98)
- Ref: TriGate#04a9
- Hash: sema:TriGate#mh:SHA-256:04a9a7cc17d29dab76ee781b7d7a3f557f68d528788da12620a320ce53d6b44c

## Links

- Page: https://semahash.org/vocabularies/bootstrap/patterns/TriGate
- JSON: https://semahash.org/vocabularies/bootstrap/patterns/TriGate.json
- Library: https://semahash.org/vocabularies/bootstrap
- Library index: https://semahash.org/vocabularies/bootstrap/index.json
