Skip to content

refactor: use service factory consistently across commands#27

Merged
elitan merged 1 commit intomainfrom
refactor/use-service-factory-consistently
Dec 26, 2025
Merged

refactor: use service factory consistently across commands#27
elitan merged 1 commit intomainfrom
refactor/use-service-factory-consistently

Conversation

@elitan
Copy link
Owner

@elitan elitan commented Dec 26, 2025

Summary

  • Replace direct manager instantiation with initializeServices() from src/utils/service-factory.ts across 16 command files
  • Standardizes how services are initialized and reduces code duplication (~90 lines removed)
  • All tests pass

Excluded files (with rationale):

  • project/create.ts: requires special bootstrapping with autoInitialize()
  • doctor.ts: self-contained checks that handle uninitialized state
  • state/restore.ts: must work when state file is corrupt

Closes #14

Test plan

  • Build succeeds (bun run build)
  • All tests pass (bun run test)

🤖 Generated with Claude Code

Replace direct manager instantiation with initializeServices() from
src/utils/service-factory.ts across 16 command files. This standardizes
how services are initialized and reduces code duplication.

Excluded files (with rationale):
- project/create.ts: requires special bootstrapping with autoInitialize()
- doctor.ts: self-contained checks that handle uninitialized state
- state/restore.ts: must work when state file is corrupt

Closes #14

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@elitan elitan merged commit 3572a65 into main Dec 26, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor: use service factory consistently

1 participant