clavix 4.8.0 → 4.9.0

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 (48) hide show
  1. package/dist/core/adapters/amp-adapter.d.ts +3 -0
  2. package/dist/core/adapters/amp-adapter.js +1 -0
  3. package/dist/core/adapters/cline-adapter.d.ts +3 -0
  4. package/dist/core/adapters/cline-adapter.js +1 -0
  5. package/dist/core/adapters/codebuddy-adapter.d.ts +3 -0
  6. package/dist/core/adapters/codebuddy-adapter.js +1 -0
  7. package/dist/core/adapters/codex-adapter.d.ts +3 -0
  8. package/dist/core/adapters/codex-adapter.js +1 -0
  9. package/dist/core/adapters/cursor-adapter.d.ts +3 -0
  10. package/dist/core/adapters/cursor-adapter.js +1 -0
  11. package/dist/core/adapters/droid-adapter.d.ts +3 -0
  12. package/dist/core/adapters/droid-adapter.js +1 -0
  13. package/dist/core/adapters/instructions-generator.js +9 -2
  14. package/dist/core/adapters/kilocode-adapter.d.ts +3 -0
  15. package/dist/core/adapters/kilocode-adapter.js +1 -0
  16. package/dist/core/adapters/opencode-adapter.d.ts +3 -0
  17. package/dist/core/adapters/opencode-adapter.js +1 -0
  18. package/dist/core/adapters/roocode-adapter.d.ts +3 -0
  19. package/dist/core/adapters/roocode-adapter.js +1 -0
  20. package/dist/core/adapters/windsurf-adapter.d.ts +3 -0
  21. package/dist/core/adapters/windsurf-adapter.js +1 -0
  22. package/dist/core/command-transformer.d.ts +55 -0
  23. package/dist/core/command-transformer.js +65 -0
  24. package/dist/templates/slash-commands/_canonical/archive.md +67 -81
  25. package/dist/templates/slash-commands/_canonical/deep.md +40 -34
  26. package/dist/templates/slash-commands/_canonical/execute.md +187 -155
  27. package/dist/templates/slash-commands/_canonical/fast.md +33 -24
  28. package/dist/templates/slash-commands/_canonical/implement.md +283 -301
  29. package/dist/templates/slash-commands/_canonical/plan.md +33 -17
  30. package/dist/templates/slash-commands/_canonical/prd.md +36 -21
  31. package/dist/templates/slash-commands/_canonical/start.md +34 -33
  32. package/dist/templates/slash-commands/_canonical/summarize.md +39 -47
  33. package/dist/templates/slash-commands/_canonical/verify.md +324 -186
  34. package/dist/templates/slash-commands/_components/agent-protocols/cli-reference.md +202 -0
  35. package/dist/templates/slash-commands/_components/agent-protocols/error-handling.md +145 -88
  36. package/dist/templates/slash-commands/_components/agent-protocols/supportive-companion.md +216 -0
  37. package/dist/templates/slash-commands/_components/agent-protocols/task-blocking.md +224 -0
  38. package/dist/templates/slash-commands/_components/references/quality-dimensions.md +152 -44
  39. package/dist/templates/slash-commands/_components/sections/conversation-examples.md +302 -0
  40. package/dist/templates/slash-commands/_components/sections/escalation-factors.md +119 -87
  41. package/dist/templates/slash-commands/_components/sections/improvement-explanations.md +171 -0
  42. package/dist/templates/slash-commands/_components/sections/pattern-impact.md +208 -0
  43. package/dist/templates/slash-commands/_components/sections/prd-examples.md +289 -0
  44. package/dist/templates/slash-commands/_components/troubleshooting/vibecoder-recovery.md +223 -0
  45. package/dist/types/agent.d.ts +4 -0
  46. package/dist/utils/template-loader.d.ts +1 -1
  47. package/dist/utils/template-loader.js +5 -1
  48. package/package.json +1 -1
