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/review-gladiatorReviews session history observations, clusters patterns, generates workflow recommendations, and suggests changes or existing solutions.
/suggest-automationAnalyzes recent git commits (default 50) for repetitive patterns in messages/files, suggests new Claude commands/skills/agents to automate them, lists existing, and generates selected ones.
/retroAnalyzes recent Claude Code transcripts to detect recurring fixes, repeated instructions, and frequent mistakes, then suggests where to absorb them (CLAUDE.md / skills / commands) with a decision table and PR draft.
/patternsScans recent Claude Code sessions for recurring patterns and saves them as captures (rules, concept notes, writing seeds).
/coachAnalyzes development sessions from session-log.jsonl for actionable coaching insights on workflow adoption, prompt quality, efficiency, and code quality. Default: last session + 5-session trend; supports --last N and --all flags.
/reflect-skillsAnalyzes session history for repeating patterns like workflows and prompts, proposing reusable skill candidates. Generates command files after approval. Supports --days, --project, --all-projects, --dry-run.