cleaned up architecture and improved tests#57
Merged
Conversation
Restructured src/ directory to improve organization and reduce complexity: - Created new directory structure: - `src/engine/` - Core workflow engine (from core/) - `src/services/` - Business logic services (from shared/ + lib/) - `src/utils/` - Pure utilities (from shared/utils) - Moved files with git mv to preserve history: - All core/ files → engine/ - Document processing, converters, processors → services/ - Utility functions → utils/ - Updated all import paths across codebase and tests - All tests passing, preflight successful This provides clearer separation of concerns and eliminates the confusing three-folder structure. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Restructured the monolithic WorkflowEngine into domain-specific services: **New Service Layer:** - `WorkflowOrchestrator` - Main orchestrator coordinating domain services - `WorkflowService` - Workflow definition loading and validation - `CollectionService` - Collection CRUD operations and status management - `TemplateService` - Template processing and variable substitution - `ActionService` - Action execution (format, add operations) **Benefits:** - Single Responsibility Principle - each service has a focused domain - Reduced complexity - WorkflowEngine was 1000+ lines, now broken into focused modules - Better testability - services can be tested in isolation - Improved maintainability - clear separation of concerns - Dependency injection - services can be easily mocked or replaced **CLI Integration:** - Updated all CLI commands to use WorkflowOrchestrator instead of WorkflowEngine - Maintained backward compatibility of all public interfaces - All core functionality verified working (list, format, status, add, commit) **Testing:** - Updated representative test file (list.test.ts) to demonstrate new pattern - CLI functionality verified working end-to-end - Build passing successfully This completes the architecture simplification started in Phase 1, providing a clean foundation for future development. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
**Test Fixes:** - Fixed remaining MockedWorkflowEngine references → MockedWorkflowOrchestrator - Fixed WorkflowEngine type declarations → WorkflowOrchestrator - All 432 tests now passing ✅ **Future Planning:** - Added comprehensive FUTURE_ARCHITECTURE_PHASES.md roadmap - Documented 5 future phases with detailed implementation plans - Prioritized plugin system (Phase 4) as next major milestone - Identified quick wins and technical debt areas **Current State:** ✅ Clean service layer architecture fully implemented ✅ All tests passing (432/432) ✅ CLI functionality working perfectly ✅ TypeScript strict compliance ✅ Backward compatibility maintained Phase 2 architecture refactoring is now complete with a solid foundation for future development phases. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
…to shared code fixed lint, tests disabled 6 tests pending refactor of Web code
removed old "collections" from example/.markdown-workflow\
more rigorous prettier and eslint configs
The example directory was completely excluded from git, which caused the blog collections test to fail in GitHub Actions since the test data wasn't available. This commit: - Updates .gitignore to include essential example directories - Adds blog, job, and presentation collections for E2E testing - Ensures GitHub Actions has access to test data Fixes: Example: List blog collections works test failure 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Simplified and made architecture a little more consistent.
Changes
Test Plan
npm test)npm run test:e2e:snapshots)pnpm preflight)