claude-plugin-wordpress-manager 1.7.2 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/.claude-plugin/plugin.json +7 -3
  2. package/CHANGELOG.md +55 -0
  3. package/agents/wp-ecommerce-manager.md +136 -0
  4. package/agents/wp-site-manager.md +27 -0
  5. package/docs/plans/2026-02-28-multisite-v1.9.0-design.md +258 -0
  6. package/docs/plans/2026-02-28-multisite-v1.9.0.md +1604 -0
  7. package/docs/plans/2026-02-28-roadmap-v1.8-v2.1-design.md +314 -0
  8. package/docs/plans/2026-02-28-woocommerce-v1.8.0.md +2012 -0
  9. package/package.json +8 -3
  10. package/servers/wp-rest-bridge/build/tools/index.d.ts +1187 -0
  11. package/servers/wp-rest-bridge/build/tools/index.js +26 -2
  12. package/servers/wp-rest-bridge/build/tools/multisite-network.d.ts +132 -0
  13. package/servers/wp-rest-bridge/build/tools/multisite-network.js +157 -0
  14. package/servers/wp-rest-bridge/build/tools/multisite-sites.d.ts +150 -0
  15. package/servers/wp-rest-bridge/build/tools/multisite-sites.js +160 -0
  16. package/servers/wp-rest-bridge/build/tools/wc-coupons.d.ts +144 -0
  17. package/servers/wp-rest-bridge/build/tools/wc-coupons.js +92 -0
  18. package/servers/wp-rest-bridge/build/tools/wc-customers.d.ts +141 -0
  19. package/servers/wp-rest-bridge/build/tools/wc-customers.js +92 -0
  20. package/servers/wp-rest-bridge/build/tools/wc-orders.d.ts +186 -0
  21. package/servers/wp-rest-bridge/build/tools/wc-orders.js +128 -0
  22. package/servers/wp-rest-bridge/build/tools/wc-products.d.ts +324 -0
  23. package/servers/wp-rest-bridge/build/tools/wc-products.js +177 -0
  24. package/servers/wp-rest-bridge/build/tools/wc-reports.d.ts +117 -0
  25. package/servers/wp-rest-bridge/build/tools/wc-reports.js +94 -0
  26. package/servers/wp-rest-bridge/build/tools/wc-settings.d.ts +72 -0
  27. package/servers/wp-rest-bridge/build/tools/wc-settings.js +70 -0
  28. package/servers/wp-rest-bridge/build/types.d.ts +98 -0
  29. package/servers/wp-rest-bridge/build/wordpress.d.ts +28 -0
  30. package/servers/wp-rest-bridge/build/wordpress.js +85 -0
  31. package/servers/wp-rest-bridge/build/wpcli.d.ts +23 -0
  32. package/servers/wp-rest-bridge/build/wpcli.js +72 -0
  33. package/skills/wordpress-router/references/decision-tree.md +6 -2
  34. package/skills/wp-audit/SKILL.md +1 -0
  35. package/skills/wp-backup/SKILL.md +1 -0
  36. package/skills/wp-deploy/SKILL.md +1 -0
  37. package/skills/wp-multisite/SKILL.md +92 -0
  38. package/skills/wp-multisite/references/domain-mapping.md +70 -0
  39. package/skills/wp-multisite/references/migration-multisite.md +76 -0
  40. package/skills/wp-multisite/references/network-plugins.md +66 -0
  41. package/skills/wp-multisite/references/network-setup.md +69 -0
  42. package/skills/wp-multisite/references/site-management.md +67 -0
  43. package/skills/wp-multisite/references/user-roles.md +73 -0
  44. package/skills/wp-multisite/scripts/multisite_inspect.mjs +160 -0
  45. package/skills/wp-security/SKILL.md +4 -0
  46. package/skills/wp-woocommerce/SKILL.md +110 -0
  47. package/skills/wp-woocommerce/references/analytics-reports.md +75 -0
  48. package/skills/wp-woocommerce/references/coupon-marketing.md +92 -0
  49. package/skills/wp-woocommerce/references/order-workflow.md +88 -0
  50. package/skills/wp-woocommerce/references/payment-gateways.md +69 -0
  51. package/skills/wp-woocommerce/references/product-management.md +61 -0
  52. package/skills/wp-woocommerce/references/shipping-setup.md +79 -0
  53. package/skills/wp-woocommerce/references/tax-configuration.md +91 -0
  54. package/skills/wp-woocommerce/references/wc-extensions.md +97 -0
  55. package/skills/wp-woocommerce/scripts/woocommerce_inspect.mjs +181 -0
  56. package/skills/wp-wpcli-and-ops/SKILL.md +4 -0
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "wordpress-manager",
3
- "version": "1.7.2",
4
- "description": "Unified WordPress management plugin for Claude Code. Orchestrates Hostinger MCP (infrastructure), WP REST API bridge (content), and WordPress.com MCP (hosted sites) with 8 specialized agents, 24 skills, and security hooks for multi-site WordPress operations. Includes local dev environment support for WordPress Studio, LocalWP, and wp-env. Covers development, testing, security, i18n, accessibility, headless, and operations.",
3
+ "version": "1.9.0",
4
+ "description": "Unified WordPress management plugin for Claude Code. Orchestrates Hostinger MCP (infrastructure), WP REST API bridge (81 tools incl. WooCommerce + Multisite), and WordPress.com MCP (hosted sites) with 9 specialized agents, 26 skills, and security hooks. Includes WordPress Multisite network management (10 tools via WP-CLI), WooCommerce store management (30 tools), local dev environment support, development, testing, security, i18n, accessibility, headless, and operations.",
5
5
  "author": {
6
6
  "name": "vinmor",
7
7
  "email": "morreale.v@gmail.com"
@@ -17,7 +17,11 @@
17
17
  "local-development",
18
18
  "wordpress-studio",
19
19
  "localwp",
20
- "wp-env"
20
+ "wp-env",
21
+ "woocommerce",
22
+ "ecommerce",
23
+ "multisite",
24
+ "network"
21
25
  ],
