claude-plugin-wordpress-manager 2.13.0 → 2.14.1

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 (53) hide show
  1. package/.claude-plugin/plugin.json +6 -3
  2. package/CHANGELOG.md +65 -6
  3. package/agents/wp-accessibility-auditor.md +1 -1
  4. package/agents/wp-content-strategist.md +2 -2
  5. package/agents/wp-deployment-engineer.md +1 -1
  6. package/agents/wp-distribution-manager.md +1 -1
  7. package/agents/wp-monitoring-agent.md +1 -1
  8. package/agents/wp-performance-optimizer.md +1 -1
  9. package/agents/wp-security-auditor.md +1 -1
  10. package/agents/wp-site-manager.md +3 -3
  11. package/commands/wp-setup.md +2 -2
  12. package/docs/GUIDE.md +26 -26
  13. package/docs/VALIDATION.md +3 -3
  14. package/docs/guides/wp-ecommerce.md +4 -4
  15. package/docs/plans/2026-03-01-tier3-wcop-implementation.md +1 -1
  16. package/docs/plans/2026-03-01-tier4-5-implementation.md +1 -1
  17. package/docs/plans/2026-03-02-content-framework-architecture.md +33 -33
  18. package/docs/plans/2026-03-02-content-framework-strategic-reflections.md +1 -1
  19. package/docs/plans/2026-03-02-content-intelligence-phase2.md +13 -13
  20. package/docs/plans/2026-03-02-content-pipeline-phase1.md +10 -10
  21. package/docs/plans/2026-03-02-context-snippet-design.md +232 -0
  22. package/docs/plans/2026-03-02-dashboard-kanban-design.md +761 -0
  23. package/docs/plans/2026-03-02-dashboard-kanban-implementation.md +598 -0
  24. package/docs/plans/2026-03-02-dashboard-strategy.md +363 -0
  25. package/docs/plans/2026-03-02-editorial-calendar-phase3.md +3 -3
  26. package/docs/validation/results.json +16 -16
  27. package/package.json +8 -4
  28. package/scripts/context-scanner.mjs +495 -0
  29. package/scripts/dashboard-renderer.mjs +553 -0
  30. package/scripts/run-validation.mjs +2 -2
  31. package/servers/wp-rest-bridge/build/server.js +1 -1
  32. package/skills/wp-analytics/references/signals-feed-schema.md +20 -20
  33. package/skills/wp-content/references/content-templates.md +1 -1
  34. package/skills/wp-content/references/seo-optimization.md +8 -8
  35. package/skills/wp-content-attribution/references/roi-calculation.md +1 -1
  36. package/skills/wp-content-attribution/references/utm-tracking-setup.md +5 -5
  37. package/skills/wp-content-generation/references/generation-workflow.md +2 -2
  38. package/skills/wp-content-pipeline/SKILL.md +39 -8
  39. package/skills/wp-content-pipeline/references/content-brief-schema.md +25 -25
  40. package/skills/wp-content-pipeline/references/site-config-schema.md +25 -25
  41. package/skills/wp-content-repurposing/references/auto-transform-pipeline.md +1 -1
  42. package/skills/wp-content-repurposing/references/email-newsletter.md +1 -1
  43. package/skills/wp-content-repurposing/references/platform-specs.md +2 -2
  44. package/skills/wp-content-repurposing/references/transform-templates.md +27 -27
  45. package/skills/wp-dashboard/SKILL.md +121 -0
  46. package/skills/wp-deploy/references/ssh-deploy.md +2 -2
  47. package/skills/wp-editorial-planner/SKILL.md +32 -1
  48. package/skills/wp-editorial-planner/references/editorial-schema.md +8 -8
  49. package/skills/wp-multilang-network/references/content-sync.md +3 -3
  50. package/skills/wp-multilang-network/references/network-architecture.md +1 -1
  51. package/skills/wp-multilang-network/references/seo-international.md +7 -7
  52. package/skills/wp-structured-data/references/schema-types.md +4 -4
  53. package/skills/wp-webhooks/references/payload-formats.md +3 -3
@@ -38,12 +38,12 @@ source:
38
38
 
39
39
  # Target — dove pubblicare
40
40
  target:
41
- site_id: opencactus # id dal WP_SITES_CONFIG
41
+ site_id: mysite # id dal WP_SITES_CONFIG
42
42
  content_type: post # post | page
43
43
  status: draft # draft | publish | future
44
44
  scheduled_date: null # ISO 8601 se status=future
45
45
  categories: [blog, seo]
46
- tags: [cactus-water, wellness]
46
+ tags: [premium-water, wellness]
47
47
 
48
48
  # Content Parameters — passati a wp-content per la creazione
49
49
  content:
