Skip to content

Initialize TypeScript Project and CLI Structure #1

@acreeger

Description

@acreeger

Set up the basic TypeScript project infrastructure for the Hatchbox AI CLI tool.

Tasks:

  • Create package.json with correct metadata and dependencies
  • Configure TypeScript with tsconfig.json
  • Set up build system using tsup for CLI and library builds
  • Configure ESLint and Prettier for code quality
  • Set up Vitest with comprehensive test configuration
  • Configure test coverage reporting (95% minimum threshold)
  • Create mock factory infrastructure for all external dependencies
  • Set up property-based testing with fast-check
  • Create basic project structure with dedicated test directories
  • Configure npm scripts for development workflow including test commands
  • Set up GitHub Actions for CI/CD with comprehensive testing pipeline
  • Configure pre-commit hooks for automated test runs

Dependencies:

  • commander - CLI framework
  • execa - Shell command execution
  • fs-extra - File system operations
  • chalk - Terminal colors
  • ora - Loading spinners
  • inquirer - Interactive prompts
  • vitest - Testing framework
  • @vitest/coverage-v8 - Coverage reporting
  • fast-check - Property-based testing

Testing Requirements:

  • Comprehensive Vitest configuration with 95% coverage threshold
  • Mock factories for Git, GitHub CLI, Neon CLI, Claude CLI, file system
  • Property-based testing setup for edge case discovery
  • Pre-commit hooks preventing commits without passing tests
  • CI/CD pipeline with automated test gates and performance benchmarks

Acceptance Criteria:

  • Package builds successfully with npm run build
  • CLI executable works with basic --help command
  • TypeScript compilation passes without errors
  • Linting and formatting work correctly
  • Test framework functional with sample tests achieving 95%+ coverage
  • Mock factories working for all external dependencies
  • CI/CD pipeline running comprehensive test suite automatically
  • Pre-commit hooks preventing untested code commits

Definition of Done:

  • All tasks completed following TDD approach
  • Code follows established patterns with >95% test coverage
  • All tests pass including unit, integration, and property-based tests
  • Mock factories validated for all external dependencies
  • Performance benchmarks established
  • Documentation updated including testing guidelines

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestphase-1Phase 1: Core FoundationsetupProject setup and configuration

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions