XRAPH/Work/Content safety
Go · since 2026

Shield

Content safety arranged in layers that can short-circuit, roughly the way people react to danger. Instincts catch injection and exfiltration in under 10ms. Awareness spots PII, topic and intent. Boundaries are hard deny lists. Values apply toxicity and brand rules, and judgment scores grounding and compliance last, because it is the expensive one.

Language
Go
Category
Content safety
Since
2026
Stars
2
Repository
01

Anatomy

4 modules
01

Instinct

The cheapest check, run first.

02

Awareness

Context the later layers need.

03

Boundary

Hard limits that do not negotiate.

04

Judgment

The expensive layer, reached only when the others allow it.

02

Why it exists

Design notes

#What it is

Shield is content safety for Go, arranged as six layers ordered by cost and precision, any of which may end evaluation early.

#The layers

  • Instinct, under 10ms: injection, jailbreak and exfiltration detection.
  • Awareness, under 50ms: PII, topic, sentiment and intent.
  • Boundary, under 5ms: hard deny lists on topics, actions and data.
  • Values, under 100ms: toxicity, brand safety, honesty rules.
  • Judgment, under 500ms: grounding, relevance and compliance scoring.
  • Reflex, under 10ms: custom condition-to-action policy rules.

Short-circuiting is the design, not an optimisation. A prompt with an obvious injection string never reaches the grounding check, because no grounding score could contribute to that decision.

#Why ordering beats scoring

A flat pipeline that runs everything needs a combination rule, and combination rules destroy explanation. "Blocked at instinct: jailbreak classifier, confidence 0.94" is auditable, showable to a customer, and testable. "Composite risk 0.71" is none of those, and tuning it moves the score for every other input too.

#Safety profiles

A profile composes the six primitives into a reusable safety character, the counterpart to a Cortex persona. A bank's support bot and an internal engineering assistant get different profiles rather than different toggle combinations on one shared pipeline.

#The blind spot

A message blocked at instinct is never scanned for PII, so its PII content is unknown. That is correct for blocking and wrong for analytics. Running the full chain in shadow mode on a sample is the current workaround, not an answer I am happy with.

03

Signals

GitHub
Stars
2
Language
Go
Since
2026
Adopters
00

Shipping something on Shield? Nobody is listed here yet. Tell me what you built and you will be the first.

Get listed