Guide • Lex 2.0.0

How to Use Lex

Five steps to policy-aware work continuity with receipts.

Install

# Global install (CLI) npm install -g @smartergpt/lex # Or as a project dependency npm install @smartergpt/lex

After installation, run npx lex init to set up your workspace.

Quick Start

1) Define Policy

Add minimal lexmap.policy.json with module rules defining architecture boundaries, ownership, and allowed/forbidden edges.

2) Define Workflows

Add lex.yaml to describe workflows (review-pr, ship-release, etc.) with their inputs and policy constraints. Learn about lex.yaml →

3) Capture Frames

Use lex remember at meaningful moments; include next action, blockers, and module_scope. Frames become your episodic memory.

4) Recall Context

lex recall TICKET-123 to get rendered memory card + Atlas Frame (fold radius 1) showing neighboring modules.

5) Ask Why

Assistants cite policy violations from timestamped Frames — answers with receipts, not vibes.

Contract Surfaces

Lex 2.0.0 provides three stable contract surfaces and AX guarantees that agents, CI, and runners can depend on:

  • Frames: timestamped work session snapshots with summary, blockers, next action, and module_scope.
  • lexmap.policy.json: machine-readable architecture boundaries.
  • lex.yaml: intent-level workflow contracts describing what work exists and what policies apply.