Skip to main content

Develop

Repository layout

Path Holds
.claude-plugin/ plugin.json and marketplace.json
hooks/ The three hooks and their shared lib.js
rules/ Core, house and language rules injected each session
skills/ The persona, rule-management skills, figure-style and the 21 pipeline skills
templates/ plots.*, theme.*, palettes.*, skillkit.py and the air, ruff and lintr configs
bench/ acumen benchmarks: with and without the skills
docs/ The pipeline skill contract and the ClawBio determinism plan
site/ This website

Tests

Hooks, rules, templates, the eval harness and consistency checks:

npm test   # node --test 'tests/*.test.js' 'eval/tests/*.test.js'

tests/consistency.test.js fails when the package.json and plugin.json versions differ, a skill’s frontmatter name does not match its folder, or a references/ path or /lucid-coder: command cited in the docs does not exist. The CI workflow (.github/workflows/test.yml) runs the suite and claude plugin validate --strict ., and fails when the count of skipped tests rises above tests/skip-baseline.txt (77, estimated from the skip guards; confirm it on the first CI run). Tests skip when R, uv, ruff or air is missing. A second CI job, skills, installs the pixi dev env and runs the pipeline skill suites with pytest.

The eval scripts read the R prefix from R_ROOT, then LUCID_R_ENV, then the Rscript on PATH. Set R_ROOT before running them; a different R can change gate results.

The pixi dev environment holds every skill’s dependencies plus pytest and node, so one command runs the plugin tests and every skill suite:

pixi install -e dev
pixi run -e dev test

The suites are slow on a network file system (minutes each), so run them per skill in parallel when you can. To run one suite without pixi, use the exact uv run line in that skill’s references/maintainer.md, for example:

cd skills/group-tests
uv run --python 3.12 --with numpy,pandas,scipy,matplotlib,plotnine-extra,pytest \
  python -m pytest -q -p no:cacheprovider tests

Vendored helpers

Each pipeline skill folder is self-contained, so it carries byte-identical copies of templates/plots.py, theme.py, palettes.py and skillkit.py. A test in each skill fails when a copy drifts. After editing a template, copy it into every skill:

for f in plots.py theme.py palettes.py skillkit.py; do
  for d in skills/*/scripts/$f; do cp templates/$f "$d"; done
done

Adding a pipeline skill

Follow the contract in docs/pipeline-skills.md. Copy the shape of skills/pseudobulk-de/: a SKILL.md contract, one script entry point, a seeded demo generator, demo data under 1 MB, and tests for the demo golden values, the output tree and every ERROR string.

Benchmarks

bench/ holds acumen projects that run the same tasks with and without a skill. docs/clawbio-determinism/BENCH.md records the results.

This site

The site is Quarto, in site/. The gallery images come from the template self-check:

uv run --with plotnine-extra,pandas,numpy python site/make_figures.py
quarto preview site

A push to main that touches site/ rebuilds the site and deploys it to GitHub Pages through .github/workflows/docs.yml.