@@ -86,8 +86,8 @@ Configurazione persistente per sito — brand voice, canali attivi, parametri di
86
86
  ```yaml
87
87
  ---
88
88
  # Site Configuration v1.0
89
- site_id: opencactus
90
- site_url: "https://opencactus.com"
89
+ site_id: mysite
90
+ site_url: "https://mysite.example.com"
91
91
  last_updated: "2026-03-02"
92
92
 
93
93
  # Brand Voice — alimentato da GenBrand output
@@ -97,7 +97,7 @@ brand:
97
97
  style_notes: |
98
98
  Stile divulgativo-scientifico. Evitare iperboli.
99
99
  Preferire dati concreti a claim generici.
100
- Valorizzare il territorio siciliano.
100
+ Valorizzare il territorio.
101
101
 
102
102
  # Default Content Parameters
103
103
  defaults:
@@ -175,7 +175,7 @@ Questa skill orchestra il flusso brief → publish → distribute.
175
175
  ### 1.5 Flusso Operativo End-to-End
176
176
 
177
177
  ```
178
- Utente: "Genera un articolo sul cactus water per opencactus"
178
+ Utente: "Genera un articolo sul sparkling water per mysite"
179
179
 
180
180
 
181
181
  GenCorpComm (content_marketing domain)
@@ -194,7 +194,7 @@ Utente: "Genera un articolo sul cactus water per opencactus"
194
194
  → legge brief → valida gates → crea post WP → distribuisce → archivia
195
195
 
196
196
 
197
- Output: "Pubblicato: https://opencactus.com/cactus-water-benefici/
197
+ Output: "Pubblicato: https://mysite.example.com/premium-water-benefici/
198
198
  LinkedIn: schedulato in 2h
199
199
  Newsletter: campagna creata, pronta per invio"
200
200
  ```
@@ -214,8 +214,8 @@ Formato di scambio tra wp-analytics e GenSignal. Traduce metriche WP nel formato
214
214
  ```yaml
215
215
  ---
216
216
  # Signals Feed Schema v1.0
217
- feed_id: "FEED-opencactus-2026-03"
218
- site_id: opencactus
217
+ feed_id: "FEED-mysite-2026-03"
218
+ site_id: mysite
219
219
  generated: "2026-03-02T12:00:00Z"
220
220
  period: "2026-02-01..2026-02-28"
221
221
  source_tools:
@@ -232,7 +232,7 @@ source_tools:
232
232
 
233
233
  ```yaml
234
234
  events:
235
- - entity_id: "Page:/cactus-water-benefici"
235
+ - entity_id: "Page:/premium-water-benefici"
236
236
  relation: pageviews
237
237
  value: 3240
238
238
  unit: count
@@ -240,9 +240,9 @@ events:
240
240
  delta_pct: +47 # variazione vs periodo precedente
241
241
  provenance:
242
242
  source_id: "ga4_top_pages"
243
- site: opencactus
243
+ site: mysite
244
244
 
245
- - entity_id: "Page:/cactus-water-benefici"
245
+ - entity_id: "Page:/premium-water-benefici"
246
246
  relation: avg_engagement_time
247
247
  value: 185
248
248
  unit: seconds
@@ -250,13 +250,13 @@ events:
250
250
  delta_pct: +12
251
251
  provenance:
252
252
  source_id: "ga4_report"
253
- site: opencactus
253
+ site: mysite
254
254
  ```
255
255
 
256
256
  ## Search Signals
257
257
 
258
258
  ```yaml
259
- - entity_id: "Keyword:acqua di cactus"
259
+ - entity_id: "Keyword:acqua premium"
260
260
  relation: search_impressions
261
261
  value: 8500
262
262
  unit: count
@@ -264,9 +264,9 @@ events:
264
264
  delta_pct: +120
265
265
  provenance:
266
266
  source_id: "gsc_query_analytics"
267
- site: opencactus
267
+ site: mysite
268
268
 
269
- - entity_id: "Keyword:acqua di cactus benefici"
269
+ - entity_id: "Keyword:acqua premium benefici"
270
270
  relation: search_ctr
271
271
  value: 4.2
272
272
  unit: percentage
@@ -274,7 +274,7 @@ events:
274
274
  delta_pct: -8
275
275
  provenance:
276
276
  source_id: "gsc_query_analytics"
277
- site: opencactus
277
+ site: mysite
278
278
  ```
279
279
 
280
280
  ## Source Signals
@@ -288,20 +288,20 @@ events:
288
288
  delta_pct: +85
289
289
  provenance:
290
290
  source_id: "ga4_traffic_sources"
291
- site: opencactus
291
+ site: mysite
292
292
  ```
293
293
 
294
294
  ## Performance Signals
295
295
 
296
296
  ```yaml
