This file captures preferences and guidelines for AI agents working on the d3ploy project, specifically for converting it to a Briefcase console application.
- Current State: Python CLI tool that syncs files to AWS S3 with multiple environment support
- Goal: Convert to standalone Briefcase console app for distribution without dependency management
- Repository: https://github.com/dryan/d3ploy
Please answer the following questions to help guide the development process:
- ✅ Platforms: All three (macOS, Windows, Linux)
- ✅ Distribution: GitHub releases + PyPI distribution
- ❓ Architecture requirements: Intel, ARM, universal binaries?
- ✅ Breaking changes allowed: Yes, if they make sense
- ✅ New features: Will be added in future releases after this conversion
- ✅ Interface improvements: Open to modernizing the CLI experience
- ✅ Config files: Support both
d3ploy.jsonand.d3ploy.jsonin project directory - ✅ App data: Move cache, logs, temp files to standard app data locations
- ✅ Configuration priority: CLI flags > environment variables > config file > defaults
- ✅ Minimize dependencies: Replace colorama with first-party code
- ✅ Use Textual: Use https://textual.textualize.io/ instead of colorama + tqdm
- ✅ boto3: Keep for now, replace with custom AWS library in future
- ✅ Final bundle preference: Textual for modern TUI experience
- ✅ Unified approach: Pip package distributes Briefcase binary (like ruff/uv)
- ✅ Single codebase: One version, different packaging approach
- ✅ Distribution: PyPI wheels with binaries + GitHub releases
- ✅ Update source: Continue using PyPI as version source of truth
- ✅ Update notifications: Follow Textual interface patterns
- ✅ Breaking changes: Release patch version warning about upcoming changes
- ✅ Config migration: Auto-detect and migrate old config versions
- ✅ Config versioning: Add version property to new config structure
- ✅ Refactoring allowed: Yes, prioritize maintainability and testability
- ✅ Modular structure: Break apart large d3ploy.py into focused modules
- ✅ Separation of concerns: UI, AWS ops, config, file operations in separate modules
- ✅ Briefcase compatibility: Structure code to work well with Briefcase and Textual
Based on the responses above, here are the guidelines for this conversion:
- Modular design: Refactor the monolithic
d3ploy.pyinto focused modules:config/- Configuration loading, validation, and migrationaws/- S3 and CloudFront operations (keeping boto3 for now)ui/- Textual-based interface componentssync/- File synchronization logiccore/- Main application logic and coordination
- Testability: Design for easy unit testing of individual components
- Briefcase structure: Follow Briefcase app conventions for entry points and packaging
- Textual integration: Replace colorama + tqdm with Textual for modern TUI experience
- Breaking changes: Document and implement sensible improvements to CLI
- Error handling: Improve error messages and user feedback with Textual's capabilities
- Progress indication: Use Textual's rich progress components
- Config files: Support both
d3ploy.jsonand.d3ploy.jsonin project directory - Config versioning: Add
versionproperty to config structure for migration - Auto-migration: Detect and automatically upgrade old config formats
- Priority order: CLI flags > environment variables > config file > defaults
- App data: Move cache, logs, temp files to platform-standard app data directories
- Textual: Primary UI framework replacing colorama and tqdm
- boto3: Keep for now, plan future replacement with custom AWS library
- Minimize deps: Replace other dependencies where practical
- Bundle size: Optimize for reasonable size while maintaining functionality
- Unified approach: Single codebase, PyPI distributes Briefcase binaries
- Platform support: macOS, Windows, Linux binaries
- GitHub releases: Direct binary downloads as alternative to PyPI
- Update checking: Continue using PyPI as source of truth
- Breaking change warning: Release patch version before major changes
- Semantic versioning: Continue current approach
- Git workflow: Create PR → merge to main → push git tag → GitHub Actions triggers release
- PyPI automation: GitHub Actions handles PyPI publishing on tag push
- Gitmoji: Always use gitmoji for commit messages
- Warning release: Issue patch with breaking change notification
- Config migration: Ensure smooth transition for existing users
- Testing: Platform-specific testing for binary distributions
- CI/CD: Build binaries for all platforms in automated pipeline