claude-plugin-wordpress-manager 2.14.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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "wordpress-manager",
3
- "version": "2.13.0",
4
- "description": "Unified WordPress management plugin for Claude Code. Orchestrates Hostinger MCP, WP REST API bridge (148 tools incl. WooCommerce, Multisite, Mailchimp, Buffer, SendGrid, GSC, GA4, Plausible, CWV, Slack, Workflows, LinkedIn, Twitter, Schema), and WordPress.com MCP with 45 skills, 12 agents, and security hooks. v2.13.0 adds Content Framework: 3-phase pipeline from signals intelligence to editorial calendar to WordPress publishing.",
3
+ "version": "2.14.1",
4
+ "description": "Unified WordPress management plugin for Claude Code. Orchestrates Hostinger MCP, WP REST API bridge (148 tools incl. WooCommerce, Multisite, Mailchimp, Buffer, SendGrid, GSC, GA4, Plausible, CWV, Slack, Workflows, LinkedIn, Twitter, Schema), and WordPress.com MCP with 46 skills, 12 agents, and security hooks. v2.14.1 adds Editorial Kanban Dashboard and Context Snippet (Step 0) in content skills.",
5
5
  "author": {
6
6
  "name": "vinmor",
7
7
  "email": "morreale.v@gmail.com"
@@ -42,7 +42,10 @@
42
42
  "content-pipeline",
43
43
  "editorial-calendar",
44
44
  "signals-intelligence",
45
- "structured-data"
45
+ "structured-data",
46
+ "dashboard",
47
+ "kanban",
48
+ "context-snippet"
46
49
  ],
47
50
  "mcpServers": "./.mcp.json"
48
51
  }
package/CHANGELOG.md CHANGED
@@ -2,6 +2,28 @@
2
2
 
3
3
  All notable changes to the WordPress Manager plugin for Claude Code.
4
4
 
5
+ ## [2.14.1] — 2026-03-02
6
+
7
+ ### Added — Context Snippet (Step 0)
8
+
9
+ Contesto editoriale automatico nelle content skill. Ogni invocazione di `wp-content-pipeline` o `wp-editorial-planner` mostra 3-5 righe di stato operativo prima di iniziare il workflow — "ecco cosa sto per toccare".
10
+
11
+ **Step 0: CONTEXT nelle skill**
12
+ - `wp-content-pipeline/SKILL.md` — Step 0 con pipeline slice: mostra brief attivi con status
13
+ - `wp-editorial-planner/SKILL.md` — Step 0 con calendar slice: mostra prossima scadenza
14
+ - Workflow aggiornato: `CONTEXT → SCAN → CONFIG → ...` e `CONTEXT → PLAN → BRIEF → ...`
15
+ - Step 0 è informational-only: non blocca mai il workflow, gestisce file mancanti gracefully
16
+
17
+ **CLI snippet in `context-scanner.mjs`**
18
+ - Nuovo entry point: `node scripts/context-scanner.mjs --snippet --site=mysite [--slice=pipeline|calendar|signals]`
19
+ - `renderContextSnippet()` enhanced: nuovo parametro `activeBriefs` per pipeline slice
20
+ - Output su stderr (coerente con pattern MCP server)
21
+
22
+ **Design document**
23
+ - `docs/plans/2026-03-02-context-snippet-design.md` — architettura, formato, vincoli
24
+
25
+ ---
26
+
5
27
  ## [2.14.0] — 2026-03-02
6
28
 
7
29
  ### Added — Editorial Kanban Dashboard
@@ -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.*
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "claude-plugin-wordpress-manager",
3
- "version": "2.14.0",
4
- "description": "Unified WordPress management and development plugin for Claude Code. Orchestrates Hostinger MCP, WP REST API bridge (148 tools incl. 30 WooCommerce + 10 Multisite + 4 Webhooks + 7 Mailchimp + 5 Buffer + 6 SendGrid + 8 GSC + 6 GA4 + 4 Plausible + 4 CWV + 3 Slack + 4 Workflows + 5 LinkedIn + 5 Twitter + 3 Schema), and WordPress.com MCP with 46 skills, 12 agents, and security hooks. v2.14.0 adds Editorial Kanban Dashboard: self-contained HTML report generated from .content-state/ files.",
3
+ "version": "2.14.1",
4
+ "description": "Unified WordPress management and development plugin for Claude Code. Orchestrates Hostinger MCP, WP REST API bridge (148 tools incl. 30 WooCommerce + 10 Multisite + 4 Webhooks + 7 Mailchimp + 5 Buffer + 6 SendGrid + 8 GSC + 6 GA4 + 4 Plausible + 4 CWV + 3 Slack + 4 Workflows + 5 LinkedIn + 5 Twitter + 3 Schema), and WordPress.com MCP with 46 skills, 12 agents, and security hooks. v2.14.1 adds Context Snippet (Step 0) to content skills for automatic editorial context display.",
5
5
  "author": {
6
6
  "name": "vinmor",
7
7
  "email": "morreale.v@gmail.com"
@@ -421,9 +421,9 @@ export function aggregateMetrics(rawData, viewType = 'kanban') {
421
421
  };
422
422
  }