297
- - entity_id: "Site:opencactus"
297
+ - entity_id: "Site:mysite"
298
298
  relation: lcp
299
299
  value: 2.1
300
300
  unit: seconds
301
301
  ts: "2026-02-28T23:59:59Z"
302
302
  provenance:
303
303
  source_id: "cwv_crux_origin"
304
- site: opencactus
304
+ site: mysite
305
305
  ```
306
306
 
307
307
  # Anomalies & Patterns
@@ -310,9 +310,9 @@ Sezione che Claude popola dopo aver analizzato i delta:
310
310
 
311
311
  | Entity | Metric | Delta | Pattern Match | Action |
312
312
  |--------|--------|-------|---------------|--------|
313
- | Keyword:acqua di cactus | impressions | +120% | Search Intent Shift | Investigate: content cluster opportunity |
313
+ | Keyword:acqua premium | impressions | +120% | Search Intent Shift | Investigate: content cluster opportunity |
314
314
  | Source:linkedin | referrals | +85% | Early-Adopter Surge | Scale: increase LinkedIn posting frequency |
315
- | Page:/cactus-water-benefici | CTR | -8% | Hype→Utility Crossover | Optimize: refresh meta description, test titles |
315
+ | Page:/premium-water-benefici | CTR | -8% | Hype→Utility Crossover | Optimize: refresh meta description, test titles |
316
316
  ```
317
317
 
318
318
  **Dove vive**: `.content-state/signals-feed.md` (sovrascritta ad ogni generazione)
@@ -342,7 +342,7 @@ Step 7: GENERATE SIGNAL FEED
342
342
  ### 2.4 Flusso Intelligence Loop
343
343
 
344
344
  ```
345
- Utente: "analizza performance opencactus ultimo mese e genera segnali"
345
+ Utente: "analizza performance mysite ultimo mese e genera segnali"
346
346
 
347
347
 
348
348
  wp-analytics (skill estesa)
@@ -352,7 +352,7 @@ Utente: "analizza performance opencactus ultimo mese e genera segnali"
352
352
 
353
353
 
354
354
  Claude presenta: "3 anomalie rilevate:
355
- 1. 'acqua di cactus' impressions +120% → Search Intent Shift
355
+ 1. 'acqua premium' impressions +120% → Search Intent Shift
356
356
  2. LinkedIn referrals +85% → Early-Adopter Surge
357
357
  3. CTR -8% su pagina top → possibile title fatigue"
358
358
 
@@ -392,7 +392,7 @@ Pianificare contenuti nel tempo con un file `.state.md` che funge da calendario
392
392
  ---
393
393
  # Editorial Calendar Schema v1.0
394
394
  calendar_id: "CAL-2026-03"
395
- site_id: opencactus
395
+ site_id: mysite
396
396
  period: "2026-03-01..2026-03-31"
397
397
  created: "2026-02-28"
398
398
  last_updated: "2026-03-02"
@@ -402,9 +402,9 @@ status: active # active | archived
402
402
  goals:
403
403
  posts_target: 8
404
404
  posts_published: 2
405
- focus_topics: [cactus-water, sustainability, wellness]
405
+ focus_topics: [premium-water, sustainability, wellness]
406
406
  seo_targets:
407
- - keyword: "acqua di cactus"
407
+ - keyword: "acqua premium"
408
408
  target_position: top-5
409
409
  - keyword: "bevanda zero calorie naturale"
410
410
  target_position: top-10
@@ -416,15 +416,15 @@ goals:
416
416
 
417
417
  | Data | Titolo | Tipo | Status | Brief ID | Post ID | Canali |
418
418
  |------|--------|------|--------|----------|---------|--------|
419
- | Mar 4 | Acqua di cactus: 5 benefici scientifici | post | published | BRF-2026-001 | 1234 | linkedin, newsletter |
420
- | Mar 6 | Come il fico d'India diventa bevanda | post | published | BRF-2026-002 | 1235 | linkedin, twitter |
419
+ | Mar 4 | Acqua premium: 5 benefici scientifici | post | published | BRF-2026-001 | 1234 | linkedin, newsletter |
420
+ | Mar 6 | Come il frutto mediterraneo diventa bevanda | post | published | BRF-2026-002 | 1235 | linkedin, twitter |
421
421
 
422
422
  ## Settimana 2 (8-14 Mar)
423
423
 
424
424
  | Data | Titolo | Tipo | Status | Brief ID | Post ID | Canali |
425
425
  |------|--------|------|--------|----------|---------|--------|
426
426
  | Mar 11 | Zero calorie, tutto gusto: la scienza | post | ready | BRF-2026-003 | — | linkedin, newsletter |
427
- | Mar 13 | Sicilia e sostenibilità: la filiera | post | draft | BRF-2026-004 | — | linkedin |
427
+ | Mar 13 | Mediterraneo e sostenibilità: la filiera | post | draft | BRF-2026-004 | — | linkedin |
428
428
 
429
429
  ## Settimana 3 (15-21 Mar)
430
430
 
@@ -521,8 +521,8 @@ Orchestra la pianificazione editoriale e la conversione piano → brief → post
521
521
 
522
522
  ```
