Interested in contributing to x? Bug fixes, new features, documentation improvements, and test coverage are all welcome. Here's everything you need to get started.

Dev setup

Terminal
# Clone the repo
$ git clone https://github.com/ClaudeX-md/claudex.git
$ cd x

# Install dependencies
$ npm install

# Run the test suite
$ npm test

# Build TypeScript
$ npm run build

# Run locally from source
$ node dist/cli.js

Project structure

Directory layout
x/
  src/
    cli.ts              # Entry point
    claude.ts           # Agent loop + write verification
    budget.ts           # Budget tracking + enforcement
    metrics.ts          # Token usage + cost calculation
    gateway.ts          # API proxy server
    sandbox.ts          # Sandboxed execution
    cron.ts             # Scheduled job runner
    commands/
      stats.ts          # x stats command
      serve.ts          # x serve command
      cron.ts           # x cron command
  test/
    bench.test.ts       # Benchmark harness tests
    budget.test.ts      # Budget module tests
    cron.test.ts        # Cron module tests
    sandbox.test.ts     # Sandbox tests
  bench/
    example-suite.json  # Reference benchmark suite
  web/
    index.html          # Landing page
    wiki/               # This wiki

Making changes

  1. Fork the repo on GitHub and clone your fork
  2. Branch from main: git checkout -b feat/my-feature
  3. Make your changes — keep PRs focused on a single concern
  4. Add tests for any behavioral changes. Tests live in test/ and use Vitest
  5. Run checks:
Terminal
$ npm test              # all tests must pass
$ npm run build          # TypeScript must compile

PR guidelines

First-time contributors: Look for issues tagged good first issue on GitHub. These are scoped, well-described, and have maintainer context in the comments. They're designed to be completable in a single session.

Code style

Review process

A maintainer will review your PR within a few days. Reviews focus on:

Feedback is collaborative, not adversarial. If a reviewer requests changes, they'll explain why. If you disagree, discuss it in the thread.