01
AI Generation Pipeline
12 features
AI Generation Pipeline for Product Graph is the core /api/ci/battlecard POST that streams events back to the generator and saves on completion. The endpoint is wrapped with withUserRoute and withRateLimit and runs on the node runtime with a 120-second max duration. Before generating, it short-circuits to a 30-day cache. The primary LLM serves with json_object output and 90-second timeout; a fallback LLM runs with grounding tools, rotating API keys, and 60-second cooldown.
02
Bot Messaging Integration
11 features
Bot Messaging Integration for Product Graph ships a shared BotPlatform (chat platform) interaction layer in platform/apex/integrations/bots/shared/types.ts. BotInstallation carries customerId, platform, teamId, botToken (and expiry), refreshToken, botUserId, installedByUserId, featuresEnabled, defaultChannelId, alertChannelId, and isActive. Handlers include handleSearchBattlecards, handleViewBattlecard, handleEditBattlecard, handleFlagBattlecard, handleShareBattlecard, handleSubmitIntel, handleRecordWin and handleRecordLoss.
03
Feature Battleground and AI Scoring
11 features
Feature Battleground and AI Scoring for Product Graph is the most data-dense surface: FeatureBattlegroundCard mounts a 400px data grid with pinned-checkbox, Module, Capability, Feature, Description, our score, competitor score, Delta, and Winner columns. A top toggle flips scoreMode between user-rated review scores and AI-generated scores; AI mode subscribes to useGlobalScoringSafe job streams. A weights dialog tunes 10 domain weights feeding calculateWeightedScore. Score-cell clicks open FeatureScorecardDialog with side-by-side analyses.
04
APEX Frontend Tools and Bridge
9 features
APEX Frontend Tools and Bridge for Product Graph wires APEX into the live battlecards UI. BattlecardsCopilotBridge calls useSetActiveEntityContext and useSafeAgentContext, then registers 7 useSafeFrontendTool actions: battlecard_select, battlecard_set_view, battlecard_create (confirmation-gated), battlecard_duplicate, battlecard_publish and battlecard_archive (both confirmation-gated), and battlecard_refresh. A separate useBattlecardActions hook registers 5 globally-available CopilotKit actions usable from any APEX surface.
05
Schema and Data Model
9 features
Schema and Data Model for Product Graph anchors persistence. user_battlecards (rationalised from the original battlecards) is a tenant-scoped 100+-column table with FK columns under the _fk convention (us_company_fk, them_company_fk, us_product_fk, them_product_fk, us_category_fk, them_category_fk, tenant_fk, team_fk, owner_fk, created_by_fk, updated_by_fk, published_by_fk, user_connector_fk, transformation_fk) plus standard columns deleted_at, custom JSONB, tags, is_deleted.