523
523
  .content-state/
524
- ├─ opencactus.config.md # Fase 1: config sito
525
- ├─ bioinagro.config.md # config per altro sito
524
+ ├─ mysite.config.md # Fase 1: config sito
525
+ ├─ othersite.config.md # config per altro sito
526
526
  ├─ signals-feed.md # Fase 2: ultimo feed segnali
527
527
  ├─ 2026-03-editorial.state.md # Fase 3: calendario corrente
528
528
  ├─ 2026-02-editorial.state.md # calendario precedente (archived)
@@ -577,7 +577,7 @@ Zero file `.ts` aggiunti. Tutte le operazioni usano i 148 MCP tool esistenti orc
577
577
  - [x] `site.config.md` schema definito e documentato
578
578
  - [x] `wp-content-pipeline` skill creata con workflow completo
579
579
  - [x] Flusso end-to-end testato: brief.md → WP post (distribuzione LinkedIn skipped — wp-rest-bridge non connesso, tool AIWU usato per WP)
580
- - [x] Supporto multi-sito (opencactus + almeno un altro)
580
+ - [x] Supporto multi-sito (mysite + almeno un altro)
581
581
 
582
582
  ### Fase 2: Content Intelligence
583
583
 
@@ -86,7 +86,7 @@ Invece di codice applicativo, usiamo **file Markdown strutturati come strato di
86
86
  |------|----------|-------|---------|
87
87
  | **Schema** | `.schema.md` | Template strutturato con frontmatter YAML, definisce la struttura | `content-brief.schema.md` |
88
88
  | **Instance** | `.state.md` | Stato corrente di un'istanza attiva, aggiornato tra sessioni | `2026-03-editorial.state.md` |
89
- | **Config** | `.config.md` | Parametri di tuning per un sito, brand, o workflow | `opencactus.config.md` |
89
+ | **Config** | `.config.md` | Parametri di tuning per un sito, brand, o workflow | `mysite.config.md` |
90
90
 
91
91
  ### Perché Funziona
92
92
 
@@ -120,7 +120,7 @@ The schema must include these sections:
120
120
  - Phase 3 bridge: The Anomalies & Patterns table feeds `wp-editorial-planner` for topic suggestions when creating calendar entries.
121
121
  - Overwrite semantics: `signals-feed.md` is overwritten each time Step 7 runs. Previous feeds are not archived (they represent point-in-time snapshots). The `comparison_period` field preserves the baseline reference.
122
122
 
123
- **I. Example feed** — A complete, realistic example for opencactus with:
123
+ **I. Example feed** — A complete, realistic example for mysite with:
124
124
  - 2-3 Traffic Signals (page-level)
125
125
  - 2 Search Signals (keyword-level)
126
126
  - 1 Source Signal
