Mestra owned growth engine: approval-safe SEO/AEO opportunity, drafting, QA, and reporting workflows.
This repository has been archived on 2026-10-13. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
  • Python 96%
  • Shell 4%
Find a file
2026-05-23 21:52:46 +01:00
config Initial Mestra owned growth engine import 2026-05-23 21:52:46 +01:00
multica Initial Mestra owned growth engine import 2026-05-23 21:52:46 +01:00
proposals Initial Mestra owned growth engine import 2026-05-23 21:52:46 +01:00
reports Initial Mestra owned growth engine import 2026-05-23 21:52:46 +01:00
runs Initial Mestra owned growth engine import 2026-05-23 21:52:46 +01:00
schemas Initial Mestra owned growth engine import 2026-05-23 21:52:46 +01:00
scripts Initial Mestra owned growth engine import 2026-05-23 21:52:46 +01:00
state Initial Mestra owned growth engine import 2026-05-23 21:52:46 +01:00
templates Initial Mestra owned growth engine import 2026-05-23 21:52:46 +01:00
tests Initial Mestra owned growth engine import 2026-05-23 21:52:46 +01:00
workflows Initial Mestra owned growth engine import 2026-05-23 21:52:46 +01:00
.gitignore Initial Mestra owned growth engine import 2026-05-23 21:52:46 +01:00
README.md Initial Mestra owned growth engine import 2026-05-23 21:52:46 +01:00

Mestra Owned Growth Engine v2

Status: implemented as an approval-safe internal growth engine
Root: /home/josh/forgejo/owned-growth-engine
Public site: https://getmestra.com

Objective

Discover, score, queue, draft, QA, measure, and review Mestra owned SEO/AEO growth opportunities while stopping before approval-gated external side effects.

Governance

  • Public brand is Mestra.
  • No publishing.
  • No CMS create/update.
  • No social queueing.
  • No outreach.
  • No spend.
  • No deployment.
  • No website code edits.
  • No customer, supplier, calendar, or financial commitments.
  • Website blockers produce PR-ready proposals/prompts only.
  • No secrets in committed config, reports, schemas, manifests, or run folders.

Required keys

The scripts hard-fail if any required key is missing:

  • SERPER_API_KEY
  • FIRECRAWL_API_KEY
  • KEYWORDS_EVERYWHERE_API_KEY

Optional adapters are skipped when unset:

  • OPENAI_API_KEY
  • PERPLEXITY_API_KEY
  • GOOGLE_AI_OVERVIEW_PROVIDER
  • GOOGLE_AI_OVERVIEW_API_KEY
  • GOOGLE_CLOUD_PROJECT
  • GOOGLE_APPLICATION_CREDENTIALS
  • MESTRA_GA4_MCP_EXPORT

Add keys to an ignored local file:

cp /home/josh/forgejo/owned-growth-engine/config/env.example /home/josh/forgejo/owned-growth-engine/config/env.local

or for Multica:

cp /home/josh/forgejo/owned-growth-engine/multica/commands/env.example /home/josh/forgejo/owned-growth-engine/multica/commands/env.local

Missing-key behavior

If a required key is missing, the workflow exits before doing work and creates:

runs/YYYY-MM-DDTHHMM-setup-failed/
  README.md
  run.json
  setup-failure.md

The failure output names missing key names only. It never prints secret values.

Workflows

Daily:

python3 '/home/josh/forgejo/owned-growth-engine/scripts/daily_growth_asset.py'

Weekly intelligence:

python3 '/home/josh/forgejo/owned-growth-engine/scripts/weekly_intelligence.py'

Weekly live-provider run:

python3 '/home/josh/forgejo/owned-growth-engine/scripts/weekly_intelligence.py' --live-providers

Impact review:

python3 '/home/josh/forgejo/owned-growth-engine/scripts/impact_review.py'

Coordinator:

python3 '/home/josh/forgejo/owned-growth-engine/scripts/next_best_growth_action.py' --run --workflow daily

Provider calls are only attempted when the operator passes --live-providers and required keys are present. The setup-failure verification path does not run provider calls. Weekly v2 writes provider-diagnostics.json and provider-diagnostics.md for Serper, Firecrawl, Keywords Everywhere, Search Console, and GA4. Search Console uses /home/josh/.local/bin/gsc-query. GA4 uses the Google Analytics Data API directly when GOOGLE_APPLICATION_CREDENTIALS points at a service-account key with Viewer access to property 528578832. MESTRA_GA4_MCP_EXPORT remains supported as a fallback handoff from analytics_mcp.run_report, and deterministic fixtures are used by tests.

Run folders

