myaidev-method 0.3.4 → 0.3.5
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.
- package/.claude-plugin/plugin.json +0 -1
- package/.env.example +5 -4
- package/CHANGELOG.md +2 -2
- package/CONTENT_CREATION_GUIDE.md +489 -3211
- package/DEVELOPER_USE_CASES.md +1 -1
- package/MODULAR_INSTALLATION.md +2 -2
- package/README.md +39 -33
- package/TECHNICAL_ARCHITECTURE.md +1 -1
- package/USER_GUIDE.md +242 -190
- package/agents/content-editor-agent.md +90 -0
- package/agents/content-planner-agent.md +97 -0
- package/agents/content-research-agent.md +62 -0
- package/agents/content-seo-agent.md +101 -0
- package/agents/content-writer-agent.md +69 -0
- package/agents/infographic-analyzer-agent.md +63 -0
- package/agents/infographic-designer-agent.md +72 -0
- package/bin/cli.js +776 -422
- package/{content-rules.example.md → content-rules-example.md} +2 -2
- package/dist/mcp/health-check.js +82 -68
- package/dist/mcp/mcp-config.json +8 -0
- package/dist/mcp/openstack-server.js +1746 -1262
- package/dist/server/.tsbuildinfo +1 -1
- package/extension.json +21 -4
- package/package.json +181 -184
- package/skills/company-config/SKILL.md +133 -0
- package/skills/configure/SKILL.md +1 -1
- package/skills/myai-configurator/SKILL.md +77 -0
- package/skills/myai-configurator/content-creation-configurator/SKILL.md +516 -0
- package/skills/myai-configurator/content-maintenance-configurator/SKILL.md +397 -0
- package/skills/myai-content-enrichment/SKILL.md +114 -0
- package/skills/myai-content-ideation/SKILL.md +288 -0
- package/skills/myai-content-ideation/evals/evals.json +182 -0
- package/skills/myai-content-production-coordinator/SKILL.md +946 -0
- package/skills/{content-rules-setup → myai-content-rules-setup}/SKILL.md +1 -1
- package/skills/{content-verifier → myai-content-verifier}/SKILL.md +1 -1
- package/skills/myai-content-writer/SKILL.md +333 -0
- package/skills/{infographic → myai-infographic}/SKILL.md +1 -1
- package/skills/myai-proprietary-content-verifier/SKILL.md +175 -0
- package/skills/myai-proprietary-content-verifier/evals/evals.json +36 -0
- package/skills/myai-skill-builder/SKILL.md +699 -0
- package/skills/myai-skill-builder/agents/analyzer-agent.md +137 -0
- package/skills/myai-skill-builder/agents/comparator-agent.md +77 -0
- package/skills/myai-skill-builder/agents/grader-agent.md +103 -0
- package/skills/myai-skill-builder/assets/eval_review.html +131 -0
- package/skills/myai-skill-builder/references/schemas.md +211 -0
- package/skills/myai-skill-builder/scripts/aggregate_benchmark.py +190 -0
- package/skills/myai-skill-builder/scripts/generate_review.py +381 -0
- package/skills/myai-skill-builder/scripts/package_skill.py +91 -0
- package/skills/myai-skill-builder/scripts/run_eval.py +105 -0
- package/skills/myai-skill-builder/scripts/run_loop.py +211 -0
- package/skills/myai-skill-builder/scripts/utils.py +123 -0
- package/skills/myai-visual-generator/SKILL.md +125 -0
- package/skills/myai-visual-generator/evals/evals.json +155 -0
- package/skills/myai-visual-generator/references/infographic-pipeline.md +73 -0
- package/skills/myai-visual-generator/references/research-visuals.md +57 -0
- package/skills/myai-visual-generator/references/services.md +89 -0
- package/skills/myai-visual-generator/scripts/visual-generation-utils.js +1272 -0
- package/skills/myaidev-figma/SKILL.md +212 -0
- package/skills/myaidev-figma/capture.js +133 -0
- package/skills/myaidev-figma/crawl.js +130 -0
- package/skills/myaidev-figma-configure/SKILL.md +130 -0
- package/skills/openstack-manager/SKILL.md +1 -1
- package/skills/payloadcms-publisher/SKILL.md +141 -77
- package/skills/payloadcms-publisher/references/field-mapping.md +142 -0
- package/skills/payloadcms-publisher/references/lexical-format.md +97 -0
- package/skills/security-auditor/SKILL.md +1 -1
- package/src/cli/commands/addon.js +105 -7
- package/src/config/workflows.js +172 -228
- package/src/lib/ascii-banner.js +197 -182
- package/src/lib/{content-coordinator.js → content-production-coordinator.js} +649 -459
- package/src/lib/installation-detector.js +93 -59
- package/src/lib/payloadcms-utils.js +285 -510
- package/src/lib/workflow-installer.js +55 -0
- package/src/mcp/health-check.js +82 -68
- package/src/mcp/openstack-server.js +1746 -1262
- package/src/scripts/configure-visual-apis.js +224 -173
- package/src/scripts/configure-wordpress-mcp.js +96 -66
- package/src/scripts/init/install.js +109 -85
- package/src/scripts/init-project.js +138 -67
- package/src/scripts/utils/write-content.js +67 -52
- package/src/scripts/wordpress/publish-to-wordpress.js +128 -128
- package/src/templates/claude/CLAUDE.md +19 -12
- package/hooks/hooks.json +0 -26
- package/skills/content-coordinator/SKILL.md +0 -130
- package/skills/content-enrichment/SKILL.md +0 -80
- package/skills/content-writer/SKILL.md +0 -285
- package/skills/skill-builder/SKILL.md +0 -417
- package/skills/visual-generator/SKILL.md +0 -140
- /package/skills/{content-writer → myai-content-writer}/agents/editor-agent.md +0 -0
- /package/skills/{content-writer → myai-content-writer}/agents/planner-agent.md +0 -0
- /package/skills/{content-writer → myai-content-writer}/agents/research-agent.md +0 -0
- /package/skills/{content-writer → myai-content-writer}/agents/seo-agent.md +0 -0
- /package/skills/{content-writer → myai-content-writer}/agents/visual-planner-agent.md +0 -0
- /package/skills/{content-writer → myai-content-writer}/agents/writer-agent.md +0 -0
|
@@ -0,0 +1,946 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: myai-content-production-coordinator
|
|
3
|
+
description: Coordinates the full content production pipeline from ideation through pre-production verification, writing, visual generation, and publishing. Supports both new article production and enrichment of existing content. Absorbs content stubs from the content-queue produced by ideation; stubs are scored and filtered by the proprietary content verifier before writing begins.
|
|
4
|
+
argument-hint: "<topic> [flags] | --enrich <file.md> [flags] | --batch [directory] [flags]"
|
|
5
|
+
allowed-tools: [Read, Write, WebSearch, WebFetch, Task(myai-content-ideation, myai-proprietary-content-verifier, content-writer, myai-content-enrichment, myai-visual-generator, "wordpress-publisher", "astro-publisher", "docusaurus-publisher", "mintlify-publisher", "payloadcms-publisher", Bash, Glob, Grep, AskUserQuestion]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Content Production Coordinator
|
|
9
|
+
|
|
10
|
+
End-to-end content pipeline — new articles or enrichment of existing ones, through to verification, visuals, and publishing. Each phase is dispatched to a specialized agent via the `Task` tool.
|
|
11
|
+
|
|
12
|
+
**Two approaches:**
|
|
13
|
+
- **New Content** — topic in → ideation → write → visuals → publish
|
|
14
|
+
- **Enrich Existing** — existing article in → enrich → visuals → publish
|
|
15
|
+
|
|
16
|
+
**Two scales:**
|
|
17
|
+
- **Single** — one article at a time
|
|
18
|
+
- **Batch** — process a `content-queue/` directory with phased parallel production
|
|
19
|
+
|
|
20
|
+
## Lane Selection
|
|
21
|
+
|
|
22
|
+
If no explicit flag (`--enrich` or a topic) is provided, ask the user:
|
|
23
|
+
|
|
24
|
+
> What would you like to do?
|
|
25
|
+
> 1. **New article** — write a new article from a topic
|
|
26
|
+
> 2. **Enrich existing** — update and enhance an existing article
|
|
27
|
+
|
|
28
|
+
Route to the appropriate lane based on the response.
|
|
29
|
+
|
|
30
|
+
## Agent Registry
|
|
31
|
+
|
|
32
|
+
Each agent is spawned via `Task` with its own tools, model, and focused responsibility:
|
|
33
|
+
|
|
34
|
+
| Phase | Agent / Skill | Lane | Purpose |
|
|
35
|
+
|-------|---------------|------|---------|
|
|
36
|
+
| Ideation + Planning | `myai-content-ideation` | New | Research, themes, ideation brief, article plan |
|
|
37
|
+
| Pre-Production Verification | `myai-proprietary-content-verifier` | New (batch) | Redundancy check, scoring (1–5), approve/reject stubs |
|
|
38
|
+
| Writing | `content-writer` | New | Write article using content rules and plan (approved stubs only in batch) |
|
|
39
|
+
| Enrichment | `myai-content-enrichment` | Enrich | Update stats, add references, FAQ, schema |
|
|
40
|
+
| Visual Generation | `myai-visual-generator` | Both | Hero images, diagrams, infographics for the article |
|
|
41
|
+
| Publishing | `"wordpress-publisher", "astro-publisher", "docusaurus-publisher", "mintlify-publisher", "payloadcms-publisher"` | Both | Detect platform and dispatch publishing agent |
|
|
42
|
+
|
|
43
|
+
Each agent is defined as a skill (in `skills/`) or colocated within its parent skill's `agents/` directory.
|
|
44
|
+
|
|
45
|
+
## Configuration Files
|
|
46
|
+
|
|
47
|
+
Read these files from the project root when available:
|
|
48
|
+
|
|
49
|
+
| File | Purpose |
|
|
50
|
+
|------|---------|
|
|
51
|
+
| `content-rules.md` | Brand voice, style guidelines, SEO rules, prohibited terms |
|
|
52
|
+
| `brand-config.json` | Company identity and contact info |
|
|
53
|
+
| `product-config.json` | Products and pricing |
|
|
54
|
+
| `service-config.json` | Services and audience segments |
|
|
55
|
+
| `content-themes.json` | Discovered themes (grows across runs) |
|
|
56
|
+
|
|
57
|
+
## Parameters
|
|
58
|
+
|
|
59
|
+
### Common Flags
|
|
60
|
+
|
|
61
|
+
| Flag | Purpose | Default |
|
|
62
|
+
|------|---------|---------|
|
|
63
|
+
| `--word-count` | Target article length (new content only) | 1500 |
|
|
64
|
+
| `--tone` | Voice: professional, casual, technical, conversational, academic | professional |
|
|
65
|
+
| `--type` | Template: blog-post, technical-tutorial, how-to-guide, listicle, comparison-guide, case-study | blog-post |
|
|
66
|
+
| `--audience` | Target reader demographic | general |
|
|
67
|
+
| `--keywords` | Comma-separated primary,secondary keywords | auto-detected |
|
|
68
|
+
| `--output-dir` | Output directory for final articles | ./content-output |
|
|
69
|
+
| `--no-research` | Skip ideation phase (new content only) | false |
|
|
70
|
+
| `--no-visuals` | Skip visual generation phase | false |
|
|
71
|
+
| `--no-publish` | Skip publishing phase (produce article file only) | false |
|
|
72
|
+
| `--threshold` | Minimum proprietary value score (1–5) for stub approval in batch mode | 3 |
|
|
73
|
+
| `--publish` | Target platform: wordpress, payloadcms, astro, docusaurus, mintlify | auto-detect |
|
|
74
|
+
| `--publish-status` | Publish status: draft, published | draft |
|
|
75
|
+
| `--verbose` | Detailed progress output | false |
|
|
76
|
+
|
|
77
|
+
### New Content Mode
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
myai-content-production-coordinator "<topic>" [flags]
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
The `topic` parameter is required. All other flags are optional and override defaults.
|
|
84
|
+
|
|
85
|
+
### Enrich Mode
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
myai-content-production-coordinator --enrich <file.md> [flags]
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
| Flag | Purpose | Default |
|
|
92
|
+
|------|---------|---------|
|
|
93
|
+
| `--enrich` | Path to existing article to enrich | — |
|
|
94
|
+
| `--update-stats` | Find and replace outdated statistics | false |
|
|
95
|
+
| `--add-references` | Add authoritative source links | false |
|
|
96
|
+
| `--add-faq` | Generate FAQ section | false |
|
|
97
|
+
| `--add-schema` | Add structured data recommendations | false |
|
|
98
|
+
| `--full` | All enrichment types | false |
|
|
99
|
+
|
|
100
|
+
If no enrichment flags are provided, defaults to `--full`.
|
|
101
|
+
|
|
102
|
+
### Batch Mode
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
myai-content-production-coordinator --batch [directory] [flags]
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
| Flag | Purpose | Default |
|
|
109
|
+
|------|---------|---------|
|
|
110
|
+
| `--batch` | Enable batch processing | — |
|
|
111
|
+
| `[directory]` | Path to content queue directory | `content-queue/` |
|
|
112
|
+
| `--force` | Skip confirmation prompts | false |
|
|
113
|
+
| `--parallel` | Max concurrent agents per phase | 3 |
|
|
114
|
+
|
|
115
|
+
In batch mode, common flags serve as defaults. Per-file frontmatter in queue items overrides them.
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## Content Queue Format
|
|
120
|
+
|
|
121
|
+
The `content-queue/` directory contains **job directories** produced by the content-ideation agent, plus optional manually created briefs. The coordinator scans job directories for content stubs and processes files with `status: pending`.
|
|
122
|
+
|
|
123
|
+
### Directory Structure
|
|
124
|
+
|
|
125
|
+
```
|
|
126
|
+
content-queue/
|
|
127
|
+
├── job20260223_01/ # Job directory from ideation run
|
|
128
|
+
│ ├── kubernetes_application_performance.md
|
|
129
|
+
│ ├── big_data_on_bare_metal.md
|
|
130
|
+
│ └── real_time_stream_processing.md
|
|
131
|
+
├── job20260224_01/ # Another ideation run
|
|
132
|
+
│ ├── react_server_components.md
|
|
133
|
+
│ └── nextjs_edge_runtime.md
|
|
134
|
+
└── manual/ # Optional: manually created briefs
|
|
135
|
+
└── q1_product_launch.md
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Job directories are named `jobYYYYMMDD_NN` (date of the ideation run plus a zero-padded sequential counter). The coordinator processes **all** job directories and any loose `.md` files or subdirectories within `content-queue/`.
|
|
139
|
+
|
|
140
|
+
### Discovery Rules
|
|
141
|
+
|
|
142
|
+
1. Recursively scan `content-queue/` for `.md` files in any subdirectory
|
|
143
|
+
2. Filter to `status: pending` only
|
|
144
|
+
3. Sort by priority (`high` > `normal` > `low`), then by job directory (oldest first)
|
|
145
|
+
4. Group by `mode` field: `new` (default) and `enrich`
|
|
146
|
+
|
|
147
|
+
### New Content Stub (produced by ideation)
|
|
148
|
+
|
|
149
|
+
```markdown
|
|
150
|
+
---
|
|
151
|
+
title: "Article Title or Topic"
|
|
152
|
+
mode: new
|
|
153
|
+
content_type: blog-post
|
|
154
|
+
status: pending
|
|
155
|
+
priority: normal
|
|
156
|
+
tone: professional
|
|
157
|
+
word_count: 1500
|
|
158
|
+
audience: "developers"
|
|
159
|
+
strategy: "Gap Analysis"
|
|
160
|
+
keywords:
|
|
161
|
+
- "primary keyword"
|
|
162
|
+
- "secondary keyword"
|
|
163
|
+
references:
|
|
164
|
+
- "https://source1.com"
|
|
165
|
+
- "https://source2.com"
|
|
166
|
+
goals:
|
|
167
|
+
- "Primary goal for this article"
|
|
168
|
+
visuals: true
|
|
169
|
+
publish: wordpress
|
|
170
|
+
publish_status: draft
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## Theme Context
|
|
174
|
+
|
|
175
|
+
[Description of the strategic angle — from the ideation Theme]
|
|
176
|
+
|
|
177
|
+
## Reference Material
|
|
178
|
+
|
|
179
|
+
[Annotated reference URLs from the Theme]
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### Manual Content Brief
|
|
183
|
+
|
|
184
|
+
Manually created briefs follow the same format. The `strategy` field is optional for manual briefs:
|
|
185
|
+
|
|
186
|
+
```markdown
|
|
187
|
+
---
|
|
188
|
+
title: "Our Q1 Product Launch"
|
|
189
|
+
mode: new
|
|
190
|
+
content_type: blog-post
|
|
191
|
+
status: pending
|
|
192
|
+
priority: high
|
|
193
|
+
tone: professional
|
|
194
|
+
word_count: 1500
|
|
195
|
+
audience: "developers"
|
|
196
|
+
keywords:
|
|
197
|
+
- "product launch"
|
|
198
|
+
visuals: true
|
|
199
|
+
publish: wordpress
|
|
200
|
+
publish_status: draft
|
|
201
|
+
---
|
|
202
|
+
|
|
203
|
+
## Proprietary Content
|
|
204
|
+
|
|
205
|
+
[Unique information, data, or insights to include in the article]
|
|
206
|
+
|
|
207
|
+
## Supporting Content
|
|
208
|
+
|
|
209
|
+
[Additional context, notes, or background material]
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
### Enrichment Brief
|
|
213
|
+
|
|
214
|
+
```markdown
|
|
215
|
+
---
|
|
216
|
+
title: "Refresh Kubernetes Security Guide"
|
|
217
|
+
mode: enrich
|
|
218
|
+
status: pending
|
|
219
|
+
priority: normal
|
|
220
|
+
source_file: "content-output/kubernetes-security-guide.md"
|
|
221
|
+
enrich:
|
|
222
|
+
- update-stats
|
|
223
|
+
- add-references
|
|
224
|
+
- add-faq
|
|
225
|
+
visuals: true
|
|
226
|
+
publish: wordpress
|
|
227
|
+
publish_status: draft
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
## Enrichment Notes
|
|
231
|
+
|
|
232
|
+
[Specific instructions for what to update or add]
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
### Frontmatter Fields
|
|
236
|
+
|
|
237
|
+
| Field | Required | Behavior |
|
|
238
|
+
|-------|----------|----------|
|
|
239
|
+
| `title` | Yes | Topic (new) or description of enrichment task |
|
|
240
|
+
| `status` | Yes | `pending`, `in-progress`, `complete`, `failed`, `rejected`, `needs-review` |
|
|
241
|
+
| `mode` | No | `new` or `enrich` (default: `new`) |
|
|
242
|
+
| `strategy` | No | Ideation strategy (e.g. `Gap Analysis`, `Current Trends`). Passed to writer for context |
|
|
243
|
+
| `source_file` | Enrich only | Path to existing article to enrich |
|
|
244
|
+
| `enrich` | Enrich only | List of enrichment types: `update-stats`, `add-references`, `add-faq`, `add-schema`, `full` |
|
|
245
|
+
| `content_type` | No | Overrides `--type` flag (default: `blog-post`) |
|
|
246
|
+
| `priority` | No | Processing order: `high` > `normal` > `low` (default: `normal`) |
|
|
247
|
+
| `tone` | No | Overrides `--tone` flag |
|
|
248
|
+
| `word_count` | No | Overrides `--word-count` flag (new content only) |
|
|
249
|
+
| `audience` | No | Overrides `--audience` flag |
|
|
250
|
+
| `keywords` | No | Overrides `--keywords` flag |
|
|
251
|
+
| `references` | No | URLs the ideation phase should consult |
|
|
252
|
+
| `goals` | No | Specific objectives for this article |
|
|
253
|
+
| `visuals` | No | `true`/`false` — override `--no-visuals` per item (default: `true`) |
|
|
254
|
+
| `publish` | No | Target platform — override `--publish` per item |
|
|
255
|
+
| `publish_status` | No | `draft`/`published` — override `--publish-status` per item |
|
|
256
|
+
| `verification` | No | Stamped by `myai-proprietary-content-verifier`: `score`, `label`, `decision`, `reason`, `checked_against`, `verified_at` |
|
|
257
|
+
|
|
258
|
+
The markdown body (Theme Context, Proprietary Content, Supporting Content, Enrichment Notes) is passed to the relevant agents as additional context.
|
|
259
|
+
|
|
260
|
+
---
|
|
261
|
+
|
|
262
|
+
## State Management
|
|
263
|
+
|
|
264
|
+
### Single Mode — New Content
|
|
265
|
+
|
|
266
|
+
```
|
|
267
|
+
.content-session/
|
|
268
|
+
├── config.json # Parsed arguments and settings
|
|
269
|
+
├── ideation.md # Ideation brief for selected Theme
|
|
270
|
+
├── plan.md # Article plan with structure and keyword map
|
|
271
|
+
├── draft.md # Writer agent output
|
|
272
|
+
├── visual-report.md # Visual generation report
|
|
273
|
+
└── final-meta.json # Assembled frontmatter data
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
### Single Mode — Enrichment
|
|
277
|
+
|
|
278
|
+
```
|
|
279
|
+
.content-session/
|
|
280
|
+
├── config.json # Parsed arguments and settings
|
|
281
|
+
├── original-snapshot.md # Copy of original article before enrichment
|
|
282
|
+
├── enrichment-report.md # Summary of changes made by enrichment agent
|
|
283
|
+
├── visual-report.md # Visual generation report
|
|
284
|
+
└── final-meta.json # Updated frontmatter data
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
### Batch Mode
|
|
288
|
+
|
|
289
|
+
Each queue item gets its own namespaced session directory:
|
|
290
|
+
|
|
291
|
+
```
|
|
292
|
+
.content-session/
|
|
293
|
+
├── verification-report.md # Pre-production verification summary (batch mode)
|
|
294
|
+
├── {slug-1}/ # mode: new
|
|
295
|
+
│ ├── config.json
|
|
296
|
+
│ ├── ideation.md
|
|
297
|
+
│ ├── plan.md
|
|
298
|
+
│ ├── draft.md
|
|
299
|
+
│ ├── visual-report.md
|
|
300
|
+
│ └── final-meta.json
|
|
301
|
+
├── {slug-2}/ # mode: enrich
|
|
302
|
+
│ ├── config.json
|
|
303
|
+
│ ├── original-snapshot.md
|
|
304
|
+
│ ├── enrichment-report.md
|
|
305
|
+
│ ├── visual-report.md
|
|
306
|
+
│ └── final-meta.json
|
|
307
|
+
└── batch-report.md # Batch summary report
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
### Persistent Project Files
|
|
311
|
+
|
|
312
|
+
Created by setup skills, consumed by all runs:
|
|
313
|
+
|
|
314
|
+
```
|
|
315
|
+
brand-config.json # Company profile
|
|
316
|
+
product-config.json # Products and pricing
|
|
317
|
+
service-config.json # Services and audience segments
|
|
318
|
+
content-rules.md # Brand voice, style, and writing rules
|
|
319
|
+
content-themes.json # Discovered Themes (grows across runs)
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
---
|
|
323
|
+
|
|
324
|
+
## Single Mode Pipeline
|
|
325
|
+
|
|
326
|
+
### Phase 0: Initialize
|
|
327
|
+
|
|
328
|
+
Parse `$ARGUMENTS` for topic/enrich flag, flags, and parameters. Create `.content-session/` directory and save parsed config to `.content-session/config.json`. Read `content-rules.md` from the project root. Read `brand-config.json`, `product-config.json`, `service-config.json` if present.
|
|
329
|
+
|
|
330
|
+
### Phase 1: Lane Selection
|
|
331
|
+
|
|
332
|
+
Determine the production lane:
|
|
333
|
+
|
|
334
|
+
1. **Explicit flag** — `--enrich <file.md>` routes to enrichment lane; a `"<topic>"` argument routes to new content lane
|
|
335
|
+
2. **No flag** — ask the user:
|
|
336
|
+
|
|
337
|
+
> What would you like to do?
|
|
338
|
+
> 1. **New article** — write a new article from a topic
|
|
339
|
+
> 2. **Enrich existing** — update and enhance an existing article
|
|
340
|
+
|
|
341
|
+
If the user selects enrichment, ask for the article path if not already provided.
|
|
342
|
+
|
|
343
|
+
### Phase 2: Setup Verification
|
|
344
|
+
|
|
345
|
+
Check for these files at project root:
|
|
346
|
+
|
|
347
|
+
- `brand-config.json`
|
|
348
|
+
- `product-config.json`
|
|
349
|
+
- `service-config.json`
|
|
350
|
+
- `content-rules.md`
|
|
351
|
+
|
|
352
|
+
If brand/product/service configs are missing, prompt:
|
|
353
|
+
|
|
354
|
+
> Company configuration is missing. Run the `company-config` skill to set up your brand profile, products, and services? (Y/n)
|
|
355
|
+
|
|
356
|
+
If confirmed, instruct the user to run the `company-config` skill (at `skills/company-config/SKILL.md`). The company-config skill requires interactive Q&A and cannot be run inside a Task sub-agent.
|
|
357
|
+
|
|
358
|
+
If `content-rules.md` is missing, prompt:
|
|
359
|
+
|
|
360
|
+
> No content rules found. Run the `content-rules-config` skill to set up your brand voice and writing guidelines? (Y/n)
|
|
361
|
+
|
|
362
|
+
If confirmed, instruct the user to run the `content-rules-config` skill (at `skills/content-rules-config/SKILL.md`).
|
|
363
|
+
|
|
364
|
+
If the user declines setup, proceed with defaults and note the limitation in the final output.
|
|
365
|
+
|
|
366
|
+
---
|
|
367
|
+
|
|
368
|
+
### New Content Lane (Phases N1–N3)
|
|
369
|
+
|
|
370
|
+
These phases run only for new article production. After N3, execution continues at the shared phases (Phase 4 onward).
|
|
371
|
+
|
|
372
|
+
#### Phase N1: Ideation + Plan
|
|
373
|
+
|
|
374
|
+
Skip if `--no-research` flag is set.
|
|
375
|
+
|
|
376
|
+
Dispatch the ideation agent:
|
|
377
|
+
|
|
378
|
+
```
|
|
379
|
+
Task(agent_type: "myai-content-ideation", prompt: "
|
|
380
|
+
Research the topic '{topic}' for a {type} article.
|
|
381
|
+
Target audience: {audience}. Tone: {tone}.
|
|
382
|
+
|
|
383
|
+
Company context:
|
|
384
|
+
{summary of brand-config, product-config, service-config}
|
|
385
|
+
|
|
386
|
+
Process:
|
|
387
|
+
1. Discover 2-4 Themes (title, description, strategy, reference URLs) and save to content-themes.json
|
|
388
|
+
2. Research the best Theme in depth and write ideation brief to .content-session/ideation.md
|
|
389
|
+
3. Create a detailed article plan and write it to .content-session/plan.md
|
|
390
|
+
|
|
391
|
+
Content rules (from content-rules.md):
|
|
392
|
+
{content_rules_section}
|
|
393
|
+
")
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
After completion, read `.content-session/ideation.md` and `.content-session/plan.md` to verify they were written.
|
|
397
|
+
|
|
398
|
+
#### Phase N2: Write
|
|
399
|
+
|
|
400
|
+
Dispatch the content-writer agent:
|
|
401
|
+
|
|
402
|
+
```
|
|
403
|
+
Task(agent_type: "content-writer", prompt: "
|
|
404
|
+
Write the full article based on the plan and ideation research.
|
|
405
|
+
Read the plan from: .content-session/plan.md
|
|
406
|
+
Read the ideation from: .content-session/ideation.md
|
|
407
|
+
Read content rules from: content-rules.md
|
|
408
|
+
|
|
409
|
+
Target: {word_count} words. Tone: {tone}. Type: {type}.
|
|
410
|
+
Keywords: {keywords}.
|
|
411
|
+
|
|
412
|
+
Write the complete draft to .content-session/draft.md
|
|
413
|
+
")
|
|
414
|
+
```
|
|
415
|
+
|
|
416
|
+
#### Phase N3: Assemble
|
|
417
|
+
|
|
418
|
+
Read `.content-session/draft.md` and `.content-session/ideation.md`. Build frontmatter metadata (title, meta description, slug, tags, keywords, word count, reading time, content type, theme, timestamp). Save the final article to `{output-dir}/{slug}.md` and frontmatter data to `.content-session/final-meta.json`.
|
|
419
|
+
|
|
420
|
+
Continue to Phase 4 (Visual Generation).
|
|
421
|
+
|
|
422
|
+
---
|
|
423
|
+
|
|
424
|
+
### Enrichment Lane (Phases E1–E2)
|
|
425
|
+
|
|
426
|
+
These phases run only for enrichment of existing articles. After E2, execution continues at the shared phases (Phase 4 onward).
|
|
427
|
+
|
|
428
|
+
#### Phase E1: Snapshot
|
|
429
|
+
|
|
430
|
+
Read the source article at `{enrich_path}`. Save a copy to `.content-session/original-snapshot.md` for rollback if needed.
|
|
431
|
+
|
|
432
|
+
#### Phase E2: Enrich
|
|
433
|
+
|
|
434
|
+
Dispatch the content enrichment agent:
|
|
435
|
+
|
|
436
|
+
```
|
|
437
|
+
Task(agent_type: "myai-content-enrichment", prompt: "
|
|
438
|
+
Enrich the existing article at {enrich_path}
|
|
439
|
+
|
|
440
|
+
Enrichment tasks: {enrich_flags — e.g. update-stats, add-references, add-faq, add-schema, or full}
|
|
441
|
+
Read content rules from: content-rules.md
|
|
442
|
+
Read brand config from: brand-config.json
|
|
443
|
+
|
|
444
|
+
{enrichment_notes — from user or queue file body}
|
|
445
|
+
|
|
446
|
+
Modify the article in-place. Update frontmatter with enriched_at timestamp
|
|
447
|
+
and enrichment_types list.
|
|
448
|
+
|
|
449
|
+
Write a summary of all changes made to .content-session/enrichment-report.md
|
|
450
|
+
")
|
|
451
|
+
```
|
|
452
|
+
|
|
453
|
+
After completion, read `.content-session/enrichment-report.md` to verify the enrichment was applied.
|
|
454
|
+
|
|
455
|
+
For enrichment, the article path is `{enrich_path}` (modified in-place); copy to `{output-dir}/{slug}.md` for the publish phase.
|
|
456
|
+
|
|
457
|
+
Continue to Phase 4 (Visual Generation).
|
|
458
|
+
|
|
459
|
+
---
|
|
460
|
+
|
|
461
|
+
### Shared Phases (Both Lanes)
|
|
462
|
+
|
|
463
|
+
#### Phase 4: Visual Generation
|
|
464
|
+
|
|
465
|
+
Skip if `--no-visuals` flag is set.
|
|
466
|
+
|
|
467
|
+
Dispatch the visual generator skill as a sub-agent. Pass the assembled/enriched article so the generator can analyze content and create relevant visuals.
|
|
468
|
+
|
|
469
|
+
```
|
|
470
|
+
Task(agent_type: "myai-visual-generator", prompt: "
|
|
471
|
+
Generate visuals for the article at {article_path}
|
|
472
|
+
|
|
473
|
+
The article is about: {topic_or_title}
|
|
474
|
+
Content type: {type}. Target audience: {audience}.
|
|
475
|
+
|
|
476
|
+
Tasks:
|
|
477
|
+
1. Generate a hero image for the article (--visual-type=image --type=hero)
|
|
478
|
+
2. Analyze the article for infographic opportunities and generate up to 3 diagrams
|
|
479
|
+
(--visual-type=infographic, analyze article sections for flowcharts, process diagrams, comparisons)
|
|
480
|
+
|
|
481
|
+
Save all assets to content-assets/images/ following the standard directory structure.
|
|
482
|
+
Insert markdown image references into the article at {article_path}.
|
|
483
|
+
Add a hero_image field to the article's frontmatter with the path to the hero image.
|
|
484
|
+
|
|
485
|
+
Write a summary of generated visuals to .content-session/visual-report.md
|
|
486
|
+
")
|
|
487
|
+
```
|
|
488
|
+
|
|
489
|
+
After completion, read `.content-session/visual-report.md` and verify the article was updated with image references.
|
|
490
|
+
|
|
491
|
+
#### Phase 5: Publish
|
|
492
|
+
|
|
493
|
+
Skip if `--no-publish` flag is set. If no `--publish` platform is specified and no platform can be auto-detected, ask the user whether to publish or skip.
|
|
494
|
+
|
|
495
|
+
Dispatch the content publisher skill:
|
|
496
|
+
|
|
497
|
+
```
|
|
498
|
+
Task(agent_type: ""wordpress-publisher", "astro-publisher", "docusaurus-publisher", "mintlify-publisher", "payloadcms-publisher"", prompt: "
|
|
499
|
+
Publish the finalized article at {article_path}
|
|
500
|
+
|
|
501
|
+
Platform: {publish_platform or 'auto-detect'}.
|
|
502
|
+
Status: {publish_status}.
|
|
503
|
+
|
|
504
|
+
Read the article, detect or use the specified platform, and dispatch the appropriate
|
|
505
|
+
publishing agent. Return the published URL or file path and status.
|
|
506
|
+
")
|
|
507
|
+
```
|
|
508
|
+
|
|
509
|
+
#### Phase 6: Cleanup
|
|
510
|
+
|
|
511
|
+
Remove `.content-session/` directory and report final summary.
|
|
512
|
+
|
|
513
|
+
---
|
|
514
|
+
|
|
515
|
+
## Batch Mode Pipeline
|
|
516
|
+
|
|
517
|
+
### Phase B0: Discovery
|
|
518
|
+
|
|
519
|
+
Recursively scan the queue directory (default: `content-queue/`) for `.md` files across all job directories and subdirectories. Parse frontmatter from each file. Filter to `status: pending` only. Sort by priority (`high` → `normal` → `low`), then by job directory timestamp (oldest first). Separate into two groups based on `mode` field: `new` (default) and `enrich`. If no pending files found, report and exit.
|
|
520
|
+
|
|
521
|
+
For stubs produced by content-ideation, the `strategy` field from frontmatter is threaded forward to the ideation and writing agents as context.
|
|
522
|
+
|
|
523
|
+
### Phase B1: Setup Verification
|
|
524
|
+
|
|
525
|
+
Run once before processing any items. Check for config files and prompt if missing (same as single mode Phase 2).
|
|
526
|
+
|
|
527
|
+
### Phase B2: Confirmation
|
|
528
|
+
|
|
529
|
+
Unless `--force` is set, display the batch plan and confirm:
|
|
530
|
+
|
|
531
|
+
```
|
|
532
|
+
Content Queue: {directory}
|
|
533
|
+
═══════════════════════════
|
|
534
|
+
Found {n} pending items across {j} job directories:
|
|
535
|
+
|
|
536
|
+
New Content:
|
|
537
|
+
1. [high] "Article Title One" blog-post, 1500 words, strategy: Gap Analysis, job20260223_01
|
|
538
|
+
2. [normal] "Article Title Two" technical-tutorial, 2500 words, strategy: Current Trends, job20260223_01
|
|
539
|
+
|
|
540
|
+
Enrichment:
|
|
541
|
+
3. [normal] "Refresh K8s Security Guide" source: content-output/k8s-security.md, enrich: full
|
|
542
|
+
|
|
543
|
+
Proceed with production? (Y/n)
|
|
544
|
+
```
|
|
545
|
+
|
|
546
|
+
### Phase B3: Phased Parallel Production
|
|
547
|
+
|
|
548
|
+
Process articles in parallel phases. Spawn up to `--parallel` agents concurrently within each phase. New content and enrichment items are processed in their respective lanes, then converge at the shared phases (visuals, publish).
|
|
549
|
+
|
|
550
|
+
#### New Content Phases
|
|
551
|
+
|
|
552
|
+
**Important — content-themes.json race condition:** When multiple ideation agents run in parallel, they each read-modify-write `content-themes.json` at the project root. Without coordination, the last writer overwrites the others and themes from earlier agents are lost. To avoid this, instruct each ideation agent in batch mode to write Themes to `.content-session/{slug}/themes.json` instead of `content-themes.json`. After all ideation completes, merge all `.content-session/*/themes.json` into `content-themes.json` (add new themes, append URLs to existing themes, update lastUpdated).
|
|
553
|
+
|
|
554
|
+
**Ideation phase** — spawn ideation agents for `mode: new` items. If a stub includes a `strategy` field (from a prior ideation run), pass it to the ideation agent so it focuses on that strategy rather than re-discovering Themes:
|
|
555
|
+
|
|
556
|
+
```
|
|
557
|
+
For each new content item:
|
|
558
|
+
Task(agent_type: "myai-content-ideation", prompt: "
|
|
559
|
+
Research the topic '{title}' for a {content_type} article.
|
|
560
|
+
Strategy: {strategy or 'discover'}
|
|
561
|
+
References from stub: {references}
|
|
562
|
+
Body context from stub: {stub body text}
|
|
563
|
+
...
|
|
564
|
+
Write ideation to .content-session/{slug}/ideation.md
|
|
565
|
+
Write plan to .content-session/{slug}/plan.md
|
|
566
|
+
Write Themes to .content-session/{slug}/themes.json (NOT content-themes.json — coordinator will merge after batch)
|
|
567
|
+
")
|
|
568
|
+
```
|
|
569
|
+
|
|
570
|
+
After all ideation completes, merge `.content-session/*/themes.json` into `content-themes.json` before starting the verification phase.
|
|
571
|
+
|
|
572
|
+
**Pre-production verification phase** — after ideation completes and themes are merged, run the proprietary content verifier against all `mode: new` stubs in the queue directory. This scores each stub (1–5) and stamps an `approved` or `rejected` decision into the stub's frontmatter. Only approved stubs proceed to the writing phase.
|
|
573
|
+
|
|
574
|
+
```
|
|
575
|
+
Task(agent_type: "myai-proprietary-content-verifier", prompt: "
|
|
576
|
+
Verify content stubs in {queue_dir} against existing content in {blog_dir}.
|
|
577
|
+
Approval threshold: {threshold}.
|
|
578
|
+
|
|
579
|
+
For each .md stub with status: pending:
|
|
580
|
+
1. Read the stub's title, keywords, goals, and body context
|
|
581
|
+
2. Search existing articles in {blog_dir} for overlapping titles, keywords, and topics
|
|
582
|
+
3. Optionally use WebSearch to check the live blog for existing coverage
|
|
583
|
+
4. Assign a Proprietary Value Score (1-5)
|
|
584
|
+
5. Stamp the stub's frontmatter with the verification block
|
|
585
|
+
6. Update status to 'rejected' for stubs below threshold
|
|
586
|
+
|
|
587
|
+
Return a summary of all stubs with their scores and decisions.
|
|
588
|
+
")
|
|
589
|
+
```
|
|
590
|
+
|
|
591
|
+
After completion, read the verification results. Log the summary to `.content-session/verification-report.md`. Collect the list of approved slugs — only these proceed to writing.
|
|
592
|
+
|
|
593
|
+
If all stubs are rejected, report the results and exit the batch run (no writing needed).
|
|
594
|
+
|
|
595
|
+
**Writing phase** — after verification completes, spawn writer agents in parallel **only for approved stubs**:
|
|
596
|
+
|
|
597
|
+
```
|
|
598
|
+
For each approved new content item with completed ideation:
|
|
599
|
+
Task(agent_type: "content-writer", prompt: "
|
|
600
|
+
Write the full article.
|
|
601
|
+
Read plan from: .content-session/{slug}/plan.md
|
|
602
|
+
Read ideation from: .content-session/{slug}/ideation.md
|
|
603
|
+
Read content rules from: content-rules.md
|
|
604
|
+
Write draft to: .content-session/{slug}/draft.md
|
|
605
|
+
")
|
|
606
|
+
```
|
|
607
|
+
|
|
608
|
+
**Assemble phase** — after all writing completes, assemble each article (same as single mode Phase N3). Save to `{output-dir}/{slug}.md`.
|
|
609
|
+
|
|
610
|
+
#### Enrichment Phases
|
|
611
|
+
|
|
612
|
+
Enrichment items can run in parallel with new content phases since they operate on different files.
|
|
613
|
+
|
|
614
|
+
**Snapshot phase** — for each `mode: enrich` item, copy the source file to `.content-session/{slug}/original-snapshot.md`.
|
|
615
|
+
|
|
616
|
+
**Enrich phase** — spawn enrichment agents in parallel:
|
|
617
|
+
|
|
618
|
+
```
|
|
619
|
+
For each enrich item:
|
|
620
|
+
Task(agent_type: "myai-content-enrichment", prompt: "
|
|
621
|
+
Enrich the article at {source_file}
|
|
622
|
+
Enrichment tasks: {enrich_types}
|
|
623
|
+
Read content rules from: content-rules.md
|
|
624
|
+
{enrichment_notes from queue file body}
|
|
625
|
+
Write change summary to .content-session/{slug}/enrichment-report.md
|
|
626
|
+
")
|
|
627
|
+
```
|
|
628
|
+
|
|
629
|
+
Copy enriched articles to `{output-dir}/{slug}.md` for the shared phases.
|
|
630
|
+
|
|
631
|
+
#### Shared Phases (Both Lanes Converge)
|
|
632
|
+
|
|
633
|
+
**Visual generation phase** — after both lanes complete, spawn visual generators in parallel for all articles with `visuals: true`:
|
|
634
|
+
|
|
635
|
+
```
|
|
636
|
+
For each article where visuals are enabled:
|
|
637
|
+
Task(agent_type: "myai-visual-generator", prompt: "
|
|
638
|
+
Generate visuals for the article at {output-dir}/{slug}.md
|
|
639
|
+
1. Generate a hero image
|
|
640
|
+
2. Analyze for infographic opportunities (up to 3 diagrams)
|
|
641
|
+
Save assets to content-assets/images/
|
|
642
|
+
Insert image references into the article.
|
|
643
|
+
Add hero_image to frontmatter.
|
|
644
|
+
Write summary to .content-session/{slug}/visual-report.md
|
|
645
|
+
")
|
|
646
|
+
```
|
|
647
|
+
|
|
648
|
+
**Publish phase** — after all visuals complete, publish articles where publishing is configured:
|
|
649
|
+
|
|
650
|
+
```
|
|
651
|
+
For each article where publishing is enabled:
|
|
652
|
+
Task(agent_type: "wordpress-publisher", "astro-publisher", "docusaurus-publisher", "mintlify-publisher", "payloadcms-publisher", prompt: "
|
|
653
|
+
Publish the article at {output-dir}/{slug}.md
|
|
654
|
+
Platform: {publish_platform or 'auto-detect'}.
|
|
655
|
+
Status: {publish_status}.
|
|
656
|
+
Return the published URL/path and status.
|
|
657
|
+
")
|
|
658
|
+
```
|
|
659
|
+
|
|
660
|
+
### Phase B4: Status Update
|
|
661
|
+
|
|
662
|
+
After each article completes (or fails), update the queue file's frontmatter:
|
|
663
|
+
|
|
664
|
+
**On success:**
|
|
665
|
+
```yaml
|
|
666
|
+
status: complete
|
|
667
|
+
produced_at: "YYYY-MM-DDTHH:MM:SSZ"
|
|
668
|
+
output_path: "content-output/{slug}.md"
|
|
669
|
+
published_url: "{url or path, if published}"
|
|
670
|
+
```
|
|
671
|
+
|
|
672
|
+
**On failure:**
|
|
673
|
+
```yaml
|
|
674
|
+
status: failed
|
|
675
|
+
failed_at: "YYYY-MM-DDTHH:MM:SSZ"
|
|
676
|
+
error: "Brief description of the failure"
|
|
677
|
+
```
|
|
678
|
+
|
|
679
|
+
### Phase B5: Report
|
|
680
|
+
|
|
681
|
+
Generate a batch summary report at `.content-session/batch-report.md` and display:
|
|
682
|
+
|
|
683
|
+
```
|
|
684
|
+
Batch Production Report
|
|
685
|
+
═══════════════════════════
|
|
686
|
+
Queue: {directory}
|
|
687
|
+
Verified: {v_approved}/{v_total} stubs approved (threshold: {threshold})
|
|
688
|
+
Processed: {n}/{total} items ({new_count} new, {enrich_count} enriched)
|
|
689
|
+
Succeeded: {s} | Failed: {f} | Rejected: {r} | Skipped: {k}
|
|
690
|
+
|
|
691
|
+
Verification:
|
|
692
|
+
✓ [5] "Article Title One" — Excellent — approved
|
|
693
|
+
✓ [4] "Article Title Two" — Good — approved
|
|
694
|
+
✗ [2] "Article Title Three" — Weak — rejected (redundant)
|
|
695
|
+
|
|
696
|
+
Production:
|
|
697
|
+
✓ [new] "Article Title One" → content-output/article-title-one.md (1523 words) → published: https://...
|
|
698
|
+
✓ [new] "Article Title Two" → content-output/article-title-two.md (2487 words) → published: src/content/blog/...
|
|
699
|
+
✓ [enrich] "Refresh K8s Security Guide" → content-output/k8s-security.md (enriched) → published: https://...
|
|
700
|
+
– [new] "Article Title Three" → Skipped: rejected by proprietary content verifier (score: 2)
|
|
701
|
+
```
|
|
702
|
+
|
|
703
|
+
### Phase B6: Cleanup
|
|
704
|
+
|
|
705
|
+
Remove `.content-session/` directory (all sub-sessions) and report final summary with output paths and publish URLs.
|
|
706
|
+
|
|
707
|
+
---
|
|
708
|
+
|
|
709
|
+
## Content Rules Integration
|
|
710
|
+
|
|
711
|
+
`content-rules.md` is read once at initialization and passed to every agent Task prompt as:
|
|
712
|
+
|
|
713
|
+
```
|
|
714
|
+
## Brand & Style Guidelines (from content-rules.md)
|
|
715
|
+
{content of content-rules.md}
|
|
716
|
+
```
|
|
717
|
+
|
|
718
|
+
If `content-rules.md` is missing, note this in the output and suggest running the `content-rules-config` skill.
|
|
719
|
+
|
|
720
|
+
## Execution Flow
|
|
721
|
+
|
|
722
|
+
### Single Mode — New Content
|
|
723
|
+
|
|
724
|
+
```
|
|
725
|
+
0. INIT -> Parse args, read content-rules.md, create session dir
|
|
726
|
+
1. LANE SELECT -> Determine new vs enrich (ask user if ambiguous)
|
|
727
|
+
2. SETUP (conditional) -> Prompt for company-config / content-rules-config if missing
|
|
728
|
+
N1. IDEATION+PLAN -> Task(myai-content-ideation) — skip if --no-research
|
|
729
|
+
N2. WRITE -> Task(content-writer) with plan + ideation + rules
|
|
730
|
+
N3. ASSEMBLE -> Read all outputs, produce final article
|
|
731
|
+
4. VISUALS -> Task(myai-visual-generator) — skip if --no-visuals
|
|
732
|
+
5. PUBLISH -> Task("wordpress-publisher", "astro-publisher", "docusaurus-publisher", "mintlify-publisher", "payloadcms-publisher") — skip if --no-publish
|
|
733
|
+
6. CLEANUP -> Remove .content-session/, report summary
|
|
734
|
+
```
|
|
735
|
+
|
|
736
|
+
### Single Mode — Enrichment
|
|
737
|
+
|
|
738
|
+
```
|
|
739
|
+
0. INIT -> Parse args, read content-rules.md, create session dir
|
|
740
|
+
1. LANE SELECT -> Determine new vs enrich (ask user if ambiguous)
|
|
741
|
+
2. SETUP (conditional) -> Prompt for company-config / content-rules-config if missing
|
|
742
|
+
E1. SNAPSHOT -> Copy original article to session dir
|
|
743
|
+
E2. ENRICH -> Task(myai-content-enrichment) with enrichment flags
|
|
744
|
+
4. VISUALS -> Task(myai-visual-generator) — skip if --no-visuals
|
|
745
|
+
5. PUBLISH -> Task("wordpress-publisher", "astro-publisher", "docusaurus-publisher", "mintlify-publisher", "payloadcms-publisher") — skip if --no-publish
|
|
746
|
+
6. CLEANUP -> Remove .content-session/, report summary
|
|
747
|
+
```
|
|
748
|
+
|
|
749
|
+
### Batch Mode
|
|
750
|
+
|
|
751
|
+
```
|
|
752
|
+
B0. DISCOVER -> Recursively scan queue directory + job dirs, filter pending, sort by priority, separate by mode
|
|
753
|
+
B1. SETUP (conditional) -> Same as single mode
|
|
754
|
+
B2. CONFIRM -> Show batch plan (new + enrich items), ask for confirmation
|
|
755
|
+
B3. PRODUCE (phased) -> New lane: Ideation × N → Verify stubs → Write approved × N → Assemble × N
|
|
756
|
+
-> Enrich lane (parallel): Snapshot → Enrich × N
|
|
757
|
+
-> Both lanes converge: Visuals × N → Publish × N
|
|
758
|
+
B4. STATUS UPDATE -> Update each queue file's frontmatter with result
|
|
759
|
+
B5. REPORT -> Generate and display batch summary
|
|
760
|
+
B6. CLEANUP -> Remove .content-session/, report output paths and publish URLs
|
|
761
|
+
```
|
|
762
|
+
|
|
763
|
+
## Error Handling
|
|
764
|
+
|
|
765
|
+
A single failure must not halt the production run.
|
|
766
|
+
|
|
767
|
+
### Single Mode — New Content
|
|
768
|
+
|
|
769
|
+
- **Setup skipped** → proceed with defaults, note limitation in output
|
|
770
|
+
- **Ideation failure** → proceed to writing (user-provided context may suffice)
|
|
771
|
+
- **Verification failure** → treat all stubs as approved and proceed to writing (fail-open)
|
|
772
|
+
- **Writer failure** → cannot continue, report failure
|
|
773
|
+
- **Visual generation failure** → proceed without visuals, note in output
|
|
774
|
+
- **Publish failure** → article is still saved locally, report the error and suggest checking credentials via the `configure` skill
|
|
775
|
+
|
|
776
|
+
### Single Mode — Enrichment
|
|
777
|
+
|
|
778
|
+
- **Setup skipped** → proceed with defaults, note limitation in output
|
|
779
|
+
- **Source file not found** → report error and exit
|
|
780
|
+
- **Enrichment failure** → restore from `.content-session/original-snapshot.md`, report failure
|
|
781
|
+
- **Visual generation failure** → proceed without visuals, note in output
|
|
782
|
+
- **Publish failure** → enriched article is still saved locally, report the error
|
|
783
|
+
|
|
784
|
+
### Batch Mode
|
|
785
|
+
|
|
786
|
+
- **Per-item failure** → mark as `failed` in frontmatter, continue with remaining items
|
|
787
|
+
- **Verification failure** → treat all stubs as approved and proceed (fail-open); note in batch report
|
|
788
|
+
- **All stubs rejected** → report verification results and exit; no writing phase needed
|
|
789
|
+
- **Partial batch failure** → produce successful articles, report all failures in the batch report
|
|
790
|
+
- **All items failed** → report errors, suggest checking content rules and config files
|
|
791
|
+
- **Enrichment failure (per item)** → restore from snapshot, mark as failed
|
|
792
|
+
- **Visual failure (per item)** → mark visuals as skipped, continue to publish phase
|
|
793
|
+
- **Publish failure (per item)** → article is saved locally, mark publish as failed in report
|
|
794
|
+
|
|
795
|
+
## Context Management
|
|
796
|
+
|
|
797
|
+
Agents have no memory of prior phases. The coordinator must thread context forward.
|
|
798
|
+
|
|
799
|
+
### Context Regurgitation
|
|
800
|
+
|
|
801
|
+
Before dispatching each agent, restate in the Task prompt:
|
|
802
|
+
- Current phase and what has been completed
|
|
803
|
+
- Key decisions made (chosen angle, title direction, tone)
|
|
804
|
+
- What this agent needs to produce and where to write it
|
|
805
|
+
|
|
806
|
+
### File Buffering
|
|
807
|
+
|
|
808
|
+
When constructing Task prompts, read only the sections needed from `.content-session/` files. Summarize key points and reference the file path — the agent can read the rest itself.
|
|
809
|
+
|
|
810
|
+
## Progress Reporting
|
|
811
|
+
|
|
812
|
+
### Single Mode — New Content
|
|
813
|
+
|
|
814
|
+
```
|
|
815
|
+
-> Phase {n}/6: {description}...
|
|
816
|
+
Status: {working | complete | skipped | failed}
|
|
817
|
+
{brief detail}
|
|
818
|
+
```
|
|
819
|
+
|
|
820
|
+
Final:
|
|
821
|
+
|
|
822
|
+
```
|
|
823
|
+
Content Production Complete
|
|
824
|
+
═══════════════════════════
|
|
825
|
+
Mode: New Article
|
|
826
|
+
Topic: {topic}
|
|
827
|
+
Theme: {selected theme title}
|
|
828
|
+
Strategy: {strategy used}
|
|
829
|
+
Words: {count} | Reading Time: {time}
|
|
830
|
+
Visuals: {count} generated ({hero + N diagrams}) | or "skipped"
|
|
831
|
+
Output: {output-dir}/{slug}.md
|
|
832
|
+
Published: {url or path} | or "skipped"
|
|
833
|
+
```
|
|
834
|
+
|
|
835
|
+
### Single Mode — Enrichment
|
|
836
|
+
|
|
837
|
+
```
|
|
838
|
+
-> Phase {n}/6: {description}...
|
|
839
|
+
Status: {working | complete | skipped | failed}
|
|
840
|
+
{brief detail}
|
|
841
|
+
```
|
|
842
|
+
|
|
843
|
+
Final:
|
|
844
|
+
|
|
845
|
+
```
|
|
846
|
+
Content Enrichment Complete
|
|
847
|
+
═══════════════════════════
|
|
848
|
+
Mode: Enrichment
|
|
849
|
+
Source: {enrich_path}
|
|
850
|
+
Enriched: {enrichment types applied}
|
|
851
|
+
Visuals: {count} generated | or "skipped"
|
|
852
|
+
Output: {output-dir}/{slug}.md
|
|
853
|
+
Published: {url or path} | or "skipped"
|
|
854
|
+
```
|
|
855
|
+
|
|
856
|
+
### Batch Mode
|
|
857
|
+
|
|
858
|
+
Per-item progress:
|
|
859
|
+
|
|
860
|
+
```
|
|
861
|
+
[{i}/{total}] {mode}: "{title}" [{strategy}] ({jobDir})...
|
|
862
|
+
New: Ideation: complete | Write: working | Visuals: pending | Publish: pending
|
|
863
|
+
Enrich: Enrich: complete | Visuals: pending | Publish: pending
|
|
864
|
+
```
|
|
865
|
+
|
|
866
|
+
Final: see Phase B5 report format above.
|
|
867
|
+
|
|
868
|
+
## Output Format
|
|
869
|
+
|
|
870
|
+
Final articles are saved with full frontmatter:
|
|
871
|
+
|
|
872
|
+
```markdown
|
|
873
|
+
---
|
|
874
|
+
title: [SEO-optimized title]
|
|
875
|
+
meta_description: [150-160 chars]
|
|
876
|
+
slug: [url-friendly]
|
|
877
|
+
tags: [relevant, tags]
|
|
878
|
+
keywords:
|
|
879
|
+
primary: [main keyword]
|
|
880
|
+
secondary: [supporting, keywords]
|
|
881
|
+
hero_image: [path to hero image, if generated]
|
|
882
|
+
word_count: [actual count]
|
|
883
|
+
reading_time: [X minutes]
|
|
884
|
+
content_type: [type used]
|
|
885
|
+
theme: [selected Theme title]
|
|
886
|
+
strategy: [ideation strategy used]
|
|
887
|
+
generated_at: [ISO timestamp]
|
|
888
|
+
published_url: [URL, if published]
|
|
889
|
+
---
|
|
890
|
+
|
|
891
|
+
# [Title]
|
|
892
|
+
|
|
893
|
+
[Full article content with embedded visual references]
|
|
894
|
+
```
|
|
895
|
+
|
|
896
|
+
## Example Usage
|
|
897
|
+
|
|
898
|
+
```bash
|
|
899
|
+
# --- New Content ---
|
|
900
|
+
|
|
901
|
+
# Full pipeline: topic → ideation → write → verify → visuals → publish
|
|
902
|
+
myai-content-production-coordinator "Kubernetes Best Practices for Production"
|
|
903
|
+
|
|
904
|
+
# Custom settings
|
|
905
|
+
myai-content-production-coordinator "Building a RAG Pipeline" --word-count=2500 --type=technical-tutorial --tone=technical
|
|
906
|
+
|
|
907
|
+
# Skip research, no visuals
|
|
908
|
+
myai-content-production-coordinator "Our Q4 Product Launch" --no-research --no-visuals --type=case-study
|
|
909
|
+
|
|
910
|
+
# Write only — no visuals or publishing
|
|
911
|
+
myai-content-production-coordinator "React Server Components" --no-visuals --no-publish
|
|
912
|
+
|
|
913
|
+
# Publish to a specific platform as draft
|
|
914
|
+
myai-content-production-coordinator "Docker Security Guide" --publish=wordpress --publish-status=draft
|
|
915
|
+
|
|
916
|
+
# --- Enrichment ---
|
|
917
|
+
|
|
918
|
+
# Full enrichment: update stats, add references, FAQ, schema → verify → visuals → publish
|
|
919
|
+
myai-content-production-coordinator --enrich content-output/kubernetes-security-guide.md --full
|
|
920
|
+
|
|
921
|
+
# Selective enrichment: update stats and add references only
|
|
922
|
+
myai-content-production-coordinator --enrich content-output/old-article.md --update-stats --add-references
|
|
923
|
+
|
|
924
|
+
# Enrich and publish to WordPress
|
|
925
|
+
myai-content-production-coordinator --enrich content-output/draft-post.md --full --publish=wordpress
|
|
926
|
+
|
|
927
|
+
# Enrich without visuals or publishing
|
|
928
|
+
myai-content-production-coordinator --enrich content-output/guide.md --add-faq --no-visuals --no-publish
|
|
929
|
+
|
|
930
|
+
# --- Batch (mixed new + enrich) ---
|
|
931
|
+
|
|
932
|
+
# Process default content-queue/ directory (items declare their own mode)
|
|
933
|
+
myai-content-production-coordinator --batch
|
|
934
|
+
|
|
935
|
+
# Custom queue directory
|
|
936
|
+
myai-content-production-coordinator --batch ./briefs/q1-2026/
|
|
937
|
+
|
|
938
|
+
# Skip confirmation, verbose output
|
|
939
|
+
myai-content-production-coordinator --batch --force --verbose
|
|
940
|
+
|
|
941
|
+
# No visuals, no publish (article files only)
|
|
942
|
+
myai-content-production-coordinator --batch --no-visuals --no-publish
|
|
943
|
+
|
|
944
|
+
# Limit parallelism
|
|
945
|
+
myai-content-production-coordinator --batch --parallel=1 --verbose
|
|
946
|
+
```
|