|
| 1 | +--- |
| 2 | +id: TASK-020 |
| 3 | +type: cleanup |
| 4 | +priority: high |
| 5 | +status: todo |
| 6 | +--- |
| 7 | + |
| 8 | +# Continue Repository Cleanup for Elegant, Minimal Structure |
| 9 | + |
| 10 | +## Description |
| 11 | +While TASK-019 made significant progress in organizing the repository, there's still work needed to make the codebase truly elegant and minimal. The repository contains too many files in the root directory and needs further consolidation to create a clean, professional structure that reflects the tool's purpose as a lightweight, elegant utility. |
| 12 | + |
| 13 | +## Acceptance Criteria |
| 14 | +- [ ] Further reduce root directory files to absolute minimum (README.md, LICENSE, pyproject.toml, and essential Docker files) |
| 15 | +- [ ] Move all Docker-related files to a `.docker` directory, with only main Dockerfile in root |
| 16 | +- [ ] Consolidate installation scripts into a single `install` directory |
| 17 | +- [ ] Move all configuration files to the `config` directory |
| 18 | +- [ ] Restructure `.github` directory with proper CI workflows and templates |
| 19 | +- [ ] Add proper LICENSE file if missing |
| 20 | +- [ ] Clean up any leftover temporary/cache files (like `.coverage` files) |
| 21 | +- [ ] Update all documentation to reflect the new structure |
| 22 | +- [ ] Update imports and file references in code to match new structure |
| 23 | +- [ ] Ensure Docker builds still work after restructuring |
| 24 | + |
| 25 | +## Files to Move to Appropriate Locations |
| 26 | +- `.pre-commit-config.yaml` → `config/` |
| 27 | +- `Dockerfile.test` → `.docker/` |
| 28 | +- `Makefile` → Move commands to documented scripts in `scripts/` |
| 29 | +- `CLAUDE.md` → `ai-assist/` or `docs/` |
| 30 | +- `docker-compose.ci.yml` → `.docker/` |
| 31 | +- `install.sh` & `setup.sh` → `install/` |
| 32 | +- `run.sh` → `scripts/` |
| 33 | +- `.coverage` files → Remove, add to .gitignore |
| 34 | +- `.dockerignore` → Keep in root or move to `.docker/` with symlink |
| 35 | + |
| 36 | +## Implementation Details |
| 37 | + |
| 38 | +### Root Directory Cleanup |
| 39 | +- Root directory should contain only: |
| 40 | + - `README.md` - Main documentation entry point |
| 41 | + - `LICENSE` - Open source license |
| 42 | + - `pyproject.toml` - Python package configuration |
| 43 | + - `Dockerfile` - Main build file |
| 44 | + - `.gitignore` - Git ignore patterns |
| 45 | + - `docker-compose.yml` - Main compose file |
| 46 | + - Any other absolutely essential files that must be in root |
| 47 | + |
| 48 | +### Directory Structure Improvements |
| 49 | +1. **Create Proper Installation Directory** |
| 50 | + - Move all installation scripts to `install/` |
| 51 | + - Update documentation to reference new script locations |
| 52 | + - Ensure backward compatibility with any existing installation instructions |
| 53 | + |
| 54 | +2. **Enhance Docker Organization** |
| 55 | + - Create `.docker/` for Docker-related files |
| 56 | + - Move all test and CI Docker configurations there |
| 57 | + - Update CI pipelines to reference new locations |
| 58 | + |
| 59 | +3. **Configuration Consolidation** |
| 60 | + - Move all configuration files to `config/` |
| 61 | + - Use symlinks if necessary for tools that require config in root |
| 62 | + |
| 63 | +### Code Updates |
| 64 | +- Update any hardcoded paths in the codebase |
| 65 | +- Ensure all imports and file references reflect new structure |
| 66 | +- Update scripts to handle the new directory layout |
| 67 | + |
| 68 | +## Testing Approach |
| 69 | +- Verify Docker builds work correctly after restructuring |
| 70 | +- Test installation process with new script locations |
| 71 | +- Run all existing tests to ensure functionality is preserved |
| 72 | +- Test on a fresh system to verify installation still works |
| 73 | + |
| 74 | +## Related Tasks |
| 75 | +- TASK-019: Repository Structure Cleanup and Organization (predecessor) |
| 76 | +- TASK-018: Prepare v0.1.0 Beta Release (dependent on clean structure) |
| 77 | + |
| 78 | +## Notes |
| 79 | +This task is focused on creating a minimal, elegant codebase structure that follows industry best practices while reducing clutter. The goal is to make the repository as clean and professional as possible before the beta release, reflecting the tool's purpose as a lightweight utility. |
0 commit comments