22
26
  "mcpServers": "./.mcp.json"
23
27
  }
package/CHANGELOG.md CHANGED
@@ -2,6 +2,61 @@
2
2
 
3
3
  All notable changes to the WordPress Manager plugin for Claude Code.
4
4
 
5
+ ## [1.9.0] - 2026-02-28
6
+
7
+ ### Added
8
+ - **WordPress Multisite support** — 10 new MCP tools for network management
9
+ - **WP-CLI execution module** (`wpcli.ts`) — local and SSH remote command execution
10
+ - **New skill**: `wp-multisite` with 6 reference files (network setup, site management, domain mapping, network plugins, user roles, migration)
11
+ - **Detection script**: `multisite_inspect.mjs` — detects multisite configuration
12
+ - **SiteConfig extended**: `wp_path`, `ssh_host`, `ssh_user`, `ssh_key`, `ssh_port`, `is_multisite` fields
13
+
14
+ ### New MCP Tools (10)
15
+ - `ms_list_sites` — List all sub-sites in the network
16
+ - `ms_get_site` — Get sub-site details
17
+ - `ms_create_site` — Create a new sub-site
18
+ - `ms_activate_site` — Activate or deactivate a sub-site
19
+ - `ms_delete_site` — Delete a sub-site (with safety gate)
20
+ - `ms_list_network_plugins` — List plugins with network activation status (REST)
21
+ - `ms_network_activate_plugin` — Network-activate a plugin (wp-cli)
22
+ - `ms_network_deactivate_plugin` — Network-deactivate a plugin (wp-cli)
23
+ - `ms_list_super_admins` — List Super Admin users (wp-cli)
24
+ - `ms_get_network_settings` — Get network-wide settings (wp-cli)
25
+
26
+ ### Changed
27
+ - `wp-site-manager` agent: added Multisite Network Management section
28
+ - Router decision-tree.md upgraded to v6 with multisite keywords
29
+ - `wp-wpcli-and-ops` and `wp-security` skills: added multisite cross-references
30
+ - WP REST Bridge: 71 → 81 total tools
31
+
32
+ ## [1.8.0] - 2026-02-28
33
+
34
+ ### Added
35
+ - **WooCommerce support** — 30 new MCP tools via WP REST Bridge (`wc/v3` namespace)
36
+ - `wc-products.ts` (7 tools): CRUD products, categories, variations
37
+ - `wc-orders.ts` (6 tools): List, get, update status, notes, refunds
38
+ - `wc-customers.ts` (4 tools): List, get, create, update customers
39
+ - `wc-coupons.ts` (4 tools): CRUD coupons with discount rules
40
+ - `wc-reports.ts` (5 tools): Sales, top sellers, order/product/customer totals
41
+ - `wc-settings.ts` (4 tools): Payment gateways, shipping zones, tax classes, system status
42
+ - **`wp-woocommerce` skill** — WooCommerce operations with decision tree and 8 reference files
43
+ - Reference files: product-management, order-workflow, analytics-reports, coupon-marketing, shipping-setup, payment-gateways, tax-configuration, wc-extensions
44
+ - **`wp-ecommerce-manager` agent** — WooCommerce store management (color: orange)
45
+ - 5 procedures: product catalog, order processing, sales analytics, coupon campaigns, store health
46
+ - Report template with KPIs and recommendations
47
+ - **`woocommerce_inspect.mjs`** detection script — scans for WC plugin, hooks, composer deps, API config
48
+ - WooCommerce authentication: Consumer Key/Secret via separate AxiosInstance in WP REST Bridge
49
+ - `SiteConfig` extended with optional `wc_consumer_key`/`wc_consumer_secret`
50
+ - `makeWooCommerceRequest()` reusing existing retry and concurrency logic
51
+ - WC types: `WCProduct`, `WCOrder`, `WCCustomer`, `WCCoupon` in types.ts
52
+
53
+ ### Changed
54
+ - Router upgraded to v5 — WooCommerce keywords in Step 0 + Step 2b routing entry
55
+ - `wp-site-manager` agent — added `wp-ecommerce-manager` to delegation table
56
+ - Cross-references added to `wp-audit`, `wp-deploy`, `wp-backup` skills
57
+ - WP REST Bridge: 41 → 71 total tools
58
+ - Version bumps: plugin.json + package.json → 1.8.0 (25 skills, 9 agents)
59
+
5
60
  ## [1.7.2] - 2026-02-28