@@ -259,10 +259,10 @@ For each data point from Step 7.1, create a NormalizedEvent:
259
259
  ```
260
260
 
261
261
  **Entity ID mapping rules:**
262
- - GA4 top pages: `Page:{page_path}` (e.g., `Page:/cactus-water-benefici`)
262
+ - GA4 top pages: `Page:{page_path}` (e.g., `Page:/premium-water-benefici`)
263
263
  - GA4 traffic sources: `Source:{source_name}` (e.g., `Source:linkedin`)
264
- - GA4 site aggregates: `Site:{site_id}` (e.g., `Site:opencactus`)
265
- - GSC keywords: `Keyword:{query}` (e.g., `Keyword:acqua di cactus`)
264
+ - GA4 site aggregates: `Site:{site_id}` (e.g., `Site:mysite`)
265
+ - GSC keywords: `Keyword:{query}` (e.g., `Keyword:acqua premium`)
266
266
  - CWV metrics: `Site:{site_id}` with relation = metric name (e.g., `lcp`)
267
267
 
268
268
  **Relation mapping rules:**
@@ -396,7 +396,7 @@ Crossover. Writes .content-state/signals-feed.md."
396
396
 
397
397
  Create `.content-state/signals-feed.md` with:
398
398
 
399
- - Frontmatter targeting opencactus, period: 2026-02-01..2026-02-28, comparison_period: 2026-01-01..2026-01-31
399
+ - Frontmatter targeting mysite, period: 2026-02-01..2026-02-28, comparison_period: 2026-01-01..2026-01-31
400
400
  - source_tools: `[ga4_top_pages, ga4_traffic_sources, ga4_report, gsc_query_analytics]`
401
401
  - anomaly_threshold: 30
402
402
  - status: generated
@@ -404,27 +404,27 @@ Create `.content-state/signals-feed.md` with:
404
404
  Events section with realistic data:
405
405
 
406
406
  **Traffic Signals (3 events):**
407
- - `Page:/benefici-acqua-cactus-idratazione-naturale-sicilia` — pageviews: 3240, delta: +47%
408
- - `Page:/benefici-acqua-cactus-idratazione-naturale-sicilia` — avg_engagement_time: 185s, delta: +12%
407
+ - `Page:/benefici-acqua-premium-idratazione-naturale` — pageviews: 3240, delta: +47%
408
+ - `Page:/benefici-acqua-premium-idratazione-naturale` — avg_engagement_time: 185s, delta: +12%
409
409
  - `Page:/prodotti` — pageviews: 1850, delta: +8%
410
410
 
411
411
  **Search Signals (2 events):**
412
- - `Keyword:acqua di cactus` — search_impressions: 8500, delta: +120%
413
- - `Keyword:acqua di cactus benefici` — search_ctr: 4.2%, delta: -8%
412
+ - `Keyword:acqua premium` — search_impressions: 8500, delta: +120%
413
+ - `Keyword:acqua premium benefici` — search_ctr: 4.2%, delta: -8%
414
414
 
415
415
  **Source Signals (1 event):**
416
416
  - `Source:linkedin` — referral_sessions: 420, delta: +85%
417
417
 
418
418
  **Performance Signals (1 event):**
419
- - `Site:opencactus` — lcp: 2.1s, no delta (first CWV measurement)
419
+ - `Site:mysite` — lcp: 2.1s, no delta (first CWV measurement)
420
420
 
421
421
  **Anomalies & Patterns table (3 rows):**
422
422
 
423
423
  | Entity | Metric | Delta | Pattern Match | Action |
424
424
  |--------|--------|-------|---------------|--------|
425
- | Keyword:acqua di cactus | search_impressions | +120% | Search Intent Shift | Investigate: content cluster opportunity |
425
+ | Keyword:acqua premium | search_impressions | +120% | Search Intent Shift | Investigate: content cluster opportunity |
426
426
  | Source:linkedin | referral_sessions | +85% | Early-Adopter Surge | Scale: increase LinkedIn posting frequency |
427
- | Page:/benefici-acqua-cactus-idratazione-naturale-sicilia | pageviews | +47% | Unclassified anomaly | Review: investigate cause of +47% change in pageviews |
427
+ | Page:/benefici-acqua-premium-idratazione-naturale | pageviews | +47% | Unclassified anomaly | Review: investigate cause of +47% change in pageviews |
428
428
 
429
429
  This feed serves as the integration test artifact. The wp-analytics Step 7 will produce files in this exact format.
430
430
 
@@ -432,7 +432,7 @@ This feed serves as the integration test artifact. The wp-analytics Step 7 will
432
432
 
433
433
  Run: `head -15 .content-state/signals-feed.md`
434
434
 
435
- Expected: valid YAML frontmatter with `feed_id: FEED-opencactus-2026-02` and `status: generated`.
435
+ Expected: valid YAML frontmatter with `feed_id: FEED-mysite-2026-02` and `status: generated`.
436
436
 
437
437
  **Step 3: No commit** — this file is gitignored (instance data). It lives locally for testing.
438
438
 
@@ -94,7 +94,7 @@ The schema must include these sections:
94
94
  - `seo` block: `focus_keyword`, `meta_description`, `schema_type`, `internal_links`
95
95
  - `gates` block: `seo_score_min`, `readability_min`, `require_review`
96
96
  - **Status lifecycle**: `draft → ready → published → archived`
97
- - **Example brief** with realistic values for opencactus
97
+ - **Example brief** with realistic values for mysite
98
98
  - **Validation rules**: which fields are required vs optional, default values
99
99
 
100
100
  Content body goes after the frontmatter `---` separator as standard Markdown.
@@ -137,18 +137,18 @@ The schema must include:
137
137
  - `seo` block: `default_schema`, `min_score`, `auto_internal_links`
138
138
  - `cadence` block: `posts_per_week`, `preferred_days[]`, `publish_time`
139
139
  - **Body section**: free-form notes for Claude context
140
- - **Example config** for opencactus site
140
+ - **Example config** for mysite site
141
141
  - **Integration notes**: how GenBrand output maps to `brand` block, how WP_SITES_CONFIG maps to `site_id`
142
142
 
143
143
  **Step 2: Create an example instance file**
144
144
 
145
- Create `.content-state/opencactus.config.md` with realistic values for the opencactus site. This serves as both documentation and working config.
145
+ Create `.content-state/mysite.config.md` with realistic values for the mysite site. This serves as both documentation and working config.
146
146
 
147
- Note: this file is gitignored (site-specific), but we create it as a template. Copy the example from the schema reference, filling in opencactus-specific values.
147
+ Note: this file is gitignored (site-specific), but we create it as a template. Copy the example from the schema reference, filling in mysite-specific values.
148
148
 
149
149
  **Step 3: Verify both files**
150
150
 
151
- Run: `ls -la skills/wp-content-pipeline/references/site-config-schema.md .content-state/opencactus.config.md`
151
+ Run: `ls -la skills/wp-content-pipeline/references/site-config-schema.md .content-state/mysite.config.md`
152
152
 
153
153
  Expected: both files exist.
154
154
 
@@ -162,7 +162,7 @@ Defines {site_id}.config.md structure for brand voice, distribution
162
162
  channels, SEO defaults, and content cadence per WordPress site."
163
163
  ```
