| name | summarize |
| description | Generate a summary document from the current work session |
| model | sonnet |
| effort | medium |
Generate a summary document from the current work session. Supports both simple and phased plans.
Usage
/para:summarize # Auto-detect active plan/phase
/para:summarize --phase=N # Summarize specific phase
What It Does
- Reads
worktree_path from context/context.md JSON metadata
- Analyzes git changes from the worktree using
git -C {worktree_path} diff main...HEAD and git -C {worktree_path} log main..HEAD
- Reviews the active plan (or phase) from
context/context.md
- Creates summary in the main working tree:
context/summaries/YYYY-MM-DD-task-name-summary.md (or ...-phase-N-summary.md)
- Updates
context/context.md: moves plan from active_context to completed_summaries, updates timestamp
- For phased plans, marks phase status as "completed"
Summary Sections
- Date & Status -- when completed, success/failure
- Changes Made -- files modified/created with line references (from worktree diff)
- Rationale -- why these changes were made
- MCP Tools Used -- preprocessing tools utilized
- Key Learnings -- insights, follow-up tasks, gotchas
- Test Results -- pass/fail status, coverage metrics
Implementation
- Get current date in
YYYY-MM-DD format
- Read
context/context.md to find active plan and worktree_path
- If
worktree_path is set, analyze changes with:
git -C {worktree_path} diff main...HEAD for file-level changes
git -C {worktree_path} log main..HEAD --oneline for commit history
- If no
worktree_path (legacy or --no-worktree execution), fall back to git diff and git status on current branch
- Extract task name from plan filename
- Create summary file in main working tree with template from
summary-template.md
- Update
context/context.md metadata
- Display summary location
Post-Summarize Guidance
If /para:summarize was run standalone (not as part of /para:workflow), the next steps are:
- Push the branch:
git -C {worktree_path} push -u origin para/{task-name}
- Create a PR:
gh pr create from the worktree branch
- Run
/para:archive to clean up the worktree and archive context
If /para:summarize was invoked as Step 4 of /para:workflow, the PR was already created in Step 2 of the workflow — skip the manual push/PR instructions above.