423
423
 
424
- // ── RENDER: Context Snippet (Fase B stub) ──────────────────────────
424
+ // ── RENDER: Context Snippet (Livello 2 — inline nelle content skill) ──
425
425
 
426
- export function renderContextSnippet(metrics, sliceType = 'pipeline') {
426
+ export function renderContextSnippet(metrics, sliceType = 'pipeline', activeBriefs = []) {
427
427
  const m = metrics;
428
428
  const period = m.calendarPeriod ? m.calendarPeriod.replace('..', ' → ') : 'no calendar';
429
429
  const lines = [
@@ -434,6 +434,15 @@ export function renderContextSnippet(metrics, sliceType = 'pipeline') {
434
434
  `───────────────────────────────────────────`,
435
435
  ];
436
436
 
437
+ if (sliceType === 'pipeline' && activeBriefs.length > 0) {
438
+ const briefSummary = activeBriefs
439
+ .slice(0, 3)
440
+ .map(b => `${b.briefId} (${b.status})`)
441
+ .join(', ');
442
+ const extra = activeBriefs.length > 3 ? ` +${activeBriefs.length - 3} more` : '';
443
+ lines.splice(3, 0, ` Briefs: ${briefSummary}${extra}`);
444
+ }
445
+
437
446
  if (sliceType === 'calendar' && m.nextDeadline) {
438
447
  lines.splice(3, 0, ` Next: ${m.nextDeadline.date} — "${m.nextDeadline.title?.substring(0, 40)}..."`);
439
448
  }
@@ -444,3 +453,43 @@ export function renderContextSnippet(metrics, sliceType = 'pipeline') {
444
453
 
445
454
  return lines.join('\n');
446
455
  }
456
+
457
+ // ── CLI Entry Point ─────────────────────────────────────────────────
458
+ // Usage: node scripts/context-scanner.mjs --snippet --site=mysite [--slice=pipeline] [--month=2026-03]
459
+
460
+ async function cli() {
461
+ const args = process.argv.slice(2);
462
+ if (!args.includes('--snippet')) return;
463
+
464
+ const siteArg = args.find(a => a.startsWith('--site='));
465
+ if (!siteArg) {
466
+ process.stderr.write('Error: --site=<site_id> is required\n');
467
+ process.exit(1);
468
+ }
469
+ const siteId = siteArg.split('=')[1];
470
+
471
+ const sliceArg = args.find(a => a.startsWith('--slice='));
472
+ const sliceType = sliceArg ? sliceArg.split('=')[1] : 'pipeline';
473
+
474
+ const monthArg = args.find(a => a.startsWith('--month='));
475
+ const month = monthArg ? monthArg.split('=')[1] : undefined;
476
+
477
+ try {
478
+ const rawData = await scanContentState('.content-state', siteId, month);
479
+ const metrics = aggregateMetrics(rawData);
480
+ const snippet = renderContextSnippet(metrics, sliceType, rawData.briefs.active);
481
+ process.stderr.write(snippet + '\n');
482
+ } catch (err) {
483
+ process.stderr.write(`Context snippet error: ${err.message}\n`);
484
+ process.exit(1);
485
+ }
486
+ }
487
+
488
+ // Only run CLI when executed directly (not imported as module)
489
+ const isMainModule = process.argv[1] && (
490
+ process.argv[1].endsWith('context-scanner.mjs') ||
491
+ process.argv[1].endsWith('context-scanner')
492
+ );
493
+ if (isMainModule) {
494
+ cli();
495
+ }
@@ -26,13 +26,44 @@ The content pipeline orchestrates a structured workflow from content brief files
26
26
  ## Pipeline Workflow
27
27
 
28
28
  ```
29
- SCAN → CONFIG → VALIDATE → PUBLISH → DISTRIBUTE → UPDATE → ARCHIVE
29
+ CONTEXT → SCAN → CONFIG → VALIDATE → PUBLISH → DISTRIBUTE → UPDATE → ARCHIVE
30
30
  ```
31
31
 
32
32
  Each step reads specific files, calls specific tools, and has defined decision points. If any step fails or requires user input, the pipeline stops and reports status -- it never silently skips steps.
33
33
 
34
34
  ---
35
35
 
36
+ ## Step 0: CONTEXT
37
+
38
+ **What it does:** Provides editorial context before the main workflow begins. This is an informational step -- it never blocks the workflow.
39
+
40
+ **Trigger:** Automatic -- run this step at every skill invocation, before Step 1.
41
+
42
+ **Procedure:**
43
+
44
+ 1. Determine the target `site_id` from user context (explicit mention, active site, or ask the user)
45
+ 2. Read `.content-state/{site_id}.config.md` -- extract `site_url` from frontmatter
46
+ 3. Find the most recent `.content-state/*-editorial.state.md` file -- parse the editorial table and count entries by status (`planned`, `draft`, `ready`, `scheduled`, `published`). Extract `goals.posts_target` from frontmatter
47
+ 4. List `.content-state/pipeline-active/*.brief.md` files -- read each brief's `brief_id` and `status` from frontmatter
48
+ 5. Display the context snippet:
49
+
50
+ ```
51
+ ── Editorial Context ──────────────────────
52
+ {site_url} | {calendar period}
53
+ Pipeline: {draft_count} draft → {ready_count} ready → {scheduled_count} scheduled
54
+ Briefs: {brief_id} ({status}), {brief_id} ({status})
55
+ Posts: {published_count}/{posts_target} pubblicati
56
+ ───────────────────────────────────────────
57
+ ```
58
+
59
+ **If files are missing:**
60
+ - No config file → skip snippet, note "No site config found for {site_id}" and continue to Step 1
61
+ - No editorial calendar → show partial snippet with "no calendar" in place of period
62
+ - No active briefs → omit the Briefs line
63
+ - Never stop the workflow because of missing context -- Step 0 is informational only
64
+
65
+ ---
66
+
36
67
  ## Step 1: SCAN
37
68
 
38
69
  **What it does:** Discovers brief files that are ready for processing.
@@ -26,11 +26,42 @@ The editorial planner manages monthly content calendars as `.state.md` files sto
26
26
  ## Workflow Overview
27
27
 
28
28
  ```
29
- PLAN --> BRIEF --> SCHEDULE --> SYNC
29
+ CONTEXT --> PLAN --> BRIEF --> SCHEDULE --> SYNC
30
30
  ```
31
31
 
32
32
  ---
33
33
 
34
+ ## Step 0: CONTEXT
35
+
36
+ **What it does:** Provides editorial context before the main workflow begins. This is an informational step -- it never blocks the workflow.
37
+
38
+ **Trigger:** Automatic -- run this step at every skill invocation, before Step 1.
39
+
40
+ **Procedure:**
41
+
42
+ 1. Determine the target `site_id` from user context (explicit mention, active site, or ask the user)
43
+ 2. Read `.content-state/{site_id}.config.md` -- extract `site_url` from frontmatter
44
+ 3. Find the most recent `.content-state/*-editorial.state.md` file -- parse the editorial table and count entries by status (`planned`, `draft`, `ready`, `scheduled`, `published`). Extract `goals.posts_target` from frontmatter
45
+ 4. Identify the next upcoming deadline: first non-published entry with a title, sorted by date
46
+ 5. Display the context snippet:
47
+
48
+ ```
49
+ ── Editorial Context ──────────────────────
50
+ {site_url} | {calendar period}
51
+ Pipeline: {draft_count} draft → {ready_count} ready → {scheduled_count} scheduled
52
+ Next: {date} — "{title truncated to 40 chars}..."
53
+ Posts: {published_count}/{posts_target} pubblicati
54
+ ───────────────────────────────────────────
55
+ ```
56
+
57
+ **If files are missing:**
58
+ - No config file → skip snippet, note "No site config found for {site_id}" and continue to Step 1
59
+ - No editorial calendar → show partial snippet with "no calendar" in place of period
60
+ - No upcoming deadline → omit the Next line
61
+ - Never stop the workflow because of missing context -- Step 0 is informational only
62
+
63
+ ---
64
+
34
65
  ## Step 1: PLAN -- Create or update editorial calendar
35
66
 
36
67
  **When to run:** User asks to create a new plan or update an existing one.