Skip to content

Migrate g:command:create to TypeScript #6

@ballidev

Description

@ballidev

Command Migration: g:command:create

Current Implementation

  • Main orchestrator: scripts/g/command/create/create_orchestrate.bash
  • Sub-scripts:
    • namespace_validate.bash - Validates command namespace format
    • file_create.bash - Creates command file with boilerplate
    • command_register.bash - Updates command registry
    • git_operations.bash - Adds and commits new command
    • summary.bash - Displays creation summary

Requirements

  • Feature parity with Bash version
  • Unit tests with >90% coverage
  • Integration tests
  • Performance benchmarks
  • Documentation

Technical Design

  • Use composition pattern with injected services
  • NamespaceValidator service for validation
  • FileService for file operations
  • GitService for git operations
  • TemplateEngine for boilerplate generation

Test Cases

  • Valid namespace creation
  • Invalid namespace rejection
  • Namespace correction suggestions
  • File already exists handling
  • Git operation failures
  • Template generation variations

Plan Document

Create: cc-commands-ts/plans/g-command-create.plan.md

Dependencies

Acceptance Criteria

  • Creates command file in correct location
  • Validates namespace format
  • Generates appropriate boilerplate
  • Commits to git (when not skipped)
  • Output format matches Bash version
  • All error cases handled gracefully

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions