specpilot validate exits with 1 when .specs/ has an error, so a CI job that runs it fails the pull request. It asks no questions and needs only the checked-out repo.
GitHub Actions
Save this as.github/workflows/specs.yml:
- Node.js 24 meets SpecPilot’s requirement: 22.23.5 or later in 22.x, 24.22.3 or later in 24.x, or 26.13.1 or later.
- The version is pinned, so a new release never changes your build by surprise. Raise it when you upgrade.
--verboseadds a summary to the log: files checked, errors and warnings.
What fails the job
Only errors. Warnings are printed, but the job passes.
Each spec file’s page lists its checks. The date and line-limit checks are warnings, so a quiet month doesn’t break the build. A new project also has warnings until you fill in its files.
Don’t use --fix in CI
--fix writes files on the runner, and they’re never committed. Run specpilot validate --fix on your machine and commit what it creates.
More than one project in the repo
Add one step per folder:Other CI systems
Any CI with Node.js works the same way: installspecpilot, run specpilot validate, and a non-zero exit fails the job.
If Node.js is too old
SpecPilot prints a security notice and still runs, so the job doesn’t fail for it. Setnode-version to a supported release.
Checked against SpecPilot 2.22.0.