Skip to main content

/momentum - Activity Hot Spots

Show tasks and areas with recent activity to identify hot spots and work in progress.

System Prompt

EXECUTION DIRECTIVE: When the user invokes this command, you MUST:

  1. Analyze git log for recent file changes
  2. Query context database for recent work logs
  3. Scan session exports for activity patterns
  4. Identify directories/files with concentrated changes
  5. Present momentum map with velocity indicators

Usage

/momentum [options]

Examples

# Show current momentum
/momentum

# Filter to last 24 hours
/momentum --hours 24

# Show momentum by directory
/momentum --by-dir

# Show momentum by track
/momentum --by-track

# Include work logs
/momentum --include-logs

# Export momentum report
/momentum --export momentum.md

What It Does

  1. Analyze Git History - Recent commits and file changes
  2. Query Work Logs - /cxq type:work_log for logged activity
  3. Check Sessions - Recent session exports for patterns
  4. Map Hot Spots - Directories with concentrated changes
  5. Calculate Velocity - Changes per time period

Momentum Indicators

IndicatorMeaning
🔥🔥🔥Very Hot - 10+ changes in period
🔥🔥Hot - 5-9 changes in period
🔥Warm - 2-4 changes in period
Cool - 1 change in period
❄️Cold - No changes in period

Output Format

## 📊 Momentum Report (Last 48 hours)

### By Directory
| Directory | Changes | Velocity | Status |
|-----------|---------|----------|--------|
| backend/api/ | 15 | 🔥🔥🔥 | Very Hot |
| frontend/components/ | 8 | 🔥🔥 | Hot |
| docs/guides/ | 3 | 🔥 | Warm |
| scripts/ | 1 || Cool |

### By Track
| Track | Completed | In Progress | Velocity |
|-------|-----------|-------------|----------|
| A (Backend) | 4 | 2 | 🔥🔥🔥 |
| B (Frontend) | 2 | 3 | 🔥🔥 |
| C (DevOps) | 0 | 1 | ❄️ |

### Recent Work Logs
1. 2026-01-03 14:30 - "Fixed cart API response" (bugfix)
2. 2026-01-03 12:15 - "Added user auth flow" (feature)
3. 2026-01-03 10:00 - "Refactored checkout" (refactor)

### Suggested Focus
Based on momentum:
- **Continue:** Backend API work (high velocity, good progress)
- **Attention:** DevOps track (stalled, may have blockers)
- **Review:** Frontend components (active but scattered)

Options

OptionDescription
--hours NLimit to last N hours (default: 48)
--days NLimit to last N days
--by-dirGroup by directory
--by-trackGroup by project track
--by-authorGroup by commit author
--include-logsInclude work log entries
--export FILEExport report to markdown
--jsonOutput as JSON

Data Sources

SourceWhat It Provides
git logFile changes, commit frequency
Context DBWork logs, decisions
Session exportsActivity patterns
Project plansTask completion velocity

Integration

Works with:

  • /work-next - Recommends continuing hot areas
  • /blockers - Shows blockers in hot areas
  • /work-log - Feeds activity data
  • /handoff - Includes momentum in handoffs
CommandRelationship
/work-nextUses momentum for recommendations
/blockersIdentifies blockers in active areas
/work-logSource of activity data
/handoffIncludes momentum context

Success Output

When momentum analysis completes:

✅ COMMAND COMPLETE: /momentum
Period: <timeframe>
Hot spots: N directories
Velocity: <trend>
Report: Displayed

Completion Checklist

Before marking complete:

  • Git history analyzed
  • Work logs queried
  • Hot spots identified
  • Momentum map displayed

Failure Indicators

This command has FAILED if:

  • ❌ Git repository not accessible
  • ❌ No commits in timeframe
  • ❌ Context database unavailable
  • ❌ No output displayed

When NOT to Use

Do NOT use when:

  • No recent git activity (empty results)
  • Just started project (no history)
  • Need specific file status (use git status)

Anti-Patterns (Avoid)

Anti-PatternProblemSolution
Ignore cold areasMiss stalled workCheck for blockers in cold areas
Skip work logsIncomplete pictureUse --include-logs
Too narrow timeframeMiss patternsUse at least 24-48 hours

Principles

This command embodies:

  • #9 Based on Facts - Analyzes actual git and work data
  • #6 Clear, Understandable - Visual velocity indicators
  • #10 Research When in Doubt - Multi-source analysis

Full Standard: CODITECT-STANDARD-AUTOMATION.md


Version: 1.0.0 Created: 2026-01-03 Author: CODITECT Team