Files
OpenSpec/openspec/changes/add-diff-command/tasks.md
T
Tabish Bidiwale 183b82f266 feat: enhance diff command with word-level highlighting and better formatting
- Add word-level diff highlighting for changed lines
- Improve file headers with status indicators and statistics
- Add summary view showing total files changed and lines modified
- Enhanced visual formatting with separators and colors
- Extract magic strings as constants for maintainability
2025-08-13 15:29:43 +10:00

833 B

Implementation Tasks

1. Core Implementation

  • 1.1 Create src/core/diff.ts with diff logic
  • 1.2 Implement change directory scanning
  • 1.3 Implement file comparison using unified diff format
  • 1.4 Add color support for terminal output

2. CLI Integration

  • 2.1 Add diff command to src/cli/index.ts
  • 2.2 Implement interactive change selection when no argument provided
  • 2.3 Add error handling for missing changes

3. Enhancements

  • 3.1 Add word-level diff highlighting for better readability
  • 3.2 Improve file headers with status and statistics
  • 3.3 Add summary view with file counts and line changes

4. Testing

  • 4.1 Test diff generation for modified files
  • 4.2 Test handling of new files
  • 4.3 Test handling of deleted files
  • 4.4 Test interactive mode