Skip to main content

Lamina vs E2E tests

E2E tests (Playwright, Cypress) assert scenarios you code after the fact. /lamina-verify walks the live build as personas against the behavior contract and surfaces gaps in fix.md.

Curated by Aryan Iyappan · Updated 2026-07-13

Who this comparison is for

You are in the right place if

  • You thought /lamina-verify replaces tests.
  • You want to know when to verify with Lamina vs encode invariants in Playwright.
  • E2E tests pass on happy path but edge gates were never scenarios.
  • AI agent shipped UI before you wrote test files.

Context

Testing and verification are adjacent. Developers hear verify and think QA replacement. Lamina verify is contract-driven exploration on the live build during development. E2E is assertion-driven regression in CI. Anti-testing framing would mislead; this page clarifies sequencing.

Common situations

Concrete cases from AI-shipping workflows. Each shows what the alternative handles and where a behavior contract helps.

First implementation of partner onboarding

Situation
No Playwright tests yet. Agent finished UI. You need to know if submit gate works before investing in test authoring.
What E2E tests does
You would manually click-test or write E2E from scratch based on assumptions.
What Lamina adds
/lamina-verify walks partner persona against run.yaml, outputs fix.md for agent.
Takeaway
Verify before you codify scenarios.

Stable checkout, CI regression suite exists

Situation
Playwright covers hold expiry and email gate. Feature unchanged except copy tweak.
What E2E tests does
Run existing E2E in CI.
What Lamina adds
Optional re-verify if contract changed; otherwise tests suffice.
Takeaway
Mature E2E reduces need for repeat verify.

E2E happy path only

Situation
Tests cover login and booking success. Pay-before-verify bug ships because no scenario asserted it.
What E2E tests does
Green CI on incomplete scenario set.
What Lamina adds
Contract lists illegal transitions; verify explores beyond happy path tests.
Takeaway
Tests only guard what you thought to encode.

Comparison

Lamina verify vs E2E testing
DimensionE2E testsLamina
Primary jobRegression tests for coded scenariosFind behavior gaps from contract
Layer in stackTest suite in CIPre-test behavior verification
Primary outputPlaywright/Cypress test filesfix.md findings
Writes app source?Test code onlyNo app source
Behavior spec (states, flows, permissions)Encodes what you decided to testSpecs what product must allow
Durable in-repo artifacttests/ directory.lamina/ contracts
Post-build verificationCI test runs on every PRPersona walks during development
Repo and stack fitAny project with test runnerAny agent workflow
Best whenLocked behavior, CI regressionDiscovering gaps after AI implementation
When you don't need LaminaComprehensive E2E already covers featureYou only need regression CI
Compose with Lamina?Encode invariants after behavior settlesVerify first → fix → then Playwright

Workflow

Lamina vs E2E tests: recommended workflow
StepE2E testsLamina
1N/A until behavior exists/lamina-design
2N/AImplement from implement.md
3Draft test scenarios/lamina-verify → fix.md
4Playwright in CIRe-verify if contract changes

When to use which

Lamina vs E2E tests: when to use each
SituationE2E testsLamina
New AI-built feature, no testsManual QA or write tests blindVerify against contract
Regression on stable featureE2E in CIOptional
Contract changedUpdate testsRe-verify before updating tests

Worked example

Inventory hold with countdown. Playwright could assert hold expiry if you wrote the scenario. Lamina verify found pay-before-verify from the contract before tests existed. Teams then encoded the invariant in CI.

HavenStay demo walkthrough

Frequently asked questions

Does /lamina-verify replace E2E tests?

No. It finds behavior gaps early. Encode stable invariants in Playwright after behavior settles.

Verify uses personas, not selectors. How is that different?

Persona walks follow product rules from run.yaml. E2E asserts DOM and URLs you coded. Complementary.

Can verify run in CI?

Primary value is during development on staging. E2E remains the CI regression layer.

Comparisons map stack layers, repo artifacts, and HavenStay demo examples. Updated when major tools change positioning.

Install in one command.

A headless product-design skill for your AI coding agent. Then run the design → implement → verify loop on your next feature.

Apache-2.0 · open source. Star on GitHub if Lamina saves you a loop.

npx skills install aryaniyaps/lamina

Works with your coding agent

  • Cursor
  • Claude Code
  • Codex
  • Gemini
  • Pi
  • and more