Contributing & TDD Workflow โ
Thank you for contributing! This guide outlines the local development setup, coding conventions, testing workflow, and commit rules.
๐ ๏ธ Prerequisites & Setup โ
Verify that you have the required toolchain installed:
bun --version # โฅ 1.3.11
node --version # โฅ 22.14.0
moon --version # โฅ 2.1.3
deno --version # โฅ 2.3.3
docker --version # 20+
kubectl version --client
k3d --versionClone the repository and run setup:
git clone git@github.com:nogoo9/no-crd.git
cd no-crd
# Install pinned toolchain versions via Proto
proto use
# Install dependencies (automatically sets up Husky hooks)
bun install
# Verify the setup
bun run typecheck
bun run test๐ Test-Driven Development (TDD) โ
All logic modifications must be accompanied by tests. We co-locate test files directly alongside their implementation modules (e.g. src/mcp/spawner.test.ts resides next to src/mcp/spawner.ts).
Running Tests โ
# Run all unit tests
bun run test
# Run a specific test suite
bun test src/mcp/spawner.test.ts
# Run tests via Moon (toolchain checks)
moon run mcp:test๐งผ Code Style & Formatting โ
We use Biome for code linting and formatting. Do not use Prettier or ESLint.
# Biome formatting and auto-fix
bun run format
# Strict TypeScript typechecking
bun run typecheckBoth commands must pass with zero errors. These are enforced on git commit via Husky hooks.
๐ Commit Conventions โ
We follow Conventional Commits:
feat(mcp): add pod template list tool
fix(router): handle missing namespace gracefully
docs: update README quick start sectionCommit messages are validated on commit. If you are using an AI agent to commit changes, recommend using the /commit slash command which automates checks and formats the message.
๐ก๏ธ Pre-Push Checks โ
Before pushing code to main, all local gates must pass. These are run automatically on git push via a Husky hook:
bun run format(Biome checks)bun run typecheck(TypeScript build)moon run mcp:test(All unit tests)/security(Semgrep SAST scans)
