From ai-sdlc
Analyzes Claude Code session history and tool call data to detect repetitive workflow patterns, classifies them, and proposes automations as draft artifacts for user approval.
How this command is triggered — by the user, by Claude, or both
Slash command
/ai-sdlc:detect-patternsFiles this command reads when invoked
The summary Claude sees in its command listing — used to decide when to auto-load this command
Detect repetitive workflow patterns from Claude Code session history and propose automations. ## Steps 1. **Read telemetry data** from `~/.claude/usage-data/tool-sequences.jsonl` 2. **Also read** session metadata from `~/.claude/usage-data/session-meta/*.json` for historical data 3. **Run pattern detection** using the orchestrator's n-gram mining engine: 4. **Classify each pattern** as command-sequence, copy-paste-cycle, or periodic-task 5. **Generate proposals** for each detected pattern with draft artifact content 6. **Present results** as a table: | # | Pattern | Type | Confiden...
Detect repetitive workflow patterns from Claude Code session history and propose automations.
~/.claude/usage-data/tool-sequences.jsonl~/.claude/usage-data/session-meta/*.json for historical dataimport { readToolSequenceJSONL, mineFrequentPatterns, classifyPattern } from '@ai-sdlc/orchestrator';
--since YYYY-MM-DD — only analyze events after this date--min-confidence 0.6 — minimum confidence threshold (0-1)npx claudepluginhub ai-sdlc-framework/ai-sdlc --plugin ai-sdlc/suggest-automationAnalyzes recent git commit history to detect repeated patterns and suggests automation opportunities (commands, skills, or agents). Can also generate selected automation files.
/review-gladiatorReflects on accumulated observations and session history to cluster patterns and generate actionable recommendations for workflow improvement. Optionally filters reflection to a specific topic.
/reflect-skillsAnalyzes recent Claude Code session history to detect repeating workflow patterns and proposes reusable skill candidates per project.
/retroAnalyzes recent Claude Code transcripts to find frequently corrected items, repeated instructions, and recurring mistakes, then outputs absorption recommendations and a PR draft.
/patternsScans recent Claude Code sessions for recurring patterns and saves them as captures (rules, concept notes, writing seeds).
/insightsAnalyzes Claude Code session history and learnings database — shows duration, file edits, correction patterns, learning categories, and productivity metrics.