Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions docs/goblin-control-primitive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Goblin as Control Primitive

This document operationalizes **Goblin** as a control primitive for agents and systems.

## Definition

Goblin = system state is not trustworthy for decision-making.

## Required Behavior

When Goblin is detected:

- Do not trust current state
- Gate irreversible actions
- Capture cross-plane state
- Surface explicitly

## Trigger Conditions

- Cross-plane inconsistency
- Presented vs actual divergence
- Orphaned authority
- Unresolvable truth source

## Agent Rule

```
IF inconsistency_detected:
emit GoblinEvent
set severity >= 2
block irreversible actions
```

## Notes

Goblin is the front-door signal. Root cause (model gap, drift, SCIG) is secondary.
9 changes: 9 additions & 0 deletions src/goblin/control.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
def detect_goblin(inconsistency: bool, severity: int = 2):
if not inconsistency:
return None

return {
"type": "GoblinEvent",
"severity": max(severity, 2),
"action": "block" if severity >= 3 else "gate"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Block irreversible actions on Goblin detection

The new runtime helper emits "action": "gate" for severity 2 (including the default detect_goblin(True) path), which conflicts with the contract added in docs/goblin-control-primitive.md (IF inconsistency_detected ... block irreversible actions). If downstream code relies on the action field to enforce safeguards, the default inconsistency case will not block irreversible operations, weakening the control primitive exactly when it should fail safe.

Useful? React with 👍 / 👎.

}
Loading