LEXWEAVEREFERENCE
LEXWEAVEREFERENCE
Engine homePackagesLexposer

Get started

ActivityPlan the next exposureTerminalQuickstart

Architecture

Packages

BoxesPackages

Specification

Packages

Packages

Use the full CLI or embed only the boundary your product needs.

PackageResponsibilityRuntime dependency
@lexweave/coreSchemas, bundle format, flow budget, planner, reader memoryzod
@lexweave/compileChunking, span verification, model jobs, pass orchestrationcore
@lexweave/renderDeterministic HTML and text replacementnone
lexweavecompile, render, and inspect CLIall packages

Embed the loop

import { compileText } from '@lexweave/compile';
import { expressionsFromAssets, planReplacements } from '@lexweave/core';
import { createReplacementEngine, densityRenderOptions } from '@lexweave/render';

const { bundle } = await compileText(
  { rawText, sourceLanguage: 'zh', targetLanguage: 'en' },
  { llm: myLlmAdapter }
);

const { expressions } = expressionsFromAssets(bundle.candidates, bundle.annotations);
const rules = planReplacements(expressions, sessionState, {
  budget: { density: 0.55 }
});
const engine = createReplacementEngine({
  rules,
  ...densityRenderOptions(0.55)
});

Adaptive planning

Control exposure density, support, unit size, and novelty without breaking flow.

Bundle specification

The portable, versioned artifact produced by one compile.

Table of Contents

Embed the loop