Contributing to OpenSpec

Development Setup

  1. Clone the repository.
  2. Install dependencies using pnpm:

    pnpm install

  3. Build the project:

    pnpm run build

Running Tests

OpenSpec uses vitest for testing.

# Run all tests
pnpm test

# Run tests in watch mode
pnpm test:watch

# Run tests with UI
pnpm test:ui

Local Development

To test the CLI locally without installing it globally:

# Build and run
pnpm run dev:cli -- [command] [options]

# Example
pnpm run dev:cli -- init

Release Process

OpenSpec uses Changesets for versioning.

  1. Make your changes.
  2. Run pnpm changeset to generate a changeset file.
  3. Push changes. The CI workflow will create a Version Package PR.
  4. Merging the Version PR triggers the release to npm.