45 lines
1.8 KiB
Markdown
45 lines
1.8 KiB
Markdown
---
|
|
id: TASK-11
|
|
title: Create the OpenRouter AI audit pipeline
|
|
status: To Do
|
|
assignee: []
|
|
created_date: '2026-06-03 19:13'
|
|
labels:
|
|
- mvp
|
|
- agent
|
|
- llm
|
|
dependencies:
|
|
- TASK-8
|
|
- TASK-9
|
|
- TASK-10
|
|
references:
|
|
- PRD.md
|
|
priority: high
|
|
ordinal: 11000
|
|
---
|
|
|
|
## Description
|
|
|
|
<!-- SECTION:DESCRIPTION:BEGIN -->
|
|
Implement the LLM-powered audit generation pipeline using Vercel AI SDK and OpenRouter. The pipeline combines Google/Places data, Playwright crawl data, screenshots, PageSpeed signals, and local skills to generate structured internal findings plus final German audit, email, subject, call script, and follow-up drafts.
|
|
<!-- SECTION:DESCRIPTION:END -->
|
|
|
|
## Acceptance Criteria
|
|
<!-- AC:BEGIN -->
|
|
- [ ] #1 Vercel AI SDK is configured with OpenRouter and environment/Convex secrets
|
|
- [ ] #2 Model profiles exist for classification, multimodal audit analysis, German text generation, and final quality review
|
|
- [ ] #3 Structured audit outputs use Zod schemas and are stored in Convex with raw prompts/responses and model metadata
|
|
- [ ] #4 Screenshots can be passed to multimodal-capable models where supported
|
|
- [ ] #5 Generated customer-facing text follows Ich-Form, German language, no scores, no prices, no generic KI-Slop, and factual observation plus suggestion style
|
|
<!-- AC:END -->
|
|
|
|
## Implementation Plan
|
|
|
|
<!-- SECTION:PLAN:BEGIN -->
|
|
1. Add OpenRouter provider setup through Vercel AI SDK.
|
|
2. Define Zod schemas for internal findings, audit summary, email draft, subject, call script, follow-up, and quality review.
|
|
3. Build model-profile configuration for fast classification, multimodal analysis, and German copy generation.
|
|
4. Combine lead, crawl, screenshot, PageSpeed, and selected skills into prompt inputs.
|
|
5. Persist all prompts, model responses, normalized findings, final texts, and generation errors in Convex.
|
|
<!-- SECTION:PLAN:END -->
|