Thanks for considering a contribution! stackguard is intentionally small and dependency-light. We'd like to keep it that way.
git clone https://github.com/your-org/stackguard.git
cd stackguard
npm install
npm run dev # tsup watch modeIn another terminal:
node dist/index.js --help
node dist/index.js init
node dist/index.js check "implement token signing from scratch"The most important paths to exercise before opening a PR:
stackguard checkinteractive mode — both warn and block. Try high, medium, and low confidence violations.stackguard check --json— output should be valid JSON, exit code should be 0 (passed) or 1 (violations).stackguard checkin a non-TTY (stackguard check "..." | cat) — should never block on input, must exit non-zero in block mode.stackguard wrap -- echo hello— should pass through and echo "hello".stackguard wrap -- claude "add a database connection"— full flow including revising the prompt and re-running the wrapped command (use a prompt your example policy will actually flag).stackguard policy hashthen settingpolicyHashinstackguard.json— verify hash mismatch detection.
You'll need an ANTHROPIC_API_KEY for any check that hits the API.
- One thing per PR. A bug fix and a refactor in the same PR is two PRs. Small PRs get reviewed faster.
- Tests for new behavior. If you add a new code path, add coverage. We don't have a heavy test framework — manual reproducible steps in the PR description count if the code path is small.
- Update the README if you change user-facing behavior.
- Don't add dependencies without discussion. The current dependency list is intentionally short. Each new dep is a supply chain risk and an install-time cost.
- What command did you run?
- What did you expect?
- What happened instead?
stackguard --version, Node version, OS- Relevant snippet from
~/.stackguard/debug.logif any
- What problem are you trying to solve?
- What's your current workaround?
- Have you considered fitting it into an existing command instead of adding a new one?
Any change that touches the model selection, the check protocol,
the audit log format, or the interactive UI flow requires an ADR
in docs/adr/. Existing ADRs are short (<200 words) — match that
style. The point is to capture why, not what: the diff already
shows the what.
By contributing, you agree your contributions are licensed under the MIT License.