feat(pipeline): Add Stage 5 Synthesis for AI-generated narratives
- Add Stage5Synthesizer class that generates AI narratives and action plans - Add generate() method to LLMClient for synthesis generation - Integrate Stage 5 into pipeline runner after route stage - Add synthesis JSONB column to pipeline.executions table - Update reviewiq_analytics API to return synthesis data - Synthesis includes: executive narrative, sentiment/category/timeline insights, action plan, marketing angles, and priority recommendations Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
12
migrations/versions/013_add_synthesis_to_executions.sql
Normal file
12
migrations/versions/013_add_synthesis_to_executions.sql
Normal file
@@ -0,0 +1,12 @@
|
||||
-- Migration: Add synthesis column to pipeline.executions
|
||||
-- This stores the AI-generated synthesis from Stage 4
|
||||
|
||||
ALTER TABLE pipeline.executions
|
||||
ADD COLUMN IF NOT EXISTS synthesis JSONB DEFAULT NULL;
|
||||
|
||||
-- Add index for querying executions with synthesis
|
||||
CREATE INDEX IF NOT EXISTS idx_executions_has_synthesis
|
||||
ON pipeline.executions ((synthesis IS NOT NULL));
|
||||
|
||||
-- Comment
|
||||
COMMENT ON COLUMN pipeline.executions.synthesis IS 'AI-generated synthesis containing narratives, action plan, and insights from Stage 4';
|
||||
Reference in New Issue
Block a user