6
61
 
7
62
  ### Changed
@@ -0,0 +1,136 @@
1
+ ---
2
+ name: wp-ecommerce-manager
3
+ color: orange
4
+ description: |
5
+ Use this agent when the user needs to manage a WooCommerce store: products, orders,
6
+ customers, coupons, analytics, or store configuration.
7
+
8
+ <example>
9
+ Context: User wants to check recent orders and update their status.
10
+ user: "Mostrami gli ordini degli ultimi 7 giorni e segna come completati quelli spediti"
11
+ assistant: "I'll use the wp-ecommerce-manager agent to list recent orders and update their status."
12
+ <commentary>Order management with status updates requires the WooCommerce agent for safe multi-step operations.</commentary>
13
+ </example>
14
+
15
+ <example>
16
+ Context: User needs to set up a product catalog.
17
+ user: "Crea 5 prodotti nel catalogo WooCommerce con variazioni di taglia"
18
+ assistant: "I'll use the wp-ecommerce-manager agent to create variable products with size variations."
19
+ <commentary>Bulk product creation with variations is a multi-step WooCommerce operation.</commentary>
20
+ </example>
21
+
22
+ <example>
23
+ Context: User wants a sales performance overview.
24
+ user: "Fammi un report delle vendite di questo mese con i prodotti piu venduti"
25
+ assistant: "I'll use the wp-ecommerce-manager agent to generate a monthly sales report with top sellers."
26
+ <commentary>Sales analytics combining multiple report endpoints requires the WooCommerce agent.</commentary>
27
+ </example>
28
+
29
+ model: inherit
30
+ tools: Read, Grep, Glob, Bash, WebFetch, WebSearch
31
+ ---
32
+
33
+ # WooCommerce E-Commerce Manager
34
+
35
+ Specialized agent for WooCommerce store management. Handles product catalog, order processing, customer management, coupon marketing, sales analytics, and store configuration through the WP REST Bridge WooCommerce tools (30 MCP tools, `wc/v3` namespace).
36
+
37
+ ## Available MCP Tool Sets
38
+
39
+ ### 1. WP REST Bridge — WooCommerce (wc_ prefix)
40
+
41
+ All tools require WooCommerce credentials in `WP_SITES_CONFIG` (`wc_consumer_key` + `wc_consumer_secret`).
42
+
43
+ - **Products (7)**: `wc_list_products`, `wc_get_product`, `wc_create_product`, `wc_update_product`, `wc_delete_product`, `wc_list_product_categories`, `wc_list_product_variations`
44
+ - **Orders (6)**: `wc_list_orders`, `wc_get_order`, `wc_update_order_status`, `wc_list_order_notes`, `wc_create_order_note`, `wc_create_refund`
45
+ - **Customers (4)**: `wc_list_customers`, `wc_get_customer`, `wc_create_customer`, `wc_update_customer`
46
+ - **Coupons (4)**: `wc_list_coupons`, `wc_get_coupon`, `wc_create_coupon`, `wc_delete_coupon`
47
+ - **Reports (5)**: `wc_get_sales_report`, `wc_get_top_sellers`, `wc_get_orders_totals`, `wc_get_products_totals`, `wc_get_customers_totals`
48
+ - **Settings (4)**: `wc_list_payment_gateways`, `wc_list_shipping_zones`, `wc_get_tax_classes`, `wc_get_system_status`
49
+
50
+ ### 2. WP REST Bridge — WordPress (wp/v2)
51
+
52
+ For cross-referencing with WordPress content:
53
+ - **Content**: `list_content`, `get_content`, `create_content` (pages for shop, cart, checkout)
54
+ - **Plugins**: `list_plugins` (verify WooCommerce active)
55
+ - **Media**: `upload_media` (product images)
56
+
57
+ ## Operating Procedures
58
+
59
+ ### Product Catalog Setup
60
+
61
+ 1. Verify WooCommerce active: `list_plugins` → check woocommerce status
62
+ 2. Create categories: use WooCommerce admin or REST API
63
+ 3. Create products: `wc_create_product` with name, price, description, categories, images
64
+ 4. For variable products: create parent (type: 'variable') → add attributes → create variations
65
+ 5. Verify: `wc_list_products` with status filter
66
+
67
+ ### Order Processing
68
+
69
+ 1. List pending orders: `wc_list_orders` with status='processing'
70
+ 2. Review order details: `wc_get_order` for each order
71
+ 3. Update status: `wc_update_order_status` (processing → completed)
72
+ 4. Add notes: `wc_create_order_note` for tracking info
73
+ 5. Handle refunds: `wc_create_refund` with amount and reason
74
+
75
+ ### Sales Analytics
76
+
77
+ 1. Get sales overview: `wc_get_sales_report` with period or date range
78
+ 2. Get top products: `wc_get_top_sellers`
79
+ 3. Get totals: `wc_get_orders_totals` + `wc_get_products_totals` + `wc_get_customers_totals`
80
+ 4. Present as structured report with KPIs (AOV, revenue trend, top sellers)
81
+
82
+ ### Coupon Campaign
83
+
84
+ 1. Define strategy: discount type (percent/fixed), target, limits
85
+ 2. Create coupon: `wc_create_coupon` with rules
86
+ 3. Verify: `wc_get_coupon` to confirm settings
87
+ 4. Monitor: `wc_list_coupons` to check usage_count
88
+
89
+ ### Store Health Check
90
+
91
+ 1. System status: `wc_get_system_status` (WC version, environment, DB)
92
+ 2. Payment gateways: `wc_list_payment_gateways` (verify active gateways)
93
+ 3. Shipping: `wc_list_shipping_zones` (verify zone coverage)
94
+ 4. Tax: `wc_get_tax_classes` (verify tax configuration)
95
+
96
+ ## Report Format
97
+
98
+ ```
99
+ ## WooCommerce Store Report — [Site Name]
100
+
101
+ ### Sales Summary (period)
102
+ - Total Sales: $X,XXX
103
+ - Net Sales: $X,XXX
104
+ - Orders: XX
105
+ - Average Order Value: $XX.XX
106
+ - Items Sold: XX
107
+
108
+ ### Top Sellers
109
+ 1. Product Name — XX units ($X,XXX revenue)
110
+ 2. ...
111
+
112
+ ### Order Status
113
+ - Processing: XX
114
+ - Completed: XX
115
+ - On Hold: XX
116
+ - Refunded: XX
117
+
118
+ ### Recommendations
119
+ - [Actionable items based on data]
120
+ ```
121
+
122
+ ## Safety Rules
123
+
124
+ - NEVER delete products without explicit user confirmation
125
+ - NEVER process refunds without verifying order details and getting user approval
126
+ - ALWAYS confirm before changing order status (especially to cancelled/refunded)
127
+ - ALWAYS verify WooCommerce credentials are configured before attempting operations
128
+ - NEVER expose Consumer Key/Secret in output or logs
129
+ - When creating bulk products, confirm the list with user before executing
130
+
131
+ ## Related Skills
132
+
133
+ - `wp-woocommerce` — Decision tree and reference files for all WC operations
134
+ - `wp-deploy` — Deploy store changes to production
135
+ - `wp-backup` — Backup store database before bulk operations
136
+ - `wp-audit` — Security and performance audit for WC stores
@@ -102,6 +102,31 @@ When asked about site status:
102
102
  - Always announce which site you're operating on
103
103
  - When comparing across sites, switch and collect data sequentially
104
104
 
105
+ ### Multisite Network Management
106
+ For WordPress Multisite networks (sites with `is_multisite: true` in WP_SITES_CONFIG):
107
+
108
+ **Prerequisites check:**
109
+ 1. Verify the site is multisite: `ms_list_sites` (will error if not multisite)
110
+ 2. Verify wp-cli access is configured (`wp_path` in config)
111
+
112
+ **Sub-site operations:**
113
+ - List sub-sites → `ms_list_sites`
114
+ - Create sub-site → `ms_create_site` (slug, title, admin email)
115
+ - Activate/deactivate → `ms_activate_site`
116
+ - Delete → `ms_delete_site` (requires `confirm: true`)
117
+
118
+ **Network administration:**
119
+ - List plugins with network status → `ms_list_network_plugins`
120
+ - Network-activate → `ms_network_activate_plugin`
121
+ - Network-deactivate → `ms_network_deactivate_plugin`
122
+ - List Super Admins → `ms_list_super_admins`
123
+ - Network settings → `ms_get_network_settings`
124
+
125
+ **Safety rules for multisite:**
126
+ - NEVER delete blog_id 1 (main site)
127
+ - ALWAYS confirm before network-activating plugins (affects ALL sites)
128
+ - Announce which network you're operating on when multiple multisite networks are configured
129
+
105
130
  ### Safety Rules
