SpecSync Check
Bidirectional spec-to-code validation — keep module specs and source code in sync with CI-enforced contract checking. Written in Rust, language-agnostic, and blazing fast.
What it catches
- Undocumented exports — code exports something not in the spec
- Stale spec entries — spec documents something that doesn't exist in code
- Missing files — source file referenced in spec was deleted
- Phantom tables — DB table in spec doesn't exist in schema
- Incomplete specs — required sections missing from spec
9 languages supported
TypeScript/JavaScript, Rust, Go, Python, Swift, Kotlin, Java, C#, and Dart. Language is auto-detected from file extensions.
Usage
- uses: CorvidLabs/spec-sync@v1
with:
strict: 'true'
require-coverage: '100'Inputs
| Input | Default | Description |
|---|---|---|
version |
latest |
SpecSync version to download |
strict |
false |
Treat warnings as errors |
require-coverage |
0 |
Minimum file coverage percentage (0-100) |
root |
. |
Project root directory |
args |
'' |
Additional CLI arguments |
Full workflow example
name: Spec Check
on: [push, pull_request]
jobs:
specsync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: CorvidLabs/spec-sync@v1
with:
strict: 'true'
require-coverage: '100'Cross-platform
The action auto-detects runner OS and architecture (Linux/macOS/Windows, x86_64/aarch64) and downloads the correct pre-built binary. No Rust toolchain required.
Also available as a CLI
cargo install specsync
specsync check --strict --require-coverage 100
specsync watch # live validation during developmentWhat's Changed
- fix: rustfmt if-let chain formatting by @corvid-agent in #1
- feat: add reusable GitHub Action for specsync check by @corvid-agent in #2
- feat: add watch subcommand for live spec validation by @corvid-agent in #4
- feat: add comprehensive integration test suite by @corvid-agent in #3
- feat: add --json CLI flag and CHANGELOG.md by @corvid-agent in #5
- chore: add readme and homepage fields for crates.io publishing by @corvid-agent in #6
- chore: bump version to 1.1.0 by @corvid-agent in #7
Full Changelog: v1.0.0...v1.1.0