clavix 5.5.0 → 5.5.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.
@@ -0,0 +1,612 @@
1
+ ---
2
+ name: "Clavix: Refine"
3
+ description: Refine existing PRD or prompt through continued discussion
4
+ ---
5
+
6
+ # Clavix: Refine Your Requirements
7
+
8
+ Need to update your PRD or improve a saved prompt? This command lets you refine existing work without starting over.
9
+
10
+ ---
11
+
12
+ ## What This Does
13
+
14
+ When you run `/clavix:refine`, I:
15
+ 1. **Detect available targets** - Find PRDs and saved prompts in your project
16
+ 2. **Ask what to refine** - PRD project or saved prompt?
17
+ 3. **Load existing content** - Read and understand current state
18
+ 4. **Enter refinement mode** - Discuss what you want to change
19
+ 5. **Update the files** - Save refined version with change history
20
+
21
+ **I'm refining existing work, not creating new content from scratch.**
22
+
23
+ ---
24
+
25
+ ## CLAVIX MODE: Refinement
26
+
27
+ **I'm in refinement mode. Updating existing requirements or prompts.**
28
+
29
+ **What I'll do:**
30
+ - Check for existing PRDs and prompts
31
+ - Ask you what you want to refine
32
+ - Load and display current content
33
+ - Discuss changes with you
34
+ - Update files with tracked changes
35
+ - Flag what changed vs. what stayed the same
36
+
37
+ **What I won't do:**
38
+ - Write implementation code
39
+ - Create new PRDs from scratch (use `/clavix:prd` for that)
40
+ - Create new prompts from scratch (use `/clavix:improve` for that)
41
+ - Make changes without user approval
42
+
43
+ **I'm improving what exists, not building from scratch.**
44
+
45
+ For complete mode documentation, see: `.clavix/instructions/core/clavix-mode.md`
46
+
47
+ ---
48
+
49
+ ## Self-Correction Protocol
50
+
51
+ **DETECT**: If you find yourself doing any of these 6 mistake types:
52
+
53
+ | Type | What It Looks Like |
54
+ |------|--------------------|
55
+ | 1. Implementation Code | Writing function/class definitions, creating components, generating API endpoints |
56
+ | 2. Skipping Mode Selection | Not asking user what to refine (PRD vs prompt) first |
57
+ | 3. Not Loading Existing Content | Making changes without reading current state first |
58
+ | 4. Losing Requirements | Removing existing requirements during refinement without user approval |
59
+ | 5. Not Tracking Changes | Failing to mark what was [ADDED], [MODIFIED], [REMOVED], [UNCHANGED] |
60
+ | 6. Capability Hallucination | Claiming features Clavix doesn't have, inventing workflows |
61
+
62
+ **STOP**: Immediately halt the incorrect action
63
+
64
+ **CORRECT**: Output:
65
+ "I apologize - I was [describe mistake]. Let me return to refinement mode."
66
+
67
+ **RESUME**: Return to the refinement workflow with proper mode selection and content loading.
68
+
69
+ ---
70
+
71
+ ## State Assertion (Required)
72
+
73
+ **Before starting refinement, output:**
74
+ ```
75
+ **CLAVIX MODE: Refinement**
76
+ Mode: planning
77
+ Purpose: Refining existing PRD or prompt
78
+ Implementation: BLOCKED - I will refine requirements, not implement them
79
+ ```
80
+
81
+ ---
82
+
83
+ ## Instructions
84
+
85
+ ### Step 0: Detect Available Refinement Targets
86
+
87
+ **CHECKPOINT:** Starting detection of refinement targets
88
+
89
+ Use file system tools to check for:
90
+
91
+ **PRD Projects:**
92
+ ```bash
93
+ # Look for PRD files
94
+ ls .clavix/outputs/*/mini-prd.md 2>/dev/null
95
+ ls .clavix/outputs/*/quick-prd.md 2>/dev/null
96
+ ls .clavix/outputs/*/full-prd.md 2>/dev/null
97
+ ```
98
+
99
+ **Saved Prompts:**
100
+ ```bash
101
+ # Look for saved prompts
102
+ ls .clavix/outputs/prompts/*.md 2>/dev/null
103
+ ```
104
+
105
+ **Record what was found:**
106
+ - PRD projects found: [list project names]
107
+ - Saved prompts found: [list prompt files]
108
+
109
+ **CHECKPOINT:** Detection complete - found [N] PRD projects, [M] saved prompts
110
+
111
+ ---
112
+
113
+ ### Step 1: Ask User What to Refine
114
+
115
+ Based on what was found, ask the user:
116
+
117
+ **If both PRDs and prompts exist:**
118
+ ```markdown
119
+ ## What Would You Like to Refine?
120
+
121
+ I found refinement targets in your project:
122
+
123
+ **PRD Projects:**
124
+ - [project-name] (mini-prd.md, tasks.md)
125
+ - [other-project] (quick-prd.md)
126
+
127
+ **Saved Prompts:**
128
+ - [timestamp]-[name].md
129
+ - [other-prompt].md
130
+
131
+ **What would you like to refine?**
132
+ 1. **A PRD project** - Modify requirements, features, constraints
133
+ 2. **A saved prompt** - Improve and optimize a prompt
134
+
135
+ Please let me know which type, and I'll show you the specific options.
136
+ ```
137
+
138
+ **If only PRDs exist:**
139
+ ```markdown
140
+ ## What Would You Like to Refine?
141
+
142
+ I found [N] PRD project(s) in your outputs:
143
+ - [project-name] (has mini-prd.md, tasks.md)
144
+
145
+ Would you like to refine this PRD? I can help you:
146
+ - Add new features
147
+ - Modify existing requirements
148
+ - Adjust constraints or scope
149
+ - Update technical requirements
150
+ ```
151
+
152
+ **If only prompts exist:**
153
+ ```markdown
154
+ ## What Would You Like to Refine?
155
+
156
+ I found [N] saved prompt(s):
157
+ - [prompt-file-1].md
158
+ - [prompt-file-2].md
159
+
160
+ Would you like to refine one of these prompts? I can help you:
161
+ - Make it more specific
162
+ - Add constraints or context
163
+ - Clarify the objective
164
+ - Improve overall quality
165
+ ```
166
+
167
+ **If nothing found:**
168
+ ```markdown
169
+ ## No Refinement Targets Found
170
+
171
+ I couldn't find any existing PRDs or saved prompts to refine.
172
+
173
+ **To create new content:**
174
+ - `/clavix:prd` - Create a new PRD through guided questions
175
+ - `/clavix:improve [prompt]` - Optimize and save a prompt
176
+ - `/clavix:start` → `/clavix:summarize` - Extract requirements from conversation
177
+
178
+ Once you've created content with these commands, you can use `/clavix:refine` to update it.
179
+ ```
180
+
181
+ **CHECKPOINT:** User selected refinement type: [PRD/Prompt]
182
+
183
+ ---
184
+
185
+ ## PRD Refinement Workflow
186
+
187
+ *Only follow this section if user selected PRD refinement*
188
+
189
+ ### Step 2a: Load Existing PRD
190
+
191
+ Read the PRD file(s) for the selected project:
192
+ ```bash
193
+ # Read the mini-prd or quick-prd
194
+ cat .clavix/outputs/[project-name]/mini-prd.md
195
+ ```
196
+
197
+ **CHECKPOINT:** Loaded PRD for project: [project-name]
198
+
199
+ ### Step 3a: Display Current Requirements Summary
200
+
201
+ Present the current state to the user:
202
+
203
+ ```markdown
204
+ ## Current Requirements for [Project Name]
205
+
206
+ ### Objective
207
+ [Current objective from PRD]
208
+
209
+ ### Core Features
210
+ - [Feature 1]
211
+ - [Feature 2]
212
+ - [Feature 3]
213
+
214
+ ### Technical Constraints
215
+ - [Constraint 1]
216
+ - [Constraint 2]
217
+
218
+ ### Scope
219
+ **In Scope:** [What's included]
220
+ **Out of Scope:** [What's excluded]
221
+
222
+ ---
223
+
224
+ **What would you like to refine?**
225
+ 1. Add new features
226
+ 2. Modify existing features
227
+ 3. Change technical constraints
228
+ 4. Adjust scope (add/remove items)
229
+ 5. Update success criteria
230
+ 6. Something else
231
+ ```
232
+
233
+ ### Step 4a: Refine Through Discussion
234
+
235
+ Enter conversational mode to understand what changes are needed:
236
+
237
+ - Listen to what the user wants to change
238
+ - Ask clarifying questions
239
+ - Propose specific changes
240
+ - Get user approval before modifying
241
+
242
+ **Track changes with markers:**
243
+ - `[ADDED]` - New requirement or feature
244
+ - `[MODIFIED]` - Changed from original
245
+ - `[REMOVED]` - Explicitly removed (with user approval)
246
+ - `[UNCHANGED]` - Kept as-is
247
+
248
+ ### Step 5a: Generate Updated PRD
249
+
250
+ After discussion, update the PRD file:
251
+
252
+ **Use the Write tool to update** `.clavix/outputs/[project-name]/mini-prd.md`
253
+
254
+ Add a "Refinement History" section at the bottom:
255
+
256
+ ```markdown
257
+ ---
258
+
259
+ ## Refinement History
260
+
261
+ ### [Date] - Refinement Session
262
+
263
+ **Changes Made:**
264
+ - [ADDED] [Description of what was added]
265
+ - [MODIFIED] [What changed and how]
266
+ - [REMOVED] [What was removed and why]
267
+
268
+ **Reason:** [Brief explanation of why changes were made]
269
+ ```
270
+
271
+ **CHECKPOINT:** Updated PRD with [N] changes
272
+
273
+ ### Step 6a: Notify About Tasks
274
+
275
+ If tasks.md exists for this project:
276
+
277
+ ```markdown
278
+ ## Note: Tasks May Need Regeneration
279
+
280
+ This project has a `tasks.md` file that was generated from the previous PRD version.
281
+
282
+ After refining the PRD, you may want to regenerate tasks:
283
+ - Run `/clavix:plan` to create an updated task breakdown
284
+ - Or manually update tasks.md to reflect the changes
285
+
286
+ **Changes that likely affect tasks:**
287
+ - [List significant changes that impact implementation]
288
+ ```
289
+
290
+ ---
291
+
292
+ ## Prompt Refinement Workflow
293
+
294
+ *Only follow this section if user selected Prompt refinement*
295
+
296
+ ### Step 2b: List Available Prompts
297
+
298
+ If multiple prompts exist:
299
+ ```markdown
300
+ ## Available Prompts
301
+
302
+ | # | File | Created | Size |
303
+ |---|------|---------|------|
304
+ | 1 | [filename].md | [date] | [lines] |
305
+ | 2 | [filename].md | [date] | [lines] |
306
+
307
+ **Which prompt would you like to refine?**
308
+ Enter the number, or type `latest` to refine the most recent.
309
+ ```
310
+
311
+ ### Step 3b: Load Selected Prompt
312
+
313
+ Read the prompt file:
314
+ ```bash
315
+ cat .clavix/outputs/prompts/[selected-file].md
316
+ ```
317
+
318
+ **CHECKPOINT:** Loaded prompt: [filename]
319
+
320
+ ### Step 4b: Display Current Prompt and Quality
321
+
322
+ Present the current prompt to the user:
323
+
324
+ ```markdown
325
+ ## Current Prompt: [filename]
326
+
327
+ [Display the prompt content]
328
+
329
+ ---
330
+
331
+ **Quality Assessment:**
332
+ - Clarity: [Score]
333
+ - Specificity: [Score]
334
+ - Completeness: [Score]
335
+ - Actionability: [Score]
336
+
337
+ **What would you like to change?**
338
+ 1. Clarify the objective
339
+ 2. Add more context or constraints
340
+ 3. Make it more specific
341
+ 4. Change the approach
342
+ 5. Other (describe what you want)
343
+ ```
344
+
345
+ ### Step 5b: Refine Through Discussion
346
+
347
+ Enter conversational mode:
348
+ - Understand what the user wants to improve
349
+ - Suggest specific enhancements
350
+ - Re-assess quality as changes are made
351
+
352
+ ### Step 6b: Run Quality Assessment
353
+
354
+ After refinement, re-assess using the same 6 dimensions as `/clavix:improve`:
355
+ - Clarity
356
+ - Specificity
357
+ - Context
358
+ - Constraints
359
+ - Actionability
360
+ - Structure
361
+
362
+ ### Step 7b: Save Refined Prompt
363
+
364
+ **Use the Write tool** to update the prompt file:
365
+
366
+ Add refinement metadata to frontmatter (if present) or create new:
367
+
368
+ ```markdown
369
+ ---
370
+ refined: [date]
371
+ original_created: [original date]
372
+ refinements: 1
373
+ ---
374
+
375
+ [Refined prompt content]
376
+
377
+ ---
378
+
379
+ ## Refinement Summary
380
+
381
+ **Before:** [Brief description of original]
382
+ **After:** [Brief description of refined version]
383
+
384
+ **Quality Score:**
385
+ - Before: [X]/100
386
+ - After: [Y]/100
387
+
388
+ **Improvements Applied:**
389
+ - [What was changed and why]
390
+ ```
391
+
392
+ **CHECKPOINT:** Saved refined prompt to [filename]
393
+
394
+ ### Step 8b: Show Before/After Comparison
395
+
396
+ ```markdown
397
+ ## Prompt Refinement Complete
398
+
399
+ **Quality Score Improvement:** [X] → [Y] (+[diff])
400
+
401
+ **Key Changes:**
402
+ | Aspect | Before | After |
403
+ |--------|--------|-------|
404
+ | Clarity | [score] | [score] |
405
+ | Specificity | [score] | [score] |
406
+ | ... | ... | ... |
407
+
408
+ **Next Steps:**
409
+ - Run `/clavix:implement --latest` to execute this prompt
410
+ - Or continue refining with another `/clavix:refine` session
411
+ ```
412
+
413
+ ---
414
+
415
+ ## Integration Points
416
+
417
+ **After refining a PRD:**
418
+ - Run `/clavix:plan` to regenerate tasks based on updated requirements
419
+ - Note that existing tasks.md may be outdated
420
+
421
+ **After refining a prompt:**
422
+ - Run `/clavix:implement --latest` to execute the refined prompt
423
+
424
+ **Iterative refinement:**
425
+ - You can run `/clavix:refine` multiple times
426
+ - Each session adds to the refinement history
427
+ - Changes are tracked cumulatively
428
+
429
+ ---
430
+
431
+ ## Examples
432
+
433
+ ### Example: Adding a Feature to PRD
434
+
435
+ **User:** "/clavix:refine"
436
+
437
+ **Agent:** "I found 1 PRD project: 'user-dashboard'. Would you like to refine it?"
438
+
439
+ **User:** "Yes, I want to add dark mode support."
440
+
441
+ **Agent:**
442
+ ```markdown
443
+ ## Adding to [user-dashboard] PRD
444
+
445
+ **Current features:**
446
+ - User profile display
447
+ - Activity feed
448
+ - Notifications panel
449
+
450
+ **Proposed addition:**
451
+ - [ADDED] Dark mode toggle with system preference detection
452
+ - [ADDED] Theme persistence across sessions
453
+ - [MODIFIED] All UI components must support both themes
454
+
455
+ Does this capture what you want to add?
456
+ ```
457
+
458
+ ### Example: Changing PRD Constraints
459
+
460
+ **User:** "Actually, we need to support mobile now too."
461
+
462
+ **Agent:**
463
+ ```markdown
464
+ ## Modifying Technical Constraints
465
+
466
+ **Previous constraints:**
467
+ - Desktop-only (1024px minimum)
468
+ - Chrome/Firefox/Safari support
469
+
470
+ **Updated constraints:**
471
+ - [MODIFIED] Responsive design: 320px to 1920px
472
+ - [ADDED] Mobile-first approach
473
+ - [ADDED] Touch interaction support
474
+ - [UNCHANGED] Chrome/Firefox/Safari support
475
+ - [ADDED] iOS Safari and Chrome mobile support
476
+
477
+ This changes scope significantly. Should I also update the success criteria?
478
+ ```
479
+
480
+ ### Example: Making a Prompt More Specific
481
+
482
+ **User:** "/clavix:refine"
483
+
484
+ **Agent:** "I found 2 saved prompts. Which would you like to refine?"
485
+
486
+ **User:** "The API integration one."
487
+
488
+ **Agent:**
489
+ ```markdown
490
+ ## Current Prompt Assessment
491
+
492
+ "Build an API integration for our system."
493
+
494
+ **Quality Scores:**
495
+ - Clarity: 40/100 (too vague)
496
+ - Specificity: 30/100 (no details)
497
+ - Completeness: 20/100 (missing critical info)
498
+
499
+ **What would you like to specify?**
500
+ 1. Which API to integrate?
501
+ 2. What operations are needed?
502
+ 3. Authentication requirements?
503
+ 4. Error handling expectations?
504
+ ```
505
+
506
+ **User:** "It's the Stripe API for payments."
507
+
508
+ **Agent:**
509
+ ```markdown
510
+ ## Refined Prompt
511
+
512
+ "Integrate Stripe API for payment processing:
513
+ - Support one-time payments and subscriptions
514
+ - Handle webhook events for payment status updates
515
+ - Store payment methods securely using Stripe tokens
516
+ - Implement retry logic for failed charges
517
+ - Generate receipts and send confirmation emails
518
+
519
+ Technical: Use Stripe Node.js SDK, handle PCI compliance through Stripe Elements."
520
+
521
+ **Quality Scores (After):**
522
+ - Clarity: 85/100 (+45)
523
+ - Specificity: 90/100 (+60)
524
+ - Completeness: 80/100 (+60)
525
+ ```
526
+
527
+ ### Example: Reducing PRD Scope
528
+
529
+ **User:** "We need to cut scope. Remove the analytics feature."
530
+
531
+ **Agent:**
532
+ ```markdown
533
+ ## Scope Reduction
534
+
535
+ **Removing from scope:**
536
+ - [REMOVED] Analytics dashboard
537
+ - [REMOVED] Usage metrics tracking
538
+ - [REMOVED] Export to CSV feature
539
+
540
+ **Keeping:**
541
+ - [UNCHANGED] Core user management
542
+ - [UNCHANGED] Notification system
543
+ - [UNCHANGED] Settings page
544
+
545
+ **Impact:**
546
+ - Estimated effort reduction: ~30%
547
+ - Dependencies affected: None (analytics was standalone)
548
+
549
+ I'll update the PRD and add this to the refinement history. Confirm?
550
+ ```
551
+
552
+ ---
553
+
554
+ ## Agent Transparency (v5.5)
555
+
556
+ ### Agent Manual (Universal Protocols)
557
+ {{INCLUDE:agent-protocols/AGENT_MANUAL.md}}
558
+
559
+ ### CLI Reference
560
+ {{INCLUDE:agent-protocols/cli-reference.md}}
561
+
562
+ ### Workflow State Detection
563
+ {{INCLUDE:agent-protocols/state-awareness.md}}
564
+
565
+ ---
566
+
567
+ ## Workflow Navigation
568
+
569
+ **You are here:** Refine (Update existing PRD or prompt)
570
+
571
+ **Common workflows:**
572
+ - **PRD refinement**: `/clavix:refine` → update PRD → `/clavix:plan` → regenerate tasks
573
+ - **Prompt refinement**: `/clavix:refine` → improve prompt → `/clavix:implement --latest`
574
+ - **Iterative updates**: `/clavix:refine` → `/clavix:refine` → ... (multiple passes)
575
+
576
+ **Related commands:**
577
+ - `/clavix:prd` - Create new PRD from scratch (not refinement)
578
+ - `/clavix:improve` - Create new optimized prompt (not refinement)
579
+ - `/clavix:plan` - Generate tasks from PRD
580
+ - `/clavix:implement` - Execute tasks or prompts
581
+
582
+ ---
583
+
584
+ ## Troubleshooting
585
+
586
+ ### Issue: No refinement targets found
587
+ **Cause**: No PRDs or prompts have been created yet
588
+ **Solution**:
589
+ - Use `/clavix:prd` to create a PRD
590
+ - Use `/clavix:improve [prompt]` to create and save a prompt
591
+ - Use `/clavix:start` → `/clavix:summarize` to extract from conversation
592
+
593
+ ### Issue: Can't find specific project
594
+ **Cause**: Project name doesn't match or files moved
595
+ **Solution**:
596
+ - Check `.clavix/outputs/` directory structure
597
+ - Ensure mini-prd.md or quick-prd.md exists in project folder
598
+ - Project names are case-sensitive
599
+
600
+ ### Issue: Changes lost after refinement
601
+ **Cause**: Overwrote without tracking changes
602
+ **Solution**:
603
+ - Always use change markers: [ADDED], [MODIFIED], [REMOVED], [UNCHANGED]
604
+ - Include Refinement History section
605
+ - Review changes with user before saving
606
+
607
+ ### Issue: tasks.md out of sync with refined PRD
608
+ **Cause**: Normal - tasks were generated from previous PRD version
609
+ **Solution**:
610
+ - Run `/clavix:plan` to regenerate tasks
611
+ - Or manually update tasks.md
612
+ - Previous progress markers may need adjustment
@@ -82,5 +82,30 @@ export declare class AgentErrorMessages {
82
82
  * Used by: implement workflow when marking already-done task
83
83
  */
84
84
  static taskAlreadyCompleted(taskId: string): string;
85
+ /**
86
+ * Error: Template not found
87
+ * Used by: template-loader.ts, commands generating slash commands
88
+ */
89
+ static templateNotFound(templateName: string, searchPath?: string): string;
90
+ /**
91
+ * Error: Adapter/integration not found
92
+ * Used by: agent-manager.ts, init.ts
93
+ */
94
+ static adapterNotFound(adapterName: string, availableAdapters?: string[]): string;
95
+ /**
96
+ * Error: Configuration loading failed
97
+ * Used by: init.ts, update.ts when .clavix/config.json is invalid
98
+ */
99
+ static configLoadFailed(configPath: string, reason?: string): string;
100
+ /**
101
+ * Error: Update command failed
102
+ * Used by: update.ts when template regeneration fails
103
+ */
104
+ static updateFailed(reason: string): string;
105
+ /**
106
+ * Error: Diagnostic check failed
107
+ * Used by: diagnose.ts when health check identifies issues
108
+ */
109
+ static diagnosticFailed(issues: string[]): string;
85
110
  }
