Core Concepts

Context Personas

One runtime, many verticals. A persona reshapes the whole context surface — tool set, read mode, compressor, chunker, intent taxonomy and sensitivity floor — for a domain in a single switch, while the coding default stays exactly as it was.

LeanCTX ships tuned for software work: the full Power tool surface, a code-oriented intent taxonomy, identity compression. A persona reshapes that whole context surface for a different domain — prospecting, research, support, data — in one switch, and leaves the coding default untouched.

Built-in personas

Each persona is a real, shipped bundle. The tool surface, read mode, compressor, chunker, intent taxonomy and sensitivity floor all move together:

PersonaTool surfaceCompression & read defaultsSensitivity floor
coding (default)Power profile — full surfaceidentity compressor · lines chunker · auto read modepublic
researchStandard profilemarkdown compressor · paragraph chunker · map read modepublic
supportStandard profileprose / identity compressioninternal
data-analysisStandard profileprose / identity compressioninternal
lead-gen (alias sales)Custom 6-tool surfaceprose compressor · paragraph chunkerconfidential

The lead-gen surface is genuinely narrowed to six prospecting tools — the refactor/code tools are gone:

ctx_read · ctx_search · ctx_url_read · ctx_knowledge · ctx_semantic_search · ctx_session

Selecting a persona

Set it via environment variable (or config.persona):

export LEAN_CTX_PERSONA=lead-gen     # or: research · support · data-analysis · coding

Persona::resolve reads LEAN_CTX_PERSONAconfig.persona › default coding. An unknown name falls back to coding — never an error. An explicit tool profile (set with lean-ctx tools) always wins, so existing coding installs are never disturbed.

Ship your own vertical — no fork

Not one of the built-ins? Drop a declarative persona file in your personas directory (default <OS-config-dir>/lean-ctx/personas, override with LEAN_CTX_PERSONAS_DIR) and select it by name:

# <personas_dir>/compliance.toml
name = "compliance"
tool_profile = "custom"
tools = ["ctx_read", "ctx_search", "ctx_semantic_search", "ctx_knowledge"]
default_read_mode = "map"
compressor = "prose"
chunker = "paragraph"
intent_taxonomy = ["scan", "flag", "cite", "report"]
sensitivity_floor = "confidential"
export LEAN_CTX_PERSONA=compliance

Under the hood

Persona resolution lives in rust/src/core/persona.rs. The resolved profile drives list_tools, so the surface genuinely shrinks or grows per persona — this is not a prompt hint, it is the actual advertised tool set. The sensitivity floor feeds the same governance layer as roles and budgets.

Where to go next