{
  "$schema": "https://playground.wordpress.net/blueprint-schema.json",
  "landingPage": "/wp-admin/admin.php?page=klarvo-ai-transparency",
  "preferredVersions": {
    "php": "8.2",
    "wp": "latest"
  },
  "phpExtensionBundles": ["kitchen-sink"],
  "features": {
    "networking": false
  },
  "steps": [
    {
      "step": "login",
      "username": "admin",
      "password": "password"
    },
    {
      "step": "installPlugin",
      "pluginData": {
        "resource": "wordpress.org/plugins",
        "slug": "klarvo-ai-transparency"
      },
      "options": {
        "activate": true
      }
    },
    {
      "step": "runPHP",
      "code": "<?php require_once '/wordpress/wp-load.php'; /* Stage the demo so the preview lands on a green, populated Compliance Dashboard. Everything below is local option/content seeding — the preview makes no network call. */ delete_transient( 'klarvo_ain_first_run' ); update_option( 'blogname', 'Maison Lumière — demo shop' ); update_option( 'blogdescription', 'A small EU business, AI-transparency ready' ); /* What the server-side fetch pass would have found on a real site running these tools (registry pattern_ids). */ update_option( 'klarvo_ain_fetch', array( 'at' => time(), 'verifiable' => true, 'detected' => array( 'crisp', 'weglot' ), 'reason' => 'ok' ), false ); /* The owner's setup-wizard answers. */ update_option( 'klarvo_ain_state', array( 'onboarded' => true, 'declarations' => array( 'chatbot' => false, 'ai_content' => true, 'public_interest' => false ) ), false ); /* A published post declared as AI-assisted, so content labelling has something real to show. */ $post_id = wp_insert_post( array( 'post_title' => 'Our new collection, explained', 'post_content' => '<p>We used an AI writing assistant to help draft this announcement — and we say so. That is what the EU AI Act calls transparency.</p>', 'post_status' => 'publish', 'post_type' => 'post' ) ); if ( $post_id && ! is_wp_error( $post_id ) ) { update_post_meta( $post_id, '_klarvo_ain_ai_content', '1' ); } /* The published AI-usage statement page (the artefact the wizard writes for the owner). */ if ( ! class_exists( 'Klarvo_AIN_Artefacts' ) ) { require_once WP_PLUGIN_DIR . '/klarvo-ai-transparency/includes/class-artefacts.php'; } Klarvo_AIN_Artefacts::ensure_usage_page( true ); /* A staged preview has not earned the one-time review ask — keep it quiet here. */ update_option( 'klarvo_ain_review_prompt', array( 'shown_at' => time(), 'context' => 'playground-preview' ), false ); /* Recompute the cached scan + verdict from the staged state, and clear the watchtower change flag the seeding itself raised — the preview should open pristine. */ Klarvo_AIN_Scanner::run(); delete_option( 'klarvo_ain_change_flag' );"
    }
  ]
}