164
164
 
165
- Note: `.content-state/opencactus.config.md` is gitignored, so only the schema is committed.
165
+ Note: `.content-state/mysite.config.md` is gitignored, so only the schema is committed.
166
166
 
167
167
  ---
168
168
 
@@ -308,14 +308,14 @@ PUBLISH → DISTRIBUTE → UPDATE → ARCHIVE."
308
308
  **Step 1: Write a realistic test brief**
309
309
 
310
310
  Create `.content-state/pipeline-active/BRF-2026-001.brief.md` with:
311
- - Frontmatter targeting opencactus, content_type: post, status: draft
311
+ - Frontmatter targeting mysite, content_type: post, status: draft
312
312
  - Source: `manual` (not from Gen* — for testing without Gen* dependency)
313
- - A short (~200 word) article about cactus water benefits
313
+ - A short (~200 word) article about sparkling water benefits
314
314
  - Distribution: linkedin only (minimal for testing)
315
315
  - SEO: focus keyword set, schema_type: Article
316
316
  - Gates: require_review: true (so pipeline stops for confirmation)
317
317
 
318
- This brief serves as the integration test artifact. The pipeline skill will read it, present it to user, and (on approval) publish to opencactus.
318
+ This brief serves as the integration test artifact. The pipeline skill will read it, present it to user, and (on approval) publish to mysite.
319
319
 
320
320
  **Step 2: Verify brief parses correctly**
321
321
 
@@ -342,7 +342,7 @@ In the architecture doc:
342
342
  - [x] `site.config.md` schema definito e documentato
343
343
  - [x] `wp-content-pipeline` skill creata con workflow completo
344
344
  - [ ] Flusso end-to-end testato: brief.md → WP post → distribuzione social
