|
4 | 4 | Provides pattern mining, constraint learning, and project adaptation. |
5 | 5 | """ |
6 | 6 |
|
| 7 | +# Core pattern mining (no circular dependencies) |
7 | 8 | from maze.learning.pattern_mining import ( |
8 | 9 | PatternMiningEngine, |
9 | 10 | SyntacticPattern, |
10 | 11 | TypePattern, |
11 | 12 | SemanticPattern, |
12 | 13 | PatternSet |
13 | 14 | ) |
| 15 | + |
| 16 | +# Constraint learning (no circular dependencies) |
14 | 17 | from maze.learning.constraint_learning import ( |
15 | 18 | ConstraintLearningSystem, |
16 | 19 | ConstraintRefinement, |
|
20 | 23 | RepairResult, |
21 | 24 | LearningEvent, |
22 | 25 | ) |
| 26 | + |
| 27 | +# Project adaptation (no circular dependencies) |
23 | 28 | from maze.learning.project_adaptation import ( |
24 | 29 | ProjectAdaptationManager, |
25 | 30 | ProjectProfile, |
26 | 31 | ConventionSet, |
27 | 32 | AdaptationStats, |
28 | 33 | ) |
29 | | -from maze.learning.feedback_orchestrator import ( |
30 | | - FeedbackLoopOrchestrator, |
31 | | - FeedbackResult, |
32 | | - FeedbackStats, |
33 | | -) |
| 34 | + |
| 35 | +# Hybrid weighting (no circular dependencies) |
34 | 36 | from maze.learning.hybrid_weighting import ( |
35 | 37 | HybridConstraintWeighter, |
36 | 38 | WeightedConstraintSet, |
|
39 | 41 | GenerationState, |
40 | 42 | ) |
41 | 43 |
|
| 44 | +# Feedback orchestrator uses lazy import to avoid circular dependency |
| 45 | +# (imports mnemosyne which imports pattern_mining) |
| 46 | +# Import directly: from maze.learning.feedback_orchestrator import FeedbackLoopOrchestrator |
| 47 | + |
42 | 48 | __all__ = [ |
43 | 49 | # Pattern mining |
44 | 50 | "PatternMiningEngine", |
|
59 | 65 | "ProjectProfile", |
60 | 66 | "ConventionSet", |
61 | 67 | "AdaptationStats", |
62 | | - # Feedback orchestration |
63 | | - "FeedbackLoopOrchestrator", |
64 | | - "FeedbackResult", |
65 | | - "FeedbackStats", |
66 | 68 | # Hybrid weighting |
67 | 69 | "HybridConstraintWeighter", |
68 | 70 | "WeightedConstraintSet", |
69 | 71 | "TokenWeights", |
70 | 72 | "ConstraintSet", |
71 | 73 | "GenerationState", |
| 74 | + # Feedback orchestration (use direct import to avoid circular dependency) |
| 75 | + # "FeedbackLoopOrchestrator", |
| 76 | + # "FeedbackResult", |
| 77 | + # "FeedbackStats", |
72 | 78 | ] |
0 commit comments