Skip to content

feat(content): recommend several assets per opportunity - #940

Merged
gkhngyk merged 1 commit into
mainfrom
feature/opportunity-assets
Oct 5, 2026
Merged

gkhngyk merged 1 commit into
mainfrom
feature/opportunity-assets

Conversation

@gkhngyk

@gkhngyk gkhngyk commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Third PR of Phase 2 in #857. An opportunity was one piece of content. Some needs take more than one: the main page plus a comparison page, a glossary entry, a third-party article or a backlink. Opportunities can now recommend several assets. Sending an opportunity or one of its assets to the Action Center is the next PR.

Generation

  • The generation call now names the primary content's type:
Type Channel
blog_post, pillar_guide, landing_page, comparison_page, glossary_page, faq_page, product_page, category_page owned
third_party_article, backlink earned
  • It adds up to 3 supporting assets, only when the data calls for them. The prompt gives four examples:

    • a comparison page when people compare named products;
    • a glossary or FAQ page for a definition the main content relies on;
    • a third-party article when competitors are visible and the brand is not;
    • a backlink when the brand's page exists but is not cited.

    It also says most opportunities need none or one.

  • Each asset has its own type, channel, decision, short title and target pages.

buildAssets (lib/page-matching.js)

  • Resolves each asset on its own with the existing resolveDecision.
  • Earned assets live on other sites, so they are always create and carry no page.
  • Drops supporting assets of an unknown type, repeats of the same work (same type, decision and pages), and anything past the cap of 3.
  • Gives each asset a stable key (a1, a2, …). The next PR uses it to send a single asset to the Action Center.

Storage and UI

  • Assets are kept in source_data.assets, primary first. The primary asset's decision and pages are still the opportunity's decision and targetPages, so the brief and the Your Site card are unchanged.
  • Like the decision, assets stay as first written when a cluster is later merged into the opportunity.
  • The detail page shows a Recommended Assets card when an opportunity has more than its primary asset. Each asset shows its type, channel and decision badges, its title and links to its pages, and the primary is marked.
  • There is no migration.

Results on the main test brand

Opportunity Assets
Create a comparison guide for Athena HQ alternatives comparison page (create); third-party article (earned)
Refresh the complete list of AI SEO, AEO, and GEO tools for 2026 pillar guide (refresh, the existing list page); glossary page (optimize)

Known limitation: candidate pages are chosen per cluster, not per asset. The glossary asset above was linked to the GEO guide rather than the site's "What is AEO / GEO" glossary entries, because those were not among the cluster's 8 candidates. A per-asset candidate search can come later.

Related issue

Part of #857 (Phase 2)

Type of change

  • feat — New feature
  • test — Adding or updating tests

How to test

  1. Run Generate on a brand with a site page inventory.
  2. Open a new opportunity with supporting assets. The Recommended Assets card lists them with type, channel and decision, and the first is marked Primary.

page-matching.test.js covers buildAssets: per-asset decisions, earned assets, and dropping unknown types, repeats and anything past the cap.

Checklist

  • Branch follows the naming convention
  • Commits follow Conventional Commits
  • yarn lint, yarn typecheck, yarn format:check, yarn test (407) and yarn build pass (run from web/)
  • yarn lint, yarn format:check and yarn test (978) pass (run from server/)

🤖 Generated with Claude Code

An opportunity was one piece of content. Some needs take more: the main
page plus a comparison page, a glossary entry, a third-party article or a
backlink (#857, Phase 2).

- The generation call names the primary content's type and adds up to 3
  supporting assets only when the data calls for them, each with its own
  type, channel, decision and pages.
- buildAssets resolves each asset on its own: earned assets are always new
  and carry no page, and unknown types, repeats of the same work and
  anything past the cap are dropped.
- Assets are kept in source_data.assets with stable keys, and survive
  merges like the decision does.
- The detail page shows a Recommended Assets card when an opportunity has
  more than its primary asset.
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