Contributing
Ways to contribute
Section titled “Ways to contribute”- Improve existing checks and recommendations
- Add or refine report output
- Expand documentation and examples
- Report issues and propose feature requests
Local development
Section titled “Local development”git clone https://github.com/anakotai/harnix.gitcd harnixnpm installRun the CLI against a target repository:
node bin/harnix.js scan .Run docs locally:
cd docsnpm installnpm run devRunning tests
Section titled “Running tests”Harnix uses Vitest for testing. Run the full test suite with:
npm testTests live in tests/ and use fixture repositories under tests/fixtures/ that simulate repos with various check conditions (pass, partial, fail). When adding or modifying a check, add corresponding tests in tests/checks/<check-id>.test.ts with at least three test cases covering pass, fail, and partial/edge scenarios.
Adding a new check
Section titled “Adding a new check”- Create
checks/<check-id>/meta.yamlwith required fields:id,name,category,tier,description,tags,applicableTo - Create
checks/<check-id>/check.tsexporting a default async function that receives aScanContextand returns aCheckResult - Rebuild with
npm run buildand verify the check is discovered by runningharnix scan . - Add tests in
tests/checks/<check-id>.test.ts
Contribution quality bar
Section titled “Contribution quality bar”- Keep changes focused and testable
- Update docs when behavior changes
- Prefer explicit check IDs and deterministic output wording
- Avoid network dependencies in scan execution
- Follow Conventional Commits format for commit messages (e.g.,
feat:,fix:,docs:,chore:)