
Atlassian Templates
- 134 installs
- 451 repo stars
- Updated July 21, 2026
- borghei/claude-skills
Generate Jira issue templates, Confluence page structures, sprint boards, and project documentation scaffolds so teams standardize planning artifacts and knowledge capture early.
About
Atlassian templates skill from borghei/claude-skills that produces Jira issue templates, Confluence page scaffolds, sprint boards, and project documentation structures so teams standardize planning, tracking, and knowledge capture during delivery setup.
- Jira issue and board templates
- Confluence page and space scaffolds
- Sprint and epic documentation structures
- Repeatable planning artifact patterns
Atlassian Templates by the numbers
- 134 all-time installs (skills.sh)
- Ranked #598 of 1,879 Documentation skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/borghei/claude-skills --skill atlassian-templatesAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 134 |
|---|---|
| repo stars | ★ 451 |
| Last updated | July 21, 2026 |
| Repository | borghei/claude-skills ↗ |
What it does
Generate Jira issue templates, Confluence page structures, sprint boards, and project documentation scaffolds so teams standardize planning artifacts and knowledge capture early.
Files
Atlassian Template & Files Creator Expert
Specialist in creating, modifying, and managing reusable templates and files for Jira and Confluence. Ensures consistency, accelerates content creation, and maintains org-wide standards.
Core Competencies
Template Design
- Create Confluence page templates with dynamic content
- Design Jira issue templates and descriptions
- Build blueprints for complex content structures
- Implement template versioning and updates
Content Standardization
- Establish org-wide content standards
- Create reusable components and macros
- Design template libraries
- Maintain template documentation
Automation
- Build templates with dynamic fields and automation
- Create templates that integrate with Jira
- Design self-updating content structures
- Implement template-based workflows
Template Governance
- Manage template lifecycle
- Version control for templates
- Deprecate outdated templates
- Track template usage and adoption
Workflows
Template Creation Process
1. Discover: Interview stakeholders to understand needs 2. Analyze: Review existing content patterns 3. Design: Create template structure and placeholders 4. Implement: Build template with macros and formatting 5. Test: Validate with sample data 6. Document: Create usage instructions 7. Publish: Deploy to appropriate space/project 8. Train: Educate users on template usage 9. Monitor: Track adoption and gather feedback 10. Iterate: Refine based on usage
Template Modification Process
1. Assess: Review change request and impact 2. Version: Create new version, keep old available 3. Modify: Update template structure/content 4. Test: Validate changes don't break existing usage 5. Migrate: Provide migration path for existing content 6. Communicate: Announce changes to users 7. Support: Assist users with migration 8. Archive: Deprecate old version after transition
Blueprint Development
1. Define blueprint scope and purpose 2. Design multi-page structure 3. Create page templates for each section 4. Configure page creation rules 5. Add dynamic content (Jira queries, user data) 6. Test blueprint creation flow 7. HANDOFF TO: Atlassian Admin for global deployment
Confluence Templates Library
1. Meeting Notes Template
---
**Meeting Title**: [Meeting Name]
**Date**: {date:format=dd MMM yyyy}
**Time**: [Time]
**Attendees**: @user1, @user2, @user3
**Facilitator**: @facilitator
**Note Taker**: @notetaker
---
{info}
**Quick Links**:
- [Previous Meeting](link)
- [Project Page](link)
- [Jira Board](link)
{info}
## Agenda
1. [Topic 1] - [Duration] - [Owner]
2. [Topic 2] - [Duration] - [Owner]
3. [Topic 3] - [Duration] - [Owner]
## Discussion & Notes
### [Topic 1]
**Presenter**: @owner
**Discussion**:
- Key point 1
- Key point 2
**Decisions Made**:
{panel:title=Decision|borderColor=#00875a}
[Decision description]
**Decided by**: @decisionmaker
{panel}
### [Topic 2]
[Continue pattern]
## Action Items
{tasks}
- [ ] [Action item 1] - @owner - Due: [Date]
- [ ] [Action item 2] - @owner - Due: [Date]
- [ ] [Action item 3] - @owner - Due: [Date]
{tasks}
## Parking Lot
{note}
Topics to discuss in future meetings:
- [Deferred topic 1]
- [Deferred topic 2]
{note}
## Next Meeting
**Date**: [Next meeting date]
**Focus**: [Next meeting focus areas]2. Project Charter Template
{panel:title=Project Overview|borderColor=#0052cc}
**Project Name**: [Project Name]
**Project Code**: [PROJ]
**Status**: {status:colour=Blue|title=Planning}
**Owner**: @projectowner
**Sponsor**: @sponsor
**Start Date**: [DD/MM/YYYY]
**Target End Date**: [DD/MM/YYYY]
{panel}
## Executive Summary
[2-3 paragraphs summarizing the project purpose, scope, and expected outcomes]
## Business Case
### Problem Statement
[Describe the problem or opportunity]
### Objectives
1. [SMART Objective 1]
2. [SMART Objective 2]
3. [SMART Objective 3]
### Success Criteria
{info}
**Definition of Success**:
- [Measurable outcome 1]
- [Measurable outcome 2]
- [Measurable outcome 3]
{info}
## Scope
### In Scope
- [Deliverable 1]
- [Deliverable 2]
- [Deliverable 3]
### Out of Scope
- [Explicitly excluded item 1]
- [Explicitly excluded item 2]
## Stakeholders
| Name | Role | Responsibility | Influence |
|------|------|----------------|-----------|
| @user1 | Sponsor | Funding & approval | High |
| @user2 | PM | Day-to-day management | High |
| @user3 | Tech Lead | Technical direction | Medium |
**RACI Matrix**: [Link to detailed RACI]
## Timeline & Milestones
{timeline}
| Phase | Start | End | Deliverables |
|-------|-------|-----|--------------|
| Discovery | DD/MM | DD/MM | Requirements doc |
| Design | DD/MM | DD/MM | Design specs |
| Development | DD/MM | DD/MM | MVP |
| Testing | DD/MM | DD/MM | Test report |
| Launch | DD/MM | DD/MM | Production release |
{timeline}
## Budget
**Total Budget**: $XXX,XXX
| Category | Estimated Cost | Notes |
|----------|----------------|-------|
| Personnel | $XX,XXX | FTE allocation |
| Software/Tools | $XX,XXX | Licenses & subscriptions |
| External Services | $XX,XXX | Contractors, vendors |
| Contingency (10%) | $X,XXX | Risk buffer |
## Risks & Assumptions
### Top Risks
| Risk | Probability | Impact | Mitigation |
|------|-------------|--------|-----------|
| [Risk 1] | Medium | High | [Mitigation strategy] |
| [Risk 2] | Low | High | [Mitigation strategy] |
### Assumptions
- [Critical assumption 1]
- [Critical assumption 2]
## Resources & Links
- [Jira Project](#)
- [Confluence Space](#)
- [Design Files](#)
- [Technical Docs](#)3. Sprint Retrospective Template
{panel:title=Sprint Retrospective|borderColor=#00875a}
**Sprint**: Sprint [Number]
**Sprint Dates**: [Start Date] - [End Date]
**Team**: [Team Name]
**Facilitator**: @facilitator
**Date**: {date}
{panel}
## Sprint Overview
**Sprint Goal**: [Sprint goal]
**Completed Stories**: [X/Y]
**Velocity**: [XX points]
**Carry Over**: [X stories]
## Ceremony: What Went Well? 😊
{expand:title=Click to add items}
{info}
Use this space to celebrate successes and positive experiences.
{info}
- [Positive item 1]
- [Positive item 2]
- [Positive item 3]
{expand}
## Ceremony: What Didn't Go Well? 😕
{expand:title=Click to add items}
{warning}
Discuss challenges, blockers, and frustrations.
{warning}
- [Challenge 1]
- [Challenge 2]
- [Challenge 3]
{expand}
## Ceremony: Ideas & Actions 💡
{expand:title=Click to add items}
{note}
Brainstorm improvements and define actionable next steps.
{note}
| Idea | Votes | Action Owner | Target Sprint |
|------|-------|--------------|---------------|
| [Improvement idea 1] | ⭐⭐⭐ | @owner | Sprint X+1 |
| [Improvement idea 2] | ⭐⭐ | @owner | Sprint X+2 |
{expand}
## Action Items (Committed)
{tasks}
- [ ] [Action 1 - High Priority] - @owner - Due: [Date]
- [ ] [Action 2 - Medium Priority] - @owner - Due: [Date]
- [ ] [Action 3 - Low Priority] - @owner - Due: [Date]
{tasks}
## Action Items from Previous Retro - Status Check
{panel:title=Previous Action Items}
| Action | Owner | Status | Notes |
|--------|-------|--------|-------|
| [Previous action 1] | @owner | {status:colour=Green|title=Done} | [Completion notes] |
| [Previous action 2] | @owner | {status:colour=Yellow|title=In Progress} | [Progress notes] |
{panel}
## Team Mood
{info}
Use emojis or numeric scale (1-10) to capture team sentiment.
{info}
**Overall Sprint Mood**: [😊 😐 😕]
**Team Energy**: [X/10]
## Next Retro
**Date**: [Next retro date]
**Focus**: [Special focus if any]4. Product Requirements Document (PRD) Template
{panel:title=PRD Overview|borderColor=#0052cc}
**Feature Name**: [Feature Name]
**PRD ID**: PRD-XXX
**Author**: @author
**Status**: {status:colour=Blue|title=Draft}
**Last Updated**: {date}
**Epic Link**: {jira:Epic Key}
{panel}
## Problem Statement
[Describe the user problem or business need. Answer: What problem are we solving and for whom?]
## Goals & Success Metrics
### Goals
1. [Primary goal]
2. [Secondary goal]
### Success Metrics
| Metric | Target | Measurement |
|--------|--------|-------------|
| [Metric 1] | [Target value] | [How to measure] |
| [Metric 2] | [Target value] | [How to measure] |
## User Stories & Use Cases
### Primary User Story
**As a** [user type]
**I want** [capability]
**So that** [benefit]
**Acceptance Criteria**:
- [ ] [Criterion 1]
- [ ] [Criterion 2]
- [ ] [Criterion 3]
### Use Cases
1. **Use Case 1**: [Scenario name]
- **Actor**: [User role]
- **Preconditions**: [What must be true]
- **Flow**: [Step-by-step]
- **Postconditions**: [End state]
## Requirements
### Functional Requirements
| ID | Requirement | Priority | Notes |
|----|-------------|----------|-------|
| FR-1 | [Requirement description] | Must Have | |
| FR-2 | [Requirement description] | Should Have | |
| FR-3 | [Requirement description] | Nice to Have | |
### Non-Functional Requirements
| ID | Requirement | Target | Notes |
|----|-------------|--------|-------|
| NFR-1 | Performance | <2s load time | |
| NFR-2 | Scalability | 10K concurrent users | |
| NFR-3 | Availability | 99.9% uptime | |
## Design & User Experience
### User Flow
[Insert diagram or link to design files]
### Wireframes/Mockups
[Embed images or link to Figma]
### UI Specifications
- [Key UI element 1]
- [Key UI element 2]
## Technical Considerations
### Architecture
[High-level architecture overview or diagram]
### Dependencies
- [System dependency 1]
- [Service dependency 2]
- [Third-party integration]
### Technical Constraints
- [Constraint 1]
- [Constraint 2]
## Release Plan
### Phases
| Phase | Features | Target Date | Status |
|-------|----------|-------------|--------|
| MVP (v1.0) | [Core features] | [Date] | {status:colour=Blue|title=Planned} |
| v1.1 | [Additional features] | [Date] | {status:colour=Gray|title=Future} |
### Rollout Strategy
[Describe rollout approach: beta, phased, full launch]
## Open Questions
{warning}
- [ ] [Question 1 requiring resolution]
- [ ] [Question 2 requiring resolution]
{warning}
## Appendix
- [Related Documents](#)
- [Research & Data](#)
- [Competitive Analysis](#)5. Decision Log Template
{panel:title=Decision Record|borderColor=#ff5630}
**Decision ID**: [PROJ]-DEC-[XXX]
**Date**: {date}
**Status**: {status:colour=Green|title=Approved}
**Decision Maker**: @decisionmaker
**Stakeholders**: @stakeholder1, @stakeholder2
{panel}
## Context & Background
[Provide background on what led to this decision. Include relevant history, constraints, and why a decision is needed now.]
## Problem Statement
[Clearly articulate the problem or question that requires a decision]
## Options Considered
### Option 1: [Option Name]
**Description**: [Detailed description]
**Pros**:
- [Advantage 1]
- [Advantage 2]
**Cons**:
- [Disadvantage 1]
- [Disadvantage 2]
**Cost/Effort**: [Estimate]
### Option 2: [Option Name]
**Description**: [Detailed description]
**Pros**:
- [Advantage 1]
- [Advantage 2]
**Cons**:
- [Disadvantage 1]
- [Disadvantage 2]
**Cost/Effort**: [Estimate]
### Option 3: [Option Name]
[Continue pattern]
## Decision Matrix
| Criteria | Weight | Option 1 | Option 2 | Option 3 |
|----------|--------|----------|----------|----------|
| Cost | 30% | 7/10 | 5/10 | 8/10 |
| Time to Implement | 25% | 6/10 | 9/10 | 5/10 |
| Scalability | 25% | 8/10 | 6/10 | 9/10 |
| Risk | 20% | 7/10 | 8/10 | 5/10 |
| **Total Score** | | **X.X** | **Y.Y** | **Z.Z** |
## Decision
{info}
**Chosen Option**: [Option X]
**Rationale**: [Explain why this option was selected. Reference the decision matrix and key factors.]
{info}
## Consequences & Trade-offs
**Positive Consequences**:
- [Expected benefit 1]
- [Expected benefit 2]
**Negative Consequences/Trade-offs**:
- [Known limitation 1]
- [Known limitation 2]
**Mitigation Plans**:
- [How to address limitation 1]
## Implementation Plan
{tasks}
- [ ] [Implementation step 1] - @owner - [Date]
- [ ] [Implementation step 2] - @owner - [Date]
- [ ] [Implementation step 3] - @owner - [Date]
{tasks}
## Success Criteria
[How will we know if this decision was the right one?]
- [Metric/outcome 1]
- [Metric/outcome 2]
## Review Date
**Scheduled Review**: [Date to revisit this decision]
## Related Decisions
- [Link to related decision 1]
- [Link to related decision 2]
## References
- [Supporting document 1]
- [Research/data source]Jira Templates Library
1. User Story Template
**As a** [type of user]
**I want** [capability or goal]
**So that** [benefit or value]
## Acceptance Criteria
- [ ] Given [context], when [action], then [outcome]
- [ ] Given [context], when [action], then [outcome]
- [ ] Given [context], when [action], then [outcome]
## Design
[Link to design files, wireframes, or mockups]
## Technical Notes
[Any technical considerations, dependencies, or constraints]
## Definition of Done
- [ ] Code reviewed and approved
- [ ] Unit tests written and passing
- [ ] Integration tests passing
- [ ] Documentation updated
- [ ] Deployed to staging
- [ ] QA approved
- [ ] Deployed to production
## Related Stories
[Links to related issues, epics, or dependencies]2. Bug Report Template
## Summary
[Brief, clear summary of the bug]
## Environment
- **Browser/Device**: [e.g., Chrome 118, iOS 17, Android 13]
- **OS**: [e.g., Windows 11, macOS 14]
- **App Version**: [e.g., v2.3.1]
- **User Type**: [e.g., Admin, End User]
## Steps to Reproduce
1. [First step]
2. [Second step]
3. [Third step]
4. [Observe issue]
## Expected Behavior
[What should happen]
## Actual Behavior
[What actually happens]
## Screenshots/Videos
[Attach or link to visual evidence]
## Impact
- **Severity**: [Critical / High / Medium / Low]
- **Affected Users**: [Percentage or user count]
- **Workaround**: [If available]
## Additional Context
[Any other relevant information, logs, error messages]
## Related Issues
[Links to similar bugs or related features]3. Epic Template
## Vision
[High-level description of what this epic aims to achieve and why it matters]
## Goals
1. [Primary goal]
2. [Secondary goal]
3. [Tertiary goal]
## Success Metrics
| Metric | Target | How to Measure |
|--------|--------|----------------|
| [Metric 1] | [Value] | [Method] |
| [Metric 2] | [Value] | [Method] |
## User Stories (Breakdown)
- [ ] [User story 1] - [PROJ-XXX]
- [ ] [User story 2] - [PROJ-XXX]
- [ ] [User story 3] - [PROJ-XXX]
## Dependencies
- [Dependency 1]
- [Dependency 2]
## Timeline
**Target Start**: [Date]
**Target Completion**: [Date]
## Risks
- [Risk 1]
- [Risk 2]
## Related Epics
[Links to related epics]
## Resources
- [PRD Link]
- [Design Files]
- [Technical Specs]Best Practices
Template Design Principles
Clarity: Use clear section headers and instructions Consistency: Maintain visual and structural consistency Completeness: Include all necessary sections Flexibility: Allow customization where appropriate Guidance: Provide inline instructions and examples
Macro Usage Guidelines
Dynamic Content: Use macros for auto-updating content (dates, user mentions, Jira queries) Visual Hierarchy: Use panels, infos, and notes to create visual distinction Interactivity: Use expand macros for collapsible sections Integration: Embed Jira charts and tables for live data
Template Maintenance
Version Control: Track template versions and changes Deprecation: Clearly mark outdated templates Documentation: Maintain usage guides for each template Feedback Loop: Regularly gather user feedback and iterate
Handoff Protocols
FROM Senior PM:
- Template requirements for projects
- Reporting template needs
- Executive summary formats
- Portfolio tracking templates
TO Senior PM:
- Completed templates ready for use
- Template usage analytics
- Suggestions for new templates
- Template optimization opportunities
FROM Scrum Master:
- Sprint ceremony template needs
- Team-specific template requests
- Retrospective format preferences
- Sprint planning layouts
TO Scrum Master:
- Sprint-ready templates
- Team documentation templates
- Agile ceremony structures
- Velocity tracking templates
FROM Jira Expert:
- Issue template requirements
- Custom field display needs
- Workflow-specific templates
- Reporting template requests
TO Jira Expert:
- Issue description templates
- Field configuration templates
- Workflow documentation
- JQL query templates
FROM Confluence Expert:
- Space-specific template needs
- Global template requests
- Blueprint requirements
- Macro-based templates
TO Confluence Expert:
- Configured page templates
- Blueprint structures
- Template deployment plans
- Usage guidelines
FROM Atlassian Admin:
- Org-wide template standards
- Global template deployment
- Template governance requirements
- Compliance templates
TO Atlassian Admin:
- Global templates for approval
- Template usage reports
- Template compliance status
- Recommendations for standards
Template Governance
Creation Process: 1. Request and justification 2. Design and review 3. Testing with pilot users 4. Documentation 5. Approval 6. Deployment 7. Training 8. Monitoring
Review Cycle:
- Templates reviewed quarterly
- Usage metrics analyzed
- Feedback incorporated
- Updates deployed
- Deprecated templates archived
Quality Standards:
- All templates documented
- Clear usage instructions
- Example content provided
- Tested before deployment
- Version controlled
- Feedback mechanism in place
Atlassian MCP Integration
Primary Tools: Jira MCP, Confluence MCP
Template Operations:
- Create page templates in Confluence
- Deploy issue description templates in Jira
- Build automated template deployment scripts
- Track template usage via analytics
- Update templates programmatically
- Version control template content
Integration Points:
- Support all roles with standardized templates
- Enable Confluence Expert with deployable templates
- Provide Jira Expert with issue templates
- Supply Senior PM with reporting templates
- Give Scrum Master sprint ceremony templates
Troubleshooting
| Problem | Likely Cause | Resolution |
|---|---|---|
| Users create pages from scratch instead of using templates | Templates not discoverable, or template names are unclear | Pin templates to space sidebar; use descriptive names (e.g., "Sprint Retro - Team Template"); send periodic reminders with usage links |
| Template produces inconsistent output across teams | Template has too many free-text sections without guidance; teams interpret placeholders differently | Add inline instructions within placeholders; provide a completed example alongside the blank template; standardize section headings |
| Confluence macros in templates break after product updates | Atlassian deprecated or renamed macros in a platform update | Subscribe to Atlassian release notes; test templates in sandbox after major updates; maintain a macro compatibility checklist |
| Template versioning creates confusion about which version to use | Multiple versions coexist without clear deprecation; naming does not indicate version | Use version suffix in template name (e.g., "PRD Template v2.1"); archive old versions immediately after migration; add deprecation banner to old templates |
| Jira issue templates do not apply consistently | Template applied at wrong level (project vs. issue type), or default values overridden by workflow post-functions | Verify template scope matches intended issue type and project; check for conflicting automation rules or post-functions |
| Template adoption rate is low despite training | Templates add friction rather than reducing it; too many required fields | Simplify templates to the minimum viable structure; make optional sections collapsible; gather user feedback and iterate quarterly |
| Dynamic macros (Jira queries, charts) show stale data | JQL filter references incorrect project, or cache settings are too aggressive | Verify JQL in each dynamic macro; adjust cache refresh intervals; test macros after any project key or filter changes |
Success Criteria
- Template adoption rate exceeds 70% for targeted content types (measured by pages created from templates vs. blank pages)
- New template requests are evaluated and deployed within 10 business days
- All active templates have documented usage instructions and at least one completed example
- Template satisfaction score (from quarterly user survey) averages 4+/5
- Zero active templates older than 12 months without a documented review
- Template-created content passes quality checklist at 85%+ rate on first use
- Deprecated templates are archived within 30 days of replacement deployment
Scope & Limitations
In Scope: Confluence page template design and deployment, Jira issue description templates, blueprint development, template governance and lifecycle management, template versioning, usage analytics tracking, user training on template usage, macro-enhanced dynamic templates.
Out of Scope: Global Atlassian administration (hand off to atlassian-admin/), Jira workflow and automation design (hand off to jira-expert/), Confluence space architecture (hand off to confluence-expert/), content strategy and documentation standards (hand off to confluence-expert/).
Limitations: Confluence Cloud templates cannot include all macro types (some advanced macros require manual insertion after page creation). Jira issue templates are limited to description field content -- they cannot pre-set custom field values without automation rules. Template analytics require Confluence Premium or a marketplace analytics app for detailed usage metrics.
Integration Points
| Integration | Direction | What Flows |
|---|---|---|
confluence-expert/ | Bidirectional | Confluence expert defines content standards; template creator implements them as templates |
jira-expert/ | Templates -> Jira | Issue description templates, workflow documentation templates |
atlassian-admin/ | Admin -> Templates | Global template deployment approval, governance policies |
scrum-master/ | SM -> Templates | Sprint ceremony template requirements, retrospective format preferences |
senior-pm/ | PM -> Templates | Executive reporting templates, portfolio tracking layouts |
delivery-manager/ | DM -> Templates | Post-mortem templates, release checklist templates, runbook structures |
#!/usr/bin/env python3
"""Template Scaffolder - Generate Confluence/Jira template scaffolds from specs.
Reads a template specification and generates ready-to-deploy Confluence
storage format or Jira description markup.
Usage:
python template_scaffolder.py --spec spec.json --format confluence
python template_scaffolder.py --spec spec.json --format jira --json
python template_scaffolder.py --example
"""
import argparse
import json
import sys
CONFLUENCE_SECTION_TEMPLATES = {
"header_panel": '{panel:title=__TITLE__|borderColor=#0052cc}\n__CONTENT__\n{panel}\n',
"info_block": '{info}\n__CONTENT__\n{info}\n',
"warning_block": '{warning}\n__CONTENT__\n{warning}\n',
"table": '| __HEADERS__ |\n| __SEPARATOR__ |\n| __ROWS__ |\n',
"task_list": '{tasks}\n__ITEMS__\n{tasks}\n',
"expand": '{expand:title=__TITLE__}\n__CONTENT__\n{expand}\n',
"heading": 'h__LEVEL__. __TITLE__\n',
"toc": '{toc:maxLevel=3}\n',
}
def load_data(path: str) -> dict:
with open(path, "r") as f:
return json.load(f)
def generate_confluence(spec: dict) -> str:
"""Generate Confluence storage format template."""
name = spec.get("name", "Untitled Template")
sections = spec.get("sections", [])
metadata = spec.get("metadata", {})
output = []
# Header panel
meta_lines = []
for key, value in metadata.items():
meta_lines.append(f"**{key}**: {value}")
if meta_lines:
panel = CONFLUENCE_SECTION_TEMPLATES["header_panel"]
panel = panel.replace("__TITLE__", name)
panel = panel.replace("__CONTENT__", "\n".join(meta_lines))
output.append(panel)
# TOC
if spec.get("include_toc", True):
output.append(CONFLUENCE_SECTION_TEMPLATES["toc"])
# Sections
for section in sections:
sec_type = section.get("type", "heading")
title = section.get("title", "Section")
content = section.get("content", "[Add content here]")
level = section.get("level", 2)
if sec_type == "heading":
heading = CONFLUENCE_SECTION_TEMPLATES["heading"]
heading = heading.replace("__LEVEL__", str(level))
heading = heading.replace("__TITLE__", title)
output.append(heading)
output.append(content + "\n")
elif sec_type == "table":
headers = section.get("headers", ["Column 1", "Column 2"])
rows = section.get("rows", 3)
heading = CONFLUENCE_SECTION_TEMPLATES["heading"].replace("__LEVEL__", str(level)).replace("__TITLE__", title)
output.append(heading)
header_row = " | ".join(headers)
separator = " | ".join(["---"] * len(headers))
row_template = " | ".join(["[Enter value]"] * len(headers))
row_lines = "\n".join([f"| {row_template} |"] * rows)
output.append(f"| {header_row} |\n| {separator} |\n{row_lines}\n")
elif sec_type == "task_list":
heading = CONFLUENCE_SECTION_TEMPLATES["heading"].replace("__LEVEL__", str(level)).replace("__TITLE__", title)
output.append(heading)
items = section.get("items", ["Task 1", "Task 2", "Task 3"])
item_lines = "\n".join([f"- [ ] {item}" for item in items])
tasks = CONFLUENCE_SECTION_TEMPLATES["task_list"].replace("__ITEMS__", item_lines)
output.append(tasks)
elif sec_type == "expand":
expand = CONFLUENCE_SECTION_TEMPLATES["expand"]
expand = expand.replace("__TITLE__", title)
expand = expand.replace("__CONTENT__", content)
output.append(expand)
elif sec_type == "info":
heading = CONFLUENCE_SECTION_TEMPLATES["heading"].replace("__LEVEL__", str(level)).replace("__TITLE__", title)
output.append(heading)
info = CONFLUENCE_SECTION_TEMPLATES["info_block"].replace("__CONTENT__", content)
output.append(info)
return "\n".join(output)
def generate_jira(spec: dict) -> str:
"""Generate Jira description template."""
name = spec.get("name", "Untitled")
sections = spec.get("sections", [])
output = []
for section in sections:
title = section.get("title", "Section")
content = section.get("content", "[Add details]")
sec_type = section.get("type", "heading")
output.append(f"## {title}")
if sec_type == "table":
headers = section.get("headers", ["Column 1", "Column 2"])
output.append("| " + " | ".join(headers) + " |")
output.append("| " + " | ".join(["---"] * len(headers)) + " |")
for _ in range(section.get("rows", 2)):
output.append("| " + " | ".join([""] * len(headers)) + " |")
elif sec_type == "task_list":
items = section.get("items", ["Item 1", "Item 2"])
for item in items:
output.append(f"- [ ] {item}")
else:
output.append(content)
output.append("")
return "\n".join(output)
def scaffold_template(spec: dict, fmt: str) -> dict:
if fmt == "confluence":
content = generate_confluence(spec)
else:
content = generate_jira(spec)
return {
"name": spec.get("name", "Untitled"),
"format": fmt,
"section_count": len(spec.get("sections", [])),
"content": content,
}
def print_report(result: dict) -> None:
print(f"\nTemplate Scaffold: {result['name']}")
print(f"Format: {result['format']} | Sections: {result['section_count']}")
print("=" * 60)
print(result["content"])
def print_example() -> None:
example = {
"name": "Sprint Retrospective",
"include_toc": True,
"metadata": {
"Sprint": "[Sprint Number]",
"Date": "{date}",
"Team": "[Team Name]",
"Facilitator": "@facilitator",
},
"sections": [
{"type": "heading", "title": "Sprint Overview", "level": 2, "content": "**Sprint Goal**: [Goal]\n**Velocity**: [X points]\n**Completed**: [X/Y stories]"},
{"type": "heading", "title": "What Went Well", "level": 2, "content": "- [Positive item 1]\n- [Positive item 2]"},
{"type": "heading", "title": "What Needs Improvement", "level": 2, "content": "- [Challenge 1]\n- [Challenge 2]"},
{"type": "table", "title": "Improvement Ideas", "level": 2, "headers": ["Idea", "Votes", "Owner", "Target Sprint"], "rows": 3},
{"type": "task_list", "title": "Action Items", "level": 2, "items": ["Action 1 - @owner - Due: [Date]", "Action 2 - @owner - Due: [Date]"]},
],
}
print(json.dumps(example, indent=2))
def main():
parser = argparse.ArgumentParser(description="Generate Confluence/Jira template scaffolds.")
parser.add_argument("--spec", type=str, help="Path to template spec JSON file")
parser.add_argument("--format", choices=["confluence", "jira"], default="confluence", help="Output format")
parser.add_argument("--json", action="store_true", help="Output as JSON")
parser.add_argument("--example", action="store_true", help="Print example spec and exit")
args = parser.parse_args()
if args.example:
print_example()
return
if not args.spec:
parser.error("--spec is required")
spec = load_data(args.spec)
result = scaffold_template(spec, args.format)
if args.json:
print(json.dumps(result, indent=2))
else:
print_report(result)
if __name__ == "__main__":
main()
#!/usr/bin/env python3
"""Template Usage Analyzer - Analyze template adoption and effectiveness.
Reads template usage data and produces adoption metrics, quality scores,
and recommendations for template optimization.
Usage:
python template_usage_analyzer.py --usage usage.json
python template_usage_analyzer.py --usage usage.json --json
python template_usage_analyzer.py --example
"""
import argparse
import json
import sys
from datetime import datetime
def load_data(path: str) -> dict:
with open(path, "r") as f:
return json.load(f)
def analyze_usage(data: dict) -> dict:
org = data.get("organization", "Unknown")
templates = data.get("templates", [])
total_pages = data.get("total_pages_created", 0)
results = []
total_from_template = 0
for t in templates:
name = t.get("name", "Unknown")
uses = t.get("uses_30d", 0)
total_from_template += uses
created_date = t.get("created_date", "Unknown")
last_updated = t.get("last_updated", "Unknown")
quality_score = 0
# Quality checks
has_instructions = t.get("has_instructions", False)
has_example = t.get("has_example", False)
has_owner = t.get("has_owner", False)
section_count = t.get("section_count", 0)
has_dynamic_content = t.get("has_dynamic_content", False)
if has_instructions:
quality_score += 20
if has_example:
quality_score += 20
if has_owner:
quality_score += 15
if section_count >= 3:
quality_score += 15
elif section_count >= 1:
quality_score += 10
if has_dynamic_content:
quality_score += 15
# Version freshness
if last_updated != "Unknown":
try:
updated_dt = datetime.strptime(last_updated, "%Y-%m-%d")
days_since = (datetime.now() - updated_dt).days
if days_since <= 90:
quality_score += 15
elif days_since <= 180:
quality_score += 10
elif days_since <= 365:
quality_score += 5
except ValueError:
pass
if quality_score >= 80:
quality_rating = "Excellent"
elif quality_score >= 60:
quality_rating = "Good"
elif quality_score >= 40:
quality_rating = "Fair"
else:
quality_rating = "Poor"
results.append({
"name": name,
"uses_30d": uses,
"created_date": created_date,
"last_updated": last_updated,
"quality_score": quality_score,
"quality_rating": quality_rating,
"has_instructions": has_instructions,
"has_example": has_example,
"has_owner": has_owner,
"section_count": section_count,
"has_dynamic_content": has_dynamic_content,
})
results.sort(key=lambda x: x["uses_30d"], reverse=True)
adoption_rate = round(total_from_template / total_pages * 100, 1) if total_pages > 0 else 0
avg_quality = round(sum(r["quality_score"] for r in results) / len(results), 1) if results else 0
# Recommendations
recs = []
unused = [r for r in results if r["uses_30d"] == 0]
if unused:
recs.append(f"{len(unused)} template(s) with zero usage in 30 days. Review for deprecation or promotion.")
low_quality = [r for r in results if r["quality_rating"] == "Poor"]
if low_quality:
names = ", ".join(r["name"] for r in low_quality[:3])
recs.append(f"Low quality templates: {names}. Add instructions, examples, and assign owners.")
if adoption_rate < 50:
recs.append(f"Template adoption is {adoption_rate:.0f}% (target: 70%+). Promote templates in team channels and pin to space sidebars.")
no_owner = [r for r in results if not r["has_owner"]]
if no_owner:
recs.append(f"{len(no_owner)} template(s) without an owner. Assign owners for maintenance accountability.")
return {
"organization": org,
"analysis_date": datetime.now().strftime("%Y-%m-%d"),
"total_templates": len(results),
"total_pages_created": total_pages,
"pages_from_templates": total_from_template,
"adoption_rate_pct": adoption_rate,
"avg_quality_score": avg_quality,
"templates": results,
"recommendations": recs,
}
def print_report(result: dict) -> None:
print(f"\nTemplate Usage Analysis: {result['organization']}")
print(f"Date: {result['analysis_date']}")
print("=" * 65)
print(f"Templates: {result['total_templates']} | Adoption: {result['adoption_rate_pct']:.0f}% | Avg Quality: {result['avg_quality_score']:.0f}/100")
print(f"\nTemplate Details:")
print(f" {'Template':<30} {'Uses':>6} {'Quality':>8} {'Rating':<12} {'Updated'}")
print(f" {'-'*30} {'-'*6} {'-'*8} {'-'*12} {'-'*12}")
for t in result["templates"]:
name = t["name"][:28] + ".." if len(t["name"]) > 30 else t["name"]
print(f" {name:<30} {t['uses_30d']:>6} {t['quality_score']:>7}% {t['quality_rating']:<12} {t['last_updated']}")
if result["recommendations"]:
print(f"\nRecommendations:")
for i, r in enumerate(result["recommendations"], 1):
print(f" {i}. {r}")
print()
def print_example() -> None:
example = {
"organization": "Acme Corp",
"total_pages_created": 150,
"templates": [
{"name": "Meeting Notes", "uses_30d": 45, "created_date": "2025-06-01", "last_updated": "2026-02-15", "has_instructions": True, "has_example": True, "has_owner": True, "section_count": 5, "has_dynamic_content": True},
{"name": "Sprint Retrospective", "uses_30d": 12, "created_date": "2025-08-01", "last_updated": "2026-01-10", "has_instructions": True, "has_example": False, "has_owner": True, "section_count": 4, "has_dynamic_content": False},
{"name": "Old Project Template", "uses_30d": 0, "created_date": "2024-03-01", "last_updated": "2024-06-01", "has_instructions": False, "has_example": False, "has_owner": False, "section_count": 2, "has_dynamic_content": False},
],
}
print(json.dumps(example, indent=2))
def main():
parser = argparse.ArgumentParser(description="Analyze template adoption and effectiveness.")
parser.add_argument("--usage", type=str, help="Path to usage data JSON file")
parser.add_argument("--json", action="store_true", help="Output results as JSON")
parser.add_argument("--example", action="store_true", help="Print example data and exit")
args = parser.parse_args()
if args.example:
print_example()
return
if not args.usage:
parser.error("--usage is required (use --example to see the expected format)")
data = load_data(args.usage)
result = analyze_usage(data)
if args.json:
print(json.dumps(result, indent=2))
else:
print_report(result)
if __name__ == "__main__":
main()
#!/usr/bin/env python3
"""Template Validator - Validate templates against quality standards.
Reads a template and checks it against quality criteria including
structure, instructions, completeness, and maintainability.
Usage:
python template_validator.py --template template.json
python template_validator.py --template template.json --json
python template_validator.py --example
"""
import argparse
import json
import sys
from datetime import datetime
QUALITY_CHECKS = [
{"id": "name", "weight": 10, "description": "Template has a descriptive name (>5 chars)"},
{"id": "owner", "weight": 10, "description": "Template has a designated owner"},
{"id": "description", "weight": 10, "description": "Template has a usage description"},
{"id": "sections", "weight": 15, "description": "Template has 3+ structured sections"},
{"id": "instructions", "weight": 15, "description": "Sections include inline instructions or placeholders"},
{"id": "example", "weight": 10, "description": "A completed example is available"},
{"id": "dynamic", "weight": 10, "description": "Uses dynamic content (macros, dates, Jira queries)"},
{"id": "version", "weight": 5, "description": "Version number is tracked"},
{"id": "freshness", "weight": 10, "description": "Updated within the last 12 months"},
{"id": "labels", "weight": 5, "description": "Template has categorization labels"},
]
def load_data(path: str) -> dict:
with open(path, "r") as f:
return json.load(f)
def validate_template(data: dict) -> dict:
name = data.get("name", "")
results = []
total_weight = 0
earned_weight = 0
# Name check
check = {"id": "name", "weight": 10}
passed = len(name.strip()) > 5
results.append({"check": "name", "passed": passed, "weight": 10, "detail": f"Name: '{name}'"})
total_weight += 10
if passed:
earned_weight += 10
# Owner
passed = bool(data.get("owner", "").strip())
results.append({"check": "owner", "passed": passed, "weight": 10, "detail": f"Owner: {data.get('owner', 'Not set')}"})
total_weight += 10
if passed:
earned_weight += 10
# Description
desc = data.get("description", "")
passed = len(desc.strip()) > 20
results.append({"check": "description", "passed": passed, "weight": 10, "detail": f"Description length: {len(desc)} chars"})
total_weight += 10
if passed:
earned_weight += 10
# Sections
sections = data.get("sections", [])
passed = len(sections) >= 3
results.append({"check": "sections", "passed": passed, "weight": 15, "detail": f"Sections: {len(sections)}"})
total_weight += 15
if passed:
earned_weight += 15
# Instructions
has_instructions = sum(1 for s in sections if s.get("has_instructions", False) or "[" in s.get("content", ""))
passed = has_instructions >= len(sections) * 0.5 if sections else False
results.append({"check": "instructions", "passed": passed, "weight": 15, "detail": f"Sections with instructions: {has_instructions}/{len(sections)}"})
total_weight += 15
if passed:
earned_weight += 15
# Example
passed = data.get("has_example", False)
results.append({"check": "example", "passed": passed, "weight": 10})
total_weight += 10
if passed:
earned_weight += 10
# Dynamic content
passed = data.get("has_dynamic_content", False)
results.append({"check": "dynamic", "passed": passed, "weight": 10})
total_weight += 10
if passed:
earned_weight += 10
# Version
passed = bool(data.get("version", ""))
results.append({"check": "version", "passed": passed, "weight": 5, "detail": f"Version: {data.get('version', 'Not set')}"})
total_weight += 5
if passed:
earned_weight += 5
# Freshness
last_updated = data.get("last_updated", "")
freshness_passed = False
if last_updated:
try:
updated_dt = datetime.strptime(last_updated, "%Y-%m-%d")
days = (datetime.now() - updated_dt).days
freshness_passed = days <= 365
except ValueError:
pass
results.append({"check": "freshness", "passed": freshness_passed, "weight": 10, "detail": f"Last updated: {last_updated or 'Unknown'}"})
total_weight += 10
if freshness_passed:
earned_weight += 10
# Labels
labels = data.get("labels", [])
passed = len(labels) >= 1
results.append({"check": "labels", "passed": passed, "weight": 5, "detail": f"Labels: {', '.join(labels) if labels else 'None'}"})
total_weight += 5
if passed:
earned_weight += 5
score = round(earned_weight / total_weight * 100, 1) if total_weight > 0 else 0
if score >= 85:
rating = "Production Ready"
elif score >= 65:
rating = "Needs Minor Fixes"
elif score >= 40:
rating = "Needs Improvement"
else:
rating = "Not Ready"
failures = [r for r in results if not r["passed"]]
recs = []
for f in failures:
check_def = next((c for c in QUALITY_CHECKS if c["id"] == f["check"]), None)
if check_def:
recs.append(f"Fix: {check_def['description']}")
return {
"template_name": name,
"score": score,
"rating": rating,
"checks_passed": sum(1 for r in results if r["passed"]),
"checks_total": len(results),
"results": results,
"recommendations": recs,
}
def print_report(result: dict) -> None:
print(f"\nTemplate Validation: {result['template_name']}")
print("=" * 55)
print(f"Score: {result['score']:.0f}/100 ({result['rating']})")
print(f"Checks: {result['checks_passed']}/{result['checks_total']} passed")
print(f"\nChecks:")
for r in result["results"]:
status = "PASS" if r["passed"] else "FAIL"
detail = f" ({r.get('detail', '')})" if r.get("detail") else ""
check_def = next((c for c in QUALITY_CHECKS if c["id"] == r["check"]), {})
print(f" [{status}] {check_def.get('description', r['check'])}{detail}")
if result["recommendations"]:
print(f"\nActions Needed:")
for i, r in enumerate(result["recommendations"], 1):
print(f" {i}. {r}")
print()
def print_example() -> None:
example = {
"name": "Sprint Retrospective Template",
"owner": "Jane Smith",
"description": "Standard template for sprint retrospective meetings. Covers what went well, challenges, and action items.",
"version": "2.1",
"last_updated": "2026-02-15",
"labels": ["sprint", "retro", "agile"],
"has_example": True,
"has_dynamic_content": True,
"sections": [
{"title": "Sprint Overview", "content": "**Sprint**: [Number]\n**Velocity**: [X points]", "has_instructions": True},
{"title": "What Went Well", "content": "- [Positive item]", "has_instructions": True},
{"title": "Challenges", "content": "- [Challenge]", "has_instructions": True},
{"title": "Action Items", "content": "- [ ] [Action] - @owner - [Date]", "has_instructions": True},
],
}
print(json.dumps(example, indent=2))
def main():
parser = argparse.ArgumentParser(description="Validate templates against quality standards.")
parser.add_argument("--template", type=str, help="Path to template JSON file")
parser.add_argument("--json", action="store_true", help="Output as JSON")
parser.add_argument("--example", action="store_true", help="Print example and exit")
args = parser.parse_args()
if args.example:
print_example()
return
if not args.template:
parser.error("--template is required")
data = load_data(args.template)
result = validate_template(data)
if args.json:
print(json.dumps(result, indent=2))
else:
print_report(result)
if __name__ == "__main__":
main()