Guidance for AI agents working in the csspin-workflows repository.
csspin-workflows is a plugin package for csspin, the task runner used
across CONTACT Software's cs.* projects. It provides
csspin_workflows.stdworkflows, which lets other plugins register spin tasks
against shared workflows (build, test/tests, cept/acceptance,
preflight, lint/check, localize, sbom) so a single command like
spin test runs every task any enabled plugin decorated with
@task(when="test").
src/csspin_workflows/stdworkflows.py— the workflow task definitions.src/csspin_workflows/stdworkflows_schema.yaml— spinfile schema for the plugin's configuration.doc/— Sphinx documentation (.rst).doc/plugins/stdworkflows.rstis the user-facing reference for the workflows and must be kept in sync withstdworkflows.pywhenever a workflow or subcommand is added, renamed, or removed.doc/relnotes.rst— release notes; see the instructions embedded as an RST comment at the top of the file for the required format per release.tests/integration/— integration tests that provision a real project viaspin(seetests/integration/yamls/) and invoke workflows against it.
- Entry point for everything is
spin <task>; seespinfile.yamlfor how this repo provisions itself (needscsspin-pythonandcsspin-docsto build the docs). - A task registered with
@task(when="...")must implement all parameters (with matching type annotations) of the corresponding workflow function instdworkflows.py. A mismatch only fails at workflow execution time, not at import/registration time, so keep new or changed workflow signatures and their consuming tasks in lockstep. - The
sbomworkflow is the exception to the@task(when=)pattern: its subcommands (sbom:build,sbom:assemble,sbom:enrich,sbom:quality) are invoked directly by name rather than collected from other plugins. - When adding or changing a workflow (or a
sbomsubcommand), update all of: the task instdworkflows.py, the docstring.. click::directives at the top of that file,doc/plugins/stdworkflows.rst, and add an entry todoc/relnotes.rstunder an "Unreleased" or the next version section following the format described there. - Quality gate: run
prek run(orpre-commit run) after any code change. - Python package manager is
uv; never callpython/pipdirectly. - Follow
CONTRIBUTING.mdfor the issue-first contribution workflow and the release procedure.
- Set up a dev environment:
uv venv && uv pip install -r requirements-dev.txt(installs this package editable, pluscsspin,pytest,pytest-cov). - Run the test suite:
pytest tests/. The only tests today are theintegration-marked ones intests/integration/, which shell out to a realspinCLI against the fixture project intests/integration/yamls/, sospinmust be onPATH(installed via the dev environment above). - Run a single test:
pytest tests/integration/test_provisioning.py::test_stdworkflows_provision. - Build the docs:
spin provisiononce, thenspin docs html(mirrors what Read the Docs runs per.readthedocs.yaml).