go-cli-application-architecture
Installation
SKILL.md
Go CLI Application Architecture
Organize around dependency direction and testable behavior, not a copied folder template. Keep CLI framework code as an adapter around application services.
Core Workflow
- Identify commands, domain actions, external effects, and shared policies.
- Separate parsing/rendering from application orchestration and adapters.
- Define interfaces at the consumer that needs substitution.
- Construct dependencies once in a composition root and pass them explicitly.
- Keep configuration immutable after validation; give mutable state a dedicated store.
- Record ownership and cleanup for every acquired resource and background task.
- Test inward from pure logic to adapters and one assembled executable path.