cl-weave¶
cl-weave is a modern Common Lisp testing framework inspired by Vitest and
designed around Lisp's strengths: macros, conditions, dynamic bindings, and
reproducible Nix workflows.
The project is intentionally dependency-free at the core. It should be easy to run in CI, embed in ASDF projects, and extend from the REPL.
New to cl-weave?
Install it in one command, then write your first suite in under a minute:
Continue with Installation → Quick Start → DSL Guide.
Explore the docs¶
-
:material-rocket-launch:{ .lg .middle } Getting Started
Every Nix install path, your first passing suite, and a step-by-step guide to adopting cl-weave in an existing ASDF project.
:octicons-arrow-right-24: Installation · Quick Start · Adoption
-
:material-book-open-variant:{ .lg .middle } Writing Tests
Suites, cases, fixtures, focus/skip/todo, retry/timeout, concurrency, and compile-time table tests — the full
describe/it/expectsurface. -
:material-flask-outline:{ .lg .middle } Advanced Testing
Property-based testing with shrinking, form-level mutation testing, and time-travel debugging over a recorded execution journal.
:octicons-arrow-right-24: Property Testing · Mutation · Time-Travel
-
:material-cog-outline:{ .lg .middle } Running & CI
Filtering, sharding, sequencing, bail, and watch mode; spec/JSON/TAP/JUnit reporters; SBCL coverage artifacts; and the machine-readable AI contract.
:octicons-arrow-right-24: Test Execution · Reporters & CI · AI Discovery
Status¶
Stable (1.0). The capability list below is the committed public surface, and
it is validated by the CI entrypoints documented in Reporters and CI
on Linux. Within the 1.x series, changes stay backward-compatible under
Semantic Versioning; breaking changes ship only in a new
major version:
describe/ithierarchical test DSLexpectmatcher assertions with readable failure reports- smart S-expression assertions that capture operand values
with-soft-assertionsblocks that run every expectation and report all failures togetherit-eachanddescribe-eachcompile-time table tests- canonical hyphenated variants such as
it-only,describe-concurrent,expect-not,expect-resolves, andexpect-assertions it-propertydeterministic property tests with shrinking- form-level mutation testing with macro-defined operators
it-isolatedsubprocess tests for FFI and crash boundariesbefore-all/after-all,before-each/after-each, and CPSaround-eachdynamic fixturesdescribe-skip/it-skipskipped suites and casesdescribe-skip-if/it-skip-ifandrun-ifconditional registrationdescribe-only/it-onlyfocused runsdescribe-todo/it-todotodo suites and cases- Vitest-style test name filtering for focused local and CI runs
- Vitest-style test discovery list mode for AI agents and CI tooling
- declarative logic-query engine (
logic-program,logic-run,test-plan-where,journal-where) for querying the test plan and time-travel journal as Prolog-style facts - AI-friendly CLI metadata for typed/enumerated options, artifact schemas with field maps, capability matrix, package exports, policy documents, matchers, mutations, and MOP architecture assertions
- source file metadata in structured reporters and test plans
- Vitest-style deterministic sequence ordering for flaky-test reproduction
- time-travel execution journal recording an assertion/mock-call/hook/shrink-step/note timeline per attempt, surfaced in the spec and JSON reporters
- deterministic per-test random replay with recorded seeds and single-test
replay-test - interactive time-travel breakpoints:
*journal-breakpoint*signalsjournal-breakpoint-hitat a chosen frame, dropping into a live debugger or a programmatichandler-bindhook - CLOS-extensible journal frame kinds:
record-journal-framerecords your own frame kind,journal-frame-line-for-kindis an eql-specialized generic function for rendering it - reloadable timelines:
journal-frame-from-plistrebuildsjournal-frameobjects from a savedsexpresults artifact, so a CI-captured timeline can bereadback and analyzed offline withexplain-journal/journal-diff/journal-where - Vitest-style
:bailexecution control for fast-fail CI runs - Vitest-style per-test
:retryand:timeout-mscontrols - Vitest-style
it-concurrent/describe-concurrentparallel execution modes - Vitest-style
it-failsexpected-failure cases - Vitest-style length, instance, inline snapshot, and external snapshot matchers
- CI-friendly thunk runtime and allocation assertions
- SBCL
sb-coverreset/save integration for CI coverage artifacts - Vitest-style mock functions with call history assertions
- ASDF system definitions
- ASDF-aware system runner and watch mode
- spec, S-expression, JSON, JSONL, TAP, GitHub Actions, and JUnit XML reporters
- non-zero process exit on failure for CI
- safe dynamic global function mocking with
with-mocked-functions
Guide Map¶
- DSL Guide — suites, cases, fixtures, skipping, focus/todo, retry/timeout, concurrency, and table tests.
- Assertions and Matchers —
expect, built-in and custom matchers, performance, and numeric assertions. - Property Testing —
it-propertyand the built-in generator library. - Mutation Testing — mutation operators and CI score gates.
- Mocking — mock functions, spies, and call-history matchers.
- Benchmarking — the
benchmark/measuremicro-benchmark helper and its timing statistics. - Time-Travel Debugging — the execution journal, deterministic replay, single-test replay, and interactive breakpoints.
- Test Execution — filtering, sharding, sequencing, listing, declarative plan queries, bail, subprocess isolation, and watch mode.
- Logic Programming — the unification/backtracking query engine behind declarative test-plan queries.
- Reporters and CI — reporter formats, coverage, and the GitHub Actions pipeline.
- AI Discovery — the machine-readable metadata contract for agents and generators.
Reference Map¶
- API Reference — every exported symbol, grouped by concept.
- AI Contract — the frozen artifact and metadata schemas.
- Runtime Support — supported implementations and platforms.
- Doctor Report — the
doctorhealth checks. - Development — build, test, coverage and formatting commands.
- Changelog — the release history.
Nix Workflow¶
The flake.nix at
the repository root packages cl-weave as a Nix flake:
nix develop— a devShell with SBCL and GNU coreutils, andparedit-clifor structural S-expression edits.nix run . -- <command>— the packaged CLI (run,list,watch,doctor,metadata,version,help).nix run .#test— the self-test suite throughrun-tests.lisp.nix flake check— every CI entrypoint (test suite, reporters, coverage gate, AI metadata, CLI smoke tests,paredit-lintstructural parse check, the treefmt formatting gate, and the docs build) as reproducible derivations.nix build .#docs— builds this documentation site with MkDocs (Material) in--strictmode, so broken links fail the build.nix fmt— formats Nix sources with treefmt (nixfmt).
Running direnv allow loads the devShell automatically.
Support¶
Use Support Policy for the canonical support boundaries.
Use Issue Reporting Guide for reproducible bugs and behavior questions.
Use private GitHub security advisories for vulnerability reporting. Do not put exploit details in a public issue.
Project Operations¶
- Adoption guide: docs/src/adoption.md
- AI contract: docs/src/ai-contract.md
- Issue reporting guide: docs/src/issue-reporting.md
- Pull request guidance: docs/src/pull-request-template.md
- Pull request form: .github/pull_request_template.md
- Pull request queue: https://github.com/nerima-lisp/cl-weave/pulls
- Bug report form: .github/ISSUE_TEMPLATE/bug_report.md
- Feature request form: .github/ISSUE_TEMPLATE/feature_request.md
- Issue template routing: .github/ISSUE_TEMPLATE/config.yml
- Community health contract: docs/src/community-health.md
- Code ownership: .github/CODEOWNERS
- Governance: docs/src/governance.md
- Maintenance policy: docs/src/maintenance-policy.md
- Distribution policy: docs/src/distribution-policy.md
- Support policy: docs/src/support-policy.md
- Runtime support: docs/src/runtime-support.md
- Release process: docs/src/release-process.md
- Versioning policy: docs/src/versioning-policy.md
- Project scope: docs/src/project-scope.md
- Triage policy: docs/src/triage-policy.md
- Security reporting: https://github.com/nerima-lisp/cl-weave/security/advisories/new
- Issue tracker: https://github.com/nerima-lisp/cl-weave/issues
- Release notes: https://github.com/nerima-lisp/cl-weave/releases
Runtime metadata mirrors these operations surfaces through policyDocuments,
referenceDocuments, supportChannels, communityHealth,
securityContacts, lifecycle, runtimeSupport, and releaseProcess for
agent-side OSS operations discovery.
License¶
MIT. See LICENSE.