Keyword and Competitor Specialist writes evidence-backed opportunities #2

Closed
opened 2026-05-28 18:14:24 +01:00 by bingoss · 1 comment
Owner

What to build

Type: AFK.

Create the Keyword and Competitor Research slice of Weekly Intelligence. A Run Request for this stage should produce evidence-backed search demand, SERP shape, competitor gap, and Mestra-fit opportunities that can feed Content Planning without relying on hardcoded seed topics.

Acceptance criteria

  • A Keyword and Competitor Research run records a completed, blocked, or failed run stage with safe diagnostics and events.
  • Successful output includes normalized keyword/competitor opportunity evidence with source references, intent, SERP observations, competitor gaps, and Mestra-fit rationale.
  • The stage fails or blocks safely when required provider evidence is unavailable instead of inventing demand.
  • Dashboard surfaces latest stage state, evidence counts, and artifact links without raw provider payloads.
  • Tests are written first and cover success, provider unavailable, malformed evidence, and safe dashboard output.

Blocked by

None - can start immediately

## What to build Type: AFK. Create the Keyword and Competitor Research slice of Weekly Intelligence. A Run Request for this stage should produce evidence-backed search demand, SERP shape, competitor gap, and Mestra-fit opportunities that can feed Content Planning without relying on hardcoded seed topics. ## Acceptance criteria - [ ] A Keyword and Competitor Research run records a completed, blocked, or failed run stage with safe diagnostics and events. - [ ] Successful output includes normalized keyword/competitor opportunity evidence with source references, intent, SERP observations, competitor gaps, and Mestra-fit rationale. - [ ] The stage fails or blocks safely when required provider evidence is unavailable instead of inventing demand. - [ ] Dashboard surfaces latest stage state, evidence counts, and artifact links without raw provider payloads. - [ ] Tests are written first and cover success, provider unavailable, malformed evidence, and safe dashboard output. ## Blocked by None - can start immediately
Author
Owner

Issue #2 completion audit

Implemented and verified:

  • Keyword and Competitor Research run requests are claimed through a dedicated worker and recorded as completed, blocked, or failed stages with safe diagnostics and append-only events.
  • Successful output now writes normalized keyword_competitor_opportunities with primary keyword, intent, search demand summary, SERP observations, competitor gaps, Mestra-fit rationale, structured source_reference data, and evidence source.
  • Provider execution diagnostics are recorded in run_stage_adapter_results, including completed and blocked required-provider states.
  • Raw provider payload bodies are retained only in raw_provider_payloads; dashboard output exposes latest stage state, opportunity counts, intent/status counts, adapter diagnostics, and artifact links without raw provider payload bodies.
  • Required provider unavailability blocks safely and writes no opportunity rows.
  • Malformed or incomplete provider evidence fails closed without partial opportunity rows or raw payload leakage.
  • Canonical and idempotent evidence migrations plus schema docs were updated for keyword_competitor_opportunities and evidence_type support.

Tests run on codex-server:

  • python3 -m unittest tests.test_keyword_competitor_worker tests.test_postgres_schema.SliceOnePostgresSchemaTests.test_enum_values_match_schema_contract tests.test_postgres_schema.SliceFiveEvidenceAndMeasurementSchemaTests.test_incremental_evidence_migration_restores_missing_evidence_tables_on_partial_schema tests.test_postgres_schema.SliceFiveEvidenceAndMeasurementSchemaTests.test_incremental_evidence_migration_is_idempotent_after_canonical_schema
  • Result: OK, 6 tests.
  • Broader verification: python3 -m unittest tests.test_business_profile_worker tests.test_keyword_competitor_worker tests.test_visibility_worker tests.test_public_listening_worker tests.test_authority_research_worker tests.test_postgres_dashboard tests.test_postgres_schema tests.test_technical_audit_worker && git diff --check
  • Result: OK, 147 tests; git diff --check clean.
Issue #2 completion audit Implemented and verified: - Keyword and Competitor Research run requests are claimed through a dedicated worker and recorded as completed, blocked, or failed stages with safe diagnostics and append-only events. - Successful output now writes normalized keyword_competitor_opportunities with primary keyword, intent, search demand summary, SERP observations, competitor gaps, Mestra-fit rationale, structured source_reference data, and evidence source. - Provider execution diagnostics are recorded in run_stage_adapter_results, including completed and blocked required-provider states. - Raw provider payload bodies are retained only in raw_provider_payloads; dashboard output exposes latest stage state, opportunity counts, intent/status counts, adapter diagnostics, and artifact links without raw provider payload bodies. - Required provider unavailability blocks safely and writes no opportunity rows. - Malformed or incomplete provider evidence fails closed without partial opportunity rows or raw payload leakage. - Canonical and idempotent evidence migrations plus schema docs were updated for keyword_competitor_opportunities and evidence_type support. Tests run on codex-server: - python3 -m unittest tests.test_keyword_competitor_worker tests.test_postgres_schema.SliceOnePostgresSchemaTests.test_enum_values_match_schema_contract tests.test_postgres_schema.SliceFiveEvidenceAndMeasurementSchemaTests.test_incremental_evidence_migration_restores_missing_evidence_tables_on_partial_schema tests.test_postgres_schema.SliceFiveEvidenceAndMeasurementSchemaTests.test_incremental_evidence_migration_is_idempotent_after_canonical_schema - Result: OK, 6 tests. - Broader verification: python3 -m unittest tests.test_business_profile_worker tests.test_keyword_competitor_worker tests.test_visibility_worker tests.test_public_listening_worker tests.test_authority_research_worker tests.test_postgres_dashboard tests.test_postgres_schema tests.test_technical_audit_worker && git diff --check - Result: OK, 147 tests; git diff --check clean.
Commenting is not possible because the repository is archived.
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
bingoss/owned-growth-engine#2
No description provided.