This file makes the harness-to-Lattice boundary explicit. Lattice is one deterministic step inside a larger agent workflow. The contract is the same for OpenClaw, Hermes, Codex, xAI-backed agents, Claude Code, or any custom harness.
- The harness inspects code, a PRD, a design thread, or a variant-heavy surface.
- The harness extracts a structured schema for one coherent interaction surface.
- The harness runs
lattice validate. - The harness runs
lattice generate. - The harness interprets the rows.
The harness does not invent the pairwise combinations itself.
Good default scope: one feature, one workflow, one service behavior, one endpoint family, one rendering surface, one component's variant space, one template family, one config matrix, or one state-machine slice.
In another repo or in a normal installed environment, use:
cat schema.json | lattice validate
cat schema.json | lattice generateWhile developing inside this repo, the equivalent fallback is:
cat schema.json | PYTHONPATH=src python3 -m lattice validate
cat schema.json | PYTHONPATH=src python3 -m lattice generateFiles remain useful for examples, debugging, and audit trails, but they are not the primary abstraction.
Use when the starting point is a feature discussion, PRD, or architecture note.
Recommended prompt shape:
- Ask the agent to identify parameters, value partitions, and known invalid combinations.
- Require a structured schema.
- Require
validatebeforegenerate. - Ask for the output to be turned into a stronger implementation plan.
Example:
Use $lattice-workflow. Read this feature brief, extract a Lattice schema, validate it, generate pairwise scenarios, and revise the plan so it explicitly accounts for the generated rows.
Reference example:
- examples/plan-mode-saved-search/feature.md
- examples/plan-mode-saved-search/model.yaml
- examples/plan-mode-saved-search/scenarios.json
Use when the starting point is code, a PR diff, or an existing test suite.
Recommended prompt shape:
- Ask the agent to derive parameters from real behavior branches.
- Require a structured schema, using a temp file only if needed to call the CLI.
- Require generated rows to be compared against existing tests.
- Ask for missing rows to become concrete test cases.
Example:
Use $lattice-workflow. Inspect the checkout code and tests, extract a Lattice schema, validate it, generate pairwise scenarios, and turn uncovered rows into concrete tests.
Reference example:
- examples/test-mode-checkout/code-notes.md
- examples/test-mode-checkout/model.json
- examples/test-mode-checkout/scenarios.json
Use when the starting point is a popular open source behavior surface with a public oracle, compatibility baseline, spec, or upstream issue. Keep the framing humble: Lattice is not claiming ownership of the bug. It supplies a compact interaction model, generated rows, and a reproducible way to inspect whether valid features compose correctly.
Recommended prompt shape:
- Ask the agent to identify independently valid features that interact.
- Require a schema that includes the known issue row as a
forcedscenario. - Require generated rows to be compared with a public baseline, spec, or upstream reproduction.
- Ask for the write-up to link directly to the upstream issue or PR and avoid overstating novelty.
Reference example:
- examples/httpx-query-param-merge/README.md
- examples/httpx-query-param-merge/model.yaml
- examples/httpx-query-param-merge/scenarios.json
Use when the user explicitly asks for 3-way coverage or the risk is concentrated in three-way interactions.
Example:
Use $lattice-workflow. Build a strength-3 schema from this notification rollout brief, validate it, generate 3-way scenarios, and summarize the riskiest rows.
Reference example:
- examples/three-way-notifications/brief.md
- examples/three-way-notifications/model.yaml
- examples/three-way-notifications/scenarios.json
Use when the starting point is a visual surface, component, partial, email template, PDF template, design-system story, or other finite rendering matrix.
Recommended prompt shape:
- Ask the agent to identify rendering dimensions, meaningful value partitions, and true impossibilities.
- Require a structured schema.
- Require generated rows to be rendered or prepared for the chosen evaluator.
- Ask for the rows to become a contact sheet, screenshot matrix, fixture set, visual diff run, or review checklist.
Example:
Use $lattice-workflow. Inspect this component's variant surface, extract a Lattice schema, validate it, generate pairwise rows, and turn the rows into a visual review matrix.
Reference example:
- examples/component-variant-matrix/brief.md
- examples/component-variant-matrix/model.yaml
- examples/component-variant-matrix/scenarios.json
Use when Lattice should test its own CLI, configuration, or agent integration behavior.
Reference document: