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.
- package/LICENSE +201 -21
- package/README.md +1 -1
- package/dist/cli/commands/deep.js +4 -58
- package/dist/cli/commands/init.js +13 -16
- package/dist/cli/commands/plan.js +2 -2
- package/dist/core/conversation-quality-tracker.d.ts +81 -0
- package/dist/core/conversation-quality-tracker.js +195 -0
- package/dist/core/intelligence/intent-detector.js +3 -0
- package/dist/core/intelligence/pattern-library.d.ts +18 -1
- package/dist/core/intelligence/pattern-library.js +131 -0
- package/dist/core/intelligence/patterns/conversation-summarizer.d.ts +25 -0
- package/dist/core/intelligence/patterns/conversation-summarizer.js +197 -0
- package/dist/core/intelligence/patterns/dependency-identifier.d.ts +21 -0
- package/dist/core/intelligence/patterns/dependency-identifier.js +149 -0
- package/dist/core/intelligence/patterns/implicit-requirement-extractor.d.ts +20 -0
- package/dist/core/intelligence/patterns/implicit-requirement-extractor.js +129 -0
- package/dist/core/intelligence/patterns/requirement-prioritizer.d.ts +22 -0
- package/dist/core/intelligence/patterns/requirement-prioritizer.js +117 -0
- package/dist/core/intelligence/patterns/success-metrics-enforcer.d.ts +22 -0
- package/dist/core/intelligence/patterns/success-metrics-enforcer.js +142 -0
- package/dist/core/intelligence/patterns/topic-coherence-analyzer.d.ts +22 -0
- package/dist/core/intelligence/patterns/topic-coherence-analyzer.js +140 -0
- package/dist/core/intelligence/patterns/user-persona-enricher.d.ts +22 -0
- package/dist/core/intelligence/patterns/user-persona-enricher.js +124 -0
- package/dist/core/intelligence/quality-assessor.js +2 -0
- package/dist/core/intelligence/types.d.ts +7 -2
- package/dist/core/intelligence/universal-optimizer.d.ts +27 -2
- package/dist/core/intelligence/universal-optimizer.js +65 -5
- package/dist/core/task-manager.d.ts +1 -2
- package/dist/core/task-manager.js +21 -26
- package/dist/templates/slash-commands/_canonical/deep.md +37 -69
- package/dist/templates/slash-commands/_canonical/fast.md +1 -0
- package/dist/templates/slash-commands/_components/sections/pattern-visibility.md +26 -2
- package/package.json +3 -3
- package/dist/templates/instructions/README 2.md +0 -311
- package/dist/templates/instructions/core 2/clavix-mode.md +0 -275
- package/dist/templates/instructions/core 2/file-operations.md +0 -330
- package/dist/templates/instructions/core 2/verification.md +0 -377
- package/dist/templates/instructions/troubleshooting 2/jumped-to-implementation.md +0 -234
- package/dist/templates/instructions/troubleshooting 2/mode-confusion.md +0 -402
- package/dist/templates/instructions/troubleshooting 2/skipped-file-creation.md +0 -385
- package/dist/templates/slash-commands/_canonical 2/archive.md +0 -410
- package/dist/templates/slash-commands/_canonical 2/deep.md +0 -512
- package/dist/templates/slash-commands/_canonical 2/execute.md +0 -80
- package/dist/templates/slash-commands/_canonical 2/fast.md +0 -370
- package/dist/templates/slash-commands/_canonical 2/implement.md +0 -364
- package/dist/templates/slash-commands/_canonical 2/plan.md +0 -329
- package/dist/templates/slash-commands/_canonical 2/prd.md +0 -320
- package/dist/templates/slash-commands/_canonical 2/prompts.md +0 -97
- package/dist/templates/slash-commands/_canonical 2/start.md +0 -204
- package/dist/templates/slash-commands/_canonical 2/summarize.md +0 -395
|
@@ -1,385 +0,0 @@
|
|
|
1
|
-
# Troubleshooting: Agent Skipped File Creation
|
|
2
|
-
|
|
3
|
-
## Problem Description
|
|
4
|
-
|
|
5
|
-
Agent completed a Clavix workflow but didn't create the expected output files. Content was displayed in chat but not saved to disk.
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Symptoms
|
|
10
|
-
|
|
11
|
-
- Agent says "files created" but they don't exist in `.clavix/outputs/`
|
|
12
|
-
- Agent provides content in chat instead of using Write tool
|
|
13
|
-
- Agent completes `/clavix:summarize` but no mini-prd.md, original-prompt.md, or optimized-prompt.md files
|
|
14
|
-
- Agent finishes `/clavix:fast` or `/clavix:deep` but no saved prompt file
|
|
15
|
-
- Agent generates PRD content but no PRD.md or PRD-quick.md files
|
|
16
|
-
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
## Why This Happens
|
|
20
|
-
|
|
21
|
-
**Root causes:**
|
|
22
|
-
|
|
23
|
-
1. **Suggestive language** - Instructions say "suggest saving" instead of "you MUST save"
|
|
24
|
-
2. **Missing Write tool instructions** - No explicit "Use the Write tool to create..." steps
|
|
25
|
-
3. **Optional phrasing** - "If filesystem access available" makes file creation optional
|
|
26
|
-
4. **No verification step** - Agent can't detect that files weren't created
|
|
27
|
-
5. **Wrong instruction ordering** - File creation buried at step 5 or 6 instead of step 3
|
|
28
|
-
6. **Agent assumes limited access** - Some agents think they can't write files
|
|
29
|
-
|
|
30
|
-
---
|
|
31
|
-
|
|
32
|
-
## Immediate Fix
|
|
33
|
-
|
|
34
|
-
If files weren't created:
|
|
35
|
-
|
|
36
|
-
### Step 1: Verify Files Don't Exist
|
|
37
|
-
|
|
38
|
-
Check the expected location:
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
ls -la .clavix/outputs/[project-name]/
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
If directory or files missing, proceed with fix.
|
|
45
|
-
|
|
46
|
-
---
|
|
47
|
-
|
|
48
|
-
### Step 2: Request Explicit File Creation
|
|
49
|
-
|
|
50
|
-
Tell the agent:
|
|
51
|
-
|
|
52
|
-
```markdown
|
|
53
|
-
The files weren't created. Please create them now using these exact steps:
|
|
54
|
-
|
|
55
|
-
**Step 1: Create directory**
|
|
56
|
-
```bash
|
|
57
|
-
mkdir -p .clavix/outputs/[project-name]
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
**Step 2: Write mini-prd.md**
|
|
61
|
-
Use the Write tool to create `.clavix/outputs/[project-name]/mini-prd.md` with the content you showed me earlier.
|
|
62
|
-
|
|
63
|
-
**Step 3: Write original-prompt.md**
|
|
64
|
-
Use the Write tool to create `.clavix/outputs/[project-name]/original-prompt.md`
|
|
65
|
-
|
|
66
|
-
**Step 4: Write optimized-prompt.md**
|
|
67
|
-
Use the Write tool to create `.clavix/outputs/[project-name]/optimized-prompt.md`
|
|
68
|
-
|
|
69
|
-
**Step 5: Confirm files exist**
|
|
70
|
-
List the created files so I can verify.
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
---
|
|
74
|
-
|
|
75
|
-
### Step 3: Verify Creation
|
|
76
|
-
|
|
77
|
-
After agent claims files are created, verify:
|
|
78
|
-
|
|
79
|
-
```bash
|
|
80
|
-
ls -la .clavix/outputs/[project-name]/
|
|
81
|
-
cat .clavix/outputs/[project-name]/mini-prd.md
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
Files should exist and contain the expected content.
|
|
85
|
-
|
|
86
|
-
---
|
|
87
|
-
|
|
88
|
-
## Prevention Strategies
|
|
89
|
-
|
|
90
|
-
### For Template Authors
|
|
91
|
-
|
|
92
|
-
**1. Use Proven File Creation Pattern**
|
|
93
|
-
|
|
94
|
-
Copy the explicit pattern from `fast.md` or `.clavix/instructions/core/file-operations.md`:
|
|
95
|
-
|
|
96
|
-
```markdown
|
|
97
|
-
**CREATE OUTPUT FILES (REQUIRED)**
|
|
98
|
-
|
|
99
|
-
You MUST create [N] files. This is not optional.
|
|
100
|
-
|
|
101
|
-
**Step 1: Create directory structure**
|
|
102
|
-
```bash
|
|
103
|
-
mkdir -p .clavix/outputs/[project-name]
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
**Step 2: Write [filename]**
|
|
107
|
-
Use the Write tool to create `.clavix/outputs/[project-name]/[filename]`
|
|
108
|
-
|
|
109
|
-
Content:
|
|
110
|
-
[Template or exact content]
|
|
111
|
-
|
|
112
|
-
**Step 3: Write [another-filename]**
|
|
113
|
-
Use the Write tool to create `.clavix/outputs/[project-name]/[another-filename]`
|
|
114
|
-
|
|
115
|
-
**Step N: Verify files exist**
|
|
116
|
-
List created files:
|
|
117
|
-
```
|
|
118
|
-
✓ .clavix/outputs/[project-name]/file1.md
|
|
119
|
-
✓ .clavix/outputs/[project-name]/file2.md
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
**CHECKPOINT:** All files created successfully
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
**2. Use Imperative Language**
|
|
126
|
-
|
|
127
|
-
✓ "You MUST create files"
|
|
128
|
-
✓ "Use the Write tool to..."
|
|
129
|
-
✓ "This is REQUIRED"
|
|
130
|
-
✓ "Create [specific file] now"
|
|
131
|
-
|
|
132
|
-
✗ "Suggest saving to..."
|
|
133
|
-
✗ "If filesystem access available..."
|
|
134
|
-
✗ "You could save..."
|
|
135
|
-
✗ "Consider creating..."
|
|
136
|
-
|
|
137
|
-
---
|
|
138
|
-
|
|
139
|
-
**3. Name the Tool Explicitly**
|
|
140
|
-
|
|
141
|
-
✓ "Use the Write tool to create..."
|
|
142
|
-
✓ "Call the Write tool with..."
|
|
143
|
-
|
|
144
|
-
✗ "Save to..." (vague - how?)
|
|
145
|
-
✗ "Create..." (vague - with what tool?)
|
|
146
|
-
✗ "Output to..." (unclear method)
|
|
147
|
-
|
|
148
|
-
---
|
|
149
|
-
|
|
150
|
-
**4. Add Verification Step**
|
|
151
|
-
|
|
152
|
-
Always include a step to verify files exist:
|
|
153
|
-
|
|
154
|
-
```markdown
|
|
155
|
-
**Step N: Verify File Creation**
|
|
156
|
-
|
|
157
|
-
List the created files to confirm they exist:
|
|
158
|
-
```
|
|
159
|
-
✓ file1.md
|
|
160
|
-
✓ file2.md
|
|
161
|
-
✓ file3.md
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
If any file is missing, something went wrong. Review and retry file creation steps.
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
---
|
|
168
|
-
|
|
169
|
-
**5. Correct Step Ordering**
|
|
170
|
-
|
|
171
|
-
File creation should be step 3 or 4, NOT step 5 or 6.
|
|
172
|
-
|
|
173
|
-
**Good order:**
|
|
174
|
-
1. Validate requirements
|
|
175
|
-
2. Extract/analyze
|
|
176
|
-
3. **CREATE FILES** ← Early in process
|
|
177
|
-
4. Apply optimizations
|
|
178
|
-
5. Highlight insights
|
|
179
|
-
6. Present summary
|
|
180
|
-
|
|
181
|
-
**Bad order:**
|
|
182
|
-
1. Validate requirements
|
|
183
|
-
2. Extract/analyze
|
|
184
|
-
3. Apply optimizations
|
|
185
|
-
4. Highlight insights
|
|
186
|
-
5. **Suggest saving** ← Too late, often skipped
|
|
187
|
-
6. Present summary
|
|
188
|
-
|
|
189
|
-
---
|
|
190
|
-
|
|
191
|
-
**6. Make File Creation Non-Optional**
|
|
192
|
-
|
|
193
|
-
Remove any language that makes it optional:
|
|
194
|
-
|
|
195
|
-
✗ "If filesystem access available..."
|
|
196
|
-
✗ "Try to save..."
|
|
197
|
-
✗ "Optionally create..."
|
|
198
|
-
✗ "You can save..."
|
|
199
|
-
|
|
200
|
-
✓ "You MUST create..."
|
|
201
|
-
✓ "This step is REQUIRED"
|
|
202
|
-
✓ "Create these files (not optional)"
|
|
203
|
-
|
|
204
|
-
---
|
|
205
|
-
|
|
206
|
-
### For Platform-Specific Adaptations
|
|
207
|
-
|
|
208
|
-
Some platforms have limited file access. Add fallback:
|
|
209
|
-
|
|
210
|
-
```markdown
|
|
211
|
-
**Step 2: Write file (with fallback)**
|
|
212
|
-
|
|
213
|
-
**Primary:** Use the Write tool to create `.clavix/outputs/[project]/file.md`
|
|
214
|
-
|
|
215
|
-
**Fallback (if Write tool unavailable):**
|
|
216
|
-
If file creation fails, display content and instruct user:
|
|
217
|
-
|
|
218
|
-
⚠️ File creation unavailable. Please save this manually:
|
|
219
|
-
|
|
220
|
-
**Path:** `.clavix/outputs/[project]/file.md`
|
|
221
|
-
|
|
222
|
-
**Content:**
|
|
223
|
-
```
|
|
224
|
-
[Content here]
|
|
225
|
-
```
|
|
226
|
-
|
|
227
|
-
Copy the content above and save to the specified path.
|
|
228
|
-
```
|
|
229
|
-
|
|
230
|
-
---
|
|
231
|
-
|
|
232
|
-
## Testing for This Issue
|
|
233
|
-
|
|
234
|
-
### Test Scenario 1: Summarization Workflow
|
|
235
|
-
|
|
236
|
-
**Setup:**
|
|
237
|
-
```markdown
|
|
238
|
-
User: /clavix:start
|
|
239
|
-
[Conversation happens]
|
|
240
|
-
User: /clavix:summarize
|
|
241
|
-
```
|
|
242
|
-
|
|
243
|
-
**Expected behavior:**
|
|
244
|
-
- Agent creates .clavix/outputs/[project]/ directory
|
|
245
|
-
- Agent writes mini-prd.md
|
|
246
|
-
- Agent writes original-prompt.md
|
|
247
|
-
- Agent writes optimized-prompt.md
|
|
248
|
-
- Agent lists files to verify
|
|
249
|
-
- **CHECKPOINT:** All files created successfully
|
|
250
|
-
|
|
251
|
-
**Test:**
|
|
252
|
-
```bash
|
|
253
|
-
ls -la .clavix/outputs/[project]/
|
|
254
|
-
```
|
|
255
|
-
|
|
256
|
-
Should show all three files.
|
|
257
|
-
|
|
258
|
-
**Failure indicator:**
|
|
259
|
-
- Directory doesn't exist
|
|
260
|
-
- Files missing
|
|
261
|
-
- Agent showed content in chat but didn't write files
|
|
262
|
-
|
|
263
|
-
---
|
|
264
|
-
|
|
265
|
-
### Test Scenario 2: Fast Improvement
|
|
266
|
-
|
|
267
|
-
**Setup:**
|
|
268
|
-
```markdown
|
|
269
|
-
User: /clavix:fast [prompt]
|
|
270
|
-
```
|
|
271
|
-
|
|
272
|
-
**Expected behavior:**
|
|
273
|
-
- Agent analyzes prompt
|
|
274
|
-
- Agent generates optimized version
|
|
275
|
-
- Agent creates .clavix/outputs/prompts/fast/ directory
|
|
276
|
-
- Agent writes fast-YYYYMMDD-HHMM.md file
|
|
277
|
-
- Agent verifies file created
|
|
278
|
-
|
|
279
|
-
**Test:**
|
|
280
|
-
```bash
|
|
281
|
-
ls -la .clavix/outputs/prompts/fast/
|
|
282
|
-
```
|
|
283
|
-
|
|
284
|
-
Should show saved prompt file.
|
|
285
|
-
|
|
286
|
-
---
|
|
287
|
-
|
|
288
|
-
## Common Patterns That Fail
|
|
289
|
-
|
|
290
|
-
### ❌ Pattern 1: Vague Suggestion
|
|
291
|
-
|
|
292
|
-
```markdown
|
|
293
|
-
5. Suggest saving to `.clavix/outputs/[project]/`
|
|
294
|
-
```
|
|
295
|
-
|
|
296
|
-
**Why it fails:** "Suggest" is passive, no Write tool instruction, no steps.
|
|
297
|
-
|
|
298
|
-
---
|
|
299
|
-
|
|
300
|
-
### ❌ Pattern 2: Optional Language
|
|
301
|
-
|
|
302
|
-
```markdown
|
|
303
|
-
4. Save to `.clavix/outputs/` if filesystem access available
|
|
304
|
-
```
|
|
305
|
-
|
|
306
|
-
**Why it fails:** "If available" makes it optional. Agent skips if uncertain.
|
|
307
|
-
|
|
308
|
-
---
|
|
309
|
-
|
|
310
|
-
### ❌ Pattern 3: No Tool Specified
|
|
311
|
-
|
|
312
|
-
```markdown
|
|
313
|
-
3. Save the following files:
|
|
314
|
-
- mini-prd.md
|
|
315
|
-
- optimized-prompt.md
|
|
316
|
-
```
|
|
317
|
-
|
|
318
|
-
**Why it fails:** Doesn't say HOW to save. No Write tool instruction.
|
|
319
|
-
|
|
320
|
-
---
|
|
321
|
-
|
|
322
|
-
### ❌ Pattern 4: No Verification
|
|
323
|
-
|
|
324
|
-
```markdown
|
|
325
|
-
3. Use Write tool to create files in .clavix/outputs/
|
|
326
|
-
4. Display summary
|
|
327
|
-
```
|
|
328
|
-
|
|
329
|
-
**Why it fails:** No verification step. Can't detect if files weren't created.
|
|
330
|
-
|
|
331
|
-
---
|
|
332
|
-
|
|
333
|
-
## Working Patterns
|
|
334
|
-
|
|
335
|
-
### ✅ Pattern: Explicit Numbered Steps
|
|
336
|
-
|
|
337
|
-
```markdown
|
|
338
|
-
**CREATE FILES (REQUIRED)**
|
|
339
|
-
|
|
340
|
-
**Step 1:** Create directory
|
|
341
|
-
```bash
|
|
342
|
-
mkdir -p .clavix/outputs/project
|
|
343
|
-
```
|
|
344
|
-
|
|
345
|
-
**Step 2:** Use Write tool to create file1.md
|
|
346
|
-
**Step 3:** Use Write tool to create file2.md
|
|
347
|
-
**Step 4:** Verify all files exist
|
|
348
|
-
**CHECKPOINT:** Files created successfully
|
|
349
|
-
```
|
|
350
|
-
|
|
351
|
-
**Why it works:** Imperative, explicit tool, verification, checkpoint.
|
|
352
|
-
|
|
353
|
-
---
|
|
354
|
-
|
|
355
|
-
## Quick Diagnosis
|
|
356
|
-
|
|
357
|
-
**Agent says files created but they don't exist?**
|
|
358
|
-
|
|
359
|
-
Check template for:
|
|
360
|
-
- ✗ "Suggest saving" language?
|
|
361
|
-
- ✗ "If available" conditional?
|
|
362
|
-
- ✗ No Write tool instruction?
|
|
363
|
-
- ✗ No verification step?
|
|
364
|
-
- ✗ File creation at step 5+?
|
|
365
|
-
|
|
366
|
-
**Fix:** Replace with proven pattern from `.clavix/instructions/core/file-operations.md`
|
|
367
|
-
|
|
368
|
-
---
|
|
369
|
-
|
|
370
|
-
## Success Indicators
|
|
371
|
-
|
|
372
|
-
File creation is working when:
|
|
373
|
-
- ✓ Files physically exist in .clavix/outputs/
|
|
374
|
-
- ✓ Files contain expected content structure
|
|
375
|
-
- ✓ Agent displays verification message with file paths
|
|
376
|
-
- ✓ Checkpoint marker confirms file creation
|
|
377
|
-
- ✓ User can open and read the files
|
|
378
|
-
|
|
379
|
-
---
|
|
380
|
-
|
|
381
|
-
## See Also
|
|
382
|
-
|
|
383
|
-
- `.clavix/instructions/core/file-operations.md` - Complete file creation patterns
|
|
384
|
-
- `.clavix/instructions/workflows/summarize.md` - Corrected summarization with file creation
|
|
385
|
-
- `.clavix/instructions/core/verification.md` - Verification patterns
|