Skip to content

Latest commit

 

History

History
143 lines (92 loc) · 5.84 KB

File metadata and controls

143 lines (92 loc) · 5.84 KB

Workflows

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.

Core Contract

  1. The harness inspects code, a PRD, a design thread, or a variant-heavy surface.
  2. The harness extracts a structured schema for one coherent interaction surface.
  3. The harness runs lattice validate.
  4. The harness runs lattice generate.
  5. 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.

Command Pattern

In another repo or in a normal installed environment, use:

cat schema.json | lattice validate
cat schema.json | lattice generate

While 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 generate

Files remain useful for examples, debugging, and audit trails, but they are not the primary abstraction.

Plan Mode

Use when the starting point is a feature discussion, PRD, or architecture note.

Recommended prompt shape:

  1. Ask the agent to identify parameters, value partitions, and known invalid combinations.
  2. Require a structured schema.
  3. Require validate before generate.
  4. 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:

Test Mode

Use when the starting point is code, a PR diff, or an existing test suite.

Recommended prompt shape:

  1. Ask the agent to derive parameters from real behavior branches.
  2. Require a structured schema, using a temp file only if needed to call the CLI.
  3. Require generated rows to be compared against existing tests.
  4. 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:

OSS Audit Mode

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:

  1. Ask the agent to identify independently valid features that interact.
  2. Require a schema that includes the known issue row as a forced scenario.
  3. Require generated rows to be compared with a public baseline, spec, or upstream reproduction.
  4. Ask for the write-up to link directly to the upstream issue or PR and avoid overstating novelty.

Reference example:

Higher Strength Mode

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:

Variant Rendering Mode

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:

  1. Ask the agent to identify rendering dimensions, meaningful value partitions, and true impossibilities.
  2. Require a structured schema.
  3. Require generated rows to be rendered or prepared for the chosen evaluator.
  4. 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:

Self-Hosting Mode

Use when Lattice should test its own CLI, configuration, or agent integration behavior.

Reference document: