{
    "version": 1,
    "mcp_first": true,
    "project_id": 30,
    "site_id": 30,
    "contract_version": "2026-10-17-mcp-pack-v154",
    "service_catalog": {
        "enabled": true,
        "api": "https://pocketpapi.com/api/control-plane/site-services",
        "mcp_tools": [
            "sitecommander_services",
            "sitecommander_service_save",
            "sitecommander_service_delete"
        ],
        "renderer": "pocketpapi-catalogs.json",
        "rendering": "Static JSON and browser DOM APIs; imported public service pages need no site PHP endpoint.",
        "published_snapshot_only": true,
        "page_block": "service_catalog",
        "empty_state": "Service information will appear here once it is added in PocketPapi."
    },
    "automatic_update": {
        "enabled": true,
        "staging_revision_policy": "Keep one editable autosaving staging draft per site. Its change_set_id is a stable globally allocated record ID, not a per-edit revision counter. Repeated page, block, runtime, catalog, and import-batch saves update that same draft; create a new draft only when no editable draft exists. Pass the current ID returned by the last Site Studio tool when continuing an import, reject stale IDs, and return the unchanged current draft ID and preview. Reviewed and published releases remain separate history.",
        "trigger": "after an explicitly requested project import completes its full manifest, stage the current runtime in that same draft; for an existing site, an authorized site.edit client may stage backward-compatible runtime updates with sitecommander_mcp_compatible_update in the single current Site Studio draft without a separate prompt; full-pack provisioning remains separately approved",
        "import_completion_policy": "A complete project import keeps every owner-supplied public page and route in one review revision, verifies local targets from site-studio-routes.json and static .htaccess rewrites against staged pages, fails readiness for a missing target, and generates the managed themed Shop page only when an explicit imported route points to shop.html and no owner Shop page exists. Existing owner pages always win. It derives theme tokens from the imported home page and its local CSS, reuses shared body classes, header, footer, stylesheets, and inline global styles on generated MCP pages, applies and verifies consent and configured chat on every public/imported/managed page, and rebuilds the Search index from imported public pages and editorial articles. Route imported public search controls to the site Search page and keep both navigation and results on the exact Site Studio preview revision until publication. Recognizable imported newsletter forms are connected to the first-party event bridge; clear owner consent copy is preserved, otherwise the importer adds an unchecked explicit opt-in. Readiness verifies each newsletter form, its same-origin handler, consent state, and saved-subscription response. Recognizable owner contact and quote forms keep their markup and fields, are connected to the same-origin event bridge with a managed submission runtime, and report per-page readiness; ambiguous, incomplete, file-upload, or unsupported forms block the import rather than silently remaining inert. Recognizable imported Services and Portfolio pages keep their owner content and receive a site-scoped catalog binding with the matching runtime script, stylesheet, and endpoint; readiness fails if any part is missing. Never send staging queries to PocketPapi global search or substitute starter Home/About/Services/Contact pages for imported content. Return exact per-page form and runtime coverage, preview, and any missing SEO fields; fail closed if required consent/chat coverage is incomplete; preserve an explicit owner-disabled chat setting and pass it only when the PocketPapi widget is absent from every covered page. On the final complete_import call, verify the manifest, runtime, project knowledge, layout, forms, and SEO, then leave the exact revision in staging. Production publishing requires separate approval for the reviewed change_set_id and verified project deployment rights.",
        "apply_to": "staging",
        "production": "publish the reviewed staging revision",
        "missing_feature_action": "stage backward-compatible managed runtime updates into the current draft with sitecommander_mcp_compatible_update when the authorized client has site.edit; any destructive, paid, breaking, or newly enabled capability must remain review-only until the owner explicitly approves the exact production revision",
        "no_ai_upgrade": "call sitecommander_mcp_compatible_update with confirm=true to stage backward-compatible runtime updates for an existing site into its single current draft; after project import, the server targets the exact import change_set_id, preserves imported pages, schema, theme, and owner settings, reapplies the imported site shell to generated pages, and leaves production unchanged; use sitecommander_mcp_upgrade only for separately approved full-pack provisioning",
        "chat_widget_policy": "Every completed Site Studio import prepares a site-scoped chat widget and enables it by default across imported public pages, including Home, and managed sign-in/help pages. Owners can disable it and choose a bottom corner in Site Studio. Preserve an explicit disabled choice, report disabled-by-owner readiness per page, remove only this project’s matching widget embed, and never expose the public key outside the generated embed, and preserve other owner-configured embeds. Keep the launcher clear of visible consent controls and limit an open panel to the remaining viewport.",
        "public_runtime_policy": "The first-party consent banner is enabled across public HTML pages, including Home and imported pages, plus managed sign-in/help pages. The configured project chat is included only while its saved owner setting is enabled; an explicit disabled setting remains off and passes readiness only when its widget is absent from every covered page. The optional PocketPapi app download banner is disabled by default so customer sites do not receive promotional links without owner intent. Owners can enable it and set their own HTTPS iOS and Android destinations in Site Studio or through the app-banner MCP tools. Existing settings are preserved during runtime and pack updates. Production remains unchanged until the exact staging revision is approved and published.",
        "first_run": [
            "verify authenticated MCP status and current contract",
            "identify the authorized site; the local repository may be PocketPapi itself while customer websites are separate site_id resources",
            "discover pages with sitecommander_site_studio_pages; read the persistent theme, public runtime, and per-site app banner settings with their Site Studio tools",
            "manage site services through sitecommander_services, sitecommander_service_save, and sitecommander_service_delete; edits create an exact staged revision and never change the live catalog before approval",
            "imports convert recognizable static Services cards into site-scoped drafts while preserving their copy, links, and image paths, then bind the page to the static pocketpapi-catalogs.json snapshot; verify the catalog rows, JSON file, browser runtime, stylesheet, and per-page coverage in the same staging revision. Existing service edits stage the same JSON with the content snapshot, and published pages render without a site PHP endpoint",
            "stage requested theme/runtime/app banner changes with the matching staging tools; the app banner can be enabled, disabled, or updated with HTTPS iOS and Android links; inspect the exact change set with the matching preview tools",
            "use the Site Studio edit, page, role, block, image, effects, and navigation tools for matching editor actions",
            "use sitecommander_site_studio_issues with site_id or an authorized project_id to review sanitized system errors and submitted bug reports; classify usability bugs, feature requests, and site errors and disclose external AI processing",
            "submit a user-requested report with sitecommander_site_studio_issue_report using confirm=true and a concrete authorized site_id; each open report gets a Support-thread acknowledgment with a 24-hour resolution target and a due AI Center task, with no email sent",
            "existing-site edits autosave into one current staging draft and return the same change_set_id plus updated preview URL; a complete import remains in staging after manifest, runtime, project-knowledge, layout, and SEO checks pass; production publishing requires separate approval of the exact reviewed change_set_id and project deployment rights; PageSpeed and issue feeds are read-only, while issue report/resolution actions update only queue, thread, and task records",
            "return the preview for existing-site edits and ask for separate explicit production approval before publishing the exact change set",
            "for an owner-confirmed public live-site import, use sitecommander_site_studio_import_url with the exact HTTPS source URL, confirm=true, and a stable idempotency_key; it crawls one public hostname and stages a complete bounded manifest in one revision, reports per-page SEO and form coverage, and never publishes",
            "use sitecommander_site_stage_files and sitecommander_site_stage_file_chunk only after an explicit request to import the local project website",
            "for PHP projects, inspect routes and exporters, then render the complete public GET surface into an isolated temporary output with database writes and external side effects disabled; stage its pages, route map/rewrites, assets, SEO files, and PocketPapi form bridge, excluding private app/install handlers and secrets",
            "require affirmative newsletter consent and subscription_saved=true, then page through site-scoped PocketPapi subscribers until has_more is false; if essential logged-in or database-backed behavior has no verified PocketPapi workflow, report the exact missing behavior and keep the import incomplete",
            "after the complete import manifest is verified, require managed_runtime.status=current in the same change_set_id before reporting the import ready",
            "keep feature-pack setup, custom integrations, imports, and read-only audits as distinct owner-selected tasks"
        ],
        "social_links": "Use connected social profiles or URLs supplied by the owner to add accessible branded icon links in the header or footer during approved Site Studio work. Do not invent profile URLs. Presentation choices are site-owner decisions and remain reviewable in staging.",
        "link_controls": "Site Studio link lists and inserted links support per-link Amazon Associates and eBay Partner Network tracking IDs. An explicit link ID takes priority, then the selected site Shop connection, then PocketPapi central Shop. Amazon tags are applied only to Amazon destinations; eBay item URLs use the eBay Browse API to return official tracked links. Link controls also support adding a profile to the accessible social icon bar. Include clear affiliate disclosures near affiliate links.",
        "browser_refresh": "public pages do not poll or display feature-pack updates; authorized Site Studio/MCP staff surfaces may check pocketpapi-version.php and stage the reviewed upgrade",
        "never": [
            "write a production document root directly",
            "copy central credentials into site files",
            "replace site branding with platform branding",
            "show a staging-update banner on a published public page"
        ]
    },
    "runtime": {
        "mcp_bridge": true,
        "mcp_json_rpc_client": true,
        "chat_widget": true,
        "chat_widget_default_enabled_for_imports": true,
        "public_consent": true,
        "app_download_banner": true,
        "contact_event_bridge": true,
        "crm_event_sync": true,
        "site_newsletter_subscription_opt_ins": true,
        "campaign_lead_attribution": true,
        "accounts_leads_clients": true,
        "project_knowledge_context": true,
        "domain_research_context": true,
        "visual_effects_contract": true,
        "business_network_widget": true,
        "pocketpapi_sso": true,
        "email_identity_sync": true,
        "zernio_social_connect": true,
        "meta_social_connect": true,
        "branding_sync": true,
        "profile_identity_sync": true,
        "pos_site_surface": true,
        "pos_server_sync": true,
        "shared_shop_offers": true,
        "referral_bonus_tracking": true,
        "course_business_type": true,
        "site_search": true,
        "site_search_page_controls": true,
        "site_search_navigation_widget": true,
        "site_search_results_tabs": true,
        "site_search_link_results": true,
        "site_search_query_prefill": true,
        "site_search_preview_routing": true,
        "site_studio_link_affiliate_tracking": true,
        "site_studio_social_bar_control": true,
        "shop_marketplace_search_tabs": true,
        "shared_site_shell": true,
        "responsive_site_navigation": true,
        "store_locations_runtime": true,
        "store_locations_mcp": true,
        "order_location_selector": true,
        "site_search_mcp": true,
        "site_gallery_runtime": true,
        "site_gallery_api": true,
        "site_gallery_mcp": true,
        "help_center": true,
        "help_center_mcp": true,
        "help_center_api": true,
        "customer_portal": true,
        "customer_accounts_project_scoped": true,
        "site_staff_dashboard": true,
        "cookie_consent_manager": true,
        "copyright_protection": true,
        "protected_media_runtime": true,
        "site_form_runtime": true,
        "site_imported_owner_form_submission": true,
        "site_form_owner_slot_mounting": true,
        "site_studio_editable_workspace": true,
        "site_studio_mcp_edit": true,
        "site_studio_mcp_newsletter_form_connection": true,
        "site_studio_mcp_pages": true,
        "site_studio_mcp_navigation": true,
        "persistent_site_theme": true,
        "site_theme_schema_version": 1,
        "site_theme_mcp_read_stage_preview_apply": true,
        "site_theme_preserved_during_runtime_upgrade": true,
        "site_public_consent_and_project_chat_runtime": true,
        "site_public_runtime_respects_owner_disabled_chat": true,
        "site_public_runtime_mcp_read_stage_preview_apply": true,
        "site_public_runtime_included_in_starter_and_upgrade": true,
        "site_app_download_banner_included_in_starter_and_upgrade": true,
        "site_app_download_banner_default_enabled": false,
        "site_app_download_banner_mcp_read_stage_preview": true,
        "site_studio_mcp_page_add": true,
        "site_studio_mcp_page_remove": true,
        "site_studio_mcp_production_publish": true,
        "site_studio_mcp_blocks": true,
        "site_studio_mcp_responsive_link_cards": true,
        "site_studio_mcp_link_appearance": true,
        "site_studio_mcp_approved_media": true,
        "site_studio_mcp_image_replace": true,
        "site_studio_mcp_effect_apply": true,
        "site_studio_mcp_page_roles": true,
        "site_studio_mcp_pagespeed": true,
        "site_studio_mcp_issues": true,
        "site_studio_mcp_issue_report": true,
        "site_studio_mcp_issue_resolve": true,
        "site_studio_mcp_issue_lifecycle": true,
        "site_studio_mcp_forms": true,
        "site_studio_mcp_galleries": true,
        "site_studio_mcp_protection": true,
        "site_studio_mcp_link_affiliate_tracking": true,
        "site_studio_mcp_social_bar_control": true,
        "site_studio_mcp_header_layouts": true,
        "site_studio_mcp_footer_settings": true,
        "site_studio_mcp_profile_photo_upload": true,
        "site_branded_error_pages": true,
        "project_staging_file_inventory": true,
        "codex_project_file_import": true,
        "web_design_affiliate_program": true,
        "affiliate_lead_attribution": true,
        "affiliate_signup_attribution": true,
        "privacy_controls": [
            "necessary",
            "preferences",
            "analytics",
            "marketing",
            "do_not_sell_share"
        ]
    },
    "management": {
        "crm": true,
        "custom_forms": true,
        "newsletter_subscriptions": true,
        "draggable_form_fields": true,
        "services": true,
        "service_catalog_crud": true,
        "service_catalog_snapshot": true,
        "imported_managed_data_bindings": true,
        "shop": true,
        "restaurant": true,
        "store": true,
        "business": true,
        "web_design": true,
        "web_design_affiliate_program": true,
        "course_education": true,
        "courses": true,
        "search": true,
        "galleries": true,
        "copyright_protection": true,
        "visual_effects": true,
        "email_identity": true,
        "social_inbox": true,
        "business_network_assignment": true,
        "shop_pages": true,
        "locations_page": true,
        "privacy_pages": true,
        "customer_portal": true,
        "customer_accounts": true,
        "viral_content_workflows": true,
        "pos": {
            "status": true,
            "catalog": true,
            "menu-items": true,
            "modifier-groups": true,
            "modifiers": true,
            "payment-options": true,
            "reader-status": true,
            "orders": true,
            "order": true,
            "register": true,
            "loyalty": true,
            "order-items": true,
            "payments": true,
            "registers": true,
            "register-sessions": true,
            "cash-movements": true,
            "loyalty-transactions": true,
            "inventory": true,
            "inventory-events": true,
            "payment-attempts": true,
            "devices": true,
            "kiosks": true,
            "printers": true,
            "tables": true,
            "menu-boards": true,
            "printables": true,
            "printable-presets": true,
            "settings": true,
            "reports": true,
            "deliveries": true,
            "drivers": true,
            "promotions": true,
            "promotion-validate": true,
            "rewards": true,
            "promotion-redemptions": true,
            "reward-redemptions": true,
            "gift-cards": true,
            "gift-card-transactions": true,
            "giveaways": true,
            "giveaway-entries": true,
            "broadcasts": true,
            "subscriptions": true,
            "self-serve-stations": true,
            "self-serve-requests": true,
            "sync-health": true,
            "sync-export": true,
            "social-connections": true,
            "social-inbox": true,
            "order-social-messages": true,
            "ensure": true,
            "category-save": true,
            "item-save": true,
            "modifier-group-save": true,
            "modifier-save": true,
            "item-modifier-groups": true,
            "delete": true,
            "order-create": true,
            "order-status": true,
            "order-item-status": true,
            "register-open": true,
            "register-close": true,
            "register-cash": true,
            "loyalty-save": true,
            "loyalty-adjust": true,
            "inventory-adjust": true,
            "device-save": true,
            "printable-save": true,
            "settings-save": true,
            "delivery-save": true,
            "driver-save": true,
            "driver-status": true,
            "promotion-save": true,
            "reward-save": true,
            "reward-redeem": true,
            "gift-card-issue": true,
            "gift-card-redeem": true,
            "giveaway-save": true,
            "giveaway-enter": true,
            "giveaway-draw": true,
            "broadcast-save": true,
            "subscription-save": true,
            "self-serve-station-save": true,
            "self-serve-request-status": true,
            "sync-config": true,
            "sync": true,
            "sync-import": true,
            "social-link": true,
            "social-reply": true
        }
    },
    "style_sync": {
        "site_brand_tokens": [
            "--ink",
            "--text",
            "--surface",
            "--brand",
            "--primary",
            "--accent",
            "--muted",
            "--line",
            "--focus",
            "--max"
        ],
        "assets": [
            "logo_url",
            "favicon_url",
            "social_image_url",
            "profile_photo_url"
        ],
        "rule": "Use the site palette, logo, typography, spacing, and existing interaction language for duplicated POS/MCP surfaces."
    },
    "endpoints": {
        "mcp": "https://pocketpapi.com/mcp",
        "mcp_client": "pocketpapi-mcp.php",
        "mcp_update": "pocketpapi-mcp-update.php",
        "mcp_upgrade": "pocketpapi-mcp-upgrade.php",
        "version_check": "pocketpapi-version.php",
        "event_bridge": "pocketpapi-event.php",
        "sso": "pocketpapi-sso.php",
        "social": "pocketpapi-social.php",
        "email_identity": "pocketpapi-identity.php",
        "business_network": "pocketpapi-network.php",
        "branding": "pocketpapi-branding.php",
        "pos": "pocketpapi-pos.php",
        "shop_management": "pocketpapi-shop.php",
        "shared_offers": "pocketpapi-offers.php",
        "site_search_page": "https://pocketpapi.com/search.html",
        "site_search_index": "pocketpapi-search-index.json",
        "site_search_preview_router": "sitecommander-search-routing.js",
        "site_search_api": "https://pocketpapi.com/api/control-plane/site-search",
        "site_search_mcp_tool": "sitecommander_site_search",
        "site_theme_css": "pocketpapi-theme.css",
        "site_theme_manifest": "pocketpapi-theme.json",
        "site_theme_api": "https://pocketpapi.com/api/control-plane/site-theme",
        "site_theme_mcp_read_tool": "sitecommander_site_studio_theme",
        "site_theme_mcp_stage_tool": "sitecommander_site_studio_theme_stage",
        "site_theme_mcp_preview_tool": "sitecommander_site_studio_theme_preview",
        "site_theme_mcp_apply_tool": "sitecommander_site_studio_theme_apply",
        "site_public_runtime_api": "https://pocketpapi.com/api/control-plane/site-public-runtime",
        "site_public_runtime_mcp_read_tool": "sitecommander_site_studio_public_runtime",
        "site_public_runtime_mcp_stage_tool": "sitecommander_site_studio_public_runtime_stage",
        "site_public_runtime_mcp_preview_tool": "sitecommander_site_studio_public_runtime_preview",
        "site_public_runtime_preview_page_offset": true,
        "site_public_runtime_preview_page_limit_maximum": 200,
        "site_public_runtime_mcp_apply_tool": "sitecommander_site_studio_public_runtime_apply",
        "site_app_banner_settings": "sitecommander-app-banner.json",
        "site_app_banner_config_version": 2,
        "site_app_banner_default_enabled": false,
        "site_app_banner_layout": "single_row_segmented",
        "site_app_banner_mcp_read_tool": "sitecommander_site_studio_app_banner",
        "site_app_banner_mcp_stage_tool": "sitecommander_site_studio_app_banner_stage",
        "site_app_banner_mcp_preview_tool": "sitecommander_site_studio_app_banner_preview",
        "shop_marketplace_search": "pocketpapi-marketplace-search.php",
        "shop_marketplace_status": "pocketpapi-marketplace-search.php?action=status",
        "store_locations": "pocketpapi-store-locations.php",
        "locations_page": "locations.html",
        "shared_shell_styles": "sitecommander-shell.css",
        "shared_shell_script": "sitecommander-shell.js",
        "galleries": "pocketpapi-gallery.php",
        "services": "pocketpapi-services.php",
        "protection": "pocketpapi-protection.php",
        "forms": "pocketpapi-form-settings.php",
        "help_page": "help",
        "help_api": "pocketpapi-help.php",
        "help_mcp_tool": "sitecommander_help_center",
        "affiliate_program_api": "https://pocketpapi.com/api/control-plane/site-affiliate-program",
        "affiliate_program_mcp_tool": "sitecommander_affiliate_program",
        "team_dashboard_page": "pocketpapi-staff-dashboard.html",
        "customer_portal": "pocketpapi-customer.php",
        "customer_login_page": "login.html",
        "customer_dashboard_page": "dashboard.html",
        "customer_orders_page": "orders.html",
        "customer_profile_page": "profile.html",
        "customer_account_page": "account.html"
    },
    "pos_actions": [
        "status",
        "catalog",
        "menu-items",
        "modifier-groups",
        "modifiers",
        "payment-options",
        "reader-status",
        "orders",
        "order",
        "register",
        "loyalty",
        "order-items",
        "payments",
        "registers",
        "register-sessions",
        "cash-movements",
        "loyalty-transactions",
        "inventory",
        "inventory-events",
        "payment-attempts",
        "devices",
        "kiosks",
        "printers",
        "tables",
        "menu-boards",
        "printables",
        "printable-presets",
        "settings",
        "reports",
        "deliveries",
        "drivers",
        "promotions",
        "promotion-validate",
        "rewards",
        "promotion-redemptions",
        "reward-redemptions",
        "gift-cards",
        "gift-card-transactions",
        "giveaways",
        "giveaway-entries",
        "broadcasts",
        "subscriptions",
        "self-serve-stations",
        "self-serve-requests",
        "sync-health",
        "sync-export",
        "social-connections",
        "social-inbox",
        "order-social-messages",
        "ensure",
        "category-save",
        "item-save",
        "modifier-group-save",
        "modifier-save",
        "item-modifier-groups",
        "delete",
        "order-create",
        "order-status",
        "order-item-status",
        "register-open",
        "register-close",
        "register-cash",
        "loyalty-save",
        "loyalty-adjust",
        "inventory-adjust",
        "device-save",
        "printable-save",
        "settings-save",
        "delivery-save",
        "driver-save",
        "driver-status",
        "promotion-save",
        "reward-save",
        "reward-redeem",
        "gift-card-issue",
        "gift-card-redeem",
        "giveaway-save",
        "giveaway-enter",
        "giveaway-draw",
        "broadcast-save",
        "subscription-save",
        "self-serve-station-save",
        "self-serve-request-status",
        "sync-config",
        "sync",
        "sync-import",
        "social-link",
        "social-reply"
    ],
    "error_pages": {
        "statuses": [
            400,
            401,
            403,
            404,
            419,
            422,
            429,
            500,
            503
        ],
        "files": [
            "error-400.html",
            "error-401.html",
            "error-403.html",
            "error-404.html",
            "error-419.html",
            "error-422.html",
            "error-429.html",
            "error-500.html",
            "error-503.html"
        ],
        "indexing": "noindex,nofollow,noarchive",
        "branding": "Use the generated site name, palette, and local brand mark."
    },
    "intent": [],
    "instructions": [
        "Read this manifest to confirm site scope and available capabilities. For existing-site work, discover pages and roles with sitecommander_site_studio_pages; use sitecommander_site_studio_edit for text, SEO, links, per-section link appearance, social bars, consent-gated newsletter forms, and element actions; use sitecommander_site_studio_block_add, sitecommander_site_studio_media/sitecommander_site_studio_image_replace, and sitecommander_site_studio_effect_apply for visual-editor operations; use page, role, and navigation tools for site structure. Run sitecommander_site_studio_pagespeed only against public pages. A missing or stale managed feature-pack contract does not block these edits or authorize a pack upgrade.",
        "When the owner selects a specific public HTTPS image, sitecommander_site_studio_media_import can verify and save it into this site’s private media library. It requires site.edit, confirm=true, and an idempotency_key; it accepts JPEG, PNG, WebP, or GIF up to 20 MiB and does not change page files. Pass asset_kind=logo only when the owner confirms that the selected asset is the company logo; otherwise use image. Never infer a logo or import site images automatically without owner selection.",
        "Use sitecommander_site_studio_header and sitecommander_site_studio_header_save to read and stage the current, centered-logo, logo-and-menu, or profile-photo header. Menu label and icon are editable. Use sitecommander_site_studio_footer and sitecommander_site_studio_footer_save to manage an existing footer or a social-links plus staff-sign-in footer. Profile photo uploads are bounded JPEG/PNG/WebP data and remain inside the selected site staging change set.",
        "Use Site Studio link-list blocks for Link in Bio destinations. The shared shell renders full-width responsive link cards with keyboard focus states and reduced-motion support. Every labeled public link, including selected social profiles, is added to the Links category in the public search index, staging MCP search, and production MCP/API search. The search page reads the q query parameter on first load.",
        "Site Studio link lists and inserted links support link-level Amazon/eBay IDs and social bar selection; explicit IDs override the selected site Shop connection, then fall back to PocketPapi central Shop. Add sponsored/nofollow and nearby disclosure for affiliate links, and require owner-provided HTTPS social profiles.",
        "For a deterministic no-AI runtime rollout, call sitecommander_mcp_upgrade with confirm=true. It preserves site content, writes only staging, and still requires the reviewed publish step.",
        "The authenticated Codex/Claude repository may be the PocketPapi platform app itself. Treat customer sites as separate authorized resources identified by site_id; do not assume the repository is the customer site.",
        "After OAuth, a direct request to edit an existing connected site authorizes only that requested staging change. Use the matching Site Studio edit, page, role, block, media, effects, or navigation tool with confirm=true for requested writes; inspect the returned preview and ask for separate explicit approval before production publishing. Use update_link_list_appearance with the exact existing section selector and supported link_style when changing a link section display. After approval, call sitecommander_site_studio_publish with the exact site_id, reviewed change_set_id, and confirm=true. The server checks site scope and production deployment rights, verifies each write, and activates the domain only after the production files are ready. Page removal is recoverable in staging and protects Home, sign-in, Terms, and role-assigned pages. Navigation keeps the menu button visible across desktop, tablet, and mobile. Routine edits read and write the selected site’s existing staging root; do not call sitecommander_site_bootstrap, import the local repository, or install the full feature pack.",
        "For an owner-confirmed existing public website, call sitecommander_site_studio_import_url with the exact HTTPS source URL, confirm=true, site_id, and a stable idempotency_key. The tool crawls only the same public hostname, stages the discovered public pages and assets into one revision, returns per-page SEO and form coverage, and never publishes. Do not treat owner forms as functional until their staged behavior is verified. If the bounded crawl reports a missing page, asset, redirect, dynamic route, or limit, keep readiness blocked and report the exact reason.",
        "Use sitecommander_site_stage_files and sitecommander_site_stage_file_chunk only after the owner explicitly asks to import the current local project website. For that separate import, enumerate and stage the complete public webroot/build output and verify the final manifest. Include a supplied terms.html or terms.htm with the site owner’s terms; the server appends the required PocketPapi notice. If no terms page is supplied, the pack adds its themed starter page. Do not run bootstrap for import-only. For full-pack setup, use sitecommander_site_bootstrap and sitecommander_mcp_upgrade only after the owner separately approves that scope.",
        "For PHP website imports, inspect the project instructions and existing export/build scripts first. Render the complete public GET surface into an isolated temporary directory with database writes, mail sends, and other external side effects disabled, using the project exporter when available or a deterministic route render pass when it is not. Stage the complete rendered public pages, route map, assets, SEO files, and PocketPapi form bridge; do not import private admin/install/database handlers or treat PHP warnings as page content. Verify every internal route and asset, unique title/description/canonical/H1, responsive form behavior, required affirmative signup consent, and no PHP/session/database diagnostics in the preview. If dynamic PHP workflows are essential, report the dependencies and do not call the import fully successful until they have a verified compatible implementation.",
        "When importing an existing Codex/Claude project, skip sitecommander_site_bootstrap and stage the complete deployable public-site output in one draft: rendered pages for PHP content sites, or verified runtime files only for applications whose PHP runtime and dependencies are available. After the full manifest is verified, sitecommander_site_stage_files automatically stages the current managed PocketPapi runtime and themed customer sign-in/dashboard/Terms experience into that same draft. It preserves imported public pages and routes, appends the required disclosure to owner-provided terms.html/terms.htm, and leaves .htaccess and canonical schema intact. Check managed_runtime.status=current; retry completion on the same draft if runtime staging fails. Enumerate the full deployable public webroot/build output, including runtime files required by the entrypoint, pages, routes, assets, styles/scripts, SEO files, root entrypoint, and .htaccess. Build frontend source first. Start sitecommander_site_stage_files with no change_set_id; its first batch creates an isolated staging draft. Send later batches of at most 30 files and 4 MiB using the returned change_set_id; continue while status=staging_import_in_progress. For every file over 1 MiB and up to 8 MiB, use sitecommander_site_stage_file_chunk in 512 KiB chunks with a random upload_id and the complete file SHA-256; repeat identical metadata on retries and reuse the same change_set_id. Do not omit oversized files. On the final normal batch, send the complete relative-path manifest with complete_import=true. If the last file was chunked, call sitecommander_site_stage_files with files=[], the existing change_set_id, complete_import=true, and the full manifest. Only status=staging_ready and import_complete=true confirms every path and root entrypoint. Use UTF-8 for text and base64 for binary assets. Never upload environment files, credentials, VCS metadata, caches, dependencies, or private project instructions. A complete project import remains in Site Studio staging after the full manifest, current runtime, project knowledge, layout, and SEO checks pass. Publish only through the exact-revision publisher after separate owner approval and verified project deployment rights. A chunked final file is completed by a files=[] finalization call. If a check fails, keep the revision staged and return the reason.",
        "Social icon links must use profile URLs returned by authorized social tools or URLs the owner provides. Keep icon labels accessible, use the site palette, and stage the placement/style for preview. Never fabricate a profile URL or publish automatically. After separate owner approval, the explicit Site Studio publish tool may publish the reviewed change set.",
        "If the owner requested a project import, do not require a generated pack and do not call sitecommander_site_bootstrap; start sitecommander_site_stage_files directly. For separately approved full-pack work, call sitecommander_site_bootstrap to prepare the compatible app and checklist.",
        "Treat a successful sitecommander_site_bootstrap response as editable only when studio.ready is true. Files live in the project-owned .sitecommander-staging section, are inventoried by the returned change set, and remain separate from production until an authorized reviewed publish.",
        "Discover and use available MCP tools before creating a parallel integration.",
        "Use pocketpapi-mcp.php for server-side JSON-RPC tools/call requests; keep site_id explicit and never expose POCKETPAPI_SITE_TOKEN to browser code.",
        "Keep the public search page, navigation search widget, and pocketpapi-search-index.json current with public site content, including labeled links as a Links result category. Page settings keep site-search inclusion, search-engine robots indexing, and the internal search result title independent. Use sitecommander_site_studio_pages to read these values and sitecommander_site_studio_edit with operation=update_page_settings to change them; protected sign-in pages remain excluded from both indexes. Use sitecommander_site_search or GET /api/control-plane/site-search with an explicit site_id to search published site content or authorized staging content; the browser never receives the MCP token.",
        "Keep project/site scope explicit in every read and write.",
        "Shop search keeps local catalog results and eBay/Amazon marketplace results in one tabbed search surface; use sitecommander_shop_marketplace_search for server-side marketplace lookup and never expose the site token to browser code.",
        "Use sitecommander_shop_locations or the store_locations endpoint for the selected site when rendering locations, ordering choices, or pickup choices. POS/store-location records are the source of truth; do not create a second local location list.",
        "For a reviewed campaign link on this exact site, preserve pp_campaign and pp_attribution through the site contact form and forward them server-side as campaign_attribution to /api/control-plane/events. Keep the site token private, strip the attribution token from event logs/referrer storage, and never identify anonymous visitors.",
        "Use the approved project knowledge, saved site knowledge, and verified domain research gathered by the shared site agent before writing new copy or UI.",
        "Render the public site help center at /help from sitecommander_help_center. Keep published site_help articles site-scoped, and never expose the internal staff knowledge_base or the POCKETPAPI_SITE_TOKEN to browser code.",
        "Use profile_photo_url from sitecommander_site_branding for site-created profile/avatar surfaces when the owner has uploaded one; keep the URL HTTPS and do not copy the image into browser-exposed secrets or replace the site brand mark unless the site design calls for the profile identity.",
        "Create brand-consistent, high-share-potential content when the request is marketing or creative; do not invent claims, engagement numbers, or customer proof.",
        "Render POS surfaces with the site brand tokens and sync operational data through the connected platform; do not create a second unsynchronized catalog or order database.",
        "Ask for confirmation before disconnecting accounts, sending messages, changing inventory, or changing order status.",
        "Use highlighted text plus its URL when requesting a targeted site fix.",
        "Keep customer accounts separate from staff users. Use the generated pocketpapi-customer.php server proxy so the site token and customer session token never enter browser code.",
        "Customer dashboard, orders, and profile data must remain filtered to this exact site and project; use the connected platform as the source of truth instead of adding a site-local customer database.",
        "Every site must include the themed customer login and dashboard plus terms.html. The current managed portal requires accepted_terms on both customer sign-in and registration and keeps the fixed PocketPapi platform/data-processing disclosure in Terms. Site Studio restores that disclosure after edits; protect terms.html and terms.htm from removal. A supplied imported Terms page keeps its owner copy with the PocketPapi disclosure appended. After the updated portal is published, existing customer sessions without the current accepted terms version must return to sign-in; older site runtimes remain compatible until then. After staff SSO, route staff to the PocketPapi Business Hub URL in sitecommander-page-routing.json.",
        "Media Library and MCP/Command Center media uploads preserve the original image/video bytes, dimensions, and encoding. Never resize or transcode a source asset before it is used for social publishing; destination platforms may apply their own delivery encoding.",
        "Use sitecommander_forms and sitecommander_form_save or the Site Studio Forms dialog to edit site-scoped form sections. Field definitions support standard text, contact, numeric, date/time, choice, image, and file inputs; browser-side image optimization and bounded private uploads use the generated event bridge. Keep name/email required, preserve site scope, and never put the bearer token in browser code.",
        "Use sitecommander_affiliate_program to read the enabled tracked website-design and affiliate-signup CTA URLs. Use sitecommander_affiliate_program_save only when the user explicitly chooses the receiving affiliate account; never put a site or MCP bearer in browser code."
    ]
}