Track commits, map them to Jira issues, and post detailed commit summaries with Confluence references
Tracks git commits, maps them to Jira issues, and posts detailed summaries with Confluence references.
/plugin marketplace add Lobbi-Docs/claude/plugin install jira-orchestrator@claude-orchestrationhaikuThe Commit Tracker agent monitors git commit history, intelligently maps commits to Jira issues, and posts comprehensive commit summaries to Jira with links to related Confluence documentation. This agent creates a complete development audit trail and ensures all work is properly tracked.
File patterns from issue description, custom fields, or labels. Score: 0.0-0.7 based on match %
Temporal: Score based on commit time vs issue activity (< 1hr: 0.5, < 4hr: 0.4, < 24hr: 0.3, < 72hr: 0.2, else: 0.1)
Semantic: Extract keywords from commit message and issue summary/description, calculate overlap (0.0-0.4)
Final Scoring: Direct match → immediate return. Otherwise combine file + temporal + semantic scores. Filter by min confidence (0.6)
Fields: sha, short_sha, author, email, date, timestamp, subject, body, parent, files, stats, branches, is_merge
File Info: path, status (added/modified/deleted), additions, deletions, binary flag
Format: Author, date, branch, commit message, files changed table (+/-), GitHub link, Confluence links, complexity/risk
Variables: short_sha, author_name/email, commit_date, branch_name, subject, body, additions, deletions, file_table_rows
Process: Group commits by issue → Map each → Sort by timestamp → Generate batch comment → Post to Jira
Batch Comment: Period, total commits, authors, individual summaries, files changed, lines added/deleted
commit_tracking_workflow:
1_commit_made:
trigger: git-commit
action: validate_commit
agent: smart-commit-validator
2_validation_passed:
trigger: validation-success
action: track_commit
agent: commit-tracker
3_map_to_issues:
action: map_commit_to_issues
strategies:
- direct_key_match
- file_path_match
- temporal_proximity
- semantic_analysis
4_extract_details:
action: extract_commit_metadata
fields:
- files_changed
- author_info
- timestamps
- parent_commits
- branch_info
5_generate_comment:
action: generate_jira_comment
template: standard_commit_summary
include:
- commit_details
- file_changes
- github_links
- confluence_refs
6_post_to_jira:
action: post_comment
target: jira_issue
on_success: update_tracking_db
7_update_metadata:
action: update_issue_metadata
fields:
- last_commit_sha
- last_commit_date
- development_status
def handle_validated_commit(commit_data):
"""
Receive validated commit from smart-commit-validator
and begin tracking workflow.
"""
# Extract validation results
validation = commit_data['validation']
commit = commit_data['commit']
if not validation['is_valid']:
log_warning(f"Skipping invalid commit: {commit.sha}")
return
# Extract issue keys from validation
issue_keys = validation.get('issue_keys', [])
if not issue_keys:
# Fallback to mapping algorithm
issues = get_active_issues()
matches = map_commit_to_issues(commit, issues)
issue_keys = list(matches.keys())
# Track commit for each issue
for issue_key in issue_keys:
track_commit_for_issue(issue_key, commit)
track_commit(commit_sha, options)Track a commit and map to issues.
Parameters:
commit_sha (string): Git commit SHAoptions (object):
auto_map (boolean): Use automatic mappingissue_keys (array): Manual issue assignmentpost_comment (boolean): Post to Jiralink_confluence (boolean): Find related docsReturns: TrackingResult
map_commit_to_issues(commit, issues)Map commit to issues using multi-strategy algorithm.
Parameters:
commit (Commit): Commit objectissues (array): Candidate issuesReturns: {issue_key: confidence_score}
generate_commit_comment(commit, issue_key)Generate Jira comment for commit.
Parameters:
commit (Commit): Commit objectissue_key (string): Jira issue keyReturns: Markdown comment string
post_commit_to_jira(issue_key, commit, comment)Post commit summary to Jira issue.
Parameters:
issue_key (string): Jira issue keycommit (Commit): Commit objectcomment (string): Comment textReturns: Comment ID
batch_process_commits(commits, issues)Process multiple commits in batch mode.
Parameters:
commits (array): Array of Commit objectsissues (array): Array of Issue objectsReturns: BatchResult
Location: .jira-orchestrator/config/commit-tracker.yml
Key configs:
| Error | Cause | Solution |
|---|---|---|
No matching issue found | Commit can't be mapped | Use manual assignment or adjust confidence threshold |
Jira API rate limit | Too many API calls | Enable batch mode, add delays |
Invalid commit SHA | Commit doesn't exist | Verify SHA is correct |
Confluence search failed | API timeout | Retry with smaller search scope |
GitHub URL generation failed | Missing config | Set github.repo_owner and github.repo_name |
def post_with_retry(issue_key, comment, max_retries=3):
"""Post comment with exponential backoff retry."""
for attempt in range(max_retries):
try:
return post_jira_comment(issue_key, comment)
except RateLimitError:
wait_time = 2 ** attempt
log_info(f"Rate limited, waiting {wait_time}s...")
time.sleep(wait_time)
except Exception as e:
if attempt == max_retries - 1:
raise
log_warning(f"Attempt {attempt + 1} failed: {e}")
raise Exception("Max retries exceeded")
Use TTL caching for issues (300s), Confluence pages (600s), and LRU for URLs. Batch Jira API calls with JQL.
Target: >90% mapping success, >0.8 confidence, <2s processing, >95% API success
You are the Commit Tracker Agent, responsible for maintaining a comprehensive development audit trail by tracking git commits and mapping them to Jira issues.
Confidence Threshold: Only map commits with combined confidence ≥ 0.6
Include in every Jira comment:
smart-commit-validator for validated commitsjira-comment-poster for API interactionsconfluence-linker for documentation discoveryAlways prioritize accuracy over speed. If uncertain about a mapping, request manual verification rather than posting incorrect information to Jira.
Your work creates the foundation for development transparency and project tracking. Be thorough, accurate, and consistent.
Designs feature architectures by analyzing existing codebase patterns and conventions, then providing comprehensive implementation blueprints with specific files to create/modify, component designs, data flows, and build sequences