Skip to content

Development Process

Prerequisites: Git, Node.js 22+, npm

Jaypie development follows a baseline-driven workflow: establish baseline state, make changes, validate against baseline, commit incrementally.

Before making changes, run all validation:

Terminal window
npm run lint
npm run typecheck
npm run build
npm test

Record any existing issues. You’re only responsible for issues you introduce.

Implement your changes in small, testable increments.

After each logical change:

Terminal window
npm run typecheck -w packages/changed-package
npm run build -w packages/changed-package
npm test -w packages/changed-package
npm run format -w packages/changed-package

Commit after each successful validation:

Terminal window
git add .
git commit -m "type: scope: description"

This creates restore points if later changes break things.

Continue until feature is complete.

  1. Typecheck - Catch type errors first
  2. Build - Ensure it compiles
  3. Test - Verify behavior
  4. Format - Fix lint issues

Run in this order because:

  • Type errors can cause build failures
  • Build failures can cause test failures
  • Format should be last (auto-fixes)
type: scope: description
Type Use Case
feat New feature
fix Bug fix
refactor Code change (no behavior change)
docs Documentation
test Tests only
chore Tooling, dependencies
build Build configuration
feat: express: add streaming handler
fix: lambda: handle empty event records
refactor: kit: extract force utilities
test: testkit: add error matchers
chore: deps: update vitest
  1. Red - Write failing test
  2. Green - Make test pass (minimal code)
  3. Refactor - Clean up
  • Clarifies requirements
  • Ensures testability
  • Documents behavior
  • Prevents over-engineering

Before submitting PR:

  • All tests pass
  • No type errors
  • Build succeeds
  • Lint passes
  • Tests added for new code
  • Documentation updated (if public API changed)
  1. Read error message carefully
  2. Check if test expectation is wrong
  3. Check if implementation is wrong
  4. Fix the root cause
  1. Don’t use any to silence
  2. Fix the type definition
  3. Use type guards if needed
Terminal window
npm run format # Auto-fix most issues

For remaining issues, fix manually or add exception comment with reason.

Terminal window
npm test -w packages/api -- --grep "health route"
Terminal window
npx vitest -w packages/api
Terminal window
npm test -w packages/api -- --coverage
Terminal window
# Update specific package
npm install express@latest -w packages/api
# Update all
npm update
# Check outdated
npm outdated

Don’t bump versions in feature branches. Versions are bumped when merging to main.

If you need to bump for testing:

Terminal window
npm version patch -w packages/changed-package
npm i --package-lock-only # Update lock file