Test
|
d624842842
|
refactor: make routing system extensible with provider/builder interfaces
BREAKING: LLMRouter now requires explicit LLMProvider
New Abstractions:
- LLMProvider interface: swap providers (OpenAI, Claude, local, etc)
- SpecBuilder interface: custom spec generation strategies
- ParameterBinder interface: flexible parameter resolution
- ActivityExecutor interface: pluggable activity execution
- WorkflowValidator interface: composable validation
Provider System:
- ProviderRegistry: manage multiple LLM providers
- RoutingProviderLLM: fallback across providers
- CachingLLMProvider: caching wrapper
- RetryingLLMProvider: retry wrapper
Spec Building:
- DefaultSpecBuilder: basic spec generation
- CronSpecBuilder: cron workflow specialization
- SpecBuilderFactory: builder selection
- CompositeSpecBuilder: multi-strategy fallback
- BuildMetadata: context for builders
Validators:
- StateGraphValidator: DAG structure
- ActivityAvailabilityValidator: activity existence
- TimeoutValidator: timeout format
- CompositeValidator: multiple validators
- TransitionValidator: state transitions
Refactored Components:
- LLMRouter: config-driven, provider-agnostic
- LLMClient: now implements LLMProvider
- llm_router.go: 97 fewer lines (delegated to builders)
Migration Path:
OLD: NewLLMRouter(kb)
NEW: NewLLMRouter(LLMRouterConfig{Provider: ..., KB: ...})
|
2026-09-03 09:17:38 -07:00 |
|
Test
|
8d47081d8d
|
refactor: reduce CRAP scores in router/workflow/notification
- llm_router.go: Extract getStringFromMap, firstNonEmpty, paramResolver
- buildCronSpec: 12 → 4 complexity
- buildParameters: 9 → 5 complexity
- routing_workflow.go: Extract stateMachine, stateResult types
- RoutingWorkflow: 11 → 6 complexity
- Separate executeTask/executePass/executeFail
- notification.go: Extract checker interface pattern
- DeploymentPreCheckActivity: 10 → 5 complexity
- goCheckers() returns language-specific checkers
- Added 7 new test cases for helper functions
- Coverage: internal/routing 63.6% → 66.0%
|
2026-09-03 08:50:21 -07:00 |
|
Test
|
94fc2082b9
|
feat: RoutingWorkflow + LLM Router + Memory Activity
- Add RoutingWorkflow: generic state machine executor for WorkflowSpec
- Add LLM Router: natural language → WorkflowSpec generation
- Add RetrieveMemoryActivity: query poimen-memory for context
- Add activities: AnalyzeCode, SecurityScan, GenerateReport, Notify, etc.
- Add agent-prompts/router: LLM prompt documentation
- Extend starter with --route flag for routing workflows
- Remove orchestrator job (trigger via API/message instead)
- Clean up: move docs to Desktop, add .gitignore for *.md
|
2026-09-02 19:21:53 -07:00 |
|