npx claudepluginhub moonsite/moonsite-claude-extensions --plugin jira-autopilotGenerate a detailed work report spanning a configurable time period. Unlike /work-summary (today only), this command can produce reports across multiple days, suitable for weekly standups, sprint reviews, or manager reports.
PLUGIN_ROOT="${CLAUDE_PLUGIN_ROOT:-$(ls -d ~/.claude/plugins/cache/moonsite-claude-extensions/jira-autopilot/*/ 2>/dev/null | sort -V | tail -1)}"
CLI="${PLUGIN_ROOT}hooks-handlers/jira_core.py"
Resolve PROJECT_ROOT by walking up to find .claude/jira-autopilot.json (handles git worktrees):
_dir="${CLAUDE_PROJECT_DIR:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}"
PROJECT_ROOT=""
while [ "$_dir" != "/" ]; do
[ -f "$_dir/.claude/jira-autopilot.json" ] && PROJECT_ROOT="$_dir" && break
_dir="$(dirname "$_dir")"
done
[ -z "$PROJECT_ROOT" ] && _mr="$(git rev-parse --path-format=absolute --git-common-dir 2>/dev/null | sed 's|/\.git$||')" && [ -f "$_mr/.claude/jira-autopilot.json" ] && PROJECT_ROOT="$_mr"
[ -z "$PROJECT_ROOT" ] && PROJECT_ROOT="${CLAUDE_PROJECT_DIR:-$(pwd)}"
Check if the user provided a time range argument. Common patterns:
/report-work — defaults to today/report-work today — today only/report-work week or /report-work this week — current week (Monday to today)/report-work yesterday — yesterday only/report-work 2026-02-28 — specific date/report-work 2026-02-24 2026-03-01 — date rangeIf no argument or ambiguous, ask the user:
What period should the report cover?
- Today
- This week (Mon-today)
- Last 7 days
- Custom date range
Calculate the start and end dates as YYYY-MM-DD strings.
python3 "$CLI" get-session "$PROJECT_ROOT"
Include only if today falls within the report period.
Scan all files in $PROJECT_ROOT/.claude/jira-sessions/:
ls "$PROJECT_ROOT/.claude/jira-sessions/"*.json 2>/dev/null
Filter sessions whose sessionId date prefix falls within the report period. Session IDs are formatted as YYYYMMDD-HHMMSS.
python3 -c "
import json, os, sys
sessions_dir = '$PROJECT_ROOT/.claude/jira-sessions'
start_date = '$START_DATE'.replace('-', '')
end_date = '$END_DATE'.replace('-', '')
results = []
if os.path.isdir(sessions_dir):
for f in sorted(os.listdir(sessions_dir)):
if f.endswith('.json'):
date_part = f[:8]
if start_date <= date_part <= end_date:
try:
data = json.load(open(os.path.join(sessions_dir, f)))
results.append(data)
except: pass
print(json.dumps(results))
"
For each session in the report period, aggregate:
Also compute:
Generate a structured report:
Work Report: {start_date} to {end_date}
{'=' * 50}
Overview:
Period: {start_date} — {end_date} ({N} days)
Sessions: {session_count}
Total time: {total_time}
Issues: {issue_count}
Daily Breakdown:
Mon 2026-02-24: 2h 15m (3 issues)
Tue 2026-02-25: 4h 30m (5 issues)
Wed 2026-02-26: 1h 45m (2 issues)
...
Issues Detail:
KEY-42 — Fix login crash
Total time: 3h 15m across 4 sessions
Days active: Mon, Tue, Wed
Files: src/auth.ts, src/login.tsx, +3 more
Worklogs: 3 posted (3h), 1 pending (15m)
KEY-43 — Add user dashboard
Total time: 1h 30m across 2 sessions
Days active: Tue, Wed
Files: src/dashboard.tsx, src/api/users.ts
Worklogs: 2 posted (1h 30m)
Pending Items:
1 pending worklog (KEY-42, 15m)
2 unattributed work entries (30m total)
{'=' * 50}
XmXh YmShow up to 8 files per issue, "+N more" for overflow.
Ask the user what to do with the report:
work-report-{date}.md).For each issue in the report:
python3 "$CLI" add-comment "$PROJECT_ROOT" "ISSUE_KEY" "REPORT_COMMENT"
The comment should include only the portion of the report relevant to that issue:
logLanguage.REPORT_FILE="$PROJECT_ROOT/work-report-${END_DATE}.md"
Write the full report as a markdown file.
/jira-setup first.jira-sessions directory exists: only use the current session (if within period).