feat(ultraplan-local): v1.6.0 — /ultraresearch-local deep research command

Add /ultraresearch-local for structured research combining local codebase
analysis with external knowledge via parallel agent swarms. Produces research
briefs with triangulation, confidence ratings, and source quality assessment.

New command: /ultraresearch-local with modes --quick, --local, --external, --fg.
New agents: research-orchestrator (opus), docs-researcher, community-researcher,
security-researcher, contrarian-researcher, gemini-bridge (all sonnet).
New template: research-brief-template.md.

Integration: --research flag in /ultraplan-local accepts pre-built research
briefs (up to 3), enriches the interview and exploration phases. Planning
orchestrator cross-references brief findings during synthesis.

Design principle: Context Engineering — right information to right agent at
right time. Research briefs are structured artifacts in the pipeline:
ultraresearch → brief → ultraplan --research → plan → ultraexecute.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Kjell Tore Guttormsen 2026-04-08 08:58:35 +02:00
commit 4dc868ea62
151 changed files with 34374 additions and 0 deletions

View file

@ -0,0 +1,123 @@
export interface PostAnalytics {
id: string; // Hash of title + date
title: string; // First ~100 chars of post content
publishedDate: string; // YYYY-MM-DD
metrics: PostMetrics;
importedAt: string; // ISO datetime
exportSource: string; // Original CSV filename
}
export interface PostMetrics {
impressions: number;
reactions: number;
comments: number;
shares: number;
clicks: number;
engagementRate: number; // (reactions+comments+shares+clicks)/impressions * 100
}
export interface AnalyticsBatch {
batchId: string; // UUID-like identifier
importedAt: string; // ISO datetime
exportFilename: string;
dateRange: { from: string; to: string };
postCount: number;
posts: PostAnalytics[];
}
export interface WeeklyReport {
week: string; // ISO week e.g. "2026-W05"
generatedAt: string;
summary: {
totalPosts: number;
totalImpressions: number;
totalReactions: number;
totalComments: number;
totalShares: number;
totalClicks: number;
avgEngagementRate: number;
avgImpressionsPerPost: number;
};
topPerformers: PostAnalytics[];
underperformers: PostAnalytics[];
trends: {
impressionsTrend: TrendDirection;
engagementTrend: TrendDirection;
comparedTo: string;
percentChange: {
impressions: number;
engagement: number;
};
};
alerts: Alert[];
}
export type TrendDirection = "up" | "down" | "stable";
export interface Alert {
type: "spike" | "drop" | "milestone";
severity: "info" | "warning" | "critical";
metric: string;
message: string;
postId?: string;
value: number;
baseline: number;
deviations: number;
}
export interface DayOfWeekMetrics {
dayName: string; // "Monday" through "Sunday"
dayIndex: number; // 1=Monday, 7=Sunday (ISO weekday)
postCount: number;
avgImpressions: number;
avgEngagementRate: number;
bestPost?: PostAnalytics;
}
export interface HeatmapReport {
generatedAt: string;
postsAnalyzed: number;
dateRange: { from: string; to: string };
byDayOfWeek: DayOfWeekMetrics[]; // 7 entries, Mon-Sun ordered
bestDayImpressions: string;
bestDayEngagement: string;
}
export interface MonthlyReport {
month: string; // "YYYY-MM"
generatedAt: string;
summary: {
totalPosts: number;
totalImpressions: number;
totalReactions: number;
totalComments: number;
totalShares: number;
totalClicks: number;
avgEngagementRate: number;
avgImpressionsPerPost: number;
};
topPerformers: PostAnalytics[];
byWeek: {
week: string;
postCount: number;
avgImpressions: number;
avgEngagementRate: number;
}[];
trends: {
comparedTo: string | null;
percentChange: {
impressions: number | null;
engagement: number | null;
postCount: number | null;
};
};
alerts: Alert[];
}
export const ALERT_THRESHOLDS = {
spike: 2.0,
drop: -1.5,
weeklyDropWarning: -30,
weeklyDropCritical: -50,
weeklySpikeInfo: 100,
} as const;