AD Competitive Intelligence blueprint
blueprint artifact · for AD Competitive Intelligence · status draft
blueprint artifact · for AD Competitive Intelligence · status draft
No explicit evidence field yet. Require tests, screenshots, linked PRs, or reviewed outputs before marking complete.
- 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
Machine-readable source fields
admin for ingestion/review; authenticated AD product access for read endpoints
/api/ad/competitive-intelligence
| path | method | request | response | description | auth required |
|---|---|---|---|---|---|
| /collect | POST | - body: company: string, source_type: string | - 200: observations_created: number, observations_skipped: number - errors: 1 item | Run configured collection for one or more sources. | true |
| /classify | POST | - body: observation_ids: object | - 200: signals_created: number - errors: 0 items | Classify new observations into draft signals. | true |
| /signals | GET | - params: status: string, company: string | - 200: signals: object - errors: 0 items | List signals with evidence and review status. | true |
| /briefs | POST | - body: period_end: string, period_start: string | - 200: brief_id: string - errors: 0 items | Generate a draft executive brief from approved signals. | true |
| /ask-ad-context | GET | - params: | - 200: context: object - errors: 0 items | Return latest approved brief context for Ask AD retrieval. | true |
KnowledgeVault
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.
/Users/justinking/Vaults/Projects/KnowledgeVault
RedKey stores Studio artifacts, agent orchestration, and shared platform infrastructure; product code should graduate into this standalone KnowledgeVault repo.
/Users/justinking/Vaults/Projects/KnowledgeVault
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.
Dedicated KnowledgeVault/AD production deployment path; Cloudflare Pages or existing KnowledgeVault hosting, with scheduled workers/VPS jobs for collectors as needed.
RedKey Supabase initially; can later split to a dedicated product schema if volume grows.
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.
| auth | name | purpose |
|---|---|---|
| FIRECRAWL_API_KEY via Doppler | Firecrawl | Search, scrape, and crawl public competitor pages. |
| provider key via Doppler; optional in V1 | Perplexity or Search API | Secondary discovery for news and source expansion. |
| provider key via Doppler | OpenAI or Anthropic | Classify signals and draft brief implications with evidence citations. |
AD SEO app implementation/artifacts currently live outside this repo and should be migrated or integrated as a product module before production packaging.
/Users/justinking/Vaults/Projects/redk3y/apps/knowledgevault
| rls | name | columns | indexes | description |
|---|---|---|---|---|
| admin write, authenticated read for AD project users | ad_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: object | Configured monitored public sources. |
| admin write, authenticated read for AD project users | ad_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: object | Raw observed public pages or listing snapshots. |
| admin write, authenticated read for AD project users | ad_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: object | Classified strategic signals derived from observations. |
| admin write, authenticated read for AD project users | ad_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: object | Executive-ready grouped intelligence briefings. |
| admin read/write | ad_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: object | Production run log for every collection job. |
| admin read/write | ad_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: object | Audit trail for signal and brief review actions. |
| name | example | required | description |
|---|---|---|---|
| REDKEY_SUPABASE_URL | https://... | true | RedKey Supabase project URL. |
| REDKEY_SUPABASE_SECRET_KEY | sb_secret... | true | Service key for ingestion jobs. |
| FIRECRAWL_API_KEY | fc-... | true | Firecrawl API key for public web collection. |
| OPENAI_API_KEY or ANTHROPIC_API_KEY | provider secret | true | Model provider for classification and brief drafting. |
| name | purpose | version |
|---|---|---|
| firecrawl | Search and scrape competitor public pages. | cli installed |
| @supabase/supabase-js | Persist observations, signals, and briefs. | repo version |
ad-competitive-intelligence
2026-05-03T03:00:27.959Z
KnowledgeVault AD Suite
| id | name | purpose |
|---|---|---|
| knowledgevault-core | KnowledgeVault Core | Capture retiring expert and product knowledge into governed, searchable assets. |
| knowledgevault-app | KnowledgeVault App | Production application surface for capture, search, dashboards, admin, and AD/member workflows. |
| executive-seo | Executive SEO | Distributor digital visibility intelligence and CEO-level opportunity prioritization. |
| competitive-intelligence | AD Competitive Intelligence | Monitor Grainger and Fastenal public signals, produce reviewed analytics/briefs, and feed Ask AD. |
| ask-ad | Ask AD | Suite-level cited advisor across KnowledgeVault, SEO, and Competitive Intelligence. |
/Users/justinking/Vaults/Projects/KnowledgeVault
AD SEO app implementation/artifacts currently live outside this repo and should be migrated or integrated as a product module before production packaging.
/Users/justinking/Vaults/Projects/redk3y/apps/knowledgevault
1.0