Skip to main content

Development Guide

This guide helps you set up a development environment and contribute to the project.

Test-Driven Development (TDD)​

The LLM Platform enforces strict TDD methodology across all projects:

Prerequisites​

  • Node.js 20.0.0+
  • npm 9.0.0+
  • Git
  • VS Code (recommended)
  • TDDAI CLI tools

Setup​

  1. Clone the repository:

    git clone <repository-url>
    cd <project-name>
  2. Install dependencies:

    npm install
  3. Start development environment:

    npm run dev

Development Workflow​

TDD Workflow (Required)​

  1. RED Phase: Write failing test first

    # Create test file
    touch src/feature.test.ts
    # Write test that fails
    npx tddai test src/feature.test.ts
  2. GREEN Phase: Write minimal code to pass

    # Create implementation
    touch src/feature.ts
    # Make test pass
    npx tddai test src/feature.test.ts
  3. REFACTOR Phase: Improve code quality

    # Refactor with confidence
    npx tddai test --watch

Standard Git Workflow​

  1. Create a feature branch
  2. Follow TDD cycle for all changes
  3. Ensure 95%+ coverage: npx tddai coverage
  4. Run full test suite: npm test
  5. Submit a pull request

Code Quality​

  • Follow coding standards
  • Write comprehensive tests
  • Update documentation
  • Use meaningful commit messages

Testing​

Run the test suite to ensure your changes don't break existing functionality:

npm test