clavix 4.2.0 → 4.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/LICENSE +201 -21
  2. package/README.md +1 -1
  3. package/dist/cli/commands/deep.js +4 -58
  4. package/dist/cli/commands/init.js +13 -16
  5. package/dist/cli/commands/plan.js +2 -2
  6. package/dist/core/conversation-quality-tracker.d.ts +81 -0
  7. package/dist/core/conversation-quality-tracker.js +195 -0
  8. package/dist/core/intelligence/intent-detector.js +3 -0
  9. package/dist/core/intelligence/pattern-library.d.ts +18 -1
  10. package/dist/core/intelligence/pattern-library.js +131 -0
  11. package/dist/core/intelligence/patterns/conversation-summarizer.d.ts +25 -0
  12. package/dist/core/intelligence/patterns/conversation-summarizer.js +197 -0
  13. package/dist/core/intelligence/patterns/dependency-identifier.d.ts +21 -0
  14. package/dist/core/intelligence/patterns/dependency-identifier.js +149 -0
  15. package/dist/core/intelligence/patterns/implicit-requirement-extractor.d.ts +20 -0
  16. package/dist/core/intelligence/patterns/implicit-requirement-extractor.js +129 -0
  17. package/dist/core/intelligence/patterns/requirement-prioritizer.d.ts +22 -0
  18. package/dist/core/intelligence/patterns/requirement-prioritizer.js +117 -0
  19. package/dist/core/intelligence/patterns/success-metrics-enforcer.d.ts +22 -0
  20. package/dist/core/intelligence/patterns/success-metrics-enforcer.js +142 -0
  21. package/dist/core/intelligence/patterns/topic-coherence-analyzer.d.ts +22 -0
  22. package/dist/core/intelligence/patterns/topic-coherence-analyzer.js +140 -0
  23. package/dist/core/intelligence/patterns/user-persona-enricher.d.ts +22 -0
  24. package/dist/core/intelligence/patterns/user-persona-enricher.js +124 -0
  25. package/dist/core/intelligence/quality-assessor.js +2 -0
  26. package/dist/core/intelligence/types.d.ts +7 -2
  27. package/dist/core/intelligence/universal-optimizer.d.ts +27 -2
  28. package/dist/core/intelligence/universal-optimizer.js +65 -5
  29. package/dist/core/task-manager.d.ts +1 -2
  30. package/dist/core/task-manager.js +21 -26
  31. package/dist/templates/slash-commands/_canonical/deep.md +37 -69
  32. package/dist/templates/slash-commands/_canonical/fast.md +1 -0
  33. package/dist/templates/slash-commands/_components/sections/pattern-visibility.md +26 -2
  34. package/package.json +3 -3
  35. package/dist/templates/instructions/README 2.md +0 -311
  36. package/dist/templates/instructions/core 2/clavix-mode.md +0 -275
  37. package/dist/templates/instructions/core 2/file-operations.md +0 -330
  38. package/dist/templates/instructions/core 2/verification.md +0 -377
  39. package/dist/templates/instructions/troubleshooting 2/jumped-to-implementation.md +0 -234
  40. package/dist/templates/instructions/troubleshooting 2/mode-confusion.md +0 -402
  41. package/dist/templates/instructions/troubleshooting 2/skipped-file-creation.md +0 -385
  42. package/dist/templates/slash-commands/_canonical 2/archive.md +0 -410
  43. package/dist/templates/slash-commands/_canonical 2/deep.md +0 -512
  44. package/dist/templates/slash-commands/_canonical 2/execute.md +0 -80
  45. package/dist/templates/slash-commands/_canonical 2/fast.md +0 -370
  46. package/dist/templates/slash-commands/_canonical 2/implement.md +0 -364
  47. package/dist/templates/slash-commands/_canonical 2/plan.md +0 -329
  48. package/dist/templates/slash-commands/_canonical 2/prd.md +0 -320
  49. package/dist/templates/slash-commands/_canonical 2/prompts.md +0 -97
  50. package/dist/templates/slash-commands/_canonical 2/start.md +0 -204
  51. package/dist/templates/slash-commands/_canonical 2/summarize.md +0 -395
