plugins/lisa-cursor/skills/codify-verification/SKILL.md
Convert empirical verification into a regression test so it never has to be re-proven manually. Runs after a verification passes — picks the appropriate test framework for the verification type (Playwright for UI/browser, integration test for API/DB/auth, benchmark for performance, etc.), generates the test, wires it into the project's test runner, and confirms it executes. Mandatory step in the verification lifecycle and in the Build/Fix/Improve flows.
npx skillsauth add codyswanngt/lisa codify-verificationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Take the empirical verification that just passed and encode it as an automated regression test. The manual proof becomes a repeatable check that catches future regressions.
This skill is invoked from the verification lifecycle (between Execute and Spec Conformance) and from each work-type sub-flow (Build / Fix / Improve) after the local verification step.
Invoke once per empirical verification that produced PASS evidence. If a single change had three verifications (UI flow, API endpoint, DB query), this skill runs three times — or once with the three verifications batched, but each must produce its own committed test.
Skip codification only for verification types whose proof is inherently non-behavioral:
For every other verification type, codification is mandatory. If the codification is not possible (e.g., the test framework doesn't exist and can't be installed in scope), escalate via the lifecycle's Escalation Protocol — do not silently skip.
The caller must provide:
If any of these are missing, ask the caller before generating a test — a test built on guesswork will not match the verification it claims to encode.
Before creating anything new, find what the project already has. Use the Tool Discovery Process from verification-lifecycle. Specifically check for:
playwright.config.*, cypress.config.*, e2e/ directory, tests/e2e/, Playwright/Cypress in package.json devDependenciestests/integration/, spec/, test/integration/, supertest/fetch helpers, Vitest/Jest integration configsbenchmarks/, bench/), vitest bench, k6 scriptsDo NOT install a new framework if one already exists for the verification type. Use what's there.
| Verification type | Preferred framework (use whichever the project already has) | |---|---| | UI (web) | Playwright > Cypress > Selenium | | UI (mobile) | Maestro > Detox > Playwright (mobile emulation) | | API | project's integration test runner (Vitest / Jest / RSpec / pytest) with HTTP client (supertest / fetch / faraday) | | Database | integration test with real DB + migrations applied | | Auth | API or UI test asserting role-gated access (multi-role coverage) | | Security | regression test that reproduces the attack and asserts safe handling | | Performance | benchmark in the project's bench harness, asserting against the baseline captured in the verification | | Background Jobs | integration test that enqueues, drains the queue, and asserts terminal state | | Cache | integration test asserting hit/miss/invalidation behavior | | Configuration | integration test that loads config and asserts effect | | Email/Notification | test capturing outbound message via project's mailer test mode | | Observability | test asserting structured log/metric/trace emission | | Infrastructure | test or script asserting infra state (terraform plan diff, CDK snapshot test) |
If the project lacks the preferred framework AND no acceptable substitute exists, escalate.
The generated test must:
displays order confirmation after checkout not fixes PROJ-1234.For Playwright UI tests specifically:
test fixture / page fixture / auth helper if one existsgetByRole, getByText) over CSS/XPath — they survive markup churnRun only the new test, using whatever per-test invocation the project supports:
npx playwright test path/to/new.spec.tsnpx vitest run path/to/new.spec.tsnpx jest path/to/new.test.tsbundle exec rspec path/to/new_spec.rbConfirm:
For a bug fix, step 2 is mandatory and easy: check out the failing commit, run the new test, see it fail, return to the fix branch. This proves the test actually guards the regression.
Confirm the test is picked up by the project's standard test command (the one CI runs). Run that command and confirm the count went up by exactly the number of tests added.
If the test is in a directory the standard test command excludes (e.g., E2E suite that runs separately in CI), confirm the appropriate CI workflow includes it.
Commit the test in the same PR as the change it codifies, in its own atomic commit:
test: add e2e for <behavior>test: add regression test for <bug behavior>test: add benchmark asserting <metric> <baseline>The commit message body should reference the verification it encodes (one line linking to the proof artifact or the verification report section).
Append to the verification report (or PR description):
### Codified Verifications
| # | Verification | Framework | Test file | Status |
|---|--------------|-----------|-----------|--------|
| 1 | <description> | Playwright | `e2e/checkout.spec.ts::displays order confirmation after checkout` | PASS |
This evidence shows the verification is now guarded.
For each empirical verification passed in:
If codification was skipped, an explicit reason recorded in the report (one of the skip conditions above) — never silent.
.skip() the new test "temporarily" to make CI green — fix the test or fix the underlying changeexpect(true).toBe(true) placeholders or smoke-only assertions that don't actually exercise the verified behaviordocumentation
Onboard a user to the project via its LLM Wiki. Interviews the user about themselves in relation to the project, captures that to project-scoped memory only, then gives a guided tour of what the project is and sample questions they can ask. Use when someone is new to the project or asks to be onboarded. Read-mostly — it does not open PRs or write PII into the wiki.
documentation
Migrate an existing, hand-rolled wiki implementation onto the lisa-wiki kernel — phased and compatibility-first, with a strict no-loss guarantee. Use when adopting lisa-wiki in a repo that already has its own wiki/, ingest skills, docs, or roles. Renaming things into the canonical shape is fine; losing functionality or data is not. Ends by running /doctor.
development
Health-check the LLM Wiki. Reports orphan pages, contradictions, stale claims, broken internal links, missing index/log coverage, structure-manifest violations, and secret/tenant leaks. Use periodically or before hardening a wiki. Read-only — it reports findings, it does not fix them.
testing
Ingest source material into the LLM Wiki. With an argument (URL, file path, or prompt) it ingests that one source; with no argument it runs a full ingest across every enabled non-external-write source. Routes to the right connector, then runs the ordered pipeline (source note → synthesis → index → log → verify → state → commit/PR). Use whenever new knowledge should enter the wiki.