Skip to main content

Module persona

Module persona 

Source
Expand description

Context personas (persona-spec-v1).

A persona is a declarative bundle that shapes the whole context surface for a domain — not just coding. It composes:

  • tool surface (a ToolProfile: built-in tier or custom list),
  • default read-mode,
  • compressor + chunker (names from the extension registry, 12.9),
  • intent taxonomy (the task labels meaningful for the domain),
  • sensitivity floor (minimum classification to enforce).

Personas build on the existing tool profiles and are selectable per workspace/channel/session via config (persona = "…") or the LEAN_CTX_PERSONA env var. The built-in coding persona reproduces today’s default behavior; further presets are added in 12.16.

Structs§

Persona
A resolved persona ready to drive the pipeline.
PersonaSpec
The on-disk / declarative form of a persona (persona-spec-v1).

Enums§

PersonaError
Error parsing a persona spec.

Constants§

DEFAULT_PERSONA
The default persona name when nothing is configured.

Functions§

active
Resolve the active persona from the loaded config (env > config > default).
list_personas
All persona names available on this instance (built-ins + discovered files).
personas_dir
Root directory holding <name>.toml persona files. LEAN_CTX_PERSONAS_DIR overrides the default so containers/CI/tests can isolate it.