0 of 6 standards met
NOTE: Make sure that when you delete files, you are extremely aggressive in searching for orphans further down the chain inside the ffmpeg package. Problem Statement The internal CLI has all 23 commands in a flat list, making it hard to navigate and discover related functionality. Commands have verbose names like that repeat context unnecessarily. Solution Reorganize commands into logical groups with shorter names. Delete 12 unused commands and their orphaned dependencies. The new structure uses Commander.js subcommands: User Stories 1. As a CLI user, I want commands grouped by domain, so that I can discover related functionality 2. As a CLI user, I want shorter command names, so that I type less 3. As a CLI user, I want to show all Resolve commands, so that I can see available options 4. As a CLI user, I want to show all queue commands, so that I can manage the processing queue 5. As a CLI user, I want to show clip operations, so that I can work with video clips 6. As a CLI user, I want at top-level, so that I can quickly send notifications 7. As a developer, I want command files organized by group in directories, so that the codebase is easier to navigate 8. As a developer, I want unused commands deleted, so that there's less code to maintain 9. As a developer, I want orphaned modules removed, so that the codebase stays clean Implementation Decisions New Command Structure Commands to Delete (12) Directory Structure Registration Pattern Each group's creates a subcommand and registers commands to it: Cleanup Delete command files for removed commands Trace imports to find orphaned modules in Delete orphaned modules and their tests Keep any modules still used by remaining commands Testing Decisions No new tests required for this refactor (structural change only) Delete tests for removed functionality (e.g., if orphaned) Existing tests for kept commands should continue to pass Manual verification: run each reorganized command to confirm it works Out of Scope Adding new commands Changing command behavior or options Updating command implementations Adding new tests for existing commands Backwards compatibility / aliases for old command names Further Notes This is internal software, no changeset needed Existing aliases (like for append) will be removed Commander.js handles help output automatically for subcommands
Repository: mattpocock/total-typescript-monorepo. Description: The home of all Matt's internal tooling Stars: 347, Forks: 20. Primary language: TypeScript. Languages: TypeScript (94.5%), Lua (1.8%), JavaScript (1.4%), CSS (1.3%), HTML (0.7%). Latest release: @total-typescript/twoslash-to-simple-markdown@0.2.0 (1y ago). Open PRs: 2, open issues: 0. Last activity: 1mo ago. Community health: 14%. Top contributors: mattpocock, renovate[bot], cursoragent, github-actions[bot].
Last 12 weeks · 46 commits
Problem Statement Commands in use deep relative imports like to access ffmpeg services. This is ugly, fragile, and bypasses the package's proper exports. Solution Add missing exports to and update all internal-cli commands to import from . Implementation Plan Each step = one commit, leaves codebase working. Step 1: Add export to ffmpeg index Add to Run to verify Step 2: Add named export Change to also export named: Keep the namespace export for backward compat if needed, or remove if unused elsewhere Run Step 3: Update imports Replace deep imports with Run Step 4: Update imports Replace deep imports with Run Step 5: Update imports Replace deep imports with Run Step 6: Update imports Replace deep imports with Run Step 7: Update imports Replace deep imports with Run Step 8: Update imports Replace deep imports with Run Step 9: Update imports Replace deep imports with Run Step 10: Update imports Replace deep imports with Run Step 11: Update imports Replace deep imports with Run Step 12: Update imports Change namespace import to named import Update usage from to Run Decision Document Modules modified: , 10 command files in Export strategy: Single barrel export from index.ts, all services available via Namespace export: will be exported as named export; namespace export removed if unused Scope: Only package, not other packages in monorepo Testing Decisions Verification method: after each step Rationale: Pure import reorganization with no behavior changes; TypeScript will catch any broken imports No new tests needed:** This is a structural refactor, not a functionality change Out of Scope Other packages in the monorepo with similar issues Adding subpath exports to package.json Changing import grouping/style preferences Any functionality changes to the services themselves
Problem Statement The internal CLI file is ~1200 lines long, making it difficult to navigate. All 23 commands, their schemas, error classes, and utility functions are in a single file. Solution Extract each command into its own file in a folder. The becomes a thin orchestration file that imports and registers commands. Implementation Plan Phase 1: Create shared infrastructure 1. Create - extract layer (merge of and ) 2. Create - extract (shared between and ) 3. Update to import from these new files, verify build passes Phase 2: Extract commands (one commit per command) Each command file exports a function. Extract in this order: 4. - includes 5. - includes 6. - imports from shared 7. - imports from shared, includes 8. 9. 10. 11. 12. 13. 14. 15. 16. - largest command, imports from 17. 18. 19. 20. 21. 22. 23. - includes , , 24. 25. 26. Phase 3: Final cleanup 27. Review - should be ~50-80 lines: imports, program setup, command registrations, 28. Delete any dead code, unused imports Decision Document Command file interface: Each file exports that adds the command to the program Shared layer location: exports Shared schema location: exports schemas used by multiple commands Boilerplate handling: Each command includes its own - no abstraction Error classes: Stay with their command file (none are currently shared) Utility functions: Stay with their command file (, , stay in ) Naming: Kebab-case matching command names Testing Decisions Build verification: must pass after each commit Manual smoke testing: User will manually test commands after refactor complete No new automated tests: Pure structural refactor, behavior unchanged Existing tests**: remains unchanged and must pass Out of Scope Behavior changes to any command Adding new tests for commands Refactoring command internals Changes to package Changes to existing extracted files (, , ) Creating abstractions for the repeated Effect boilerplate