Skip to content

feat: add modular formatter architecture for CLI commands#2

Merged
bwl merged 1 commit intomasterfrom
claude/improve-command-returns-011CULohqrcUbCRHL7FMmsVT
Oct 21, 2025
Merged

feat: add modular formatter architecture for CLI commands#2
bwl merged 1 commit intomasterfrom
claude/improve-command-returns-011CULohqrcUbCRHL7FMmsVT

Conversation

@bwl
Copy link
Copy Markdown
Owner

@bwl bwl commented Oct 21, 2025

Extract beautiful color gradients and formatting logic from forest edges propose into reusable components. Establishes 3-layer architecture for consistent, maintainable command output.

Phase 1 Complete: Color utilities ready to use

  • src/cli/formatters/colors.ts - HSL gradients, themes, utilities
  • src/cli/formatters/edges.ts - Edge-specific table formatters
  • src/cli/formatters/index.ts - Clean public API

Key Benefits:

  • Reusability: Use colorize.* in any command
  • Consistency: All commands use FOREST_THEMES palette
  • Maintainability: Update colors in one place
  • Testability: Pure functions (data → string)

Documentation:

  • MODULAR_COMMANDS_GUIDE.md - Quick start and phased migration
  • FORMATTING_ARCHITECTURE.md - Full architectural spec
  • src/cli/formatters/README.md - Module usage guide
  • PR_SUMMARY.md - Complete PR overview

Dependencies:

  • Add chalk@^4.1.2 (already used, now explicit)
  • Add @clack/prompts@^0.7.0 (already used, now explicit)

Non-breaking: Pure additive changes, existing commands unchanged.
Ready to use: Commands can import colorize.* immediately.

Next phases: Extract core functions, migrate commands systematically.

🤖 Generated with Claude Code

Extract beautiful color gradients and formatting logic from `forest edges propose`
into reusable components. Establishes 3-layer architecture for consistent,
maintainable command output.

Phase 1 Complete: Color utilities ready to use
- src/cli/formatters/colors.ts - HSL gradients, themes, utilities
- src/cli/formatters/edges.ts - Edge-specific table formatters
- src/cli/formatters/index.ts - Clean public API

Key Benefits:
- Reusability: Use colorize.* in any command
- Consistency: All commands use FOREST_THEMES palette
- Maintainability: Update colors in one place
- Testability: Pure functions (data → string)

Documentation:
- MODULAR_COMMANDS_GUIDE.md - Quick start and phased migration
- FORMATTING_ARCHITECTURE.md - Full architectural spec
- src/cli/formatters/README.md - Module usage guide
- PR_SUMMARY.md - Complete PR overview

Dependencies:
- Add chalk@^4.1.2 (already used, now explicit)
- Add @clack/prompts@^0.7.0 (already used, now explicit)

Non-breaking: Pure additive changes, existing commands unchanged.
Ready to use: Commands can import colorize.* immediately.

Next phases: Extract core functions, migrate commands systematically.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@bwl bwl merged commit ac427de into master Oct 21, 2025
@bwl bwl deleted the claude/improve-command-returns-011CULohqrcUbCRHL7FMmsVT branch February 13, 2026 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants