Development toolchain for requirement-traceable software projects
Project description
anspar-wf
Add standardized git hooks, linting, and development workflow to any project.
anspar-wf generates config-driven git hooks (pre-commit, commit-msg, pre-push) tailored to your project's languages and tools. It auto-detects your stack, installs the right linters and scanners at pinned versions, and keeps everything up to date as your config or anspar-wf itself evolves.
Quick Start
pip install anspar-wf
cd ~/your-project
anspar-wf init
That's it. init will:
- Detect your project's languages (Python, Dart, TypeScript, Docker)
- Generate a
.anspar-wf.tomlconfig file - Create git hooks in
.githooks/and pointcore.hooksPathto them - Offer to install any missing external tools at pinned versions
- Optionally set up Claude Code integration (session-start hook, plugins)
Edit .anspar-wf.toml to customize, then run anspar-wf upgrade to regenerate hooks.
Commands
| Command | Description |
|---|---|
anspar-wf init [PATH] |
First-time project setup: config, hooks, tools |
anspar-wf upgrade [PATH] |
Update hooks after config or version changes |
anspar-wf version [PATH] |
Show anspar-wf and project version info |
anspar-wf version check [PATH] |
Health check: config, hook drift, tool versions |
What You Get
Git Hooks
pre-commit — Runs on every commit:
- Branch protection (block direct commits to main/master)
- Secret scanning via gitleaks
- Language-specific linting (ruff for Python, dart analyze, eslint, hadolint)
- Markdown linting
commit-msg — Validates commit messages:
- Require ticket references (e.g.,
CUR-123) - Optionally require requirement references (e.g.,
REQ-d00042)
pre-push — Runs before pushing:
- PR-aware blocking (warn vs block depending on PR state)
- Full test suite execution
- Secret scanning across all commits being pushed
- Language-specific checks (ruff, pytest, dart format/analyze)
post-commit — Optional post-commit automation
External Tools
Managed at pinned versions via versions.lock:
| Tool | Purpose |
|---|---|
| gitleaks | Secret detection |
| ruff | Python linter |
| elspais | Requirement validation and traceability |
| squawk | PostgreSQL migration linter |
| markdownlint-cli | Documentation linting |
During init, anspar-wf checks which tools are missing or outdated and offers to install them.
Upgrading
When you update anspar-wf or change .anspar-wf.toml, run:
anspar-wf upgrade
Upgrade uses three-way comparison (stored hash vs. on-disk vs. target) to safely update hooks while preserving any local tweaks you've made. If there's a conflict (you modified a hook and a new version is available), it reports the conflict and shows a diff.
Claude Code Plugins (Optional)
Three plugins for developers using Claude Code:
- workflow — Ticket lifecycle management, branch protection, task-switch detection
- spec-compliance — AI-powered content validation for spec/ files
- plugin-wizard — Scaffold new Claude Code plugins
Plugins are automatically registered during init if Claude Code is detected (.claude/settings.json exists), and kept in sync during upgrade.
CI Integration
- name: Setup anspar-wf
run: |
pip install anspar-wf
anspar-wf init .
Or just verify an already-initialized project:
- name: Check tool versions
run: anspar-wf version check .
Development
pip install -e ".[dev]"
pytest
ruff check src/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file anspar_wf-0.2.0.tar.gz.
File metadata
- Download URL: anspar_wf-0.2.0.tar.gz
- Upload date:
- Size: 159.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d6903cdbe27be15ba42b5ded397256a0a432cb1a36cc99275ae490ae1b1fea60
|
|
| MD5 |
a25ee736b1e9eb65d8433c910e4dd81c
|
|
| BLAKE2b-256 |
c06f144be0f1f9f01d872c48a73d346993fea4262105c0e47e1d6706a861c6c8
|
File details
Details for the file anspar_wf-0.2.0-py3-none-any.whl.
File metadata
- Download URL: anspar_wf-0.2.0-py3-none-any.whl
- Upload date:
- Size: 207.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08a1d6866916ea2f3c7ec83df38486b83ccbf824c76b10541edeb7b55a04b3cd
|
|
| MD5 |
be88649201487b2fb312e5fe6edd6dd7
|
|
| BLAKE2b-256 |
e16fc2f694a332fad83b41846671bd5df3dd22e3205c172360859ea605f454cb
|