86
111
  //# sourceMappingURL=agent-error-messages.d.ts.map
@@ -191,5 +191,73 @@ export class AgentErrorMessages {
191
191
  ' 3. Check if this was intended\n\n' +
192
192
  'No action needed unless forced.');
193
193
  }
194
+ /**
195
+ * Error: Template not found
196
+ * Used by: template-loader.ts, commands generating slash commands
197
+ */
198
+ static templateNotFound(templateName, searchPath) {
199
+ const pathInfo = searchPath ? `\nSearch path: ${searchPath}` : '';
200
+ return (`Template not found: ${templateName}${pathInfo}\n\n` +
201
+ 'Agent recovery options:\n' +
202
+ " 1. Run 'clavix update' to regenerate templates\n" +
203
+ ' 2. Check if Clavix is installed correctly\n' +
204
+ ' 3. Verify template name is spelled correctly\n\n' +
205
+ 'After recovery, retry the command.');
206
+ }
207
+ /**
208
+ * Error: Adapter/integration not found
209
+ * Used by: agent-manager.ts, init.ts
210
+ */
211
+ static adapterNotFound(adapterName, availableAdapters) {
212
+ const adapterList = availableAdapters
213
+ ? '\n\nAvailable adapters:\n' + availableAdapters.map((a) => ` • ${a}`).join('\n')
214
+ : '';
215
+ return (`Adapter not found: ${adapterName}${adapterList}\n\n` +
216
+ 'Agent recovery options:\n' +
217
+ ' 1. Check adapter name is spelled correctly\n' +
218
+ " 2. Run 'clavix diagnose' to see available integrations\n" +
219
+ ' 3. Adapter may have been removed or renamed\n\n' +
220
+ 'Use a valid adapter name and retry.');
221
+ }
222
+ /**
223
+ * Error: Configuration loading failed
224
+ * Used by: init.ts, update.ts when .clavix/config.json is invalid
225
+ */
226
+ static configLoadFailed(configPath, reason) {
227
+ const reasonInfo = reason ? `\nReason: ${reason}` : '';
228
+ return (`Failed to load configuration: ${configPath}${reasonInfo}\n\n` +
229
+ 'Agent recovery options:\n' +
230
+ " 1. Run 'clavix init' to regenerate configuration\n" +
231
+ ' 2. Check .clavix/config.json syntax is valid JSON\n' +
232
+ ' 3. Remove .clavix/ and reinitialize\n\n' +
233
+ 'After fixing configuration, retry the command.');
234
+ }
235
+ /**
236
+ * Error: Update command failed
237
+ * Used by: update.ts when template regeneration fails
238
+ */
239
+ static updateFailed(reason) {
240
+ return (`Update failed: ${reason}\n\n` +
241
+ 'Agent recovery options:\n' +
242
+ ' 1. Check Clavix is installed correctly: clavix --version\n' +
243
+ ' 2. Verify write permissions in project directory\n' +
244
+ " 3. Try removing .clavix/ and running 'clavix init'\n\n" +
245
+ 'Fix the underlying issue and retry.');
246
+ }
247
+ /**
248
+ * Error: Diagnostic check failed
249
+ * Used by: diagnose.ts when health check identifies issues
250
+ */
251
+ static diagnosticFailed(issues) {
252
+ const issueList = issues.map((issue) => ` • ${issue}`).join('\n');
253
+ return ('Diagnostic check identified issues:\n\n' +
254
+ issueList +
255
+ '\n\n' +
256
+ 'Agent recovery options:\n' +
257
+ " 1. Run 'clavix update' to fix template issues\n" +
258
+ " 2. Run 'clavix init' to reinitialize configuration\n" +
259
+ ' 3. Check file permissions in project directory\n\n' +
260
+ 'Address issues above and rerun diagnose.');
261
+ }
194
262
  }
195
263
  //# sourceMappingURL=agent-error-messages.js.map