SPB Git

Repository Public

CONTRIBUTING-AGENTS.md 1.7 KB

# Working rules for parallel contributors

  • One module = one owner. Edit only the directories you were given (Sources/<Module>, Tests/<Module>Tests). Never edit Package.swift or another module: report the need instead.
  • Zero external dependency in Sources/. System frameworks only where stated (Security for randomness). CryptoKit and other reference implementations are allowed in Tests/ only, as independent oracles.
  • Public API style: Bytes ([UInt8]) in and out, parameter sets as enums, typed Error enums, no fatalError on attacker-controlled input (malformed keys, ciphertexts, signatures must return an error or false).
  • Randomness: every algorithm exposes its deterministic "internal" function (explicit seeds, as in the FIPS documents) and a wrapper that draws from SystemRandom.bytes (QyvoraMath). No other entropy source.
  • Secrets: no secret-dependent branch or table index where the specification requires constant time; wipe temporary secrets with SecureMemory.zero; never print or log key material.
  • Tests use Swift Testing (import Testing). Heavy suites must pass with swift test -c release --filter <Module>Tests --scratch-path /tmp/qy-<name>.
  • Test vectors: commit gzip files (Tests/<Module>Tests/Vectors/*.json.gz) with a README.txt giving source, revision and licence; raw *.json in Vectors/ is git-ignored.
  • Commits: sp-git commit -m "type(scope): …" <files> (Conventional Commits, English), one per coherent step that builds and passes. Do not push from a worktree branch; the integrator merges and pushes.
  • Never use pkill -f. Never claim a test passed without having run it; report exact counts and any failure.
Files main
Menu

Theme