xiaohongshu
xiaohongshu
build-jira-document-format
Builds complex ADF (Atlassian Document Format) documents with advanced patterns, templates, and specialized builders. Use when creating sophisticated Jira descriptions, epics with structure, rich content documents, or implementing builder patterns for fluent APIs. Trigger keywords: "ADF template"...
Full skill instructions
Master advanced Atlassian Document Format patterns for creating sophisticated, reusable Jira documents. Learn the builder pattern for fluent APIs, create specialized templates (EpicBuilder, IssueBuilder), design complex nested structures, and build document templates that scale from individual issues to epic planning.
Explicit Triggers:
Implicit Triggers:
Debugging Scenarios:
Create a formatted epic with problem statement, technical details, and acceptance criteria:
from jira_tool.formatter import EpicBuilder
# Create epic with builder
epic = EpicBuilder("Authentication Overhaul", "P0")
epic.add_problem_statement("Current auth is vulnerable to timing attacks")
epic.add_description("Implement OAuth2 with PKCE and secure session management")
epic.add_technical_details(
requirements=[
"PKCE flow support",
"Session token encryption",
"Rate limiting"
],
code_example="""
# OAuth2 flow
token = oauth_client.get_token(code, pkce_verifier)
session.set_secure_cookie(token)
"""
)
epic.add_acceptance_criteria([
"All authentication tests pass",
"Security audit complete",
"Rate limiting works per RFC 6749"
])
# Get ADF for Jira API
adf = epic.build()
Or build step-by-step with the general-purpose builder:
from jira_tool.formatter import JiraDocumentBuilder
doc = JiraDocumentBuilder()
doc.add_heading("Epic: Authentication System", 1)
doc.add_heading("Problem", 2)
doc.add_panel("warning",
{"type": "paragraph", "content": [
doc.add_text("Current authentication has security vulnerabilities")
]}
)
doc.add_heading("Approach", 2)
doc.add_bullet_list([
"Implement OAuth2 with PKCE",
"Use session token encryption",
"Add rate limiting"
])
adf = doc.build()
The builder pattern solves the problem of constructing complex objects through method chaining.
Without builder (verbose and error-prone):
doc = {
"version": 1,
"type": "doc",
"content": [
{
"type": "heading",
"attrs": {"level": 1},
"content": [{"type": "text", "text": "Title"}]
}
]
}
With builder (readable and safe):
doc = JiraDocumentBuilder()
doc.add_heading("Title", 1)
doc.add_paragraph(doc.add_text("Start: "), doc.bold("Bold"))
adf = doc.build()
Builder Benefits:
Method Chaining:
doc = JiraDocumentBuilder()
doc.add_heading("Title", 1) \
.add_paragraph(doc.add_text("Introduction")) \
.add_rule() \
.add_heading("Section", 2) \
.add_bullet_list(["Point 1", "Point 2"])
adf = doc.build()
Key Methods:
Structural Elements:
doc.add_heading("Text", level=1) # Level 1-6
doc.add_paragraph(content_nodes) # Mixed content
doc.add_rule() # Horizontal line
Lists:
doc.add_bullet_list(["Item 1", "Item 2"])
doc.add_ordered_list(["First", "Second"], start=1)
Code Blocks:
doc.add_code_block("def hello(): pass", language="python")
Panels (colored boxes):
doc.add_panel("info", {"type": "paragraph", "content": [doc.add_text("Info")]})
# Types: info, note, warning, success, error
Text Formatting:
doc.bold("Bold text")
doc.italic("Italic text")
doc.code("inline_code")
doc.strikethrough("Deleted")
doc.link("Click here", "https://...")
doc.add_text("Plain text")
Combining Formatting:
doc.add_paragraph(
doc.bold("Important: "),
doc.add_text("This is a "),
doc.italic("complex"),
doc.add_text(" message")
)
For repeated structures, create helper functions or specialized builders:
Helper Function Pattern:
def add_titled_panel(builder, title, panel_type, content):
"""Add a heading followed by a panel."""
builder.add_heading(title, 2)
builder.add_panel(panel_type, {
"type": "paragraph",
"content": [builder.add_text(content)]
})
# Usage
doc = JiraDocumentBuilder()
add_titled_panel(doc, "⚠️ Risks", "warning", "Performance impact on v1 API")
EpicBuilder Pattern:
class EpicBuilder:
"""Pre-formatted epic template."""
def __init__(self, title: str, priority: str = "P1"):
self.builder = JiraDocumentBuilder()
self.builder.add_heading(f"🎯 {title}", 1)
self.builder.add_paragraph(
self.builder.bold("Priority: "),
self.builder.add_text(priority)
)
def add_problem_statement(self, statement: str):
self.builder.add_heading("Problem Statement", 2)
self.builder.add_panel("warning", {
"type": "paragraph",
"content": [self.builder.add_text(statement)]
})
return self
def add_acceptance_criteria(self, criteria: list[str]):
self.builder.add_heading("Acceptance Criteria", 2)
self.builder.add_ordered_list(criteria)
return self
def build(self):
return self.builder.build()
See references/advanced-patterns.md for full EpicBuilder and BugReportBuilder implementations with inheritance patterns, composition, and testing strategies.
Return self for Chaining:
class CustomBuilder:
def add_something(self) -> "CustomBuilder":
# ... implementation
return self # Allow chaining
Validate Before Building:
def build(self) -> dict:
"""Build and validate before returning."""
if not self.title:
raise ValueError("Title is required")
if not self.builder.content:
raise ValueError("Content is empty")
return self.builder.build()
Document Structure:
class DocumentTemplate:
"""
Template for standard epic documentation.
Structure:
- Header (title, priority, timeline)
- Problem statement (warning panel)
- Solution approach (bullet list)
- Technical requirements (ordered list)
- Acceptance criteria (ordered list)
"""
def __init__(self, title: str):
pass
Successful Document Building:
Builder Template Creation:
JiraDocumentBuilder - General-purpose builderEpicBuilder - Epic-specific templateIssueBuilder - Issue-specific templateJIRA_BASE_URL, JIRA_USERNAME, JIRA_API_TOKENnpm install -g jira-adf-validatorxiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience