Skip to content

Add warning when sitemap is missing or has insufficient URLs #17

@jjroelofs

Description

@jjroelofs

Summary

Add a warning message when the sitemap is unavailable or contains fewer than 5 URLs, as this may result in inaccurate content strategy recommendations.

Problem

The AI content strategy analysis relies on sitemap URLs to understand the site's content. When:

  • The sitemap is missing or inaccessible
  • The sitemap contains very few URLs (< 5)

The generated recommendations may be incomplete or inaccurate. Users should be warned about this.

Proposed Solution

Display a warning message in both:

  1. Admin UI (/admin/config/ai/content-strategy) - when viewing the report
  2. CLI (drush acs:report and drush acs:sitemap) - in the JSON output

Warning conditions:

  • sitemap_error: When sitemap cannot be fetched
  • sitemap_warning: When sitemap has fewer than 5 URLs

CLI Note

Document that when running via Drush, users must pass -l <site-url> to ensure the correct sitemap URL is used:

drush acs:sitemap -l https://example.com

Acceptance Criteria

  • Warning shown in UI when sitemap missing or < 5 URLs
  • Warning included in CLI JSON output
  • -l requirement documented in command help text

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions