Federated from workspace ·
PRD-000·zaixos-company-platform/app/Modules/AI/README.mdDo not edit canonical truth here — update the source repo, then re-runnpm run docs:sync.
AI
PL-003 compatibility adapters for PRD-000.
Status: WP-PRD000-04 — AI Conversation Gateway @ v0.4.0-ai
Responsibilities
| Component | Role |
|---|---|
AiGatewayContract | Sole product gateway for PL-003 access |
AiProviderGatewayAdapter | Delegates completions to PL-003 ProviderGateway |
DiscoveryConversationOrchestrator | Wraps frozen DiscoveryFlowService via container extend |
DiscoveryStructuredResponseParser | Parses structured JSON discovery responses |
Configuration
Consumer overrides live in config/ai.php:
| Key | Purpose |
|---|---|
AI_DISCOVERY_ENABLED | Enable AI-enhanced discovery prompts |
AI_DISCOVERY_PROVIDER | Provider key (defaults to AI_DEFAULT_PROVIDER) |
AI_DISCOVERY_MODEL | Model key for discovery completions |
When discovery AI is disabled or the provider is unavailable, the orchestrator falls back to the rule-based discovery engine automatically.
Boundaries
- No direct OpenAI, Anthropic, Gemini, or Groq SDK imports in PRD-000
- Discovery module is frozen — integration uses Laravel container
extend()only - All LLM traffic routes through
AiGatewayContract→AiProviderGatewayAdapter→ PL-003
Tests
bash
php artisan test --filter=Ai
php artisan test --testsuite=Architecture --filter=Ai