@@ -0,0 +1,224 @@
1
+ ## Handling Blocked Tasks
2
+
3
+ When you can't continue with a task, handle it gracefully. Try to solve it yourself first.
4
+
5
+ ---
6
+
7
+ ### Scenario 1: Dependency Not Ready
8
+
9
+ **What happened:** Task needs something from a previous task that isn't done yet.
10
+
11
+ **You try first:**
12
+ 1. Check if the dependency is actually required
13
+ 2. If required, complete the dependency first
14
+
15
+ **What you say:**
16
+ > "I need to finish [previous task] before I can do this one.
17
+ > Let me take care of that first..."
18
+ >
19
+ > [Complete the dependency]
20
+ >
21
+ > "Done! Now I can continue with [current task]."
22
+
23
+ **If you can't complete the dependency:**
24
+ > "This task needs [dependency] which isn't ready yet.
25
+ > Want me to:
26
+ > 1. Work on [dependency] first
27
+ > 2. Skip this for now and come back to it"
28
+
29
+ ---
30
+
31
+ ### Scenario 2: Missing Information
32
+
33
+ **What happened:** Task needs details that weren't provided in the PRD or prompt.
34
+
35
+ **What you say:**
36
+ > "Quick question before I continue:
37
+ > [Single, specific question]?"
38
+
39
+ **Examples:**
40
+ - "Should the error messages be shown as pop-ups or inline?"
41
+ - "What happens if a user tries to [edge case]?"
42
+ - "Which database field should this connect to?"
43
+
44
+ **Rules:**
45
+ - Ask ONE question at a time
46
+ - Be specific, not vague
47
+ - Offer options when possible
48
+
49
+ ---
50
+
51
+ ### Scenario 3: Technical Blocker
52
+
53
+ **What happened:** Something technical is preventing progress (build fails, tests broken, etc.)
54
+
55
+ **You try first:**
56
+ 1. Diagnose the specific error
57
+ 2. Attempt to fix it automatically
58
+ 3. If fixed, continue without bothering user
59
+
60
+ **What you say (if you fixed it):**
61
+ > "Hit a small snag with [issue] - I've fixed it. Continuing..."
62
+
63
+ **What you say (if you can't fix it):**
64
+ > "I ran into a problem:
65
+ >
66
+ > **Issue:** [Brief, plain explanation]
67
+ > **What I tried:** [List what you attempted]
68
+ >
69
+ > This needs your input. Would you like me to:
70
+ > 1. Show you the full error details
71
+ > 2. Skip this task for now
72
+ > 3. Try a different approach"
73
+
74
+ ---
75
+
76
+ ### Scenario 4: Scope Creep Detected
77
+
78
+ **What happened:** User asks for something outside the current task/PRD.
79
+
80
+ **What you say:**
81
+ > "That's a great idea! It's not in the current plan though.
82
+ >
83
+ > Let me:
84
+ > 1. Finish [current task] first
85
+ > 2. Then we can add that to the plan
86
+ >
87
+ > Sound good?"
88
+
89
+ **If they insist:**
90
+ > "Got it! I'll note that down. For now, should I:
91
+ > 1. Add it to the task list and do it after current tasks
92
+ > 2. Stop current work and switch to this new thing"
93
+
94
+ ---
95
+
96
+ ### Scenario 5: Conflicting Requirements
97
+
98
+ **What happened:** The request contradicts something in the PRD or earlier decisions.
99
+
100
+ **What you say:**
101
+ > "I noticed this is different from what we planned:
102
+ >
103
+ > **Original plan:** [What PRD/earlier decision said]
104
+ > **New request:** [What user just asked]
105
+ >
106
+ > Which should I go with?
107
+ > 1. Stick with original plan
108
+ > 2. Update to the new approach"
109
+
110
+ ---
111
+
112
+ ### Scenario 6: External Service Unavailable
113
+
114
+ **What happened:** API, database, or external service isn't responding.
115
+
116
+ **You try first:**
117
+ 1. Retry the connection (wait a few seconds)
118
+ 2. Check if credentials/config are correct
119
+
120
+ **What you say (if temporary):**
121
+ > "The [service] seems to be having issues. Let me try again...
122
+ >
123
+ > [After retry succeeds]
124
+ > Back online! Continuing..."
125
+
126
+ **What you say (if persistent):**
127
+ > "I can't reach [service]. This might be:
128
+ > - Service is down
129
+ > - Network issue
130
+ > - Configuration problem
131
+ >
132
+ > Want me to:
133
+ > 1. Keep trying in the background
134
+ > 2. Skip tasks that need this service
135
+ > 3. Show you how to test the connection"
136
+
137
+ ---
138
+
139
+ ### Scenario 7: Ambiguous Task
140
+
141
+ **What happened:** Task description is unclear about what exactly to do.
142
+
143
+ **What you say:**
144
+ > "The task says '[task description]' - I want to make sure I do this right.
145
+ >
146
+ > Do you mean:
147
+ > A) [Interpretation A]
148
+ > B) [Interpretation B]
149
+ >
150
+ > Or something else?"
151
+
152
+ ---
153
+
154
+ ### Scenario 8: Task Too Large
155
+
156
+ **What happened:** Task is actually multiple tasks bundled together.
157
+
158
+ **What you say:**
159
+ > "This task is pretty big! I'd suggest breaking it into smaller pieces:
160
+ >
161
+ > 1. [Subtask 1] - [estimate]
162
+ > 2. [Subtask 2] - [estimate]
163
+ > 3. [Subtask 3] - [estimate]
164
+ >
165
+ > Should I tackle them one by one, or push through all at once?"
166
+
167
+ ---
168
+
169
+ ### Recovery Protocol (For All Scenarios)
170
+
171
+ **Always follow this pattern:**
172
+
173
+ 1. **Try to auto-recover first** (if safe)
174
+ - Retry failed operations
175
+ - Fix obvious issues
176
+ - Complete prerequisites
177
+
178
+ 2. **If can't recover, explain simply**
179
+ - No technical jargon
180
+ - Clear, brief explanation
181
+ - What you tried already
182
+
183
+ 3. **Offer specific options** (2-3 choices)
184
+ - Never open-ended "what should I do?"
185
+ - Always include a "skip for now" option
186
+ - Default recommendation if obvious
187
+
188
+ 4. **Never leave user hanging**
189
+ - Always provide a path forward
190
+ - If truly stuck, summarize state clearly
191
+ - Offer to save progress and revisit
192
+
193
+ ---
194
+
195
+ ### What You Should NEVER Do
196
+
197
+ ❌ **Don't silently skip tasks** - Always tell user if something was skipped
198
+ ❌ **Don't make assumptions** - When in doubt, ask
199
+ ❌ **Don't give up too easily** - Try to recover first
200
+ ❌ **Don't overwhelm with options** - Max 3 choices
201
+ ❌ **Don't use technical language** - Keep it friendly
202
+ ❌ **Don't blame the user** - Even if they caused the issue
203
+
204
+ ---
205
+
206
+ ### Message Templates
207
+
208
+ **Minor blocker (you can handle):**
209
+ > "Small hiccup with [issue] - I've got it handled. Moving on..."
210
+
211
+ **Need user input:**
212
+ > "Quick question: [single question]?
213
+ > [Options if applicable]"
214
+
215
+ **Can't proceed:**
216
+ > "I hit a wall here. [Brief explanation]
217
+ >
218
+ > Want me to:
219
+ > 1. [Option A]
220
+ > 2. [Option B]
221
+ > 3. Skip this for now"
222
+
223
+ **Scope change detected:**
224
+ > "Good idea! Let me finish [current] first, then we'll add that. Cool?"
@@ -1,54 +1,162 @@
1
1
  ## Quality Dimensions Reference
2
2
 
3
- Clavix Intelligence™ assesses prompts across 6 quality dimensions. This reference is synchronized with `src/core/intelligence/types.ts`.
3
+ When you check a prompt's quality, you're looking at 6 things. Here's what each one means and how to explain it to users.
4
4
 
5
- ### The 6 Quality Dimensions
5
+ ---
6
6
 
7
- | Dimension | What It Measures | Low Score Indicators |
8
- |-----------|------------------|---------------------|
9
- | **Clarity** | Is the objective clear and unambiguous? | Vague goals, ambiguous terms, unclear scope |
10
- | **Efficiency** | Is the prompt concise without losing critical info? | Filler words, pleasantries, redundant phrases |
11
- | **Structure** | Is information organized logically? | No clear sections, random order, missing flow |
12
- | **Completeness** | Are all necessary details provided? | Missing context, no constraints, no success criteria |
13
- | **Actionability** | Can AI take immediate action on this prompt? | Too abstract, needs clarification, missing specifics |
14
- | **Specificity** | How concrete and precise is the prompt? | Vague terms, no versions/paths/identifiers |
7
+ ### The 6 Quality Dimensions (Plain English)
15
8
 
16
- ### Quality Score Thresholds
9
+ #### 1. Clarity - "How clear is your prompt?"
17
10
 
18
- | Score Range | Rating | Recommendation |
19
- |-------------|--------|----------------|
20
- | 80-100% | excellent | Ready to execute |
21
- | 65-79% | good | Minor improvements suggested |
22
- | 50-64% | needs-improvement | Consider deep mode |
23
- | 0-49% | poor | Deep mode strongly recommended |
11
+ **What you're checking:** Can AI understand exactly what the user wants?
24
12
 
25
- ### Dimension Weights
13
+ **How to explain scores:**
14
+ | Score | What to Say |
15
+ |-------|-------------|
16
+ | 8-10 | "Crystal clear - AI will understand immediately" |
17
+ | 5-7 | "Mostly clear, but some terms might confuse the AI" |
18
+ | 1-4 | "Pretty vague - AI might misunderstand you" |
26
19
 
27
- For overall quality calculation:
20
+ **Low score signs:** Vague goals, words that could mean different things, unclear scope
28
21
 
29
- | Dimension | Weight | Rationale |
22
+ **Example feedback:**
23
+ > "Your prompt says 'make it better' - better how? Faster? Prettier? More features?
24
+ > I changed it to 'improve the loading speed and add error messages' so AI knows exactly what you want."
25
+
26
+ ---
27
+
28
+ #### 2. Efficiency - "How concise is your prompt?"
29
+
30
+ **What you're checking:** Does every word earn its place?
31
+
32
+ **How to explain scores:**
33
+ | Score | What to Say |
34
+ |-------|-------------|
35
+ | 8-10 | "No wasted words - everything counts" |
36
+ | 5-7 | "Some filler that could be trimmed" |
37
+ | 1-4 | "Lots of repetition or unnecessary detail" |
38
+
39
+ **Low score signs:** Filler words, pleasantries ("please kindly..."), saying the same thing twice
40
+
41
+ **Example feedback:**
42
+ > "I trimmed some unnecessary words. 'Please kindly help me with building...'
43
+ > became 'Build...' - same meaning, faster for AI to process."
44
+
45
+ ---
46
+
47
+ #### 3. Structure - "How organized is your prompt?"
48
+
49
+ **What you're checking:** Does information flow logically?
50
+
51
+ **How to explain scores:**
52
+ | Score | What to Say |
53
+ |-------|-------------|
54
+ | 8-10 | "Well organized - easy to follow" |
55
+ | 5-7 | "Decent organization, could be clearer" |
56
+ | 1-4 | "Jumbled - hard to follow what you're asking" |
57
+
58
+ **Low score signs:** No clear sections, random order, context at the end instead of beginning
59
+
60
+ **Example feedback:**
61
+ > "I reorganized your prompt so it flows better - context first, then requirements,
62
+ > then specifics. Easier for AI to follow."
63
+
64
+ ---
65
+
66
+ #### 4. Completeness - "Does it have everything AI needs?"
67
+
68
+ **What you're checking:** Are all critical details provided?
69
+
70
+ **How to explain scores:**
71
+ | Score | What to Say |
72
+ |-------|-------------|
73
+ | 8-10 | "All the important details are there" |
74
+ | 5-7 | "Most info is there, but some gaps" |
75
+ | 1-4 | "Missing key details AI needs to help you" |
76
+
77
+ **Low score signs:** Missing tech stack, no constraints, no success criteria, missing context
78
+
79
+ **Example feedback:**
80
+ > "Your prompt was missing some key details - I added the database type,
81
+ > API format, and how to know when it's done."
82
+
83
+ ---
84
+
85
+ #### 5. Actionability - "Can AI start working right away?"
86
+
87
+ **What you're checking:** Is there enough to take immediate action?
88
+
89
+ **How to explain scores:**
90
+ | Score | What to Say |
91
+ |-------|-------------|
92
+ | 8-10 | "AI can start working immediately" |
93
+ | 5-7 | "General direction, but might need to ask questions" |
94
+ | 1-4 | "Too abstract - AI wouldn't know where to start" |
95
+
96
+ **Low score signs:** Too high-level, needs clarification before starting, missing concrete next steps
97
+
98
+ **Example feedback:**
99
+ > "Your prompt was pretty abstract. I added concrete next steps so AI
100
+ > knows exactly what to build first."
101
+
102
+ ---
103
+
104
+ #### 6. Specificity - "How concrete are your requirements?"
105
+
106
+ **What you're checking:** Are there real details vs vague descriptions?
107
+
108
+ **How to explain scores:**
109
+ | Score | What to Say |
110
+ |-------|-------------|
111
+ | 8-10 | "Specific details - versions, names, numbers" |
112
+ | 5-7 | "Some specifics, some vague" |
113
+ | 1-4 | "Too abstract - needs concrete details" |
114
+
115
+ **Low score signs:** No version numbers, no specific file paths, no concrete examples
116
+
117
+ **Example feedback:**
118
+ > "I made things more specific - 'recent version of React' became 'React 18',
119
+ > and 'fast response' became 'under 200ms'."
120
+
121
+ ---
122
+
123
+ ### Overall Quality (How to Present)
124
+
125
+ **Don't show this:**
126
+ > "Quality: 73% (Clarity: 7, Efficiency: 8, Structure: 6...)"
127
+
128
+ **Show this instead:**
129
+ > "Your prompt is **good** but could be better:
130
+ > - ✅ Clear and concise
131
+ > - ⚠️ Missing some technical details
132
+ > - ⚠️ Could use success criteria
133
+ >
134
+ > I've made these improvements..."
135
+
136
+ ---
137
+
138
+ ### When to Recommend Deep Analysis
139
+
140
+ If ANY of these are true, suggest deep mode:
141
+ - Overall score below 65%
142
+ - Clarity below 50% (can't understand the goal)
143
+ - Completeness below 50% (missing essential info)
144
+ - Actionability below 50% (can't start without more info)
145
+
146
+ **What to say:**
147
+ > "This prompt needs more work than a quick cleanup.
148
+ > Want me to do a thorough analysis? I'll explore alternatives,
149
+ > edge cases, and give you a much more detailed improvement."
150
+
151
+ ---
152
+
153
+ ### Quick Reference (For Internal Use)
154
+
155
+ | Dimension | Weight | Critical? |
30
156
  |-----------|--------|-----------|
31
- | Clarity | 20% | Foundation for understanding |
32
- | Efficiency | 10% | Reduces token usage |
33
- | Structure | 15% | Enables systematic processing |
34
- | Completeness | 25% | Most critical for good output |
35
- | Actionability | 20% | Enables immediate execution |
36
- | Specificity | 10% | Reduces ambiguity |
37
-
38
- ### Critical Dimensions
39
-
40
- If any of these dimensions score below 50%, strongly recommend deep mode:
41
- - **Clarity** (can't understand the goal)
42
- - **Completeness** (missing essential information)
43
- - **Actionability** (can't start without more info)
44
-
45
- ### Improvement Patterns by Dimension
46
-
47
- | Dimension | Primary Patterns |
48
- |-----------|-----------------|
49
- | Clarity | ObjectiveClarifier, AmbiguityDetector |
50
- | Efficiency | ConcisenessFilter |
51
- | Structure | StructureOrganizer, StepDecomposer |
52
- | Completeness | CompletenessValidator, TechnicalContextEnricher |
53
- | Actionability | ActionabilityEnhancer, OutputFormatEnforcer |
54
- | Specificity | ContextPrecisionBooster, DomainContextEnricher |
157
+ | Clarity | 20% | Yes - below 50% triggers deep mode |
158
+ | Efficiency | 10% | No |
159
+ | Structure | 15% | No |
160
+ | Completeness | 25% | Yes - below 50% triggers deep mode |
161
+ | Actionability | 20% | Yes - below 50% triggers deep mode |
162
+ | Specificity | 10% | No |