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 Docs
01

Highlights

3 claims
H.01
Sixlayers
From instinct to reflex

Instincts, awareness, boundaries, values, judgment and reflexes, composed into a profile that can be swapped per tenant or per agent.

H.02
Fifteenhooks
Plugin lifecycle

Metrics, audit trails and tracing attach at every stage of the pipeline without the engine changing.

H.03
Vaulted
PII detected and vaulted

Sensitive values are identified, tokenised and stored under AES-256-GCM with reversible access control.

02

What it does

6 entries

Safety as a pipeline with named stages, so what was checked and what passed are both answerable after the fact.

02.1
Engine

Six cognitive layers

Every input runs through a composable pipeline from instincts through to reflexes, each layer building on the one before it.

Layered
02.2
PII

Detected, tokenised, vaulted

Sensitive values are redacted from the flow and held under AES-256-GCM with reversible access control, so a downstream system only ever sees a token.

AES-256-GCM
02.3
Tenancy

Scoped per scan

Every scan, policy evaluation and audit record carries its tenant, which makes cross-tenant access structurally impossible.

Context-scoped
02.4
Plugins

Fifteen lifecycle hooks

Metrics, audit trails and tracing attach at each stage of the pipeline without the engine code being touched.

Hooks
02.5
Profiles

Composed and swapped

Instincts, awareness, boundaries, values, judgment and reflexes compose into a reusable profile, switched per tenant, per agent or per environment.

Reusable
02.6
Compliance

Evidence already collected

Reports for the EU AI Act, NIST AI RMF and SOC2 are built from scan results, policy evaluations and audit trails that were already being recorded.

EU AI ActNIST
03

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.

04

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.

05

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