Skip to content

Contributing

This guide covers what you need to get started contributing to Kangentic. For detailed architecture documentation, see the Architecture page or the repo docs.

PlatformRequired
WindowsVisual Studio Build Tools (for better-sqlite3 native compilation)
macOSXcode Command Line Tools
Linuxbuild-essential, python3
Terminal window
git clone https://github.com/kangentic/kangentic.git
cd kangentic
npm install
npm start

The dev server starts three parallel processes: Vite (renderer HMR), esbuild (main/preload watch), and Electron.

src/
main/ # Electron main process (Node.js)
agent/ # Agent adapters (per-agent subfolders) with detection, command building, hooks, trust
config/ # Three-tier config: global > project > effective
db/ # SQLite database layer + migrations
engine/ # Transition engine, session recovery
git/ # Worktree creation and cleanup
ipc/ # IPC handler registration + handlers/
pty/ # Terminal session management + queue
preload/ # Context bridge (window.electronAPI)
renderer/ # React UI
components/ # Board, dialogs, layout, terminal
hooks/ # React hooks (useTerminal, etc.)
stores/ # Zustand state management
shared/ # Shared types, IPC channels, path utilities
tests/
unit/ # Vitest - pure logic, no browser
ui/ # Playwright + Chromium - mock electronAPI
e2e/ # Playwright + real Electron
ModeCommandWhat Runs
Developmentnpm start or npm run devVite dev server + esbuild watch + Electron
Productionnpm run buildtsc --noEmit > Vite build > esbuild (minified)
Packagenpm run packageBuild + create platform installer
Makenpm run makeBuild + create distributable
Publishnpm run publishBuild + upload to GitHub Releases

In development, native modules (better-sqlite3, node-pty, simple-git) are marked external in esbuild and loaded at runtime from node_modules.

Kangentic uses electron-builder for creating platform installers, configured via electron-builder.yml in the project root.

PlatformFormatNotes
WindowsNSIS installer (.exe)Signed via Azure Trusted Signing
macOSDMG (.dmg)Hardened runtime + notarization
Linux.deb, .rpmNo auto-update support

Native modules (better-sqlite3, node-pty) are rebuilt for the target Electron version during packaging. The bridge script is selectively unpacked from the ASAR archive to allow process spawning.

Production builds enable Electron security fuses:

  • RunAsNode - disabled (prevents ELECTRON_RUN_AS_NODE)
  • NodeOptions - disabled (prevents NODE_OPTIONS injection)
  • Inspection - disabled (prevents --inspect debugging)
  • Cookie encryption - enabled
  • ASAR integrity - enabled

First-time contributors must sign a Contributor License Agreement (CLA) before their pull request can be merged. When you open your first PR, the CLA Assistant bot will post a comment - you sign by adding a comment to the PR. It takes about 30 seconds and only needs to be done once.

Kangentic is dual-licensed: the public version uses AGPLv3, and commercial licenses are available for organizations that need proprietary modifications. The CLA (modeled after the Apache ICLA) grants VORPAHL LLC a non-exclusive license to distribute your contribution under any license, while you retain full copyright to your work.

  • TypeScript strict mode - noImplicitAny enabled, no any types
  • Icons - Lucide React only, no inline SVGs
  • Test selectors - data-testid attributes on interactive elements
  • IPC channels - src/shared/ipc-channels.ts is the single source of truth
  • Commit messages - Conventional Commits format, enforced by commitlint
  1. Fork the repo and create a branch from main. Use a descriptive branch name like fix/session-resume-crash, feat/multi-agent-support, or docs/update-architecture.

  2. Make your changes and add or update tests for them.

  3. Run the quick local pass before opening the PR:

    Terminal window
    npm run lint
    npm run typecheck
    npm run test:unit
    npx playwright test --project=ui
  4. Sign the CLA when the bot prompts you on your first PR (see Contributor License Agreement above).

  5. Open the PR. The template prompts you for What / Why / How / Tests and a short checklist. Link any related issues.

Small, focused PRs are easier to review and merge faster. For the full three-tier testing strategy, see Testing.

Your PR must be green on every CI check before it can merge:

CheckTool
LintESLint, runs with --max-warnings 0, so any warning fails it
Type checktsc
Unit testsVitest
BuildProduction bundle
UI testsPlaywright
E2E testsElectron

If a check fails, push a fix and CI re-runs automatically.

  • A maintainer may push follow-up commits to your branch for design polish or hardening before merging. This is normal and keeps the bar consistent, not a reflection on your work.
  • UI changes get a maintainer design review against the UI conventions. Including a screenshot or short clip in the PR makes that review much faster.
  • A maintainer merges your PR once it is approved and green. You do not need write access to the repository.

Look for issues labeled good first issue for approachable tasks. If you want to take on something larger, open an issue first to discuss the approach. Questions are welcome in GitHub Discussions.