--- name: "confluence-publish" description: "Publish generated design documents (DD, SD, TD) to Confluence. Use when the user approves a generated artifact and requests Confluence publish, or explicitly asks to push a document to Confluence." license: "MIT" metadata: author: "Srinivas K, Mahesvaran S, Srikanth Y, Thirukumaran V, Vignesh V R" version: "1.0.0" --- # Confluence Publish Workflow ## Overview Shared workflow for publishing generated design documents to Confluence. Called after user approves a generated artifact. Uses the Rovo MCP to create or update Confluence pages directly from brainstorm files and design templates. ## Prerequisites Checklist - [ ] Confluence MCP server (Rovo) available - [ ] A generated and approved design document - [ ] The brainstorm file (`{workspace}/output/{artifact-name}-brainstorm.md`) — authoritative source for all content - [ ] Optional: Lucid diagram to attach/link ## When to Use - User approves a generated DD/SD/TD and requests Confluence publish - User explicitly requests: "Push this to Confluence" - User requests: "Publish this document" ## Template Strategy Templates are stored as **live Confluence pages** (not local files). This ensures templates always match the latest governance-approved format. **ALWAYS FOLLOW THE TEMPLATE EXACTLY. DO NOT CONDENSE OR LEAVE OUT ANY SECTIONS.** **Template Pages:** - DD Template: page ID `4769349731` (space: ID1) - SD Template: page ID `4769251461` (space: ID1) - TD Template: page ID `4769349990` (space: ID1) ## Step-by-Step Guide ### Step 1: Determine Publish Target Ask the user (if not already known): 1. **Confluence space** — Which space should this be published to? 2. **Parent page** — Should this be a child of an existing page? 3. **Page title** — What should the page be titled? 4. **Update or create** — Is this a new page or an update to an existing page? Search for existing pages if needed, then present: ``` Publishing to Confluence: - Space: [space key] - Parent page: [parent title] (ID: [id]) - Title: [proposed title] - Action: [Create new / Update existing] Proceed? ``` --- ### Step 2: Prepare Content #### Fetch Template and Build Page Body 1. Read the brainstorm file (`{workspace}/output/{artifact-name}-brainstorm.md`) 2. **Fetch the template page** using `getConfluencePage` with `contentFormat: "html"`: - DD Template page ID: `4769349731` - SD Template page ID: `4769251461` - TD Template page ID: `4769349990` 3. The fetched HTML body IS the template structure 4. **Build the populated page body** as HTML: - Replace orange instructional text (`rgb(255,153,31)`) with actual content - Fill empty table cells with data - Add additional table rows for multi-entry tables - Preserve all Confluence macros, emoticons, links, and structural elements exactly #### Content Population Rules - Every section with orange instructional text MUST be replaced with actual design content - Leave governance tables (approval, endorsement) with empty cells — filled post-review - Tables with one template row need additional `