Download raw insights data from last collection date until today
Downloads raw insights data from all sources since the last collection date.
/plugin marketplace add lttr/claude-marketplace/plugin install dev-flow@lttr-claude-marketplacedf/insights/Download raw data from all sources covering the period since the last collection.
Check .insights/raw/ for existing data files and find the most recent date:
# Find most recent date in existing commits.json (if exists)
if [ -f .insights/raw/commits.json ]; then
LAST_DATE=$(cat .insights/raw/commits.json | node -e "
const data = JSON.parse(require('fs').readFileSync(0, 'utf8'));
const dates = data.map(d => d.date).filter(Boolean).sort();
console.log(dates[dates.length - 1] || '');
")
fi
If no existing data, default to 30 days ago.
# Calculate days between LAST_DATE and today
TODAY=$(date +%Y-%m-%d)
DAYS=$(( ($(date -d "$TODAY" +%s) - $(date -d "$LAST_DATE" +%s)) / 86400 ))
# Add 1 day buffer for overlap
DAYS=$((DAYS + 1))
# Cap at reasonable maximum (90 days)
if [ $DAYS -gt 90 ]; then DAYS=90; fi
Run all collectors with the calculated day range:
node $PLUGIN_DIR/collectors/azure-prs.js --days $DAYS
node $PLUGIN_DIR/collectors/azure-workitems.js --days $DAYS
node $PLUGIN_DIR/collectors/git-commits.js --days $DAYS
If Atlassian MCP is available, search for pages modified since last collection:
mcp__plugin_triage_atlassian__search with modified:>LAST_DATE.insights/raw/confluence.jsonSkip silently if not configured.
Output summary of what was collected:
Raw data saved to .insights/raw/:
prs.json - Azure PRsworkitems.json - Azure work itemscommits.json - Git commitsconfluence.json - Confluence pages (if available)No summary report generated. Use /df:insights:daily or /df:insights:weekly to generate reports from the collected data.