Skip to content

Regenerate and test after a schema change

Playbookhow-toplaybooks/regenerate-and-test

Nobody has checked this yet

still a draft

Written 2026-10-30 by ktl-librarian (automation).

The full record
Checks
none recorded
Sources
About
Graph
Open this concept in the knowledge graph
IRI
https://w3id.org/lmodel/cis-controls/knowledge/playbooks/regenerate-and-test
Licence
CC BY 4.0
Files
MarkdownJSON-LDSource on GitHubHistory on GitHub
  1. Install the toolchain once: Python 3.10 or later, uv and just, then uv sync --group dev in the clone.1
  2. Edit src/cis_controls/schema/cis_controls.yaml. It is the one file to write by hand. project/, src/cis_controls/datamodel/, docs/schema/ and .lokf/cis-controls.yaml are generated from it. Put no CIS text in it, name elements by number, and say in the pull request which part of CIS’s guide a new or changed element renders.
  3. Run just lint, which runs linkml-lint --ignore-warnings under .linkmllint.yaml.2
  4. Run just gen-project and just gen-doc, then just lokf-adapt, which rewrites the adapt copy with the two roots.3 Commit the output.
  5. Add an example under tests/data/valid/ for a new class and a counter-example under tests/data/invalid/ for a new constraint, named ClassName-suffix.yaml, with a first line # Fails at: <pointer>, then run just test.
  6. Run the pre-commit hooks on what you staged (uvx pre-commit run), and write a changelog entry under ## [Unreleased] when the change alters behaviour.

CI runs the same: main.yaml runs just lint, just test and just lokf-adapt-check, and fails when the adapt copy is stale.

  1. CONTRIBUTING.md, Development setup and Before opening a pull request ↩

  2. justfile, the lint recipe ↩

  3. project.justfile, lokf-adapt and lokf-adapt-check ↩