-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Description
Currently, the entire application—CLI parsing, Bubble Tea models, file system traversal, .gitignore parsing, formatting, and config loading—is housed in a single ~1,700-line promptpacker.go file. As we add more features (like output chunking and token counting), this file will become increasingly difficult to maintain.
Why it matters
A standard Go package layout makes the codebase easier to navigate for new contributors, separates concerns, and makes unit testing significantly easier.
Proposed Solution
Refactor the project into a standard Go project layout. For example:
cmd/promptpacker/main.go(Entry point & CLI flags setup)internal/tui/(Bubble Tea models, spinners, progress bars)internal/scanner/(File walking, worker pools, content formatting)internal/ignore/(Gitignore parsing and exclusion logic)internal/config/(Config file loading, parsing, and profile merging)
Tasks
- Create
internal/andcmd/directories. - Move TUI logic to
internal/tui. - Move core scanning logic to
internal/scanner. - Move config loading to
internal/config.
Reactions are currently unavailable