@@ -1,320 +0,0 @@
1
- ---
2
- name: "Clavix: PRD"
3
- description: Clavix Planning Mode - Transform ideas into structured PRDs through strategic questioning
4
- ---
5
-
6
- # Clavix Planning Mode
7
-
8
- You are helping the user create a Product Requirements Document (PRD) using Clavix Planning Mode's Socratic questioning approach. **Generated PRDs are automatically validated using Clavix Intelligence™** for AI consumption quality.
9
-
10
- ---
11
-
12
- ## CLAVIX MODE: Requirements & Planning Only
13
-
14
- **You are in Clavix prompt/PRD development mode. You help create planning documents, NOT implement features.**
15
-
16
- **YOUR ROLE:**
17
- - ✓ Ask strategic questions about the project
18
- - ✓ Generate comprehensive PRDs
19
- - ✓ Create quick-reference versions
20
- - ✓ Document requirements, architecture, and business impact
21
-
22
- **DO NOT IMPLEMENT. DO NOT IMPLEMENT. DO NOT IMPLEMENT.**
23
- - ✗ DO NOT write application code
24
- - ✗ DO NOT implement the features described in the PRD
25
- - ✗ DO NOT generate components/functions
26
-
27
- **You are creating the PRD that describes what to build, not building it.**
28
-
29
- For complete mode documentation, see: `.clavix/instructions/core/clavix-mode.md`
30
-
31
- ---
32
-
33
- ## What is Clavix Planning Mode?
34
-
35
- Clavix Planning Mode guides you through strategic questions to transform vague ideas into structured, comprehensive PRDs. The generated documents are:
36
- - **Full PRD**: Comprehensive team-facing document
37
- - **Quick PRD**: AI-optimized 2-3 paragraph version
38
-
39
- Both documents are automatically validated for quality (Clarity, Structure, Completeness) to ensure they're ready for AI consumption.
40
-
41
- ## Instructions
42
-
43
- 1. Guide the user through these strategic questions, **one at a time** with validation:
44
-
45
- **Question 1**: What are we building and why? (Problem + goal in 2-3 sentences)
46
-
47
- - **Validation**: Must have both problem AND goal stated clearly
48
- - **If vague/short** (e.g., "a dashboard"): Ask probing questions:
49
- - "What specific problem does this dashboard solve?"
50
- - "Who will use this and what decisions will they make with it?"
51
- - "What happens if this doesn't exist?"
52
- - **If "I don't know"**: Ask:
53
- - "What triggered the need for this?"
54
- - "Can you describe the current pain point or opportunity?"
55
- - **Good answer example**: "Sales managers can't quickly identify at-risk deals in our 10K+ deal pipeline. Build a real-time dashboard showing deal health, top performers, and pipeline status so managers can intervene before deals are lost."
56
-
57
- **Question 2**: What are the must-have core features? (List 3-5 critical features)
58
-
59
- - **Validation**: At least 2 concrete features provided
60
- - **If vague** (e.g., "user management"): Probe deeper:
61
- - "What specific user management capabilities? (registration, roles, permissions, profile management?)"
62
- - "Which feature would you build first if you could only build one?"
63
- - **If too many** (7+ features): Help prioritize:
64
- - "If you had to launch with only 3 features, which would they be?"
65
- - "Which features are launch-blockers vs nice-to-have?"
66
- - **If "I don't know"**: Ask:
67
- - "Walk me through how someone would use this - what would they do first?"
68
- - "What's the core value this provides?"
69
-
70
- **Question 3**: Tech stack and requirements? (Technologies, integrations, constraints)
71
-
72
- - **Optional**: Can skip if extending existing project
73
- - **If vague** (e.g., "modern stack"): Probe:
74
- - "What technologies are already in use that this must integrate with?"
75
- - "Any specific frameworks or languages your team prefers?"
76
- - "Are there performance requirements (load time, concurrent users)?"
77
- - **If "I don't know"**: Suggest common stacks based on project type or skip
78
-
79
- **Question 4**: What is explicitly OUT of scope? (What are we NOT building?)
80
-
81
- - **Validation**: At least 1 explicit exclusion
82
- - **Why important**: Prevents scope creep and clarifies boundaries
83
- - **If stuck**: Suggest common exclusions:
84
- - "Are we building admin dashboards? Mobile apps? API integrations?"
85
- - "Are we handling payments? User authentication? Email notifications?"
86
- - **If "I don't know"**: Provide project-specific prompts based on previous answers
87
-
88
- **Question 5**: Any additional context or requirements?
89
-
90
- - **Optional**: Press Enter to skip
91
- - **Helpful areas**: Compliance needs, accessibility, localization, deadlines, team constraints
92
-
93
- 2. **Before proceeding to document generation**, verify minimum viable answers:
94
- - Q1: Both problem AND goal stated
95
- - Q2: At least 2 concrete features
96
- - Q4: At least 1 explicit scope exclusion
97
- - If missing critical info, ask targeted follow-ups
98
-
99
- 3. After collecting and validating all answers, generate TWO documents:
100
-
101
- **Full PRD** (comprehensive):
102
- ```markdown
103
- # Product Requirements Document: [Project Name]
104
-
105
- ## Problem & Goal
106
- [User's answer to Q1]
107
-
108
- ## Requirements
109
- ### Must-Have Features
110
- [User's answer to Q2, expanded with details]
111
-
112
- ### Technical Requirements
113
- [User's answer to Q3, detailed]
114
-
115
- ## Out of Scope
116
- [User's answer to Q4]
117
-
118
- ## Additional Context
119
- [User's answer to Q5 if provided]
120
- ```
121
-
122
- **Quick PRD** (2-3 paragraphs, AI-optimized):
123
- ```markdown
124
- [Concise summary combining problem, goal, and must-have features from Q1+Q2]
125
-
126
- [Technical requirements and constraints from Q3]
127
-
128
- [Out of scope and additional context from Q4+Q5]
129
- ```
130
-
131
- 3. **Save both documents** using the file-saving protocol below
132
-
133
- 4. **Quality Validation** (automatic):
134
- - After PRD generation, the quick-prd.md is analyzed for AI consumption quality
135
- - Assesses Clarity, Structure, and Completeness
136
- - Displays quality scores and improvement suggestions
137
- - Focus is on making PRDs actionable for AI agents
138
-
139
- 5. Display file paths, validation results, and suggest next steps.
140
-
141
- ## File-Saving Protocol (For AI Agents)
142
-
143
- **As an AI agent, follow these exact steps to save PRD files:**
144
-
145
- ### Step 1: Determine Project Name
146
- - **From user input**: Use project name mentioned during Q&A
147
- - **If not specified**: Derive from problem/goal (sanitize: lowercase, spaces→hyphens, remove special chars)
148
- - **Example**: "Sales Manager Dashboard" → `sales-manager-dashboard`
149
-
150
- ### Step 2: Create Output Directory
151
- ```bash
152
- mkdir -p .clavix/outputs/{sanitized-project-name}
153
- ```
154
-
155
- **Handle errors**:
156
- - If directory creation fails: Check write permissions
157
- - If `.clavix/` doesn't exist: Create it first: `mkdir -p .clavix/outputs/{project}`
158
-
159
- ### Step 3: Save Full PRD
160
- **File path**: `.clavix/outputs/{project-name}/full-prd.md`
161
-
162
- **Content structure**:
163
- ```markdown
164
- # Product Requirements Document: {Project Name}
165
-
166
- ## Problem & Goal
167
- {User's Q1 answer - problem and goal}
168
-
169
- ## Requirements
170
- ### Must-Have Features
171
- {User's Q2 answer - expanded with details from conversation}
172
-
173
- ### Technical Requirements
174
- {User's Q3 answer - tech stack, integrations, constraints}
175
-
176
- ## Out of Scope
177
- {User's Q4 answer - explicit exclusions}
178
-
179
- ## Additional Context
180
- {User's Q5 answer if provided, or omit section}
181
-
182
- ---
183
-
184
- *Generated with Clavix Planning Mode*
185
- *Generated: {ISO timestamp}*
186
- ```
187
-
188
- ### Step 4: Save Quick PRD
189
- **File path**: `.clavix/outputs/{project-name}/quick-prd.md`
190
-
191
- **Content structure** (2-3 paragraphs, AI-optimized):
192
- ```markdown
193
- # {Project Name} - Quick PRD
194
-
195
- {Paragraph 1: Combine problem + goal + must-have features from Q1+Q2}
196
-
197
- {Paragraph 2: Technical requirements and constraints from Q3}
198
-
199
- {Paragraph 3: Out of scope and additional context from Q4+Q5}
200
-
201
- ---
202
-
203
- *Generated with Clavix Planning Mode*
204
- *Generated: {ISO timestamp}*
205
- ```
206
-
207
- ### Step 5: Verify Files Were Created
208
- ```bash
209
- ls .clavix/outputs/{project-name}/
210
- ```
211
-
212
- **Expected output**:
213
- - `full-prd.md`
214
- - `quick-prd.md`
215
-
216
- ### Step 6: Communicate Success
217
- Display to user:
218
- ```
219
- ✓ PRD generated successfully!
220
-
221
- Files saved:
222
- • Full PRD: .clavix/outputs/{project-name}/full-prd.md
223
- • Quick PRD: .clavix/outputs/{project-name}/quick-prd.md
224
-
225
- Quality Assessment:
226
- Clarity: {score}% - {feedback}
227
- Structure: {score}% - {feedback}
228
- Completeness: {score}% - {feedback}
229
- Overall: {score}%
230
-
231
- Next steps:
232
- • Review and edit PRD files if needed
233
- • Run /clavix:plan to generate implementation tasks
234
- ```
235
-
236
- ### Error Handling
237
-
238
- **If file write fails**:
239
- 1. Check error message
240
- 2. Common issues:
241
- - Permission denied: Inform user to check directory permissions
242
- - Disk full: Inform user about disk space
243
- - Path too long: Suggest shorter project name
244
- 3. Do NOT proceed to next steps without successful file save
245
-
246
- **If directory already exists**:
247
- - This is OK - proceed with writing files
248
- - Existing files will be overwritten (user initiated PRD generation)
249
- - If unsure: Ask user "Project `{name}` already exists. Overwrite PRD files?"
250
-
251
- ## Quality Validation
252
-
253
- **What gets validated:**
254
- - **Clarity**: Is the PRD clear and unambiguous for AI agents?
255
- - **Structure**: Does information flow logically (context → requirements → constraints)?
256
- - **Completeness**: Are all necessary specifications provided?
257
-
258
- The validation ensures generated PRDs are immediately usable for AI consumption without back-and-forth clarifications.
259
-
260
- ## Workflow Navigation
261
-
262
- **You are here:** Clavix Planning Mode (Strategic Planning)
263
-
264
- **Common workflows:**
265
- - **Full planning workflow**: `/clavix:prd` → `/clavix:plan` → `/clavix:implement` → `/clavix:archive`
266
- - **From deep mode**: `/clavix:deep` → (strategic scope detected) → `/clavix:prd`
267
- - **Quick to strategic**: `/clavix:fast` → (realizes complexity) → `/clavix:prd`
268
-
269
- **Related commands:**
270
- - `/clavix:plan` - Generate task breakdown from PRD (next step)
271
- - `/clavix:implement` - Execute tasks (after plan)
272
- - `/clavix:summarize` - Alternative: Extract PRD from conversation instead of Q&A
273
-
274
- ## Tips
275
-
276
- - Ask follow-up questions if answers are too vague
277
- - Help users think through edge cases
278
- - Keep the process conversational and supportive
279
- - Generated PRDs are automatically validated for optimal AI consumption
280
- - Clavix Planning Mode is designed for strategic features, not simple prompts
281
-
282
- ## Troubleshooting
283
-
284
- ### Issue: User's answers to Q1 are too vague ("make an app")
285
- **Cause**: User hasn't thought through the problem/goal deeply enough
286
- **Solution** (inline):
287
- - Stop and ask probing questions before proceeding
288
- - "What specific problem does this app solve?"
289
- - "Who will use this and what pain point does it address?"
290
- - Don't proceed until both problem AND goal are clear
291
-
292
- ### Issue: User lists 10+ features in Q2
293
- **Cause**: Unclear priorities or scope creep
294
- **Solution** (inline):
295
- - Help prioritize: "If you could only launch with 3 features, which would they be?"
296
- - Separate must-have from nice-to-have
297
- - Document extras in "Additional Context" or "Out of scope"
298
-
299
- ### Issue: User says "I don't know" to critical questions
300
- **Cause**: Genuine uncertainty or needs exploration
301
- **Solution**:
302
- - For Q1: Ask about what triggered the need, current pain points
303
- - For Q2: Walk through user journey step-by-step
304
- - For Q4: Suggest common exclusions based on project type
305
- - Consider suggesting `/clavix:start` for conversational exploration first
306
-
307
- ### Issue: Quality validation shows low scores after generation
308
- **Cause**: Answers were too vague or incomplete
309
- **Solution**:
310
- - Review the generated PRD
311
- - Identify specific gaps (missing context, vague requirements)
312
- - Ask targeted follow-up questions
313
- - Regenerate PRD with enhanced answers
314
-
315
- ### Issue: Generated PRD doesn't match user's vision
316
- **Cause**: Miscommunication during Q&A or assumptions made
317
- **Solution**:
318
- - Review each section with user
319
- - Ask "What's missing or inaccurate?"
320
- - Update PRD manually or regenerate with corrected answers
@@ -1,97 +0,0 @@
1
- ---
2
- name: "Clavix: Prompts"
3
- description: Manage saved prompts (list, clear, inspect)
4
- ---
5
-
6
- # Clavix: Prompts Management
7
-
8
- Manage your saved fast/deep prompts with lifecycle awareness.
9
-
10
- ## List All Prompts
11
-
12
- ```bash
13
- clavix prompts list
14
- ```
15
-
16
- Shows:
17
- - All saved prompts with age
18
- - Execution status (executed ✓ / pending ○)
19
- - Age warnings (OLD >7d, STALE >30d)
20
- - Storage statistics
21
-
22
- ## Cleanup Workflows
23
-
24
- **After executing prompts (recommended):**
25
- ```bash
26
- clavix prompts clear --executed
27
- ```
28
-
29
- **Remove stale prompts (>30 days):**
30
- ```bash
31
- clavix prompts clear --stale
32
- ```
33
-
34
- **Remove specific type:**
35
- ```bash
36
- clavix prompts clear --fast
37
- clavix prompts clear --deep
38
- ```
39
-
40
- **Interactive cleanup:**
41
- ```bash
42
- clavix prompts clear
43
- ```
44
-
45
- **Remove all (with safety checks):**
46
- ```bash
47
- clavix prompts clear --all
48
- ```
49
-
50
- ## Best Practices
51
-
52
- **Regular cleanup schedule:**
53
- 1. After executing prompts: Clear executed
54
- 2. Weekly: Review and clear stale
55
- 3. Before archiving PRD: Clear related prompts
56
-
57
- **Storage hygiene:**
58
- - Keep <20 active prompts for performance
59
- - Clear executed prompts regularly
60
- - Review prompts >7 days old
61
-
62
- **Safety:**
63
- - System warns before deleting unexecuted prompts
64
- - Interactive mode shows what will be deleted
65
- - Prompts are in `.clavix/outputs/prompts/` for manual recovery
66
-
67
- ## Prompt Lifecycle
68
-
69
- ```
70
- CREATE → /clavix:fast or /clavix:deep
71
- REVIEW → /clavix:prompts (you are here)
72
- EXECUTE → /clavix:execute
73
- CLEANUP → /clavix:prompts clear
74
- ```
75
-
76
- ## Common Workflows
77
-
78
- **Quick execute (no review):**
79
- ```bash
80
- /clavix:fast "task"
81
- /clavix:execute --latest
82
- ```
83
-
84
- **Review before executing:**
85
- ```bash
86
- /clavix:fast "task"
87
- /clavix:prompts # Review
88
- /clavix:execute # Select interactively
89
- /clavix:prompts clear --executed
90
- ```
91
-
92
- **Batch cleanup:**
93
- ```bash
94
- /clavix:prompts # See stats
95
- clavix prompts clear --executed
96
- clavix prompts clear --stale
97
- ```
@@ -1,204 +0,0 @@
1
- ---
2
- name: "Clavix: Start"
3
- description: Start conversational mode for iterative prompt development
4
- ---
5
-
6
- # Clavix Conversational Mode
7
-
8
- You are starting a Clavix conversational session for iterative prompt and requirements development. **When complete, use `/clavix:summarize` to extract and optimize requirements** using Clavix Intelligence™.
9
-
10
- ---
11
-
12
- ## CLAVIX MODE: Requirements & Planning Only
13
-
14
- **You are in Clavix prompt/PRD development mode. You help create planning documents, NOT implement features.**
15
-
16
- **YOUR ROLE:**
17
- - ✓ Ask questions about requirements
18
- - ✓ Help users refine and clarify their ideas
19
- - ✓ Track requirements and constraints
20
- - ✓ Guide toward clear specifications
21
-
22
- **DO NOT IMPLEMENT. DO NOT IMPLEMENT. DO NOT IMPLEMENT.**
23
- - ✗ DO NOT write application code
24
- - ✗ DO NOT implement the feature being discussed
25
- - ✗ DO NOT generate component/function implementations
26
- - ✗ DO NOT start building the actual feature
27
-
28
- **ONLY implement if user explicitly says: "Now implement this" or "Build the feature"**
29
-
30
- **If unsure, ASK:** "Should I implement this now, or continue gathering requirements?"
31
-
32
- For complete mode documentation, see: `.clavix/instructions/core/clavix-mode.md`
33
-
34
- ---
35
-
36
- ## Instructions
37
-
38
- 1. Begin with a friendly introduction:
39
- ```
40
- I'm starting Clavix conversational mode for requirements gathering.
41
-
42
- Tell me about what you want to create, and I'll ask clarifying questions to help refine your ideas.
43
- When we're ready, use /clavix:summarize to extract structured requirements from our conversation.
44
-
45
- Note: I'm in planning mode - I'll help you define what to build, not implement it yet.
46
-
47
- What would you like to create?
48
- ```
49
-
50
- **CHECKPOINT:** Entered conversational mode (gathering requirements only)
51
-
52
- 2. As the user describes their needs:
53
- - Ask clarifying questions about unclear points
54
- - Probe for technical constraints
55
- - Explore edge cases and requirements
56
- - Help them think through user needs
57
- - Identify potential challenges
58
-
59
- **REMEMBER: YOU ARE GATHERING REQUIREMENTS, NOT IMPLEMENTING**
60
-
61
- **DO NOT WRITE CODE. DO NOT START IMPLEMENTATION.**
62
-
63
- If you catch yourself generating implementation code, STOP IMMEDIATELY and return to asking questions.
64
-
65
- **CHECKPOINT:** Asked [N] clarifying questions about [topic]
66
-
67
- 3. **Track conversation topics and manage complexity**:
68
-
69
- **Key points to track:**
70
- - Problem statement
71
- - Target users
72
- - Core features
73
- - Technical requirements
74
- - Success criteria
75
- - Constraints and scope
76
-
77
- **Multi-topic detection** (track distinct topics being discussed):
78
- - Consider topics distinct if they address different problems/features/user needs
79
- - Examples: "dashboard for sales" + "API for integrations" + "mobile app" = 3 topics
80
-
81
- **When 3+ distinct topics detected**:
82
- Auto-suggest focusing: "I notice we're discussing multiple distinct areas: [Topic A: summary], [Topic B: summary], and [Topic C: summary]. To ensure we develop clear requirements for each, would you like to:
83
- - **Focus on one** - Pick the most important topic to explore thoroughly first
84
- - **Continue multi-topic** - We'll track all of them, but the resulting prompt may need refinement
85
- - **Create separate sessions** - Start fresh for each topic with dedicated focus"
86
-
87
- **Complexity indicators** (suggest wrapping up/summarizing):
88
- - Conversation > 15 exchanges
89
- - Requirements for 5+ major features discussed
90
- - Multiple technology stacks mentioned
91
- - Significant scope changes or pivots occurred
92
-
93
- When complexity threshold reached: "We've covered substantial ground. Would you like to:
94
- - Continue exploring
95
- - Use `/clavix:summarize` to extract what we have so far
96
- - Switch to `/clavix:prd` for more structured planning"
97
-
98
- **CHECKPOINT:** Complexity threshold reached - suggesting summarization
99
-
100
- 4. Be conversational and supportive:
101
- - Don't interrogate - have a natural discussion
102
- - Build on their ideas
103
- - Offer suggestions when helpful
104
- - Validate their thinking
105
-
106
- **But DO NOT implement** - stay in requirements gathering mode.
107
-
108
- 5. Remind them to use `/clavix:summarize` when ready to extract an optimized prompt.
109
-
110
- When user triggers summarization, acknowledge the transition:
111
- ```
112
- **CHECKPOINT:** Transitioning to summarization workflow
113
-
114
- I'll now analyze our entire conversation and extract structured requirements.
115
- ```
116
-
117
- Then proceed to the summarization workflow (see `.clavix/instructions/workflows/summarize.md`).
118
-
119
- ## How Summarization Works
120
-
121
- After the conversational session, `/clavix:summarize` will:
122
- - Extract requirements from the conversation
123
- - Apply Clavix Intelligence™ optimization
124
- - Analyze intent and assess quality (Clarity, Efficiency, Structure, Completeness, Actionability)
125
- - Generate both original extraction and optimized version
126
- - Display quality scores and improvements
127
- - Save `optimized-prompt.md` for optimal AI consumption
128
-
129
- ## Example Flow
130
-
131
- **User**: "I need a dashboard for analytics"
132
-
133
- **Assistant**: "Great! What kind of analytics are we talking about? Is this for business metrics, user behavior, system performance, or something else?"
134
-
135
- **User**: "Business metrics - sales, revenue, customer growth"
136
-
137
- **Assistant**: "Perfect. Who will be using this dashboard? Executives, sales team, analysts? Their needs might be quite different."
138
-
139
- [Continue conversational refinement...]
140
-
141
- ## Workflow Navigation
142
-
143
- **You are here:** Conversational Mode (Iterative Exploration)
144
-
145
- **Common workflows:**
146
- - **Exploration to prompt**: `/clavix:start` → [conversation] → `/clavix:summarize` → Optimized prompt
147
- - **Exploration to PRD**: `/clavix:start` → [conversation] → `/clavix:prd` (answer questions with discussed info)
148
- - **Exploration to planning**: `/clavix:start` → `/clavix:summarize` → `/clavix:plan` → Implement
149
-
150
- **Related commands:**
151
- - `/clavix:summarize` - Extract and optimize conversation (typical next step)
152
- - `/clavix:prd` - Switch to Clavix Planning Mode for structured PRD generation
153
- - `/clavix:fast` or `/clavix:deep` - Direct prompt improvement instead of conversation
154
-
155
- ## Note
156
-
157
- The goal is natural exploration of requirements, not a rigid questionnaire. Follow the user's lead while gently guiding toward clarity.
158
-
159
- ## Troubleshooting
160
-
161
- ### Issue: Agent jumps to implementation instead of gathering requirements
162
- **Cause**: Didn't see or follow CLAVIX MODE boundary
163
- **Solution**:
164
- - STOP generating code immediately
165
- - Apologize: "I was jumping to implementation. Let me return to requirements gathering."
166
- - Return to asking clarifying questions
167
- - See: `.clavix/instructions/troubleshooting/jumped-to-implementation.md`
168
-
169
- ### Issue: Conversation going in circles without progress
170
- **Cause**: Unclear focus or too many topics being explored
171
- **Solution** (inline):
172
- - Pause and summarize: "So far we've discussed [A], [B], [C]. Which should we focus on?"
173
- - Suggest focusing on one topic at a time
174
- - Or suggest `/clavix:summarize` to extract what's been discussed
175
-
176
- ### Issue: User provides very high-level descriptions ("build something cool")
177
- **Cause**: User hasn't crystallized their ideas yet
178
- **Solution**:
179
- - Ask open-ended questions: "What made you think of this?"
180
- - Probe for use cases: "Walk me through how someone would use this"
181
- - Be patient - this mode is for exploration
182
- - Multiple exchanges are normal and expected
183
-
184
- ### Issue: Detecting 3+ distinct topics but user keeps adding more
185
- **Cause**: Brainstorming mode or unclear priorities
186
- **Solution** (inline):
187
- - Interrupt after 3+ topics detected (per multi-topic protocol)
188
- - Strongly suggest focusing on one topic
189
- - Alternative: Document all topics and help prioritize
190
- - Consider suggesting `/clavix:prd` for each topic separately
191
-
192
- ### Issue: Conversation exceeds 20 exchanges without clarity
193
- **Cause**: Too exploratory without convergence
194
- **Solution**:
195
- - Suggest wrapping up: "We've covered a lot. Ready to `/clavix:summarize`?"
196
- - Or pivot to `/clavix:prd` for structured planning
197
- - Or focus conversation: "Let's nail down the core problem first"
198
-
199
- ### Issue: User wants to switch topics mid-conversation
200
- **Cause**: New idea occurred or original topic wasn't right
201
- **Solution**:
202
- - Note what was discussed so far
203
- - Ask: "Should we continue with [original topic] or switch to [new topic]?"
204
- - Suggest summarizing current topic first before switching