Controlled-access source • Not public npm

LexSona turns persona and correction history into constraints.

LexSona is the behavioral constraint engine in the stack. It derives constraints from active personas, baseline rules, and learned corrections, then returns those constraints to the consuming agent or runner.

It never executes tools, assembles prompts, runs gates, stores Frames, or silently substitutes a safer persona when memory is missing.

Dependency chain
Lex can run by itself.
LexSona needs Lex.
LexRunner needs both.

Core principles

Returns constraints

LexSona derives behavioral constraints. It does not call tools or orchestrate work.

Deterministic

Same persona, rules, and context should produce the same constraint set.

Auditable

Rules and derivations are inspectable, including where a learned correction came from.

Scoped

Behavioral rules are namespaced by project, domain, or module so corrections do not leak everywhere.

Offline explicit

Offline-safe personas declare confidence ceilings and disclaimers. Connected personas fail loudly without memory.

Access-aware future

In enterprise settings, Sona identity can shape posture and requested authority without pretending to own IAM.

Persona naming

LexSona uses decision-style persona IDs. The name describes how an agent approaches decisions, not a theatrical character.

quality-first_engineering momentum-first_product risk-reducer_operations scope-warden_security

Boundary with LexThority

LexSona

What posture should this agent take? How cautious should it be? Which behavioral rules apply?

LexThority

Given this envelope and this effect, may the agent attempt it, should it escalate, or must it deny?

Lex

What prior corrections, receipts, and denials should be remembered for future behavior?