--- name: cf-publish description: "Execute CMS publishing: push a finished, reviewed piece (Phase 8 complete, quality score >=7.0) to Webflow or WordPress via MCP connectors as draft, scheduled, or live — always showing a full publish preview and waiting for your explicit yes/no/edit confirmation before anything is pushed. Runs the EU AI Act Article 50 disclosure check, verifies the live URL, meta tags, and images post-publish, and falls back to a standalone HTML export when no CMS connector is configured. Triggers on \"/contentforge:cf-publish\", \"publish this article to WordPress\", \"push this to Webflow\", \"schedule this post for next week\", \"export the article as HTML\". Refuses unreviewed content; pairs with /contentforge:cf-social-adapt for post-publish promotion." disable-model-invocation: true argument-hint: "[platform]" effort: low --- # Publish Content — ContentForge CMS Publishing Push publication-ready content from the ContentForge pipeline directly to your CMS (Webflow or WordPress) via MCP connectors. Preview before publishing, verify post-publish, and fall back to HTML export when no connector is available. ## When to Use Use `/contentforge:cf-publish` when: - You have a **finished, reviewed content piece** (Phase 8 complete, score >=7.0) - You want to **publish directly** to Webflow or WordPress without copy-pasting - You need to **schedule content** for a future publish date - You want **post-publish verification** (URL live, meta tags correct, images loaded) - You want an **HTML export** for manual upload when no CMS connector is configured **Do NOT use for:** - Content still in pipeline (must be Phase 8 complete) - Content that did not reach APPROVED (anything below 7.0 — a 5.0-6.9 piece is `review_required`, not publishable) - Platforms other than Webflow/WordPress (use `/contentforge:cf-social-adapt` for social media) ## What This Command Does 1. **Verify Connector** -- Check if Webflow or WordPress MCP connector is active 2. **Load Content** -- Pull finished content from Google Drive or local output 3. **Format for Platform** -- Convert markdown/docx to platform-specific HTML/blocks 4. **Preview** -- Show rendered preview with meta tags, slug, featured image 5. **AI Disclosure & Provenance** -- EU AI Act Article 50 check (applicable from 2 Aug 2026) 6. **Publish/Schedule** -- Push to CMS as draft, published, or scheduled 7. **Post-Publish Verification** -- Confirm URL is live, meta tags are correct, content renders properly 8. **Fallback** -- If no connector, generate standalone HTML file for manual upload ## Required Inputs **Minimum Required:** - **Content Source** -- Google Drive URL, local file path, or requirement ID (e.g., `REQ-001`) - **Platform** -- `webflow` or `wordpress` - **Status** -- `draft`, `publish`, or `schedule` **Optional:** - **Schedule Date** -- ISO date/time for scheduled publishing (required if status=schedule) - **Collection/Category** -- Webflow collection slug or WordPress category - **Featured Image** -- URL or local path to hero image - **Author** -- Override the byline author (default: the author applied in Phase 3 from the brand's `author_profiles`; falls back to authorless if none configured) - **Tags** -- Comma-separated list of tags - **Slug Override** -- Custom URL slug (defaults to SEO-optimized slug from Phase 6) ## How to Use ### Interactive Mode ``` /contentforge:cf-publish ``` **Prompts you for:** 1. Content source (Drive URL, file path, or requirement ID) 2. Platform (Webflow / WordPress) 3. Publish status (draft / publish / schedule) 4. Preview confirmation before pushing ### Quick Mode ``` /contentforge:cf-publish REQ-001 --platform=webflow --status=publish ``` ### Schedule for Later ``` /contentforge:cf-publish REQ-001 --platform=wordpress --status=schedule --date="2026-09-01T09:00:00" ``` ### Publish from Google Drive ``` /contentforge:cf-publish https://drive.google.com/file/d/ABC123 --platform=webflow --status=draft ``` ## What Happens ### Step 1: Connector Verification (5-10 seconds) Before attempting any CMS operation, verify the target connector is available. **Check MCP connector status:** ``` Platform: webflow Connector: Webflow MCP (https://mcp.webflow.com/sse) Status: CHECKING... ``` **Case A: Connector Active** ``` Webflow MCP: CONNECTED Site: acme-corp.webflow.io Collections available: blog-posts, case-studies, resources Proceeding with direct publish... ``` **Case B: Connector Not Found** ``` Webflow MCP: NOT CONNECTED No Webflow connector detected in .mcp.json. Falling back to HTML export mode. To enable direct publishing, add the Webflow connector: /contentforge:cf-connect webflow Generating standalone HTML file for manual upload... ``` ### Step 2: Load and Validate Content (10-15 seconds) **Load content from source:** - Read .docx or markdown from Google Drive or local output directory - Extract metadata: title, meta description, slug, keywords, author, featured image - Validate quality score >= 7.0 (refuse to publish unreviewed content) **Validation checks:** ``` Content Validation --------------------------------------------------- Title: "AI in Healthcare: 2026 Trends" OK Quality Score: 9.2/10 OK Status: Approved (Phase 8 Complete) OK Word Count: 1,947 OK Meta Title: 58 chars OK Meta Description: 152 chars OK SEO Slug: ai-in-healthcare-2026-trends OK Featured Image: hero-ai-healthcare.jpg OK --------------------------------------------------- All checks passed. Ready to format for Webflow. ``` **Rejection cases:** - Quality score < 7.0: "Content has not passed quality review. Score: 4.8/10. Run the full pipeline first." - No Phase 8 completion: "Content pipeline incomplete. Phase 8 (Output Manager) has not run." - Missing meta tags: "Meta title and description are required. Run Phase 6 (SEO Optimizer) first." ### Step 3: Format for Target Platform (10-20 seconds) Convert ContentForge output into platform-native format. **Webflow Formatting:** - Convert markdown headings to Webflow rich text blocks - Map H1 to `name` field, body to `post-body` rich text field - Set `slug`, `meta-title`, `meta-description` fields - Upload featured image to Webflow assets, link to `main-image` field - Map tags to Webflow multi-reference field - Preserve inline links, bold, italic, lists, blockquotes **WordPress Formatting:** - Convert markdown to WordPress Gutenberg blocks (paragraph, heading, list, quote, image) - Set `title`, `content`, `excerpt`, `slug`, `meta` fields - Upload featured image via media endpoint, set as `featured_media` - Map categories and tags to taxonomy terms - Preserve shortcodes if present in original content - Add Yoast/RankMath SEO meta if plugin detected **Shared formatting rules:** - Strip .docx formatting artifacts (extra whitespace, page breaks) - Ensure all internal links use relative paths where possible - Validate all image URLs are accessible (no broken images) - Preserve citation formatting (footnotes or inline links based on platform preference) ### Step 4: Preview Before Publish Show the user exactly what will be published before pushing. ``` PUBLISH PREVIEW =================================================== Platform: Webflow (acme-corp.webflow.io) Collection: blog-posts Status: PUBLISH (goes live immediately) --------------------------------------------------- URL: https://acme-corp.webflow.io/blog/ai-in-healthcare-2026-trends Meta Title: AI in Healthcare: 2026 Trends and Predictions Meta Description: Explore how AI is transforming healthcare in 2026, from diagnostic tools to patient care. Data-driven analysis with 14 verified sources. Featured Image: hero-ai-healthcare.jpg (1200x630, 245KB) Author: Jane Doe, Head of Content (from brand author_profiles; 'ContentForge' only if the brand is deliberately authorless) Tags: AI, Healthcare, Technology Trends, 2026 Word Count: 1,947 --------------------------------------------------- Content Preview (first 300 characters): "Multi-agent AI systems are changing how healthcare organizations approach diagnostics, patient care, and operational efficiency. The approach? Deploy specialized AI agents -- one for imaging analysis, another for patient history, a third for treatment recommendations..." =================================================== Proceed with publish? (yes / no / edit) ``` **User options:** - `yes` -- Push to CMS - `no` -- Cancel, return to command line - `edit` -- Open content for last-minute edits before publish ### Step 4.5: AI Disclosure & Provenance (EU AI Act Article 50 — applicable from 2 Aug 2026) Before pushing, check whether AI-generation disclosure applies: **Does it apply?** Yes if the brand targets EU audiences (check the brand profile's markets/regions or ask the user once and record the answer), OR if the brand profile's guardrails require AI-content disclosure regardless of region. **If it applies:** 1. **For .docx deliverables** — note that C2PA content provenance signing is available via `--c2pa-sign` (with `--c2pa-signing-cert` and `--c2pa-signing-key`) on `scripts/generate-docx.py` (see `docs/c2pa-production-cert.md` for certificate setup). If the piece was produced without signing and the user needs it, offer to regenerate the .docx with signing enabled. 2. **For CMS publishes (Webflow/WordPress)** — offer to append a disclosure line to the article, e.g.: > "This article was produced with AI assistance and reviewed by [brand]'s editorial team." Place it where the brand's guardrails specify (typically the footer or byline area). Record the user's choice in the tracking notes. 3. **For downstream social promotion** — remind the user that major platforms (LinkedIn, Meta, TikTok, YouTube) have AI-content labeling options/requirements; `/contentforge:cf-social-adapt` surfaces these per platform. **If it does not apply** (no EU targeting, no guardrail requirement): skip with a one-line note in the output — "AI-disclosure check: not required (no EU targeting configured)" — so the decision is auditable. ### Step 5: Publish / Schedule / Draft (5-15 seconds) **Publish (immediate):** ``` Publishing to Webflow... API call: POST /collections/blog-posts/items Status: 201 Created Item ID: 6432a1b2c3d4e5f6 Live URL: https://acme-corp.webflow.io/blog/ai-in-healthcare-2026-trends ``` **Schedule (future date):** ``` Scheduling for 2026-09-01 09:00 UTC... API call: POST /collections/blog-posts/items (draft=true, scheduled_at=2026-09-01T09:00:00Z) Status: 201 Created Scheduled Publish: September 1, 2026 at 9:00 AM UTC Draft URL: https://acme-corp.webflow.io/blog/ai-in-healthcare-2026-trends (not live yet) ``` **Draft (no publish):** ``` Saving as draft... API call: POST /collections/blog-posts/items (draft=true) Status: 201 Created Draft URL: https://acme-corp.webflow.io/blog/ai-in-healthcare-2026-trends (draft, not live) Edit in Webflow: https://webflow.com/dashboard/sites/acme-corp/editor ``` ### Step 6: Post-Publish Verification (10-20 seconds) After publishing, verify the content is live and correct. **Verification checks:** ``` Post-Publish Verification =================================================== URL Accessible: GET https://acme-corp.webflow.io/blog/ai-in-healthcare-2026-trends Status Code: 200 OK PASS Response Time: 340ms PASS Meta Tags: