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,395 +0,0 @@
1
- ---
2
- name: "Clavix: Summarize"
3
- description: Extract and optimize requirements from conversation
4
- ---
5
-
6
- # Clavix Conversation Summarization
7
-
8
- You are analyzing the conversation history and extracting optimized requirements. **Extracted prompts are automatically enhanced using Clavix Intelligence™** for optimal AI consumption.
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
- - ✓ Analyze conversations and extract requirements
18
- - ✓ Generate mini-PRDs
19
- - ✓ Create optimized prompts
20
- - ✓ Structure and document requirements
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
-
27
- **This workflow creates PLANNING DOCUMENTS, not implementations.**
28
-
29
- For complete mode documentation, see: `.clavix/instructions/core/clavix-mode.md`
30
-
31
- ---
32
-
33
- ## Instructions
34
-
35
- 1. **Pre-Extraction Validation** - Check conversation completeness:
36
-
37
- **CHECKPOINT:** Pre-extraction validation started
38
-
39
- **Minimum viable requirements:**
40
- - **Objective/Goal**: Is there a clear problem or goal stated?
41
- - **Requirements**: Are there at least 2-3 concrete features or capabilities described?
42
- - **Context**: Is there enough context about who/what/why?
43
-
44
- **If missing critical elements:**
45
- - Identify what's missing (e.g., "No clear objective", "Requirements too vague")
46
- - Ask targeted questions to fill gaps:
47
- - Missing objective: "What problem are you trying to solve?"
48
- - Vague requirements: "Can you describe 2-3 specific things this should do?"
49
- - No context: "Who will use this and in what situation?"
50
- - **DO NOT** proceed to extraction until minimum viable requirements met
51
-
52
- **If requirements are present:**
53
- ```
54
- **CHECKPOINT:** Pre-extraction validation passed - minimum requirements present
55
-
56
- I'll now analyze our conversation and extract structured requirements.
57
- ```
58
-
59
- **Confidence indicators** (annotate extracted elements):
60
- - **[HIGH]**: Explicitly stated multiple times with details
61
- - **[MEDIUM]**: Mentioned once or inferred from context
62
- - **[LOW]**: Assumed based on limited information
63
-
64
- 2. **Extract Requirements** - Review the entire conversation and identify (with confidence indicators):
65
- - **Problem/Goal** [confidence]: What is the user trying to build or solve?
66
- - **Key Requirements** [confidence per requirement]: What features and functionality were discussed?
67
- - **Technical Constraints** [confidence]: Any technologies, integrations, or performance needs?
68
- - **User Needs** [confidence]: Who are the end users and what do they need?
69
- - **Success Criteria** [confidence]: How will success be measured?
70
- - **Context** [confidence]: Any important background or constraints?
71
-
72
- **CHECKPOINT:** Extracted [N] requirements, [M] constraints from conversation
73
-
74
- 3. **CREATE OUTPUT FILES (REQUIRED)** - You MUST create three files. This is not optional.
75
-
76
- **Step 3.1: Create directory structure**
77
- ```bash
78
- mkdir -p .clavix/outputs/[project-name]
79
- ```
80
- Use a meaningful project name based on the conversation (e.g., "todo-app", "auth-system", "dashboard").
81
-
82
- **Step 3.2: Write mini-prd.md**
83
-
84
- Use the Write tool to create `.clavix/outputs/[project-name]/mini-prd.md` with this content:
85
-
86
- **Mini-PRD template:**
87
- ```markdown
88
- # Requirements: [Project Name]
89
-
90
- *Generated from conversation on [date]*
91
-
92
- ## Objective
93
- [Clear, specific goal extracted from conversation]
94
-
95
- ## Core Requirements
96
-
97
- ### Must Have (High Priority)
98
- - [HIGH] Requirement 1 with specific details
99
- - [HIGH] Requirement 2 with specific details
100
-
101
- ### Should Have (Medium Priority)
102
- - [MEDIUM] Requirement 3
103
- - [MEDIUM] Requirement 4
104
-
105
- ### Could Have (Low Priority / Inferred)
106
- - [LOW] Requirement 5
107
-
108
- ## Technical Constraints
109
- - **Framework/Stack:** [If specified]
110
- - **Performance:** [Any performance requirements]
111
- - **Scale:** [Expected load/users]
112
- - **Integrations:** [External systems]
113
- - **Other:** [Any other technical constraints]
114
-
115
- ## User Context
116
- **Target Users:** [Who will use this?]
117
- **Primary Use Case:** [Main problem being solved]
118
- **User Flow:** [High-level description]
119
-
120
- ## Edge Cases & Considerations
121
- - [Edge case 1 and how it should be handled]
122
- - [Open question 1 - needs clarification]
123
-
124
- ## Success Criteria
125
- How we know this is complete and working:
126
- - ✓ [Specific success criterion 1]
127
- - ✓ [Specific success criterion 2]
128
-
129
- ## Next Steps
130
- 1. Review this PRD for accuracy and completeness
131
- 2. If anything is missing or unclear, continue the conversation
132
- 3. When ready, use the optimized prompt for implementation
133
-
134
- ---
135
- *This PRD was generated by Clavix from conversational requirements gathering.*
136
- ```
137
-
138
- **CHECKPOINT:** Created mini-prd.md successfully
139
-
140
- **Step 3.3: Write original-prompt.md**
141
-
142
- Use the Write tool to create `.clavix/outputs/[project-name]/original-prompt.md`
143
-
144
- **Content:** Raw extraction in paragraph form (2-4 paragraphs describing what to build)
145
-
146
- This is the UNOPTIMIZED version - direct extraction from conversation without enhancements.
147
-
148
- **Format:**
149
- ```markdown
150
- # Original Prompt (Extracted from Conversation)
151
-
152
- [Paragraph 1: Project objective and core functionality]
153
-
154
- [Paragraph 2: Key features and requirements]
155
-
156
- [Paragraph 3: Technical constraints and context]
157
-
158
- [Paragraph 4: Success criteria and additional considerations]
159
-
160
- ---
161
- *Extracted by Clavix on [date]. See optimized-prompt.md for enhanced version.*
162
- ```
163
-
164
- **CHECKPOINT:** Created original-prompt.md successfully
165
-
166
- **Step 3.4: Write optimized-prompt.md**
167
-
168
- Use the Write tool to create `.clavix/outputs/[project-name]/optimized-prompt.md`
169
-
170
- **Content:** Enhanced version with Clavix Intelligence™ improvements (see step 4 below for optimization)
171
-
172
- **Format:**
173
- ```markdown
174
- # Optimized Prompt (Clavix Enhanced)
175
-
176
- [Enhanced paragraph 1 with improvements applied]
177
-
178
- [Enhanced paragraph 2...]
179
-
180
- [Enhanced paragraph 3...]
181
-
182
- ---
183
-
184
- ## Clavix Intelligence™ Improvements Applied
185
-
186
- 1. **[ADDED]** - [Description of what was added and why]
187
- 2. **[CLARIFIED]** - [What was ambiguous and how it was clarified]
188
- 3. **[STRUCTURED]** - [How information was reorganized]
189
- 4. **[EXPANDED]** - [What detail was added]
190
- 5. **[SCOPED]** - [What boundaries were defined]
191
-
192
- ---
193
- *Optimized by Clavix on [date]. This version is ready for implementation.*
194
- ```
195
-
196
- **CHECKPOINT:** Created optimized-prompt.md successfully
197
-
198
- **Step 3.5: Verify file creation**
199
-
200
- List the created files to confirm they exist:
201
- ```
202
- Created files in .clavix/outputs/[project-name]/:
203
- ✓ mini-prd.md
204
- ✓ original-prompt.md
205
- ✓ optimized-prompt.md
206
- ```
207
-
208
- **CHECKPOINT:** All files created and verified successfully
209
-
210
- **If any file is missing:**
211
- - Something went wrong with file creation
212
- - See troubleshooting: `.clavix/instructions/troubleshooting/skipped-file-creation.md`
213
-
214
- 4. **Clavix Intelligence™ Optimization** (automatic with labeled improvements):
215
- - After extracting the prompt, analyze using Clavix Intelligence™
216
- - Apply optimizations for Clarity, Efficiency, Structure, Completeness, and Actionability
217
- - **Label all improvements** with quality dimension tags:
218
- - **[Efficiency]**: "Removed 12 conversational words, reduced from 45 to 28 words"
219
- - **[Structure]**: "Reorganized flow: context → requirements → constraints → success criteria"
220
- - **[Clarity]**: "Added explicit output format (React component), persona (senior dev)"
221
- - **[Completeness]**: "Added missing success metrics (load time < 2s, user adoption rate)"
222
- - **[Actionability]**: "Converted vague goals into specific, measurable requirements"
223
- - Display both raw extraction and optimized version
224
- - Show quality scores (before/after) and labeled improvements
225
- - These improvements were already applied when creating optimized-prompt.md in step 3.4
226
-
227
- **CHECKPOINT:** Applied Clavix Intelligence™ optimization - [N] improvements added
228
-
229
- 5. **Highlight Key Insights** discovered during the conversation:
230
- ```markdown
231
- ## Key Insights from Conversation
232
-
233
- 1. **[Insight category]**: [What was discovered]
234
- - Implication: [Why this matters for implementation]
235
-
236
- 2. **[Insight category]**: [What was discovered]
237
- - Implication: [Why this matters]
238
- ```
239
-
240
- 6. **Point Out Unclear Areas** - If anything is still unclear or missing:
241
- ```markdown
242
- ## Areas for Further Discussion
243
-
244
- The following points could use clarification:
245
-
246
- 1. **[Topic]**: [What's unclear and why it matters]
247
- - Suggested question: "[Specific question to ask]"
248
-
249
- If you'd like to clarify any of these, let's continue the conversation before implementation.
250
- ```
251
-
252
- 7. **Present Summary to User** - After all files are created and verified:
253
- ```markdown
254
- ## ✅ Requirements Extracted and Documented
255
-
256
- I've analyzed our conversation and created structured outputs:
257
-
258
- **📄 Files Created:**
259
- - **mini-prd.md** - Comprehensive requirements document with priorities
260
- - **original-prompt.md** - Raw extraction from our conversation
261
- - **optimized-prompt.md** - Enhanced version ready for implementation
262
-
263
- **📁 Location:** `.clavix/outputs/[project-name]/`
264
-
265
- **🎯 Clavix Intelligence™:**
266
- Applied [N] optimizations:
267
- - [Brief summary of improvements]
268
-
269
- **🔍 Key Insights:**
270
- - [Top 2-3 insights in one line each]
271
-
272
- **⚠️ Unclear Areas:**
273
- [If any, list briefly, otherwise omit this section]
274
-
275
- ---
276
-
277
- **Next Steps:**
278
- 1. Review the mini-PRD for accuracy
279
- 2. If anything needs adjustment, let me know and we can refine
280
- 3. When ready for implementation, use the optimized prompt as your specification
281
-
282
- Would you like me to clarify or expand on anything?
283
- ```
284
-
285
- **CHECKPOINT:** Summarization workflow complete - all outputs created
286
-
287
- ## Quality Enhancement
288
-
289
- **What gets optimized:**
290
- - **Clarity**: Remove ambiguity from extracted requirements
291
- - **Efficiency**: Remove verbosity and conversational fluff
292
- - **Structure**: Ensure logical flow (context → requirements → constraints → output)
293
- - **Completeness**: Add missing specifications, formats, success criteria
294
- - **Actionability**: Make requirements specific and executable
295
-
296
- **Output files:**
297
- - `original-prompt.md` - Raw extraction from conversation
298
- - `optimized-prompt.md` - Enhanced version (recommended for AI agents)
299
- - `mini-prd.md` - Structured requirements document
300
-
301
- ## Quality Checks
302
-
303
- - Clear objective stated
304
- - Specific, actionable requirements
305
- - Technical constraints identified
306
- - Success criteria defined
307
- - User needs considered
308
- - Universal prompt intelligence applied for AI consumption
309
-
310
- ## Workflow Navigation
311
-
312
- **You are here:** Summarize (Conversation Extraction)
313
-
314
- **Common workflows:**
315
- - **Standard flow**: `/clavix:start` → [conversation] → `/clavix:summarize` → Use optimized prompt
316
- - **To implementation**: `/clavix:summarize` → `/clavix:plan` → `/clavix:implement` → `/clavix:archive`
317
- - **Standalone use**: [Any conversation] → `/clavix:summarize` → Extract and optimize
318
-
319
- **Related commands:**
320
- - `/clavix:start` - Begin conversational exploration (typical previous step)
321
- - `/clavix:plan` - Generate tasks from extracted mini-PRD (next step)
322
- - `/clavix:fast` or `/clavix:deep` - Further optimize the extracted prompt
323
-
324
- ## Example
325
-
326
- From conversation about "analytics dashboard for sales team"...
327
-
328
- **Original Extraction**:
329
- ```
330
- We discussed building a dashboard for the sales team that shows analytics. They want to see revenue trends and who's performing well. It should update in real-time and help managers spot problems. We talked about using React and connecting to Salesforce.
331
- ```
332
-
333
- **Optimized Prompt**:
334
- ```
335
- Build a real-time sales analytics dashboard for the sales team showing revenue trends, top performers, pipeline status, and conversion rates. The dashboard should update live as deals progress, support filtering by date range/region/rep, and display key metrics prominently. Users need to quickly identify at-risk deals and celebrate wins.
336
-
337
- Technical stack: React + TypeScript frontend, integrate with existing Salesforce API, use Chart.js for visualizations, responsive design for mobile access. Must handle 10K+ deals without performance degradation.
338
-
339
- Success: Sales managers can identify issues within 30 seconds of opening, dashboard loads in <2 seconds, 90% of team uses it daily within first month.
340
- ```
341
-
342
- **Improvements Applied**:
343
- - **[Efficiency]**: Removed 8 conversational phrases, increased information density
344
- - **[Structure]**: Organized into objective → requirements → technical → success
345
- - **[Clarity]**: Specified exact features (filtering, metrics display) instead of vague "shows analytics"
346
- - **[Completeness]**: Added performance requirements (10K+ deals, <2s load), success metrics (30s to identify issues, 90% adoption)
347
- - **[Actionability]**: Converted "help managers spot problems" into specific, measurable outcome
348
-
349
- ## Troubleshooting
350
-
351
- ### Issue: Files not created or verification fails
352
- **Cause**: Skipped file creation steps or Write tool not used
353
- **Solution**:
354
- - Review step 3 file creation instructions
355
- - Ensure each file has explicit Write tool step
356
- - Verify all files exist before continuing
357
- - See: `.clavix/instructions/troubleshooting/skipped-file-creation.md`
358
-
359
- ### Issue: Pre-extraction validation fails (missing objective/requirements)
360
- **Cause**: Conversation didn't cover enough detail
361
- **Solution** (inline - DO NOT extract):
362
- - List what's missing specifically
363
- - Ask targeted questions to fill gaps
364
- - Only proceed to extraction after minimum viable requirements met
365
- - Show confidence indicators for what WAS discussed
366
-
367
- ### Issue: Conversation covered multiple unrelated topics
368
- **Cause**: Exploratory discussion without focus
369
- **Solution**:
370
- - Ask user which topic to extract/focus on
371
- - Or extract all topics separately into different sections
372
- - Mark multi-topic extraction with [MULTI-TOPIC] indicator
373
- - Suggest breaking into separate PRDs for each topic
374
-
375
- ### Issue: Optimization doesn't significantly improve extracted prompt
376
- **Cause**: Conversation was already well-structured and detailed
377
- **Solution**:
378
- - Minor improvements are normal for good conversations
379
- - Show quality scores (should be high: >80%)
380
- - Still provide both versions but note that original extraction was already high quality
381
-
382
- ### Issue: Low confidence indicators across all extracted elements
383
- **Cause**: Conversation was too vague or high-level
384
- **Solution** (inline):
385
- - Don't just extract with [LOW] markers everywhere
386
- - Ask follow-up questions to increase confidence
387
- - Or inform user: "Our conversation was exploratory. I recommend `/clavix:start` to go deeper, or `/clavix:prd` for structured planning"
388
-
389
- ### Issue: Extracted prompt contradicts earlier conversation
390
- **Cause**: Requirements evolved during conversation
391
- **Solution**:
392
- - Use latest/final version of requirements
393
- - Note that requirements evolved
394
- - Ask user to confirm which version is correct
395
- - Suggest starting fresh with `/clavix:prd` if major contradictions exist