Skip to content

Latest commit

 

History

History
72 lines (55 loc) · 2.11 KB

File metadata and controls

72 lines (55 loc) · 2.11 KB

Contributing

Thank you for your interest in contributing to @stll/stdnum.

CLA

All contributors must sign the Contributor License Agreement. You will be prompted automatically when you open a pull request.

Development setup

# Prerequisites: Bun and Rust 1.96
bun install
bun run rust:check     # lint and test the Rust implementation
bun run codegen:check  # verify generated bindings, types, and README
bun run typecheck      # type-check binding code
bun test               # test the TypeScript adapter
bun run lint           # oxlint
bun run format         # oxfmt

The AI command layout is:

.ai/shared/              # shared AI repo submodule
.ai/local-skills/        # repo-local additions
.claude/commands/        # generated flat output
.agents/skills/          # generated flat output

Do not hand-edit .claude/commands/ or .agents/skills/; they are generated by bun run sync-ai.

To refresh shared AI commands after cloning:

git submodule update --init
bun run sync-ai

Adding a new identifier

  1. Implement the validator in crates/stdnum-core/src/validators/ and register it in the Rust catalog.
  2. Add Rust unit, property, and shared fixture coverage.
  3. Run bun run codegen; this generates npm entrypoints, TypeScript and Python registry types, package exports, and the README tables from Rust.
  4. Add or update strict oracle coverage when an independent implementation is available.

Do not hand-write validator logic in a binding. Node.js, WASM, and Python are thin adapters over the one Rust implementation.

Pull requests

  • One logical change per PR.
  • Include tests for all validators.
  • Run bun run rust:check && bun run codegen:check && bun run typecheck && bun test && bun run lint && bun run format before submitting.
  • Use Conventional Commits: feat:, fix:, chore:, docs:.
  • Squash merge is enforced.

Reporting issues

Open a GitHub issue. For security vulnerabilities, see SECURITY.md.