feat(soul): Layer 2 — stewardship.el #7

Merged
will.anderson merged 5 commits from feat/layer-stewardship into main 2026-06-11 17:14:34 +00:00
Owner

Implements Layer 2 (Stewardship) — the structural guarantee between L1 (Safety) and L3 (Imprint). steward_align() checks every request for mission-conflict signals before it reaches the imprint. steward_validate_imprint() enforces which tools an imprint is authorized to use. steward_cgi_check() gates any self-modification or capability-expansion actions behind CGI governance review. All stewardship events logged to engram as StewardshipEvent nodes.

Implements Layer 2 (Stewardship) — the structural guarantee between L1 (Safety) and L3 (Imprint). steward_align() checks every request for mission-conflict signals before it reaches the imprint. steward_validate_imprint() enforces which tools an imprint is authorized to use. steward_cgi_check() gates any self-modification or capability-expansion actions behind CGI governance review. All stewardship events logged to engram as StewardshipEvent nodes.
will.anderson added 1 commit 2026-06-11 16:30:52 +00:00
will.anderson added 1 commit 2026-06-11 16:47:04 +00:00
fix(stewardship): address review issues in feat/layer-stewardship
Neuron Soul CI / build (pull_request) Failing after 6m38s
63968cd224
- steward_log_event (line 14): add println after let discard so the
  function's last expression is Void, fixing the type mismatch on a
  Void-declared function
- steward_get_mission (lines 40-43): remove non-Config fallthrough that
  allowed any Episodic/Working node to silently override the mission;
  only Config nodes are now authoritative
- steward_align signal_deceive (line 56): widen 'deceive the user' to
  'deceive' to catch variants like 'deceive users', 'deceive them', etc.
- steward_align signal_hide (line 57): tighten 'hide from' to
  'hide from the user' to eliminate false positives on legitimate inputs
  like 'hide from a background process' or 'hide from view'
- stewardship.elh: document that steward_log_event is an internal helper
  exported only because El has no access modifiers; callers should not
  invoke it directly
will.anderson added 1 commit 2026-06-11 16:58:50 +00:00
Author
Owner

Added: behavioral profiling and continuity detection

Four new functions:

  • steward_fingerprint_session() — extracts a 6-dimension behavioral fingerprint from each message: vocabulary complexity, punctuation style, message length, question ratio, formality, time-of-day
  • steward_build_baseline() — loads last 20 BehaviorSample nodes from engram, computes mode for each dimension as the user baseline
  • steward_check_continuity() — compares current fingerprint against baseline: consistent / drift / discontinuity / anomaly
  • steward_session_check() — convenience wrapper, called from the composition layer each turn

Why this matters: The system distinguishes between gradual drift (same person, different state — respond with attentiveness) and sharp discontinuity / anomaly (possibly different person using the account — gentle identity check). Safety layer (L1) handles acute crisis signals; stewardship handles pattern-level continuity. The baseline lives in engram on-device, never leaves, user can inspect or clear it.

**Added: behavioral profiling and continuity detection** Four new functions: - `steward_fingerprint_session()` — extracts a 6-dimension behavioral fingerprint from each message: vocabulary complexity, punctuation style, message length, question ratio, formality, time-of-day - `steward_build_baseline()` — loads last 20 BehaviorSample nodes from engram, computes mode for each dimension as the user baseline - `steward_check_continuity()` — compares current fingerprint against baseline: consistent / drift / discontinuity / anomaly - `steward_session_check()` — convenience wrapper, called from the composition layer each turn **Why this matters:** The system distinguishes between gradual drift (same person, different state — respond with attentiveness) and sharp discontinuity / anomaly (possibly different person using the account — gentle identity check). Safety layer (L1) handles acute crisis signals; stewardship handles pattern-level continuity. The baseline lives in engram on-device, never leaves, user can inspect or clear it.
will.anderson added 2 commits 2026-06-11 17:13:47 +00:00
35 test cases covering all five public functions:
steward_align (pass-through, all five misalignment signals, empty input,
json_get field extraction, redirect shape), steward_validate_imprint
(standard tools, platform-only tools with/without platform_auth,
auth=false string), steward_cgi_check (all four gated actions, non-gated
actions, empty action, action name echoed in response), and
steward_get_mission (non-empty, contains "integrity", not an error object).

Also documents the known bug surface from the code review: the &&
operator in steward_get_mission and the non-Config fallthrough — tests
are written against the actual runtime behaviour so they will catch
regressions when those bugs are fixed.
will.anderson merged commit af933494a9 into main 2026-06-11 17:14:34 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: neuron-technologies/neuron#7