Files
2025-08-07 01:04:53 +10:00

38 lines
1.9 KiB
Markdown

# Implementation Tasks for Init Command
## 1. Core Infrastructure
- [x] 1.1 Create src/utils/file-system.ts with directory/file creation utilities
- [x] 1.2 Create src/core/templates/index.ts for template management
- [x] 1.3 Create src/core/init.ts with main initialization logic
- [x] 1.4 Create src/core/config.ts for configuration management
## 2. Template Files
- [x] 2.1 Create src/core/templates/readme-template.ts with OpenSpec README content
- [x] 2.2 Create src/core/templates/project-template.ts with customizable project.md
- [x] 2.3 Create src/core/templates/claude-template.ts for CLAUDE.md content with markers
## 3. AI Tool Configurators
- [x] 3.1 Create src/core/configurators/base.ts with ToolConfigurator interface
- [x] 3.2 Create src/core/configurators/claude.ts for Claude Code configuration
- [x] 3.3 Create src/core/configurators/registry.ts for tool registration
- [x] 3.4 Implement marker-based file updates for existing configurations
## 4. Init Command Implementation
- [x] 4.1 Add init command to src/cli/index.ts using Commander
- [x] 4.2 Implement AI tool selection with multi-select prompt (Claude Code available, others "coming soon") - requires at least one selection
- [x] 4.3 Add validation for existing OpenSpec directories with helpful error message
- [x] 4.4 Implement directory structure creation
- [x] 4.5 Implement file generation with templates and markers
## 5. User Experience
- [x] 5.1 Add colorful console output for better UX
- [x] 5.2 Implement progress indicators (Step 1/3, 2/3, 3/3)
- [x] 5.3 Add success message with actionable next steps (edit project.md, create first change)
- [x] 5.4 Add error handling with helpful messages
## 6. Testing and Documentation
- [x] 6.1 Add unit tests for file system utilities
- [x] 6.2 Add unit tests for marker-based file updates
- [x] 6.3 Add integration tests for init command
- [x] 6.4 Update package.json with proper bin configuration
- [x] 6.5 Test the built CLI command end-to-end