Skip to content

feat(skills): anti-fabrication gate + real DataForSEO intel for mkt-competitive-brief#103

Open
mt-alarcon wants to merge 1 commit into
evolution-foundation:mainfrom
mt-alarcon:feat/mkt-competitive-brief-skill
Open

feat(skills): anti-fabrication gate + real DataForSEO intel for mkt-competitive-brief#103
mt-alarcon wants to merge 1 commit into
evolution-foundation:mainfrom
mt-alarcon:feat/mkt-competitive-brief-skill

Conversation

@mt-alarcon

Copy link
Copy Markdown

What

Upgrades the existing mkt-competitive-brief skill (previously SKILL.md only) with a verifiability-first workflow and a real data collector, plus the shared DataForSEO client it depends on.

Why

Competitive analysis is one of the easiest places for an LLM to present its training-data memory as fact. This change makes the skill provenance-gated and gives it a path to real, sourced data instead of plausible-sounding guesses.

Changes

SKILL.md — adds a mandatory provenance gate: every competitor data point needs source + URL + collection date, or it lands in a provenance table as unverified / research. Adds source-limit disclaimers up front so the skill never overpromises:

  • Meta Ad Library API is restricted to political/social-issue + EU-only in 2026 — commercial creatives are UI-only, no public commercial API.
  • Google Ads Transparency Center has no public API (no spend / keyword-trigger / targeting). UI-only.
  • Competitor spend and ad keyword-triggers are not observable in any public source — any number is a third-party estimate (label the 15-30% error band).

scripts/competitor_intel.py — real competitive intel via DataForSEO:

  1. SERP features + AI Overview presence + intent per keyword
  2. Keyword gap (domain-vs-domain) via DataForSEO Labs domain_intersection

Every output carries source + url + collected_at. No credentials → status N/A with instructions (never fabricates, never breaks the pipeline). Reuses the mkt-seo-ops DataForSEO client via importlib instead of duplicating the HTTP client / credentials.

.claude/skills/mkt-seo-ops/dataforseo_client.py — the shared DataForSEO client that competitor_intel.py imports (HTTP Basic, env-based creds, graceful degradation). Included so the new collector is functional out of the box.

tests/ — 38 tests, all network blocked (autouse urllib guard), covering N/A paths, provenance fields, location validation (no silent BR default), truncation, and gap parsing.

Config

Credentials are env-only and both optional: DATAFORSEO_LOGIN / DATAFORSEO_PASSWORD. The skill works without them (provenance-gated manual research); the collector just reports N/A.

Test

$ python3 -m pytest tests/ -q
38 passed
$ python3 scripts/competitor_intel.py --check   # no creds
{"client_loaded": true, "available": false, "reason": null}

🤖 Generated with Claude Code

…ompetitive-brief

Upgrades the existing `mkt-competitive-brief` skill (previously SKILL.md only)
with a verifiability-first workflow and a real data collector, plus the shared
DataForSEO client it depends on.

What changes:

- SKILL.md — adds a mandatory provenance gate: every competitor data point
  requires source + URL + collection date, or it goes to a provenance table as
  "unverified / research". Adds source-limit disclaimers up front:
    * Meta Ad Library API is restricted to political/social-issue + EU-only in
      2026 — commercial creatives are UI-only, no public commercial API.
    * Google Ads Transparency Center has no public API (no spend / keyword-trigger
      / targeting). UI-only.
    * Competitor spend and ad keyword-triggers are not observable in any public
      source — any number is a third-party estimate (label the 15-30% error band).
  This keeps the LLM from presenting model-memory as fact.

- scripts/competitor_intel.py — real competitive intel via DataForSEO:
    1. SERP features + AI Overview presence + intent per keyword
    2. Keyword gap (domain-vs-domain) via DataForSEO Labs domain_intersection
  Every output carries source + url + collected_at. No credentials → status N/A
  with instructions (never fabricates, never breaks the pipeline). Reuses the
  mkt-seo-ops DataForSEO client via importlib instead of duplicating the HTTP
  client / credentials.

- .claude/skills/mkt-seo-ops/dataforseo_client.py — the shared DataForSEO client
  competitor_intel.py imports (HTTP Basic, env-based creds, graceful degradation).
  Included so the new collector is functional out of the box.

- tests/ — 38 tests, all network blocked (autouse urllib guard), covering N/A
  paths, provenance fields, location validation (no silent BR default), truncation,
  and gap parsing.

Credentials are env-only (DATAFORSEO_LOGIN / DATAFORSEO_PASSWORD), both optional.
The skill works without them (provenance-gated manual research); the collector
just reports N/A.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sorry @mt-alarcon, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

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.

1 participant