Skip to content

Complete competitor watchlist sentiment ingestion - #22

Merged
jaydestro merged 7 commits into
mainfrom
copilot/featcompetitor-sentiment-reporting
Jul 20, 2026
Merged

jaydestro merged 7 commits into
mainfrom
copilot/featcompetitor-sentiment-reporting

Conversation

Copilot AI commented Jul 20, 2026 •

Copy link
Copy Markdown
Contributor

Competitor scans collected tagged mentions but lacked target-scoped sentiment, switching direction, and consumer-ready aggregates. This change completes that pipeline without affecting primary-product sentiment or scan reliability.

  • Collection

    • Honor the competitor-tracking toggle.
    • Expand queries from canonical names and aliases.
    • Deduplicate canonical URLs before classification.
  • Classification

    • Classify sentiment independently for each matched competitor.
    • Persist confidence, platform, timestamp, URL, and canonical identity.
    • Track switching separately as competitor_to_primary, primary_to_competitor, competitor_to_competitor, or none.
  • Structured output

    • Aggregate mentions and sentiment by competitor and source.
    • Keep competitor aggregates separate from primary sentiment totals.
    • Record partial source failures without failing the primary scan.
    • Expose competitor data to report and dashboard consumers.
{
  "competitor": "DynamoDB",
  "competitorSentiment": "negative",
  "competitorSentimentConfidence": "high",
  "switchingDirection": "competitor_to_primary",
  "platform": "reddit"
}
  • Coverage
    • Add focused cases for aliases, canonical deduplication, sentiment isolation, switching direction, tracking disablement, and partial-source failure.

jaydestro and others added 3 commits July 2, 2026 12:41
Wire competitor tracking into /scout-scan: when Competitor tracking is on and the config lists competitors, populate the Competitor & Market Signals section (content volume, sentiment toward the competitor, switching signals scored from our product's perspective, notable announcements) inline in the content report. Web UI Reports gains a Competitors tab that lists standalone -competitors.md reports and slices the section out of content reports (mirrors Mindshare/CFP). doc-meta.mjs classifies -competitors.md as kind 'competitors' and detects the section.
…ersations layer

New shared tools/lib/competitors.mjs parses the config ## Competitors section (name + aliases) and provides query-term building + word-boundary matching/tagging (6 unit tests). browser-scan loadConfig now returns competitors; index.mjs runs an additive, gated, defensively-wrapped competitor pass over Reddit + X that tags mentions by competitor and writes a {stamp}-competitors.json sidecar plus a competitors block in meta.json (flags: --no-competitors, --max-competitor-terms). Because browser-scan runs as Step 0 of every /scout-scan, the competitor pass runs automatically alongside the monthly mindshare run. scout-scan.prompt.md + agent.md ingest the sidecar into the Competitor & Market Signals section and add HN/Stack Overflow/Bluesky per-alias API coverage. Docs: WORKFLOW competitor section, browser-scan README schema, CHANGELOG 0.31.0.
Co-authored-by: jaydestro <2974195+jaydestro@users.noreply.github.com>
@jaydestro
jaydestro requested a review from Copilot July 20, 2026 16:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.

Co-authored-by: jaydestro <2974195+jaydestro@users.noreply.github.com>
@jaydestro

Copy link
Copy Markdown
Owner

Closes #18

@jaydestro
jaydestro marked this pull request as ready for review July 20, 2026 16:17
@jaydestro
jaydestro requested a review from Copilot July 20, 2026 16:17
Co-authored-by: jaydestro <2974195+jaydestro@users.noreply.github.com>
Copilot AI changed the title [WIP] Finish competitor watchlist ingestion and sentiment classification Complete competitor watchlist sentiment ingestion Jul 20, 2026
Copilot AI requested a review from jaydestro July 20, 2026 16:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated 4 comments.

Comment thread tools/lib/report-index.mjs Outdated
Comment on lines 23 to +26
// The return shape of parseReport / parseReportFromJson is identical so
// callers can treat them interchangeably:
// { slug, generatedAt, items, conversations, sentimentTotals, skippedSources }
// { slug, generatedAt, items, conversations, sentimentTotals, skippedSources,
// competitorMentions, competitorAggregates, competitorSourceFailures }
Comment thread tools/browser-scan/README.md Outdated
Comment thread .github/prompts/scout-scan.prompt.md Outdated
Co-authored-by: jaydestro <2974195+jaydestro@users.noreply.github.com>
@jaydestro
jaydestro merged commit 980ae94 into main Jul 20, 2026
6 checks passed
@jaydestro
jaydestro deleted the copilot/featcompetitor-sentiment-reporting branch July 20, 2026 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Finish competitor watchlist ingestion and sentiment classification

3 participants