Conversation Analysis
Signal extraction → pattern detection → behavioral insights.
- User requests conversation analysis
- Identifying frustration, success, or workflow patterns
- Extracting user preferences and requirements
- Understanding task evolution and iterations
NOT for: real-time monitoring, content generation, single message analysis
| Type |
Subtype |
Indicators |
| Success |
Explicit Praise |
"Perfect!", "Exactly what I needed", exclamation marks |
| Success |
Continuation |
"Now do the same for...", building on prior work |
| Success |
Adoption |
User implements suggestion without modification |
| Success |
Acceptance |
"Looks good", "Ship it", "Merge this" |
| Frustration |
Correction |
"No, I meant...", "That's wrong", "Do X instead" |
| Frustration |
Reversion |
User undoes agent changes, "Go back" |
| Frustration |
Repetition |
Same request 2+ times, escalating specificity |
| Frustration |
Explicit |
"This isn't working", "Why did you...", accusatory tone |
| Workflow |
Sequence |
"First...", "Then...", "Finally...", numbered lists |
| Workflow |
Transition |
"Now that X is done, let's Y", phase changes |
| Workflow |
Tool Chain |
Recurring tool usage patterns (Read → Edit → Bash) |
| Workflow |
Context Switch |
Abrupt topic changes, no transition language |
| Request |
Prohibition |
"Don't use X", "Never do Y", "Avoid Z" |
| Request |
Requirement |
"Always check...", "Make sure to...", "You must..." |
| Request |
Preference |
"I prefer...", "It's better to...", comparative language |
| Request |
Conditional |
"If X then Y", "When A, do B", situational rules |
Confidence levels:
- High (0.8–1.0): Explicit keywords match taxonomy, no ambiguity, strong context
- Medium (0.5–0.79): Implicit signal, partial context, minor ambiguity
- Low (0.2–0.49): Ambiguous language, weak context, borderline classification
Track with TodoWrite. Phases advance only, never regress.
| Phase |
Trigger |
activeForm |
| Parse Input |
Session start |
"Parsing input" |
| Extract Signals |
Scope validated |
"Extracting signals" |
| Detect Patterns |
Signals extracted |
"Detecting patterns" |
| Synthesize Report |
Patterns detected |
"Synthesizing report" |
TodoWrite format:
- Parse Input { scope description }
- Extract Signals { from N messages }
- Detect Patterns { category focus }
- Synthesize Report { output format }
Edge cases:
- Small scope (<5 messages): Skip Extract Signals, jump to Synthesize
- Re-analysis: Resume at Detect Patterns
- Narrow focus (single signal type): Skip Detect Patterns
Workflow:
- Start: Create Parse Input
in_progress
- Transition: Mark current
completed, add next in_progress
- After delivery: Mark Synthesize Report
completed
Define Scope
- Message range (all, recent N, date range)
- Actors (user only, agent only, both)
- Exclusions (system messages, tool outputs, code blocks)
- Mark Parse Input
completed, create Extract Signals in_progress
Extract Signals
- Scan messages for signal keywords
- Match against taxonomy
- Assign confidence (high/medium/low)
- Record: type, subtype, message_id, timestamp, quote, context
- Mark Extract Signals
completed, create Detect Patterns in_progress
Detect Patterns
- Group signals by type/subtype
- Find clusters (3+ related signals)
- Identify evolution (signal changes over time)
- Track repetition (recurring themes)
- Spot correlations (tool chains, workflows)
- Mark Detect Patterns
completed, create Synthesize Report in_progress
Output
- Generate JSON with signals, patterns, summary
- Include confidence, recommendations, action items
- Append
△ Caveats if gaps exist
- Mark Synthesize Report
completed
Behavioral patterns from signal clusters:
| Pattern |
Detection |
Confidence |
| Repetition |
Same signal 3+ times |
Strong: 5+ signals |
| Evolution |
Signal type changes over time |
Moderate: 3-4 signals |
| Preferences |
Consistent request signals |
Strong: across sessions |
| Tool Chains |
Recurring tool sequences (5+ times) |
High: frequent use |
| Problem Areas |
Clustered frustration signals |
Strong: 3+ in same topic |
Temporal patterns:
- Escalation: Increasing frustration/stronger requirements
- De-escalation: Frustration → success transition
- Cyclical: Same issue recurs across sessions
JSON structure:
{
"analysis": {
"scope": {
"message_count": N,
"date_range": "YYYY-MM-DD to YYYY-MM-DD",
"actors": ["user", "agent"]
},
"signals": [
{
"type": "success|frustration|workflow|request",
"subtype": "specific_subtype",
"message_id": "msg_123",
"timestamp": "ISO8601",
"quote": "exact text",
"confidence": "high|medium|low",
"context": "brief explanation"
}
],
"patterns": [
{
"pattern_type": "repetition|evolution|preference|tool_chain",
"category": "success|frustration|workflow|request",
"description": "pattern summary",
"occurrences": N,
"confidence": "strong|moderate|weak",
"first_seen": "ISO8601",
"last_seen": "ISO8601",
"recommendation": "actionable next step"
}
],
"summary": {
"total_signals": N,
"by_type": { "success": N, "frustration": N, ... },
"key_insights": ["insight 1", "insight 2"],
"action_items": ["item 1", "item 2"]
}
}
}
ALWAYS:
- Create Parse Input at session start
- Update todos at phase transitions
- Include confidence levels for all signals
- Support patterns with 2+ signals minimum
- Mark Synthesize Report
completed after delivery
- Apply recency weighting (recent overrides old)
NEVER:
- Skip phase transitions
- Extract low-confidence signals without marking them
- Claim patterns from single occurrences
- Regress phases
- Deliver without marking final phase complete
- Over-interpret neutral language
- signal-patterns.md — extended taxonomy, edge cases
- extraction-techniques.md — regex, heuristics
- sample-analysis.md — complete walkthrough
1---2name: conversation-analysis3description: Analyze conversation history to identify patterns, signals, and behaviors. Use when analyzing conversations, finding patterns in chat, identifying what went well/wrong, scanning for frustration, success, workflow transitions, or user preferences. Triggers on analyze, pattern(s), signal(s), conversation analysis, or `--analyze-conversation`.4---5
6# Conversation Analysis
7
8Signal extraction → pattern detection → behavioral insights.
9
10<when_to_use>
11
12- User requests conversation analysis
13- Identifying frustration, success, or workflow patterns
14- Extracting user preferences and requirements
15- Understanding task evolution and iterations
16
17NOT for: real-time monitoring, content generation, single message analysis
18
19</when_to_use>
20
21<signal_taxonomy>
22
23| Type | Subtype | Indicators |
24|------|---------|------------|
25| Success | Explicit Praise | "Perfect!", "Exactly what I needed", exclamation marks |
26| Success | Continuation | "Now do the same for...", building on prior work |
27| Success | Adoption | User implements suggestion without modification |
28| Success | Acceptance | "Looks good", "Ship it", "Merge this" |
29| Frustration | Correction | "No, I meant...", "That's wrong", "Do X instead" |
30| Frustration | Reversion | User undoes agent changes, "Go back" |
31| Frustration | Repetition | Same request 2+ times, escalating specificity |
32| Frustration | Explicit | "This isn't working", "Why did you...", accusatory tone |
33| Workflow | Sequence | "First...", "Then...", "Finally...", numbered lists |
34| Workflow | Transition | "Now that X is done, let's Y", phase changes |
35| Workflow | Tool Chain | Recurring tool usage patterns (Read → Edit → Bash) |
36| Workflow | Context Switch | Abrupt topic changes, no transition language |
37| Request | Prohibition | "Don't use X", "Never do Y", "Avoid Z" |
38| Request | Requirement | "Always check...", "Make sure to...", "You must..." |
39| Request | Preference | "I prefer...", "It's better to...", comparative language |
40| Request | Conditional | "If X then Y", "When A, do B", situational rules |
41
42Confidence levels:
43- High (0.8–1.0): Explicit keywords match taxonomy, no ambiguity, strong context
44- Medium (0.5–0.79): Implicit signal, partial context, minor ambiguity
45- Low (0.2–0.49): Ambiguous language, weak context, borderline classification
46
47</signal_taxonomy>
48
49<phases>
50
51Track with TodoWrite. Phases advance only, never regress.
52
53| Phase | Trigger | activeForm |
54|-------|---------|------------|
55| Parse Input | Session start | "Parsing input" |
56| Extract Signals | Scope validated | "Extracting signals" |
57| Detect Patterns | Signals extracted | "Detecting patterns" |
58| Synthesize Report | Patterns detected | "Synthesizing report" |
59
60TodoWrite format:
61
62```text
63- Parse Input { scope description }
64- Extract Signals { from N messages }
65- Detect Patterns { category focus }
66- Synthesize Report { output format }
67```
68
69Edge cases:
70- Small scope (<5 messages): Skip Extract Signals, jump to Synthesize
71- Re-analysis: Resume at Detect Patterns
72- Narrow focus (single signal type): Skip Detect Patterns
73
74Workflow:
75- Start: Create Parse Input `in_progress`
76- Transition: Mark current `completed`, add next `in_progress`
77- After delivery: Mark Synthesize Report `completed`
78
79</phases>
80
81<workflow>
82
831. Define Scope
84 - Message range (all, recent N, date range)
85 - Actors (user only, agent only, both)
86 - Exclusions (system messages, tool outputs, code blocks)
87 - Mark Parse Input `completed`, create Extract Signals `in_progress`
88
892. Extract Signals
90 - Scan messages for signal keywords
91 - Match against taxonomy
92 - Assign confidence (high/medium/low)
93 - Record: type, subtype, message_id, timestamp, quote, context
94 - Mark Extract Signals `completed`, create Detect Patterns `in_progress`
95
963. Detect Patterns
97 - Group signals by type/subtype
98 - Find clusters (3+ related signals)
99 - Identify evolution (signal changes over time)
100 - Track repetition (recurring themes)
101 - Spot correlations (tool chains, workflows)
102 - Mark Detect Patterns `completed`, create Synthesize Report `in_progress`
103
1044. Output
105 - Generate JSON with signals, patterns, summary
106 - Include confidence, recommendations, action items
107 - Append `△ Caveats` if gaps exist
108 - Mark Synthesize Report `completed`
109
110</workflow>
111
112<pattern_detection>
113
114Behavioral patterns from signal clusters:
115
116| Pattern | Detection | Confidence |
117|---------|-----------|------------|
118| Repetition | Same signal 3+ times | Strong: 5+ signals |
119| Evolution | Signal type changes over time | Moderate: 3-4 signals |
120| Preferences | Consistent request signals | Strong: across sessions |
121| Tool Chains | Recurring tool sequences (5+ times) | High: frequent use |
122| Problem Areas | Clustered frustration signals | Strong: 3+ in same topic |
123
124Temporal patterns:
125- Escalation: Increasing frustration/stronger requirements
126- De-escalation: Frustration → success transition
127- Cyclical: Same issue recurs across sessions
128
129</pattern_detection>
130
131<output_format>
132
133JSON structure:
134
135```json
136{
137 "analysis": {
138 "scope": {
139 "message_count": N,
140 "date_range": "YYYY-MM-DD to YYYY-MM-DD",
141 "actors": ["user", "agent"]
142 },
143 "signals": [
144 {
145 "type": "success|frustration|workflow|request",
146 "subtype": "specific_subtype",
147 "message_id": "msg_123",
148 "timestamp": "ISO8601",
149 "quote": "exact text",
150 "confidence": "high|medium|low",
151 "context": "brief explanation"
152 }
153 ],
154 "patterns": [
155 {
156 "pattern_type": "repetition|evolution|preference|tool_chain",
157 "category": "success|frustration|workflow|request",
158 "description": "pattern summary",
159 "occurrences": N,
160 "confidence": "strong|moderate|weak",
161 "first_seen": "ISO8601",
162 "last_seen": "ISO8601",
163 "recommendation": "actionable next step"
164 }
165 ],
166 "summary": {
167 "total_signals": N,
168 "by_type": { "success": N, "frustration": N, ... },
169 "key_insights": ["insight 1", "insight 2"],
170 "action_items": ["item 1", "item 2"]
171 }
172 }
173}
174```
175
176</output_format>
177
178<rules>
179
180ALWAYS:
181- Create Parse Input at session start
182- Update todos at phase transitions
183- Include confidence levels for all signals
184- Support patterns with 2+ signals minimum
185- Mark Synthesize Report `completed` after delivery
186- Apply recency weighting (recent overrides old)
187
188NEVER:
189- Skip phase transitions
190- Extract low-confidence signals without marking them
191- Claim patterns from single occurrences
192- Regress phases
193- Deliver without marking final phase complete
194- Over-interpret neutral language
195
196</rules>
197
198<references>
199
200- [signal-patterns.md](references/signal-patterns.md) — extended taxonomy, edge cases
201- [extraction-techniques.md](references/extraction-techniques.md) — regex, heuristics
202- [sample-analysis.md](examples/sample-analysis.md) — complete walkthrough
203
204</references>