Human-facing run folders:

  • runs/YYYY-MM-DDTHHMM-daily-growth-asset/
  • runs/YYYY-MM-DDTHHMM-weekly-intelligence/
  • runs/YYYY-MM-DDTHHMM-impact-review/
  • runs/YYYY-MM-DDTHHMM-setup-failed/

Every successful run folder includes README.md, run.json, and the canonical artifacts for that run.

Machine state

Append-only state files:

  • state/artifact_register.jsonl
  • state/artifact_events.jsonl
  • state/opportunity_queue.jsonl
  • state/opportunity_events.jsonl

Scripts append lifecycle events. They do not rewrite prior history. Daily derives latest opportunity status from events and skips consumed, completed, blocked, or superseded opportunities.

Daily Workflow V2

Daily consumes the latest ranked valid queue item from weekly state. Minimum daily success is one asset, target is two assets, and maximum is three assets. Every asset gets a source manifest and QA report. Full article drafts are created when the queued opportunity qualifies; non-article assets are created when they are the stronger response.

Valid asset types:

  • article_draft
  • refresh_draft
  • source_grounded_brief
  • internal_link_proposal
  • faq_schema_proposal
  • llms_txt_update_proposal
  • product_led_free_tool_brief
  • safe_authority_asset_brief
  • post_publish_improvement_proposal
  • claim_risk_cleanup_pack
  • technical_blocker_proposal

QA checks source grounding, duplicate intent, claim risk, commercial relevance, AEO usefulness, heading/opening similarity, thin drafts, claim ledger, approval boundary, missing evidence, and recommended status. Medium-confidence drafts are marked draft_for_QA or qa_required, not treated as publish-ready.

Weekly Intelligence V2

Weekly is the discovery and scoring engine. It builds a local content inventory from topic, site, internal-link, AEO, brand, approval, brief, published, discovery, report, CMS-cleanup, and claim-review sources; uses live provider evidence only behind --live-providers; calculates complete 28-day recent and comparison measurement windows; converts GSC/GA4 evidence into scoring signals where available; and writes a ranked daily queue.

Weekly runs produce:

  • content inventory
  • measurement summary
  • provider diagnostics
  • opportunity discovery
  • ranked daily queue
  • site audit
  • visibility report
  • keyword/competitor gap
  • topic queue update proposal
  • technical blocker proposal
  • website fixer prompt
  • impact review summary
  • weekly topic/action plan
  • next-actions synthesis

The target is seven primary and three backup strong topics/assets, but the engine does not force weak content. Technical blockers outrank new content when they block visibility. Opportunities are scored for qualified organic lead potential using commercial intent, Mestra fit, evidence strength, AEO usefulness, freshness/novelty, execution cost, and risk/blockers.

Provider and cost limits

Default limits:

  • ai_visibility_prompts_per_run: 7
  • serper.max_queries_per_run: 15
  • serper.hard_stop_queries_per_run: 25
  • firecrawl.max_scrape_pages_per_run: 20
  • firecrawl.hard_stop_scrape_pages_per_run: 30
  • keywords_everywhere.max_keywords_per_run: 30
  • keywords_everywhere.hard_stop_keywords_per_run: 50
  • optional_openai.max_prompts_per_run: 7
  • optional_perplexity.max_prompts_per_run: 7
  • competitor_depth.top_serp_results_per_prompt: 3
  • competitor_depth.max_competitor_pages_per_prompt: 2

These are conservative defaults based on the current seven-prompt Mestra workflow and provider billing units. Real costs depend on provider pricing.

AI visibility

Core visibility uses Serper-backed SERP/AEO checks when live providers are explicitly enabled. Optional adapter stubs exist for OpenAI, Perplexity/Sonar, and Google AI Overview provider checks.

Do not claim direct ChatGPT, Perplexity, or Google AI Overview visibility unless that specific adapter actually ran. Google AI Overview remains provider pluggable unless a concrete provider is configured.

Multica setup

The setup pack lives under multica/ and its instructions describe v2 behavior. Do not run setup until Josh explicitly approves Multica creation.

/home/josh/forgejo/owned-growth-engine/multica/commands/setup-growth-engine.sh --yes

It validates the Multica CLI, workspace/runtime discovery, local env file, and instruction files. It creates or updates named agents and autopilots rather than duplicating them, injects shared env into generated agents, and writes:

multica/setup-manifest.json

Default schedules:

  • daily_growth_asset: daily 07:30 Europe/London
  • weekly_intelligence: Monday 06:30 Europe/London
  • weekly_impact_review: Friday 14:30 Europe/London

Website fixer lane

See workflows/website-fixer-lane.md. Website fixes are PR-only and require separate approval for implementation and deployment.