345
- - [x] Supporto multi-sito (opencactus + almeno un altro)
345
+ - [x] Supporto multi-sito (mysite + almeno un altro)
346
346
  ```
347
347
 
348
348
  Note: "Flusso end-to-end testato" left unchecked — that requires a live WP test which is a separate manual validation step.
@@ -0,0 +1,232 @@
1
+ # Context Snippet — Design Document (Fase B)
2
+
3
+ **Data**: 2026-03-02
4
+ **Versione**: 1.0.0
5
+ **Stato**: Implementazione
6
+ **Prerequisito**: [Dashboard Strategy](2026-03-02-dashboard-strategy.md) (Fase A completata in v2.14.0)
7
+ **Deriva da**: Dashboard Strategy, sezione 6 — Fase B
8
+
9
+ ---
10
+
11
+ ## 1. Obiettivo
12
+
13
+ Ogni content skill stampa automaticamente 3-5 righe di contesto editoriale operativo **prima** di iniziare il proprio workflow. Questo "Step 0" fornisce a Claude e all'operatore umano una fotografia istantanea dello stato corrente senza richiedere un'azione esplicita (come invocare `wp-dashboard`).
14
+
15
+ ```
16
+ ┌─────────────────────────────────────────────────────────────┐
17
+ │ LIVELLO 2: CONTESTO OPERATIVO │
18
+ │ │
19
+ │ Step 0 inline nelle content skill │
20
+ │ Output: testo terminale (3-5 righe) │
21
+ │ Trigger: automatico, ogni invocazione skill │
22
+ │ Contenuto: solo lo slice rilevante per la skill attiva │
23
+ │ │
24
+ │ "Ecco cosa sto per toccare" │
25
+ └─────────────────────────────────────────────────────────────┘
26
+ ```
27
+
28
+ ---
29
+
30
+ ## 2. Architettura
31
+
32
+ ### 2.1 Componenti
33
+
34
+ ```
35
+ scripts/context-scanner.mjs
36
+ ├── scanContentState() ← legge .content-state/ (già esistente)
37
+ ├── aggregateMetrics() ← calcola metriche (già esistente)
38
+ ├── renderContextSnippet() ← formatta 3-5 righe terminal (già esistente)
39
+ └── CLI: --snippet --site=X ← NUOVO: entry point per invocazione da skill
40
+
41
+ skills/wp-content-pipeline/SKILL.md
42
+ └── Step 0: CONTEXT ← NUOVO: istruzioni per Claude
43
+
44
+ skills/wp-editorial-planner/SKILL.md
45
+ └── Step 0: CONTEXT ← NUOVO: istruzioni per Claude
46
+ ```
47
+
48
+ ### 2.2 Flusso di Esecuzione
49
+
50
+ ```
51
+ Utente invoca skill
52
+ → Claude legge SKILL.md
53
+ → Step 0: CONTEXT
54
+ → Claude legge .content-state/{site_id}.config.md
55
+ → Claude legge .content-state/{YYYY-MM}-editorial.state.md
56
+ → Claude legge .content-state/pipeline-active/*.brief.md
57
+ → Claude formatta e stampa snippet (3-5 righe)
58
+ → Step 1+: workflow normale della skill
59
+ ```
60
+
61
+ ### 2.3 Due Modalità di Rendering
62
+
63
+ | Modalità | Quando | Come |
64
+ |----------|--------|------|
65
+ | **Claude-native** | Sempre (Step 0 nelle skill) | Claude legge i file direttamente e formatta il testo seguendo le istruzioni SKILL.md |
66
+ | **Script CLI** | Opzionale, per automazione | `node scripts/context-scanner.mjs --snippet --site=mysite` |
67
+
68
+ La modalità Claude-native è il default. La modalità CLI serve come backup e per uso in script/automazione.
69
+
70
+ ---
71
+
72
+ ## 3. Formato Snippet
73
+
74
+ ### 3.1 Formato Base (tutte le skill)
75
+
76
+ ```
77
+ ── Editorial Context ──────────────────────
78
+ mysite.example.com | 2026-03-01 → 2026-03-31
79
+ Pipeline: 2 draft → 1 ready → 0 scheduled
80
+ Posts: 3/12 pubblicati
81
+ ───────────────────────────────────────────
82
+ ```
83
+
84
+ ### 3.2 Slice: Pipeline (wp-content-pipeline)
85
+
86
+ Aggiunge dettaglio sui brief attivi:
87
+
88
+ ```
89
+ ── Editorial Context ──────────────────────
90
+ mysite.example.com | 2026-03-01 → 2026-03-31
91
+ Pipeline: 2 draft → 1 ready → 0 scheduled
92
+ Briefs: BRF-2026-005 (ready), BRF-2026-006 (draft)
93
+ Posts: 3/12 pubblicati
94
+ ───────────────────────────────────────────
95
+ ```
96
+
97
+ ### 3.3 Slice: Calendar (wp-editorial-planner)
98
+
99
+ Aggiunge prossima scadenza:
100
+
101
+ ```
102
+ ── Editorial Context ──────────────────────
103
+ mysite.example.com | 2026-03-01 → 2026-03-31
104
+ Pipeline: 2 draft → 1 ready → 0 scheduled
105
+ Next: Mar 18 — "Acqua Premium: La Rivoluzione..."
106
+ Posts: 3/12 pubblicati
107
+ ───────────────────────────────────────────
108
+ ```
109
+
110
+ ### 3.4 Slice: Signals (future — wp-analytics)
111
+
112
+ Aggiunge anomalie rilevanti:
113
+
114
+ ```
115
+ ── Editorial Context ──────────────────────
116
+ mysite.example.com | 2026-03-01 → 2026-03-31
117
+ Pipeline: 2 draft → 1 ready → 0 scheduled
118
+ Signals: 3 anomalie | Top: /blog/benefici +45%
119
+ Posts: 3/12 pubblicati
120
+ ───────────────────────────────────────────
121
+ ```
122
+
123
+ ---
124
+
125
+ ## 4. Step 0 nelle Skill
126
+
127
+ ### 4.1 Template Step 0
128
+
129
+ Ogni content skill riceve un blocco Step 0 identico nella struttura, con `sliceType` diverso:
130
+
131
+ ```markdown
132
+ ## Step 0: CONTEXT
133
+
134
+ **What it does:** Provides editorial context before the main workflow begins.
135
+
136
+ **Trigger:** Automatic — run this step at every skill invocation, before Step 1.
137
+
138
+ **Procedure:**
139
+ 1. Determine the active site from user context or ask the user
140
+ 2. Read `.content-state/{site_id}.config.md` for site URL
141
+ 3. Read the most recent `.content-state/*-editorial.state.md`
142
+ 4. Count entries by status (planned, draft, ready, scheduled, published)
143
+ 5. Read `.content-state/pipeline-active/*.brief.md` for active brief IDs and statuses
144
+ 6. Display the context snippet
145
+
146
+ **Format:**
147
+ [specific to slice type]
148
+
149
+ **If files are missing:**
150
+ - If no config file exists → skip snippet, report "No site config found"
151
+ - If no editorial calendar exists → show partial snippet with "no calendar"
152
+ - If no active briefs → show "0 active briefs"
153
+ - Never stop the workflow because of missing context — Step 0 is informational only
154
+ ```
155
+
156
+ ### 4.2 Differenze per Skill
157
+
158
+ | Skill | sliceType | Riga Extra |
159
+ |-------|-----------|------------|
160
+ | `wp-content-pipeline` | `pipeline` | Lista brief attivi con status |
161
+ | `wp-editorial-planner` | `calendar` | Prossima scadenza (data + titolo troncato) |
162
+ | Future: `wp-analytics` | `signals` | Anomalie top dal signals-feed |
163
+
164
+ ---
165
+
166
+ ## 5. CLI Entry Point
167
+
168
+ ### 5.1 Aggiunta a context-scanner.mjs
169
+
170
+ ```javascript
171
+ // CLI entry point (when run directly, not imported)
172
+ if (process.argv[1] && process.argv[1].endsWith('context-scanner.mjs')) {
173
+ const args = process.argv.slice(2);
174
+ if (args.includes('--snippet')) {
175
+ // Parse --site=X and --slice=Y
176
+ // Run scanContentState + aggregateMetrics + renderContextSnippet
177
+ // Output to stderr (consistent with MCP server logging pattern)
178
+ }
179
+ }
180
+ ```
181
+
182
+ ### 5.2 Interfaccia CLI
183
+
184
+ ```
185
+ node scripts/context-scanner.mjs --snippet --site=mysite [--slice=pipeline|calendar|signals] [--month=2026-03]
186
+ ```
187
+
188
+ | Flag | Required | Default | Description |
189
+ |------|----------|---------|-------------|
190
+ | `--snippet` | Yes | — | Attiva modalità snippet (senza questo flag, il modulo è solo libreria) |
191
+ | `--site` | Yes | — | Site ID per il contesto |
192
+ | `--slice` | No | `pipeline` | Tipo di slice: `pipeline`, `calendar`, `signals` |
193
+ | `--month` | No | Mese corrente | Mese del calendario editoriale |
194
+
195
+ ---
196
+
197
+ ## 6. Vincoli
198
+
199
+ | Vincolo | Valore | Motivazione |
200
+ |---------|--------|-------------|
201
+ | Overhead < 500ms | Sì | Step 0 non deve rallentare la skill |
202
+ | Informational only | Sì | Step 0 non blocca mai il workflow |
203
+ | No nuovi file .content-state/ | Sì | Step 0 legge, non scrive |
204
+ | Stesso formato di renderContextSnippet() | Sì | Consistenza tra modalità |
205
+
206
+ ---
207
+
208
+ ## 7. Deliverable
209
+
210
+ | File | Azione | Descrizione |
211
+ |------|--------|-------------|
212
+ | `scripts/context-scanner.mjs` | Modifica | Aggiunta CLI `--snippet` + rimozione label "stub" |
213
+ | `skills/wp-content-pipeline/SKILL.md` | Modifica | Aggiunta Step 0: CONTEXT (pipeline slice) |
214
+ | `skills/wp-editorial-planner/SKILL.md` | Modifica | Aggiunta Step 0: CONTEXT (calendar slice) |
215
+ | `docs/plans/2026-03-02-context-snippet-design.md` | Nuovo | Questo documento |
216
+ | `package.json` | Modifica | Bump `v2.14.0` → `v2.14.1` |
217
+ | `CHANGELOG.md` | Modifica | Entry per context snippet |
218
+
219
+ ---
220
+
221
+ ## 8. Catena Documentale
222
+
223
+ ```
224
+ docs/plans/2026-03-02-dashboard-strategy.md
225
+ ├── docs/plans/2026-03-02-dashboard-kanban-design.md (Fase A — completata)
226
+ │ └── docs/plans/2026-03-02-dashboard-kanban-implementation.md
227
+ └── docs/plans/2026-03-02-context-snippet-design.md ← QUESTO DOCUMENTO (Fase B)
228
+ ```
229
+
230
+ ---
231
+
232
+ *Design document per Fase B del sistema dashboard — context snippet inline nelle content skill.*