Pattern Proposal: Application Service and Domain Engine Separation
Summary
Separate application-level transaction coordination from pure domain calculation engines.
Candidate Pattern
- ID:
service-engine-separation - Classification: architectural
- Maturity: strategic_direction
- Type: emerging
Observed Signals
No specific signals listed.
Evidence
Supporting Evidence
- src/cas_runner/governance/governance_action_service.py (GovernanceActionService) - Orchestrates governance use cases across engines.
- src/cas_runner/governance/governance_action_engine.py (GovernanceActionEngine) - Performs concrete action execution and state transition validation.
- src/cas_runner/governance/compliance_engine.py (ComplianceEngine) - Evaluates compliance rules independently of the action service.
Scope Assessment
- Evidence Strength: high
- Confidence: high
- Applies to: ideas-to-life-cas
Rationale
- Intent: Keep domain policy logic isolated from environment-specific I/O, error handling, and orchestration mechanisms.
- Context: Governance evaluation requires both pure rule evaluation (compliance checks) and orchestration with the local file system or external triggers.
- Force: Domain engines should not be tightly coupled to CLI or API parameter conventions.
- Force: Application services must be able to orchestrate multiple engines within a single workflow.
Traceability
Artifact source: proposed-patterns