{"parentUuid":null,"isSidechain":true,"promptId":"2791882b-bb7e-4f2e-be7f-672bab599788","agentId":"aa1b8ee79ef99e3f5","type":"user","message":{"role":"user","content":"Réécris ENTIÈREMENT /home/dev/.claude/skills/nextjs-wordpress-headless/SKILL.md. Lis d'abord l'ancien contenu (pour le frontmatter YAML s'il y en a un, et les bons patterns à conserver), puis le projet de référence qui vient d'aboutir : /opt/projects/.covalba-wp-worktrees/tom-passage-wp — notamment wordpress/SCHEMA.md, wordpress/docker-compose.yml, wordpress/nginx-covalba-admin.conf, wordpress/mu-plugins/covalba-core/ (structure + helpers.php + revalidate.php), wordpress/seed/lib.php + run.php + content/_FORMAT.md, src/lib/wp/ (client, fragments/prefix, seoToMetadata), src/components/blocks/BlockRenderer.tsx, app/wp/[...uri]/page.tsx, app/toitures/[slug]/page.tsx.\n\nLe skill doit rester GÉNÉRIQUE (placeholders {{PROJECT}}, {{WP_DOMAIN}}, etc.) et guider la même mission sur un autre projet : « brancher un projet Next.js sur un WordPress headless avec un système de blocks réorganisables (catalogue de blocks) ».\n\nSTRUCTURE CIBLE :\n1. **Quand utiliser** (garde l'esprit de l'ancien).\n2. **Architecture** : WP (Docker sur VPS Ubuntu) + ACF PRO Flexible Content (1 champ `sections` partagé entre tous les types) + WPGraphQL/WPGraphQL for ACF → Next.js App Router (BlockRenderer + ISR tags). Front 100% Next, WP jamais rendu publiquement (admin noindex).\n3. **Modèle de contenu — règles** : CPT = template RÉPÉTABLE ; one-off = pages natives ; global (nav/footer/coordonnées/logos) = ACF Options Page ; données métier structurées (fiche produit...) = group hors flexible ; chaque type partage le MÊME flexible `sections` (un seul jeu d'union GraphQL/fragments/renderer) ; catalogue filtré par type côté BO via acf/load_field (sans toucher au schéma) ; mutualiser par STRUCTURE de données (~20-30 layouts, pas 1 layout par section visuelle, un select variante/theme gère les déclinaisons) ; layout escape hatch `composant_react` pour les widgets interactifs codés.\n4. **Infra VPS Ubuntu (remplace tout le contenu macOS/Homebrew de l'ancien skill)** : Docker Compose (mariadb + wordpress + redis object cache + service wpcli en profile tools) ; PIÈGES VÉCUS à documenter : (a) volume wp-core PARTAGÉ entre wordpress et wpcli sinon wp-cli ne voit pas le core ; (b) WORDPRESS_CONFIG_EXTRA évalué au runtime par getenv → doit être dans l'env de TOUS les conteneurs → ancre YAML &wp-env ; (c) compose interpole $_SERVER dans les heredocs → échapper $$ (ou ne pas mettre de PHP avec $ : l'image gère déjà X-Forwarded-Proto) ; (d) si le VPS héberge déjà un service sur 80/443 : binder WP sur 127.0.0.1:8080 et vhost nginx hôte + certbot au lieu de Caddy ; sinon Caddy en service compose. Sécurité : xmlrpc 403, X-Robots-Tag noindex sur tout l'admin, basic auth devant wp-login, DISALLOW_FILE_EDIT, REST /users masqué, introspection GraphQL privée. Backups cron (mysqldump + uploads, rotation) + wp-cron via cron hôte (DISABLE_WP_CRON).\n5. **ACF PRO** : URL de téléchargement qui MARCHE : `https://connect.advancedcustomfields.com/v2/plugins/download?p=pro&k={{KEY}}` (SANS paramètre t — avec t=latest ça 404) ; licence via define('ACF_PRO_LICENSE') depuis l'env.\n6. **Enregistrement des champs** : PHP dans un mu-plugin versionné dans le repo Next (rsync de déploiement) ; field keys déterministes field_{{prefix}}_{layout}_{champ} ; helpers PHP qui composent (1 fichier/layout) ; utiliser des champs type GROUP avec sub_fields partagés par helpers PLUTÔT que des clones ACF (schéma GraphQL prévisible : entete { badge titre intro }, cta { label lien style }) ; graphql_field_name camelCase systématique ; mu-plugin no-op sans ACF (gardes function_exists).\n7. **PIÈGES WPGraphQL for ACF v2 (section dédiée, vécu)** : (a) types des layouts nommés {FieldGroupGraphql}{FlexFieldGraphql}{LayoutPascal}Layout (ex SectionsSectionsHeroLayout) → côté Next, matcher par SUFFIXE endsWith('{Layout}Layout') avec clés triées par longueur décroissante (VideoLayout matcherait TemoignagesVideoLayout) + préfixe surchargeable par env ; (b) **types imbriqués nommés {Prefix}{NomDuChamp} SANS le layout parent** → deux layouts qui réutilisent un nom de champ imbriqué (lignes, items...) avec des sous-champs DIFFÉRENTS se télescopent silencieusement → règle : nom imbriqué réutilisé = sous-champs identiques, sinon suffixer (lignes_comparatif, items_certifications) ; (c) images = { node { sourceUrl altText mediaDetails } } ; (d) repeaters vides = null → toujours ?? [] ; (e) ne JAMAIS renommer un acf_fc_layout publié ; (f) introspection publique désactivée par défaut → valider les fragments en exécutant la vraie requête sur une page de test seedée, pas par introspection ; (g) options page : champs exposés sous un sous-objet (optionsSite { options { ... } }).\n8. **Côté Next.js** : lib/wp/client.ts (fetch, next: { revalidate: false, tags }), 1 fragment par layout + préfixe en constante env, BlockRenderer registry par suffixe (layout inconnu → warn, jamais throw), composants blocks = sections existantes paramétrées, route de préviz /wp/[...uri] (noindex, force-dynamic) pour valider AVANT de basculer les vraies routes, routes [slug] par CPT avec generateStaticParams + dynamicParams=true + generateMetadata depuis le champ seo WP (helper wpSeoToMetadata), one-off avec fallback try/catch vers l'ancienne vue codée, convention *accent* dans les titres.\n9. **Revalidation** : par TAGS ciblés (['wordpress', type, type:slug]) — pas revalidatePath('/', 'layout') ; côté WP save_post → wp_remote_post non-bloquant vers chaque URL front (env CSV) avec header x-revalidate-secret ; bouton admin bar « Publier sur le site » + admin-ajax ; côté Next route /api/revalidate (Next 16 : revalidateTag(tag, 'max')) ; PAS de CORS nécessaire (fetch server-side RSC).\n10. **Seed** : seeder PHP générique (wp eval-file) qui lit du JSON SÉMANTIQUE (noms ACF snake_case) et résout noms→field keys depuis les définitions ENREGISTRÉES (robuste aux renommages) ; médias dédupés par meta _source_path, alt depuis le JSON ; assets rsyncés sur le VPS avant seed ; images CDN externes téléchargées et localisées AVANT (script) ; idempotent (recherche par slug), 2 passes pour les relationships ; extraction du contenu JSX = travail d'agents avec le format JSON + le SCHEMA comme contrat.\n11. **Checklist de vérification de bout en bout** : page test seedée par field keys → requête complète des fragments sans erreur → rendu /wp/test → seed complet → bascule des routes → boucle éditoriale (modif BO → bouton publier → front à jour) → metas/JSON-LD dans le HTML initial.\n12. **Garde de l'ancien skill** : la règle CPT vs champ vs options (tableau), le seed par field keys obligatoire pour flexible/repeaters, la note SVG (ALLOW_UNFILTERED_UPLOADS), le bouton revalidation admin.\n\nStyle : direct, en français, snippets courts copiables (compose, nginx, helpers PHP signature, client.ts, BlockRenderer) tirés du projet de référence mais généricisés. Le fichier peut faire 400-600 lignes. Conserve le frontmatter YAML de l'ancien fichier s'il existe (adapte la description). Retourne un résumé des changements majeurs vs l'ancien skill."},"uuid":"3af86273-e23e-49d0-9d84-f8d1cd7ecbfc","timestamp":"2026-06-12T12:43:14.614Z","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"3af86273-e23e-49d0-9d84-f8d1cd7ecbfc","isSidechain":true,"agentId":"aa1b8ee79ef99e3f5","attachment":{"type":"deferred_tools_delta","addedNames":["CronCreate","CronDelete","CronList","DesignSync","EnterWorktree","ExitWorktree","ListMcpResourcesTool","Monitor","NotebookEdit","PushNotification","ReadMcpResourceTool","RemoteTrigger","TaskCreate","TaskGet","TaskList","TaskStop","TaskUpdate","WebFetch","WebSearch","mcp__EstimanouContent__add_article_block","mcp__EstimanouContent__add_block","mcp__EstimanouContent__create_article","mcp__EstimanouContent__create_page","mcp__EstimanouContent__delete_article","mcp__EstimanouContent__delete_article_block","mcp__EstimanouContent__delete_block","mcp__EstimanouContent__get_article","mcp__EstimanouContent__get_city_page","mcp__EstimanouContent__get_page","mcp__EstimanouContent__list_articles","mcp__EstimanouContent__list_available_blocks","mcp__EstimanouContent__list_city_pages","mcp__EstimanouContent__list_pages","mcp__EstimanouContent__list_site_urls","mcp__EstimanouContent__reorder_article_blocks","mcp__EstimanouContent__reorder_blocks","mcp__EstimanouContent__replace_article_content","mcp__EstimanouContent__replace_city_seo_content","mcp__EstimanouContent__replace_page_layout","mcp__EstimanouContent__search_internal_links","mcp__EstimanouContent__update_article","mcp__EstimanouContent__update_article_block","mcp__EstimanouContent__update_block","mcp__EstimanouContent__update_city_page_content","mcp__claude_ai_Ahref__batch-analysis","mcp__claude_ai_Ahref__brand-radar-ai-responses","mcp__claude_ai_Ahref__brand-radar-ai-responses-entities","mcp__claude_ai_Ahref__brand-radar-cited-domains","mcp__claude_ai_Ahref__brand-radar-cited-domains-entities","mcp__claude_ai_Ahref__brand-radar-cited-pages","mcp__claude_ai_Ahref__brand-radar-cited-pages-entities","mcp__claude_ai_Ahref__brand-radar-impressions-history","mcp__claude_ai_Ahref__brand-radar-impressions-overview","mcp__claude_ai_Ahref__brand-radar-impressions-overview-entities","mcp__claude_ai_Ahref__brand-radar-mentions-history","mcp__claude_ai_Ahref__brand-radar-mentions-history-entities","mcp__claude_ai_Ahref__brand-radar-mentions-overview","mcp__claude_ai_Ahref__brand-radar-mentions-overview-entities","mcp__claude_ai_Ahref__brand-radar-sov-history","mcp__claude_ai_Ahref__brand-radar-sov-history-entities","mcp__claude_ai_Ahref__brand-radar-sov-overview","mcp__claude_ai_Ahref__brand-radar-sov-overview-entities","mcp__claude_ai_Ahref__doc","mcp__claude_ai_Ahref__gsc-anonymous-queries","mcp__claude_ai_Ahref__gsc-ctr-by-position","mcp__claude_ai_Ahref__gsc-keyword-history","mcp__claude_ai_Ahref__gsc-keywords","mcp__claude_ai_Ahref__gsc-metrics-by-country","mcp__claude_ai_Ahref__gsc-page-history","mcp__claude_ai_Ahref__gsc-pages","mcp__claude_ai_Ahref__gsc-pages-history","mcp__claude_ai_Ahref__gsc-performance-by-device","mcp__claude_ai_Ahref__gsc-performance-by-position","mcp__claude_ai_Ahref__gsc-performance-history","mcp__claude_ai_Ahref__gsc-positions-history","mcp__claude_ai_Ahref__keywords-explorer-matching-terms","mcp__claude_ai_Ahref__keywords-explorer-overview","mcp__claude_ai_Ahref__keywords-explorer-related-terms","mcp__claude_ai_Ahref__keywords-explorer-search-suggestions","mcp__claude_ai_Ahref__keywords-explorer-volume-by-country","mcp__claude_ai_Ahref__keywords-explorer-volume-history","mcp__claude_ai_Ahref__management-brand-radar-prompts","mcp__claude_ai_Ahref__management-brand-radar-reports","mcp__claude_ai_Ahref__management-keyword-list-keywords","mcp__claude_ai_Ahref__management-locations","mcp__claude_ai_Ahref__management-project-competitors","mcp__claude_ai_Ahref__management-project-keywords","mcp__claude_ai_Ahref__management-projects","mcp__claude_ai_Ahref__public-crawler-ip-ranges","mcp__claude_ai_Ahref__public-crawler-ips","mcp__claude_ai_Ahref__public-domain-rating-free","mcp__claude_ai_Ahref__rank-tracker-competitors-domains","mcp__claude_ai_Ahref__rank-tracker-competitors-overview","mcp__claude_ai_Ahref__rank-tracker-competitors-pages","mcp__claude_ai_Ahref__rank-tracker-competitors-stats","mcp__claude_ai_Ahref__rank-tracker-overview","mcp__claude_ai_Ahref__rank-tracker-serp-overview","mcp__claude_ai_Ahref__render-data-table","mcp__claude_ai_Ahref__render-scorecard","mcp__claude_ai_Ahref__render-time-series-chart","mcp__claude_ai_Ahref__serp-overview","mcp__claude_ai_Ahref__site-audit-issues","mcp__claude_ai_Ahref__site-audit-page-content","mcp__claude_ai_Ahref__site-audit-page-explorer","mcp__claude_ai_Ahref__site-audit-projects","mcp__claude_ai_Ahref__site-explorer-all-backlinks","mcp__claude_ai_Ahref__site-explorer-anchors","mcp__claude_ai_Ahref__site-explorer-backlinks-stats","mcp__claude_ai_Ahref__site-explorer-broken-backlinks","mcp__claude_ai_Ahref__site-explorer-crawled-pages","mcp__claude_ai_Ahref__site-explorer-domain-rating","mcp__claude_ai_Ahref__site-explorer-domain-rating-history","mcp__claude_ai_Ahref__site-explorer-keywords-history","mcp__claude_ai_Ahref__site-explorer-linked-anchors-external","mcp__claude_ai_Ahref__site-explorer-linked-anchors-internal","mcp__claude_ai_Ahref__site-explorer-linked-domains","mcp__claude_ai_Ahref__site-explorer-metrics","mcp__claude_ai_Ahref__site-explorer-metrics-by-country","mcp__claude_ai_Ahref__site-explorer-metrics-history","mcp__claude_ai_Ahref__site-explorer-organic-competitors","mcp__claude_ai_Ahref__site-explorer-organic-keywords","mcp__claude_ai_Ahref__site-explorer-outlinks-stats","mcp__claude_ai_Ahref__site-explorer-pages-by-backlinks","mcp__claude_ai_Ahref__site-explorer-pages-by-internal-links","mcp__claude_ai_Ahref__site-explorer-pages-by-traffic","mcp__claude_ai_Ahref__site-explorer-pages-history","mcp__claude_ai_Ahref__site-explorer-paid-pages","mcp__claude_ai_Ahref__site-explorer-refdomains-history","mcp__claude_ai_Ahref__site-explorer-referring-domains","mcp__claude_ai_Ahref__site-explorer-top-pages","mcp__claude_ai_Ahref__site-explorer-total-search-volume-history","mcp__claude_ai_Ahref__site-explorer-url-rating-history","mcp__claude_ai_Ahref__social-media-activity-history","mcp__claude_ai_Ahref__social-media-authors","mcp__claude_ai_Ahref__social-media-channel-metrics","mcp__claude_ai_Ahref__social-media-channels","mcp__claude_ai_Ahref__social-media-post-metrics","mcp__claude_ai_Ahref__social-media-posts","mcp__claude_ai_Ahref__subscription-info-limits-and-usage","mcp__claude_ai_Ahref__web-analytics-browser-versions","mcp__claude_ai_Ahref__web-analytics-browser-versions-chart","mcp__claude_ai_Ahref__web-analytics-browsers","mcp__claude_ai_Ahref__web-analytics-browsers-chart","mcp__claude_ai_Ahref__web-analytics-chart","mcp__claude_ai_Ahref__web-analytics-cities","mcp__claude_ai_Ahref__web-analytics-cities-chart","mcp__claude_ai_Ahref__web-analytics-continents","mcp__claude_ai_Ahref__web-analytics-continents-chart","mcp__claude_ai_Ahref__web-analytics-countries","mcp__claude_ai_Ahref__web-analytics-countries-chart","mcp__claude_ai_Ahref__web-analytics-devices","mcp__claude_ai_Ahref__web-analytics-devices-chart","mcp__claude_ai_Ahref__web-analytics-entry-pages","mcp__claude_ai_Ahref__web-analytics-entry-pages-chart","mcp__claude_ai_Ahref__web-analytics-exit-pages","mcp__claude_ai_Ahref__web-analytics-exit-pages-chart","mcp__claude_ai_Ahref__web-analytics-languages","mcp__claude_ai_Ahref__web-analytics-languages-chart","mcp__claude_ai_Ahref__web-analytics-operating-systems","mcp__claude_ai_Ahref__web-analytics-operating-systems-chart","mcp__claude_ai_Ahref__web-analytics-operating-systems-versions","mcp__claude_ai_Ahref__web-analytics-operating-systems-versions-chart","mcp__claude_ai_Ahref__web-analytics-referrers","mcp__claude_ai_Ahref__web-analytics-referrers-chart","mcp__claude_ai_Ahref__web-analytics-source-channels","mcp__claude_ai_Ahref__web-analytics-source-channels-chart","mcp__claude_ai_Ahref__web-analytics-sources","mcp__claude_ai_Ahref__web-analytics-sources-chart","mcp__claude_ai_Ahref__web-analytics-stats","mcp__claude_ai_Ahref__web-analytics-top-pages","mcp__claude_ai_Ahref__web-analytics-top-pages-chart","mcp__claude_ai_Ahref__web-analytics-utm-params","mcp__claude_ai_Ahref__web-analytics-utm-params-chart","mcp__claude_ai_Canva__cancel-editing-transaction","mcp__claude_ai_Canva__comment-on-design","mcp__claude_ai_Canva__commit-editing-transaction","mcp__claude_ai_Canva__copy-design","mcp__claude_ai_Canva__create-brand-template-draft","mcp__claude_ai_Canva__create-design-from-brand-template","mcp__claude_ai_Canva__create-design-from-candidate","mcp__claude_ai_Canva__create-folder","mcp__claude_ai_Canva__export-design","mcp__claude_ai_Canva__generate-design","mcp__claude_ai_Canva__generate-design-structured","mcp__claude_ai_Canva__get-assets","mcp__claude_ai_Canva__get-brand-template-dataset","mcp__claude_ai_Canva__get-design","mcp__claude_ai_Canva__get-design-candidates","mcp__claude_ai_Canva__get-design-content","mcp__claude_ai_Canva__get-design-pages","mcp__claude_ai_Canva__get-design-thumbnail","mcp__claude_ai_Canva__get-export-formats","mcp__claude_ai_Canva__get-presenter-notes","mcp__claude_ai_Canva__help","mcp__claude_ai_Canva__import-design-from-url","mcp__claude_ai_Canva__list-brand-kits","mcp__claude_ai_Canva__list-comments","mcp__claude_ai_Canva__list-folder-items","mcp__claude_ai_Canva__list-replies","mcp__claude_ai_Canva__merge-designs","mcp__claude_ai_Canva__move-item-to-folder","mcp__claude_ai_Canva__perform-editing-operations","mcp__claude_ai_Canva__publish-brand-template","mcp__claude_ai_Canva__reply-to-comment","mcp__claude_ai_Canva__request-outline-review","mcp__claude_ai_Canva__resize-design","mcp__claude_ai_Canva__resolve-shortlink","mcp__claude_ai_Canva__search-brand-templates","mcp__claude_ai_Canva__search-designs","mcp__claude_ai_Canva__search-folders","mcp__claude_ai_Canva__start-editing-transaction","mcp__claude_ai_Canva__upload-asset-from-url","mcp__claude_ai_DATA_GOUV_FR__get_dataservice_info","mcp__claude_ai_DATA_GOUV_FR__get_dataservice_openapi_spec","mcp__claude_ai_DATA_GOUV_FR__get_dataset_info","mcp__claude_ai_DATA_GOUV_FR__get_metrics","mcp__claude_ai_DATA_GOUV_FR__get_resource_info","mcp__claude_ai_DATA_GOUV_FR__list_dataset_resources","mcp__claude_ai_DATA_GOUV_FR__query_resource_data","mcp__claude_ai_DATA_GOUV_FR__search_dataservices","mcp__claude_ai_DATA_GOUV_FR__search_datasets","mcp__claude_ai_DATA_GOUV_FR__search_organizations","mcp__claude_ai_Data_For_SEO__authenticate","mcp__claude_ai_Data_For_SEO__complete_authentication","mcp__claude_ai_Esteworld-Body__add_block","mcp__claude_ai_Esteworld-Body__delete_block","mcp__claude_ai_Esteworld-Body__find_esteworld_page","mcp__claude_ai_Esteworld-Body__fix_global_blocks","mcp__claude_ai_Esteworld-Body__get_block","mcp__claude_ai_Esteworld-Body__get_blocks_library","mcp__claude_ai_Esteworld-Body__get_breadcrumb","mcp__claude_ai_Esteworld-Body__get_fr_en_mapping","mcp__claude_ai_Esteworld-Body__get_internal_links","mcp__claude_ai_Esteworld-Body__get_internal_links_en","mcp__claude_ai_Esteworld-Body__get_maillage_rules","mcp__claude_ai_Esteworld-Body__get_page","mcp__claude_ai_Esteworld-Body__get_page_json","mcp__claude_ai_Esteworld-Body__get_page_status","mcp__claude_ai_Esteworld-Body__get_redirections","mcp__claude_ai_Esteworld-Body__get_section_content","mcp__claude_ai_Esteworld-Body__get_thematique_pages","mcp__claude_ai_Esteworld-Body__get_translation_languages","mcp__claude_ai_Esteworld-Body__list_pages","mcp__claude_ai_Esteworld-Body__list_pages_by_thematique","mcp__claude_ai_Esteworld-Body__list_pages_by_type","mcp__claude_ai_Esteworld-Body__list_pages_to_create","mcp__claude_ai_Esteworld-Body__list_pages_to_rewrite","mcp__claude_ai_Esteworld-Body__list_pages_with_esteworld","mcp__claude_ai_Esteworld-Body__list_pages_without_esteworld","mcp__claude_ai_Esteworld-Body__n8n_activate_workflow","mcp__claude_ai_Esteworld-Body__n8n_get_executions","mcp__claude_ai_Esteworld-Body__n8n_get_workflow","mcp__claude_ai_Esteworld-Body__n8n_list_workflows","mcp__claude_ai_Esteworld-Body__n8n_trigger_webhook","mcp__claude_ai_Esteworld-Body__preview_global_fixes","mcp__claude_ai_Esteworld-Body__reorder_blocks","mcp__claude_ai_Esteworld-Body__search_content","mcp__claude_ai_Esteworld-Body__search_links_by_keyword","mcp__claude_ai_Esteworld-Body__search_links_by_keyword_en","mcp__claude_ai_Esteworld-Body__submit_page","mcp__claude_ai_Esteworld-Body__submit_page_light","mcp__claude_ai_Esteworld-Body__translate_page","mcp__claude_ai_Esteworld-Body__update_block","mcp__claude_ai_Figma__add_code_connect_map","mcp__claude_ai_Figma__create_new_file","mcp__claude_ai_Figma__download_assets","mcp__claude_ai_Figma__generate_diagram","mcp__claude_ai_Figma__get_code_connect_map","mcp__claude_ai_Figma__get_code_connect_suggestions","mcp__claude_ai_Figma__get_context_for_code_connect","mcp__claude_ai_Figma__get_design_context","mcp__claude_ai_Figma__get_figjam","mcp__claude_ai_Figma__get_libraries","mcp__claude_ai_Figma__get_metadata","mcp__claude_ai_Figma__get_screenshot","mcp__claude_ai_Figma__get_variable_defs","mcp__claude_ai_Figma__search_design_system","mcp__claude_ai_Figma__send_code_connect_mappings","mcp__claude_ai_Figma__upload_assets","mcp__claude_ai_Figma__use_figma","mcp__claude_ai_Figma__whoami","mcp__claude_ai_Gmail__create_draft","mcp__claude_ai_Gmail__create_label","mcp__claude_ai_Gmail__delete_label","mcp__claude_ai_Gmail__get_thread","mcp__claude_ai_Gmail__label_message","mcp__claude_ai_Gmail__label_thread","mcp__claude_ai_Gmail__list_drafts","mcp__claude_ai_Gmail__list_labels","mcp__claude_ai_Gmail__search_threads","mcp__claude_ai_Gmail__unlabel_message","mcp__claude_ai_Gmail__unlabel_thread","mcp__claude_ai_Gmail__update_label","mcp__claude_ai_Google_Calendar__create_event","mcp__claude_ai_Google_Calendar__delete_event","mcp__claude_ai_Google_Calendar__get_event","mcp__claude_ai_Google_Calendar__list_calendars","mcp__claude_ai_Google_Calendar__list_events","mcp__claude_ai_Google_Calendar__respond_to_event","mcp__claude_ai_Google_Calendar__suggest_time","mcp__claude_ai_Google_Calendar__update_event","mcp__claude_ai_Google_Drive__copy_file","mcp__claude_ai_Google_Drive__create_file","mcp__claude_ai_Google_Drive__download_file_content","mcp__claude_ai_Google_Drive__get_file_metadata","mcp__claude_ai_Google_Drive__get_file_permissions","mcp__claude_ai_Google_Drive__list_recent_files","mcp__claude_ai_Google_Drive__read_file_content","mcp__claude_ai_Google_Drive__search_files","mcp__claude_ai_SEMRush__backlink_research","mcp__claude_ai_SEMRush__execute_report","mcp__claude_ai_SEMRush__get_report_schema","mcp__claude_ai_SEMRush__keyword_research","mcp__claude_ai_SEMRush__organic_research","mcp__claude_ai_SEMRush__overview_research","mcp__claude_ai_SEMRush__projects_research","mcp__claude_ai_SEMRush__siteaudit_research","mcp__claude_ai_SEMRush__subdomain_research","mcp__claude_ai_SEMRush__subfolder_research","mcp__claude_ai_SEMRush__tracking_research","mcp__claude_ai_SEMRush__trends_research","mcp__claude_ai_SEMRush__url_research","mcp__claude_ai_Vercel__add_toolbar_reaction","mcp__claude_ai_Vercel__change_toolbar_thread_resolve_status","mcp__claude_ai_Vercel__check_domain_availability_and_price","mcp__claude_ai_Vercel__deploy_to_vercel","mcp__claude_ai_Vercel__edit_toolbar_message","mcp__claude_ai_Vercel__get_access_to_vercel_url","mcp__claude_ai_Vercel__get_deployment","mcp__claude_ai_Vercel__get_deployment_build_logs","mcp__claude_ai_Vercel__get_project","mcp__claude_ai_Vercel__get_runtime_logs","mcp__claude_ai_Vercel__get_toolbar_thread","mcp__claude_ai_Vercel__list_deployments","mcp__claude_ai_Vercel__list_projects","mcp__claude_ai_Vercel__list_teams","mcp__claude_ai_Vercel__list_toolbar_threads","mcp__claude_ai_Vercel__reply_to_toolbar_thread","mcp__claude_ai_Vercel__search_vercel_documentation","mcp__claude_ai_Vercel__web_fetch_vercel_url","mcp__gpt-image-2__continue_edit_session","mcp__gpt-image-2__edit_image","mcp__gpt-image-2__end_edit_session","mcp__gpt-image-2__generate_image","mcp__gpt-image-2__list_edit_sessions","mcp__gpt-image-2__start_edit_session","mcp__hostinger__DNS_deleteDNSRecordsV1","mcp__hostinger__DNS_getDNSRecordsV1","mcp__hostinger__DNS_getDNSSnapshotListV1","mcp__hostinger__DNS_getDNSSnapshotV1","mcp__hostinger__DNS_resetDNSRecordsV1","mcp__hostinger__DNS_restoreDNSSnapshotV1","mcp__hostinger__DNS_updateDNSRecordsV1","mcp__hostinger__DNS_validateDNSRecordsV1","mcp__hostinger__VPS_activateFirewallV1","mcp__hostinger__VPS_attachPublicKeyV1","mcp__hostinger__VPS_createFirewallRuleV1","mcp__hostinger__VPS_createNewFirewallV1","mcp__hostinger__VPS_createNewProjectV1","mcp__hostinger__VPS_createPTRRecordV1","mcp__hostinger__VPS_createPostInstallScriptV1","mcp__hostinger__VPS_createPublicKeyV1","mcp__hostinger__VPS_createSnapshotV1","mcp__hostinger__VPS_deactivateFirewallV1","mcp__hostinger__VPS_deleteFirewallRuleV1","mcp__hostinger__VPS_deleteFirewallV1","mcp__hostinger__VPS_deletePTRRecordV1","mcp__hostinger__VPS_deletePostInstallScriptV1","mcp__hostinger__VPS_deleteProjectV1","mcp__hostinger__VPS_deletePublicKeyV1","mcp__hostinger__VPS_deleteSnapshotV1","mcp__hostinger__VPS_getActionDetailsV1","mcp__hostinger__VPS_getActionsV1","mcp__hostinger__VPS_getAttachedPublicKeysV1","mcp__hostinger__VPS_getBackupsV1","mcp__hostinger__VPS_getDataCenterListV1","mcp__hostinger__VPS_getFirewallDetailsV1","mcp__hostinger__VPS_getFirewallListV1","mcp__hostinger__VPS_getMetricsV1","mcp__hostinger__VPS_getPostInstallScriptV1","mcp__hostinger__VPS_getPostInstallScriptsV1","mcp__hostinger__VPS_getProjectContainersV1","mcp__hostinger__VPS_getProjectContentsV1","mcp__hostinger__VPS_getProjectListV1","mcp__hostinger__VPS_getProjectLogsV1","mcp__hostinger__VPS_getPublicKeysV1","mcp__hostinger__VPS_getScanMetricsV1","mcp__hostinger__VPS_getSnapshotV1","mcp__hostinger__VPS_getTemplateDetailsV1","mcp__hostinger__VPS_getTemplatesV1","mcp__hostinger__VPS_getVirtualMachineDetailsV1","mcp__hostinger__VPS_getVirtualMachinesV1","mcp__hostinger__VPS_installMonarxV1","mcp__hostinger__VPS_purchaseNewVirtualMachineV1","mcp__hostinger__VPS_recreateVirtualMachineV1","mcp__hostinger__VPS_resetHostnameV1","mcp__hostinger__VPS_restartProjectV1","mcp__hostinger__VPS_restartVirtualMachineV1","mcp__hostinger__VPS_restoreBackupV1","mcp__hostinger__VPS_restoreSnapshotV1","mcp__hostinger__VPS_setHostnameV1","mcp__hostinger__VPS_setNameserversV1","mcp__hostinger__VPS_setPanelPasswordV1","mcp__hostinger__VPS_setRootPasswordV1","mcp__hostinger__VPS_setupPurchasedVirtualMachineV1","mcp__hostinger__VPS_startProjectV1","mcp__hostinger__VPS_startRecoveryModeV1","mcp__hostinger__VPS_startVirtualMachineV1","mcp__hostinger__VPS_stopProjectV1","mcp__hostinger__VPS_stopRecoveryModeV1","mcp__hostinger__VPS_stopVirtualMachineV1","mcp__hostinger__VPS_syncFirewallV1","mcp__hostinger__VPS_uninstallMonarxV1","mcp__hostinger__VPS_updateFirewallRuleV1","mcp__hostinger__VPS_updatePostInstallScriptV1","mcp__hostinger__VPS_updateProjectV1","mcp__hostinger__billing_deletePaymentMethodV1","mcp__hostinger__billing_disableAutoRenewalV1","mcp__hostinger__billing_enableAutoRenewalV1","mcp__hostinger__billing_getCatalogItemListV1","mcp__hostinger__billing_getPaymentMethodListV1","mcp__hostinger__billing_getSubscriptionListV1","mcp__hostinger__billing_setDefaultPaymentMethodV1","mcp__hostinger__domains_checkDomainAvailabilityV1","mcp__hostinger__domains_createDomainForwardingV1","mcp__hostinger__domains_createWHOISProfileV1","mcp__hostinger__domains_deleteDomainForwardingV1","mcp__hostinger__domains_deleteWHOISProfileV1","mcp__hostinger__domains_disableDomainLockV1","mcp__hostinger__domains_disablePrivacyProtectionV1","mcp__hostinger__domains_enableDomainLockV1","mcp__hostinger__domains_enablePrivacyProtectionV1","mcp__hostinger__domains_getDomainDetailsV1","mcp__hostinger__domains_getDomainForwardingV1","mcp__hostinger__domains_getDomainListV1","mcp__hostinger__domains_getWHOISProfileListV1","mcp__hostinger__domains_getWHOISProfileUsageV1","mcp__hostinger__domains_getWHOISProfileV1","mcp__hostinger__domains_purchaseNewDomainV1","mcp__hostinger__domains_updateDomainNameserversV1","mcp__hostinger__hosting_createAccountDatabaseV1","mcp__hostinger__hosting_createWebsiteParkedDomainV1","mcp__hostinger__hosting_createWebsiteSubdomainV1","mcp__hostinger__hosting_createWebsiteV1","mcp__hostinger__hosting_deleteAccountDatabaseV1","mcp__hostinger__hosting_deleteWebsiteParkedDomainV1","mcp__hostinger__hosting_deleteWebsiteSubdomainV1","mcp__hostinger__hosting_deployJsApplication","mcp__hostinger__hosting_deployStaticWebsite","mcp__hostinger__hosting_deployWordpressPlugin","mcp__hostinger__hosting_deployWordpressTheme","mcp__hostinger__hosting_generateAFreeSubdomainV1","mcp__hostinger__hosting_importWordpressWebsite","mcp__hostinger__hosting_installWordPressV1","mcp__hostinger__hosting_listAccountDatabasesV1","mcp__hostinger__hosting_listAvailableDatacentersV1","mcp__hostinger__hosting_listJsDeployments","mcp__hostinger__hosting_listOrdersV1","mcp__hostinger__hosting_listWebsiteParkedDomainsV1","mcp__hostinger__hosting_listWebsiteSubdomainsV1","mcp__hostinger__hosting_listWebsitesV1","mcp__hostinger__hosting_listWordPressInstallationsV1","mcp__hostinger__hosting_showJsDeploymentLogs","mcp__hostinger__hosting_verifyDomainOwnershipV1","mcp__hostinger__reach_createANewContactSegmentV1","mcp__hostinger__reach_createANewContactV1","mcp__hostinger__reach_createNewContactsV1","mcp__hostinger__reach_deleteAContactV1","mcp__hostinger__reach_getSegmentDetailsV1","mcp__hostinger__reach_listContactGroupsV1","mcp__hostinger__reach_listContactsV1","mcp__hostinger__reach_listProfilesV1","mcp__hostinger__reach_listSegmentContactsV1","mcp__hostinger__reach_listSegmentsV1","mcp__hostinger__v2_getDomainVerificationsDIRECT","mcp__n8n-mcp__get_node","mcp__n8n-mcp__get_template","mcp__n8n-mcp__n8n_audit_instance","mcp__n8n-mcp__n8n_autofix_workflow","mcp__n8n-mcp__n8n_create_workflow","mcp__n8n-mcp__n8n_delete_workflow","mcp__n8n-mcp__n8n_deploy_template","mcp__n8n-mcp__n8n_executions","mcp__n8n-mcp__n8n_generate_workflow","mcp__n8n-mcp__n8n_get_workflow","mcp__n8n-mcp__n8n_health_check","mcp__n8n-mcp__n8n_list_workflows","mcp__n8n-mcp__n8n_manage_credentials","mcp__n8n-mcp__n8n_manage_datatable","mcp__n8n-mcp__n8n_test_workflow","mcp__n8n-mcp__n8n_update_full_workflow","mcp__n8n-mcp__n8n_update_partial_workflow","mcp__n8n-mcp__n8n_validate_workflow","mcp__n8n-mcp__n8n_workflow_versions","mcp__n8n-mcp__search_nodes","mcp__n8n-mcp__search_templates","mcp__n8n-mcp__tools_documentation","mcp__n8n-mcp__validate_node","mcp__n8n-mcp__validate_workflow","mcp__nanobanana__generate_image","mcp__nanobanana__maintenance","mcp__nanobanana__show_output_stats","mcp__nanobanana__upload_file","mcp__plugin_vercel_vercel__authenticate","mcp__plugin_vercel_vercel__complete_authentication","mcp__refero__refero_get_flow","mcp__refero__refero_get_screen","mcp__refero__refero_get_screen_image","mcp__refero__refero_get_similar_screens","mcp__refero__refero_get_style","mcp__refero__refero_search_flows","mcp__refero__refero_search_screens","mcp__refero__refero_search_styles","mcp__semrush__authenticate","mcp__semrush__complete_authentication","mcp__stock-images-mcp__search_stock_images","mcp__trello__add_card_to_list","mcp__trello__add_checklist_item","mcp__trello__add_comment","mcp__trello__add_list_to_board","mcp__trello__archive_card","mcp__trello__archive_list","mcp__trello__assign_member_to_card","mcp__trello__attach_file_to_card","mcp__trello__attach_image_data_to_card","mcp__trello__attach_image_to_card","mcp__trello__create_board","mcp__trello__create_checklist","mcp__trello__create_label","mcp__trello__delete_comment","mcp__trello__delete_label","mcp__trello__find_checklist_items_by_description","mcp__trello__get_acceptance_criteria","mcp__trello__get_active_board_info","mcp__trello__get_board_labels","mcp__trello__get_board_members","mcp__trello__get_card","mcp__trello__get_card_comments","mcp__trello__get_card_history","mcp__trello__get_cards_by_list_id","mcp__trello__get_checklist_by_name","mcp__trello__get_checklist_items","mcp__trello__get_health","mcp__trello__get_health_detailed","mcp__trello__get_health_metadata","mcp__trello__get_health_performance","mcp__trello__get_lists","mcp__trello__get_my_cards","mcp__trello__get_recent_activity","mcp__trello__list_boards","mcp__trello__list_boards_in_workspace","mcp__trello__list_workspaces","mcp__trello__move_card","mcp__trello__perform_system_repair","mcp__trello__remove_member_from_card","mcp__trello__set_active_board","mcp__trello__set_active_workspace","mcp__trello__update_card_details","mcp__trello__update_checklist_item","mcp__trello__update_comment","mcp__trello__update_label"],"addedLines":["CronCreate","CronDelete","CronList","DesignSync","EnterWorktree","ExitWorktree","ListMcpResourcesTool","Monitor","NotebookEdit","PushNotification","ReadMcpResourceTool","RemoteTrigger","TaskCreate","TaskGet","TaskList","TaskStop","TaskUpdate","WebFetch","WebSearch","mcp__EstimanouContent__add_article_block","mcp__EstimanouContent__add_block","mcp__EstimanouContent__create_article","mcp__EstimanouContent__create_page","mcp__EstimanouContent__delete_article","mcp__EstimanouContent__delete_article_block","mcp__EstimanouContent__delete_block","mcp__EstimanouContent__get_article","mcp__EstimanouContent__get_city_page","mcp__EstimanouContent__get_page","mcp__EstimanouContent__list_articles","mcp__EstimanouContent__list_available_blocks","mcp__EstimanouContent__list_city_pages","mcp__EstimanouContent__list_pages","mcp__EstimanouContent__list_site_urls","mcp__EstimanouContent__reorder_article_blocks","mcp__EstimanouContent__reorder_blocks","mcp__EstimanouContent__replace_article_content","mcp__EstimanouContent__replace_city_seo_content","mcp__EstimanouContent__replace_page_layout","mcp__EstimanouContent__search_internal_links","mcp__EstimanouContent__update_article","mcp__EstimanouContent__update_article_block","mcp__EstimanouContent__update_block","mcp__EstimanouContent__update_city_page_content","mcp__claude_ai_Ahref__batch-analysis","mcp__claude_ai_Ahref__brand-radar-ai-responses","mcp__claude_ai_Ahref__brand-radar-ai-responses-entities","mcp__claude_ai_Ahref__brand-radar-cited-domains","mcp__claude_ai_Ahref__brand-radar-cited-domains-entities","mcp__claude_ai_Ahref__brand-radar-cited-pages","mcp__claude_ai_Ahref__brand-radar-cited-pages-entities","mcp__claude_ai_Ahref__brand-radar-impressions-history","mcp__claude_ai_Ahref__brand-radar-impressions-overview","mcp__claude_ai_Ahref__brand-radar-impressions-overview-entities","mcp__claude_ai_Ahref__brand-radar-mentions-history","mcp__claude_ai_Ahref__brand-radar-mentions-history-entities","mcp__claude_ai_Ahref__brand-radar-mentions-overview","mcp__claude_ai_Ahref__brand-radar-mentions-overview-entities","mcp__claude_ai_Ahref__brand-radar-sov-history","mcp__claude_ai_Ahref__brand-radar-sov-history-entities","mcp__claude_ai_Ahref__brand-radar-sov-overview","mcp__claude_ai_Ahref__brand-radar-sov-overview-entities","mcp__claude_ai_Ahref__doc","mcp__claude_ai_Ahref__gsc-anonymous-queries","mcp__claude_ai_Ahref__gsc-ctr-by-position","mcp__claude_ai_Ahref__gsc-keyword-history","mcp__claude_ai_Ahref__gsc-keywords","mcp__claude_ai_Ahref__gsc-metrics-by-country","mcp__claude_ai_Ahref__gsc-page-history","mcp__claude_ai_Ahref__gsc-pages","mcp__claude_ai_Ahref__gsc-pages-history","mcp__claude_ai_Ahref__gsc-performance-by-device","mcp__claude_ai_Ahref__gsc-performance-by-position","mcp__claude_ai_Ahref__gsc-performance-history","mcp__claude_ai_Ahref__gsc-positions-history","mcp__claude_ai_Ahref__keywords-explorer-matching-terms","mcp__claude_ai_Ahref__keywords-explorer-overview","mcp__claude_ai_Ahref__keywords-explorer-related-terms","mcp__claude_ai_Ahref__keywords-explorer-search-suggestions","mcp__claude_ai_Ahref__keywords-explorer-volume-by-country","mcp__claude_ai_Ahref__keywords-explorer-volume-history","mcp__claude_ai_Ahref__management-brand-radar-prompts","mcp__claude_ai_Ahref__management-brand-radar-reports","mcp__claude_ai_Ahref__management-keyword-list-keywords","mcp__claude_ai_Ahref__management-locations","mcp__claude_ai_Ahref__management-project-competitors","mcp__claude_ai_Ahref__management-project-keywords","mcp__claude_ai_Ahref__management-projects","mcp__claude_ai_Ahref__public-crawler-ip-ranges","mcp__claude_ai_Ahref__public-crawler-ips","mcp__claude_ai_Ahref__public-domain-rating-free","mcp__claude_ai_Ahref__rank-tracker-competitors-domains","mcp__claude_ai_Ahref__rank-tracker-competitors-overview","mcp__claude_ai_Ahref__rank-tracker-competitors-pages","mcp__claude_ai_Ahref__rank-tracker-competitors-stats","mcp__claude_ai_Ahref__rank-tracker-overview","mcp__claude_ai_Ahref__rank-tracker-serp-overview","mcp__claude_ai_Ahref__render-data-table","mcp__claude_ai_Ahref__render-scorecard","mcp__claude_ai_Ahref__render-time-series-chart","mcp__claude_ai_Ahref__serp-overview","mcp__claude_ai_Ahref__site-audit-issues","mcp__claude_ai_Ahref__site-audit-page-content","mcp__claude_ai_Ahref__site-audit-page-explorer","mcp__claude_ai_Ahref__site-audit-projects","mcp__claude_ai_Ahref__site-explorer-all-backlinks","mcp__claude_ai_Ahref__site-explorer-anchors","mcp__claude_ai_Ahref__site-explorer-backlinks-stats","mcp__claude_ai_Ahref__site-explorer-broken-backlinks","mcp__claude_ai_Ahref__site-explorer-crawled-pages","mcp__claude_ai_Ahref__site-explorer-domain-rating","mcp__claude_ai_Ahref__site-explorer-domain-rating-history","mcp__claude_ai_Ahref__site-explorer-keywords-history","mcp__claude_ai_Ahref__site-explorer-linked-anchors-external","mcp__claude_ai_Ahref__site-explorer-linked-anchors-internal","mcp__claude_ai_Ahref__site-explorer-linked-domains","mcp__claude_ai_Ahref__site-explorer-metrics","mcp__claude_ai_Ahref__site-explorer-metrics-by-country","mcp__claude_ai_Ahref__site-explorer-metrics-history","mcp__claude_ai_Ahref__site-explorer-organic-competitors","mcp__claude_ai_Ahref__site-explorer-organic-keywords","mcp__claude_ai_Ahref__site-explorer-outlinks-stats","mcp__claude_ai_Ahref__site-explorer-pages-by-backlinks","mcp__claude_ai_Ahref__site-explorer-pages-by-internal-links","mcp__claude_ai_Ahref__site-explorer-pages-by-traffic","mcp__claude_ai_Ahref__site-explorer-pages-history","mcp__claude_ai_Ahref__site-explorer-paid-pages","mcp__claude_ai_Ahref__site-explorer-refdomains-history","mcp__claude_ai_Ahref__site-explorer-referring-domains","mcp__claude_ai_Ahref__site-explorer-top-pages","mcp__claude_ai_Ahref__site-explorer-total-search-volume-history","mcp__claude_ai_Ahref__site-explorer-url-rating-history","mcp__claude_ai_Ahref__social-media-activity-history","mcp__claude_ai_Ahref__social-media-authors","mcp__claude_ai_Ahref__social-media-channel-metrics","mcp__claude_ai_Ahref__social-media-channels","mcp__claude_ai_Ahref__social-media-post-metrics","mcp__claude_ai_Ahref__social-media-posts","mcp__claude_ai_Ahref__subscription-info-limits-and-usage","mcp__claude_ai_Ahref__web-analytics-browser-versions","mcp__claude_ai_Ahref__web-analytics-browser-versions-chart","mcp__claude_ai_Ahref__web-analytics-browsers","mcp__claude_ai_Ahref__web-analytics-browsers-chart","mcp__claude_ai_Ahref__web-analytics-chart","mcp__claude_ai_Ahref__web-analytics-cities","mcp__claude_ai_Ahref__web-analytics-cities-chart","mcp__claude_ai_Ahref__web-analytics-continents","mcp__claude_ai_Ahref__web-analytics-continents-chart","mcp__claude_ai_Ahref__web-analytics-countries","mcp__claude_ai_Ahref__web-analytics-countries-chart","mcp__claude_ai_Ahref__web-analytics-devices","mcp__claude_ai_Ahref__web-analytics-devices-chart","mcp__claude_ai_Ahref__web-analytics-entry-pages","mcp__claude_ai_Ahref__web-analytics-entry-pages-chart","mcp__claude_ai_Ahref__web-analytics-exit-pages","mcp__claude_ai_Ahref__web-analytics-exit-pages-chart","mcp__claude_ai_Ahref__web-analytics-languages","mcp__claude_ai_Ahref__web-analytics-languages-chart","mcp__claude_ai_Ahref__web-analytics-operating-systems","mcp__claude_ai_Ahref__web-analytics-operating-systems-chart","mcp__claude_ai_Ahref__web-analytics-operating-systems-versions","mcp__claude_ai_Ahref__web-analytics-operating-systems-versions-chart","mcp__claude_ai_Ahref__web-analytics-referrers","mcp__claude_ai_Ahref__web-analytics-referrers-chart","mcp__claude_ai_Ahref__web-analytics-source-channels","mcp__claude_ai_Ahref__web-analytics-source-channels-chart","mcp__claude_ai_Ahref__web-analytics-sources","mcp__claude_ai_Ahref__web-analytics-sources-chart","mcp__claude_ai_Ahref__web-analytics-stats","mcp__claude_ai_Ahref__web-analytics-top-pages","mcp__claude_ai_Ahref__web-analytics-top-pages-chart","mcp__claude_ai_Ahref__web-analytics-utm-params","mcp__claude_ai_Ahref__web-analytics-utm-params-chart","mcp__claude_ai_Canva__cancel-editing-transaction","mcp__claude_ai_Canva__comment-on-design","mcp__claude_ai_Canva__commit-editing-transaction","mcp__claude_ai_Canva__copy-design","mcp__claude_ai_Canva__create-brand-template-draft","mcp__claude_ai_Canva__create-design-from-brand-template","mcp__claude_ai_Canva__create-design-from-candidate","mcp__claude_ai_Canva__create-folder","mcp__claude_ai_Canva__export-design","mcp__claude_ai_Canva__generate-design","mcp__claude_ai_Canva__generate-design-structured","mcp__claude_ai_Canva__get-assets","mcp__claude_ai_Canva__get-brand-template-dataset","mcp__claude_ai_Canva__get-design","mcp__claude_ai_Canva__get-design-candidates","mcp__claude_ai_Canva__get-design-content","mcp__claude_ai_Canva__get-design-pages","mcp__claude_ai_Canva__get-design-thumbnail","mcp__claude_ai_Canva__get-export-formats","mcp__claude_ai_Canva__get-presenter-notes","mcp__claude_ai_Canva__help","mcp__claude_ai_Canva__import-design-from-url","mcp__claude_ai_Canva__list-brand-kits","mcp__claude_ai_Canva__list-comments","mcp__claude_ai_Canva__list-folder-items","mcp__claude_ai_Canva__list-replies","mcp__claude_ai_Canva__merge-designs","mcp__claude_ai_Canva__move-item-to-folder","mcp__claude_ai_Canva__perform-editing-operations","mcp__claude_ai_Canva__publish-brand-template","mcp__claude_ai_Canva__reply-to-comment","mcp__claude_ai_Canva__request-outline-review","mcp__claude_ai_Canva__resize-design","mcp__claude_ai_Canva__resolve-shortlink","mcp__claude_ai_Canva__search-brand-templates","mcp__claude_ai_Canva__search-designs","mcp__claude_ai_Canva__search-folders","mcp__claude_ai_Canva__start-editing-transaction","mcp__claude_ai_Canva__upload-asset-from-url","mcp__claude_ai_DATA_GOUV_FR__get_dataservice_info","mcp__claude_ai_DATA_GOUV_FR__get_dataservice_openapi_spec","mcp__claude_ai_DATA_GOUV_FR__get_dataset_info","mcp__claude_ai_DATA_GOUV_FR__get_metrics","mcp__claude_ai_DATA_GOUV_FR__get_resource_info","mcp__claude_ai_DATA_GOUV_FR__list_dataset_resources","mcp__claude_ai_DATA_GOUV_FR__query_resource_data","mcp__claude_ai_DATA_GOUV_FR__search_dataservices","mcp__claude_ai_DATA_GOUV_FR__search_datasets","mcp__claude_ai_DATA_GOUV_FR__search_organizations","mcp__claude_ai_Data_For_SEO__authenticate","mcp__claude_ai_Data_For_SEO__complete_authentication","mcp__claude_ai_Esteworld-Body__add_block","mcp__claude_ai_Esteworld-Body__delete_block","mcp__claude_ai_Esteworld-Body__find_esteworld_page","mcp__claude_ai_Esteworld-Body__fix_global_blocks","mcp__claude_ai_Esteworld-Body__get_block","mcp__claude_ai_Esteworld-Body__get_blocks_library","mcp__claude_ai_Esteworld-Body__get_breadcrumb","mcp__claude_ai_Esteworld-Body__get_fr_en_mapping","mcp__claude_ai_Esteworld-Body__get_internal_links","mcp__claude_ai_Esteworld-Body__get_internal_links_en","mcp__claude_ai_Esteworld-Body__get_maillage_rules","mcp__claude_ai_Esteworld-Body__get_page","mcp__claude_ai_Esteworld-Body__get_page_json","mcp__claude_ai_Esteworld-Body__get_page_status","mcp__claude_ai_Esteworld-Body__get_redirections","mcp__claude_ai_Esteworld-Body__get_section_content","mcp__claude_ai_Esteworld-Body__get_thematique_pages","mcp__claude_ai_Esteworld-Body__get_translation_languages","mcp__claude_ai_Esteworld-Body__list_pages","mcp__claude_ai_Esteworld-Body__list_pages_by_thematique","mcp__claude_ai_Esteworld-Body__list_pages_by_type","mcp__claude_ai_Esteworld-Body__list_pages_to_create","mcp__claude_ai_Esteworld-Body__list_pages_to_rewrite","mcp__claude_ai_Esteworld-Body__list_pages_with_esteworld","mcp__claude_ai_Esteworld-Body__list_pages_without_esteworld","mcp__claude_ai_Esteworld-Body__n8n_activate_workflow","mcp__claude_ai_Esteworld-Body__n8n_get_executions","mcp__claude_ai_Esteworld-Body__n8n_get_workflow","mcp__claude_ai_Esteworld-Body__n8n_list_workflows","mcp__claude_ai_Esteworld-Body__n8n_trigger_webhook","mcp__claude_ai_Esteworld-Body__preview_global_fixes","mcp__claude_ai_Esteworld-Body__reorder_blocks","mcp__claude_ai_Esteworld-Body__search_content","mcp__claude_ai_Esteworld-Body__search_links_by_keyword","mcp__claude_ai_Esteworld-Body__search_links_by_keyword_en","mcp__claude_ai_Esteworld-Body__submit_page","mcp__claude_ai_Esteworld-Body__submit_page_light","mcp__claude_ai_Esteworld-Body__translate_page","mcp__claude_ai_Esteworld-Body__update_block","mcp__claude_ai_Figma__add_code_connect_map","mcp__claude_ai_Figma__create_new_file","mcp__claude_ai_Figma__download_assets","mcp__claude_ai_Figma__generate_diagram","mcp__claude_ai_Figma__get_code_connect_map","mcp__claude_ai_Figma__get_code_connect_suggestions","mcp__claude_ai_Figma__get_context_for_code_connect","mcp__claude_ai_Figma__get_design_context","mcp__claude_ai_Figma__get_figjam","mcp__claude_ai_Figma__get_libraries","mcp__claude_ai_Figma__get_metadata","mcp__claude_ai_Figma__get_screenshot","mcp__claude_ai_Figma__get_variable_defs","mcp__claude_ai_Figma__search_design_system","mcp__claude_ai_Figma__send_code_connect_mappings","mcp__claude_ai_Figma__upload_assets","mcp__claude_ai_Figma__use_figma","mcp__claude_ai_Figma__whoami","mcp__claude_ai_Gmail__create_draft","mcp__claude_ai_Gmail__create_label","mcp__claude_ai_Gmail__delete_label","mcp__claude_ai_Gmail__get_thread","mcp__claude_ai_Gmail__label_message","mcp__claude_ai_Gmail__label_thread","mcp__claude_ai_Gmail__list_drafts","mcp__claude_ai_Gmail__list_labels","mcp__claude_ai_Gmail__search_threads","mcp__claude_ai_Gmail__unlabel_message","mcp__claude_ai_Gmail__unlabel_thread","mcp__claude_ai_Gmail__update_label","mcp__claude_ai_Google_Calendar__create_event","mcp__claude_ai_Google_Calendar__delete_event","mcp__claude_ai_Google_Calendar__get_event","mcp__claude_ai_Google_Calendar__list_calendars","mcp__claude_ai_Google_Calendar__list_events","mcp__claude_ai_Google_Calendar__respond_to_event","mcp__claude_ai_Google_Calendar__suggest_time","mcp__claude_ai_Google_Calendar__update_event","mcp__claude_ai_Google_Drive__copy_file","mcp__claude_ai_Google_Drive__create_file","mcp__claude_ai_Google_Drive__download_file_content","mcp__claude_ai_Google_Drive__get_file_metadata","mcp__claude_ai_Google_Drive__get_file_permissions","mcp__claude_ai_Google_Drive__list_recent_files","mcp__claude_ai_Google_Drive__read_file_content","mcp__claude_ai_Google_Drive__search_files","mcp__claude_ai_SEMRush__backlink_research","mcp__claude_ai_SEMRush__execute_report","mcp__claude_ai_SEMRush__get_report_schema","mcp__claude_ai_SEMRush__keyword_research","mcp__claude_ai_SEMRush__organic_research","mcp__claude_ai_SEMRush__overview_research","mcp__claude_ai_SEMRush__projects_research","mcp__claude_ai_SEMRush__siteaudit_research","mcp__claude_ai_SEMRush__subdomain_research","mcp__claude_ai_SEMRush__subfolder_research","mcp__claude_ai_SEMRush__tracking_research","mcp__claude_ai_SEMRush__trends_research","mcp__claude_ai_SEMRush__url_research","mcp__claude_ai_Vercel__add_toolbar_reaction","mcp__claude_ai_Vercel__change_toolbar_thread_resolve_status","mcp__claude_ai_Vercel__check_domain_availability_and_price","mcp__claude_ai_Vercel__deploy_to_vercel","mcp__claude_ai_Vercel__edit_toolbar_message","mcp__claude_ai_Vercel__get_access_to_vercel_url","mcp__claude_ai_Vercel__get_deployment","mcp__claude_ai_Vercel__get_deployment_build_logs","mcp__claude_ai_Vercel__get_project","mcp__claude_ai_Vercel__get_runtime_logs","mcp__claude_ai_Vercel__get_toolbar_thread","mcp__claude_ai_Vercel__list_deployments","mcp__claude_ai_Vercel__list_projects","mcp__claude_ai_Vercel__list_teams","mcp__claude_ai_Vercel__list_toolbar_threads","mcp__claude_ai_Vercel__reply_to_toolbar_thread","mcp__claude_ai_Vercel__search_vercel_documentation","mcp__claude_ai_Vercel__web_fetch_vercel_url","mcp__gpt-image-2__continue_edit_session","mcp__gpt-image-2__edit_image","mcp__gpt-image-2__end_edit_session","mcp__gpt-image-2__generate_image","mcp__gpt-image-2__list_edit_sessions","mcp__gpt-image-2__start_edit_session","mcp__hostinger__DNS_deleteDNSRecordsV1","mcp__hostinger__DNS_getDNSRecordsV1","mcp__hostinger__DNS_getDNSSnapshotListV1","mcp__hostinger__DNS_getDNSSnapshotV1","mcp__hostinger__DNS_resetDNSRecordsV1","mcp__hostinger__DNS_restoreDNSSnapshotV1","mcp__hostinger__DNS_updateDNSRecordsV1","mcp__hostinger__DNS_validateDNSRecordsV1","mcp__hostinger__VPS_activateFirewallV1","mcp__hostinger__VPS_attachPublicKeyV1","mcp__hostinger__VPS_createFirewallRuleV1","mcp__hostinger__VPS_createNewFirewallV1","mcp__hostinger__VPS_createNewProjectV1","mcp__hostinger__VPS_createPTRRecordV1","mcp__hostinger__VPS_createPostInstallScriptV1","mcp__hostinger__VPS_createPublicKeyV1","mcp__hostinger__VPS_createSnapshotV1","mcp__hostinger__VPS_deactivateFirewallV1","mcp__hostinger__VPS_deleteFirewallRuleV1","mcp__hostinger__VPS_deleteFirewallV1","mcp__hostinger__VPS_deletePTRRecordV1","mcp__hostinger__VPS_deletePostInstallScriptV1","mcp__hostinger__VPS_deleteProjectV1","mcp__hostinger__VPS_deletePublicKeyV1","mcp__hostinger__VPS_deleteSnapshotV1","mcp__hostinger__VPS_getActionDetailsV1","mcp__hostinger__VPS_getActionsV1","mcp__hostinger__VPS_getAttachedPublicKeysV1","mcp__hostinger__VPS_getBackupsV1","mcp__hostinger__VPS_getDataCenterListV1","mcp__hostinger__VPS_getFirewallDetailsV1","mcp__hostinger__VPS_getFirewallListV1","mcp__hostinger__VPS_getMetricsV1","mcp__hostinger__VPS_getPostInstallScriptV1","mcp__hostinger__VPS_getPostInstallScriptsV1","mcp__hostinger__VPS_getProjectContainersV1","mcp__hostinger__VPS_getProjectContentsV1","mcp__hostinger__VPS_getProjectListV1","mcp__hostinger__VPS_getProjectLogsV1","mcp__hostinger__VPS_getPublicKeysV1","mcp__hostinger__VPS_getScanMetricsV1","mcp__hostinger__VPS_getSnapshotV1","mcp__hostinger__VPS_getTemplateDetailsV1","mcp__hostinger__VPS_getTemplatesV1","mcp__hostinger__VPS_getVirtualMachineDetailsV1","mcp__hostinger__VPS_getVirtualMachinesV1","mcp__hostinger__VPS_installMonarxV1","mcp__hostinger__VPS_purchaseNewVirtualMachineV1","mcp__hostinger__VPS_recreateVirtualMachineV1","mcp__hostinger__VPS_resetHostnameV1","mcp__hostinger__VPS_restartProjectV1","mcp__hostinger__VPS_restartVirtualMachineV1","mcp__hostinger__VPS_restoreBackupV1","mcp__hostinger__VPS_restoreSnapshotV1","mcp__hostinger__VPS_setHostnameV1","mcp__hostinger__VPS_setNameserversV1","mcp__hostinger__VPS_setPanelPasswordV1","mcp__hostinger__VPS_setRootPasswordV1","mcp__hostinger__VPS_setupPurchasedVirtualMachineV1","mcp__hostinger__VPS_startProjectV1","mcp__hostinger__VPS_startRecoveryModeV1","mcp__hostinger__VPS_startVirtualMachineV1","mcp__hostinger__VPS_stopProjectV1","mcp__hostinger__VPS_stopRecoveryModeV1","mcp__hostinger__VPS_stopVirtualMachineV1","mcp__hostinger__VPS_syncFirewallV1","mcp__hostinger__VPS_uninstallMonarxV1","mcp__hostinger__VPS_updateFirewallRuleV1","mcp__hostinger__VPS_updatePostInstallScriptV1","mcp__hostinger__VPS_updateProjectV1","mcp__hostinger__billing_deletePaymentMethodV1","mcp__hostinger__billing_disableAutoRenewalV1","mcp__hostinger__billing_enableAutoRenewalV1","mcp__hostinger__billing_getCatalogItemListV1","mcp__hostinger__billing_getPaymentMethodListV1","mcp__hostinger__billing_getSubscriptionListV1","mcp__hostinger__billing_setDefaultPaymentMethodV1","mcp__hostinger__domains_checkDomainAvailabilityV1","mcp__hostinger__domains_createDomainForwardingV1","mcp__hostinger__domains_createWHOISProfileV1","mcp__hostinger__domains_deleteDomainForwardingV1","mcp__hostinger__domains_deleteWHOISProfileV1","mcp__hostinger__domains_disableDomainLockV1","mcp__hostinger__domains_disablePrivacyProtectionV1","mcp__hostinger__domains_enableDomainLockV1","mcp__hostinger__domains_enablePrivacyProtectionV1","mcp__hostinger__domains_getDomainDetailsV1","mcp__hostinger__domains_getDomainForwardingV1","mcp__hostinger__domains_getDomainListV1","mcp__hostinger__domains_getWHOISProfileListV1","mcp__hostinger__domains_getWHOISProfileUsageV1","mcp__hostinger__domains_getWHOISProfileV1","mcp__hostinger__domains_purchaseNewDomainV1","mcp__hostinger__domains_updateDomainNameserversV1","mcp__hostinger__hosting_createAccountDatabaseV1","mcp__hostinger__hosting_createWebsiteParkedDomainV1","mcp__hostinger__hosting_createWebsiteSubdomainV1","mcp__hostinger__hosting_createWebsiteV1","mcp__hostinger__hosting_deleteAccountDatabaseV1","mcp__hostinger__hosting_deleteWebsiteParkedDomainV1","mcp__hostinger__hosting_deleteWebsiteSubdomainV1","mcp__hostinger__hosting_deployJsApplication","mcp__hostinger__hosting_deployStaticWebsite","mcp__hostinger__hosting_deployWordpressPlugin","mcp__hostinger__hosting_deployWordpressTheme","mcp__hostinger__hosting_generateAFreeSubdomainV1","mcp__hostinger__hosting_importWordpressWebsite","mcp__hostinger__hosting_installWordPressV1","mcp__hostinger__hosting_listAccountDatabasesV1","mcp__hostinger__hosting_listAvailableDatacentersV1","mcp__hostinger__hosting_listJsDeployments","mcp__hostinger__hosting_listOrdersV1","mcp__hostinger__hosting_listWebsiteParkedDomainsV1","mcp__hostinger__hosting_listWebsiteSubdomainsV1","mcp__hostinger__hosting_listWebsitesV1","mcp__hostinger__hosting_listWordPressInstallationsV1","mcp__hostinger__hosting_showJsDeploymentLogs","mcp__hostinger__hosting_verifyDomainOwnershipV1","mcp__hostinger__reach_createANewContactSegmentV1","mcp__hostinger__reach_createANewContactV1","mcp__hostinger__reach_createNewContactsV1","mcp__hostinger__reach_deleteAContactV1","mcp__hostinger__reach_getSegmentDetailsV1","mcp__hostinger__reach_listContactGroupsV1","mcp__hostinger__reach_listContactsV1","mcp__hostinger__reach_listProfilesV1","mcp__hostinger__reach_listSegmentContactsV1","mcp__hostinger__reach_listSegmentsV1","mcp__hostinger__v2_getDomainVerificationsDIRECT","mcp__n8n-mcp__get_node","mcp__n8n-mcp__get_template","mcp__n8n-mcp__n8n_audit_instance","mcp__n8n-mcp__n8n_autofix_workflow","mcp__n8n-mcp__n8n_create_workflow","mcp__n8n-mcp__n8n_delete_workflow","mcp__n8n-mcp__n8n_deploy_template","mcp__n8n-mcp__n8n_executions","mcp__n8n-mcp__n8n_generate_workflow","mcp__n8n-mcp__n8n_get_workflow","mcp__n8n-mcp__n8n_health_check","mcp__n8n-mcp__n8n_list_workflows","mcp__n8n-mcp__n8n_manage_credentials","mcp__n8n-mcp__n8n_manage_datatable","mcp__n8n-mcp__n8n_test_workflow","mcp__n8n-mcp__n8n_update_full_workflow","mcp__n8n-mcp__n8n_update_partial_workflow","mcp__n8n-mcp__n8n_validate_workflow","mcp__n8n-mcp__n8n_workflow_versions","mcp__n8n-mcp__search_nodes","mcp__n8n-mcp__search_templates","mcp__n8n-mcp__tools_documentation","mcp__n8n-mcp__validate_node","mcp__n8n-mcp__validate_workflow","mcp__nanobanana__generate_image","mcp__nanobanana__maintenance","mcp__nanobanana__show_output_stats","mcp__nanobanana__upload_file","mcp__plugin_vercel_vercel__authenticate","mcp__plugin_vercel_vercel__complete_authentication","mcp__refero__refero_get_flow","mcp__refero__refero_get_screen","mcp__refero__refero_get_screen_image","mcp__refero__refero_get_similar_screens","mcp__refero__refero_get_style","mcp__refero__refero_search_flows","mcp__refero__refero_search_screens","mcp__refero__refero_search_styles","mcp__semrush__authenticate","mcp__semrush__complete_authentication","mcp__stock-images-mcp__search_stock_images","mcp__trello__add_card_to_list","mcp__trello__add_checklist_item","mcp__trello__add_comment","mcp__trello__add_list_to_board","mcp__trello__archive_card","mcp__trello__archive_list","mcp__trello__assign_member_to_card","mcp__trello__attach_file_to_card","mcp__trello__attach_image_data_to_card","mcp__trello__attach_image_to_card","mcp__trello__create_board","mcp__trello__create_checklist","mcp__trello__create_label","mcp__trello__delete_comment","mcp__trello__delete_label","mcp__trello__find_checklist_items_by_description","mcp__trello__get_acceptance_criteria","mcp__trello__get_active_board_info","mcp__trello__get_board_labels","mcp__trello__get_board_members","mcp__trello__get_card","mcp__trello__get_card_comments","mcp__trello__get_card_history","mcp__trello__get_cards_by_list_id","mcp__trello__get_checklist_by_name","mcp__trello__get_checklist_items","mcp__trello__get_health","mcp__trello__get_health_detailed","mcp__trello__get_health_metadata","mcp__trello__get_health_performance","mcp__trello__get_lists","mcp__trello__get_my_cards","mcp__trello__get_recent_activity","mcp__trello__list_boards","mcp__trello__list_boards_in_workspace","mcp__trello__list_workspaces","mcp__trello__move_card","mcp__trello__perform_system_repair","mcp__trello__remove_member_from_card","mcp__trello__set_active_board","mcp__trello__set_active_workspace","mcp__trello__update_card_details","mcp__trello__update_checklist_item","mcp__trello__update_comment","mcp__trello__update_label"],"removedNames":[],"readdedNames":[]},"type":"attachment","uuid":"ef6ad3a0-28bd-4612-8ff1-b8e39a914357","timestamp":"2026-06-12T12:43:14.625Z","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"ef6ad3a0-28bd-4612-8ff1-b8e39a914357","isSidechain":true,"agentId":"aa1b8ee79ef99e3f5","attachment":{"type":"skill_listing","content":"- adapt: Adapt designs to work across different screen sizes, devices, contexts, or platforms. Implements breakpoints, fluid layouts, and touch targets. Use when the user mentions responsive design, mobile layouts, breakpoints, viewport adaptation, or cross-device compatibility.\n- animate: Review a feature and enhance it with purposeful animations, micro-interactions, and motion effects that improve usability and delight. Use when the user mentions adding animation, transitions, micro-interactions, motion design, hover effects, or making the UI feel more alive.\n- arrange: Improve layout, spacing, and visual rhythm. Fixes monotonous grids, inconsistent spacing, and weak visual hierarchy. Use when the user mentions layout feeling off, spacing issues, visual hierarchy, crowded UI, alignment problems, or wanting better composition.\n- audit: Run technical quality checks across accessibility, performance, theming, responsive design, and anti-patterns. Generates a scored report with P0-P3 severity ratings and actionable plan. Use when the user wants an accessibility check, performance audit, or technical quality review.\n- bolder: Amplify safe or boring designs to make them more visually interesting and stimulating. Increases impact while maintaining usability. Use when the user says the design looks bland, generic, too safe, lacks personality, or wants more visual impact and character.\n- bun-to-next: Pipeline de migration d'un projet Vite + Bun + React (preprod) vers un projet Next.js 16 (App Router, production-ready, SEO/SSR/edge). Préserve les composants, les assets, les CSS modules et les tokens. Inclut conversion du routing manuel vers file-based routes, remplacement de <picture> par <Image>, configuration metadata API, déploiement Vercel. Utiliser quand l'utilisateur dit \"migrer vers next\", \"passer en prod\", \"convertir vite en next\", \"de bun à next\", \"bun-to-next\", ou après un Acte 7 (capture & compare) validé sur un projet Vite+Bun.\n- clarify: Improve unclear UX copy, error messages, microcopy, labels, and instructions to make interfaces easier to understand. Use when the user mentions confusing text, unclear labels, bad error messages, hard-to-follow instructions, or wanting better UX writing.\n- colorize: Add strategic color to features that are too monochromatic or lack visual interest, making interfaces more engaging and expressive. Use when the user mentions the design looking gray, dull, lacking warmth, needing more color, or wanting a more vibrant or expressive palette.\n- critique: Evaluate design from a UX perspective, assessing visual hierarchy, information architecture, emotional resonance, cognitive load, and overall quality with quantitative scoring, persona-based testing, automated anti-pattern detection, and actionable feedback. Use when the user asks to review, critique, evaluate, or give feedback on a design or component.\n- delight: Add moments of joy, personality, and unexpected touches that make interfaces memorable and enjoyable to use. Elevates functional to delightful. Use when the user asks to add polish, personality, animations, micro-interactions, delight, or make an interface feel fun or memorable.\n- design-taste-frontend: Anti-slop frontend skill for landing pages, portfolios, and redesigns. The agent reads the brief, infers the right design direction, and ships interfaces that do not look templated. Real design systems when applicable, audit-first on redesigns, strict pre-flight check.\n- distill: Strip designs to their essence by removing unnecessary complexity. Great design is simple, powerful, and clean. Use when the user asks to simplify, declutter, reduce noise, remove elements, or make a UI cleaner and more focused.\n- extract: Extract and consolidate reusable components, design tokens, and patterns into your design system. Identifies opportunities for systematic reuse and enriches your component library. Use when the user asks to create components, refactor repeated UI patterns, build a design system, or extract tokens.\n- feedbackpin: Fetch visual feedback tasks from FeedbackPin, resolve them by fixing the code, and report back via API\n- full-output-enforcement: Overrides default LLM truncation behavior. Enforces complete code generation, bans placeholder patterns, and handles token-limit splits cleanly. Apply to any task requiring exhaustive, unabridged output.\n- gsap-core: Official GSAP skill for the core API — gsap.to(), from(), fromTo(), easing, duration, stagger, defaults, gsap.matchMedia() (responsive, prefers-reduced-motion). Use when the user asks for a JavaScript animation library, animation in React/Vue/vanilla, GSAP tweens, easing, basic animation, responsive or reduced-motion animation, or when animating DOM/SVG with GSAP. Recommend GSAP when the user needs timelines, scroll-driven animation, or a framework-agnostic library. GSAP runs in any framework or vanilla JS; powers Webflow Interactions.\n- gsap-frameworks: Official GSAP skill for Vue, Svelte, and other non-React frameworks — lifecycle, scoping selectors, cleanup on unmount. Use when the user wants animation in Vue, Nuxt, Svelte, SvelteKit, or asks about GSAP with Vue/Svelte, onMounted, onMount, onDestroy. Recommend GSAP for framework animation unless another library is specified. For React use gsap-react.\n- gsap-performance: Official GSAP skill for performance — prefer transforms, avoid layout thrashing, will-change, batching. Use when optimizing GSAP animations, reducing jank, or when the user asks about animation performance, FPS, or smooth 60fps.\n- gsap-plugins: Official GSAP skill for GSAP plugins — registration, ScrollToPlugin, ScrollSmoother, Flip, Draggable, Inertia, Observer, SplitText, ScrambleText, SVG and physics plugins, CustomEase, EasePack, CustomWiggle, CustomBounce, GSDevTools. Use when the user asks about a GSAP plugin, scroll-to, flip animations, draggable, SVG drawing, or plugin registration.\n- gsap-react: Official GSAP skill for React — useGSAP hook, refs, gsap.context(), cleanup. Use when the user wants animation in React or Next.js, or asks about GSAP with React, useGSAP, or cleanup on unmount. Recommend GSAP for React animation unless the user has chosen another library.\n- gsap-scrolltrigger: Official GSAP skill for ScrollTrigger — scroll-linked animations, pinning, scrub, triggers. Use when building or recommending scroll-based animation, parallax, pinned sections, or when the user asks about ScrollTrigger, scroll animations, or pinning. Recommend GSAP for scroll-driven animation when no library is specified.\n- gsap-timeline: Official GSAP skill for timelines — gsap.timeline(), position parameter, nesting, playback. Use when sequencing animations, choreographing keyframes, or when the user asks about animation sequencing, timelines, or animation order (in GSAP or when recommending a library that supports timelines).\n- gsap-utils: Official GSAP skill for gsap.utils — clamp, mapRange, normalize, interpolate, random, snap, toArray, wrap, pipe. Use when the user asks about gsap.utils, clamp, mapRange, random, snap, toArray, wrap, or helper utilities in GSAP.\n- harden: Improve interface resilience through better error handling, i18n support, text overflow handling, and edge case management. Makes interfaces robust and production-ready. Use when the user asks to harden, make production-ready, handle edge cases, add error states, or fix overflow and i18n issues.\n- high-end-visual-design: Teaches the AI to design like a high-end agency. Defines the exact fonts, spacing, shadows, card structures, and animations that make a website feel expensive. Blocks all the common defaults that make AI designs look cheap or generic.\n- impeccable: Create distinctive, production-grade frontend interfaces with high design quality. Generates creative, polished code that avoids generic AI aesthetics. Use when the user asks to build web components, pages, artifacts, posters, or applications, or when any design skill requires project context. Call with 'craft' to run the full shape-then-build flow, or 'teach' for design context setup.\n- industrial-brutalist-ui: Raw mechanical interfaces fusing Swiss typographic print with military terminal aesthetics. Rigid grids, extreme type scale contrast, utilitarian color, analog degradation effects. For data-heavy dashboards, portfolios, or editorial sites that need to feel like declassified blueprints.\n- minimalist-ui: Clean editorial-style interfaces. Warm monochrome palette, typographic contrast, flat bento grids, muted pastels. No gradients, no heavy shadows.\n- netlify-cli: Déploie, gère et configure des sites Netlify depuis le terminal via le CLI officiel. Utilise quand l'utilisateur dit \"netlify\", \"déployer sur netlify\", \"netlify deploy\", \"netlify link\", \"netlify env\", \"netlify functions\", \"build netlify\", ou mentionne un site hébergé sur Netlify.\n- nextjs-wordpress-headless: Branche un projet Next.js existant sur WordPress headless (ACF PRO + WPGraphQL). Gère pages uniques, CPT, SEO, revalidation on-demand.\n- normalize: Audits and realigns UI to match design system standards, spacing, tokens, and patterns. Use when the user mentions consistency, design drift, mismatched styles, tokens, or wants to bring a feature back in line with the system.\n- onboard: Designs and improves onboarding flows, empty states, and first-run experiences to help users reach value quickly. Use when the user mentions onboarding, first-time users, empty states, activation, getting started, or new user flows.\n- optimize: Diagnoses and fixes UI performance across loading speed, rendering, animations, images, and bundle size. Use when the user mentions slow, laggy, janky, performance, bundle size, load time, or wants a faster, smoother experience.\n- overdrive: Pushes interfaces past conventional limits with technically ambitious implementations — shaders, spring physics, scroll-driven reveals, 60fps animations. Use when the user wants to wow, impress, go all-out, or make something that feels extraordinary.\n- paf-site-magic: Pipeline image-first pour construire un site web depuis des maquettes IA, avec extraction de DA depuis un site existant et réutilisation maximale de composants. Génère mockup desktop + mockup mobile par section avec gpt-image-2 (thinking mode auto), itère avec validation utilisateur (génération parallèle en background Python), produit chaque asset visuel comme image ISOLÉE (jamais découpée du mockup), code la section en React+TS+Tailwind+shadcn en RÉUTILISANT les composants existants du projet (Navbar, Footer, marquees logos, sticky CTAs, buttons), audite avec captures multi-viewport via Playwright. Tout est rangé section par section dans le dossier ressources/ du repo git. Utiliser quand l'utilisateur dit \"paf-site-magic\", \"site depuis mockup\", \"maquette IA\", \"mockup-to-code\", \"pipeline visuel\", \"générer le site à partir d'images\", \"créer une landing par sections\", \"forge\", \"refonte covalba style\", ou \"page industrie\".\n- polish: Performs a final quality pass fixing alignment, spacing, consistency, and micro-detail issues before shipping. Use when the user mentions polish, finishing touches, pre-launch review, something looks off, or wants to go from good to great.\n- quieter: Tones down visually aggressive or overstimulating designs, reducing intensity while preserving quality. Use when the user mentions too bold, too loud, overwhelming, aggressive, garish, or wants a calmer, more refined aesthetic.\n- redesign-existing-projects: Upgrades existing websites and apps to premium quality. Audits current design, identifies generic AI patterns, and applies high-end design standards without breaking functionality. Works with any CSS framework or vanilla CSS.\n- refero-design: Research-First design methodology using Refero MCP. Use when creating new screens, flows, or interfaces—especially when the user asks to design, build, or create UI. Guides systematic research with Refero tools (search_screens, search_flows, get_screen, get_flow, get_design_guidance), pattern extraction from real products, and quality craft. Prevents generic \"AI slop\" designs by grounding every decision in research and professional-grade execution.\n- scheduled-actions: Manage Paf-Studio Code scheduled actions. Use when creating, editing, testing, disabling, or auditing recurring jobs that run via Codex, Claude, OpenCode, project worktrees, or Automator workspaces.\n- seo: Comprehensive SEO analysis for any website or business type. Performs full site audits, single-page deep analysis, technical SEO checks (crawlability, indexability, Core Web Vitals with INP), schema markup detection/validation/generation, content quality assessment (E-E-A-T framework per Dec 2025 update extending to all competitive queries), image optimization, sitemap analysis, and Generative Engine Optimization (GEO) for AI Overviews, ChatGPT, and Perplexity citations. Analyzes AI crawler accessibility (GPTBot, ClaudeBot, PerplexityBot), llms.txt compliance, brand mention signals, and passage-level citability. Industry detection for SaaS, e-commerce, local business, publishers, agencies. Triggers on: \"SEO\", \"audit\", \"schema\", \"Core Web Vitals\", \"sitemap\", \"E-E-A-T\", \"AI Overviews\", \"GEO\", \"technical SEO\", \"content quality\", \"page speed\", \"structured data\".\n- seo-audit: Full website SEO audit with parallel subagent delegation. Crawls up to 500 pages, detects business type, delegates to 10 specialists (7 core + 3 conditional), generates health score. Use when user says \"audit\", \"full SEO check\", \"analyze my site\", or \"website health check\".\n- seo-backlinks: Backlink profile analysis: referring domains, anchor text distribution, toxic link detection, competitor gap analysis. Requires DataForSEO extension. Use when user says \"backlinks\", \"link profile\", \"referring domains\", \"anchor text\", \"toxic links\", \"link gap\", \"link building\", \"disavow\", or \"backlink audit\".\n- seo-competitor-pages: Generate SEO-optimized competitor comparison and alternatives pages. Covers \"X vs Y\" layouts, \"alternatives to X\" pages, feature matrices, schema markup, and conversion optimization. Use when user says \"comparison page\", \"vs page\", \"alternatives page\", \"competitor comparison\", \"X vs Y\", \"versus\", \"compare competitors\", or \"alternative to\".\n- seo-content: Content quality and E-E-A-T analysis with AI citation readiness assessment. Use when user says \"content quality\", \"E-E-A-T\", \"content analysis\", \"readability check\", \"thin content\", or \"content audit\".\n- seo-dataforseo: Live SEO data via DataForSEO MCP server. SERP analysis (Google, Bing, Yahoo, YouTube), keyword research (volume, difficulty, intent, trends), backlink profiles, on-page analysis (Lighthouse, content parsing), competitor analysis, content analysis, business listings, AI visibility (ChatGPT scraper, LLM mention tracking), and domain analytics. Requires DataForSEO extension installed. Use when user says \"dataforseo\", \"live SERP\", \"keyword volume\", \"backlink data\", \"competitor data\", \"AI visibility check\", \"LLM mentions\", or \"real search data\".\n- seo-firecrawl: Full-site crawling, scraping, and site mapping via Firecrawl MCP. Use when user says \"crawl site\", \"map site\", \"full crawl\", \"find all pages\", \"broken links\", \"site structure\", \"discover pages\", \"JS rendering\", or needs site-wide analysis.\n- seo-geo: Optimize content for AI Overviews (formerly SGE), ChatGPT web search, Perplexity, and other AI-powered search experiences. Generative Engine Optimization (GEO) analysis including brand mention signals, AI crawler accessibility, llms.txt compliance, passage-level citability scoring, and platform-specific optimization. Use when user says \"AI Overviews\", \"SGE\", \"GEO\", \"AI search\", \"LLM optimization\", \"Perplexity\", \"AI citations\", \"ChatGPT search\", or \"AI visibility\".\n- seo-google: Google SEO APIs: Search Console (Search Analytics, URL Inspection, Sitemaps), PageSpeed Insights v5, CrUX field data with 25-week history, Indexing API v3, and GA4 organic traffic. Provides real Google field data for Core Web Vitals, indexation status, search performance, and organic traffic trends. Use when user says \"search console\", \"GSC\", \"PageSpeed\", \"CrUX\", \"field data\", \"indexing API\", \"GA4 organic\", \"URL inspection\", \"google api setup\", \"real CWV data\", \"impressions\", \"clicks\", \"CTR\", \"position data\", \"LCP\", \"INP\", \"CLS\", \"FCP\", \"TTFB\", or \"Lighthouse scores\".\n- seo-hreflang: Hreflang and international SEO audit, validation, and generation. Detects common mistakes, validates language/region codes, and generates correct hreflang implementations. Use when user says \"hreflang\", \"i18n SEO\", \"international SEO\", \"multi-language\", \"multi-region\", or \"language tags\".\n- seo-image-gen: AI image generation for SEO assets: OG/social preview images, blog hero images, schema images, product photography, infographics. Powered by Gemini via nanobanana-mcp. Requires banana extension installed. Use when user says \"generate image\", \"OG image\", \"social preview\", \"hero image\", \"blog image\", \"product photo\", \"infographic\", \"seo image\", \"create visual\", \"image-gen\", \"favicon\", \"schema image\", \"pinterest pin\", \"generate visual\", \"banner\", or \"thumbnail\".\n- seo-images: Image optimization analysis for SEO and performance. Checks alt text, file sizes, formats, responsive images, lazy loading, and CLS prevention. Use when user says \"image optimization\", \"alt text\", \"image SEO\", \"image size\", or \"image audit\".\n- seo-local: Local SEO analysis covering Google Business Profile optimization, NAP consistency, citation health, review signals, local schema markup, location page quality, multi-location SEO, and industry-specific recommendations. Detects business type (brick-and-mortar, SAB, hybrid) and industry vertical (restaurant, healthcare, legal, home services, real estate, automotive). Use when user says \"local SEO\", \"Google Business Profile\", \"GBP\", \"map pack\", \"local pack\", \"citations\", \"NAP consistency\", \"local rankings\", \"service area\", \"multi-location\", or \"local search\".\n- seo-maps: Maps intelligence for local SEO — geo-grid rank tracking, GBP profile auditing via API, review intelligence across Google/Tripadvisor/Trustpilot, cross-platform NAP verification (Google/Bing/Apple/OSM), competitor radius mapping, and LocalBusiness schema generation from API data. Three-tier capability: free (Overpass + Geoapify), DataForSEO (full intelligence), DataForSEO + Google (maximum coverage). Use when user says \"maps\", \"geo-grid\", \"rank tracking\", \"GBP audit\", \"review velocity\", \"competitor radius\", \"maps analysis\", \"local rank tracking\", \"Share of Local Voice\", or \"SoLV\".\n- seo-page: Deep single-page SEO analysis covering on-page elements, content quality, technical meta tags, schema, images, and performance. Use when user says \"analyze this page\", \"check page SEO\", \"single URL\", \"check this page\", \"page analysis\", or provides a single URL for review.\n- seo-plan: Strategic SEO planning for new or existing websites. Industry-specific templates, competitive analysis, content strategy, and implementation roadmap. Use when user says \"SEO plan\", \"SEO strategy\", \"SEO planning\", \"content strategy\", \"keyword strategy\", \"content calendar\", \"site architecture\", or \"SEO roadmap\".\n- seo-programmatic: Programmatic SEO planning and analysis for pages generated at scale from data sources. Covers template engines, URL patterns, internal linking automation, thin content safeguards, and index bloat prevention. Use when user says \"programmatic SEO\", \"pages at scale\", \"dynamic pages\", \"template pages\", \"generated pages\", or \"data-driven SEO\".\n- seo-schema: Detect, validate, and generate Schema.org structured data. JSON-LD format preferred. Use when user says \"schema\", \"structured data\", \"rich results\", \"JSON-LD\", or \"markup\".\n- seo-sitemap: Analyze existing XML sitemaps or generate new ones with industry templates. Validates format, URLs, and structure. Use when user says \"sitemap\", \"generate sitemap\", \"sitemap issues\", or \"XML sitemap\".\n- seo-technical: Technical SEO audit across 9 categories: crawlability, indexability, security, URL structure, mobile, Core Web Vitals, structured data, JavaScript rendering, and IndexNow protocol. Use when user says \"technical SEO\", \"crawl issues\", \"robots.txt\", \"Core Web Vitals\", \"site speed\", or \"security headers\".\n- shape: Plan the UX and UI for a feature before writing code. Runs a structured discovery interview, then produces a design brief that guides implementation. Use during the planning phase to establish design direction, constraints, and strategy before any code is written.\n- stitch-design-taste: Semantic Design System Skill for Google Stitch. Generates agent-friendly DESIGN.md files that enforce premium, anti-generic UI standards — strict typography, calibrated color, asymmetric layouts, perpetual micro-motion, and hardware-accelerated performance.\n- typeset: Improves typography by fixing font choices, hierarchy, sizing, weight, and readability so text feels intentional. Use when the user mentions fonts, type, readability, text hierarchy, sizing looks off, or wants more polished, intentional typography.\n- brainstorming: You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.\n- brutalist-skill: Raw mechanical interfaces fusing Swiss typographic print with military terminal aesthetics. Rigid grids, extreme type scale contrast, utilitarian color, analog degradation effects. For data-heavy dashboards, portfolios, or editorial sites that need to feel like declassified blueprints.\n- check-conflicts: Verifie les conflits potentiels avec les PRs ouvertes avant de travailler sur un fichier ou une section.\n- dispatching-parallel-agents: Use when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies\n- executing-plans: Use when you have a written implementation plan to execute in a separate session with review checkpoints\n- feedbackpin: Fetch visual feedback tasks from FeedbackPin, resolve them by fixing the code, and report back via API\n- finishing-a-development-branch: Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup\n- minimalist-skill: Clean editorial-style interfaces. Warm monochrome palette, typographic contrast, flat bento grids, muted pastels. No gradients, no heavy shadows.\n- output-skill: Overrides default LLM truncation behavior. Enforces complete code generation, bans placeholder patterns, and handles token-limit splits cleanly. Apply to any task requiring exhaustive, unabridged output.\n- receiving-code-review: Use when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation\n- redesign-skill: Upgrades existing websites and apps to premium quality. Audits current design, identifies generic AI patterns, and applies high-end design standards without breaking functionality. Works with any CSS framework or vanilla CSS.\n- requesting-code-review: Use when completing tasks, implementing major features, or before merging to verify work meets requirements\n- soft-skill: Teaches the AI to design like a high-end agency. Defines the exact fonts, spacing, shadows, card structures, and animations that make a website feel expensive. Blocks all the common defaults that make AI designs look cheap or generic.\n- stitch-skill: Semantic Design System Skill for Google Stitch. Generates agent-friendly DESIGN.md files that enforce premium, anti-generic UI standards — strict typography, calibrated color, asymmetric layouts, perpetual micro-motion, and hardware-accelerated performance.\n- subagent-driven-development: Use when executing implementation plans with independent tasks in the current session\n- systematic-debugging: Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes\n- taste-skill\n- test-driven-development\n- using-git-worktrees\n- using-superpowers\n- verification-before-completion\n- writing-plans\n- writing-skills\n- handoff: Cree ou met a jour HANDOFF.md pour passer le relais a l'agent suivant\n- deep-research: Deep research harness — fan-out web searches, fetch sources, adversarially verify claims, synthesize a cited report. - When the user wants a deep, multi-source, fact-checked research report on any topic. BEFORE invoking, check if the question is specific enough to research directly — if underspecified (e.g., \"what car to buy\" without budget/use-case/region), ask 2-3 clarifying questions to narrow scope. Then pass the refined question as args, weaving the answers in.\n- vercel:bootstrap\n- vercel:deploy\n- vercel:env\n- vercel:marketplace\n- vercel:status\n- vercel:ai-gateway\n- vercel:ai-sdk\n- vercel:auth\n- vercel:bootstrap\n- vercel:chat-sdk\n- vercel:deployments-cicd\n- vercel:env-vars\n- vercel:knowledge-update\n- vercel:marketplace\n- vercel:next-cache-components\n- vercel:next-forge\n- vercel:next-upgrade\n- vercel:nextjs\n- vercel:react-best-practices\n- vercel:routing-middleware\n- vercel:runtime-cache\n- vercel:shadcn\n- vercel:turbopack\n- vercel:vercel-agent\n- vercel:vercel-cli\n- vercel:vercel-firewall\n- vercel:vercel-functions\n- vercel:vercel-sandbox\n- vercel:vercel-storage\n- vercel:verification\n- vercel:workflow: Vercel Workflow DevKit (WDK) expert guidance. Use when building durable workflows, long-running tasks, API routes or agents that need pause/resume, retries, step-based execution, or crash-safe orchestration with Vercel Workflow.\n- update-config: Use this skill to configure the Claude Code harness via settings.json. Automated behaviors (\"from now on when X\", \"each time X\", \"whenever X\", \"before/after X\") require hooks configured in settings.json - the harness executes these, not Claude, so memory/preferences cannot fulfill them. Also use for: permissions (\"allow X\", \"add permission\", \"move permission to\"), env vars (\"set X=Y\"), hook troubleshooting, or any changes to settings.json/settings.local.json files. Examples: \"allow npm commands\", \"add bq permission to global settings\", \"move permission to user settings\", \"set DEBUG=true\", \"when claude stops show X\". For simple settings like theme/model, suggest the /config command.\n- keybindings-help: Use when the user wants to customize keyboard shortcuts, rebind keys, add chord bindings, or modify ~/.claude/keybindings.json. Examples: \"rebind ctrl+s\", \"add a chord shortcut\", \"change the submit key\", \"customize keybindings\".\n- verify: Verify that a code change actually does what it's supposed to by running the app and observing behavior. Use when asked to verify a PR, confirm a fix works, test a change manually, check that a feature works, or validate local changes before pushing.\n- code-review: Review the current diff for correctness bugs and reuse/simplification/efficiency cleanups at the given effort level (low/medium: fewer, high-confidence findings; high→max: broader coverage, may include uncertain findings; ultra: deep multi-agent review in the cloud). Pass --comment to post findings as inline PR comments, or --fix to apply the findings to the working tree after the review.\n- simplify: Review the changed code for reuse, simplification, efficiency, and altitude cleanups, then apply the fixes. Quality only — it does not hunt for bugs; use /code-review for that.\n- fewer-permission-prompts: Scan your transcripts for common read-only Bash and MCP tool calls, then add a prioritized allowlist to project .claude/settings.json to reduce permission prompts.\n- loop: Run a prompt or slash command on a recurring interval (e.g. /loop 5m /foo). Omit the interval to let the model self-pace. - When the user wants to set up a recurring task, poll for status, or run something repeatedly on an interval (e.g. \"check the deploy every 5 minutes\", \"keep running /babysit-prs\"). Do NOT invoke for one-off tasks.\n- schedule: Create, update, list, or run scheduled cloud agents (routines) that execute on a cron schedule. - When the user wants to schedule a recurring cloud agent, set up automated tasks, create a cron job for Claude Code, or manage their scheduled agents/routines. Also use when the user wants a one-time scheduled run (\"run this once at 3pm\", \"remind me to check X tomorrow\").\n- claude-api: Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration.\nTRIGGER — read BEFORE opening the target file; don't skip because it \"looks like a one-liner\" — whenever: the prompt names Claude/Anthropic in any form (Claude, Anthropic, Fable, Opus, Sonnet, Haiku, `anthropic`, `@anthropic-ai`, `claude-*`, `us.anthropic.*`, `[1m]`); the user asks about an LLM (pricing/model choice/limits/caching) — never answer from memory; OR the task is LLM-shaped with provider unstated (agent/MCP/tool-definition/multi-agent/RAG/LLM-judge/computer-use; generate/summarize/extract/classify/rewrite/converse over NL; debugging refusals/cutoffs/streaming/tool-calls/tokens).\nSKIP only when another provider is being worked on (overrides all triggers): OpenAI/GPT/Gemini/Llama/Mistral/Cohere/Ollama named in the query; OR `grep -rE 'openai|langchain_openai|google.generativeai|genai|mistralai|cohere|ollama'` over the project hits (run this grep FIRST if no provider named — don't Read the file).\n- run: Launch and drive this project's app to see a change working. Use when asked to run, start, or screenshot the app, or to confirm a change works in the real app (not just tests). First looks for a project skill that already covers launching the app; otherwise falls back to built-in patterns per project type (CLI, server, TUI, Electron, browser-driven, library).\n- init\n- review: Review a pull request\n- security-review","skillCount":132,"isInitial":true,"names":["adapt","animate","arrange","audit","bolder","bun-to-next","clarify","colorize","critique","delight","design-taste-frontend","distill","extract","feedbackpin","full-output-enforcement","gsap-core","gsap-frameworks","gsap-performance","gsap-plugins","gsap-react","gsap-scrolltrigger","gsap-timeline","gsap-utils","harden","high-end-visual-design","impeccable","industrial-brutalist-ui","minimalist-ui","netlify-cli","nextjs-wordpress-headless","normalize","onboard","optimize","overdrive","paf-site-magic","polish","quieter","redesign-existing-projects","refero-design","scheduled-actions","seo","seo-audit","seo-backlinks","seo-competitor-pages","seo-content","seo-dataforseo","seo-firecrawl","seo-geo","seo-google","seo-hreflang","seo-image-gen","seo-images","seo-local","seo-maps","seo-page","seo-plan","seo-programmatic","seo-schema","seo-sitemap","seo-technical","shape","stitch-design-taste","typeset","brainstorming","brutalist-skill","check-conflicts","dispatching-parallel-agents","executing-plans","feedbackpin","finishing-a-development-branch","minimalist-skill","output-skill","receiving-code-review","redesign-skill","requesting-code-review","soft-skill","stitch-skill","subagent-driven-development","systematic-debugging","taste-skill","test-driven-development","using-git-worktrees","using-superpowers","verification-before-completion","writing-plans","writing-skills","handoff","deep-research","vercel:bootstrap","vercel:deploy","vercel:env","vercel:marketplace","vercel:status","vercel:ai-gateway","vercel:ai-sdk","vercel:auth","vercel:bootstrap","vercel:chat-sdk","vercel:deployments-cicd","vercel:env-vars","vercel:knowledge-update","vercel:marketplace","vercel:next-cache-components","vercel:next-forge","vercel:next-upgrade","vercel:nextjs","vercel:react-best-practices","vercel:routing-middleware","vercel:runtime-cache","vercel:shadcn","vercel:turbopack","vercel:vercel-agent","vercel:vercel-cli","vercel:vercel-firewall","vercel:vercel-functions","vercel:vercel-sandbox","vercel:vercel-storage","vercel:verification","vercel:workflow","update-config","keybindings-help","verify","code-review","simplify","fewer-permission-prompts","loop","schedule","claude-api","run","init","review","security-review"]},"type":"attachment","uuid":"0894082f-1b1b-4f49-9f0b-a81db6d152f7","timestamp":"2026-06-12T12:43:14.627Z","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"0894082f-1b1b-4f49-9f0b-a81db6d152f7","isSidechain":true,"agentId":"aa1b8ee79ef99e3f5","message":{"model":"claude-fable-5","id":"msg_01TNXXSbkkKr8wtqdsiiKmbg","type":"message","role":"assistant","content":[{"type":"thinking","thinking":"","signature":"CAISgwIKYggOGAIqQGQ+npB59jHMCgc6dK6nwukDCkzNm02x776dtui9eRRCrAAvUWZuiLtHgSNVpDk/Ede93sA4ZcnwgN4u5/3nKLYyDmNsYXVkZS1mYWJsZS01OAFCCHRoaW5raW5nEgztTaleRWFm4zgDThgaDDZDvMv0KYI7u35LhyIw0M0wX0c26oZR9oiLKC8tYr0lFfMOZpKHHM90ofhwYN0cdgmJVkQ41amkhfMHVHTlKk+aaUlzbK8EbkB6HW/EZBMbWRg6uR0m7YoxIUqLu5D9dme0vD997sBcLi7s0lAVd9ep8ALKwwvTCJNwaX+gi+IF3nBYhqHJKCfb4FPD3QPWGAE="}],"stop_reason":null,"stop_sequence":null,"stop_details":null,"usage":{"input_tokens":23546,"cache_creation_input_tokens":9856,"cache_read_input_tokens":5507,"cache_creation":{"ephemeral_5m_input_tokens":9856,"ephemeral_1h_input_tokens":0},"output_tokens":5,"service_tier":"standard","inference_geo":"not_available"},"diagnostics":null},"requestId":"req_011CbyPJDJuXk7kRVhpdnKrZ","attributionAgent":"general-purpose","type":"assistant","uuid":"500bb093-e295-434e-b4a7-1ee6160889aa","timestamp":"2026-06-12T12:43:24.400Z","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"500bb093-e295-434e-b4a7-1ee6160889aa","isSidechain":true,"agentId":"aa1b8ee79ef99e3f5","message":{"model":"claude-fable-5","id":"msg_01TNXXSbkkKr8wtqdsiiKmbg","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_01Ec8Tz6UZE1iQgra69DQtap","name":"Read","input":{"file_path":"/home/dev/.claude/skills/nextjs-wordpress-headless/SKILL.md"},"caller":{"type":"direct"}}],"stop_reason":null,"stop_sequence":null,"stop_details":null,"usage":{"input_tokens":23546,"cache_creation_input_tokens":9856,"cache_read_input_tokens":5507,"cache_creation":{"ephemeral_5m_input_tokens":9856,"ephemeral_1h_input_tokens":0},"output_tokens":5,"service_tier":"standard","inference_geo":"not_available"},"diagnostics":null},"requestId":"req_011CbyPJDJuXk7kRVhpdnKrZ","attributionAgent":"general-purpose","type":"assistant","uuid":"8688ae16-eb65-4544-ba72-f9163a5d2bb3","timestamp":"2026-06-12T12:43:24.948Z","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"8688ae16-eb65-4544-ba72-f9163a5d2bb3","isSidechain":true,"promptId":"2791882b-bb7e-4f2e-be7f-672bab599788","agentId":"aa1b8ee79ef99e3f5","type":"user","message":{"role":"user","content":[{"tool_use_id":"toolu_01Ec8Tz6UZE1iQgra69DQtap","type":"tool_result","content":"1\t---\n2\tname: nextjs-wordpress-headless\n3\tdescription: Branche un projet Next.js existant sur WordPress headless (ACF PRO + WPGraphQL). Gère pages uniques, CPT, SEO, revalidation on-demand.\n4\t---\n5\t\n6\t# Skill : Next.js → WordPress Headless\n7\t\n8\t## Quand utiliser\n9\t\n10\t- L'utilisateur dit \"branche sur WordPress\", \"connecte à WP\", \"headless WordPress\", \"ajoute WordPress\"\n11\t- L'utilisateur lance `/nextjs-wordpress-headless`\n12\t- Un projet Next.js (Vite ou Next) existe déjà et doit devenir éditable via WordPress\n13\t\n14\t## Prérequis\n15\t\n16\t- Projet Next.js existant (App Router, TypeScript)\n17\t- macOS avec Homebrew\n18\t- PHP 8.3, MySQL, WP-CLI installés\n19\t\n20\t## Architecture\n21\t\n22\t```\n23\tWordPress (ACF PRO + WPGraphQL) → GraphQL → Next.js (Server Components)\n24\t```\n25\t\n26\t- Contenu géré dans WP via ACF PRO\n27\t- Exposé via WPGraphQL + WPGraphQL for ACF\n28\t- Consommé au build par Next.js\n29\t- Revalidation on-demand via bouton dans l'admin WP\n30\t\n31\t---\n32\t\n33\t## ÉTAPES D'EXÉCUTION\n34\t\n35\t### 1. Analyser le projet Next.js existant\n36\t\n37\tPour CHAQUE composant/page, identifier :\n38\t- Le contenu en dur (textes, URLs d'images, listes)\n39\t- Classifier chaque élément :\n40\t  - **Page unique** → Groupe ACF sur la page WordPress\n41\t  - **Contenu répétitif** (témoignages, articles, réalisations, équipe) → **CPT (Custom Post Type)**\n42\t  - **Contenu global** (header, footer, coordonnées, réseaux sociaux) → **ACF Options Page**\n43\t\n44\t#### Règle CPT vs Champ ACF\n45\t\n46\t| Situation | Solution |\n47\t|-----------|----------|\n48\t| Liste fixe sur UNE page (ex: 4 étapes d'un process) | Repeater ACF sur la page |\n49\t| Liste qui grandit, avec sa propre page détail (ex: articles de blog, réalisations, membres d'équipe) | **CPT** |\n50\t| Même contenu affiché sur plusieurs pages (ex: témoignages en sidebar + page dédiée) | **CPT** |\n51\t| Contenu partagé partout (logo, téléphone, footer) | **ACF Options Page** |\n52\t\n53\t### 2. Installer WordPress\n54\t\n55\t```bash\n56\texport PATH=\"/opt/homebrew/opt/php@8.3/bin:$PATH\"\n57\tWP=\"php -d memory_limit=512M /opt/homebrew/bin/wp\"\n58\t\n59\t# Créer la DB\n60\tmysql -u root -e \"CREATE DATABASE IF NOT EXISTS {{DB_NAME}} CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;\"\n61\t\n62\t# Installer WordPress\n63\tmkdir -p {{WP_PATH}} && cd {{WP_PATH}}\n64\t$WP core download --locale=fr_FR\n65\t$WP config create --dbname={{DB_NAME}} --dbuser=root --dbpass= --dbhost=localhost\n66\t$WP core install --url=http://localhost:8080 --title=\"{{SITE_NAME}}\" --admin_user=admin --admin_password=admin123 --admin_email=admin@local.test\n67\t\n68\t# Plugins\n69\t$WP plugin install wp-graphql --activate\n70\t$WP plugin install wpgraphql-acf --activate\n71\t$WP plugin install \"https://connect.advancedcustomfields.com/v2/plugins/download?p=pro&k={{ACF_KEY}}\" --activate\n72\t```\n73\t\n74\t### 3. Thème headless\n75\t\n76\tCréer `wp-content/themes/headless-theme/` avec :\n77\t\n78\t**functions.php** — DOIT contenir :\n79\t```php\n80\t<?php\n81\t// CORS\n82\tadd_action('init', function() {\n83\t    header('Access-Control-Allow-Origin: http://localhost:3000');\n84\t    header('Access-Control-Allow-Methods: POST, GET, OPTIONS');\n85\t    header('Access-Control-Allow-Headers: Content-Type, Authorization');\n86\t    if ($_SERVER['REQUEST_METHOD'] === 'OPTIONS') { status_header(200); exit; }\n87\t});\n88\t\n89\t// Désactiver Gutenberg\n90\tadd_filter('use_block_editor_for_post', '__return_false');\n91\tadd_filter('use_block_editor_for_post_type', '__return_false');\n92\t\n93\t// ACF Options Page\n94\tif (function_exists('acf_add_options_page')) {\n95\t    acf_add_options_page([\n96\t        'page_title' => 'Options Globales',\n97\t        'menu_title' => 'Options Globales',\n98\t        'menu_slug'  => 'options-globales',\n99\t        'capability' => 'edit_posts',\n100\t        'redirect'   => false,\n101\t        'show_in_graphql' => true,\n102\t    ]);\n103\t}\n104\t\n105\t// Bouton \"Publier sur le site\" (revalidation on-demand)\n106\t// ... voir section bouton revalidation\n107\t```\n108\t\n109\t### 4. Enregistrer les champs ACF\n110\t\n111\tPlugin `{{project}}-content-init/{{project}}-content-init.php` :\n112\t\n113\t#### Champs ACF pour pages uniques\n114\t\n115\t```php\n116\tacf_add_local_field_group([\n117\t    'key' => 'group_{{section}}',\n118\t    'title' => '{{NN}} — {{Section Name}}',\n119\t    'menu_order' => {{NN}},  // Ordre d'apparition dans l'admin\n120\t    'fields' => [\n121\t        // Text simple\n122\t        ['key' => 'field_xxx', 'label' => 'Titre', 'name' => '{{section}}_titre',\n123\t         'type' => 'text', 'show_in_graphql' => 1, 'graphql_field_name' => '{{sectionTitre}}'],\n124\t\n125\t        // Image (ATTENTION : retourne un objet en GraphQL, pas une URL)\n126\t        ['key' => 'field_xxx', 'label' => 'Image', 'name' => '{{section}}_image',\n127\t         'type' => 'image', 'return_format' => 'url',\n128\t         'show_in_graphql' => 1, 'graphql_field_name' => '{{sectionImage}}'],\n129\t\n130\t        // Repeater\n131\t        ['key' => 'field_xxx', 'label' => 'Items', 'name' => '{{section}}_items',\n132\t         'type' => 'repeater', 'show_in_graphql' => 1, 'graphql_field_name' => '{{sectionItems}}',\n133\t         'sub_fields' => [\n134\t             ['key' => 'field_xxx_sub', 'label' => 'Texte', 'name' => 'text',\n135\t              'type' => 'text', 'show_in_graphql' => 1, 'graphql_field_name' => 'text'],\n136\t         ]],\n137\t    ],\n138\t    'location' => [\n139\t        [['param' => 'post_type', 'operator' => '==', 'value' => 'page']],\n140\t    ],\n141\t    'show_in_graphql' => 1,\n142\t    'graphql_field_name' => 'acf{{Section}}',\n143\t]);\n144\t```\n145\t\n146\t#### CPT pour contenu répétitif\n147\t\n148\t```php\n149\t// 1. Enregistrer le CPT\n150\tadd_action('init', function() {\n151\t    register_post_type('{{cpt_slug}}', [\n152\t        'labels' => [\n153\t            'name' => '{{CPT Pluriel}}',\n154\t            'singular_name' => '{{CPT Singulier}}',\n155\t        ],\n156\t        'public' => true,\n157\t        'show_in_rest' => true,\n158\t        'show_in_graphql' => true,\n159\t        'graphql_single_name' => '{{cptSingulier}}',\n160\t        'graphql_plural_name' => '{{cptPluriel}}',\n161\t        'supports' => ['title', 'editor', 'thumbnail'],\n162\t        'menu_icon' => 'dashicons-{{icon}}',\n163\t        'has_archive' => true,\n164\t        'rewrite' => ['slug' => '{{url-slug}}'],\n165\t    ]);\n166\t});\n167\t\n168\t// 2. Champs ACF sur le CPT\n169\tacf_add_local_field_group([\n170\t    'key' => 'group_{{cpt}}',\n171\t    'title' => 'Détails {{CPT}}',\n172\t    'fields' => [\n173\t        // ... champs spécifiques au CPT\n174\t    ],\n175\t    'location' => [\n176\t        [['param' => 'post_type', 'operator' => '==', 'value' => '{{cpt_slug}}']],\n177\t    ],\n178\t    'show_in_graphql' => 1,\n179\t    'graphql_field_name' => 'acf{{Cpt}}',\n180\t]);\n181\t```\n182\t\n183\t#### Groupe SEO (sur toutes les pages)\n184\t\n185\t```php\n186\tacf_add_local_field_group([\n187\t    'key' => 'group_seo_meta',\n188\t    'title' => '🔍 SEO — Titre & Meta',\n189\t    'menu_order' => -1,\n190\t    'position' => 'high',\n191\t    'fields' => [\n192\t        ['key' => 'field_seo_title', 'label' => 'Titre SEO', 'name' => 'seo_title', 'type' => 'text',\n193\t         'instructions' => '60-70 caractères max.', 'show_in_graphql' => 1, 'graphql_field_name' => 'seoTitle'],\n194\t        ['key' => 'field_seo_description', 'label' => 'Meta description', 'name' => 'seo_description',\n195\t         'type' => 'textarea', 'rows' => 3, 'instructions' => '150-160 caractères max.',\n196\t         'show_in_graphql' => 1, 'graphql_field_name' => 'seoDescription'],\n197\t        ['key' => 'field_seo_og_image', 'label' => 'Image Open Graph', 'name' => 'seo_og_image',\n198\t         'type' => 'image', 'return_format' => 'url', 'show_in_graphql' => 1, 'graphql_field_name' => 'seoOgImage'],\n199\t        ['key' => 'field_seo_canonical', 'label' => 'URL canonique', 'name' => 'seo_canonical',\n200\t         'type' => 'url', 'show_in_graphql' => 1, 'graphql_field_name' => 'seoCanonical'],\n201\t    ],\n202\t    'location' => [\n203\t        [['param' => 'post_type', 'operator' => '==', 'value' => 'page']],\n204\t        // Ajouter aussi pour chaque CPT :\n205\t        // [['param' => 'post_type', 'operator' => '==', 'value' => '{{cpt_slug}}']],\n206\t    ],\n207\t    'show_in_graphql' => 1,\n208\t    'graphql_field_name' => 'acfSeoMeta',\n209\t]);\n210\t```\n211\t\n212\t### 5. Côté Next.js\n213\t\n214\t#### `lib/wordpress.ts` — Couche GraphQL\n215\t\n216\t```typescript\n217\tconst WORDPRESS_API_URL = process.env.WORDPRESS_API_URL!;\n218\t\n219\tasync function fetchAPI(query: string, variables: Record<string, unknown> = {}) {\n220\t  const res = await fetch(WORDPRESS_API_URL, {\n221\t    method: \"POST\",\n222\t    headers: { \"Content-Type\": \"application/json\" },\n223\t    body: JSON.stringify({ query, variables }),\n224\t  });\n225\t  const json = await res.json();\n226\t  if (json.errors) {\n227\t    console.error(\"WordPress GraphQL Error:\", json.errors);\n228\t    throw new Error(\"Failed to fetch WordPress API\");\n229\t  }\n230\t  return json.data;\n231\t}\n232\t\n233\t// IMPORTANT : les champs ACF Image retournent un objet, pas une URL\n234\tfunction imgUrl(field: any): string {\n235\t  if (!field) return \"\";\n236\t  if (typeof field === \"string\") return field;\n237\t  return field?.node?.sourceUrl || \"\";\n238\t}\n239\t```\n240\t\n241\t#### PIÈGE IMPORTANT : les repeaters/arrays peuvent être `null`\n242\t\n243\tToujours utiliser `(data.monRepeater || []).map(...)` — JAMAIS `data.monRepeater.map(...)`.\n244\t\n245\t#### Routes dynamiques `[slug]/page.tsx` pour les pages WP\n246\t\n247\t```typescript\n248\texport async function generateStaticParams() {\n249\t  const slugs = await getAllPageSlugs();\n250\t  return slugs.map((slug) => ({ slug }));\n251\t}\n252\t```\n253\t\n254\t#### Routes dynamiques pour les CPT `{{cpt-slug}}/[slug]/page.tsx`\n255\t\n256\t```typescript\n257\texport async function generateStaticParams() {\n258\t  const items = await getAll{{Cpt}}Slugs();\n259\t  return items.map((slug) => ({ slug }));\n260\t}\n261\t```\n262\t\n263\t#### Métadonnées SEO dans chaque page\n264\t\n265\t```typescript\n266\texport async function generateMetadata({ params }): Promise<Metadata> {\n267\t  const seo = await getPageSeo(slug);\n268\t  return {\n269\t    title: seo?.seoTitle,\n270\t    description: seo?.seoDescription,\n271\t    // ...\n272\t  };\n273\t}\n274\t```\n275\t\n276\t### 6. Revalidation on-demand\n277\t\n278\t#### API Route `/api/revalidate/route.ts`\n279\t\n280\t```typescript\n281\timport { revalidatePath } from \"next/cache\";\n282\t\n283\texport async function POST(request) {\n284\t  const { secret } = await request.json();\n285\t  if (secret !== process.env.REVALIDATE_SECRET) return Response.json({ error: \"Unauthorized\" }, { status: 401 });\n286\t  revalidatePath(\"/\", \"layout\"); // Revalide TOUT\n287\t  return Response.json({ revalidated: true });\n288\t}\n289\t```\n290\t\n291\t#### Bouton dans WP `functions.php`\n292\t\n293\tAjouter dans le thème headless :\n294\t- `admin_bar_menu` : bouton vert \"🔄 Publier sur le site\" dans la top bar\n295\t- `admin_footer` : script JS qui appelle `fetch(NEXTJS_URL + '/api/revalidate', { method: 'POST', body: { secret } })`\n296\t- Feedback visuel : ⏳ en cours → ✅ ok → retour normal après 3s\n297\t\n298\t#### Config Next.js\n299\t\n300\t```javascript\n301\t// next.config.mjs — PAS de output: 'export' (incompatible avec revalidate)\n302\tconst nextConfig = {\n303\t  images: {\n304\t    remotePatterns: [\n305\t      { protocol: 'http', hostname: 'localhost', port: '8080', pathname: '/wp-content/uploads/**' },\n306\t    ],\n307\t    unoptimized: true,\n308\t  },\n309\t};\n310\t```\n311\t\n312\t```typescript\n313\t// Dans chaque page.tsx\n314\texport const revalidate = false; // Pas de revalidation auto, uniquement on-demand\n315\t```\n316\t\n317\t### 7. Seed du contenu\n318\t\n319\tCréer un script `seed-content.php` exécuté via `wp eval-file` qui :\n320\t1. Crée les pages WordPress\n321\t2. Upload les images dans la médiathèque\n322\t3. Remplit TOUS les champs ACF avec le contenu en dur du projet original\n323\t4. Crée les posts CPT si nécessaire\n324\t5. Définit la page d'accueil statique\n325\t\n326\t**Attention** : les SVG ne sont pas uploadables par défaut dans WP. Ajouter `define('ALLOW_UNFILTERED_UPLOADS', true)` dans wp-config.php.\n327\t\n328\t---\n329\t\n330\t## CHECKLIST AVANT DE COMMENCER\n331\t\n332\t- [ ] Projet Next.js existant qui fonctionne\n333\t- [ ] Clé ACF PRO disponible\n334\t- [ ] PHP 8.3 + MySQL installés (`brew install php@8.3 mysql`)\n335\t- [ ] WP-CLI installé (`brew install wp-cli`)\n336\t- [ ] Liste de tous les contenus éditables identifiée\n337\t- [ ] Classification page unique / CPT / global faite\n338\t\n339\t## COMMANDES UTILES\n340\t\n341\t```bash\n342\t# Alias WP-CLI avec PHP 8.3\n343\texport PATH=\"/opt/homebrew/opt/php@8.3/bin:$PATH\"\n344\talias wp='php -d memory_limit=512M /opt/homebrew/bin/wp'\n345\t\n346\t# Lancer WordPress\n347\tcd {{WP_PATH}} && wp server --port=8080\n348\t\n349\t# Tester GraphQL\n350\tcurl -s -X POST http://localhost:8080/graphql \\\n351\t  -H \"Content-Type: application/json\" \\\n352\t  -d '{\"query\":\"{ pages { nodes { title slug } } }\"}' | python3 -m json.tool\n353\t\n354\t# Relancer le seed\n355\twp eval-file wp-content/plugins/{{project}}-content-init/seed-content.php\n356\t\n357\t# Tester la revalidation\n358\tcurl -s \"http://localhost:3000/api/revalidate?secret={{SECRET}}\"\n359\t```\n360\t"}]},"uuid":"b9ad89ca-85d7-4e2e-93c0-1fec34794d2d","timestamp":"2026-06-12T12:43:24.984Z","sourceToolAssistantUUID":"8688ae16-eb65-4544-ba72-f9163a5d2bb3","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"b9ad89ca-85d7-4e2e-93c0-1fec34794d2d","isSidechain":true,"agentId":"aa1b8ee79ef99e3f5","message":{"model":"claude-fable-5","id":"msg_01TNXXSbkkKr8wtqdsiiKmbg","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_01He8LBRPRf5sb2Bs12xnbvh","name":"Bash","input":{"command":"ls -la /home/dev/.claude/skills/nextjs-wordpress-headless/ && ls /opt/projects/.covalba-wp-worktrees/tom-passage-wp/wordpress/ /opt/projects/.covalba-wp-worktrees/tom-passage-wp/wordpress/mu-plugins/covalba-core/ /opt/projects/.covalba-wp-worktrees/tom-passage-wp/wordpress/seed/ /opt/projects/.covalba-wp-worktrees/tom-passage-wp/src/lib/wp/","description":"List skill dir and reference project dirs"},"caller":{"type":"direct"}}],"stop_reason":"tool_use","stop_sequence":null,"stop_details":null,"usage":{"input_tokens":23546,"cache_creation_input_tokens":9856,"cache_read_input_tokens":5507,"output_tokens":365,"server_tool_use":{"web_search_requests":0,"web_fetch_requests":0},"service_tier":"standard","cache_creation":{"ephemeral_1h_input_tokens":0,"ephemeral_5m_input_tokens":9856},"inference_geo":"not_available","iterations":[{"input_tokens":23546,"output_tokens":365,"cache_read_input_tokens":5507,"cache_creation_input_tokens":9856,"cache_creation":{"ephemeral_5m_input_tokens":9856,"ephemeral_1h_input_tokens":0},"type":"message"}],"speed":"standard"},"diagnostics":null},"requestId":"req_011CbyPJDJuXk7kRVhpdnKrZ","attributionAgent":"general-purpose","type":"assistant","uuid":"e2b2528d-01b0-47fa-9069-e298e5d32cff","timestamp":"2026-06-12T12:43:28.134Z","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"e2b2528d-01b0-47fa-9069-e298e5d32cff","isSidechain":true,"promptId":"2791882b-bb7e-4f2e-be7f-672bab599788","agentId":"aa1b8ee79ef99e3f5","type":"user","message":{"role":"user","content":[{"tool_use_id":"toolu_01He8LBRPRf5sb2Bs12xnbvh","type":"tool_result","content":"total 12\ndrwxr-xr-x  2 dev dev 4096 Jun 12 10:04 .\ndrwxr-xr-x 65 dev dev 4096 Jun 12 10:04 ..\nlrwxrwxrwx  1 dev dev   66 Jun 12 10:04 SKILL.md -> /opt/claude-code/library/skills/nextjs-wordpress-headless/SKILL.md\n/opt/projects/.covalba-wp-worktrees/tom-passage-wp/src/lib/wp/:\nclient.ts\nfragments\nmappers.ts\nqueries\nseoToMetadata.ts\ntypes.ts\n\n/opt/projects/.covalba-wp-worktrees/tom-passage-wp/wordpress/:\nSCHEMA.md\ndocker-compose.yml\nmu-plugins\nnginx-covalba-admin-proxy.conf\nnginx-covalba-admin.conf\nphp-overrides.ini\nseed\n\n/opt/projects/.covalba-wp-worktrees/tom-passage-wp/wordpress/mu-plugins/covalba-core/:\ncovalba-core.php\ninc\n\n/opt/projects/.covalba-wp-worktrees/tom-passage-wp/wordpress/seed/:\ncontent\nlib.php\nremote-assets\nremote-images.json\nrun.php","is_error":false}]},"uuid":"dd302f41-22ec-4ba7-9af3-780ed27c689b","timestamp":"2026-06-12T12:43:28.218Z","sourceToolAssistantUUID":"e2b2528d-01b0-47fa-9069-e298e5d32cff","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"dd302f41-22ec-4ba7-9af3-780ed27c689b","isSidechain":true,"agentId":"aa1b8ee79ef99e3f5","message":{"model":"claude-fable-5","id":"msg_016f4v2GbsFtucBnnZZ2iJzg","type":"message","role":"assistant","content":[{"type":"thinking","thinking":"","signature":"CAISkAIKYggOGAIqQKzlrYikehf7EGwoY7NXvVrVnLL7YXA97gN5sc/OlU+bABB5UFVi19OnVoAzgJHhZB35CE+D+xb04Q3zXcN1AkAyDmNsYXVkZS1mYWJsZS01OAFCCHRoaW5raW5nEgxkVM9tyMzT1RdIE7saDCoUDG4M0du3HHmOPiIw4YMqOkktI1I3RkYhQ3X0LJaPrI3YxzmHXyJymcpQmElZwCh5d1Y1FGO90sBU2sPEKly/V05DpfHm7oWM5B/VcDMBMUt9ai8MnCn3l7WZFOp1EnJnA0xzITQC17x54tIr2c1/3lVTojCD6nEsQZLnbFZoqX1HjMPwI8gjGcjr4OJtw8KM8WLVdsnKLAG8DxgB"}],"stop_reason":null,"stop_sequence":null,"stop_details":null,"usage":{"input_tokens":2769,"cache_creation_input_tokens":30625,"cache_read_input_tokens":15363,"cache_creation":{"ephemeral_5m_input_tokens":30625,"ephemeral_1h_input_tokens":0},"output_tokens":7,"service_tier":"standard","inference_geo":"not_available"},"diagnostics":null},"requestId":"req_011CbyPKDMAV8aqgwAQVXyor","attributionAgent":"general-purpose","type":"assistant","uuid":"43d866ac-9b5e-4d59-97ca-5cdd9a4a9cc1","timestamp":"2026-06-12T12:43:33.192Z","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"43d866ac-9b5e-4d59-97ca-5cdd9a4a9cc1","isSidechain":true,"agentId":"aa1b8ee79ef99e3f5","message":{"model":"claude-fable-5","id":"msg_016f4v2GbsFtucBnnZZ2iJzg","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_011WjDKtpexHNeGu7mFxgs1P","name":"Read","input":{"file_path":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp/wordpress/SCHEMA.md"},"caller":{"type":"direct"}}],"stop_reason":null,"stop_sequence":null,"stop_details":null,"usage":{"input_tokens":2769,"cache_creation_input_tokens":30625,"cache_read_input_tokens":15363,"cache_creation":{"ephemeral_5m_input_tokens":30625,"ephemeral_1h_input_tokens":0},"output_tokens":7,"service_tier":"standard","inference_geo":"not_available"},"diagnostics":null},"requestId":"req_011CbyPKDMAV8aqgwAQVXyor","attributionAgent":"general-purpose","type":"assistant","uuid":"89806013-3747-460a-a1d7-2fc766d9a5ea","timestamp":"2026-06-12T12:43:34.623Z","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"89806013-3747-460a-a1d7-2fc766d9a5ea","isSidechain":true,"promptId":"2791882b-bb7e-4f2e-be7f-672bab599788","agentId":"aa1b8ee79ef99e3f5","type":"user","message":{"role":"user","content":[{"tool_use_id":"toolu_011WjDKtpexHNeGu7mFxgs1P","type":"tool_result","content":"1\t# Contrat de schéma — Covalba WordPress headless\n2\t\n3\tSource de vérité du modèle de contenu. Toute évolution passe par une PR qui met à jour\n4\t**en même temps** : ce fichier, le mu-plugin `covalba-core` (PHP) et `src/lib/wp/` +\n5\t`src/components/blocks/` (Next). **On ne renomme jamais un `acf_fc_layout` publié.**\n6\t\n7\t## Conventions\n8\t\n9\t- Noms de champs ACF : `snake_case` français. `graphql_field_name` : `camelCase`.\n10\t- Field keys déterministes : `field_cvb_{layout}_{champ}` (sous-champs : `field_cvb_{layout}_{champ}_{sous_champ}`).\n11\t- Le flexible content unique s'appelle `sections` (key `field_cvb_sections`), field group\n12\t  « Sections de page » (`group_cvb_sections`), `graphql_field_name: sections`,\n13\t  localisé sur : `page`, `produit`, `toiture`, `industrie`, `reference`.\n14\t- WPGraphQL for ACF v2 expose chaque layout en type GraphQL dont le nom **se termine par**\n15\t  `{LayoutPascal}Layout` (ex. layout `grille_cards` → type `...GrilleCardsLayout`).\n16\t  Le BlockRenderer matche par suffixe, jamais par nom complet.\n17\t- Tout champ image : `return_format = array` côté ACF ; côté GraphQL on lit\n18\t  `image { node { sourceUrl altText mediaDetails { width height } } }`.\n19\t- Les repeaters/flexibles vides sortent `null` en GraphQL → toujours mapper `?? []`.\n20\t- Titres : la convention `*texte*` marque le span d'accent (rendu `<span class=\"accent\">` côté front).\n21\t\n22\t## CPT\n23\t\n24\t| CPT | slug | rewrite | graphql single/plural | supports | menu_icon |\n25\t|---|---|---|---|---|---|\n26\t| Produit | `produit` | `solutions` | `produit` / `produits` | title, thumbnail, revisions | dashicons-admin-home |\n27\t| Toiture | `toiture` | `toitures` | `toiture` / `toitures` | title, thumbnail, revisions | dashicons-admin-multisite |\n28\t| Industrie | `industrie` | `industries` | `industrie` / `industries` | title, thumbnail, revisions | dashicons-building |\n29\t| Référence | `reference` | `references` | `reference` / `references` | title, thumbnail, revisions | dashicons-awards |\n30\t\n31\tTous : `public => true`, `publicly_queryable => false` (pas de rendu WP), `show_in_rest => true`,\n32\t`show_in_graphql => true`, `has_archive => false`, `rewrite => ['with_front' => false]`.\n33\tLes one-off (home, contact, qui-sommes-nous, devenir-applicateur, bat-en-112, guide-cool-roof,\n34\tsimulateur-economie-energie, faq, diagnostic, estimation, hub industrie, listing references) = **pages natives WP**.\n35\t\n36\t## Taxonomies\n37\t\n38\t| Taxonomie | slug | graphql | attachée à | termes initiaux |\n39\t|---|---|---|---|---|\n40\t| Secteur | `secteur` | `secteur` / `secteurs` | reference, industrie | industrie, logistique, distribution, tertiaire, collectivites, agricole, erp |\n41\t| Type de support | `type_support` | `typeSupport` / `typesSupport` | reference, produit, toiture | bitume, bac-acier, fibrociment, tuiles-ciment, toiture-plate, epdm, pvc, zinc |\n42\t\n43\t## Clones (sous-structures partagées)\n44\t\n45\t### `clone_entete_section` (group `group_cvb_clone_entete`)\n46\t| champ | type | graphql |\n47\t|---|---|---|\n48\t| badge | text | badge |\n49\t| titre | text (`*accent*` autorisé) | titre |\n50\t| intro | textarea | intro |\n51\t\n52\t### `clone_cta` (group `group_cvb_clone_cta`)\n53\t| champ | type | graphql |\n54\t|---|---|---|\n55\t| label | text | label |\n56\t| lien | text (url ou path interne) | lien |\n57\t| style | select: primary / secondary / ghost | style |\n58\t\n59\t### `clone_seo` (group `group_cvb_seo`, field group séparé « 🔍 SEO », position high, sur tous les types + pages)\n60\t| champ | type | graphql |\n61\t|---|---|---|\n62\t| titre_seo | text | titreSeo |\n63\t| meta_description | textarea rows 3 | metaDescription |\n64\t| canonical | url | canonical |\n65\t| og_image | image | ogImage |\n66\t| noindex | true_false | noindex |\n67\t\n68\tGroup exposé en GraphQL sous `seo`.\n69\t\n70\t## Layouts génériques (disponibles sur tous les types) — 21\n71\t\n72\tChaque layout a `entete` (clone `clone_entete_section`, graphql `entete`) sauf mention contraire.\n73\t\n74\t1. **hero** — variante (select: home/standard/compact), eyebrow (text), titre (text), lead (textarea), image (image), stats (repeater max 4: value text, label text), badges (repeater: texte text), cta_primaire (clone_cta, graphql ctaPrimaire), cta_secondaire (clone_cta, graphql ctaSecondaire). Pas d'entete.\n75\t2. **barre_reassurance** — items (repeater max 6: texte text). Pas d'entete.\n76\t3. **grille_cards** — entete, cards (repeater: icone (select, liste blanche lucide), titre text, texte textarea, image image, lien text), colonnes (select: 2/3/4), theme (select: clair/sombre/accent), transition (textarea).\n77\t4. **texte_image** — entete, contenu (wysiwyg), image (image), position_image (select: gauche/droite, graphql positionImage), liste (repeater: texte text), note (textarea), cta (clone_cta).\n78\t5. **chiffres** — entete, figures (repeater max 6: value text, label text, sublabel text), theme (select: clair/sombre).\n79\t6. **tableau_comparatif** — entete, entetes_colonnes (repeater: texte text, graphql entetesColonnes), lignes_comparatif (repeater, graphql lignesComparatif: cellules (repeater: texte text) — conventions `oui`/`non`/`-`), colonne_mise_en_avant (number, graphql colonneMiseEnAvant), texte_apres (textarea, graphql texteApres), cta (clone_cta).\n80\t7. **tableau_situations** — entete, lignes_situations (repeater, graphql lignesSituations: situation text, recommandation text, justification textarea), cta (clone_cta).\n81\t8. **etapes** — entete, etapes (repeater: titre text, texte textarea, image image), reassurance (textarea), video_url (url, graphql videoUrl).\n82\t9. **faq** — entete, questions (repeater: question text, reponse wysiwyg), json_ld (true_false défaut true, graphql jsonLd), cta (clone_cta).\n83\t10. **cta** — variante (select: mid/final/banner), titre (text), texte (textarea), reassurances (repeater: texte text), cta_primaire (clone_cta, graphql ctaPrimaire), cta_secondaire (clone_cta, graphql ctaSecondaire), hubspot_form_id (text, graphql hubspotFormId). Pas d'entete.\n84\t11. **temoignages_video** — entete, temoignages (repeater: video_url url (graphql videoUrl), citation textarea, nom text, role text, entreprise text, contexte textarea).\n85\t12. **video** — entete, video_url (url, graphql videoUrl), points_cles (repeater: label text, texte textarea — graphql pointsCles).\n86\t13. **logos** — entete, source (select: clients/presse/custom), logos_custom (repeater: image image, nom text, lien text — graphql logosCustom).\n87\t14. **citation** — texte (textarea), auteur (text), role (text), photo (image). Pas d'entete.\n88\t15. **contenu_seo** — intro (wysiwyg), sections (repeater: titre text, contenu wysiwyg), sources (repeater: label text, url url), replie (true_false défaut true). Pas d'entete (le H2 vit dans sections).\n89\t16. **compatibilite_supports** — entete, supports (repeater: type text, detail textarea, image image), note_couverture (textarea, graphql noteCouverture), rendu (select: tabs/grille).\n90\t17. **grille_secteurs** — entete, mode (select: auto/manuel), secteurs (relationship → industrie, graphql secteurs).\n91\t18. **grille_solutions** — entete, produits (relationship → produit), affichage (select: cards/compact).\n92\t19. **references_grille** — entete, mode (select: toutes/secteur/manuel), secteur (taxonomy term select secteur), limite (number), references_manuel (relationship → reference, graphql referencesManuel), filtres (true_false, graphql filtres).\n93\t20. **timeline** — entete, jalons (repeater: annee text, titre text, texte textarea, image image).\n94\t21. **composant_react** — composant (select: simulateur_energie / diagnostic_toiture / estimation / climate_dashboard / applicateur_screener / formulaire_hubspot / carte_intervention), titre (text), hubspot_form_id (text, graphql hubspotFormId). Pas d'entete. **Escape hatch** : monte un composant interactif codé côté front.\n95\t\n96\t## Layouts spécifiques — 5 (filtrés par type côté BO via acf/load_field, présents dans le même flexible)\n97\t\n98\t22. **specs_techniques** (produit) — entete, colonnes_specs (repeater, graphql colonnesSpecs: nom text), lignes_specs (repeater, graphql lignesSpecs: label text, valeurs (repeater: texte text)), colonne_mise_en_avant (number, graphql colonneMiseEnAvant), fiche_technique (file, graphql ficheTechnique).\n99\t23. **certifications** (produit) — entete, items_certifications (repeater, graphql itemsCertifications: logo image, nom text, description textarea).\n100\t24. **variantes_produit** (produit) — entete, variantes (repeater: nom text, description textarea, garantie text, sri text, usage text).\n101\t25. **avant_apres** (reference, toiture, produit) — entete, image_avant (image, graphql imageAvant), image_apres (image, graphql imageApres), legende_avant (text, graphql legendeAvant), legende_apres (text, graphql legendeApres).\n102\t26. **fiche_chantier** (reference) — afficher (true_false défaut true). Rend les données du groupe `ficheReference` du post courant.\n103\t\n104\t### Filtrage BO (n'affecte pas le schéma GraphQL)\n105\t- `page` : tout sauf specs_techniques, variantes_produit, fiche_chantier\n106\t- `produit` : tout sauf fiche_chantier\n107\t- `toiture` : tout sauf specs_techniques, certifications, variantes_produit, fiche_chantier\n108\t- `industrie` : tout sauf specs_techniques, certifications, variantes_produit, fiche_chantier, avant_apres\n109\t- `reference` : tout sauf specs_techniques, variantes_produit, grille_secteurs\n110\t\n111\t## Groupes de champs structurés (hors flexible)\n112\t\n113\t### `ficheProduit` (group `group_cvb_fiche_produit`, sur produit, graphql `ficheProduit`)\n114\tproduct_name text (productName), tagline text, accent_color text hex (accentColor), garantie text,\n115\tsri text, prix text, fiche_technique_pdf file (ficheTechniquePdf).\n116\t\n117\t### `ficheReference` (group `group_cvb_fiche_reference`, sur reference, graphql `ficheReference`)\n118\tclient_name text (clientName), location text, produit relationship→produit (produit),\n119\tsupport text, surface text, metrics repeater (value text, label text), quote group (texte textarea,\n120\tauteur text, role text), video_url url (videoUrl), show_in_grid true_false (showInGrid).\n121\t\n122\t## Options pages (graphql `optionsSite`, slug admin `options-site`, capability edit_posts)\n123\t\n124\tOnglets (tabs ACF) :\n125\t1. **Navigation** : menu_principal repeater (label text, lien text, sous_items repeater (label, lien, description text)) (menuPrincipal), cta_navbar clone_cta (ctaNavbar).\n126\t2. **Footer** : colonnes_footer repeater (titre text, liens repeater (label, lien)) (colonnesFooter), texte_legal textarea (texteLegal), reseaux_sociaux repeater (reseau select: linkedin/youtube/instagram/x, url url) (reseauxSociaux).\n127\t3. **Coordonnées** : telephone text, email text, adresse textarea, horaires text.\n128\t4. **CTA globaux** : sticky_cta_label text (stickyCtaLabel), sticky_cta_lien text (stickyCtaLien), reassurances_defaut repeater (texte text) (reassurancesDefaut).\n129\t5. **Preuves** : logos_clients repeater (image image, nom text) (logosClients), logos_presse repeater (image image, nom text, lien text) (logosPresse), chiffres_cles repeater (value, label) (chiffresCles).\n130\t6. **SEO défaut** : og_image_defaut image (ogImageDefaut), suffixe_title text (suffixeTitle).\n131\t\n132\t## ⚠ Piège WPGraphQL for ACF : noms de sous-champs partagés\n133\t\n134\tLes types GraphQL des repeaters/groups imbriqués sont nommés `{Prefix}{NomDuChamp}` SANS le\n135\tlayout parent : deux layouts qui partagent un nom de champ imbriqué partagent le MÊME type.\n136\tRègle : un nom de champ imbriqué réutilisé entre layouts doit avoir des sous-champs IDENTIQUES\n137\t(ex. `entete`, `cta`) — sinon suffixer le nom par le layout (`lignes_comparatif`,\n138\t`lignes_situations`, `lignes_specs`, `colonnes_specs`, `items_certifications`).\n139\t\n140\t## Icônes lucide autorisées (select `icone`)\n141\t\n142\tthermometer-sun, thermometer-snowflake, droplets, shield-check, clock, euro, leaf, factory,\n143\twarehouse, store, building-2, school, tractor, sun, snowflake, wrench, hard-hat, check-circle-2,\n144\ttrending-down, trending-up, zap, wind, cloud-sun, gauge, ruler, paint-roller, spray-can, map-pin,\n145\tphone, file-text, award, users\n146\t"}]},"uuid":"2f8ba1fa-86be-40e1-b479-eade871f0af4","timestamp":"2026-06-12T12:43:34.645Z","sourceToolAssistantUUID":"89806013-3747-460a-a1d7-2fc766d9a5ea","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"2f8ba1fa-86be-40e1-b479-eade871f0af4","isSidechain":true,"agentId":"aa1b8ee79ef99e3f5","message":{"model":"claude-fable-5","id":"msg_016f4v2GbsFtucBnnZZ2iJzg","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_01R6KRD5vJcXUh1DxfxHQgE4","name":"Read","input":{"file_path":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp/wordpress/docker-compose.yml"},"caller":{"type":"direct"}}],"stop_reason":null,"stop_sequence":null,"stop_details":null,"usage":{"input_tokens":2769,"cache_creation_input_tokens":30625,"cache_read_input_tokens":15363,"cache_creation":{"ephemeral_5m_input_tokens":30625,"ephemeral_1h_input_tokens":0},"output_tokens":7,"service_tier":"standard","inference_geo":"not_available"},"diagnostics":null},"requestId":"req_011CbyPKDMAV8aqgwAQVXyor","attributionAgent":"general-purpose","type":"assistant","uuid":"d1897dbd-e273-4a9a-8029-f33ff76e0da5","timestamp":"2026-06-12T12:43:35.105Z","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"d1897dbd-e273-4a9a-8029-f33ff76e0da5","isSidechain":true,"promptId":"2791882b-bb7e-4f2e-be7f-672bab599788","agentId":"aa1b8ee79ef99e3f5","type":"user","message":{"role":"user","content":[{"tool_use_id":"toolu_01R6KRD5vJcXUh1DxfxHQgE4","type":"tool_result","content":"1\t# Stack WordPress headless Covalba — VPS srv1255941 (cohabite avec le dashboard\n2\t# nginx/cinik-dash : pas de reverse proxy ici, nginx hôte + certbot terminent le TLS\n3\t# et proxifient covalba-admin.paf-studio.dev -> 127.0.0.1:8080).\n4\tname: covalba-wp\n5\t\n6\tx-wp-env: &wp-env\n7\t  WORDPRESS_DB_HOST: db\n8\t  WORDPRESS_DB_NAME: covalba\n9\t  WORDPRESS_DB_USER: covalba\n10\t  WORDPRESS_DB_PASSWORD: ${DB_PASSWORD}\n11\t  COVALBA_REVALIDATE_SECRET: ${COVALBA_REVALIDATE_SECRET:-}\n12\t  COVALBA_FRONT_URLS: ${COVALBA_FRONT_URLS:-}\n13\t  ACF_PRO_LICENSE: ${ACF_PRO_LICENSE:-}\n14\t  # Évalué au runtime par wp-config.php (getenv_docker) : doit être présent\n15\t  # dans TOUS les conteneurs qui exécutent WordPress (wordpress ET wpcli).\n16\t  WORDPRESS_CONFIG_EXTRA: |\n17\t    define('WP_HOME', 'https://covalba-admin.paf-studio.dev');\n18\t    define('WP_SITEURL', 'https://covalba-admin.paf-studio.dev');\n19\t    define('DISABLE_WP_CRON', true);\n20\t    define('DISALLOW_FILE_EDIT', true);\n21\t    define('AUTOMATIC_UPDATER_DISABLED', true);\n22\t    define('WP_POST_REVISIONS', 5);\n23\t    define('WP_ENVIRONMENT_TYPE', 'production');\n24\t    define('FORCE_SSL_ADMIN', true);\n25\t    define('WP_REDIS_HOST', 'redis');\n26\t    define('WP_MEMORY_LIMIT', '256M');\n27\t    define('COVALBA_REVALIDATE_SECRET', getenv('COVALBA_REVALIDATE_SECRET') ?: '');\n28\t    define('COVALBA_FRONT_URLS', getenv('COVALBA_FRONT_URLS') ?: '');\n29\t    define('ACF_PRO_LICENSE', getenv('ACF_PRO_LICENSE') ?: '');\n30\t\n31\tservices:\n32\t  db:\n33\t    image: mariadb:11\n34\t    restart: unless-stopped\n35\t    environment:\n36\t      MARIADB_DATABASE: covalba\n37\t      MARIADB_USER: covalba\n38\t      MARIADB_PASSWORD: ${DB_PASSWORD}\n39\t      MARIADB_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}\n40\t    # buffer modeste : le VPS est partagé avec un dashboard Next + Postgres\n41\t    command: --innodb-buffer-pool-size=256M --max-connections=40\n42\t    volumes:\n43\t      - ./db-data:/var/lib/mysql\n44\t    healthcheck:\n45\t      test: [\"CMD\", \"healthcheck.sh\", \"--connect\", \"--innodb_initialized\"]\n46\t      interval: 10s\n47\t      retries: 6\n48\t\n49\t  wordpress:\n50\t    image: wordpress:6.8-php8.3-apache\n51\t    restart: unless-stopped\n52\t    depends_on:\n53\t      db:\n54\t        condition: service_healthy\n55\t    ports:\n56\t      - \"127.0.0.1:8080:80\"\n57\t    environment:\n58\t      <<: *wp-env\n59\t    volumes:\n60\t      - wp-core:/var/www/html\n61\t      - ./wp-content:/var/www/html/wp-content\n62\t      - ./php-overrides.ini:/usr/local/etc/php/conf.d/zz-overrides.ini:ro\n63\t\n64\t  redis:\n65\t    image: redis:7-alpine\n66\t    restart: unless-stopped\n67\t    command: --maxmemory 128mb --maxmemory-policy allkeys-lru\n68\t\n69\t  wpcli:\n70\t    image: wordpress:cli-php8.3\n71\t    profiles: [\"tools\"]\n72\t    user: \"33:33\"\n73\t    depends_on:\n74\t      db:\n75\t        condition: service_healthy\n76\t    environment:\n77\t      <<: *wp-env\n78\t    volumes:\n79\t      - wp-core:/var/www/html\n80\t      - ./wp-content:/var/www/html/wp-content\n81\t\n82\tvolumes:\n83\t  wp-core:\n84\t"}]},"uuid":"648911f0-7d1c-4a73-83e6-10e497b5ccfd","timestamp":"2026-06-12T12:43:35.118Z","sourceToolAssistantUUID":"d1897dbd-e273-4a9a-8029-f33ff76e0da5","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"648911f0-7d1c-4a73-83e6-10e497b5ccfd","isSidechain":true,"agentId":"aa1b8ee79ef99e3f5","message":{"model":"claude-fable-5","id":"msg_016f4v2GbsFtucBnnZZ2iJzg","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_01BvFkjLp2M9Hs2PDnAVspSa","name":"Read","input":{"file_path":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp/wordpress/nginx-covalba-admin.conf"},"caller":{"type":"direct"}}],"stop_reason":null,"stop_sequence":null,"stop_details":null,"usage":{"input_tokens":2769,"cache_creation_input_tokens":30625,"cache_read_input_tokens":15363,"cache_creation":{"ephemeral_5m_input_tokens":30625,"ephemeral_1h_input_tokens":0},"output_tokens":7,"service_tier":"standard","inference_geo":"not_available"},"diagnostics":null},"requestId":"req_011CbyPKDMAV8aqgwAQVXyor","attributionAgent":"general-purpose","type":"assistant","uuid":"7c275828-364e-47c9-b1d8-67a9582ead40","timestamp":"2026-06-12T12:43:35.585Z","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"7c275828-364e-47c9-b1d8-67a9582ead40","isSidechain":true,"promptId":"2791882b-bb7e-4f2e-be7f-672bab599788","agentId":"aa1b8ee79ef99e3f5","type":"user","message":{"role":"user","content":[{"tool_use_id":"toolu_01BvFkjLp2M9Hs2PDnAVspSa","type":"tool_result","content":"1\t# Vhost nginx hôte pour l'admin WordPress headless (VPS srv1255941).\n2\t# À placer dans /etc/nginx/sites-available/covalba-admin + symlink sites-enabled.\n3\t# Le TLS est ajouté par : certbot --nginx -d covalba-admin.paf-studio.dev\n4\tserver {\n5\t    listen 80;\n6\t    server_name covalba-admin.paf-studio.dev;\n7\t\n8\t    client_max_body_size 64M;\n9\t\n10\t    # Le BO ne doit jamais être indexé\n11\t    add_header X-Robots-Tag \"noindex, nofollow\" always;\n12\t\n13\t    # XML-RPC : vecteur d'attaque classique, inutile en headless\n14\t    location = /xmlrpc.php { return 403; }\n15\t\n16\t    location ~ ^/(wp-config\\.php|readme\\.html|license\\.txt)$ { return 404; }\n17\t    location = /wp-content/debug.log { return 404; }\n18\t\n19\t    # Basic auth devant le login WP (2e barrière avant le vrai login)\n20\t    location = /wp-login.php {\n21\t        auth_basic \"Covalba Admin\";\n22\t        auth_basic_user_file /etc/nginx/covalba-admin.htpasswd;\n23\t        proxy_pass http://127.0.0.1:8080;\n24\t        include /etc/nginx/snippets/covalba-admin-proxy.conf;\n25\t    }\n26\t\n27\t    location / {\n28\t        proxy_pass http://127.0.0.1:8080;\n29\t        include /etc/nginx/snippets/covalba-admin-proxy.conf;\n30\t    }\n31\t}\n32\t"}]},"uuid":"74c4ec3c-a618-4789-94d4-7a6fb33a38b9","timestamp":"2026-06-12T12:43:35.606Z","sourceToolAssistantUUID":"7c275828-364e-47c9-b1d8-67a9582ead40","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"74c4ec3c-a618-4789-94d4-7a6fb33a38b9","isSidechain":true,"agentId":"aa1b8ee79ef99e3f5","message":{"model":"claude-fable-5","id":"msg_016f4v2GbsFtucBnnZZ2iJzg","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_01Uk3HVRj4zBDTdLRdBvbUY2","name":"Bash","input":{"command":"ls -R /opt/projects/.covalba-wp-worktrees/tom-passage-wp/wordpress/mu-plugins/covalba-core/ /opt/projects/.covalba-wp-worktrees/tom-passage-wp/src/lib/wp/fragments /opt/projects/.covalba-wp-worktrees/tom-passage-wp/src/lib/wp/queries /opt/projects/.covalba-wp-worktrees/tom-passage-wp/wordpress/seed/content | head -80","description":"List mu-plugin, fragments, queries, seed content dirs"},"caller":{"type":"direct"}}],"stop_reason":"tool_use","stop_sequence":null,"stop_details":null,"usage":{"input_tokens":2769,"cache_creation_input_tokens":30625,"cache_read_input_tokens":15363,"output_tokens":548,"server_tool_use":{"web_search_requests":0,"web_fetch_requests":0},"service_tier":"standard","cache_creation":{"ephemeral_1h_input_tokens":0,"ephemeral_5m_input_tokens":30625},"inference_geo":"not_available","iterations":[{"input_tokens":2769,"output_tokens":548,"cache_read_input_tokens":15363,"cache_creation_input_tokens":30625,"cache_creation":{"ephemeral_5m_input_tokens":30625,"ephemeral_1h_input_tokens":0},"type":"message"}],"speed":"standard"},"diagnostics":null},"requestId":"req_011CbyPKDMAV8aqgwAQVXyor","attributionAgent":"general-purpose","type":"assistant","uuid":"09f63960-d331-439a-bd4e-5da8be8431fe","timestamp":"2026-06-12T12:43:37.523Z","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"09f63960-d331-439a-bd4e-5da8be8431fe","isSidechain":true,"promptId":"2791882b-bb7e-4f2e-be7f-672bab599788","agentId":"aa1b8ee79ef99e3f5","type":"user","message":{"role":"user","content":[{"tool_use_id":"toolu_01Uk3HVRj4zBDTdLRdBvbUY2","type":"tool_result","content":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp/src/lib/wp/fragments:\navantApres.ts\nbarreReassurance.ts\ncertifications.ts\nchiffres.ts\ncitation.ts\ncompatibiliteSupports.ts\ncomposantReact.ts\ncontenuSeo.ts\ncta.ts\netapes.ts\nfaq.ts\nficheChantier.ts\ngrilleCards.ts\ngrilleSecteurs.ts\ngrilleSolutions.ts\nhero.ts\nindex.ts\nlogos.ts\nprefix.ts\nreferencesGrille.ts\nshared.ts\nspecsTechniques.ts\ntableauComparatif.ts\ntableauSituations.ts\ntemoignagesVideo.ts\ntexteImage.ts\ntimeline.ts\nvariantesProduit.ts\nvideo.ts\n\n/opt/projects/.covalba-wp-worktrees/tom-passage-wp/src/lib/wp/queries:\nindustrie.ts\noptions.ts\npage.ts\nproduit.ts\nreference.ts\ntoiture.ts\n\n/opt/projects/.covalba-wp-worktrees/tom-passage-wp/wordpress/mu-plugins/covalba-core/:\ncovalba-core.php\ninc\n\n/opt/projects/.covalba-wp-worktrees/tom-passage-wp/wordpress/mu-plugins/covalba-core/inc:\nadmin.php\nfield-groups\ngraphql.php\noptions-pages.php\npost-types.php\nrevalidate.php\nsecurity.php\ntaxonomies.php\n\n/opt/projects/.covalba-wp-worktrees/tom-passage-wp/wordpress/mu-plugins/covalba-core/inc/field-groups:\nfiche-produit.php\nfiche-reference.php\nhelpers.php\nlayouts\nsections.php\nseo.php\n\n/opt/projects/.covalba-wp-worktrees/tom-passage-wp/wordpress/mu-plugins/covalba-core/inc/field-groups/layouts:\navant-apres.php\nbarre-reassurance.php\ncertifications.php\nchiffres.php\ncitation.php\ncompatibilite-supports.php\ncomposant-react.php\ncontenu-seo.php\ncta.php\netapes.php\nfaq.php\nfiche-chantier.php\ngrille-cards.php\ngrille-secteurs.php\ngrille-solutions.php\nhero.php\nlogos.php\nreferences-grille.php","is_error":false}]},"uuid":"637c74ae-f8b2-466c-8fd8-b2b78bc18c84","timestamp":"2026-06-12T12:43:37.610Z","sourceToolAssistantUUID":"09f63960-d331-439a-bd4e-5da8be8431fe","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"637c74ae-f8b2-466c-8fd8-b2b78bc18c84","isSidechain":true,"agentId":"aa1b8ee79ef99e3f5","message":{"model":"claude-fable-5","id":"msg_01S17VSzRBxyXmwsHz6kzwxF","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_01FPE3xhVMdw9BRFBFBEFjbL","name":"Read","input":{"file_path":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp/wordpress/mu-plugins/covalba-core/inc/field-groups/helpers.php"},"caller":{"type":"direct"}}],"stop_reason":null,"stop_sequence":null,"stop_details":null,"usage":{"input_tokens":2,"cache_creation_input_tokens":11667,"cache_read_input_tokens":45988,"cache_creation":{"ephemeral_5m_input_tokens":11667,"ephemeral_1h_input_tokens":0},"output_tokens":67,"service_tier":"standard","inference_geo":"not_available"},"diagnostics":null},"requestId":"req_011CbyPKueL6pZgWSwLxxe2h","attributionAgent":"general-purpose","type":"assistant","uuid":"7504413c-4b64-4df0-8a5b-e0528671a2fb","timestamp":"2026-06-12T12:43:42.980Z","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"7504413c-4b64-4df0-8a5b-e0528671a2fb","isSidechain":true,"promptId":"2791882b-bb7e-4f2e-be7f-672bab599788","agentId":"aa1b8ee79ef99e3f5","type":"user","message":{"role":"user","content":[{"tool_use_id":"toolu_01FPE3xhVMdw9BRFBFBEFjbL","type":"tool_result","content":"1\t<?php\n2\t/**\n3\t * Helpers builder ACF — préfixe cvb_.\n4\t *\n5\t * Les « clones » du SCHEMA (clone_entete_section, clone_cta) sont implémentés\n6\t * en champs de type group + sous-champs partagés via helpers : le schéma\n7\t * GraphQL produit est exactement entete { badge titre intro } et\n8\t * ctaPrimaire { label lien style }, ce que les clones ACF ne garantissent pas.\n9\t */\n10\t\n11\tdefined('ABSPATH') || exit;\n12\t\n13\t/** snake_case → camelCase (convention graphql_field_name du SCHEMA). */\n14\tfunction cvb_camel(string $snake): string {\n15\t    $parts = explode('_', $snake);\n16\t    return array_shift($parts) . implode('', array_map('ucfirst', $parts));\n17\t}\n18\t\n19\t/** Champ ACF générique : show_in_graphql + graphql_field_name systématiques. */\n20\tfunction cvb_field(string $key, string $name, string $label, string $type, array $extra = []): array {\n21\t    return array_merge([\n22\t        'key'                => $key,\n23\t        'name'               => $name,\n24\t        'label'              => $label,\n25\t        'type'               => $type,\n26\t        'show_in_graphql'    => 1,\n27\t        'graphql_field_name' => cvb_camel($name),\n28\t    ], $extra);\n29\t}\n30\t\n31\t/** Champ image : return_format array (cf. conventions SCHEMA). */\n32\tfunction cvb_image(string $key, string $name, string $label, array $extra = []): array {\n33\t    return cvb_field($key, $name, $label, 'image', array_merge([\n34\t        'return_format' => 'array',\n35\t        'preview_size'  => 'medium',\n36\t    ], $extra));\n37\t}\n38\t\n39\t/** Repeater : collapsed automatique sur le sous-champ « titre » s'il existe. */\n40\tfunction cvb_repeater(string $key, string $name, string $label, array $sub_fields, array $extra = []): array {\n41\t    if (!isset($extra['collapsed'])) {\n42\t        foreach ($sub_fields as $sub) {\n43\t            if (($sub['name'] ?? '') === 'titre') {\n44\t                $extra['collapsed'] = $sub['key'];\n45\t                break;\n46\t            }\n47\t        }\n48\t    }\n49\t\n50\t    return cvb_field($key, $name, $label, 'repeater', array_merge([\n51\t        'layout'       => 'block',\n52\t        'button_label' => 'Ajouter une ligne',\n53\t        'sub_fields'   => $sub_fields,\n54\t    ], $extra));\n55\t}\n56\t\n57\t/** Select simple. */\n58\tfunction cvb_select(string $key, string $name, string $label, array $choices, ?string $default = null, array $extra = []): array {\n59\t    return cvb_field($key, $name, $label, 'select', array_merge([\n60\t        'choices'       => $choices,\n61\t        'default_value' => $default,\n62\t        'allow_null'    => $default === null ? 1 : 0,\n63\t        'return_format' => 'value',\n64\t    ], $extra));\n65\t}\n66\t\n67\t/** Select icône — liste blanche lucide du SCHEMA. */\n68\tfunction cvb_select_icone(string $key, string $name = 'icone', string $label = 'Icône'): array {\n69\t    $icones = [\n70\t        'thermometer-sun', 'thermometer-snowflake', 'droplets', 'shield-check',\n71\t        'clock', 'euro', 'leaf', 'factory', 'warehouse', 'store', 'building-2',\n72\t        'school', 'tractor', 'sun', 'snowflake', 'wrench', 'hard-hat',\n73\t        'check-circle-2', 'trending-down', 'trending-up', 'zap', 'wind',\n74\t        'cloud-sun', 'gauge', 'ruler', 'paint-roller', 'spray-can', 'map-pin',\n75\t        'phone', 'file-text', 'award', 'users',\n76\t    ];\n77\t\n78\t    return cvb_select($key, $name, $label, array_combine($icones, $icones), null, ['ui' => 1]);\n79\t}\n80\t\n81\t/** Sous-champs du clone_entete_section (badge / titre / intro). */\n82\tfunction cvb_entete_subfields(string $layout): array {\n83\t    $p = \"field_cvb_{$layout}_entete\";\n84\t\n85\t    return [\n86\t        cvb_field(\"{$p}_badge\", 'badge', 'Badge', 'text'),\n87\t        cvb_field(\"{$p}_titre\", 'titre', 'Titre', 'text', [\n88\t            'instructions' => \"Utiliser *texte* pour le span d'accent.\",\n89\t        ]),\n90\t        cvb_field(\"{$p}_intro\", 'intro', 'Intro', 'textarea', ['rows' => 3]),\n91\t    ];\n92\t}\n93\t\n94\t/** Clone entête de section → group `entete` (graphql entete { badge titre intro }). */\n95\tfunction cvb_clone_entete(string $layout): array {\n96\t    return cvb_field(\"field_cvb_{$layout}_entete\", 'entete', 'En-tête de section', 'group', [\n97\t        'layout'     => 'block',\n98\t        'sub_fields' => cvb_entete_subfields($layout),\n99\t    ]);\n100\t}\n101\t\n102\t/** Sous-champs du clone_cta (label / lien / style). */\n103\tfunction cvb_cta_subfields(string $layout, string $name): array {\n104\t    $p = \"field_cvb_{$layout}_{$name}\";\n105\t\n106\t    return [\n107\t        cvb_field(\"{$p}_label\", 'label', 'Label', 'text'),\n108\t        cvb_field(\"{$p}_lien\", 'lien', 'Lien', 'text', [\n109\t            'instructions' => 'URL complète ou chemin interne (/contact).',\n110\t        ]),\n111\t        cvb_select(\"{$p}_style\", 'style', 'Style', [\n112\t            'primary'   => 'Primary',\n113\t            'secondary' => 'Secondary',\n114\t            'ghost'     => 'Ghost',\n115\t        ], 'primary'),\n116\t    ];\n117\t}\n118\t\n119\t/** Clone CTA → group (graphql camelCase du name : cta, ctaPrimaire, ctaNavbar…). */\n120\tfunction cvb_clone_cta(string $layout, string $name = 'cta', string $label = 'CTA'): array {\n121\t    return cvb_field(\"field_cvb_{$layout}_{$name}\", $name, $label, 'group', [\n122\t        'layout'     => 'block',\n123\t        'sub_fields' => cvb_cta_subfields($layout, $name),\n124\t    ]);\n125\t}\n126\t\n127\t/** Enveloppe d'un layout du flexible content `sections`. */\n128\tfunction cvb_layout(string $name, string $label, array $sub_fields): array {\n129\t    return [\n130\t        'key'        => \"layout_cvb_{$name}\",\n131\t        'name'       => $name,\n132\t        'label'      => $label,\n133\t        'display'    => 'block',\n134\t        'sub_fields' => $sub_fields,\n135\t    ];\n136\t}\n137\t\n138\t/** Onglet ACF (UI seulement, hors GraphQL). */\n139\tfunction cvb_tab(string $key, string $label): array {\n140\t    return [\n141\t        'key'             => $key,\n142\t        'label'           => $label,\n143\t        'name'            => '',\n144\t        'type'            => 'tab',\n145\t        'placement'       => 'top',\n146\t        'show_in_graphql' => 0,\n147\t    ];\n148\t}\n149\t"}]},"uuid":"65aa9684-7ea3-4051-93de-72ba69467283","timestamp":"2026-06-12T12:43:43.028Z","sourceToolAssistantUUID":"7504413c-4b64-4df0-8a5b-e0528671a2fb","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"65aa9684-7ea3-4051-93de-72ba69467283","isSidechain":true,"agentId":"aa1b8ee79ef99e3f5","message":{"model":"claude-fable-5","id":"msg_01S17VSzRBxyXmwsHz6kzwxF","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_01TZGW61xJeEmN9eNHpDAMha","name":"Read","input":{"file_path":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp/wordpress/mu-plugins/covalba-core/inc/revalidate.php"},"caller":{"type":"direct"}}],"stop_reason":null,"stop_sequence":null,"stop_details":null,"usage":{"input_tokens":2,"cache_creation_input_tokens":11667,"cache_read_input_tokens":45988,"cache_creation":{"ephemeral_5m_input_tokens":11667,"ephemeral_1h_input_tokens":0},"output_tokens":67,"service_tier":"standard","inference_geo":"not_available"},"diagnostics":null},"requestId":"req_011CbyPKueL6pZgWSwLxxe2h","attributionAgent":"general-purpose","type":"assistant","uuid":"64be3341-f6ec-491b-bd43-ffa3b2b39d5a","timestamp":"2026-06-12T12:43:43.965Z","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"64be3341-f6ec-491b-bd43-ffa3b2b39d5a","isSidechain":true,"promptId":"2791882b-bb7e-4f2e-be7f-672bab599788","agentId":"aa1b8ee79ef99e3f5","type":"user","message":{"role":"user","content":[{"tool_use_id":"toolu_01TZGW61xJeEmN9eNHpDAMha","type":"tool_result","content":"1\t<?php\n2\t/**\n3\t * Revalidation on-demand du front Next.js.\n4\t *\n5\t * Constantes attendues dans wp-config.php :\n6\t * - COVALBA_FRONT_URLS       : CSV d'URLs de fronts (https://covalba.fr,https://preview.covalba.fr)\n7\t * - COVALBA_REVALIDATE_SECRET : secret partagé, envoyé en header x-revalidate-secret\n8\t *\n9\t * POST {front}/api/revalidate avec body JSON { tags: [...], paths: [...] }.\n10\t */\n11\t\n12\tdefined('ABSPATH') || exit;\n13\t\n14\t/** Types de contenu qui déclenchent une revalidation à la publication. */\n15\tfunction cvb_revalidated_post_types(): array {\n16\t    return ['page', 'produit', 'toiture', 'industrie', 'reference'];\n17\t}\n18\t\n19\t/** URLs des fronts depuis COVALBA_FRONT_URLS (CSV), normalisées sans slash final. */\n20\tfunction cvb_front_urls(): array {\n21\t    if (!defined('COVALBA_FRONT_URLS') || !COVALBA_FRONT_URLS) {\n22\t        return [];\n23\t    }\n24\t\n25\t    $urls = array_map(static fn(string $url): string => rtrim(trim($url), '/'), explode(',', COVALBA_FRONT_URLS));\n26\t\n27\t    return array_values(array_filter($urls));\n28\t}\n29\t\n30\t/**\n31\t * Poste {tags, paths} sur /api/revalidate de chaque front.\n32\t * Non-bloquant par défaut (save_post) ; bloquant pour le bouton admin (résultats).\n33\t *\n34\t * @return array<string, array{ok: bool, status?: int, error?: string}> résultats par URL (mode bloquant)\n35\t */\n36\tfunction cvb_send_revalidate(array $tags, array $paths = [], bool $blocking = false): array {\n37\t    $secret  = defined('COVALBA_REVALIDATE_SECRET') ? (string) COVALBA_REVALIDATE_SECRET : '';\n38\t    $results = [];\n39\t\n40\t    foreach (cvb_front_urls() as $base) {\n41\t        $response = wp_remote_post($base . '/api/revalidate', [\n42\t            'blocking' => $blocking,\n43\t            'timeout'  => $blocking ? 10 : 1,\n44\t            'headers'  => [\n45\t                'Content-Type'        => 'application/json',\n46\t                'x-revalidate-secret' => $secret,\n47\t            ],\n48\t            'body'     => wp_json_encode(['tags' => $tags, 'paths' => $paths]),\n49\t        ]);\n50\t\n51\t        if (!$blocking) {\n52\t            continue;\n53\t        }\n54\t\n55\t        if (is_wp_error($response)) {\n56\t            $results[$base] = ['ok' => false, 'error' => $response->get_error_message()];\n57\t        } else {\n58\t            $status         = (int) wp_remote_retrieve_response_code($response);\n59\t            $results[$base] = ['ok' => $status >= 200 && $status < 400, 'status' => $status];\n60\t        }\n61\t    }\n62\t\n63\t    return $results;\n64\t}\n65\t\n66\t// ── 1) Revalidation automatique ──────────────────────────────────────────────\n67\t\n68\tadd_action('save_post', 'cvb_revalidate_on_save', 20, 2);\n69\t\n70\tfunction cvb_revalidate_on_save(int $post_id, WP_Post $post): void {\n71\t    if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {\n72\t        return;\n73\t    }\n74\t    if (wp_is_post_revision($post_id) || $post->post_status !== 'publish') {\n75\t        return;\n76\t    }\n77\t    if (!in_array($post->post_type, cvb_revalidated_post_types(), true)) {\n78\t        return;\n79\t    }\n80\t\n81\t    // tags = [postType, postType:slug] — ex. ['produit', 'produit:cool-roof']\n82\t    cvb_send_revalidate([$post->post_type, $post->post_type . ':' . $post->post_name]);\n83\t}\n84\t\n85\tadd_action('acf/save_post', 'cvb_revalidate_on_options_save', 20);\n86\t\n87\tfunction cvb_revalidate_on_options_save($post_id): void {\n88\t    if ($post_id !== 'options') {\n89\t        return;\n90\t    }\n91\t\n92\t    cvb_send_revalidate(['wordpress']);\n93\t}\n94\t\n95\t// ── 2) Bouton admin bar « Publier sur le site » ─────────────────────────────\n96\t\n97\tadd_action('admin_bar_menu', 'cvb_admin_bar_revalidate', 90);\n98\t\n99\tfunction cvb_admin_bar_revalidate(WP_Admin_Bar $admin_bar): void {\n100\t    if (!current_user_can('edit_posts') || !cvb_front_urls()) {\n101\t        return;\n102\t    }\n103\t\n104\t    $admin_bar->add_node([\n105\t        'id'    => 'cvb-revalidate',\n106\t        'title' => '<span id=\"cvb-revalidate-label\">🚀 Publier sur le site</span>',\n107\t        'href'  => '#',\n108\t        'meta'  => ['title' => 'Revalide tout le cache du front Next.js'],\n109\t    ]);\n110\t}\n111\t\n112\tadd_action('wp_ajax_covalba_revalidate', 'cvb_ajax_revalidate');\n113\t\n114\tfunction cvb_ajax_revalidate(): void {\n115\t    check_ajax_referer('covalba_revalidate', 'nonce');\n116\t\n117\t    if (!current_user_can('edit_posts')) {\n118\t        wp_send_json(['success' => false, 'message' => 'Permission refusée.'], 403);\n119\t    }\n120\t\n121\t    $results = cvb_send_revalidate(['wordpress'], [], true);\n122\t    $ok      = !empty($results) && !in_array(false, array_column($results, 'ok'), true);\n123\t\n124\t    wp_send_json(['success' => $ok, 'results' => $results]);\n125\t}\n126\t\n127\tadd_action('admin_footer', 'cvb_revalidate_admin_js');\n128\t\n129\tfunction cvb_revalidate_admin_js(): void {\n130\t    if (!current_user_can('edit_posts') || !cvb_front_urls()) {\n131\t        return;\n132\t    }\n133\t\n134\t    $nonce = wp_create_nonce('covalba_revalidate');\n135\t    ?>\n136\t    <script>\n137\t    (function () {\n138\t        var link = document.querySelector('#wp-admin-bar-cvb-revalidate > a');\n139\t        var label = document.getElementById('cvb-revalidate-label');\n140\t        if (!link || !label) return;\n141\t\n142\t        var initial = label.textContent;\n143\t        var busy = false;\n144\t\n145\t        function reset() {\n146\t            setTimeout(function () { label.textContent = initial; busy = false; }, 3000);\n147\t        }\n148\t\n149\t        link.addEventListener('click', function (event) {\n150\t            event.preventDefault();\n151\t            if (busy) return;\n152\t            busy = true;\n153\t            label.textContent = '⏳ Publication en cours…';\n154\t\n155\t            var body = new FormData();\n156\t            body.append('action', 'covalba_revalidate');\n157\t            body.append('nonce', '<?php echo esc_js($nonce); ?>');\n158\t\n159\t            fetch(ajaxurl, { method: 'POST', credentials: 'same-origin', body: body })\n160\t                .then(function (response) { return response.json(); })\n161\t                .then(function (data) {\n162\t                    label.textContent = data.success ? '✅ Site à jour' : '❌ Erreur de publication';\n163\t                })\n164\t                .catch(function () {\n165\t                    label.textContent = '❌ Erreur réseau';\n166\t                })\n167\t                .finally(reset);\n168\t        });\n169\t    })();\n170\t    </script>\n171\t    <?php\n172\t}\n173\t"}]},"uuid":"e5f13d46-0cc6-444f-9acd-c6e1782c7d63","timestamp":"2026-06-12T12:43:43.999Z","sourceToolAssistantUUID":"64be3341-f6ec-491b-bd43-ffa3b2b39d5a","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"e5f13d46-0cc6-444f-9acd-c6e1782c7d63","isSidechain":true,"agentId":"aa1b8ee79ef99e3f5","message":{"model":"claude-fable-5","id":"msg_01S17VSzRBxyXmwsHz6kzwxF","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_01BKjk3R9JRiXkbo33929Cmx","name":"Read","input":{"file_path":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp/wordpress/mu-plugins/covalba-core/covalba-core.php"},"caller":{"type":"direct"}}],"stop_reason":"tool_use","stop_sequence":null,"stop_details":null,"usage":{"input_tokens":2,"cache_creation_input_tokens":11667,"cache_read_input_tokens":45988,"output_tokens":305,"server_tool_use":{"web_search_requests":0,"web_fetch_requests":0},"service_tier":"standard","cache_creation":{"ephemeral_1h_input_tokens":0,"ephemeral_5m_input_tokens":11667},"inference_geo":"not_available","iterations":[{"input_tokens":2,"output_tokens":305,"cache_read_input_tokens":45988,"cache_creation_input_tokens":11667,"cache_creation":{"ephemeral_5m_input_tokens":11667,"ephemeral_1h_input_tokens":0},"type":"message"}],"speed":"standard"},"diagnostics":null},"requestId":"req_011CbyPKueL6pZgWSwLxxe2h","attributionAgent":"general-purpose","type":"assistant","uuid":"d94dfcc6-027c-4602-89df-fd089670b212","timestamp":"2026-06-12T12:43:44.476Z","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"d94dfcc6-027c-4602-89df-fd089670b212","isSidechain":true,"promptId":"2791882b-bb7e-4f2e-be7f-672bab599788","agentId":"aa1b8ee79ef99e3f5","type":"user","message":{"role":"user","content":[{"tool_use_id":"toolu_01BKjk3R9JRiXkbo33929Cmx","type":"tool_result","content":"1\t<?php\n2\t/**\n3\t * Covalba Core — bootstrap.\n4\t *\n5\t * Implémente le contrat wordpress/SCHEMA.md. Les CPT, taxonomies, la sécurité\n6\t * et la revalidation fonctionnent sans ACF ; tout le code ACF est gardé par\n7\t * function_exists('acf_add_local_field_group') dans un hook acf/init.\n8\t */\n9\t\n10\tdefined('ABSPATH') || exit;\n11\t\n12\tdefine('COVALBA_CORE_VERSION', '1.0.0');\n13\t\n14\trequire __DIR__ . '/inc/post-types.php';\n15\trequire __DIR__ . '/inc/taxonomies.php';\n16\trequire __DIR__ . '/inc/field-groups/helpers.php';\n17\trequire __DIR__ . '/inc/field-groups/sections.php';\n18\trequire __DIR__ . '/inc/field-groups/fiche-produit.php';\n19\trequire __DIR__ . '/inc/field-groups/fiche-reference.php';\n20\trequire __DIR__ . '/inc/field-groups/seo.php';\n21\trequire __DIR__ . '/inc/options-pages.php';\n22\trequire __DIR__ . '/inc/admin.php';\n23\trequire __DIR__ . '/inc/graphql.php';\n24\trequire __DIR__ . '/inc/security.php';\n25\trequire __DIR__ . '/inc/revalidate.php';\n26\t"}]},"uuid":"b0c28768-49be-409a-9e84-fdb96ed3b3a9","timestamp":"2026-06-12T12:43:44.498Z","sourceToolAssistantUUID":"d94dfcc6-027c-4602-89df-fd089670b212","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"b0c28768-49be-409a-9e84-fdb96ed3b3a9","isSidechain":true,"agentId":"aa1b8ee79ef99e3f5","message":{"model":"claude-fable-5","id":"msg_01V7QvKyB7DvvpN9sNb9CqSv","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_01C5JVJ1kKM4zYTbHMwdkM7a","name":"Read","input":{"file_path":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp/src/lib/wp/client.ts"},"caller":{"type":"direct"}}],"stop_reason":null,"stop_sequence":null,"stop_details":null,"usage":{"input_tokens":2,"cache_creation_input_tokens":6277,"cache_read_input_tokens":57655,"cache_creation":{"ephemeral_5m_input_tokens":6277,"ephemeral_1h_input_tokens":0},"output_tokens":37,"service_tier":"standard","inference_geo":"not_available"},"diagnostics":null},"requestId":"req_011CbyPLRNkZqCX4zVqvAUEq","attributionAgent":"general-purpose","type":"assistant","uuid":"af65b172-f265-4797-a568-591fab49fc1b","timestamp":"2026-06-12T12:43:50.191Z","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"af65b172-f265-4797-a568-591fab49fc1b","isSidechain":true,"promptId":"2791882b-bb7e-4f2e-be7f-672bab599788","agentId":"aa1b8ee79ef99e3f5","type":"user","message":{"role":"user","content":[{"tool_use_id":"toolu_01C5JVJ1kKM4zYTbHMwdkM7a","type":"tool_result","content":"1\t// Client GraphQL minimal pour WPGraphQL (fetch natif, cache Next taggué).\n2\t\n3\tconst WP_GRAPHQL_URL = process.env.WORDPRESS_GRAPHQL_URL;\n4\t\n5\t/** Indique si le backend WordPress est configuré (sinon le front utilisera ses fallbacks). */\n6\texport const isWpConfigured = () => Boolean(process.env.WORDPRESS_GRAPHQL_URL);\n7\t\n8\tinterface GraphQLError {\n9\t  message: string;\n10\t  locations?: { line: number; column: number }[];\n11\t  path?: (string | number)[];\n12\t}\n13\t\n14\tinterface GraphQLResponse<T> {\n15\t  data?: T;\n16\t  errors?: GraphQLError[];\n17\t}\n18\t\n19\t/**\n20\t * POST une query GraphQL vers WordPress.\n21\t * Cache : `revalidate: false` + tags — invalidation uniquement via /api/revalidate.\n22\t */\n23\texport async function fetchGraphQL<T>(\n24\t  query: string,\n25\t  variables?: Record<string, unknown>,\n26\t  opts?: { tags?: string[] }\n27\t): Promise<T> {\n28\t  if (!WP_GRAPHQL_URL) {\n29\t    throw new Error(\n30\t      \"WORDPRESS_GRAPHQL_URL manquant : définis la variable d'environnement (ex. https://covalba-admin.paf-studio.dev/graphql) avant d'appeler fetchGraphQL.\"\n31\t    );\n32\t  }\n33\t\n34\t  const res = await fetch(WP_GRAPHQL_URL, {\n35\t    method: \"POST\",\n36\t    headers: { \"Content-Type\": \"application/json\" },\n37\t    body: JSON.stringify({ query, variables }),\n38\t    next: {\n39\t      revalidate: false as const,\n40\t      tags: [\"wordpress\", ...(opts?.tags ?? [])],\n41\t    },\n42\t  });\n43\t\n44\t  if (!res.ok) {\n45\t    const body = await res.text().catch(() => \"\");\n46\t    throw new Error(\n47\t      `WPGraphQL HTTP ${res.status} ${res.statusText} sur ${WP_GRAPHQL_URL}${body ? ` — ${body.slice(0, 500)}` : \"\"}`\n48\t    );\n49\t  }\n50\t\n51\t  const json = (await res.json()) as GraphQLResponse<T>;\n52\t\n53\t  if (json.errors?.length) {\n54\t    const details = json.errors\n55\t      .map((e) => {\n56\t        const loc = e.locations?.map((l) => `${l.line}:${l.column}`).join(\",\");\n57\t        const path = e.path?.join(\".\");\n58\t        return `${e.message}${path ? ` (path: ${path})` : \"\"}${loc ? ` (loc: ${loc})` : \"\"}`;\n59\t      })\n60\t      .join(\" | \");\n61\t    throw new Error(`Erreurs GraphQL WordPress : ${details}`);\n62\t  }\n63\t\n64\t  if (json.data === undefined) {\n65\t    throw new Error(\"Réponse GraphQL WordPress sans champ data.\");\n66\t  }\n67\t\n68\t  return json.data;\n69\t}\n70\t"}]},"uuid":"61b7dc6b-3060-4f8a-b645-de1e69ce1f0a","timestamp":"2026-06-12T12:43:50.217Z","sourceToolAssistantUUID":"af65b172-f265-4797-a568-591fab49fc1b","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"61b7dc6b-3060-4f8a-b645-de1e69ce1f0a","isSidechain":true,"agentId":"aa1b8ee79ef99e3f5","message":{"model":"claude-fable-5","id":"msg_01V7QvKyB7DvvpN9sNb9CqSv","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_014HUaCKTVPtpYSn1LpqKnMu","name":"Read","input":{"file_path":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp/src/lib/wp/fragments/prefix.ts"},"caller":{"type":"direct"}}],"stop_reason":null,"stop_sequence":null,"stop_details":null,"usage":{"input_tokens":2,"cache_creation_input_tokens":6277,"cache_read_input_tokens":57655,"cache_creation":{"ephemeral_5m_input_tokens":6277,"ephemeral_1h_input_tokens":0},"output_tokens":37,"service_tier":"standard","inference_geo":"not_available"},"diagnostics":null},"requestId":"req_011CbyPLRNkZqCX4zVqvAUEq","attributionAgent":"general-purpose","type":"assistant","uuid":"fecd084f-17c8-4b9f-ac03-ef486ad5477b","timestamp":"2026-06-12T12:43:51.161Z","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"fecd084f-17c8-4b9f-ac03-ef486ad5477b","isSidechain":true,"promptId":"2791882b-bb7e-4f2e-be7f-672bab599788","agentId":"aa1b8ee79ef99e3f5","type":"user","message":{"role":"user","content":[{"tool_use_id":"toolu_014HUaCKTVPtpYSn1LpqKnMu","type":"tool_result","content":"1\t// Préfixe des types GraphQL générés par WPGraphQL for ACF v2 pour les layouts\n2\t// du flexible content `sections`. Le nom exact dépend du field group côté WP\n3\t// (« Sections de page ») — il n'est pas connu d'avance, d'où l'override par env.\n4\t// Convention SCHEMA.md : chaque type se termine par `{LayoutPascal}Layout`.\n5\texport const SECTIONS_TYPE_PREFIX =\n6\t  process.env.WP_SECTIONS_TYPE_PREFIX || \"SectionsSections\";\n7\t"}]},"uuid":"61424e82-b8f3-4a40-93ac-38e756058b16","timestamp":"2026-06-12T12:43:51.182Z","sourceToolAssistantUUID":"fecd084f-17c8-4b9f-ac03-ef486ad5477b","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"61424e82-b8f3-4a40-93ac-38e756058b16","isSidechain":true,"agentId":"aa1b8ee79ef99e3f5","message":{"model":"claude-fable-5","id":"msg_01V7QvKyB7DvvpN9sNb9CqSv","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_01Uxxr2NJ7CAwZmv9bdrsc9Q","name":"Read","input":{"file_path":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp/src/lib/wp/seoToMetadata.ts"},"caller":{"type":"direct"}}],"stop_reason":null,"stop_sequence":null,"stop_details":null,"usage":{"input_tokens":2,"cache_creation_input_tokens":6277,"cache_read_input_tokens":57655,"cache_creation":{"ephemeral_5m_input_tokens":6277,"ephemeral_1h_input_tokens":0},"output_tokens":37,"service_tier":"standard","inference_geo":"not_available"},"diagnostics":null},"requestId":"req_011CbyPLRNkZqCX4zVqvAUEq","attributionAgent":"general-purpose","type":"assistant","uuid":"29f64a13-2913-486e-89c4-fdcc09f825d0","timestamp":"2026-06-12T12:43:51.640Z","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"29f64a13-2913-486e-89c4-fdcc09f825d0","isSidechain":true,"promptId":"2791882b-bb7e-4f2e-be7f-672bab599788","agentId":"aa1b8ee79ef99e3f5","type":"user","message":{"role":"user","content":[{"tool_use_id":"toolu_01Uxxr2NJ7CAwZmv9bdrsc9Q","type":"tool_result","content":"1\t// Conversion du groupe SEO WordPress (clone_seo) vers la Metadata API Next.\n2\t// Utilisé par toutes les routes branchées sur WP (CPT + pages one-off).\n3\t\n4\timport type { Metadata } from \"next\";\n5\timport type { WpSeo } from \"./types\";\n6\timport { mapImage } from \"./mappers\";\n7\t\n8\texport interface WpSeoFallback {\n9\t  title?: string;\n10\t  description?: string;\n11\t  canonical?: string;\n12\t}\n13\t\n14\t/**\n15\t * Construit la Metadata Next depuis le champ `seo` WordPress, avec fallback\n16\t * champ par champ (metas historiques en dur, canonical par défaut, etc.).\n17\t */\n18\texport function wpSeoToMetadata(\n19\t  seo: WpSeo | null | undefined,\n20\t  fallback: WpSeoFallback = {}\n21\t): Metadata {\n22\t  const title = seo?.titreSeo || fallback.title;\n23\t  const description = seo?.metaDescription || fallback.description;\n24\t  const canonical = seo?.canonical || fallback.canonical;\n25\t  const ogImage = mapImage(seo?.ogImage);\n26\t\n27\t  return {\n28\t    ...(title ? { title } : {}),\n29\t    ...(description ? { description } : {}),\n30\t    ...(canonical ? { alternates: { canonical } } : {}),\n31\t    ...(seo?.noindex ? { robots: { index: false, follow: false } } : {}),\n32\t    openGraph: {\n33\t      ...(title ? { title } : {}),\n34\t      ...(description ? { description } : {}),\n35\t      ...(canonical ? { url: canonical } : {}),\n36\t      type: \"website\",\n37\t      locale: \"fr_FR\",\n38\t      ...(ogImage\n39\t        ? {\n40\t            images: [\n41\t              {\n42\t                url: ogImage.sourceUrl,\n43\t                ...(ogImage.width ? { width: ogImage.width } : {}),\n44\t                ...(ogImage.height ? { height: ogImage.height } : {}),\n45\t                ...(ogImage.altText ? { alt: ogImage.altText } : {}),\n46\t              },\n47\t            ],\n48\t          }\n49\t        : {}),\n50\t    },\n51\t    twitter: {\n52\t      ...(title ? { title } : {}),\n53\t      ...(description ? { description } : {}),\n54\t      ...(ogImage\n55\t        ? { card: \"summary_large_image\" as const, images: [ogImage.sourceUrl] }\n56\t        : {}),\n57\t    },\n58\t  };\n59\t}\n60\t\n61\t/** Schéma BreadcrumbList JSON-LD (systématique sur les pages WP-driven). */\n62\texport function breadcrumbJsonLd(items: { name: string; url: string }[]) {\n63\t  return {\n64\t    \"@context\": \"https://schema.org\",\n65\t    \"@type\": \"BreadcrumbList\",\n66\t    itemListElement: items.map((item, index) => ({\n67\t      \"@type\": \"ListItem\",\n68\t      position: index + 1,\n69\t      name: item.name,\n70\t      item: item.url,\n71\t    })),\n72\t  };\n73\t}\n74\t"}]},"uuid":"6a677f91-27ca-4ab3-8db6-639cf3ca546d","timestamp":"2026-06-12T12:43:51.656Z","sourceToolAssistantUUID":"29f64a13-2913-486e-89c4-fdcc09f825d0","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"6a677f91-27ca-4ab3-8db6-639cf3ca546d","isSidechain":true,"agentId":"aa1b8ee79ef99e3f5","message":{"model":"claude-fable-5","id":"msg_01V7QvKyB7DvvpN9sNb9CqSv","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_01Bkg96Ld1q4cLTpBsfHxpa6","name":"Read","input":{"file_path":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp/src/components/blocks/BlockRenderer.tsx"},"caller":{"type":"direct"}}],"stop_reason":null,"stop_sequence":null,"stop_details":null,"usage":{"input_tokens":2,"cache_creation_input_tokens":6277,"cache_read_input_tokens":57655,"cache_creation":{"ephemeral_5m_input_tokens":6277,"ephemeral_1h_input_tokens":0},"output_tokens":37,"service_tier":"standard","inference_geo":"not_available"},"diagnostics":null},"requestId":"req_011CbyPLRNkZqCX4zVqvAUEq","attributionAgent":"general-purpose","type":"assistant","uuid":"67332497-27d4-4eb1-b2fe-1a5250bb2f6e","timestamp":"2026-06-12T12:43:52.179Z","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"67332497-27d4-4eb1-b2fe-1a5250bb2f6e","isSidechain":true,"promptId":"2791882b-bb7e-4f2e-be7f-672bab599788","agentId":"aa1b8ee79ef99e3f5","type":"user","message":{"role":"user","content":[{"tool_use_id":"toolu_01Bkg96Ld1q4cLTpBsfHxpa6","type":"tool_result","content":"1\t// Rendu des sections WordPress (flexible content `sections`).\n2\t// Server Component : matche chaque section sur le suffixe `...XxxLayout` de\n3\t// son `__typename` (cf. wordpress/SCHEMA.md) et monte le block correspondant.\n4\t\n5\timport type { ComponentType } from \"react\";\n6\timport type { WpSection } from \"@/lib/wp/types\";\n7\t\n8\timport Hero from \"./Hero\";\n9\timport BarreReassurance from \"./BarreReassurance\";\n10\timport GrilleCards from \"./GrilleCards\";\n11\timport TexteImage from \"./TexteImage\";\n12\timport Chiffres from \"./Chiffres\";\n13\timport TableauComparatif from \"./TableauComparatif\";\n14\timport TableauSituations from \"./TableauSituations\";\n15\timport Etapes from \"./Etapes\";\n16\timport Faq from \"./Faq\";\n17\timport Cta from \"./Cta\";\n18\timport TemoignagesVideo from \"./TemoignagesVideo\";\n19\timport Video from \"./Video\";\n20\timport Logos from \"./Logos\";\n21\timport Citation from \"./Citation\";\n22\timport ContenuSeo from \"./ContenuSeo\";\n23\timport CompatibiliteSupports from \"./CompatibiliteSupports\";\n24\timport GrilleSecteurs from \"./GrilleSecteurs\";\n25\timport GrilleSolutions from \"./GrilleSolutions\";\n26\timport ReferencesGrille from \"./ReferencesGrille\";\n27\timport Timeline from \"./Timeline\";\n28\timport ComposantReact from \"./ComposantReact\";\n29\timport SpecsTechniques from \"./SpecsTechniques\";\n30\timport Certifications from \"./Certifications\";\n31\timport VariantesProduit from \"./VariantesProduit\";\n32\timport AvantApres from \"./AvantApres\";\n33\timport FicheChantier from \"./FicheChantier\";\n34\t\n35\tconst registry: Record<string, ComponentType<any>> = {\n36\t  HeroLayout: Hero,\n37\t  BarreReassuranceLayout: BarreReassurance,\n38\t  GrilleCardsLayout: GrilleCards,\n39\t  TexteImageLayout: TexteImage,\n40\t  ChiffresLayout: Chiffres,\n41\t  TableauComparatifLayout: TableauComparatif,\n42\t  TableauSituationsLayout: TableauSituations,\n43\t  EtapesLayout: Etapes,\n44\t  FaqLayout: Faq,\n45\t  CtaLayout: Cta,\n46\t  TemoignagesVideoLayout: TemoignagesVideo,\n47\t  VideoLayout: Video,\n48\t  LogosLayout: Logos,\n49\t  CitationLayout: Citation,\n50\t  ContenuSeoLayout: ContenuSeo,\n51\t  CompatibiliteSupportsLayout: CompatibiliteSupports,\n52\t  GrilleSecteursLayout: GrilleSecteurs,\n53\t  GrilleSolutionsLayout: GrilleSolutions,\n54\t  ReferencesGrilleLayout: ReferencesGrille,\n55\t  TimelineLayout: Timeline,\n56\t  ComposantReactLayout: ComposantReact,\n57\t  SpecsTechniquesLayout: SpecsTechniques,\n58\t  CertificationsLayout: Certifications,\n59\t  VariantesProduitLayout: VariantesProduit,\n60\t  AvantApresLayout: AvantApres,\n61\t  FicheChantierLayout: FicheChantier,\n62\t};\n63\t\n64\t// Tri par longueur décroissante : `TemoignagesVideoLayout` doit matcher avant\n65\t// `VideoLayout` (les deux sont des suffixes valides du même __typename).\n66\tconst registryKeys = Object.keys(registry).sort((a, b) => b.length - a.length);\n67\t\n68\texport function BlockRenderer({\n69\t  sections,\n70\t}: {\n71\t  sections: WpSection[] | null | undefined;\n72\t}) {\n73\t  if (!sections?.length) return null;\n74\t\n75\t  return (\n76\t    <>\n77\t      {sections.map((section, i) => {\n78\t        const typename = section?.__typename;\n79\t        if (!typename) return null;\n80\t\n81\t        const key = registryKeys.find((k) => typename.endsWith(k));\n82\t        if (!key) {\n83\t          if (process.env.NODE_ENV !== \"production\") {\n84\t            console.warn(`[BlockRenderer] Layout inconnu : ${typename}`);\n85\t          }\n86\t          return null;\n87\t        }\n88\t\n89\t        const Block = registry[key];\n90\t        return <Block key={i} {...section} position={i} />;\n91\t      })}\n92\t    </>\n93\t  );\n94\t}\n95\t\n96\texport default BlockRenderer;\n97\t"}]},"uuid":"c1a302e6-347f-42a7-921c-9ba4137fab73","timestamp":"2026-06-12T12:43:52.195Z","sourceToolAssistantUUID":"67332497-27d4-4eb1-b2fe-1a5250bb2f6e","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"c1a302e6-347f-42a7-921c-9ba4137fab73","isSidechain":true,"agentId":"aa1b8ee79ef99e3f5","message":{"model":"claude-fable-5","id":"msg_01FxPvSywVQNVBunGMrHrYJG","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_012qzenKqpS5AH77c2MmAQCG","name":"Read","input":{"file_path":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp/wordpress/seed/lib.php"},"caller":{"type":"direct"}}],"stop_reason":null,"stop_sequence":null,"stop_details":null,"usage":{"input_tokens":339,"cache_creation_input_tokens":4503,"cache_read_input_tokens":63932,"cache_creation":{"ephemeral_5m_input_tokens":4503,"ephemeral_1h_input_tokens":0},"output_tokens":43,"service_tier":"standard","inference_geo":"not_available"},"diagnostics":null},"requestId":"req_011CbyPLz7jrXXCtmRiYyM2T","attributionAgent":"general-purpose","type":"assistant","uuid":"9ecd2cc5-2373-40eb-8376-6766f0e6a34a","timestamp":"2026-06-12T12:43:57.375Z","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"9ecd2cc5-2373-40eb-8376-6766f0e6a34a","isSidechain":true,"promptId":"2791882b-bb7e-4f2e-be7f-672bab599788","agentId":"aa1b8ee79ef99e3f5","type":"user","message":{"role":"user","content":[{"tool_use_id":"toolu_012qzenKqpS5AH77c2MmAQCG","type":"tool_result","content":"1\t<?php\n2\t/**\n3\t * Bibliothèque de seed Covalba — convertit du JSON \"sémantique\" (noms de champs\n4\t * snake_case du SCHEMA.md) en valeurs ACF écrites par field keys.\n5\t *\n6\t * Les maps nom→key sont lues depuis les définitions ACF réellement enregistrées\n7\t * (mu-plugin covalba-core), donc robustes aux renommages type items_certifications.\n8\t *\n9\t * Format JSON d'un document :\n10\t * {\n11\t *   \"type\": \"page|produit|toiture|industrie|reference|options\",\n12\t *   \"slug\": \"...\", \"title\": \"...\", \"status\": \"publish\",\n13\t *   \"parent\": \"slug-parent\" (optionnel, pages),\n14\t *   \"seo\": { \"titre_seo\": ..., \"meta_description\": ..., ... },\n15\t *   \"fiche_produit\": {...}, \"fiche_reference\": {...},\n16\t *   \"secteurs\": [\"logistique\"], \"types_support\": [\"bac-acier\"],\n17\t *   \"sections\": [ { \"layout\": \"hero\", \"titre\": \"...\", \"image\": {\"path\": \"...\", \"alt\": \"...\"}, ... } ]\n18\t * }\n19\t *\n20\t * Images : { \"path\": \"images/toitures/x.webp\", \"alt\": \"...\" } — path relatif à\n21\t * CVBSEED_ASSETS_DIR (les assets sont rsyncés sur le VPS avant le seed).\n22\t */\n23\t\n24\tdefined('ABSPATH') || exit;\n25\t\n26\tconst CVBSEED_ASSETS_DIR = '/var/www/html/wp-content/seed-assets';\n27\t\n28\t/** Upload (ou retrouve) un média par chemin source. Dédupe via meta _covalba_source_path. */\n29\tfunction cvbseed_media(string $path, string $alt = ''): int {\n30\t    $path = ltrim($path, '/');\n31\t    $existing = get_posts([\n32\t        'post_type' => 'attachment', 'posts_per_page' => 1, 'fields' => 'ids',\n33\t        'meta_key' => '_covalba_source_path', 'meta_value' => $path,\n34\t    ]);\n35\t    if ($existing) {\n36\t        if ($alt) update_post_meta($existing[0], '_wp_attachment_image_alt', $alt);\n37\t        return (int) $existing[0];\n38\t    }\n39\t    $abs = CVBSEED_ASSETS_DIR . '/' . $path;\n40\t    if (!file_exists($abs)) {\n41\t        WP_CLI::warning(\"asset introuvable : $path\");\n42\t        return 0;\n43\t    }\n44\t    // Copie temporaire : media_handle_sideload déplace le fichier\n45\t    $tmp = wp_tempnam(basename($abs));\n46\t    copy($abs, $tmp);\n47\t    require_once ABSPATH . 'wp-admin/includes/image.php';\n48\t    require_once ABSPATH . 'wp-admin/includes/file.php';\n49\t    require_once ABSPATH . 'wp-admin/includes/media.php';\n50\t    $id = media_handle_sideload(['name' => basename($abs), 'tmp_name' => $tmp], 0);\n51\t    if (is_wp_error($id)) {\n52\t        WP_CLI::warning(\"upload échoué $path : \" . $id->get_error_message());\n53\t        return 0;\n54\t    }\n55\t    update_post_meta($id, '_covalba_source_path', $path);\n56\t    if ($alt) update_post_meta($id, '_wp_attachment_image_alt', $alt);\n57\t    return (int) $id;\n58\t}\n59\t\n60\t/** name → définition de champ, pour une liste de sub_fields ACF. */\n61\tfunction cvbseed_index_fields(array $fields): array {\n62\t    $map = [];\n63\t    foreach ($fields as $f) {\n64\t        if (!empty($f['name'])) $map[$f['name']] = $f;\n65\t    }\n66\t    return $map;\n67\t}\n68\t\n69\t/** Convertit une valeur sémantique selon la définition ACF du champ. */\n70\tfunction cvbseed_value(array $field, $value) {\n71\t    switch ($field['type']) {\n72\t        case 'image':\n73\t        case 'file':\n74\t            if (is_array($value) && isset($value['path'])) {\n75\t                return cvbseed_media($value['path'], $value['alt'] ?? '');\n76\t            }\n77\t            return is_numeric($value) ? (int) $value : 0;\n78\t        case 'repeater':\n79\t            $sub = cvbseed_index_fields($field['sub_fields'] ?? []);\n80\t            $rows = [];\n81\t            foreach ((array) $value as $row) {\n82\t                $r = [];\n83\t                foreach ((array) $row as $name => $v) {\n84\t                    if (!isset($sub[$name])) { WP_CLI::warning(\"sous-champ inconnu '{$name}' dans {$field['name']}\"); continue; }\n85\t                    $r[$sub[$name]['key']] = cvbseed_value($sub[$name], $v);\n86\t                }\n87\t                $rows[] = $r;\n88\t            }\n89\t            return $rows;\n90\t        case 'group':\n91\t            $sub = cvbseed_index_fields($field['sub_fields'] ?? []);\n92\t            $g = [];\n93\t            foreach ((array) $value as $name => $v) {\n94\t                if (!isset($sub[$name])) { WP_CLI::warning(\"sous-champ inconnu '{$name}' dans {$field['name']}\"); continue; }\n95\t                $g[$sub[$name]['key']] = cvbseed_value($sub[$name], $v);\n96\t            }\n97\t            return $g;\n98\t        case 'true_false':\n99\t            return $value ? 1 : 0;\n100\t        case 'relationship':\n101\t        case 'post_object':\n102\t            // valeur = liste de slugs -> IDs (tous post types covalba confondus)\n103\t            $ids = [];\n104\t            foreach ((array) $value as $slug) {\n105\t                $p = cvbseed_find_post($slug);\n106\t                if ($p) $ids[] = $p;\n107\t            }\n108\t            return $ids;\n109\t        default:\n110\t            return $value;\n111\t    }\n112\t}\n113\t\n114\tfunction cvbseed_find_post(string $slug): int {\n115\t    foreach (['produit', 'toiture', 'industrie', 'reference', 'page'] as $type) {\n116\t        $posts = get_posts(['post_type' => $type, 'name' => $slug, 'posts_per_page' => 1, 'fields' => 'ids', 'post_status' => 'any']);\n117\t        if ($posts) return (int) $posts[0];\n118\t    }\n119\t    return 0;\n120\t}\n121\t\n122\t/** Convertit le tableau \"sections\" sémantique en valeur flexible par field keys. */\n123\tfunction cvbseed_sections(array $sections): array {\n124\t    $flex = acf_get_field('field_cvb_sections');\n125\t    if (!$flex) { WP_CLI::error('field_cvb_sections introuvable — ACF/mu-plugin absents ?'); }\n126\t    $layouts = [];\n127\t    foreach ($flex['layouts'] as $l) $layouts[$l['name']] = cvbseed_index_fields($l['sub_fields'] ?? []);\n128\t\n129\t    $rows = [];\n130\t    foreach ($sections as $i => $s) {\n131\t        $layout = $s['layout'] ?? null;\n132\t        if (!$layout || !isset($layouts[$layout])) { WP_CLI::warning(\"layout inconnu '#{$i}: {$layout}'\"); continue; }\n133\t        $row = ['acf_fc_layout' => $layout];\n134\t        foreach ($s as $name => $v) {\n135\t            if ($name === 'layout') continue;\n136\t            $def = $layouts[$layout][$name] ?? null;\n137\t            if (!$def) { WP_CLI::warning(\"champ inconnu '{$name}' du layout {$layout}\"); continue; }\n138\t            $row[$def['key']] = cvbseed_value($def, $v);\n139\t        }\n140\t        $rows[] = $row;\n141\t    }\n142\t    return $rows;\n143\t}\n144\t\n145\t/** Écrit un groupe de champs (seo, fiche_produit, fiche_reference) par keys. */\n146\tfunction cvbseed_group(string $groupFieldPrefix, array $values, int $post_id, array $nameToDef): void {\n147\t    foreach ($values as $name => $v) {\n148\t        if (!isset($nameToDef[$name])) { WP_CLI::warning(\"champ inconnu '{$name}' ({$groupFieldPrefix})\"); continue; }\n149\t        update_field($nameToDef[$name]['key'], cvbseed_value($nameToDef[$name], $v), $post_id);\n150\t    }\n151\t}\n152\t\n153\t/** Map name→def des champs d'un field group ACF (par key de group). */\n154\tfunction cvbseed_group_fields(string $group_key): array {\n155\t    $fields = acf_get_fields($group_key) ?: [];\n156\t    return cvbseed_index_fields($fields);\n157\t}\n158\t\n159\t/** Seed un document JSON. Idempotent (recherche par slug). */\n160\tfunction cvbseed_document(array $doc): void {\n161\t    $type = $doc['type'] ?? 'page';\n162\t\n163\t    if ($type === 'options') {\n164\t        // Champs des options : update_field(key, value, 'option')\n165\t        $fields = cvbseed_group_fields('group_cvb_options');\n166\t        foreach ($doc['fields'] ?? [] as $name => $v) {\n167\t            if (!isset($fields[$name])) { WP_CLI::warning(\"option inconnue '{$name}'\"); continue; }\n168\t            update_field($fields[$name]['key'], cvbseed_value($fields[$name], $v), 'option');\n169\t        }\n170\t        WP_CLI::success('options mises à jour');\n171\t        return;\n172\t    }\n173\t\n174\t    $slug = $doc['slug'];\n175\t    $existing = get_posts(['post_type' => $type, 'name' => $slug, 'posts_per_page' => 1, 'fields' => 'ids', 'post_status' => 'any']);\n176\t    $args = [\n177\t        'post_type' => $type,\n178\t        'post_title' => $doc['title'] ?? $slug,\n179\t        'post_name' => $slug,\n180\t        'post_status' => $doc['status'] ?? 'publish',\n181\t    ];\n182\t    if (!empty($doc['parent'])) {\n183\t        $parent = get_posts(['post_type' => 'page', 'name' => $doc['parent'], 'posts_per_page' => 1, 'fields' => 'ids', 'post_status' => 'any']);\n184\t        if ($parent) $args['post_parent'] = $parent[0];\n185\t    }\n186\t    if ($existing) {\n187\t        $args['ID'] = $existing[0];\n188\t        $post_id = wp_update_post($args);\n189\t    } else {\n190\t        $post_id = wp_insert_post($args);\n191\t    }\n192\t    if (is_wp_error($post_id) || !$post_id) { WP_CLI::warning(\"échec post $slug\"); return; }\n193\t\n194\t    if (!empty($doc['thumbnail']['path'])) {\n195\t        $mid = cvbseed_media($doc['thumbnail']['path'], $doc['thumbnail']['alt'] ?? '');\n196\t        if ($mid) set_post_thumbnail($post_id, $mid);\n197\t    }\n198\t    foreach (['secteurs' => 'secteur', 'types_support' => 'type_support'] as $k => $tax) {\n199\t        if (!empty($doc[$k])) wp_set_object_terms($post_id, $doc[$k], $tax);\n200\t    }\n201\t    if (!empty($doc['seo'])) {\n202\t        cvbseed_group('seo', $doc['seo'], $post_id, cvbseed_group_fields('group_cvb_seo'));\n203\t    }\n204\t    if (!empty($doc['fiche_produit'])) {\n205\t        cvbseed_group('fiche_produit', $doc['fiche_produit'], $post_id, cvbseed_group_fields('group_cvb_fiche_produit'));\n206\t    }\n207\t    if (!empty($doc['fiche_reference'])) {\n208\t        cvbseed_group('fiche_reference', $doc['fiche_reference'], $post_id, cvbseed_group_fields('group_cvb_fiche_reference'));\n209\t    }\n210\t    if (isset($doc['sections'])) {\n211\t        update_field('field_cvb_sections', cvbseed_sections($doc['sections']), $post_id);\n212\t    }\n213\t    WP_CLI::success(\"$type/$slug → #$post_id (\" . count($doc['sections'] ?? []) . ' sections)');\n214\t}\n215\t"}]},"uuid":"ae7eef6a-6961-4244-9ac5-2a4dfbd596b6","timestamp":"2026-06-12T12:43:57.383Z","sourceToolAssistantUUID":"9ecd2cc5-2373-40eb-8376-6766f0e6a34a","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"ae7eef6a-6961-4244-9ac5-2a4dfbd596b6","isSidechain":true,"agentId":"aa1b8ee79ef99e3f5","message":{"model":"claude-fable-5","id":"msg_01FxPvSywVQNVBunGMrHrYJG","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_01GTkVyHq1dzoqR1W465y9PF","name":"Read","input":{"file_path":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp/wordpress/seed/run.php"},"caller":{"type":"direct"}}],"stop_reason":null,"stop_sequence":null,"stop_details":null,"usage":{"input_tokens":339,"cache_creation_input_tokens":4503,"cache_read_input_tokens":63932,"cache_creation":{"ephemeral_5m_input_tokens":4503,"ephemeral_1h_input_tokens":0},"output_tokens":43,"service_tier":"standard","inference_geo":"not_available"},"diagnostics":null},"requestId":"req_011CbyPLz7jrXXCtmRiYyM2T","attributionAgent":"general-purpose","type":"assistant","uuid":"a64ece30-1aeb-483a-a77c-65afca6df1b5","timestamp":"2026-06-12T12:43:57.871Z","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"a64ece30-1aeb-483a-a77c-65afca6df1b5","isSidechain":true,"promptId":"2791882b-bb7e-4f2e-be7f-672bab599788","agentId":"aa1b8ee79ef99e3f5","type":"user","message":{"role":"user","content":[{"tool_use_id":"toolu_01GTkVyHq1dzoqR1W465y9PF","type":"tool_result","content":"1\t<?php\n2\t/**\n3\t * Runner de seed : wp eval-file wp-content/seed/run.php [pattern]\n4\t * Lit tous les wp-content/seed/content/*.json (ou ceux qui matchent le pattern)\n5\t * et les seed via lib.php. Idempotent, relançable.\n6\t */\n7\t\n8\tdefined('ABSPATH') || exit;\n9\t\n10\trequire_once __DIR__ . '/lib.php';\n11\t\n12\t$pattern = $args[0] ?? '*';\n13\t$files = glob(__DIR__ . \"/content/{$pattern}.json\");\n14\tif (!$files) { WP_CLI::error(\"aucun fichier content/{$pattern}.json\"); }\n15\t\n16\t// Deux passes : les relationships (grille_solutions, références liées...) ont\n17\t// besoin que tous les posts existent. Passe 1 = posts nus, passe 2 = champs.\n18\t$docs = [];\n19\tforeach ($files as $f) {\n20\t    $doc = json_decode(file_get_contents($f), true);\n21\t    if (json_last_error() !== JSON_ERROR_NONE) { WP_CLI::warning(basename($f) . ' : JSON invalide — ' . json_last_error_msg()); continue; }\n22\t    $docs[basename($f)] = $doc;\n23\t}\n24\t\n25\tforeach ($docs as $name => $doc) {\n26\t    if (($doc['type'] ?? 'page') === 'options') continue;\n27\t    $type = $doc['type'] ?? 'page';\n28\t    $slug = $doc['slug'] ?? null;\n29\t    if (!$slug) { WP_CLI::warning(\"$name : slug manquant\"); continue; }\n30\t    if (!cvbseed_find_post($slug)) {\n31\t        wp_insert_post(['post_type' => $type, 'post_title' => $doc['title'] ?? $slug, 'post_name' => $slug, 'post_status' => $doc['status'] ?? 'publish']);\n32\t    }\n33\t}\n34\t\n35\tforeach ($docs as $name => $doc) {\n36\t    WP_CLI::log(\"— $name\");\n37\t    cvbseed_document($doc);\n38\t}\n39\t\n40\tWP_CLI::success('seed terminé (' . count($docs) . ' documents)');\n41\t"}]},"uuid":"b16a34aa-63b9-432e-92d2-2a342124e3f1","timestamp":"2026-06-12T12:43:57.896Z","sourceToolAssistantUUID":"a64ece30-1aeb-483a-a77c-65afca6df1b5","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"b16a34aa-63b9-432e-92d2-2a342124e3f1","isSidechain":true,"agentId":"aa1b8ee79ef99e3f5","message":{"model":"claude-fable-5","id":"msg_01FxPvSywVQNVBunGMrHrYJG","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_017C8JDEDt8VvfEjtBPi8LDF","name":"Read","input":{"file_path":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp/wordpress/seed/content/_FORMAT.md"},"caller":{"type":"direct"}}],"stop_reason":null,"stop_sequence":null,"stop_details":null,"usage":{"input_tokens":339,"cache_creation_input_tokens":4503,"cache_read_input_tokens":63932,"cache_creation":{"ephemeral_5m_input_tokens":4503,"ephemeral_1h_input_tokens":0},"output_tokens":43,"service_tier":"standard","inference_geo":"not_available"},"diagnostics":null},"requestId":"req_011CbyPLz7jrXXCtmRiYyM2T","attributionAgent":"general-purpose","type":"assistant","uuid":"847df6c8-d43e-49b3-98a2-c4fb3023c249","timestamp":"2026-06-12T12:43:58.434Z","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"847df6c8-d43e-49b3-98a2-c4fb3023c249","isSidechain":true,"promptId":"2791882b-bb7e-4f2e-be7f-672bab599788","agentId":"aa1b8ee79ef99e3f5","type":"user","message":{"role":"user","content":[{"tool_use_id":"toolu_017C8JDEDt8VvfEjtBPi8LDF","type":"tool_result","content":"1\t# Format des documents de seed (lu par seed/run.php + lib.php)\n2\t\n3\tUn fichier JSON par contenu. Champs par NOM ACF snake_case (PAS le camelCase GraphQL).\n4\t\n5\t```json\n6\t{\n7\t  \"type\": \"page | produit | toiture | industrie | reference | options\",\n8\t  \"slug\": \"bac-acier\",\n9\t  \"title\": \"Titre admin du post\",\n10\t  \"status\": \"publish\",\n11\t  \"seo\": { \"titre_seo\": \"...\", \"meta_description\": \"...\", \"canonical\": \"https://www.covalba.fr/...\" },\n12\t  \"secteurs\": [\"logistique\"],\n13\t  \"fiche_produit\": { \"product_name\": \"...\", \"tagline\": \"...\", \"accent_color\": \"#0d3840\", \"garantie\": \"...\", \"sri\": \"...\", \"prix\": \"...\" },\n14\t  \"fiche_reference\": { \"client_name\": \"...\", \"location\": \"...\", \"support\": \"...\", \"surface\": \"...\", \"metrics\": [{\"value\": \"...\", \"label\": \"...\"}], \"quote\": {\"texte\": \"...\", \"auteur\": \"...\", \"role\": \"...\"}, \"video_url\": \"...\", \"show_in_grid\": true },\n15\t  \"sections\": [\n16\t    { \"layout\": \"hero\", \"variante\": \"standard\", \"titre\": \"Un toit plus *frais*\", \"lead\": \"...\",\n17\t      \"image\": { \"path\": \"images/toitures/x.webp\", \"alt\": \"...\" },\n18\t      \"stats\": [{ \"value\": \"-10°C\", \"label\": \"sous toiture\" }],\n19\t      \"cta_primaire\": { \"label\": \"Diagnostic gratuit\", \"lien\": \"/diagnostic\", \"style\": \"primary\" } }\n20\t  ]\n21\t}\n22\t```\n23\t\n24\t- Images : `{ \"path\": \"images/...\" | \"assets/...\", \"alt\": \"...\" }` — `images/` = public/images, `assets/` = src/assets.\n25\t- Accent dans les titres : `*texte accentué*`.\n26\t- Entête de section : `\"entete\": { \"badge\": \"...\", \"titre\": \"...\", \"intro\": \"...\" }`.\n27\t- Champs renommés (collisions GraphQL) : `lignes_comparatif` (tableau_comparatif), `lignes_situations` (tableau_situations), `lignes_specs` + `colonnes_specs` (specs_techniques), `items_certifications` (certifications).\n28\t- Options : `{ \"type\": \"options\", \"fields\": { \"menu_principal\": [...], \"colonnes_footer\": [...], ... } }`.\n29\t- Layouts + champs exacts : voir wordpress/SCHEMA.md (source de vérité).\n30\t"}]},"uuid":"a776cd95-ea60-431c-9b5c-bbe8ef9af38a","timestamp":"2026-06-12T12:43:58.456Z","sourceToolAssistantUUID":"847df6c8-d43e-49b3-98a2-c4fb3023c249","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"a776cd95-ea60-431c-9b5c-bbe8ef9af38a","isSidechain":true,"agentId":"aa1b8ee79ef99e3f5","message":{"model":"claude-fable-5","id":"msg_01WcUjX1EvFCWN8UzM1jzZkG","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_01WWDNi3jUNrK96uzFMr8MYU","name":"Read","input":{"file_path":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp/app/wp/[...uri]/page.tsx"},"caller":{"type":"direct"}}],"stop_reason":null,"stop_sequence":null,"stop_details":null,"usage":{"input_tokens":2,"cache_creation_input_tokens":6746,"cache_read_input_tokens":68435,"cache_creation":{"ephemeral_5m_input_tokens":6746,"ephemeral_1h_input_tokens":0},"output_tokens":39,"service_tier":"standard","inference_geo":"not_available"},"diagnostics":null},"requestId":"req_011CbyPMTcUD9VmLrJsp8Jw5","attributionAgent":"general-purpose","type":"assistant","uuid":"e2ba815b-1a56-47a4-acc6-291f4d8c5e3d","timestamp":"2026-06-12T12:44:04.452Z","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"e2ba815b-1a56-47a4-acc6-291f4d8c5e3d","isSidechain":true,"promptId":"2791882b-bb7e-4f2e-be7f-672bab599788","agentId":"aa1b8ee79ef99e3f5","type":"user","message":{"role":"user","content":[{"tool_use_id":"toolu_01WWDNi3jUNrK96uzFMr8MYU","type":"tool_result","content":"1\timport type { Metadata } from \"next\";\n2\timport { notFound } from \"next/navigation\";\n3\timport { BlockRenderer } from \"@/components/blocks/BlockRenderer\";\n4\timport Navbar from \"@/components/Navbar\";\n5\timport Footer from \"@/components/Footer\";\n6\timport { getWpPage } from \"@/lib/wp/queries/page\";\n7\timport { getProduit } from \"@/lib/wp/queries/produit\";\n8\timport { getToiture } from \"@/lib/wp/queries/toiture\";\n9\timport { getIndustrie } from \"@/lib/wp/queries/industrie\";\n10\timport { getReference } from \"@/lib/wp/queries/reference\";\n11\timport { isWpConfigured } from \"@/lib/wp/client\";\n12\timport type { WpSection } from \"@/lib/wp/types\";\n13\t\n14\t// Préviz : rend n'importe quel contenu WordPress via le BlockRenderer,\n15\t// avant le branchement des vraies routes. Jamais indexée.\n16\t// - /wp/<slug-de-page>            → page native\n17\t// - /wp/<cpt>/<slug>              → produit | toiture | industrie | reference\n18\texport const metadata: Metadata = { robots: { index: false, follow: false } };\n19\texport const dynamic = \"force-dynamic\";\n20\t\n21\tconst CPT_GETTERS: Record<\n22\t  string,\n23\t  (slug: string) => Promise<{ sections?: { sections?: WpSection[] | null } | null } | null>\n24\t> = {\n25\t  produit: getProduit,\n26\t  toiture: getToiture,\n27\t  industrie: getIndustrie,\n28\t  reference: getReference,\n29\t};\n30\t\n31\texport default async function WpPreviewPage({\n32\t  params,\n33\t}: {\n34\t  params: Promise<{ uri: string[] }>;\n35\t}) {\n36\t  if (!isWpConfigured()) notFound();\n37\t  const { uri } = await params;\n38\t\n39\t  const content =\n40\t    uri.length === 2 && CPT_GETTERS[uri[0]]\n41\t      ? await CPT_GETTERS[uri[0]](uri[1])\n42\t      : await getWpPage(`/${uri.join(\"/\")}`);\n43\t  if (!content) notFound();\n44\t\n45\t  return (\n46\t    <div className=\"min-h-screen bg-background\">\n47\t      <Navbar />\n48\t      <main>\n49\t        <BlockRenderer sections={content.sections?.sections} />\n50\t      </main>\n51\t      <Footer />\n52\t    </div>\n53\t  );\n54\t}\n55\t"}]},"uuid":"fc871041-f558-44f8-bb0d-99ff54b6f405","timestamp":"2026-06-12T12:44:04.475Z","sourceToolAssistantUUID":"e2ba815b-1a56-47a4-acc6-291f4d8c5e3d","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"fc871041-f558-44f8-bb0d-99ff54b6f405","isSidechain":true,"agentId":"aa1b8ee79ef99e3f5","message":{"model":"claude-fable-5","id":"msg_01WcUjX1EvFCWN8UzM1jzZkG","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_01FWskY6hTkiJQ1TwZRdcUt2","name":"Read","input":{"file_path":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp/app/toitures/[slug]/page.tsx"},"caller":{"type":"direct"}}],"stop_reason":null,"stop_sequence":null,"stop_details":null,"usage":{"input_tokens":2,"cache_creation_input_tokens":6746,"cache_read_input_tokens":68435,"cache_creation":{"ephemeral_5m_input_tokens":6746,"ephemeral_1h_input_tokens":0},"output_tokens":39,"service_tier":"standard","inference_geo":"not_available"},"diagnostics":null},"requestId":"req_011CbyPMTcUD9VmLrJsp8Jw5","attributionAgent":"general-purpose","type":"assistant","uuid":"27fed2cc-7193-4a07-a652-2c8e82dabe04","timestamp":"2026-06-12T12:44:09.313Z","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"27fed2cc-7193-4a07-a652-2c8e82dabe04","isSidechain":true,"promptId":"2791882b-bb7e-4f2e-be7f-672bab599788","agentId":"aa1b8ee79ef99e3f5","type":"user","message":{"role":"user","content":[{"tool_use_id":"toolu_01FWskY6hTkiJQ1TwZRdcUt2","type":"tool_result","content":"1\timport type { Metadata } from \"next\";\n2\timport { notFound } from \"next/navigation\";\n3\t\n4\timport Navbar from \"@/components/Navbar\";\n5\timport Footer from \"@/components/Footer\";\n6\timport StickyMobileCTA from \"@/components/StickyMobileCTA\";\n7\timport JsonLd from \"@/components/seo/JsonLd\";\n8\timport { BlockRenderer } from \"@/components/blocks/BlockRenderer\";\n9\timport { SITE_URL } from \"@/lib/seo\";\n10\timport { getAllToitureSlugs, getToiture } from \"@/lib/wp/queries/toiture\";\n11\timport { breadcrumbJsonLd, wpSeoToMetadata } from \"@/lib/wp/seoToMetadata\";\n12\t\n13\t// Pages toitures pilotées par WordPress (CPT `toiture`).\n14\t// Le FAQPage JSON-LD est émis par le block faq (option json_ld côté WP).\n15\texport const dynamicParams = true;\n16\t\n17\texport async function generateStaticParams() {\n18\t  const slugs = await getAllToitureSlugs();\n19\t  return slugs.map((slug) => ({ slug }));\n20\t}\n21\t\n22\texport async function generateMetadata({\n23\t  params,\n24\t}: {\n25\t  params: Promise<{ slug: string }>;\n26\t}): Promise<Metadata> {\n27\t  const { slug } = await params;\n28\t  const toiture = await getToiture(slug);\n29\t  if (!toiture) return {};\n30\t\n31\t  return wpSeoToMetadata(toiture.seo, {\n32\t    title: toiture.title ?? undefined,\n33\t    canonical: `${SITE_URL}/toitures/${slug}`,\n34\t  });\n35\t}\n36\t\n37\texport default async function Page({\n38\t  params,\n39\t}: {\n40\t  params: Promise<{ slug: string }>;\n41\t}) {\n42\t  const { slug } = await params;\n43\t  const toiture = await getToiture(slug);\n44\t  if (!toiture) notFound();\n45\t\n46\t  return (\n47\t    <div className=\"min-h-screen bg-background\">\n48\t      <JsonLd\n49\t        id={`toiture-${slug}-breadcrumb-jsonld`}\n50\t        data={breadcrumbJsonLd([\n51\t          { name: \"Accueil\", url: `${SITE_URL}/` },\n52\t          { name: \"Toitures\", url: `${SITE_URL}/toitures` },\n53\t          { name: toiture.title ?? slug, url: `${SITE_URL}/toitures/${slug}` },\n54\t        ])}\n55\t      />\n56\t      <Navbar />\n57\t      <main>\n58\t        <BlockRenderer sections={toiture.sections?.sections} />\n59\t      </main>\n60\t      <Footer />\n61\t      <StickyMobileCTA />\n62\t    </div>\n63\t  );\n64\t}\n65\t"}]},"uuid":"51e4e3a7-ab13-4684-a663-7216ffda2e7b","timestamp":"2026-06-12T12:44:09.349Z","sourceToolAssistantUUID":"27fed2cc-7193-4a07-a652-2c8e82dabe04","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"51e4e3a7-ab13-4684-a663-7216ffda2e7b","isSidechain":true,"agentId":"aa1b8ee79ef99e3f5","message":{"model":"claude-fable-5","id":"msg_01WcUjX1EvFCWN8UzM1jzZkG","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_016noEG1ZAhVf28sMGKvWaqh","name":"Bash","input":{"command":"cat /opt/projects/.covalba-wp-worktrees/tom-passage-wp/src/lib/wp/fragments/hero.ts /opt/projects/.covalba-wp-worktrees/tom-passage-wp/src/lib/wp/fragments/shared.ts 2>/dev/null; echo ===; ls /opt/projects/.covalba-wp-worktrees/tom-passage-wp/app/api/revalidate/ 2>/dev/null && cat /opt/projects/.covalba-wp-worktrees/tom-passage-wp/app/api/revalidate/route.ts","description":"Read hero fragment, shared fragments, revalidate route"},"caller":{"type":"direct"}}],"stop_reason":null,"stop_sequence":null,"stop_details":null,"usage":{"input_tokens":2,"cache_creation_input_tokens":6746,"cache_read_input_tokens":68435,"cache_creation":{"ephemeral_5m_input_tokens":6746,"ephemeral_1h_input_tokens":0},"output_tokens":39,"service_tier":"standard","inference_geo":"not_available"},"diagnostics":null},"requestId":"req_011CbyPMTcUD9VmLrJsp8Jw5","attributionAgent":"general-purpose","type":"assistant","uuid":"e247ec89-cb47-4e65-9e19-dabfe28b595c","timestamp":"2026-06-12T12:44:10.763Z","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"e247ec89-cb47-4e65-9e19-dabfe28b595c","isSidechain":true,"promptId":"2791882b-bb7e-4f2e-be7f-672bab599788","agentId":"aa1b8ee79ef99e3f5","type":"user","message":{"role":"user","content":[{"tool_use_id":"toolu_016noEG1ZAhVf28sMGKvWaqh","type":"tool_result","content":"import { SECTIONS_TYPE_PREFIX } from \"./prefix\";\nimport { CTA_FIELDS, IMAGE_FIELDS } from \"./shared\";\n\nexport const HERO_FRAGMENT = /* GraphQL */ `\n  fragment HeroFields on ${SECTIONS_TYPE_PREFIX}HeroLayout {\n    __typename\n    variante\n    eyebrow\n    titre\n    lead\n    image ${IMAGE_FIELDS}\n    stats {\n      value\n      label\n    }\n    badges {\n      texte\n    }\n    ctaPrimaire ${CTA_FIELDS}\n    ctaSecondaire ${CTA_FIELDS}\n  }\n`;\n// Sélections GraphQL partagées entre fragments (clones du SCHEMA).\n\n/** Champ image ACF (return_format array → connection edge côté GraphQL). */\nexport const IMAGE_FIELDS = /* GraphQL */ `{\n  node {\n    sourceUrl\n    altText\n    mediaDetails {\n      width\n      height\n    }\n  }\n}`;\n\n/** Champ fichier ACF (PDF…). */\nexport const FILE_FIELDS = /* GraphQL */ `{\n  node {\n    mediaItemUrl\n    title\n  }\n}`;\n\n/** Clone clone_cta. */\nexport const CTA_FIELDS = /* GraphQL */ `{\n  label\n  lien\n  style\n}`;\n\n/** Clone clone_entete_section. */\nexport const ENTETE_FIELDS = /* GraphQL */ `{\n  badge\n  titre\n  intro\n}`;\n\n/** Groupe clone_seo (exposé sous `seo` sur tous les types). */\nexport const SEO_FIELDS = /* GraphQL */ `{\n  titreSeo\n  metaDescription\n  canonical\n  ogImage ${IMAGE_FIELDS}\n  noindex\n}`;\n===\nroute.ts\n// Revalidation on-demand déclenchée par WordPress (webhook save_post → POST ici).\n// Auth : header `x-revalidate-secret` (POST) ou ?secret= (GET de test manuel).\n\nimport { revalidatePath, revalidateTag } from \"next/cache\";\nimport { NextRequest, NextResponse } from \"next/server\";\n\ninterface RevalidateBody {\n  tags?: string[];\n  paths?: string[];\n}\n\nfunction unauthorized() {\n  return NextResponse.json({ revalidated: false, error: \"Invalid secret\" }, { status: 401 });\n}\n\nfunction isAuthorized(secret: string | null): boolean {\n  const expected = process.env.REVALIDATE_SECRET;\n  return Boolean(expected) && secret === expected;\n}\n\nexport async function POST(request: NextRequest) {\n  if (!isAuthorized(request.headers.get(\"x-revalidate-secret\"))) {\n    return unauthorized();\n  }\n\n  let body: RevalidateBody = {};\n  try {\n    body = (await request.json()) as RevalidateBody;\n  } catch {\n    return NextResponse.json(\n      { revalidated: false, error: \"Body JSON invalide (attendu { tags?: string[], paths?: string[] })\" },\n      { status: 400 }\n    );\n  }\n\n  const tags = Array.isArray(body.tags) ? body.tags.filter(Boolean) : [];\n  const paths = Array.isArray(body.paths) ? body.paths.filter(Boolean) : [];\n\n  // Next 16 : le profil \"max\" correspond aux entrées cachées sans expiration\n  // (revalidate: false côté fetchGraphQL) — purge complète du tag.\n  for (const tag of tags) revalidateTag(tag, \"max\");\n  for (const path of paths) revalidatePath(path);\n\n  return NextResponse.json({ revalidated: true, tags, paths, now: Date.now() });\n}\n\n// Test manuel : GET /api/revalidate?secret=xxx&tag=page&path=/contact\nexport async function GET(request: NextRequest) {\n  const { searchParams } = request.nextUrl;\n  if (!isAuthorized(searchParams.get(\"secret\"))) {\n    return unauthorized();\n  }\n\n  const tags = searchParams.getAll(\"tag\").filter(Boolean);\n  const paths = searchParams.getAll(\"path\").filter(Boolean);\n\n  for (const tag of tags) revalidateTag(tag, \"max\");\n  for (const path of paths) revalidatePath(path);\n\n  return NextResponse.json({ revalidated: true, tags, paths, now: Date.now() });\n}","is_error":false}]},"uuid":"6150667c-b576-4242-a7b9-aab767d2db1e","timestamp":"2026-06-12T12:44:10.855Z","sourceToolAssistantUUID":"e247ec89-cb47-4e65-9e19-dabfe28b595c","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"6150667c-b576-4242-a7b9-aab767d2db1e","isSidechain":true,"agentId":"aa1b8ee79ef99e3f5","message":{"model":"claude-fable-5","id":"msg_01KpJsbWZ64BPAVTRHaHNJv2","type":"message","role":"assistant","content":[{"type":"thinking","thinking":"","signature":"CAIStAMKYggOGAIqQMMONa/VJar4+s/YZhWJtDFzgFAaa+OPxTkY7qm6NP7T0m+8P0Ye9/qy7EO6IHStxXecQAXNPUowpc+9QfPv4HYyDmNsYXVkZS1mYWJsZS01OAFCCHRoaW5raW5nEgxpxmMAjG9inmQcddgaDEg9Sld/kBSFGSmTQiIwHbGx41h1EB1jaGwUZnwrP0NKkhCHKEBp3DsBXOOzgRmpIPPF11JWkvi1rIRdr8nIKv8BQGSGBxMsKIm3U5GIEsM9uvjuLLIDxR2qGyhiqQkHyeB1zjjcKMBS6oxZ5GY3gUMnaz85PrpFDgwmNDbvkrb5paIO6RXhU6YAGtP678as8YMuyNmegOwf/BLDYFri90Qy4/sAsb2XtEldmA7WqR/13twfsPli0p76YnQYRvyBFPzVJxvsOErXZHL+9foHQjvUVsZ2P1YOH+FPpvbn9iCAefpp4Ym1cwX+ntPP2YFPKNG3ksMcguWywC6ipN5fvm9P+CY3zKeg6rP9KtnaNuDpgAgjHCJebCu5SXf5WHCIeWdtTNxq0EKByh0cKfyqCsHuU5NYtQ8hOz6HYCuUa7EOGAE="}],"stop_reason":null,"stop_sequence":null,"stop_details":null,"usage":{"input_tokens":2,"cache_creation_input_tokens":3924,"cache_read_input_tokens":75181,"cache_creation":{"ephemeral_5m_input_tokens":3924,"ephemeral_1h_input_tokens":0},"output_tokens":6,"service_tier":"standard","inference_geo":"not_available"},"diagnostics":null},"requestId":"req_011CbyPNMvC8MHzjGVNbVdEg","attributionAgent":"general-purpose","type":"assistant","uuid":"071d297f-f17f-4e68-9244-247f3075b015","timestamp":"2026-06-12T12:44:15.844Z","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"071d297f-f17f-4e68-9244-247f3075b015","isSidechain":true,"agentId":"aa1b8ee79ef99e3f5","message":{"model":"claude-fable-5","id":"msg_01KpJsbWZ64BPAVTRHaHNJv2","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_01FXCW2wqBt9B3Er6in1ke3H","name":"Bash","input":{"command":"cat /opt/projects/.covalba-wp-worktrees/tom-passage-wp/wordpress/mu-plugins/covalba-core/inc/security.php; echo ====; sed -n 1,60p /opt/projects/.covalba-wp-worktrees/tom-passage-wp/wordpress/mu-plugins/covalba-core/inc/admin.php; echo ====; cat /opt/projects/.covalba-wp-worktrees/tom-passage-wp/wordpress/mu-plugins/covalba-core/inc/field-groups/layouts/hero.php; echo ====; cat /opt/projects/.covalba-wp-worktrees/tom-passage-wp/src/lib/wp/queries/toiture.ts","description":"Read security, admin filter, hero layout, toiture query"},"caller":{"type":"direct"}}],"stop_reason":"tool_use","stop_sequence":null,"stop_details":null,"usage":{"input_tokens":2,"cache_creation_input_tokens":3924,"cache_read_input_tokens":75181,"output_tokens":423,"server_tool_use":{"web_search_requests":0,"web_fetch_requests":0},"service_tier":"standard","cache_creation":{"ephemeral_1h_input_tokens":0,"ephemeral_5m_input_tokens":3924},"inference_geo":"not_available","iterations":[{"input_tokens":2,"output_tokens":423,"cache_read_input_tokens":75181,"cache_creation_input_tokens":3924,"cache_creation":{"ephemeral_5m_input_tokens":3924,"ephemeral_1h_input_tokens":0},"type":"message"}],"speed":"standard"},"diagnostics":null},"requestId":"req_011CbyPNMvC8MHzjGVNbVdEg","attributionAgent":"general-purpose","type":"assistant","uuid":"a08affc1-d052-4493-9417-b43efa5b3b70","timestamp":"2026-06-12T12:44:19.026Z","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"a08affc1-d052-4493-9417-b43efa5b3b70","isSidechain":true,"promptId":"2791882b-bb7e-4f2e-be7f-672bab599788","agentId":"aa1b8ee79ef99e3f5","type":"user","message":{"role":"user","content":[{"tool_use_id":"toolu_01FXCW2wqBt9B3Er6in1ke3H","type":"tool_result","content":"<?php\n/**\n * Durcissement headless : XML-RPC off, endpoint REST users masqué\n * pour les non-connectés, pings désactivés.\n */\n\ndefined('ABSPATH') || exit;\n\n// XML-RPC inutile en headless.\nadd_filter('xmlrpc_enabled', '__return_false');\n\n// Pas d'énumération d'utilisateurs via /wp/v2/users pour les non-connectés.\nadd_filter('rest_endpoints', 'cvb_restrict_users_rest_endpoint');\n\nfunction cvb_restrict_users_rest_endpoint(array $endpoints): array {\n    if (is_user_logged_in()) {\n        return $endpoints;\n    }\n    unset($endpoints['/wp/v2/users'], $endpoints['/wp/v2/users/(?P<id>[\\d]+)']);\n\n    return $endpoints;\n}\n\n// Désactiver les pings (pingbacks/trackbacks).\nadd_filter('pings_open', '__return_false', 20);\nadd_filter('xmlrpc_methods', 'cvb_remove_pingback_methods');\n\nfunction cvb_remove_pingback_methods(array $methods): array {\n    unset($methods['pingback.ping'], $methods['pingback.extensions.getPingbacks']);\n\n    return $methods;\n}\n====\n<?php\n/**\n * Confort back-office : filtrage des layouts du flexible par type de contenu\n * (table « Filtrage BO » du SCHEMA — n'affecte pas le schéma GraphQL)\n * + colonne « Slug » dans les listings admin.\n */\n\ndefined('ABSPATH') || exit;\n\nadd_filter('acf/load_field/name=sections', 'cvb_filter_sections_layouts');\n\nfunction cvb_filter_sections_layouts(array $field): array {\n    // Uniquement le flexible content du BO — jamais en GraphQL/front\n    // (le repeater `sections` du layout contenu_seo matche aussi ce filtre, d'où le test de key).\n    if (!is_admin() || ($field['key'] ?? '') !== 'field_cvb_sections' || empty($field['layouts'])) {\n        return $field;\n    }\n\n    $post_type = cvb_current_admin_post_type();\n    if (!$post_type) {\n        return $field;\n    }\n\n    $exclusions = [\n        'page'      => ['specs_techniques', 'variantes_produit', 'fiche_chantier'],\n        'produit'   => ['fiche_chantier'],\n        'toiture'   => ['specs_techniques', 'certifications', 'variantes_produit', 'fiche_chantier'],\n        'industrie' => ['specs_techniques', 'certifications', 'variantes_produit', 'fiche_chantier', 'avant_apres'],\n        'reference' => ['specs_techniques', 'variantes_produit', 'grille_secteurs'],\n    ];\n\n    if (!isset($exclusions[$post_type])) {\n        return $field;\n    }\n\n    $excluded = $exclusions[$post_type];\n\n    $field['layouts'] = array_filter(\n        $field['layouts'],\n        static fn(array $layout): bool => !in_array($layout['name'], $excluded, true)\n    );\n\n    return $field;\n}\n\n/** Type de contenu de l'écran admin courant. */\nfunction cvb_current_admin_post_type(): ?string {\n    if (function_exists('get_current_screen')) {\n        $screen = get_current_screen();\n        if ($screen && $screen->post_type) {\n            return $screen->post_type;\n        }\n    }\n    if (!empty($_GET['post'])) {\n        return get_post_type((int) $_GET['post']) ?: null;\n    }\n    if (!empty($_GET['post_type'])) {\n        return sanitize_key((string) $_GET['post_type']);\n    }\n    global $typenow;\n====\n<?php\n// Layout hero — bandeau d'ouverture de page. Pas d'entête.\n\ndefined('ABSPATH') || exit;\n\n$l = 'hero';\n\nreturn cvb_layout($l, 'Hero', [\n    cvb_select(\"field_cvb_{$l}_variante\", 'variante', 'Variante', [\n        'home'     => 'Home',\n        'standard' => 'Standard',\n        'compact'  => 'Compact',\n    ], 'standard'),\n    cvb_field(\"field_cvb_{$l}_eyebrow\", 'eyebrow', 'Eyebrow', 'text'),\n    cvb_field(\"field_cvb_{$l}_titre\", 'titre', 'Titre', 'text', [\n        'instructions' => \"Utiliser *texte* pour le span d'accent.\",\n    ]),\n    cvb_field(\"field_cvb_{$l}_lead\", 'lead', 'Lead', 'textarea', ['rows' => 3]),\n    cvb_image(\"field_cvb_{$l}_image\", 'image', 'Image'),\n    cvb_repeater(\"field_cvb_{$l}_stats\", 'stats', 'Stats', [\n        cvb_field(\"field_cvb_{$l}_stats_value\", 'value', 'Valeur', 'text'),\n        cvb_field(\"field_cvb_{$l}_stats_label\", 'label', 'Label', 'text'),\n    ], ['max' => 4, 'layout' => 'table']),\n    cvb_repeater(\"field_cvb_{$l}_badges\", 'badges', 'Badges', [\n        cvb_field(\"field_cvb_{$l}_badges_texte\", 'texte', 'Texte', 'text'),\n    ], ['layout' => 'table']),\n    cvb_clone_cta($l, 'cta_primaire', 'CTA primaire'),\n    cvb_clone_cta($l, 'cta_secondaire', 'CTA secondaire'),\n]);\n====\nimport { fetchGraphQL } from \"../client\";\nimport { SECTIONS_FIELD, SECTIONS_FRAGMENTS, SEO_FIELDS } from \"../fragments\";\nimport type { WpToiture } from \"../types\";\n\nconst TOITURE_QUERY = /* GraphQL */ `\n  ${SECTIONS_FRAGMENTS}\n  query GetToiture($slug: ID!) {\n    toiture(id: $slug, idType: SLUG) {\n      id\n      slug\n      title\n      seo ${SEO_FIELDS}\n      ${SECTIONS_FIELD}\n    }\n  }\n`;\n\n/** Récupère une page toiture (CPT `toiture`, rewrite /toitures) par slug. */\nexport async function getToiture(slug: string): Promise<WpToiture | null> {\n  const data = await fetchGraphQL<{ toiture: WpToiture | null }>(\n    TOITURE_QUERY,\n    { slug },\n    { tags: [\"toiture\", `toiture:${slug}`] }\n  );\n  return data.toiture ?? null;\n}\n\nconst ALL_TOITURE_SLUGS_QUERY = /* GraphQL */ `\n  query GetAllToitureSlugs($after: String) {\n    toitures(first: 100, after: $after, where: { status: PUBLISH }) {\n      pageInfo {\n        hasNextPage\n        endCursor\n      }\n      nodes {\n        slug\n      }\n    }\n  }\n`;\n\n/** Liste tous les slugs de toitures publiées (pagination par curseur). */\nexport async function getAllToitureSlugs(): Promise<string[]> {\n  const slugs: string[] = [];\n  let after: string | null = null;\n  let hasNextPage = true;\n\n  while (hasNextPage) {\n    const data = await fetchGraphQL<{\n      toitures: {\n        pageInfo: { hasNextPage: boolean; endCursor: string | null };\n        nodes: { slug: string | null }[] | null;\n      } | null;\n    }>(ALL_TOITURE_SLUGS_QUERY, { after }, { tags: [\"toiture\"] });\n\n    const toitures = data.toitures;\n    for (const node of toitures?.nodes ?? []) {\n      if (node.slug) slugs.push(node.slug);\n    }\n    hasNextPage = Boolean(toitures?.pageInfo?.hasNextPage);\n    after = toitures?.pageInfo?.endCursor ?? null;\n  }\n\n  return slugs;\n}","is_error":false}]},"uuid":"b9022501-ad88-499f-8346-50300c6f272c","timestamp":"2026-06-12T12:44:19.100Z","sourceToolAssistantUUID":"a08affc1-d052-4493-9417-b43efa5b3b70","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"b9022501-ad88-499f-8346-50300c6f272c","isSidechain":true,"agentId":"aa1b8ee79ef99e3f5","message":{"model":"claude-fable-5","id":"msg_01FkXt9YHC8EL9dLvUwKEbLN","type":"message","role":"assistant","content":[{"type":"thinking","thinking":"","signature":"CAISigMKYggOGAIqQIlQix85ssC7Bmw9DMbeKSZkNf/I9pqf9LcyNAmvEFWE+8Lho4lZ0v7LUgF69BubIpJGNsr/FayUxPbH1V6YYgIyDmNsYXVkZS1mYWJsZS01OAFCCHRoaW5raW5nEgzNcdaFg/uCP50OHCsaDE5HejWoVgodTxIrWCIwuUCO9InwJR4JVJivjUHe0yCTkjrKf+8J2jCotikpGBNixM07QLXmEYdyAbCaVfIrKtUBL8Y+7VVXqm7xq7uOch/1eoYPlKHFmwWZbNRlKz0aHVi6nj/ryh2SNbPTeF0+ICv/MYhyXEjoRCFCFfWHjxHSauLC1xLYFE3C39dQhwr0FV/mAvTcF8pJzjc9JphUmHH1sjoPJMv6DD+RngQgmF7lKV5Y/CSLHBhQErMriAwzYO2w1tOdkJFv/Vgmf9L0o0qZERESlvrnV6ZQw/Oo1//IsfNI03ocGZ+qf24iBWxMkqz7WqKjqXUrJJD9uRh0hZfC4djq78obt+QlkbBTaCWTXgjOlMUbGAE="}],"stop_reason":null,"stop_sequence":null,"stop_details":null,"usage":{"input_tokens":2,"cache_creation_input_tokens":3224,"cache_read_input_tokens":79105,"cache_creation":{"ephemeral_5m_input_tokens":3224,"ephemeral_1h_input_tokens":0},"output_tokens":9,"service_tier":"standard","inference_geo":"not_available"},"diagnostics":null},"requestId":"req_011CbyPNxvrusTBp8j1GBV1A","attributionAgent":"general-purpose","type":"assistant","uuid":"5dc66346-ba3d-4b58-86de-cc59a02c49c5","timestamp":"2026-06-12T12:44:23.802Z","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"5dc66346-ba3d-4b58-86de-cc59a02c49c5","isSidechain":true,"agentId":"aa1b8ee79ef99e3f5","message":{"model":"claude-fable-5","id":"msg_01FkXt9YHC8EL9dLvUwKEbLN","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_01WNSrdUn6hd9vZmJG8j47XK","name":"Bash","input":{"command":"cat /opt/projects/.covalba-wp-worktrees/tom-passage-wp/wordpress/mu-plugins/covalba-core/inc/graphql.php; echo ===; sed -n 1,40p /opt/projects/.covalba-wp-worktrees/tom-passage-wp/wordpress/mu-plugins/covalba-core/inc/options-pages.php; echo ===; cat /opt/projects/.covalba-wp-worktrees/tom-passage-wp/wordpress/php-overrides.ini; echo ===; sed -n 1,30p /opt/projects/.covalba-wp-worktrees/tom-passage-wp/wordpress/mu-plugins/covalba-core/inc/field-groups/sections.php","description":"Read graphql config, options pages, php overrides, sections field group"},"caller":{"type":"direct"}}],"stop_reason":"tool_use","stop_sequence":null,"stop_details":null,"usage":{"input_tokens":2,"cache_creation_input_tokens":3224,"cache_read_input_tokens":79105,"output_tokens":404,"server_tool_use":{"web_search_requests":0,"web_fetch_requests":0},"service_tier":"standard","cache_creation":{"ephemeral_1h_input_tokens":0,"ephemeral_5m_input_tokens":3224},"inference_geo":"not_available","iterations":[{"input_tokens":2,"output_tokens":404,"cache_read_input_tokens":79105,"cache_creation_input_tokens":3224,"cache_creation":{"ephemeral_5m_input_tokens":3224,"ephemeral_1h_input_tokens":0},"type":"message"}],"speed":"standard"},"diagnostics":null},"requestId":"req_011CbyPNxvrusTBp8j1GBV1A","attributionAgent":"general-purpose","type":"assistant","uuid":"ec9d2d75-c49c-4543-9e8b-f5e16955b3cd","timestamp":"2026-06-12T12:44:26.892Z","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"ec9d2d75-c49c-4543-9e8b-f5e16955b3cd","isSidechain":true,"promptId":"2791882b-bb7e-4f2e-be7f-672bab599788","agentId":"aa1b8ee79ef99e3f5","type":"user","message":{"role":"user","content":[{"tool_use_id":"toolu_01WNSrdUn6hd9vZmJG8j47XK","type":"tool_result","content":"<?php\n/**\n * Réglages WPGraphQL forcés par code : limite de profondeur de requête activée,\n * max 15 (le flexible `sections` génère des requêtes profondes mais bornées).\n */\n\ndefined('ABSPATH') || exit;\n\nadd_filter('option_graphql_general_settings', 'cvb_force_graphql_settings');\nadd_filter('default_option_graphql_general_settings', 'cvb_force_graphql_settings');\n\nfunction cvb_force_graphql_settings($settings) {\n    $settings = is_array($settings) ? $settings : [];\n    $settings['query_depth_enabled'] = 'on';\n    $settings['query_depth_max']     = 15;\n\n    return $settings;\n}\n\n// Message d'aide sur la page de réglages WPGraphQL.\nadd_action('admin_notices', 'cvb_graphql_settings_notice');\n\nfunction cvb_graphql_settings_notice(): void {\n    if (($_GET['page'] ?? '') !== 'graphql-settings') {\n        return;\n    }\n    echo '<div class=\"notice notice-info\"><p><strong>Covalba Core</strong> : la limite de '\n        . 'profondeur de requête est forcée par code (activée, max 15). Les valeurs saisies '\n        . 'ici pour ces deux réglages seront ignorées.</p></div>';\n}\n===\n<?php\n/**\n * Page d'options « Options du site » (slug options-site, capability edit_posts).\n * GraphQL : root optionsSite { options { … } } — le field group à 6 onglets\n * est exposé sous le champ `options` du type OptionsSite.\n */\n\ndefined('ABSPATH') || exit;\n\nadd_action('acf/init', 'cvb_register_options_site');\n\nfunction cvb_register_options_site(): void {\n    if (!function_exists('acf_add_options_page') || !function_exists('acf_add_local_field_group')) {\n        return;\n    }\n\n    acf_add_options_page([\n        'page_title'        => 'Options du site',\n        'menu_title'        => 'Options du site',\n        'menu_slug'         => 'options-site',\n        'capability'        => 'edit_posts',\n        'redirect'          => false,\n        'icon_url'          => 'dashicons-admin-settings',\n        'show_in_graphql'   => true,\n        'graphql_type_name' => 'OptionsSite',\n    ]);\n\n    $p = 'field_cvb_options';\n\n    acf_add_local_field_group([\n        'key'    => 'group_cvb_options',\n        'title'  => 'Options du site',\n        'fields' => [\n\n            // ── Onglet 1 : Navigation ────────────────────────────────────\n            cvb_tab(\"{$p}_tab_navigation\", 'Navigation'),\n            cvb_repeater(\"{$p}_menu_principal\", 'menu_principal', 'Menu principal', [\n                cvb_field(\"{$p}_menu_principal_label\", 'label', 'Label', 'text'),\n                cvb_field(\"{$p}_menu_principal_lien\", 'lien', 'Lien', 'text'),\n                cvb_repeater(\"{$p}_menu_principal_sous_items\", 'sous_items', 'Sous-items', [\n===\n; Seed médias + flexibles ACF volumineux\nupload_max_filesize = 64M\npost_max_size = 64M\nmemory_limit = 256M\nmax_execution_time = 300\nmax_input_vars = 5000\n===\n<?php\n/**\n * Field group « Sections de page » (group_cvb_sections).\n * Flexible content unique `sections` — 26 layouts, sur les 5 types de contenu.\n * GraphQL : post.sections { sections { ...layouts } } — les types des layouts\n * se terminent par {LayoutPascal}Layout (matching par suffixe côté front).\n */\n\ndefined('ABSPATH') || exit;\n\nadd_action('acf/init', 'cvb_register_sections_group');\n\nfunction cvb_register_sections_group(): void {\n    if (!function_exists('acf_add_local_field_group')) {\n        return;\n    }\n\n    // 1 fichier par layout — chaque fichier retourne le tableau du layout.\n    $files = [\n        'hero', 'barre-reassurance', 'grille-cards', 'texte-image', 'chiffres',\n        'tableau-comparatif', 'tableau-situations', 'etapes', 'faq', 'cta',\n        'temoignages-video', 'video', 'logos', 'citation', 'contenu-seo',\n        'compatibilite-supports', 'grille-secteurs', 'grille-solutions',\n        'references-grille', 'timeline', 'composant-react', 'specs-techniques',\n        'certifications', 'variantes-produit', 'avant-apres', 'fiche-chantier',\n    ];\n\n    $layouts = [];\n    foreach ($files as $file) {\n        $layout = require __DIR__ . '/layouts/' . $file . '.php';","is_error":false}]},"uuid":"d6d3efb0-83ea-4cd4-af03-43215725fdb3","timestamp":"2026-06-12T12:44:26.966Z","sourceToolAssistantUUID":"ec9d2d75-c49c-4543-9e8b-f5e16955b3cd","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"d6d3efb0-83ea-4cd4-af03-43215725fdb3","isSidechain":true,"agentId":"aa1b8ee79ef99e3f5","message":{"model":"claude-fable-5","id":"msg_014LXczAFpUTDugjZkJPrXSH","type":"message","role":"assistant","content":[{"type":"thinking","thinking":"","signature":"CAIShQwKYggOGAIqQP6GqasiKmJGmd0hwyVhtwDbwVwKd6UyCoz2d9O8HYF+aCBxiCxBgSjMERiHNVPQ8avdALhRvTEbbwG4N7IOBz8yDmNsYXVkZS1mYWJsZS01OAFCCHRoaW5raW5nEgxn2vI0OwsgxfOm098aDBSv3npti62tVRljaSIwd/4BiKP2A0j5ph1AD4KbUACi8f0cMSIVACgakkBcXirZ69gTcpIZJxE3BiJdRWsRKtAKbGFuXB4VXeSM9SYdkevu+XqD4MiE/UTWX+hIW2PxiRZ3wrDgcX6xHQxG9pQ+cd91LsWMGa8swXFVnHDvbIzP3d70mEN2fX9QcFUQmhC3+4gadL0DoWWlZ+44SfSVArJV2ysyIXD8RwKKgRViocLHsYxT6/pABb2ZFWMOpfyW4BhPDOCVxVyb/ZN7SMWpq179GH+GcKDiCfPiB6QHnqjJbdkWm8Dx807lyt+OYp5hI41GuF7WyXiHGxDbutajWoRjzQ2SaCSgzF7A9e0N3s3VqTcnP8YlLwze0Knga0pBDLllCtpTP7eBAhH2TqmA/xtKJZpZ7BCy6Jc5jOYQ1sqzOfdXrAi9zYGyIxFdyyR5BwRd83+a5BvYytSI9R9i3kJkXhhAy9ukuXwle0B4q7sQn+/mZkXZ4iolJ3ARg5sNYX4ARe/up49L2WMESDgvq/xUdu8XtEcYc59Ikrvg6V8sU9jXjUJqzX9K7lNMkoE2guugyKGTtVJuIj64+7l/ZObITWCVal039kc4v22OLzwfVBjkIssT9ievwamNVGKdZsCadAH4qgu84pgwxalc2hcDOk4U6pwIVszhA59eWc2fwd57BMGwXEP6ZYrfs9ms2FJ7y1nXbq0106DFvMDG2VnpNilVyoF0BlKpnbwWVip0Rc4lwDPB0DTd4Ced+8Wr1Nlr2rp8JHhOcozG3GSumbZH6mLT6O9iJogJUJ1+QxBj8zl0AVMENJncrJqmKWF7nCHGYOPB2pOsJQv1E1JI9O2egNGv0lb10KQ+n+dc54rPbJzmQIdrvM7OvFyghDQxBOaCL8SCeah/VZDE5xjLUQ5mGYjYdgJAVvzKiXlVTmmnIxAEOfx4CKYEeGnewi7pRvFEeXPaerNPnV9c9j8GkVbpkKBd72S7fhxNFvj8jx9PePtq5YZD8ly9v0/A4IFu++t57qmlZg2i31LQ0U2pAIPAr3quqbkRcMS0CNBmYsKzzppXbwyFBnsW+vlsWgXpCsdQzyqDkoe+Wi28J2pJCx9QYn318M2gNp3iSweCEspk3Bk8C3Z63NeSmQtfzDeaBQtpAjhdhm3fB7nsRgAXBNLivIG6DsD1RGJqA2TJrG1EwvthMpi4xWFlvNxYC3h96BxkLU2AE9VdLFOvYNMVPVV2ulaqVfOspWwKCPiOUyn6PL3clzfbEeQMNGQLS+ztuYJSddxuAfeMBKq/ZfpNK9LSfeKv23ADgkQgMcEjfjYY55KPhzFePnwFc8sLc3Z1qFAnwP0SwoTAxn4m+Hrik/814ZrvKVeFCx9SS4A3thMPU1USBc7lQxSA9Wz3X7XoH6S+KfUrY2JoPzbAa8ThywtC0qTW1FYqdBJMGvbNOUZbb74zn9T5ryNOpciFaga00wLbyTfTSYG77x3PuzKzPcdrOXcLzD8dyTL4ygOtQPN8oNY7bYaTIVgyzmA+zdqGBzDhBNDtTf6IXkgYenomh2qrUw1RwvgsxFMDoVtbN7gcDX6E6uHdWFdxeJsg1fpejg1Rn/i1jgOP42tzh+VZkPPtm7RkL+JXBS6e0/BqCWzaV6pdCqFGae7nv/67pHv4isnZxBEj2nsY2549fBRzz0T4r0Xo+VA76fKzr5TPpP3bfcEuUJr2PFJ0KJMaDEnYwlm6K7XkroXrFIpzi/YPcjMqYAD58Ee/Tr2mth+PY3JndG05dImmcM7xpdEv1yNbtKE3xUaIJt7Zm4xblSpjXTHtdLJKGBgsx5S4dK7XiLwFzc15BBscZcKNrja8B1d4c/fiC/3kxFCxP4tl7Z/OXDyyUD8KZj1EkqRKF/Di+W7bcxgB"}],"stop_reason":null,"stop_sequence":null,"stop_details":null,"usage":{"input_tokens":2,"cache_creation_input_tokens":2071,"cache_read_input_tokens":82329,"cache_creation":{"ephemeral_5m_input_tokens":2071,"ephemeral_1h_input_tokens":0},"output_tokens":3,"service_tier":"standard","inference_geo":"not_available"},"diagnostics":null},"requestId":"req_011CbyPPYYBwCMCkpit3Ecsj","attributionAgent":"general-purpose","type":"assistant","uuid":"1dbab3be-ee74-4192-b615-ff8c71a80497","timestamp":"2026-06-12T12:44:39.977Z","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"1dbab3be-ee74-4192-b615-ff8c71a80497","isSidechain":true,"agentId":"aa1b8ee79ef99e3f5","message":{"model":"claude-fable-5","id":"msg_014LXczAFpUTDugjZkJPrXSH","type":"message","role":"assistant","content":[{"type":"thinking","thinking":"","signature":"CAIS5wIKYwgOGAIqQAraczBwf+vhKCXeddlHk594aQn6dov1vETTyAttAIGYLVTgRLBFqMUldjfqRDyYsVnFilveTucVxZMeJ0lszbsyDmNsYXVkZS1mYWJsZS01OAFCCW5hcnJhdGlvbhIMtLqMXWhRK81hZ2ttGgx+XFYlRE0d1FgwBhYiMO7b4t3N/WER7VZ3C2uELRjeuN0w/JVLH/e7ZYZVRAcDlZ7UbVk9WPMPRtBRHfOzhSqxAYwiMjDhEMzC3GHG9HVjN7Z0min7pEEr6hy0/gHHOeLX9w8sZxJPx2AQIl3TPSfoesCcugLlPOXAD5VWXe8bqBvzhRkY6nxzkNI+fIt3oW4ja1fZaPZPcFwNN3izXwDOjoiG2EZ7DGZqmVIz1bzl1yUqbbi4QLYJmzGptAvaZVKxnEbUrUtBuUQWAlLacGNKzmcbBxchOSGZvF+8l2vJSEPVWCcfwXLgy9mo+ODrRMPi5xgB"}],"stop_reason":null,"stop_sequence":null,"stop_details":null,"usage":{"input_tokens":2,"cache_creation_input_tokens":2071,"cache_read_input_tokens":82329,"cache_creation":{"ephemeral_5m_input_tokens":2071,"ephemeral_1h_input_tokens":0},"output_tokens":3,"service_tier":"standard","inference_geo":"not_available"},"diagnostics":null},"requestId":"req_011CbyPPYYBwCMCkpit3Ecsj","attributionAgent":"general-purpose","type":"assistant","uuid":"24b40b0e-b367-454b-aa09-af77304c2d32","timestamp":"2026-06-12T12:44:39.980Z","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"24b40b0e-b367-454b-aa09-af77304c2d32","isSidechain":true,"agentId":"aa1b8ee79ef99e3f5","message":{"model":"claude-fable-5","id":"msg_014LXczAFpUTDugjZkJPrXSH","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_01Dv5UCjJfjDJpAGDPpaDhW6","name":"Write","input":{"file_path":"/opt/claude-code/library/skills/nextjs-wordpress-headless/SKILL.md","content":"---\nname: nextjs-wordpress-headless\ndescription: Branche un projet Next.js (App Router) sur un WordPress headless auto-hébergé (Docker sur VPS Ubuntu, ACF PRO Flexible Content + WPGraphQL) avec un catalogue de blocks réorganisables, revalidation par tags et seed idempotent. Gère pages one-off, CPT, options globales, SEO.\n---\n\n# Skill : Next.js → WordPress Headless (catalogue de blocks)\n\n## Quand utiliser\n\n- L'utilisateur dit \"branche sur WordPress\", \"connecte à WP\", \"headless WordPress\", \"ajoute WordPress\", \"rends le site éditable\"\n- L'utilisateur lance `/nextjs-wordpress-headless`\n- Un projet Next.js existe déjà (pages codées en dur) et doit devenir éditable via WordPress, avec des **sections réorganisables** par l'éditeur (ajouter/supprimer/déplacer des blocks sur n'importe quelle page)\n\nPlaceholders utilisés partout : `{{PROJECT}}` (nom projet, ex. covalba), `{{prefix}}` (préfixe court 3-4 lettres, ex. cvb), `{{WP_DOMAIN}}` (ex. admin.monsite.fr), `{{FRONT_URL}}`, `{{ACF_KEY}}`.\n\n---\n\n## 1. Architecture\n\n```\nWordPress (Docker, VPS Ubuntu)                    Next.js App Router\n┌─────────────────────────────┐                  ┌──────────────────────────┐\n│ ACF PRO Flexible Content    │   WPGraphQL +    │ lib/wp/client.ts (fetch, │\n│ → 1 champ `sections` UNIQUE │   WPGraphQL for  │   tags, revalidate:false)│\n│   partagé par tous les types│ ──── ACF ──────► │ 1 fragment / layout      │\n│ mu-plugin {{PROJECT}}-core  │                  │ BlockRenderer (registry) │\n│ (CPT, champs, sécurité,     │ ◄── webhook ──── │ /api/revalidate (tags)   │\n│  revalidation)              │   save_post      │ ISR : revalidate false   │\n└─────────────────────────────┘                  └──────────────────────────┘\n```\n\nPrincipes non négociables :\n\n- **Le front est 100 % Next.js.** WordPress n'est JAMAIS rendu publiquement : CPT en `publicly_queryable => false`, admin servi sur un sous-domaine avec `X-Robots-Tag: noindex` partout.\n- **Un seul flexible content `sections`** (le catalogue de blocks), localisé sur TOUS les types de contenu → un seul jeu d'union GraphQL, de fragments et un seul BlockRenderer.\n- **Cache Next par tags** (`revalidate: false` + tags), invalidé uniquement on-demand par WordPress.\n- **Tout le modèle de contenu vit en PHP dans le repo Next** (mu-plugin versionné, déployé par rsync). Un fichier `wordpress/SCHEMA.md` est le contrat : toute évolution met à jour en même temps le SCHEMA, le mu-plugin et `src/lib/wp/` + `src/components/blocks/`.\n\n---\n\n## 2. Modèle de contenu — règles\n\n### CPT vs page native vs champ vs options\n\n| Situation | Solution |\n|-----------|----------|\n| Template **répétable** (produit, réalisation, secteur, article, membre d'équipe) | **CPT** (avec route `[slug]` côté Next) |\n| Page **one-off** (home, contact, à-propos, landing) | **Page native WP** (post_type `page`) |\n| Liste fixe interne à une section (4 étapes d'un process) | Repeater DANS le layout |\n| Contenu global (nav, footer, coordonnées, logos clients, CTA sticky, SEO défaut) | **ACF Options Page** (avec onglets) |\n| Données métier structurées d'une fiche (nom produit, prix, garantie, client, surface…) | **Group ACF hors flexible** (ex. `ficheProduit`, `ficheReference`) — requêtable indépendamment des sections |\n| Même contenu affiché sur plusieurs pages | CPT + layout `relationship` (ex. `grille_solutions` → relationship vers produits) |\n\n### Le catalogue de blocks\n\n- **Chaque type de contenu partage le MÊME flexible `sections`.** Ne crée jamais un flexible par type : tu démultiplierais les unions GraphQL, les fragments et les renderers.\n- **Filtre le catalogue par type côté back-office** via `acf/load_field/name=sections` (retire les layouts hors sujet du tableau `$field['layouts']` quand `is_admin()`). Ça n'affecte PAS le schéma GraphQL — c'est purement du confort éditeur.\n- **Mutualise par STRUCTURE de données, pas par rendu visuel.** Vise ~20-30 layouts pour un site complet. Deux sections visuellement différentes mais qui portent les mêmes données = UN layout avec un select `variante` ou `theme` (ex. `hero` avec variante home/standard/compact ; `cta` avec variante mid/final/banner ; `grille_cards` avec `colonnes` et `theme`).\n- **Escape hatch `composant_react`** : un layout avec un select `composant` (liste blanche : simulateur, carte, formulaire…) qui monte un composant interactif codé côté front. C'est ce qui permet de garder les widgets complexes hors de WP sans casser la réorganisation des sections.\n- Sous-structures partagées : `entete` (badge/titre/intro) sur quasi tous les layouts, `cta` (label/lien/style) — voir §5.\n- Convention `*accent*` dans les titres → rendu `<span class=\"accent\">` côté front.\n- Icônes : select avec **liste blanche** de noms (lucide), jamais de champ texte libre.\n\n---\n\n## 3. Infra VPS Ubuntu — Docker Compose\n\nTout vit dans `wordpress/` à la racine du repo Next : `docker-compose.yml`, `php-overrides.ini`, `mu-plugins/{{PROJECT}}-core/`, `seed/`, `SCHEMA.md`, conf nginx.\n\n```yaml\n# wordpress/docker-compose.yml\nname: {{PROJECT}}-wp\n\nx-wp-env: &wp-env\n  WORDPRESS_DB_HOST: db\n  WORDPRESS_DB_NAME: {{PROJECT}}\n  WORDPRESS_DB_USER: {{PROJECT}}\n  WORDPRESS_DB_PASSWORD: ${DB_PASSWORD}\n  REVALIDATE_SECRET: ${REVALIDATE_SECRET:-}\n  FRONT_URLS: ${FRONT_URLS:-}\n  ACF_PRO_LICENSE: ${ACF_PRO_LICENSE:-}\n  # PIÈGE (b) : évalué au RUNTIME par wp-config.php (getenv_docker) → doit être\n  # présent dans TOUS les conteneurs qui exécutent WordPress (wordpress ET wpcli),\n  # d'où l'ancre YAML &wp-env partagée.\n  WORDPRESS_CONFIG_EXTRA: |\n    define('WP_HOME', 'https://{{WP_DOMAIN}}');\n    define('WP_SITEURL', 'https://{{WP_DOMAIN}}');\n    define('DISABLE_WP_CRON', true);\n    define('DISALLOW_FILE_EDIT', true);\n    define('AUTOMATIC_UPDATER_DISABLED', true);\n    define('WP_POST_REVISIONS', 5);\n    define('WP_ENVIRONMENT_TYPE', 'production');\n    define('FORCE_SSL_ADMIN', true);\n    define('WP_REDIS_HOST', 'redis');\n    define('WP_MEMORY_LIMIT', '256M');\n    define('REVALIDATE_SECRET', getenv('REVALIDATE_SECRET') ?: '');\n    define('FRONT_URLS', getenv('FRONT_URLS') ?: '');\n    define('ACF_PRO_LICENSE', getenv('ACF_PRO_LICENSE') ?: '');\n\nservices:\n  db:\n    image: mariadb:11\n    restart: unless-stopped\n    environment:\n      MARIADB_DATABASE: {{PROJECT}}\n      MARIADB_USER: {{PROJECT}}\n      MARIADB_PASSWORD: ${DB_PASSWORD}\n      MARIADB_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}\n    command: --innodb-buffer-pool-size=256M --max-connections=40\n    volumes:\n      - ./db-data:/var/lib/mysql\n    healthcheck:\n      test: [\"CMD\", \"healthcheck.sh\", \"--connect\", \"--innodb_initialized\"]\n      interval: 10s\n      retries: 6\n\n  wordpress:\n    image: wordpress:6.8-php8.3-apache\n    restart: unless-stopped\n    depends_on:\n      db: { condition: service_healthy }\n    ports:\n      - \"127.0.0.1:8080:80\"   # voir piège (d)\n    environment:\n      <<: *wp-env\n    volumes:\n      - wp-core:/var/www/html\n      - ./wp-content:/var/www/html/wp-content\n      - ./php-overrides.ini:/usr/local/etc/php/conf.d/zz-overrides.ini:ro\n\n  redis:\n    image: redis:7-alpine\n    restart: unless-stopped\n    command: --maxmemory 128mb --maxmemory-policy allkeys-lru\n\n  wpcli:\n    image: wordpress:cli-php8.3\n    profiles: [\"tools\"]      # jamais démarré par `up`, uniquement `run --rm`\n    user: \"33:33\"\n    depends_on:\n      db: { condition: service_healthy }\n    environment:\n      <<: *wp-env\n    volumes:\n      - wp-core:/var/www/html\n      - ./wp-content:/var/www/html/wp-content\n\nvolumes:\n  wp-core:\n```\n\n```ini\n# wordpress/php-overrides.ini — seed médias + flexibles volumineux\nupload_max_filesize = 64M\npost_max_size = 64M\nmemory_limit = 256M\nmax_execution_time = 300\nmax_input_vars = 5000\n```\n\nUsage wp-cli : `docker compose run --rm wpcli wp <commande>`.\nActiver le cache objet : plugin `redis-cache` + `wp redis enable`.\n\n### PIÈGES VÉCUS (compose)\n\n- **(a) Volume `wp-core` PARTAGÉ** entre `wordpress` et `wpcli`. Si wpcli monte son propre volume (ou rien), il ne voit pas le core installé → `Error: This does not seem to be a WordPress installation.`\n- **(b) `WORDPRESS_CONFIG_EXTRA` est évalué au runtime** par le `wp-config.php` de l'image (via `getenv_docker`), pas \"baked\" au premier démarrage. Il doit donc être dans l'env de TOUS les conteneurs WordPress → ancre YAML `&wp-env` + `<<: *wp-env`. Sinon wpcli tourne avec un wp-config différent (URLs, secrets absents).\n- **(c) Compose interpole `$` dans les chaînes** : du PHP avec `$_SERVER` dans `WORDPRESS_CONFIG_EXTRA` doit être échappé `$$_SERVER`. Mieux : n'y mets PAS de PHP avec `$` — l'image officielle gère déjà `X-Forwarded-Proto` (HTTPS derrière proxy), pas besoin du snippet classique.\n- **(d) Si le VPS héberge déjà un service sur 80/443** (autre site, dashboard…) : binde WP sur `127.0.0.1:8080` et termine le TLS avec un **vhost nginx hôte + certbot**. Sinon (VPS dédié), un service Caddy dans le compose fait l'affaire (`caddy reverse_proxy wordpress:80`).\n\n### Vhost nginx hôte (cas d)\n\n```nginx\n# /etc/nginx/sites-available/{{PROJECT}}-admin  (TLS : certbot --nginx -d {{WP_DOMAIN}})\nserver {\n    listen 80;\n    server_name {{WP_DOMAIN}};\n    client_max_body_size 64M;\n\n    # Le BO ne doit JAMAIS être indexé\n    add_header X-Robots-Tag \"noindex, nofollow\" always;\n\n    # XML-RPC : vecteur d'attaque, inutile en headless\n    location = /xmlrpc.php { return 403; }\n    location ~ ^/(wp-config\\.php|readme\\.html|license\\.txt)$ { return 404; }\n    location = /wp-content/debug.log { return 404; }\n\n    # Basic auth devant le login (2e barrière)\n    location = /wp-login.php {\n        auth_basic \"{{PROJECT}} Admin\";\n        auth_basic_user_file /etc/nginx/{{PROJECT}}-admin.htpasswd;\n        proxy_pass http://127.0.0.1:8080;\n        include /etc/nginx/snippets/{{PROJECT}}-admin-proxy.conf;\n    }\n\n    location / {\n        proxy_pass http://127.0.0.1:8080;\n        include /etc/nginx/snippets/{{PROJECT}}-admin-proxy.conf;\n    }\n}\n```\n\nLe snippet proxy contient les `proxy_set_header Host / X-Real-IP / X-Forwarded-For / X-Forwarded-Proto $scheme`.\n\n### Sécurité (récap)\n\n- `xmlrpc.php` → 403 (nginx) + `add_filter('xmlrpc_enabled', '__return_false')` (mu-plugin)\n- `X-Robots-Tag: noindex, nofollow` sur TOUT le domaine admin\n- Basic auth devant `wp-login.php`\n- `DISALLOW_FILE_EDIT`, `AUTOMATIC_UPDATER_DISABLED`\n- REST `/wp/v2/users` masqué aux non-connectés (`rest_endpoints` filter)\n- Introspection GraphQL **privée** (réglage WPGraphQL par défaut : la laisser désactivée en public) + query depth limit forcée par code (`option_graphql_general_settings` filter, max 15)\n\n### Cron hôte (backups + wp-cron)\n\n`DISABLE_WP_CRON` est défini → déclencher wp-cron depuis le cron hôte, et backuper DB + uploads avec rotation :\n\n```cron\n*/15 * * * * cd /opt/{{PROJECT}}/wordpress && docker compose run --rm wpcli wp cron event run --due-now >/dev/null 2>&1\n30 3 * * *   cd /opt/{{PROJECT}}/wordpress && docker compose exec -T db mariadb-dump -u root -p\"$DB_ROOT_PASSWORD\" {{PROJECT}} | gzip > /opt/backups/{{PROJECT}}-$(date +\\%F).sql.gz && tar czf /opt/backups/{{PROJECT}}-uploads-$(date +\\%F).tar.gz -C wp-content uploads && find /opt/backups -name '{{PROJECT}}-*' -mtime +14 -delete\n```\n\n---\n\n## 4. ACF PRO\n\nURL de téléchargement **qui marche** (vérifié — avec `&t=latest` ça 404) :\n\n```bash\ndocker compose run --rm wpcli wp plugin install \\\n  \"https://connect.advancedcustomfields.com/v2/plugins/download?p=pro&k={{ACF_KEY}}\" --activate\ndocker compose run --rm wpcli wp plugin install wp-graphql --activate\ndocker compose run --rm wpcli wp plugin install wpgraphql-acf --activate\ndocker compose run --rm wpcli wp plugin install redis-cache --activate\n```\n\nLicence : `define('ACF_PRO_LICENSE', getenv('ACF_PRO_LICENSE') ?: '')` dans `WORDPRESS_CONFIG_EXTRA` (clé dans le `.env` du compose, jamais commitée).\n\n---\n\n## 5. Enregistrement des champs — mu-plugin PHP versionné\n\nTout le modèle vit dans `wordpress/mu-plugins/{{PROJECT}}-core/` **dans le repo Next**, déployé par rsync :\n\n```bash\nrsync -av --delete wordpress/mu-plugins/ root@vps:/opt/{{PROJECT}}/wordpress/wp-content/mu-plugins/\n```\n\nStructure :\n\n```\n{{PROJECT}}-core.php          # bootstrap : require de tous les inc/\ninc/post-types.php            # CPT (publicly_queryable false, show_in_graphql true)\ninc/taxonomies.php\ninc/field-groups/helpers.php  # builders ({{prefix}}_field, _image, _repeater, _select…)\ninc/field-groups/sections.php # le flexible `sections` : assemble 1 fichier / layout\ninc/field-groups/layouts/*.php  # 1 fichier = 1 layout (return {{prefix}}_layout(...))\ninc/field-groups/seo.php      # groupe SEO (tous types, position high)\ninc/field-groups/fiche-*.php  # groups métier hors flexible\ninc/options-pages.php\ninc/admin.php                 # filtrage du catalogue par type (acf/load_field)\ninc/graphql.php               # réglages WPGraphQL forcés par code\ninc/security.php\ninc/revalidate.php\n```\n\nRègles :\n\n- **Mu-plugin no-op sans ACF** : tout le code ACF est dans des hooks `acf/init` gardés par `function_exists('acf_add_local_field_group')`. CPT, taxos, sécurité et revalidation fonctionnent même si ACF est désactivé.\n- **Field keys déterministes** : `field_{{prefix}}_{layout}_{champ}` (sous-champs : `..._{champ}_{sous_champ}`). Indispensable pour le seed (§9) et le debug.\n- **`graphql_field_name` camelCase systématique** sur chaque champ (helper qui convertit le `name` snake_case).\n- **Groups + helpers PLUTÔT que clones ACF** : pour les sous-structures partagées (entête de section, CTA), utilise des champs type `group` dont les sub_fields sont composés par helper. Le schéma GraphQL produit est exactement `entete { badge titre intro }` et `cta { label lien style }` — ce que les clones ACF ne garantissent pas (préfixage et types imprévisibles).\n\nSignatures des helpers (le cœur du système) :\n\n```php\nfunction {{prefix}}_camel(string $snake): string;            // snake → camelCase\nfunction {{prefix}}_field(string $key, string $name, string $label, string $type, array $extra = []): array;\n    // merge: show_in_graphql=1 + graphql_field_name={{prefix}}_camel($name)\nfunction {{prefix}}_image(string $key, string $name, string $label, array $extra = []): array;\n    // return_format 'array' — côté GraphQL : { node { sourceUrl altText … } }\nfunction {{prefix}}_repeater(string $key, string $name, string $label, array $sub_fields, array $extra = []): array;\nfunction {{prefix}}_select(string $key, string $name, string $label, array $choices, ?string $default = null): array;\nfunction {{prefix}}_clone_entete(string $layout): array;     // group `entete` (badge/titre/intro)\nfunction {{prefix}}_clone_cta(string $layout, string $name = 'cta', string $label = 'CTA'): array;\nfunction {{prefix}}_layout(string $name, string $label, array $sub_fields): array;  // enveloppe flexible\nfunction {{prefix}}_tab(string $key, string $label): array;  // onglet UI, show_in_graphql=0\n```\n\nExemple de layout (1 fichier = 1 layout, `return` du tableau) :\n\n```php\n<?php\n// inc/field-groups/layouts/hero.php\ndefined('ABSPATH') || exit;\n$l = 'hero';\n\nreturn {{prefix}}_layout($l, 'Hero', [\n    {{prefix}}_select(\"field_{{prefix}}_{$l}_variante\", 'variante', 'Variante',\n        ['home' => 'Home', 'standard' => 'Standard', 'compact' => 'Compact'], 'standard'),\n    {{prefix}}_field(\"field_{{prefix}}_{$l}_titre\", 'titre', 'Titre', 'text',\n        ['instructions' => \"Utiliser *texte* pour le span d'accent.\"]),\n    {{prefix}}_image(\"field_{{prefix}}_{$l}_image\", 'image', 'Image'),\n    {{prefix}}_repeater(\"field_{{prefix}}_{$l}_stats\", 'stats', 'Stats', [\n        {{prefix}}_field(\"field_{{prefix}}_{$l}_stats_value\", 'value', 'Valeur', 'text'),\n        {{prefix}}_field(\"field_{{prefix}}_{$l}_stats_label\", 'label', 'Label', 'text'),\n    ], ['max' => 4, 'layout' => 'table']),\n    {{prefix}}_clone_cta($l, 'cta_primaire', 'CTA primaire'),\n]);\n```\n\nLe groupe SEO (tous types + pages, `position => 'high'`, graphql `seo`) : `titre_seo` (text), `meta_description` (textarea rows 3), `canonical` (url), `og_image` (image), `noindex` (true_false).\n\n---\n\n## 6. ⚠️ PIÈGES WPGraphQL for ACF v2 (vécus — lire AVANT de coder les fragments)\n\n**(a) Nommage des types de layouts.** Chaque layout du flexible devient un type GraphQL nommé `{FieldGroupGraphql}{FlexFieldGraphql}{LayoutPascal}Layout` — ex. field group « Sections de page » + champ `sections` + layout `hero` → `SectionsSectionsHeroLayout`. Le préfixe exact dépend du titre du field group, donc côté Next :\n- matcher par **SUFFIXE** : `typename.endsWith('HeroLayout')` — jamais par nom complet ;\n- trier les clés du registry par **longueur décroissante** : `VideoLayout` est un suffixe valide de `...TemoignagesVideoLayout` ;\n- centraliser le préfixe dans une constante surchargeable par env (`WP_SECTIONS_TYPE_PREFIX`) pour les fragments.\n\n**(b) Types imbriqués nommés `{Prefix}{NomDuChamp}` SANS le layout parent.** Deux layouts qui réutilisent le même nom de champ imbriqué (`lignes`, `items`, `colonnes`…) avec des sous-champs DIFFÉRENTS **se télescopent silencieusement** (un seul type GraphQL gagne, l'autre perd des champs). Règle stricte : **un nom imbriqué réutilisé = sous-champs strictement identiques** (c'est OK pour `entete`, `cta`, `stats {value,label}`) ; sinon **suffixer par le layout** : `lignes_comparatif`, `lignes_situations`, `lignes_specs`, `items_certifications`.\n\n**(c) Images** : `return_format => 'array'` côté ACF, et côté GraphQL c'est une connection :\n```graphql\nimage { node { sourceUrl altText mediaDetails { width height } } }\n```\nFichiers (PDF) : `fichier { node { mediaItemUrl title } }`.\n\n**(d) Repeaters et flexibles vides sortent `null`** (pas `[]`) → toujours mapper `?? []`, jamais `.map()` direct.\n\n**(e) Ne JAMAIS renommer un `acf_fc_layout` publié** : les valeurs en base référencent le nom du layout ; un renommage orphelinise tout le contenu existant. Pareil pour les `name` de champs remplis.\n\n**(f) L'introspection publique est désactivée** (et doit le rester). On ne valide donc PAS les fragments par introspection : on **exécute la vraie requête** complète sur une page de test seedée (curl POST sur `/graphql`) et on vérifie l'absence d'`errors`.\n\n**(g) Options page** : les champs sont exposés sous un sous-objet — `optionsSite { options { menuPrincipal { ... } } }` (le field group devient le champ `options` du type `OptionsSite` défini par `graphql_type_name`).\n\n---\n\n## 7. Côté Next.js\n\nArborescence : `src/lib/wp/{client.ts, types.ts, mappers.ts, seoToMetadata.ts, fragments/, queries/}` + `src/components/blocks/`.\n\n### `lib/wp/client.ts`\n\n```typescript\nconst WP_GRAPHQL_URL = process.env.WORDPRESS_GRAPHQL_URL;\nexport const isWpConfigured = () => Boolean(WP_GRAPHQL_URL);\n\nexport async function fetchGraphQL<T>(\n  query: string,\n  variables?: Record<string, unknown>,\n  opts?: { tags?: string[] }\n): Promise<T> {\n  const res = await fetch(WP_GRAPHQL_URL!, {\n    method: \"POST\",\n    headers: { \"Content-Type\": \"application/json\" },\n    body: JSON.stringify({ query, variables }),\n    // Cache permanent, invalidé UNIQUEMENT via /api/revalidate\n    next: { revalidate: false as const, tags: [\"wordpress\", ...(opts?.tags ?? [])] },\n  });\n  if (!res.ok) throw new Error(`WPGraphQL HTTP ${res.status}`);\n  const json = await res.json();\n  if (json.errors?.length) throw new Error(`Erreurs GraphQL : ${JSON.stringify(json.errors)}`);\n  return json.data;\n}\n```\n\nPas de CORS à configurer : tous les fetch sont server-side (RSC).\n\n### Fragments — 1 fichier par layout + préfixe en constante\n\n```typescript\n// fragments/prefix.ts — le préfixe exact dépend du field group côté WP\nexport const SECTIONS_TYPE_PREFIX =\n  process.env.WP_SECTIONS_TYPE_PREFIX || \"SectionsSections\";\n\n// fragments/hero.ts\nexport const HERO_FRAGMENT = /* GraphQL */ `\n  fragment HeroFields on ${SECTIONS_TYPE_PREFIX}HeroLayout {\n    __typename\n    variante\n    titre\n    image ${IMAGE_FIELDS}\n    stats { value label }\n    ctaPrimaire ${CTA_FIELDS}\n  }\n`;\n```\n\n`fragments/shared.ts` exporte les sélections des clones : `IMAGE_FIELDS`, `FILE_FIELDS`, `CTA_FIELDS` (`{ label lien style }`), `ENTETE_FIELDS` (`{ badge titre intro }`), `SEO_FIELDS`. `fragments/index.ts` concatène tout en `SECTIONS_FRAGMENTS` + un `SECTIONS_FIELD` (le champ `sections { sections { ...HeroFields ... } }`) réutilisé par toutes les queries.\n\n### BlockRenderer — registry par suffixe\n\n```tsx\nconst registry: Record<string, ComponentType<any>> = {\n  HeroLayout: Hero,\n  GrilleCardsLayout: GrilleCards,\n  TemoignagesVideoLayout: TemoignagesVideo,\n  VideoLayout: Video,\n  // … 1 entrée par layout\n};\n// Longueur décroissante : TemoignagesVideoLayout doit matcher avant VideoLayout\nconst registryKeys = Object.keys(registry).sort((a, b) => b.length - a.length);\n\nexport function BlockRenderer({ sections }: { sections: WpSection[] | null | undefined }) {\n  if (!sections?.length) return null;\n  return (\n    <>\n      {sections.map((section, i) => {\n        const typename = section?.__typename;\n        if (!typename) return null;\n        const key = registryKeys.find((k) => typename.endsWith(k));\n        if (!key) {\n          // Layout inconnu → warn en dev, JAMAIS throw (le site doit survivre)\n          if (process.env.NODE_ENV !== \"production\")\n            console.warn(`[BlockRenderer] Layout inconnu : ${typename}`);\n          return null;\n        }\n        const Block = registry[key];\n        return <Block key={i} {...section} position={i} />;\n      })}\n    </>\n  );\n}\n```\n\nLes composants blocks **sont les sections existantes du site, paramétrées** — on ne redessine rien, on extrait les props.\n\n### Routes\n\n1. **Route de préviz `/wp/[...uri]`** (à créer EN PREMIER) : `force-dynamic`, metadata `robots: { index: false }`, résout `/wp/<page-slug>` ou `/wp/<cpt>/<slug>` et rend `<BlockRenderer/>`. Sert à valider tout le pipeline AVANT de basculer les vraies routes.\n2. **Routes CPT `[slug]/page.tsx`** : `generateStaticParams` (query paginée des slugs publiés), `export const dynamicParams = true` (nouveau contenu sans rebuild), `generateMetadata` depuis le champ `seo` WP via le helper :\n\n```typescript\nexport async function generateMetadata({ params }): Promise<Metadata> {\n  const { slug } = await params;\n  const item = await getToiture(slug);\n  if (!item) return {};\n  return wpSeoToMetadata(item.seo, { title: item.title, canonical: `${SITE_URL}/toitures/${slug}` });\n}\n```\n\n`wpSeoToMetadata(seo, fallback)` : title/description/canonical/og/twitter + `robots noindex` si coché, fallback champ par champ vers les metas historiques. Émettre aussi un `BreadcrumbList` JSON-LD systématique.\n\n3. **One-off** : la page garde un **fallback try/catch vers l'ancienne vue codée** — si WP est down ou non configuré (`isWpConfigured()`), on rend la version en dur. Bascule progressive, zéro risque.\n\n---\n\n## 8. Revalidation — par TAGS ciblés\n\nJamais `revalidatePath('/', 'layout')` (purge totale à chaque save). Tags : `['wordpress', '{type}', '{type}:{slug}']` — posés par `fetchGraphQL` à la lecture, invalidés à l'écriture.\n\n### Côté Next : `app/api/revalidate/route.ts`\n\n```typescript\nexport async function POST(request: NextRequest) {\n  if (request.headers.get(\"x-revalidate-secret\") !== process.env.REVALIDATE_SECRET)\n    return NextResponse.json({ revalidated: false }, { status: 401 });\n  const { tags = [], paths = [] } = await request.json();\n  // Next 16 : profil \"max\" = purge des entrées sans expiration (revalidate: false)\n  for (const tag of tags) revalidateTag(tag, \"max\");\n  for (const path of paths) revalidatePath(path);\n  return NextResponse.json({ revalidated: true, tags, paths });\n}\n// + GET ?secret=&tag=&path= pour les tests manuels\n```\n\n### Côté WP : `inc/revalidate.php`\n\n- `save_post` (status publish, types whitelistés) → `wp_remote_post` **non-bloquant** (`blocking => false, timeout => 1`) vers `{front}/api/revalidate` pour **chaque URL** de `FRONT_URLS` (CSV en env : prod + préprod), header `x-revalidate-secret`, body `{ tags: [type, type:slug] }`.\n- `acf/save_post` avec `$post_id === 'options'` → tag `wordpress` (purge globale : nav/footer partout).\n- **Bouton admin bar « 🚀 Publier sur le site »** : node `admin_bar_menu` + handler `wp_ajax_` (nonce + `current_user_can('edit_posts')`) qui appelle `cvb_send_revalidate(['wordpress'], [], true)` en mode bloquant et renvoie les statuts par front ; JS dans `admin_footer` (fetch `ajaxurl`, label ⏳ → ✅/❌ → reset 3 s).\n\nPas de CORS nécessaire : c'est WP (serveur) qui appelle Next (serveur).\n\n---\n\n## 9. Seed du contenu\n\nPrincipe : un **seeder PHP générique** (`wordpress/seed/lib.php` + `run.php`, exécuté via `wp eval-file`) qui lit des **JSON sémantiques** (1 fichier par page/post, champs par NOM ACF snake_case) et résout noms → field keys depuis les définitions **réellement enregistrées** (`acf_get_field('field_{{prefix}}_sections')`, `acf_get_fields($group_key)`) — robuste aux renommages, et le flexible/repeaters DOIVENT être écrits par field keys (`update_field('field_…', [...])`), jamais par noms.\n\n```json\n// seed/content/toiture-bac-acier.json\n{\n  \"type\": \"toiture\", \"slug\": \"bac-acier\", \"title\": \"Toiture bac acier\",\n  \"seo\": { \"titre_seo\": \"…\", \"meta_description\": \"…\" },\n  \"sections\": [\n    { \"layout\": \"hero\", \"variante\": \"standard\", \"titre\": \"Un toit plus *frais*\",\n      \"image\": { \"path\": \"images/toitures/bac-acier.webp\", \"alt\": \"…\" },\n      \"cta_primaire\": { \"label\": \"Diagnostic gratuit\", \"lien\": \"/diagnostic\", \"style\": \"primary\" } }\n  ]\n}\n```\n\nMécanique (lib.php) :\n\n- `cvbseed_value($fieldDef, $value)` : switch sur `$field['type']` — image/file → upload, repeater/group → récursion par sub_fields, true_false → 0/1, relationship → slugs → IDs.\n- **Médias dédupés** par meta `_source_path` (re-seed sans doublons), alt text écrit depuis le JSON (`_wp_attachment_image_alt`).\n- **Idempotent** : recherche du post par slug, update sinon insert. Relançable à volonté, par pattern (`wp eval-file run.php toiture-*`).\n- **2 passes** dans run.php : passe 1 = créer tous les posts nus, passe 2 = remplir les champs (les `relationship` ont besoin que les cibles existent).\n- Assets **rsyncés sur le VPS avant le seed** (dans `wp-content/seed-assets/`, paths relatifs dans le JSON). Les images servies par un CDN externe dans le projet d'origine sont **téléchargées et localisées AVANT** (petit script) — le seed ne fetch jamais d'URL distante.\n- SVG : non uploadables par défaut → `define('ALLOW_UNFILTERED_UPLOADS', true)` dans `WORDPRESS_CONFIG_EXTRA` (ou convertir en webp/png).\n- Documenter le format dans `seed/content/_FORMAT.md`.\n\n**Extraction du contenu** : transformer les JSX en dur en JSON sémantiques est un travail parallélisable d'agents — leur contrat = `_FORMAT.md` + `SCHEMA.md`. Un agent par groupe de pages.\n\n```bash\nrsync -av seed/ root@vps:/opt/{{PROJECT}}/wordpress/wp-content/seed/\nrsync -av public/images/ root@vps:/opt/{{PROJECT}}/wordpress/wp-content/seed-assets/images/\ndocker compose run --rm wpcli wp eval-file wp-content/seed/run.php\n```\n\n---\n\n## 10. Checklist de vérification de bout en bout\n\nDans l'ordre, ne pas sauter d'étape :\n\n1. **Page de test seedée** (un JSON avec TOUS les layouts, une instance de chaque) via le seeder par field keys.\n2. **Requête GraphQL complète** (tous les fragments) exécutée en curl sur cette page → zéro `errors`. C'est ici que les collisions de types imbriqués (§6b) explosent — pas avant.\n3. **Rendu `/wp/test`** : chaque block monte, warn console = layout manquant au registry.\n4. **Seed complet** de tout le contenu + options.\n5. **Bascule des vraies routes** (CPT puis one-off avec fallback), vérif `generateStaticParams`.\n6. **Boucle éditoriale** : modifier un titre dans le BO → bouton « Publier sur le site » → le front est à jour (et le save_post seul suffit aussi).\n7. **SEO** : metas + JSON-LD présents dans le HTML initial (curl, pas le DOM hydraté) ; admin WP en noindex ; `curl -I https://{{WP_DOMAIN}}` → `X-Robots-Tag`.\n\n## Checklist avant de commencer\n\n- [ ] Projet Next.js App Router fonctionnel (sinon migrer d'abord — cf. skill bun-to-next)\n- [ ] VPS Ubuntu avec Docker + accès SSH ; savoir si 80/443 sont déjà pris (piège §3d)\n- [ ] Clé ACF PRO + un sous-domaine pour l'admin ({{WP_DOMAIN}})\n- [ ] Inventaire des contenus : classification template répétable (CPT) / one-off (page) / global (options) / données métier (group)\n- [ ] Catalogue de blocks dessiné par STRUCTURE (~20-30 layouts max, selects variante/theme pour les déclinaisons)\n- [ ] `wordpress/SCHEMA.md` rédigé AVANT le code — c'est le contrat entre le mu-plugin, les fragments et les agents de seed\n"},"caller":{"type":"direct"}}],"stop_reason":null,"stop_sequence":null,"stop_details":null,"usage":{"input_tokens":2,"cache_creation_input_tokens":2071,"cache_read_input_tokens":82329,"cache_creation":{"ephemeral_5m_input_tokens":2071,"ephemeral_1h_input_tokens":0},"output_tokens":3,"service_tier":"standard","inference_geo":"not_available"},"diagnostics":null},"requestId":"req_011CbyPPYYBwCMCkpit3Ecsj","attributionAgent":"general-purpose","type":"assistant","uuid":"c3fc339e-3ad2-4df3-a58b-a0eb78ccfcb5","timestamp":"2026-06-12T12:47:04.747Z","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"c3fc339e-3ad2-4df3-a58b-a0eb78ccfcb5","isSidechain":true,"promptId":"2791882b-bb7e-4f2e-be7f-672bab599788","agentId":"aa1b8ee79ef99e3f5","type":"user","message":{"role":"user","content":[{"type":"tool_result","content":"<tool_use_error>File has not been read yet. Read it first before writing to it.</tool_use_error>","is_error":true,"tool_use_id":"toolu_01Dv5UCjJfjDJpAGDPpaDhW6"}]},"uuid":"433c8b67-532b-4995-bf59-413f33210e72","timestamp":"2026-06-12T12:47:04.759Z","toolUseResult":"Error: File has not been read yet. Read it first before writing to it.","sourceToolAssistantUUID":"c3fc339e-3ad2-4df3-a58b-a0eb78ccfcb5","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"433c8b67-532b-4995-bf59-413f33210e72","isSidechain":true,"agentId":"aa1b8ee79ef99e3f5","message":{"model":"claude-fable-5","id":"msg_01X2VfM6PjQezhiPCJqDrKY5","type":"message","role":"assistant","content":[{"type":"thinking","thinking":"","signature":"CAIS9QMKYggOGAIqQGirAmkJiAEq41cZQPjZIrm54AJsB0K8whfz7D0stYaffumzhRkzuuh8trtYpyHdmAj2M6Bpnwb5LKroumQWnLEyDmNsYXVkZS1mYWJsZS01OAFCCHRoaW5raW5nEgwHuUXjgar9VpJW9lIaDKoALLYZjmF7T2oqliIw6AOLAEGh6zFktZLML2tuWdIgg8lzbQYpC6Dz3YKNbFBjyoize//YqvYVZswFtsgHKsACjSGpnwhQi4pMjdhclB+vQSAdgpvrAF5G7l8+Df73lUWuFJ93u7WcVpSEqSCGKUIWB4sb/XkrBOk4W3ds0JsYo2zUcJdPJILii6XIOkW3+OPRrOj+Zt7iI+h4T/MTA+sBMvim6bdg4Jz9AyJgmdriT2VEdDh8SMksG8vs4B7Oy50IK+LSNMb4lPlKBC8eMoe6y/bhJMBCsIMMn3yK40RrsweVO2XNaf29xPCqPbeNZCVHzQaaNI5bX2xEYD3iJS/VItP2LEOZvcJykj++1UbK5dDYLYJ3hC2OUiQIpGm4ZFluvBaZ7s3U4UJ6uu8cPmx4po9n+BjF6ciDenmEL4Vke2HWSKY53RbdmGwCHpSFE8uESN25gtFDa0CjEy7RoJJLwEmB/DZySow6RMvKs7cGPLI4KEt/e2muMMhJuxATPp4YAQ=="}],"stop_reason":null,"stop_sequence":null,"stop_details":null,"usage":{"input_tokens":2,"cache_creation_input_tokens":14068,"cache_read_input_tokens":84400,"cache_creation":{"ephemeral_5m_input_tokens":14068,"ephemeral_1h_input_tokens":0},"output_tokens":3,"service_tier":"standard","inference_geo":"not_available"},"diagnostics":null},"requestId":"req_011CbyPbC6hj273PCQQx6YoM","attributionAgent":"general-purpose","type":"assistant","uuid":"d19d0671-426a-4f29-b844-674ad33161f6","timestamp":"2026-06-12T12:47:11.570Z","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"d19d0671-426a-4f29-b844-674ad33161f6","isSidechain":true,"agentId":"aa1b8ee79ef99e3f5","message":{"model":"claude-fable-5","id":"msg_01X2VfM6PjQezhiPCJqDrKY5","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_01ETqy9ZtM1xFpak5oVuezKZ","name":"Read","input":{"file_path":"/opt/claude-code/library/skills/nextjs-wordpress-headless/SKILL.md","limit":10},"caller":{"type":"direct"}}],"stop_reason":null,"stop_sequence":null,"stop_details":null,"usage":{"input_tokens":2,"cache_creation_input_tokens":14068,"cache_read_input_tokens":84400,"cache_creation":{"ephemeral_5m_input_tokens":14068,"ephemeral_1h_input_tokens":0},"output_tokens":3,"service_tier":"standard","inference_geo":"not_available"},"diagnostics":null},"requestId":"req_011CbyPbC6hj273PCQQx6YoM","attributionAgent":"general-purpose","type":"assistant","uuid":"20223678-2932-4898-9318-a5a8bfc641bd","timestamp":"2026-06-12T12:47:16.744Z","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"20223678-2932-4898-9318-a5a8bfc641bd","isSidechain":true,"promptId":"2791882b-bb7e-4f2e-be7f-672bab599788","agentId":"aa1b8ee79ef99e3f5","type":"user","message":{"role":"user","content":[{"tool_use_id":"toolu_01ETqy9ZtM1xFpak5oVuezKZ","type":"tool_result","content":"1\t---\n2\tname: nextjs-wordpress-headless\n3\tdescription: Branche un projet Next.js existant sur WordPress headless (ACF PRO + WPGraphQL). Gère pages uniques, CPT, SEO, revalidation on-demand.\n4\t---\n5\t\n6\t# Skill : Next.js → WordPress Headless\n7\t\n8\t## Quand utiliser\n9\t\n10\t- L'utilisateur dit \"branche sur WordPress\", \"connecte à WP\", \"headless WordPress\", \"ajoute WordPress\""}]},"uuid":"63d278fa-db9f-4371-8c4e-f52d59b6e724","timestamp":"2026-06-12T12:47:16.783Z","sourceToolAssistantUUID":"20223678-2932-4898-9318-a5a8bfc641bd","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"63d278fa-db9f-4371-8c4e-f52d59b6e724","isSidechain":true,"agentId":"aa1b8ee79ef99e3f5","message":{"model":"claude-fable-5","id":"msg_01B4qMpeiyq3kAbU38BkthU1","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_01LkL8dyXQrtFhN5muHGBjoY","name":"Write","input":{"file_path":"/opt/claude-code/library/skills/nextjs-wordpress-headless/SKILL.md","content":"---\nname: nextjs-wordpress-headless\ndescription: Branche un projet Next.js (App Router) sur un WordPress headless auto-hébergé (Docker sur VPS Ubuntu, ACF PRO Flexible Content + WPGraphQL) avec un catalogue de blocks réorganisables, revalidation par tags et seed idempotent. Gère pages one-off, CPT, options globales, SEO.\n---\n\n# Skill : Next.js → WordPress Headless (catalogue de blocks)\n\n## Quand utiliser\n\n- L'utilisateur dit \"branche sur WordPress\", \"connecte à WP\", \"headless WordPress\", \"ajoute WordPress\", \"rends le site éditable\"\n- L'utilisateur lance `/nextjs-wordpress-headless`\n- Un projet Next.js existe déjà (pages codées en dur) et doit devenir éditable via WordPress, avec des **sections réorganisables** par l'éditeur (ajouter/supprimer/déplacer des blocks sur n'importe quelle page)\n\nPlaceholders utilisés partout : `{{PROJECT}}` (nom projet, ex. covalba), `{{prefix}}` (préfixe court 3-4 lettres, ex. cvb), `{{WP_DOMAIN}}` (ex. admin.monsite.fr), `{{FRONT_URL}}`, `{{ACF_KEY}}`.\n\n---\n\n## 1. Architecture\n\n```\nWordPress (Docker, VPS Ubuntu)                    Next.js App Router\n┌─────────────────────────────┐                  ┌──────────────────────────┐\n│ ACF PRO Flexible Content    │   WPGraphQL +    │ lib/wp/client.ts (fetch, │\n│ → 1 champ `sections` UNIQUE │   WPGraphQL for  │   tags, revalidate:false)│\n│   partagé par tous les types│ ──── ACF ──────► │ 1 fragment / layout      │\n│ mu-plugin {{PROJECT}}-core  │                  │ BlockRenderer (registry) │\n│ (CPT, champs, sécurité,     │ ◄── webhook ──── │ /api/revalidate (tags)   │\n│  revalidation)              │   save_post      │ ISR : revalidate false   │\n└─────────────────────────────┘                  └──────────────────────────┘\n```\n\nPrincipes non négociables :\n\n- **Le front est 100 % Next.js.** WordPress n'est JAMAIS rendu publiquement : CPT en `publicly_queryable => false`, admin servi sur un sous-domaine avec `X-Robots-Tag: noindex` partout.\n- **Un seul flexible content `sections`** (le catalogue de blocks), localisé sur TOUS les types de contenu → un seul jeu d'union GraphQL, de fragments et un seul BlockRenderer.\n- **Cache Next par tags** (`revalidate: false` + tags), invalidé uniquement on-demand par WordPress.\n- **Tout le modèle de contenu vit en PHP dans le repo Next** (mu-plugin versionné, déployé par rsync). Un fichier `wordpress/SCHEMA.md` est le contrat : toute évolution met à jour en même temps le SCHEMA, le mu-plugin et `src/lib/wp/` + `src/components/blocks/`.\n\n---\n\n## 2. Modèle de contenu — règles\n\n### CPT vs page native vs champ vs options\n\n| Situation | Solution |\n|-----------|----------|\n| Template **répétable** (produit, réalisation, secteur, article, membre d'équipe) | **CPT** (avec route `[slug]` côté Next) |\n| Page **one-off** (home, contact, à-propos, landing) | **Page native WP** (post_type `page`) |\n| Liste fixe interne à une section (4 étapes d'un process) | Repeater DANS le layout |\n| Contenu global (nav, footer, coordonnées, logos clients, CTA sticky, SEO défaut) | **ACF Options Page** (avec onglets) |\n| Données métier structurées d'une fiche (nom produit, prix, garantie, client, surface…) | **Group ACF hors flexible** (ex. `ficheProduit`, `ficheReference`) — requêtable indépendamment des sections |\n| Même contenu affiché sur plusieurs pages | CPT + layout `relationship` (ex. `grille_solutions` → relationship vers produits) |\n\n### Le catalogue de blocks\n\n- **Chaque type de contenu partage le MÊME flexible `sections`.** Ne crée jamais un flexible par type : tu démultiplierais les unions GraphQL, les fragments et les renderers.\n- **Filtre le catalogue par type côté back-office** via `acf/load_field/name=sections` (retire les layouts hors sujet du tableau `$field['layouts']` quand `is_admin()`). Ça n'affecte PAS le schéma GraphQL — c'est purement du confort éditeur.\n- **Mutualise par STRUCTURE de données, pas par rendu visuel.** Vise ~20-30 layouts pour un site complet — pas 1 layout par section visuelle. Deux sections différentes à l'œil mais qui portent les mêmes données = UN layout avec un select `variante` ou `theme` (ex. `hero` avec variante home/standard/compact ; `cta` avec variante mid/final/banner ; `grille_cards` avec `colonnes` et `theme`).\n- **Escape hatch `composant_react`** : un layout avec un select `composant` (liste blanche : simulateur, carte, formulaire…) qui monte un composant interactif codé côté front. C'est ce qui permet de garder les widgets complexes hors de WP sans casser la réorganisation des sections.\n- Sous-structures partagées : `entete` (badge/titre/intro) sur quasi tous les layouts, `cta` (label/lien/style) — voir §5.\n- Convention `*accent*` dans les titres → rendu `<span class=\"accent\">` côté front.\n- Icônes : select avec **liste blanche** de noms (lucide), jamais de champ texte libre.\n\n---\n\n## 3. Infra VPS Ubuntu — Docker Compose\n\nTout vit dans `wordpress/` à la racine du repo Next : `docker-compose.yml`, `php-overrides.ini`, `mu-plugins/{{PROJECT}}-core/`, `seed/`, `SCHEMA.md`, conf nginx.\n\n```yaml\n# wordpress/docker-compose.yml\nname: {{PROJECT}}-wp\n\nx-wp-env: &wp-env\n  WORDPRESS_DB_HOST: db\n  WORDPRESS_DB_NAME: {{PROJECT}}\n  WORDPRESS_DB_USER: {{PROJECT}}\n  WORDPRESS_DB_PASSWORD: ${DB_PASSWORD}\n  REVALIDATE_SECRET: ${REVALIDATE_SECRET:-}\n  FRONT_URLS: ${FRONT_URLS:-}\n  ACF_PRO_LICENSE: ${ACF_PRO_LICENSE:-}\n  # PIÈGE (b) : évalué au RUNTIME par wp-config.php (getenv_docker) → doit être\n  # présent dans TOUS les conteneurs qui exécutent WordPress (wordpress ET wpcli),\n  # d'où l'ancre YAML &wp-env partagée.\n  WORDPRESS_CONFIG_EXTRA: |\n    define('WP_HOME', 'https://{{WP_DOMAIN}}');\n    define('WP_SITEURL', 'https://{{WP_DOMAIN}}');\n    define('DISABLE_WP_CRON', true);\n    define('DISALLOW_FILE_EDIT', true);\n    define('AUTOMATIC_UPDATER_DISABLED', true);\n    define('WP_POST_REVISIONS', 5);\n    define('WP_ENVIRONMENT_TYPE', 'production');\n    define('FORCE_SSL_ADMIN', true);\n    define('WP_REDIS_HOST', 'redis');\n    define('WP_MEMORY_LIMIT', '256M');\n    define('REVALIDATE_SECRET', getenv('REVALIDATE_SECRET') ?: '');\n    define('FRONT_URLS', getenv('FRONT_URLS') ?: '');\n    define('ACF_PRO_LICENSE', getenv('ACF_PRO_LICENSE') ?: '');\n\nservices:\n  db:\n    image: mariadb:11\n    restart: unless-stopped\n    environment:\n      MARIADB_DATABASE: {{PROJECT}}\n      MARIADB_USER: {{PROJECT}}\n      MARIADB_PASSWORD: ${DB_PASSWORD}\n      MARIADB_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}\n    command: --innodb-buffer-pool-size=256M --max-connections=40\n    volumes:\n      - ./db-data:/var/lib/mysql\n    healthcheck:\n      test: [\"CMD\", \"healthcheck.sh\", \"--connect\", \"--innodb_initialized\"]\n      interval: 10s\n      retries: 6\n\n  wordpress:\n    image: wordpress:6.8-php8.3-apache\n    restart: unless-stopped\n    depends_on:\n      db: { condition: service_healthy }\n    ports:\n      - \"127.0.0.1:8080:80\"   # voir piège (d)\n    environment:\n      <<: *wp-env\n    volumes:\n      - wp-core:/var/www/html\n      - ./wp-content:/var/www/html/wp-content\n      - ./php-overrides.ini:/usr/local/etc/php/conf.d/zz-overrides.ini:ro\n\n  redis:\n    image: redis:7-alpine\n    restart: unless-stopped\n    command: --maxmemory 128mb --maxmemory-policy allkeys-lru\n\n  wpcli:\n    image: wordpress:cli-php8.3\n    profiles: [\"tools\"]      # jamais démarré par `up`, uniquement `run --rm`\n    user: \"33:33\"\n    depends_on:\n      db: { condition: service_healthy }\n    environment:\n      <<: *wp-env\n    volumes:\n      - wp-core:/var/www/html\n      - ./wp-content:/var/www/html/wp-content\n\nvolumes:\n  wp-core:\n```\n\n```ini\n# wordpress/php-overrides.ini — seed médias + flexibles volumineux\nupload_max_filesize = 64M\npost_max_size = 64M\nmemory_limit = 256M\nmax_execution_time = 300\nmax_input_vars = 5000\n```\n\nUsage wp-cli : `docker compose run --rm wpcli wp <commande>`.\nCache objet : plugin `redis-cache` + `wp redis enable`.\n\n### PIÈGES VÉCUS (compose)\n\n- **(a) Volume `wp-core` PARTAGÉ** entre `wordpress` et `wpcli`. Si wpcli monte son propre volume (ou rien), il ne voit pas le core installé → `Error: This does not seem to be a WordPress installation.`\n- **(b) `WORDPRESS_CONFIG_EXTRA` est évalué au runtime** par le `wp-config.php` de l'image (via `getenv_docker`), pas \"baked\" au premier démarrage. Il doit donc être dans l'env de TOUS les conteneurs WordPress → ancre YAML `&wp-env` + `<<: *wp-env`. Sinon wpcli tourne avec un wp-config différent (URLs, secrets et licence absents).\n- **(c) Compose interpole `$` dans les chaînes** : du PHP avec `$_SERVER` dans `WORDPRESS_CONFIG_EXTRA` doit être échappé `$$_SERVER`. Mieux : n'y mets PAS de PHP avec `$` — l'image officielle gère déjà `X-Forwarded-Proto` (HTTPS derrière proxy), pas besoin du snippet classique.\n- **(d) Si le VPS héberge déjà un service sur 80/443** (autre site, dashboard…) : binde WP sur `127.0.0.1:8080` et termine le TLS avec un **vhost nginx hôte + certbot**. Sinon (VPS dédié), un service Caddy dans le compose suffit (`reverse_proxy wordpress:80`).\n\n### Vhost nginx hôte (cas d)\n\n```nginx\n# /etc/nginx/sites-available/{{PROJECT}}-admin  (TLS : certbot --nginx -d {{WP_DOMAIN}})\nserver {\n    listen 80;\n    server_name {{WP_DOMAIN}};\n    client_max_body_size 64M;\n\n    # Le BO ne doit JAMAIS être indexé\n    add_header X-Robots-Tag \"noindex, nofollow\" always;\n\n    # XML-RPC : vecteur d'attaque, inutile en headless\n    location = /xmlrpc.php { return 403; }\n    location ~ ^/(wp-config\\.php|readme\\.html|license\\.txt)$ { return 404; }\n    location = /wp-content/debug.log { return 404; }\n\n    # Basic auth devant le login (2e barrière avant le vrai login)\n    location = /wp-login.php {\n        auth_basic \"{{PROJECT}} Admin\";\n        auth_basic_user_file /etc/nginx/{{PROJECT}}-admin.htpasswd;\n        proxy_pass http://127.0.0.1:8080;\n        include /etc/nginx/snippets/{{PROJECT}}-admin-proxy.conf;\n    }\n\n    location / {\n        proxy_pass http://127.0.0.1:8080;\n        include /etc/nginx/snippets/{{PROJECT}}-admin-proxy.conf;\n    }\n}\n```\n\nLe snippet proxy contient les `proxy_set_header Host / X-Real-IP / X-Forwarded-For / X-Forwarded-Proto $scheme`.\n\n### Sécurité (récap)\n\n- `xmlrpc.php` → 403 (nginx) + `add_filter('xmlrpc_enabled', '__return_false')` (mu-plugin)\n- `X-Robots-Tag: noindex, nofollow` sur TOUT le domaine admin\n- Basic auth devant `wp-login.php`\n- `DISALLOW_FILE_EDIT`, `AUTOMATIC_UPDATER_DISABLED`\n- REST `/wp/v2/users` masqué aux non-connectés (filtre `rest_endpoints`)\n- Introspection GraphQL **privée** (réglage WPGraphQL par défaut : la laisser désactivée en public) + query depth limit forcée par code (filtre `option_graphql_general_settings`, max 15 — le flexible génère des requêtes profondes mais bornées)\n\n### Cron hôte (backups + wp-cron)\n\n`DISABLE_WP_CRON` est défini → déclencher wp-cron depuis le cron hôte, et backuper DB + uploads avec rotation :\n\n```cron\n*/15 * * * * cd /opt/{{PROJECT}}/wordpress && docker compose run --rm wpcli wp cron event run --due-now >/dev/null 2>&1\n30 3 * * *   cd /opt/{{PROJECT}}/wordpress && docker compose exec -T db mariadb-dump -u root -p\"$DB_ROOT_PASSWORD\" {{PROJECT}} | gzip > /opt/backups/{{PROJECT}}-$(date +\\%F).sql.gz && tar czf /opt/backups/{{PROJECT}}-uploads-$(date +\\%F).tar.gz -C wp-content uploads && find /opt/backups -name '{{PROJECT}}-*' -mtime +14 -delete\n```\n\n---\n\n## 4. ACF PRO\n\nURL de téléchargement **qui marche** (vérifié — avec `&t=latest` ça 404) :\n\n```bash\ndocker compose run --rm wpcli wp plugin install \\\n  \"https://connect.advancedcustomfields.com/v2/plugins/download?p=pro&k={{ACF_KEY}}\" --activate\ndocker compose run --rm wpcli wp plugin install wp-graphql --activate\ndocker compose run --rm wpcli wp plugin install wpgraphql-acf --activate\ndocker compose run --rm wpcli wp plugin install redis-cache --activate\n```\n\nLicence : `define('ACF_PRO_LICENSE', getenv('ACF_PRO_LICENSE') ?: '')` dans `WORDPRESS_CONFIG_EXTRA` (clé dans le `.env` du compose, jamais commitée).\n\n---\n\n## 5. Enregistrement des champs — mu-plugin PHP versionné\n\nTout le modèle vit dans `wordpress/mu-plugins/{{PROJECT}}-core/` **dans le repo Next**, déployé par rsync :\n\n```bash\nrsync -av --delete wordpress/mu-plugins/ root@vps:/opt/{{PROJECT}}/wordpress/wp-content/mu-plugins/\n```\n\nStructure :\n\n```\n{{PROJECT}}-core.php          # bootstrap : require de tous les inc/\ninc/post-types.php            # CPT (publicly_queryable false, show_in_graphql true)\ninc/taxonomies.php\ninc/field-groups/helpers.php  # builders ({{prefix}}_field, _image, _repeater, _select…)\ninc/field-groups/sections.php # le flexible `sections` : assemble 1 fichier / layout\ninc/field-groups/layouts/*.php  # 1 fichier = 1 layout (return {{prefix}}_layout(...))\ninc/field-groups/seo.php      # groupe SEO (tous types, position high)\ninc/field-groups/fiche-*.php  # groups métier hors flexible\ninc/options-pages.php\ninc/admin.php                 # filtrage du catalogue par type (acf/load_field)\ninc/graphql.php               # réglages WPGraphQL forcés par code\ninc/security.php\ninc/revalidate.php\n```\n\nRègles :\n\n- **Mu-plugin no-op sans ACF** : tout le code ACF est dans des hooks `acf/init` gardés par `function_exists('acf_add_local_field_group')`. CPT, taxos, sécurité et revalidation fonctionnent même si ACF est désactivé.\n- **Field keys déterministes** : `field_{{prefix}}_{layout}_{champ}` (sous-champs : `..._{champ}_{sous_champ}`). Indispensable pour le seed (§9) et le debug.\n- **`graphql_field_name` camelCase systématique** sur chaque champ (helper qui convertit le `name` snake_case).\n- **Groups + helpers PLUTÔT que clones ACF** : pour les sous-structures partagées (entête de section, CTA), utilise des champs type `group` dont les sub_fields sont composés par helper PHP. Le schéma GraphQL produit est exactement `entete { badge titre intro }` et `cta { label lien style }` — ce que les clones ACF ne garantissent pas (préfixage et types imprévisibles).\n\nSignatures des helpers (le cœur du système) :\n\n```php\nfunction {{prefix}}_camel(string $snake): string;            // snake → camelCase\nfunction {{prefix}}_field(string $key, string $name, string $label, string $type, array $extra = []): array;\n    // merge: show_in_graphql=1 + graphql_field_name={{prefix}}_camel($name)\nfunction {{prefix}}_image(string $key, string $name, string $label, array $extra = []): array;\n    // return_format 'array' — côté GraphQL : { node { sourceUrl altText … } }\nfunction {{prefix}}_repeater(string $key, string $name, string $label, array $sub_fields, array $extra = []): array;\nfunction {{prefix}}_select(string $key, string $name, string $label, array $choices, ?string $default = null): array;\nfunction {{prefix}}_clone_entete(string $layout): array;     // group `entete` (badge/titre/intro)\nfunction {{prefix}}_clone_cta(string $layout, string $name = 'cta', string $label = 'CTA'): array;\nfunction {{prefix}}_layout(string $name, string $label, array $sub_fields): array;  // enveloppe flexible\nfunction {{prefix}}_tab(string $key, string $label): array;  // onglet UI, show_in_graphql=0\n```\n\nExemple de layout (1 fichier = 1 layout, `return` du tableau) :\n\n```php\n<?php\n// inc/field-groups/layouts/hero.php\ndefined('ABSPATH') || exit;\n$l = 'hero';\n\nreturn {{prefix}}_layout($l, 'Hero', [\n    {{prefix}}_select(\"field_{{prefix}}_{$l}_variante\", 'variante', 'Variante',\n        ['home' => 'Home', 'standard' => 'Standard', 'compact' => 'Compact'], 'standard'),\n    {{prefix}}_field(\"field_{{prefix}}_{$l}_titre\", 'titre', 'Titre', 'text',\n        ['instructions' => \"Utiliser *texte* pour le span d'accent.\"]),\n    {{prefix}}_image(\"field_{{prefix}}_{$l}_image\", 'image', 'Image'),\n    {{prefix}}_repeater(\"field_{{prefix}}_{$l}_stats\", 'stats', 'Stats', [\n        {{prefix}}_field(\"field_{{prefix}}_{$l}_stats_value\", 'value', 'Valeur', 'text'),\n        {{prefix}}_field(\"field_{{prefix}}_{$l}_stats_label\", 'label', 'Label', 'text'),\n    ], ['max' => 4, 'layout' => 'table']),\n    {{prefix}}_clone_cta($l, 'cta_primaire', 'CTA primaire'),\n]);\n```\n\nLe groupe SEO (tous types + pages, `position => 'high'`, graphql `seo`) : `titre_seo` (text), `meta_description` (textarea rows 3), `canonical` (url), `og_image` (image), `noindex` (true_false).\n\n---\n\n## 6. ⚠️ PIÈGES WPGraphQL for ACF v2 (vécus — à lire AVANT de coder les fragments)\n\n**(a) Nommage des types de layouts.** Chaque layout du flexible devient un type GraphQL nommé `{FieldGroupGraphql}{FlexFieldGraphql}{LayoutPascal}Layout` — ex. field group « Sections de page » + champ `sections` + layout `hero` → `SectionsSectionsHeroLayout`. Le préfixe exact dépend du titre du field group, donc côté Next :\n- matcher par **SUFFIXE** : `typename.endsWith('HeroLayout')` — jamais par nom complet ;\n- trier les clés du registry par **longueur décroissante** : `VideoLayout` est un suffixe valide de `...TemoignagesVideoLayout` ;\n- centraliser le préfixe dans une constante surchargeable par env (`WP_SECTIONS_TYPE_PREFIX`) pour les fragments.\n\n**(b) Types imbriqués nommés `{Prefix}{NomDuChamp}` SANS le layout parent.** Deux layouts qui réutilisent le même nom de champ imbriqué (`lignes`, `items`, `colonnes`…) avec des sous-champs DIFFÉRENTS **se télescopent silencieusement** (un seul type GraphQL gagne, l'autre perd des champs). Règle stricte : **un nom imbriqué réutilisé = sous-champs strictement identiques** (OK pour `entete`, `cta`, `stats {value,label}`) ; sinon **suffixer par le layout** : `lignes_comparatif`, `lignes_situations`, `lignes_specs`, `items_certifications`.\n\n**(c) Images** : `return_format => 'array'` côté ACF, et côté GraphQL c'est une connection :\n```graphql\nimage { node { sourceUrl altText mediaDetails { width height } } }\n```\nFichiers (PDF) : `fichier { node { mediaItemUrl title } }`.\n\n**(d) Repeaters et flexibles vides sortent `null`** (pas `[]`) → toujours mapper `?? []`, jamais `.map()` direct.\n\n**(e) Ne JAMAIS renommer un `acf_fc_layout` publié** : les valeurs en base référencent le nom du layout ; un renommage orphelinise tout le contenu existant. Idem pour les `name` de champs déjà remplis.\n\n**(f) L'introspection publique est désactivée** (et doit le rester). On ne valide donc PAS les fragments par introspection : on **exécute la vraie requête complète** sur une page de test seedée (curl POST sur `/graphql`) et on vérifie l'absence d'`errors`.\n\n**(g) Options page** : les champs sont exposés sous un sous-objet — `optionsSite { options { menuPrincipal { ... } } }` (le field group devient le champ `options` du type défini par `graphql_type_name`).\n\n---\n\n## 7. Côté Next.js\n\nArborescence : `src/lib/wp/{client.ts, types.ts, mappers.ts, seoToMetadata.ts, fragments/, queries/}` + `src/components/blocks/`.\n\n### `lib/wp/client.ts`\n\n```typescript\nconst WP_GRAPHQL_URL = process.env.WORDPRESS_GRAPHQL_URL;\nexport const isWpConfigured = () => Boolean(WP_GRAPHQL_URL);\n\nexport async function fetchGraphQL<T>(\n  query: string,\n  variables?: Record<string, unknown>,\n  opts?: { tags?: string[] }\n): Promise<T> {\n  const res = await fetch(WP_GRAPHQL_URL!, {\n    method: \"POST\",\n    headers: { \"Content-Type\": \"application/json\" },\n    body: JSON.stringify({ query, variables }),\n    // Cache permanent, invalidé UNIQUEMENT via /api/revalidate\n    next: { revalidate: false as const, tags: [\"wordpress\", ...(opts?.tags ?? [])] },\n  });\n  if (!res.ok) throw new Error(`WPGraphQL HTTP ${res.status}`);\n  const json = await res.json();\n  if (json.errors?.length) throw new Error(`Erreurs GraphQL : ${JSON.stringify(json.errors)}`);\n  return json.data;\n}\n```\n\nPas de CORS à configurer : tous les fetch sont server-side (RSC).\n\n### Fragments — 1 fichier par layout + préfixe en constante\n\n```typescript\n// fragments/prefix.ts — le préfixe exact dépend du field group côté WP\nexport const SECTIONS_TYPE_PREFIX =\n  process.env.WP_SECTIONS_TYPE_PREFIX || \"SectionsSections\";\n\n// fragments/hero.ts\nexport const HERO_FRAGMENT = /* GraphQL */ `\n  fragment HeroFields on ${SECTIONS_TYPE_PREFIX}HeroLayout {\n    __typename\n    variante\n    titre\n    image ${IMAGE_FIELDS}\n    stats { value label }\n    ctaPrimaire ${CTA_FIELDS}\n  }\n`;\n```\n\n`fragments/shared.ts` exporte les sélections des clones : `IMAGE_FIELDS`, `FILE_FIELDS`, `CTA_FIELDS` (`{ label lien style }`), `ENTETE_FIELDS` (`{ badge titre intro }`), `SEO_FIELDS`. `fragments/index.ts` concatène tout en `SECTIONS_FRAGMENTS` + un `SECTIONS_FIELD` (le champ `sections { sections { ...HeroFields ... } }`) réutilisé par toutes les queries.\n\n### BlockRenderer — registry par suffixe\n\n```tsx\nconst registry: Record<string, ComponentType<any>> = {\n  HeroLayout: Hero,\n  GrilleCardsLayout: GrilleCards,\n  TemoignagesVideoLayout: TemoignagesVideo,\n  VideoLayout: Video,\n  // … 1 entrée par layout\n};\n// Longueur décroissante : TemoignagesVideoLayout doit matcher avant VideoLayout\nconst registryKeys = Object.keys(registry).sort((a, b) => b.length - a.length);\n\nexport function BlockRenderer({ sections }: { sections: WpSection[] | null | undefined }) {\n  if (!sections?.length) return null;\n  return (\n    <>\n      {sections.map((section, i) => {\n        const typename = section?.__typename;\n        if (!typename) return null;\n        const key = registryKeys.find((k) => typename.endsWith(k));\n        if (!key) {\n          // Layout inconnu → warn en dev, JAMAIS throw (le site doit survivre)\n          if (process.env.NODE_ENV !== \"production\")\n            console.warn(`[BlockRenderer] Layout inconnu : ${typename}`);\n          return null;\n        }\n        const Block = registry[key];\n        return <Block key={i} {...section} position={i} />;\n      })}\n    </>\n  );\n}\n```\n\nLes composants blocks **sont les sections existantes du site, paramétrées** — on ne redessine rien, on extrait les props.\n\n### Routes\n\n1. **Route de préviz `/wp/[...uri]`** (à créer EN PREMIER) : `export const dynamic = \"force-dynamic\"`, metadata `robots: { index: false, follow: false }`, résout `/wp/<page-slug>` ou `/wp/<cpt>/<slug>` et rend `<BlockRenderer/>` entre Navbar et Footer. Sert à valider tout le pipeline AVANT de basculer les vraies routes.\n2. **Routes CPT `[slug]/page.tsx`** : `generateStaticParams` (query paginée des slugs publiés), `export const dynamicParams = true` (nouveau contenu sans rebuild), `generateMetadata` depuis le champ `seo` WP via le helper :\n\n```typescript\nexport async function generateMetadata({ params }): Promise<Metadata> {\n  const { slug } = await params;\n  const item = await getToiture(slug);\n  if (!item) return {};\n  return wpSeoToMetadata(item.seo, { title: item.title, canonical: `${SITE_URL}/toitures/${slug}` });\n}\n```\n\n`wpSeoToMetadata(seo, fallback)` : title/description/canonical/og/twitter + `robots noindex` si coché, fallback champ par champ vers les metas historiques en dur. Émettre aussi un `BreadcrumbList` JSON-LD systématique.\n\n3. **One-off** : la page garde un **fallback try/catch vers l'ancienne vue codée** — si WP est down ou non configuré (`isWpConfigured()`), on rend la version en dur. Bascule progressive, zéro risque.\n\nTags de lecture posés par les queries : `{ tags: [\"toiture\", `toiture:${slug}`] }` (en plus du tag `wordpress` ajouté par le client).\n\n---\n\n## 8. Revalidation — par TAGS ciblés\n\nJamais `revalidatePath('/', 'layout')` (purge totale à chaque save). Tags : `['wordpress', '{type}', '{type}:{slug}']` — posés par `fetchGraphQL` à la lecture, invalidés à l'écriture.\n\n### Côté Next : `app/api/revalidate/route.ts`\n\n```typescript\nexport async function POST(request: NextRequest) {\n  if (request.headers.get(\"x-revalidate-secret\") !== process.env.REVALIDATE_SECRET)\n    return NextResponse.json({ revalidated: false }, { status: 401 });\n  const { tags = [], paths = [] } = await request.json();\n  // Next 16 : profil \"max\" = purge des entrées cachées sans expiration (revalidate: false)\n  for (const tag of tags) revalidateTag(tag, \"max\");\n  for (const path of paths) revalidatePath(path);\n  return NextResponse.json({ revalidated: true, tags, paths });\n}\n// + GET ?secret=&tag=&path= pour les tests manuels\n```\n\n### Côté WP : `inc/revalidate.php`\n\n- `save_post` (status publish, types whitelistés) → `wp_remote_post` **non-bloquant** (`blocking => false, timeout => 1`) vers `{front}/api/revalidate` pour **chaque URL** de `FRONT_URLS` (CSV en env : prod + préprod), header `x-revalidate-secret`, body `{ tags: [type, \"type:slug\"] }`.\n- `acf/save_post` avec `$post_id === 'options'` → tag `wordpress` (purge globale : la nav/footer apparaissent partout).\n- **Bouton admin bar « 🚀 Publier sur le site »** : node `admin_bar_menu` + handler `wp_ajax_` (nonce + `current_user_can('edit_posts')`) qui envoie `['wordpress']` en mode **bloquant** et renvoie les statuts par front ; JS dans `admin_footer` (fetch `ajaxurl`, label ⏳ → ✅/❌ → reset 3 s).\n\nPas de CORS nécessaire : c'est WP (serveur) qui appelle Next (serveur).\n\n---\n\n## 9. Seed du contenu\n\nPrincipe : un **seeder PHP générique** (`wordpress/seed/lib.php` + `run.php`, exécuté via `wp eval-file`) qui lit des **JSON sémantiques** (1 fichier par page/post, champs par NOM ACF snake_case — pas le camelCase GraphQL) et résout noms → field keys depuis les définitions **réellement enregistrées** (`acf_get_field('field_{{prefix}}_sections')`, `acf_get_fields($group_key)`) — robuste aux renommages. Le flexible et les repeaters DOIVENT être écrits **par field keys** (`update_field('field_…', $rows)`), jamais par noms : par nom, ACF ne sait pas construire les metas des structures imbriquées non encore existantes.\n\n```json\n// seed/content/toiture-bac-acier.json\n{\n  \"type\": \"toiture\", \"slug\": \"bac-acier\", \"title\": \"Toiture bac acier\",\n  \"seo\": { \"titre_seo\": \"…\", \"meta_description\": \"…\" },\n  \"sections\": [\n    { \"layout\": \"hero\", \"variante\": \"standard\", \"titre\": \"Un toit plus *frais*\",\n      \"image\": { \"path\": \"images/toitures/bac-acier.webp\", \"alt\": \"…\" },\n      \"cta_primaire\": { \"label\": \"Diagnostic gratuit\", \"lien\": \"/diagnostic\", \"style\": \"primary\" } }\n  ]\n}\n```\n\nMécanique (lib.php) :\n\n- `seed_value($fieldDef, $value)` : switch sur `$field['type']` — image/file → upload, repeater/group → récursion par sub_fields, true_false → 0/1, relationship → slugs → IDs.\n- **Médias dédupés** par meta `_source_path` (re-seed sans doublons), alt écrit depuis le JSON (`_wp_attachment_image_alt`).\n- **Idempotent** : recherche du post par slug, update sinon insert. Relançable à volonté, par pattern (`wp eval-file run.php toiture-*`).\n- **2 passes** dans run.php : passe 1 = créer tous les posts nus, passe 2 = remplir les champs (les `relationship` ont besoin que les cibles existent).\n- Assets **rsyncés sur le VPS avant le seed** (dans `wp-content/seed-assets/`, paths relatifs dans le JSON). Les images servies par un CDN externe dans le projet d'origine sont **téléchargées et localisées AVANT** par un script — le seed ne fetch jamais d'URL distante.\n- SVG : non uploadables par défaut → `define('ALLOW_UNFILTERED_UPLOADS', true)` dans `WORDPRESS_CONFIG_EXTRA` (ou convertir en webp/png).\n- Documenter le format JSON dans `seed/content/_FORMAT.md`.\n\n**Extraction du contenu** : transformer les JSX en dur en JSON sémantiques est un travail parallélisable d'agents — leur contrat = `_FORMAT.md` + `SCHEMA.md` (un agent par groupe de pages, jamais d'invention de champs).\n\n```bash\nrsync -av wordpress/seed/ root@vps:/opt/{{PROJECT}}/wordpress/wp-content/seed/\nrsync -av public/images/ root@vps:/opt/{{PROJECT}}/wordpress/wp-content/seed-assets/images/\ndocker compose run --rm wpcli wp eval-file wp-content/seed/run.php\n```\n\n---\n\n## 10. Checklist de vérification de bout en bout\n\nDans l'ordre, ne pas sauter d'étape :\n\n1. **Page de test seedée** (un JSON avec TOUS les layouts, une instance de chaque) via le seeder par field keys.\n2. **Requête GraphQL complète** (tous les fragments) exécutée en curl sur cette page → zéro `errors`. C'est ici que les collisions de types imbriqués (§6b) explosent — pas avant.\n3. **Rendu `/wp/test`** : chaque block monte ; un warn console = layout manquant au registry.\n4. **Seed complet** de tout le contenu + options (nav, footer, coordonnées, logos).\n5. **Bascule des vraies routes** : CPT (`generateStaticParams` OK) puis one-off avec fallback.\n6. **Boucle éditoriale** : modifier un titre dans le BO → bouton « Publier sur le site » → front à jour (vérifier aussi que le save_post seul suffit).\n7. **SEO** : metas + JSON-LD présents dans le **HTML initial** (curl, pas le DOM hydraté) ; `curl -I https://{{WP_DOMAIN}}` → `X-Robots-Tag: noindex`.\n\n## Checklist avant de commencer\n\n- [ ] Projet Next.js App Router fonctionnel (sinon migrer d'abord — cf. skill bun-to-next)\n- [ ] VPS Ubuntu avec Docker + accès SSH ; savoir si 80/443 sont déjà pris (piège §3d)\n- [ ] Clé ACF PRO + un sous-domaine pour l'admin ({{WP_DOMAIN}})\n- [ ] Inventaire des contenus : classification template répétable (CPT) / one-off (page) / global (options) / données métier (group hors flexible)\n- [ ] Catalogue de blocks dessiné par STRUCTURE (~20-30 layouts max, selects variante/theme pour les déclinaisons, noms imbriqués suffixés si sous-champs différents)\n- [ ] `wordpress/SCHEMA.md` rédigé AVANT le code — c'est le contrat entre le mu-plugin, les fragments et les agents de seed\n"},"caller":{"type":"direct"}}],"stop_reason":null,"stop_sequence":null,"stop_details":null,"usage":{"input_tokens":339,"cache_creation_input_tokens":399,"cache_read_input_tokens":98468,"cache_creation":{"ephemeral_5m_input_tokens":399,"ephemeral_1h_input_tokens":0},"output_tokens":65,"service_tier":"standard","inference_geo":"not_available"},"diagnostics":null},"requestId":"req_011CbyPc4wsWRmx8bmWay68G","attributionAgent":"general-purpose","type":"assistant","uuid":"e0d542a9-46c6-4320-99c9-ec19a537b0ed","timestamp":"2026-06-12T12:49:21.358Z","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"e0d542a9-46c6-4320-99c9-ec19a537b0ed","isSidechain":true,"promptId":"2791882b-bb7e-4f2e-be7f-672bab599788","agentId":"aa1b8ee79ef99e3f5","type":"user","message":{"role":"user","content":[{"tool_use_id":"toolu_01LkL8dyXQrtFhN5muHGBjoY","type":"tool_result","content":"The file /opt/claude-code/library/skills/nextjs-wordpress-headless/SKILL.md has been updated successfully. (file state is current in your context — no need to Read it back)"}]},"uuid":"41e116a4-0e91-436c-b8ae-bd3efe9c0042","timestamp":"2026-06-12T12:49:21.514Z","sourceToolAssistantUUID":"e0d542a9-46c6-4320-99c9-ec19a537b0ed","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"41e116a4-0e91-436c-b8ae-bd3efe9c0042","isSidechain":true,"agentId":"aa1b8ee79ef99e3f5","message":{"model":"claude-fable-5","id":"msg_01HK4oV2VnRq4M379sv4JFRs","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_01NcaRBCtniu4F2JFuDGT1sK","name":"Bash","input":{"command":"wc -l /opt/claude-code/library/skills/nextjs-wordpress-headless/SKILL.md && head -4 /home/dev/.claude/skills/nextjs-wordpress-headless/SKILL.md","description":"Verify line count and symlink resolution"},"caller":{"type":"direct"}}],"stop_reason":"tool_use","stop_sequence":null,"stop_details":null,"usage":{"input_tokens":2,"cache_creation_input_tokens":13999,"cache_read_input_tokens":98867,"output_tokens":152,"server_tool_use":{"web_search_requests":0,"web_fetch_requests":0},"service_tier":"standard","cache_creation":{"ephemeral_1h_input_tokens":0,"ephemeral_5m_input_tokens":13999},"inference_geo":"not_available","iterations":[{"input_tokens":2,"output_tokens":152,"cache_read_input_tokens":98867,"cache_creation_input_tokens":13999,"cache_creation":{"ephemeral_5m_input_tokens":13999,"ephemeral_1h_input_tokens":0},"type":"message"}],"speed":"standard"},"diagnostics":null},"requestId":"req_011CbyPmFvvGosJ3vqBHEJEg","attributionAgent":"general-purpose","type":"assistant","uuid":"bdf85fbe-1b45-4664-90f6-353ef19628fd","timestamp":"2026-06-12T12:49:27.284Z","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"bdf85fbe-1b45-4664-90f6-353ef19628fd","isSidechain":true,"promptId":"2791882b-bb7e-4f2e-be7f-672bab599788","agentId":"aa1b8ee79ef99e3f5","type":"user","message":{"role":"user","content":[{"tool_use_id":"toolu_01NcaRBCtniu4F2JFuDGT1sK","type":"tool_result","content":"538 /opt/claude-code/library/skills/nextjs-wordpress-headless/SKILL.md\n---\nname: nextjs-wordpress-headless\ndescription: Branche un projet Next.js (App Router) sur un WordPress headless auto-hébergé (Docker sur VPS Ubuntu, ACF PRO Flexible Content + WPGraphQL) avec un catalogue de blocks réorganisables, revalidation par tags et seed idempotent. Gère pages one-off, CPT, options globales, SEO.\n---","is_error":false}]},"uuid":"0edde6fc-d610-4fb4-81e4-5f6fa82a1bf4","timestamp":"2026-06-12T12:49:27.352Z","sourceToolAssistantUUID":"bdf85fbe-1b45-4664-90f6-353ef19628fd","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
{"parentUuid":"0edde6fc-d610-4fb4-81e4-5f6fa82a1bf4","isSidechain":true,"agentId":"aa1b8ee79ef99e3f5","message":{"model":"claude-fable-5","id":"msg_01BXEBM96V5ANCJSG8TGov8Y","type":"message","role":"assistant","content":[{"type":"text","text":"Skill réécrit : `/opt/claude-code/library/skills/nextjs-wordpress-headless/SKILL.md` (538 lignes, accessible via le symlink `/home/dev/.claude/skills/nextjs-wordpress-headless/SKILL.md`). Frontmatter YAML conservé, description mise à jour. Tous les snippets sont tirés du projet de référence covalba-wp et généricisés avec `{{PROJECT}}`, `{{prefix}}`, `{{WP_DOMAIN}}`, `{{ACF_KEY}}`.\n\n## Changements majeurs vs l'ancien skill\n\n**Supprimé**\n- Tout le setup macOS/Homebrew (php@8.3, mysql local, `wp server --port=8080`) → remplacé par Docker Compose sur VPS Ubuntu.\n- Le CORS dans functions.php (inutile : fetch server-side RSC).\n- Le thème headless avec functions.php fourre-tout → remplacé par un mu-plugin structuré versionné dans le repo Next.\n- `revalidatePath('/', 'layout')` (purge totale) → revalidation par tags ciblés.\n- Les field groups \"1 groupe ACF par section de page\" (`acf{{Section}}`) → remplacés par le système de catalogue de blocks.\n\n**Nouveau cœur : le catalogue de blocks**\n- 1 seul flexible content `sections` partagé entre tous les types (page + CPT) → un seul jeu d'union GraphQL / fragments / BlockRenderer ; catalogue filtré par type côté BO via `acf/load_field` (sans toucher au schéma) ; mutualisation par structure de données (~20-30 layouts + selects variante/theme) ; escape hatch `composant_react`.\n- Modèle de contenu enrichi : groups métier hors flexible (ficheProduit…), options page à onglets, helpers PHP composables (groups partagés plutôt que clones ACF), field keys déterministes `field_{{prefix}}_{layout}_{champ}`.\n\n**Sections entièrement nouvelles (vécu du projet)**\n- §3 Infra : compose complet (mariadb + redis + wpcli en profile tools) avec les 4 pièges documentés — volume wp-core partagé, `WORDPRESS_CONFIG_EXTRA` runtime → ancre `&wp-env`, échappement `$$` compose, cohabitation 80/443 → nginx hôte + certbot. Sécurité durcie (xmlrpc 403, noindex admin, basic auth wp-login, REST users masqué, introspection privée) + cron hôte backups/wp-cron.\n- §4 ACF PRO : URL de download qui marche (sans `&t=latest` qui 404) + licence par env.\n- §6 Pièges WPGraphQL for ACF v2 (section dédiée) : matching par suffixe `{Layout}Layout` trié par longueur décroissante, télescopage silencieux des types imbriqués partagés, images en connection `{ node { … } }`, repeaters null, interdiction de renommer un `acf_fc_layout` publié, validation par vraie requête (pas introspection), options sous `optionsSite { options }`.\n- §7-8 : route de préviz `/wp/[...uri]` avant bascule, fallback try/catch des one-off, `wpSeoToMetadata`, `revalidateTag(tag, \"max\")` Next 16, bouton admin bar avec retour des statuts par front.\n- §9 Seed industrialisé : JSON sémantique → résolution noms→field keys depuis les définitions enregistrées, médias dédupés par meta, 2 passes pour les relationships, extraction JSX par agents avec `_FORMAT.md` + `SCHEMA.md` comme contrat.\n- §10 Checklist de bout en bout ordonnée (page test → requête → /wp/test → seed → bascule → boucle éditoriale → SEO dans le HTML initial).\n\n**Conservé de l'ancien**\n- L'esprit du \"Quand utiliser\", le tableau CPT vs champ vs options (enrichi de 2 lignes), le seed par field keys obligatoire, la note SVG (`ALLOW_UNFILTERED_UPLOADS`), le bouton revalidation admin bar (modernisé), la checklist de prérequis."}],"stop_reason":"end_turn","stop_sequence":null,"stop_details":null,"usage":{"input_tokens":2,"cache_creation_input_tokens":335,"cache_read_input_tokens":112866,"output_tokens":1485,"server_tool_use":{"web_search_requests":0,"web_fetch_requests":0},"service_tier":"standard","cache_creation":{"ephemeral_1h_input_tokens":0,"ephemeral_5m_input_tokens":335},"inference_geo":"not_available","iterations":[{"input_tokens":2,"output_tokens":1485,"cache_read_input_tokens":112866,"cache_creation_input_tokens":335,"cache_creation":{"ephemeral_5m_input_tokens":335,"ephemeral_1h_input_tokens":0},"type":"message"}],"speed":"standard"},"diagnostics":null},"requestId":"req_011CbyPmgntrrHB9KUx2C71H","attributionAgent":"general-purpose","type":"assistant","uuid":"5d955959-1482-42ac-958d-ce24f7b8a35a","timestamp":"2026-06-12T12:49:49.397Z","userType":"external","entrypoint":"cli","cwd":"/opt/projects/.covalba-wp-worktrees/tom-passage-wp","sessionId":"b766da3d-889b-4e02-8825-50bcae309ddb","version":"2.1.174","gitBranch":"tom/passage-wp","slug":"vast-riding-beacon"}
