一键导入
ba-confluence
[Agentic] Confluence Integration Bridge — publish BA docs to Confluence, import existing pages, sync specs with Transport Gate reflection
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
[Agentic] Confluence Integration Bridge — publish BA docs to Confluence, import existing pages, sync specs with Transport Gate reflection
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
[Meta] How to use BA-Kit effectively. Use when starting with BA-Kit, unsure which agent to invoke, or when an AI agent needs to map user intent to the right skill.
[Agentic] Agile BA Practices - User Story Mapping, MVP Definition, Hypothesis-Driven Development
[Agentic] Business Rules Management - decision tables, decision trees, rule catalog, conflict detection
[Agentic] Change Management - ADKAR, readiness assessment, training needs, go-live planning, benefits realization
[Agentic] Communication & Reporting - audience-adapted messaging, status reports, executive summaries
[Agentic] Conflict Resolution & Negotiation - resolve stakeholder disagreements (SKILL-06)
基于 SOC 职业分类
| name | ba-confluence |
| description | [Agentic] Confluence Integration Bridge — publish BA docs to Confluence, import existing pages, sync specs with Transport Gate reflection |
| version | 1.0.0 |
If input is unclear, incomplete, or out-of-scope:
@ba-export compliance check, recommend: "Handover: Send to @ba-export first."The Confluence connector needs to be configured ONCE by your IT/admin team. After that, the BA simply says "publish this BRD to Confluence" — the agent handles the rest.
One-time setup (ask IT/admin):
.env file at .agent/skills/confluence-connector/.env with:
CONFLUENCE_BASE_URL — your Confluence instance URL (e.g., https://confluence.company.com)CONFLUENCE_PAT — a Personal Access Token (IT generates this in Confluence → Profile → PATs)python3 .agent/skills/confluence-connector/scripts/confluence_search.py --helpDay-to-day BA workflow (after setup):
When NOT to use:
When activated via @ba-confluence, perform the following cognitive loop:
| Markdown Element | XHTML Storage Format |
|---|---|
# Heading 1 | <h1>Heading 1</h1> |
## Heading 2 | <h2>Heading 2</h2> |
**bold** | <strong>bold</strong> |
- list item | <ul><li>list item</li></ul> |
| table | | <table><tr><td>...</td></tr></table> |
```code``` | <ac:structured-macro ac:name="code"><ac:plain-text-body><![CDATA[...]]></ac:plain-text-body></ac:structured-macro> |
| Mermaid diagram | See Mermaid Handling section below |
> blockquote | <blockquote>...</blockquote> |
Build the Confluence API payload:
{
"type": "page",
"title": "<document title>",
"space": {"key": "<SPACE_KEY>"},
"ancestors": [{"id": "<PARENT_PAGE_ID>"}],
"body": {
"storage": {
"value": "<converted XHTML>",
"representation": "storage"
}
}
}
Auto-enhancements:
<ac:structured-macro ac:name="toc"/>ba-kit, <document-type> (brd, srs, frd), <version>STOP & THINK. Publishing to Confluence affects the team's knowledge base.
type=page AND space=<KEY> AND title=\"<title>\""{{TODO}}, [TBD]) in the content? Warn user."After successful operation, present:
Don't stop here. Recommend the next step:
@ba-jira to create tickets linked to this Confluence page."@ba-traceability to verify all requirements in the published page are traced."@ba-validation to review the imported Confluence content for gaps."@ba-diagram to generate Mermaid diagrams optimized for Confluence embedding."| Rationalization | Reality |
|---|---|
| "It rendered correctly in my local Markdown preview" | Local Markdown preview ≠ Confluence DC. The XHTML storage format and macro rendering are entirely different. Test on the actual instance or expect surprises. |
| "Confluence handles edge cases gracefully" | Confluence DC has blocked macros (the html macro is disabled by default). Violating this produces Unknown macro: html silently swallowed in storage but visible in view. |
| "Adding a TOC is manual overhead" | TOC macro is one line: <ac:structured-macro ac:name="toc"/>. Skipping it forces readers to scroll blindly through long BA documents. |
| "Version number increments automatically" | Confluence requires explicit version: {number: N+1} on page updates. Without it, the API returns a version conflict error — or worse, silently fails depending on the client. |
body.view for "Unknown macro" or "Error rendering" strings{{TODO}}, [TBD], [INSERT]) present in published contentmermaid-macro, not mermaid)json, gherkin, typescript) not remappedAfter completing this skill's process, confirm:
body.view rendered and scanned — 0 occurrences of "Unknown macro" or "Error rendering"{{, [TBD], [INSERT])@ba-diagram — json→javascript, gherkin→text, typescript→javascript). Confluence only checks the output, does not own the remap.1. @ba-writing → produces BRD/SRS/FRD
2. @ba-validation → validates quality (Health Score ≥ 80)
3. @ba-export → final formatting/compliance check
4. @ba-confluence → Publish to Confluence space
1. @ba-confluence → Import existing Confluence page as Markdown
2. @ba-writing → Analyze and refine requirements
3. @ba-validation → Validate the refined specs
4. @ba-confluence → Update the Confluence page with improved version
1. @ba-traceability → Generate RTM
2. @ba-confluence → Publish RTM as Confluence table
3. @ba-jira → Cross-link Jira tickets to Confluence page
1. @ba-confluence → Search existing docs in space (CQL)
2. @ba-confluence → Compare local specs vs published versions
3. @ba-confluence → Report drift: "3 pages outdated, 2 new specs unpublished"
run_command: Execute Confluence connector scripts:
python3 .agent/skills/confluence-connector/scripts/confluence_search.py "<CQL>"python3 .agent/skills/confluence-connector/scripts/confluence_crud.py create --space PROJ --title "..." --body "<XHTML>"python3 .agent/skills/confluence-connector/scripts/confluence_crud.py get --page-id <id>python3 .agent/skills/confluence-connector/scripts/confluence_bulk.py --operation export --space PROJgrep_search: Search local spec files for content comparison.When publishing pages with Mermaid diagrams, choose the method based on the Confluence platform:
If "Mermaid Chart" or "Mermaid Diagrams for Confluence" app is installed:
<ac:structured-macro ac:name="mermaid">
<ac:plain-text-body><![CDATA[
flowchart TD
A[Start] --> B{Decision}
B -->|Yes| C[Action]
B -->|No| D[End]
]]></ac:plain-text-body>
</ac:structured-macro>
# Install Mermaid CLI (one-time)
npm install -g @mermaid-js/mermaid-cli
# Render diagram to SVG
mmdc -i diagram.mmd -o diagram.svg -t neutral -b white
# Upload as attachment via Confluence API
python3 .agent/skills/confluence-connector/scripts/confluence_crud.py \
attach --page-id <PAGE_ID> --file diagram.svg
Then embed in XHTML:
<ac:image ac:align="center" ac:width="800">
<ri:attachment ri:filename="diagram.svg"/>
</ac:image>
Import Mermaid code via Draw.io: Extras → Edit Diagram → Mermaid tab → paste code.
<ac:structured-macro ac:name="drawio" ac:schema-version="1">
<ac:parameter ac:name="diagramName">process-flow</ac:parameter>
</ac:structured-macro>
neutral or default theme (white background for Confluence)@ba-diagram for generating Confluence-optimized Mermaid syntaxBased on production experience, watch for these XHTML edge cases:
<![CDATA[...]]> wrapping.js vs javascript).Before acting, search for relevant patterns:
run_command: python3 .agent/scripts/ba_search.py "Confluence publishing documentation" --domain integrationpython3 .agent/scripts/ba_search.py "document export compliance" --domain communication.agent/skills/confluence-connector/SKILL.md (API patterns, authentication).agent/skills/confluence-connector/references/confluence-api-reference.md.agent/skills/confluence-connector/references/confluence-bulk-operations.md.agent/skills/confluence-connector/scripts/ (4 Python helpers)Activation Phrase: "Confluence Bridge online. Provide the document to publish, or a CQL query to search."