AD Competitive Intelligence blueprint
internal prototype · canonical JSON + Dreamborn Forge HTML
internal generated
blueprint · supabase_json

AD Competitive Intelligence blueprint

blueprint artifact · for AD Competitive Intelligence · status draft

Planning Surface

Use this to decide what happens next.

Status

draft

Agent Handoff
Start Here

blueprint artifact · for AD Competitive Intelligence · status draft

Completion Evidence

No explicit evidence field yet. Require tests, screenshots, linked PRs, or reviewed outputs before marking complete.

Artifact Shape
  • api: auth: string, base_url: string, endpoints: object
  • repo: name: string, ownership: string, local_path: string, relationship_to_redkey: string
  • stack: repo: string, backend: string, hosting: string, database: string, frontend: string, external_services: object, migration_sources: object
  • schema: tables: object
  • services: env_vars: object, dependencies: object
  • project id: ad-competitive-intelligence
  • updated at: 2026-05-03T03:00:27.959Z
  • product suite: name: string, products: object, repo_path: string, migration_source: object
  • schema version: 1.0
Structured Payload

Machine-readable source fields

api
auth

admin for ingestion/review; authenticated AD product access for read endpoints

base url

/api/ad/competitive-intelligence

endpoints
pathmethodrequestresponsedescriptionauth required
/collectPOST- body: company: string, source_type: string- 200: observations_created: number, observations_skipped: number - errors: 1 itemRun configured collection for one or more sources.true
/classifyPOST- body: observation_ids: object- 200: signals_created: number - errors: 0 itemsClassify new observations into draft signals.true
/signalsGET- params: status: string, company: string- 200: signals: object - errors: 0 itemsList signals with evidence and review status.true
/briefsPOST- body: period_end: string, period_start: string- 200: brief_id: string - errors: 0 itemsGenerate a draft executive brief from approved signals.true
/ask-ad-contextGET- params: - 200: context: object - errors: 0 itemsReturn latest approved brief context for Ask AD retrieval.true
repo
name

KnowledgeVault

ownership

Standalone production AD suite repo. It should contain KnowledgeVault core, the production KV app, Executive SEO, AD Competitive Intelligence/analytics, and Ask AD integration. RedKey remains platform/orchestration, not the product implementation home.

local path

/Users/justinking/Vaults/Projects/KnowledgeVault

relationship to redkey

RedKey stores Studio artifacts, agent orchestration, and shared platform infrastructure; product code should graduate into this standalone KnowledgeVault repo.

stack
repo

/Users/justinking/Vaults/Projects/KnowledgeVault

backend

KnowledgeVault repo API routes/workers for KV, SEO, competitive evidence collection, brief generation, and Ask AD context APIs; Supabase remains the shared product data store where appropriate.

hosting

Dedicated KnowledgeVault/AD production deployment path; Cloudflare Pages or existing KnowledgeVault hosting, with scheduled workers/VPS jobs for collectors as needed.

database

RedKey Supabase initially; can later split to a dedicated product schema if volume grows.

frontend

Standalone KnowledgeVault AD suite application. It should house the production KV app, Executive SEO surfaces, AD Competitive Intelligence analytics workspace, and Ask AD entry points.

external services
authnamepurpose
FIRECRAWL_API_KEY via DopplerFirecrawlSearch, scrape, and crawl public competitor pages.
provider key via Doppler; optional in V1Perplexity or Search APISecondary discovery for news and source expansion.
provider key via DopplerOpenAI or AnthropicClassify signals and draft brief implications with evidence citations.
migration sources
seo app

AD SEO app implementation/artifacts currently live outside this repo and should be migrated or integrated as a product module before production packaging.

knowledgevault app

/Users/justinking/Vaults/Projects/redk3y/apps/knowledgevault

schema
tables
rlsnamecolumnsindexesdescription
admin write, authenticated read for AD project usersad_ci_sources- id: Primary key. - company: Competitor name, initially Grainger or Fastenal; MSC can be added in V1b. - source_type: careers, newsroom, website, investor, patent, or third_party_job_board. - url: Canonical source URL. - authority: first_party, regulator, reputable_news, or third_party_snapshot. - active: Whether scheduled collection should use this source.- item: unique: boolean, columns: object - item: unique: boolean, columns: objectConfigured monitored public sources.
admin write, authenticated read for AD project usersad_ci_observations- id: Primary key. - source_id: Source that produced this observation. - observed_at: Collection timestamp. - url: Observed page URL. - title: Observed page or job title. - raw_text: Cleaned extracted page text. - content_hash: Hash for deduplication/change detection. - metadata: Scraper metadata, pay range, location, req id, and raw source labels.- item: unique: boolean, columns: object - item: unique: boolean, columns: objectRaw observed public pages or listing snapshots.
admin write, authenticated read for AD project usersad_ci_signals- id: Primary key. - company: Grainger, Fastenal, or later MSC Industrial. - category: AI, supply_chain, ecommerce, merchandising, inventory_services, vending, onsite_services, supplier_strategy, sales, customer_experience, other. - observed_fact: Evidence-grounded fact extracted from source material. - inference: Labeled system interpretation of what the fact may indicate. - ad_implication: Why AD or member distributors should care. - confidence: low, low_to_medium, medium, high. - source_refs: List of observation IDs and URLs that support the signal. - status: draft, reviewed, approved, reje- item: unique: boolean, columns: object - item: unique: boolean, columns: objectClassified strategic signals derived from observations.
admin write, authenticated read for AD project usersad_ci_briefs- id: Primary key. - period_start: Brief coverage start date. - period_end: Brief coverage end date. - title: Executive brief title. - summary: Short executive summary. - signal_ids: Ordered signals included in the brief. - ask_ad_context: Structured context block exported to Ask AD. - status: draft, approved, published.- item: unique: boolean, columns: object - item: unique: boolean, columns: objectExecutive-ready grouped intelligence briefings.
admin read/writead_ci_collection_runs- id: Primary key. - source_id: Source collected during this run, if source-specific. - started_at: Run start time. - ended_at: Run end time. - status: running, success, partial, failed. - error: Failure detail safe for operators.- item: unique: boolean, columns: objectProduction run log for every collection job.
admin read/writead_ci_review_events- id: Primary key. - entity_type: signal or brief. - entity_id: Reviewed entity ID. - action: approve, reject, edit, publish, unpublish. - actor: Reviewer identity. - created_at: Review event time. - notes: Reviewer notes.- item: unique: boolean, columns: objectAudit trail for signal and brief review actions.
services
env vars
nameexamplerequireddescription
REDKEY_SUPABASE_URLhttps://...trueRedKey Supabase project URL.
REDKEY_SUPABASE_SECRET_KEYsb_secret...trueService key for ingestion jobs.
FIRECRAWL_API_KEYfc-...trueFirecrawl API key for public web collection.
OPENAI_API_KEY or ANTHROPIC_API_KEYprovider secrettrueModel provider for classification and brief drafting.
dependencies
namepurposeversion
firecrawlSearch and scrape competitor public pages.cli installed
@supabase/supabase-jsPersist observations, signals, and briefs.repo version
project id

ad-competitive-intelligence

updated at

2026-05-03T03:00:27.959Z

product suite
name

KnowledgeVault AD Suite

products
idnamepurpose
knowledgevault-coreKnowledgeVault CoreCapture retiring expert and product knowledge into governed, searchable assets.
knowledgevault-appKnowledgeVault AppProduction application surface for capture, search, dashboards, admin, and AD/member workflows.
executive-seoExecutive SEODistributor digital visibility intelligence and CEO-level opportunity prioritization.
competitive-intelligenceAD Competitive IntelligenceMonitor Grainger and Fastenal public signals, produce reviewed analytics/briefs, and feed Ask AD.
ask-adAsk ADSuite-level cited advisor across KnowledgeVault, SEO, and Competitive Intelligence.
repo path

/Users/justinking/Vaults/Projects/KnowledgeVault

migration source
seo app

AD SEO app implementation/artifacts currently live outside this repo and should be migrated or integrated as a product module before production packaging.

knowledgevault app

/Users/justinking/Vaults/Projects/redk3y/apps/knowledgevault

schema version

1.0