Contributing to CredenceStack¶
Thanks for helping. This project is used to produce evidence that regulated institutions may rely on, so we value correctness, traceability and small, reviewable changes.
Development setup¶
uv sync --all-groups --extra langchain # .venv on Python 3.12 with dev dependencies
uv run pre-commit install # ruff, pyright, mypy, gitleaks, stealth check
Checks¶
uv run ruff check .
uv run ruff format --check .
uv run pyright
uv run mypy # strict on src/credencestack/core
uv run pytest -q # offline: unit, property and integration tests
scripts/stealth_check.sh
integrationtests exercise the CLI end to end against files on disk; no network.livetests call real model APIs and only run whenCREDENCESTACK_LIVE=1and the relevant API key is present in the environment. They never run in CI by default.
Ground rules¶
- No secrets in the repo. API keys are read only from environment variables. Use a local
.envrc(git-ignored) if you like direnv. - No network calls in unit tests. Mock HTTP with
httpx.MockTransport. - Framework code stays behind interfaces. Anything that imports
inspect_ai,openai-agents,langgraphorclaude-agent-sdklives in a connector/engine module and is imported lazily, so the core installs without those extras. - Type hints and docstrings on every public API. Pyright runs in strict mode.
- Control descriptions are written in our own words. Never paste text from standards,
regulations or frameworks into
catalogs/; reference them by identifier. - Check the installed version of third-party APIs before integrating with them; agent frameworks change quickly.
Commits and pull requests¶
- One logical change per commit, with a clear imperative subject line
(e.g.
graders: add max_action_amount rule). - Update
CHANGELOG.mdunder Unreleased for user-visible changes. - New scenarios need at least one agent that passes and one that fails them.
By participating you agree to abide by our Code of Conduct.
Developer Certificate of Origin (DCO)¶
We do not use a CLA. Every commit must carry a DCO sign-off certifying that you wrote the
change or otherwise have the right to submit it under the project's licence
(see https://developercertificate.org/). Add it with git commit -s:
Signed-off-by: Your Name <your email address>
Stealth and privacy check¶
scripts/stealth_check.sh runs as a pre-commit and commit-msg hook and in CI. It fails if a
term from your local, git-ignored .stealth-denylist appears in files, history or image/PDF
metadata, or if any email other than hello@credencestack.ai or a noreply@ address
appears. An optional local .stealth-allowlist lists ordinary words that merely contain a
denylisted substring.
For the code itself (the architecture, the rules each change must keep and the checks that enforce them), see the contributor guide.