106
131
  - NEVER delete content without explicit user confirmation
107
132
  - NEVER deactivate plugins without listing dependencies first
@@ -121,3 +146,5 @@ For domain-specific tasks, delegate to specialized agents:
121
146
  | Performance optimization | `wp-performance-optimizer` | Speed analysis and optimization |
122
147
  | Content creation / SEO | `wp-content-strategist` | Content workflows and SEO |
123
148
  | Deploy to production | `wp-deployment-engineer` | Plugin, theme, site deployment |
149
+ | WooCommerce store management | `wp-ecommerce-manager` | Products, orders, customers, coupons, analytics |
150
+ | Multisite network management | `wp-site-manager` (this agent) | Sub-sites, network plugins, Super Admin — see section above |
@@ -0,0 +1,258 @@
1
+ # v1.9.0 Multisite — Design Document
2
+
3
+ **Data:** 2026-02-28
4
+ **Stato:** Approvato
5
+ **Baseline:** v1.8.0 (25 skill, 9 agent, 71 MCP tools, 13 detection scripts)
6
+
7
+ ---
8
+
9
+ ## Contesto
10
+
11
+ WordPress Multisite permette di gestire un network di siti da una singola installazione. Le REST API standard di WordPress NON espongono endpoint per operazioni multisite (creazione/eliminazione sub-siti, network activation, Super Admin management). Per questo motivo, i tool MCP usano **WP-CLI** come backend di esecuzione.
12
+
13
+ ## Decisioni architetturali
14
+
15
+ | Decisione | Scelta | Motivazione |
16
+ |-----------|--------|-------------|
17
+ | Backend esecuzione | WP-CLI via child_process | WordPress REST API non ha endpoint multisite |
18
+ | Contesto esecuzione | Locale + SSH remoto | Copre sia ambienti dev che produzione |
19
+ | Approccio ibrido | REST dove disponibile, wp-cli per network-only | Minimizza dipendenza SSH, massima compatibilita |
20
+ | Agent | Estensione wp-site-manager (no nuovo agent) | Come da roadmap, multisite e gestione siti |
21
+ | Modulo wp-cli | Dedicato (wpcli.ts) | Riusabile per v2.0 CI/CD, DRY |
22
+
23
+ ---
24
+
25
+ ## Componenti
26
+
27
+ | Tipo | Nome | Descrizione |
28
+ |------|------|-------------|
29
+ | Modulo TS | `wpcli.ts` | Esecuzione wp-cli locale/SSH con auto-detection |
30
+ | MCP Tools | `multisite-sites.ts` (5) | CRUD sub-siti via wp-cli |
31
+ | MCP Tools | `multisite-network.ts` (5) | Network admin, misto REST + wp-cli |
32
+ | Skill | `wp-multisite` | SKILL.md + 6 reference files |
33
+ | Detection | `multisite_inspect.mjs` | Rileva multisite, sub-siti, domain mapping |
34
+ | Agent update | `wp-site-manager.md` | Nuova sezione Multisite Network Management |
35
+
36
+ ---
37
+
38
+ ## Architettura TypeScript
39
+
40
+ ### SiteConfig estesa (`types.ts`)
41
+
42
+ Nuovi campi opzionali aggiunti a SiteConfig:
43
+
44
+ ```typescript
45
+ // WP-CLI access (optional, for multisite and CLI operations)
46
+ wp_path?: string; // Local WP installation path (e.g., ~/Studio/mysite, /var/www/wordpress)
47
+ ssh_host?: string; // SSH hostname for remote wp-cli
48
+ ssh_user?: string; // SSH username
49
+ ssh_key?: string; // Path to SSH private key
50
+ ssh_port?: number; // SSH port (default: 22)
51
+ is_multisite?: boolean; // Flag: this site is a multisite network
52
+ ```
53
+
54
+ ### Nuovo tipo `WPNetworkSite`
55
+
56
+ ```typescript
57
+ interface WPNetworkSite {
58
+ blog_id: number;
59
+ url: string;
60
+ domain: string;
61
+ path: string;
62
+ registered: string;
63
+ last_updated: string;
64
+ public: boolean;
65
+ archived: boolean;
66
+ mature: boolean;
67
+ spam: boolean;
68
+ deleted: boolean;
69
+ }
70
+ ```
71
+
72
+ ### Nuovo modulo `wpcli.ts`
73
+
74
+ Funzioni esportate:
75
+
76
+ | Funzione | Firma | Scopo |
77
+ |----------|-------|-------|
78
+ | `executeWpCli` | `(command: string, siteId?: string) => Promise<string>` | Esegue wp-cli locale o SSH, restituisce stdout |
79
+ | `hasWpCli` | `(siteId?: string) => boolean` | Verifica se wp-cli e configurato |
80
+ | `isMultisite` | `(siteId?: string) => boolean` | Verifica flag is_multisite |
81
+
82
+ Logica `executeWpCli`:
83
+ 1. Risolve siteId (default: activeSiteId)
84
+ 2. Recupera SiteConfig
85
+ 3. Se `wp_path` presente e NO `ssh_host` → locale: `cd {wp_path} && wp {command} --format=json`
86
+ 4. Se `ssh_host` presente → SSH: `ssh -i {ssh_key} -p {ssh_port} {ssh_user}@{ssh_host} 'cd {wp_path} && wp {command} --format=json'`
87
+ 5. Se nessuno configurato → throw Error con messaggio chiaro
88
+ 6. Timeout: 30 secondi
89
+ 7. Parse stdout, gestione stderr per errori
90
+
91
+ ---
92
+
93
+ ## MCP Tools (10 totali)
94
+
95
+ ### `multisite-sites.ts` — 5 tool (tutti wp-cli)
96
+
97
+ | Tool | WP-CLI Command | Input | Output |
98
+ |------|---------------|-------|--------|
99
+ | `ms_list_sites` | `wp site list` | `site_id?` | Array WPNetworkSite |
100
+ | `ms_get_site` | `wp site list --blog_id={id}` | `blog_id, site_id?` | WPNetworkSite singolo |
101
+ | `ms_create_site` | `wp site create --slug --title --email` | `slug, title, email, site_id?` | blog_id creato |
102
+ | `ms_activate_site` | `wp site activate/deactivate {id}` | `blog_id, active: boolean, site_id?` | Conferma |
103
+ | `ms_delete_site` | `wp site delete {id} --yes` | `blog_id, confirm: true, site_id?` | Conferma |
104
+
105
+ ### `multisite-network.ts` — 5 tool (misto REST + wp-cli)
106
+
107
+ | Tool | Metodo | Input | Output |
108
+ |------|--------|-------|--------|
109
+ | `ms_list_network_plugins` | REST `list_plugins` | `site_id?` | Plugin con flag network_active |
110
+ | `ms_network_activate_plugin` | wp-cli `wp plugin activate --network` | `plugin_slug, site_id?` | Conferma |
111
+ | `ms_network_deactivate_plugin` | wp-cli `wp plugin deactivate --network` | `plugin_slug, site_id?` | Conferma |
112
+ | `ms_list_super_admins` | wp-cli `wp super-admin list` | `site_id?` | Array username |
113
+ | `ms_get_network_settings` | wp-cli `wp network meta list 1` | `site_id?` | Network settings object |
114
+
115
+ ### Safety gates
116
+
117
+ - Tutti i tool verificano `isMultisite(siteId)` — errore se non multisite
118
+ - `ms_delete_site` richiede `confirm: true` esplicito
119
+ - `ms_network_activate_plugin` e `ms_network_deactivate_plugin` loggano il plugin e il siteId
120
+ - Timeout 30s per ogni comando wp-cli
121
+
122
+ ---
123
+
124
+ ## Skill `wp-multisite`
125
+
126
+ ### Struttura
127
+
128
+ ```
129
+ skills/wp-multisite/
130
+ ├── SKILL.md
131
+ ├── references/
132
+ │ ├── network-setup.md
133
+ │ ├── site-management.md
134
+ │ ├── domain-mapping.md
135
+ │ ├── network-plugins.md
136
+ │ ├── user-roles.md
137
+ │ └── migration-multisite.md
138
+ └── scripts/
139
+ └── multisite_inspect.mjs
140
+ ```
141
+
142
+ ### SKILL.md — Contenuto
143
+
144
+ - Trigger phrases: multisite, network, sub-site, domain mapping, super admin
145
+ - Prerequisites: wp-cli, is_multisite flag, wp_path/ssh_host configurati
146
+ - Decision tree: 10 tool ms_* con condizioni
147
+ - Reference file links
148
+
149
+ ### Reference files (6)
150
+
151
+ | File | Contenuto |
152
+ |------|-----------|
153
+ | `network-setup.md` | Sub-directory vs sub-domain, wp-config.php constants, MULTISITE/SUBDOMAIN_INSTALL |
154
+ | `site-management.md` | CRUD sub-siti, bulk operations, template sites |
155
+ | `domain-mapping.md` | Domini custom per sub-siti, SSL, DNS CNAME, sunrise.php |
156
+ | `network-plugins.md` | Network-activated vs per-site, must-use plugins, conflict resolution |
157
+ | `user-roles.md` | Super Admin capabilities, site-level roles, add/remove super admin |
158
+ | `migration-multisite.md` | Single-site → multisite, multisite → single, database tables |
159
+
160
+ ### Detection script `multisite_inspect.mjs`
161
+
162
+ Controlla:
163
+ 1. `wp-config.php` per costanti `MULTISITE`, `SUBDOMAIN_INSTALL`, `DOMAIN_CURRENT_SITE`, `PATH_CURRENT_SITE`
164
+ 2. `WP_SITES_CONFIG` env var per flag `is_multisite`
165
+ 3. Presenza di `wp-content/sunrise.php` (domain mapping avanzato)
166
+ 4. `.htaccess` per rewrite rules multisite (sub-directory pattern)
167
+
168
+ ---
169
+
170
+ ## Agent update: `wp-site-manager.md`
171
+
172
+ Nuova sezione **"## Multisite Network Management"** (~25 righe):
173
+
174
+ - Prerequisiti: verifica `is_multisite` e wp-cli
175
+ - Procedure: lista sub-siti, crea sub-sito, gestione plugin network, domain mapping
176
+ - Tool reference: 10 tool `ms_*`
177
+ - Safety: conferma prima di delete, verificare Super Admin
178
+
179
+ ---
180
+
181
+ ## Router `decision-tree.md` (v6)
182
+
183
+ Step 0 — aggiunta keyword "multisite" e "network" alla categoria operations.
184
+
185
+ Step 2b (operations) — nuova entry:
186
+ ```
187
+ "multisite, network, sub-sito, sub-site, domain mapping, super admin, network activate"
188
+ → wp-multisite skill + wp-site-manager agent
189
+ ```
190
+
191
+ ---
192
+
193
+ ## Cross-references
194
+
195
+ | File | Aggiunta |
196
+ |------|----------|
197
+ | `wp-wpcli-and-ops/SKILL.md` | "Per operazioni multisite, vedi `wp-multisite` skill" |
198
+ | `wp-security/SKILL.md` | "Per Super Admin e capabilities multisite, vedi `wp-multisite` skill" |
199
+
200
+ ---
201
+
202
+ ## Config esempio
203
+
204
+ ```json
205
+ [
206
+ {
207
+ "id": "mynetwork",
208
+ "url": "https://network.example.com",
209
+ "username": "superadmin",
210
+ "password": "xxxx xxxx xxxx xxxx",
211
+ "wp_path": "/var/www/wordpress",
212
+ "ssh_host": "network.example.com",
213
+ "ssh_user": "deploy",
214
+ "ssh_key": "~/.ssh/id_rsa",
215
+ "is_multisite": true
216
+ },
217
+ {
218
+ "id": "local-multisite",
219
+ "url": "http://multisite.local",
220
+ "username": "admin",
221
+ "password": "yyyy yyyy yyyy yyyy",
222
+ "wp_path": "~/Studio/multisite",
223
+ "is_multisite": true
224
+ }
225
+ ]
226
+ ```
227
+
228
+ Primo sito: remoto via SSH. Secondo: locale senza SSH.
229
+
230
+ ---
231
+
232
+ ## Version bump
233
+
234
+ - `plugin.json` → v1.9.0, description aggiornata (26 skill, 9 agent)
235
+ - `package.json` → v1.9.0, keywords: +multisite, +network
236
+ - `CHANGELOG.md` → entry v1.9.0
237
+
238
+ ---
239
+
240
+ ## File da creare/modificare
241
+
242
+ | File | Azione | Note |
243
+ |------|--------|------|
244
+ | `servers/wp-rest-bridge/src/wpcli.ts` | **NUOVO** | Modulo WP-CLI execution |
245
+ | `servers/wp-rest-bridge/src/types.ts` | Modifica | +WPNetworkSite, +SiteConfig fields |
246
+ | `servers/wp-rest-bridge/src/tools/multisite-sites.ts` | **NUOVO** | 5 tool gestione sub-siti |
247
+ | `servers/wp-rest-bridge/src/tools/multisite-network.ts` | **NUOVO** | 5 tool network admin |
248
+ | `servers/wp-rest-bridge/src/tools/index.ts` | Modifica | Registrazione 10 nuovi tool |
249
+ | `skills/wp-multisite/SKILL.md` | **NUOVO** | Skill principale |
250
+ | `skills/wp-multisite/references/*.md` (6 file) | **NUOVO** | 6 reference files |
251
+ | `skills/wp-multisite/scripts/multisite_inspect.mjs` | **NUOVO** | Detection script |
252
+ | `agents/wp-site-manager.md` | Modifica | +sezione Multisite |
253
+ | `skills/wordpress-router/references/decision-tree.md` | Modifica | Router v6 |
254
+ | `skills/wp-wpcli-and-ops/SKILL.md` | Modifica | Cross-ref |
255
+ | `skills/wp-security/SKILL.md` | Modifica | Cross-ref |
256
+ | `.claude-plugin/plugin.json` | Modifica | Version bump |
257
+ | `package.json` | Modifica | Version bump |
258
+ | `CHANGELOG.md` | Modifica | Entry v1.9.0 |