clavix 2.1.2 → 2.3.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 (138) hide show
  1. package/README.md +3 -3
  2. package/dist/cli/commands/init.js +11 -4
  3. package/dist/core/adapters/copilot-instructions-generator.d.ts +26 -0
  4. package/dist/core/adapters/copilot-instructions-generator.js +104 -0
  5. package/dist/core/agent-manager.js +0 -2
  6. package/dist/templates/agents/copilot-instructions.md +90 -0
  7. package/dist/templates/slash-commands/amp/archive.md +130 -3
  8. package/dist/templates/slash-commands/amp/deep.md +70 -10
  9. package/dist/templates/slash-commands/amp/fast.md +62 -15
  10. package/dist/templates/slash-commands/amp/implement.md +147 -2
  11. package/dist/templates/slash-commands/amp/plan.md +103 -7
  12. package/dist/templates/slash-commands/amp/prd.md +111 -13
  13. package/dist/templates/slash-commands/amp/start.md +77 -1
  14. package/dist/templates/slash-commands/amp/summarize.md +101 -21
  15. package/dist/templates/slash-commands/augment/archive.md +131 -4
  16. package/dist/templates/slash-commands/augment/deep.md +71 -11
  17. package/dist/templates/slash-commands/augment/fast.md +63 -16
  18. package/dist/templates/slash-commands/augment/implement.md +148 -3
  19. package/dist/templates/slash-commands/augment/plan.md +104 -8
  20. package/dist/templates/slash-commands/augment/prd.md +106 -8
  21. package/dist/templates/slash-commands/augment/start.md +78 -2
  22. package/dist/templates/slash-commands/augment/summarize.md +101 -21
  23. package/dist/templates/slash-commands/claude-code/archive.md +130 -3
  24. package/dist/templates/slash-commands/claude-code/deep.md +70 -10
  25. package/dist/templates/slash-commands/claude-code/fast.md +62 -15
  26. package/dist/templates/slash-commands/claude-code/implement.md +147 -2
  27. package/dist/templates/slash-commands/claude-code/plan.md +103 -7
  28. package/dist/templates/slash-commands/claude-code/prd.md +111 -13
  29. package/dist/templates/slash-commands/claude-code/start.md +77 -1
  30. package/dist/templates/slash-commands/claude-code/summarize.md +101 -21
  31. package/dist/templates/slash-commands/cline/archive.md +130 -3
  32. package/dist/templates/slash-commands/cline/deep.md +70 -10
  33. package/dist/templates/slash-commands/cline/fast.md +62 -15
  34. package/dist/templates/slash-commands/cline/implement.md +147 -2
  35. package/dist/templates/slash-commands/cline/plan.md +103 -7
  36. package/dist/templates/slash-commands/cline/prd.md +111 -13
  37. package/dist/templates/slash-commands/cline/start.md +77 -1
  38. package/dist/templates/slash-commands/cline/summarize.md +101 -21
  39. package/dist/templates/slash-commands/codebuddy/archive.md +130 -3
  40. package/dist/templates/slash-commands/codebuddy/deep.md +70 -10
  41. package/dist/templates/slash-commands/codebuddy/fast.md +62 -15
  42. package/dist/templates/slash-commands/codebuddy/implement.md +147 -2
  43. package/dist/templates/slash-commands/codebuddy/plan.md +103 -7
  44. package/dist/templates/slash-commands/codebuddy/prd.md +111 -13
  45. package/dist/templates/slash-commands/codebuddy/start.md +77 -1
  46. package/dist/templates/slash-commands/codebuddy/summarize.md +101 -21
  47. package/dist/templates/slash-commands/codex/archive.md +130 -3
  48. package/dist/templates/slash-commands/codex/deep.md +70 -10
  49. package/dist/templates/slash-commands/codex/fast.md +62 -15
  50. package/dist/templates/slash-commands/codex/implement.md +147 -2
  51. package/dist/templates/slash-commands/codex/plan.md +103 -7
  52. package/dist/templates/slash-commands/codex/prd.md +111 -13
  53. package/dist/templates/slash-commands/codex/start.md +77 -1
  54. package/dist/templates/slash-commands/codex/summarize.md +101 -21
  55. package/dist/templates/slash-commands/crush/archive.md +130 -3
  56. package/dist/templates/slash-commands/crush/deep.md +70 -10
  57. package/dist/templates/slash-commands/crush/fast.md +62 -15
  58. package/dist/templates/slash-commands/crush/implement.md +147 -2
  59. package/dist/templates/slash-commands/crush/plan.md +103 -7
  60. package/dist/templates/slash-commands/crush/prd.md +111 -13
  61. package/dist/templates/slash-commands/crush/start.md +77 -1
  62. package/dist/templates/slash-commands/crush/summarize.md +101 -21
  63. package/dist/templates/slash-commands/cursor/archive.md +130 -3
  64. package/dist/templates/slash-commands/cursor/deep.md +70 -10
  65. package/dist/templates/slash-commands/cursor/fast.md +62 -15
  66. package/dist/templates/slash-commands/cursor/implement.md +147 -2
  67. package/dist/templates/slash-commands/cursor/plan.md +103 -7
  68. package/dist/templates/slash-commands/cursor/prd.md +111 -13
  69. package/dist/templates/slash-commands/cursor/start.md +77 -1
  70. package/dist/templates/slash-commands/cursor/summarize.md +101 -21
  71. package/dist/templates/slash-commands/droid/archive.md +130 -3
  72. package/dist/templates/slash-commands/droid/deep.md +70 -10
  73. package/dist/templates/slash-commands/droid/fast.md +62 -15
  74. package/dist/templates/slash-commands/droid/implement.md +147 -2
  75. package/dist/templates/slash-commands/droid/plan.md +103 -7
  76. package/dist/templates/slash-commands/droid/prd.md +111 -13
  77. package/dist/templates/slash-commands/droid/start.md +77 -1
  78. package/dist/templates/slash-commands/droid/summarize.md +101 -21
  79. package/dist/templates/slash-commands/gemini/archive.toml +132 -4
  80. package/dist/templates/slash-commands/gemini/deep.toml +72 -11
  81. package/dist/templates/slash-commands/gemini/fast.toml +64 -16
  82. package/dist/templates/slash-commands/gemini/implement.toml +149 -3
  83. package/dist/templates/slash-commands/gemini/plan.toml +116 -13
  84. package/dist/templates/slash-commands/gemini/prd.toml +107 -8
  85. package/dist/templates/slash-commands/gemini/start.toml +79 -2
  86. package/dist/templates/slash-commands/gemini/summarize.toml +102 -21
  87. package/dist/templates/slash-commands/kilocode/archive.md +130 -3
  88. package/dist/templates/slash-commands/kilocode/deep.md +70 -10
  89. package/dist/templates/slash-commands/kilocode/fast.md +62 -15
  90. package/dist/templates/slash-commands/kilocode/implement.md +147 -2
  91. package/dist/templates/slash-commands/kilocode/plan.md +103 -7
  92. package/dist/templates/slash-commands/kilocode/prd.md +111 -13
  93. package/dist/templates/slash-commands/kilocode/start.md +77 -1
  94. package/dist/templates/slash-commands/kilocode/summarize.md +101 -21
  95. package/dist/templates/slash-commands/opencode/archive.md +130 -3
  96. package/dist/templates/slash-commands/opencode/deep.md +70 -10
  97. package/dist/templates/slash-commands/opencode/fast.md +62 -15
  98. package/dist/templates/slash-commands/opencode/implement.md +147 -2
  99. package/dist/templates/slash-commands/opencode/plan.md +103 -7
  100. package/dist/templates/slash-commands/opencode/prd.md +111 -13
  101. package/dist/templates/slash-commands/opencode/start.md +77 -1
  102. package/dist/templates/slash-commands/opencode/summarize.md +101 -21
  103. package/dist/templates/slash-commands/qwen/archive.toml +132 -4
  104. package/dist/templates/slash-commands/qwen/deep.toml +72 -11
  105. package/dist/templates/slash-commands/qwen/fast.toml +64 -16
  106. package/dist/templates/slash-commands/qwen/implement.toml +149 -3
  107. package/dist/templates/slash-commands/qwen/plan.toml +116 -13
  108. package/dist/templates/slash-commands/qwen/prd.toml +107 -8
  109. package/dist/templates/slash-commands/qwen/start.toml +79 -2
  110. package/dist/templates/slash-commands/qwen/summarize.toml +102 -21
  111. package/dist/templates/slash-commands/roocode/archive.md +130 -3
  112. package/dist/templates/slash-commands/roocode/deep.md +70 -10
  113. package/dist/templates/slash-commands/roocode/fast.md +62 -15
  114. package/dist/templates/slash-commands/roocode/implement.md +147 -2
  115. package/dist/templates/slash-commands/roocode/plan.md +103 -7
  116. package/dist/templates/slash-commands/roocode/prd.md +111 -13
  117. package/dist/templates/slash-commands/roocode/start.md +77 -1
  118. package/dist/templates/slash-commands/roocode/summarize.md +101 -21
  119. package/dist/templates/slash-commands/windsurf/archive.md +130 -3
  120. package/dist/templates/slash-commands/windsurf/deep.md +70 -10
  121. package/dist/templates/slash-commands/windsurf/fast.md +62 -15
  122. package/dist/templates/slash-commands/windsurf/implement.md +147 -2
  123. package/dist/templates/slash-commands/windsurf/plan.md +103 -7
  124. package/dist/templates/slash-commands/windsurf/prd.md +111 -13
  125. package/dist/templates/slash-commands/windsurf/start.md +77 -1
  126. package/dist/templates/slash-commands/windsurf/summarize.md +101 -21
  127. package/dist/types/agent.d.ts +1 -1
  128. package/package.json +2 -2
  129. package/dist/core/adapters/copilot-adapter.d.ts +0 -24
  130. package/dist/core/adapters/copilot-adapter.js +0 -88
  131. package/dist/templates/slash-commands/copilot/archive.agent.md +0 -164
  132. package/dist/templates/slash-commands/copilot/deep.agent.md +0 -147
  133. package/dist/templates/slash-commands/copilot/fast.agent.md +0 -136
  134. package/dist/templates/slash-commands/copilot/implement.agent.md +0 -122
  135. package/dist/templates/slash-commands/copilot/plan.agent.md +0 -69
  136. package/dist/templates/slash-commands/copilot/prd.agent.md +0 -80
  137. package/dist/templates/slash-commands/copilot/start.agent.md +0 -66
  138. package/dist/templates/slash-commands/copilot/summarize.agent.md +0 -99
@@ -9,15 +9,35 @@ You are analyzing the conversation history and extracting optimized requirements
9
9
 
10
10
  ## Instructions
11
11
 
12
- 1. Review the entire conversation and identify:
13
- - **Problem/Goal**: What is the user trying to build or solve?
14
- - **Key Requirements**: What features and functionality were discussed?
15
- - **Technical Constraints**: Any technologies, integrations, or performance needs?
16
- - **User Needs**: Who are the end users and what do they need?
17
- - **Success Criteria**: How will success be measured?
18
- - **Context**: Any important background or constraints?
19
-
20
- 2. Generate TWO outputs:
12
+ 1. **Pre-Extraction Validation** - Check conversation completeness:
13
+
14
+ **Minimum viable requirements:**
15
+ - **Objective/Goal**: Is there a clear problem or goal stated?
16
+ - **Requirements**: Are there at least 2-3 concrete features or capabilities described?
17
+ - **Context**: Is there enough context about who/what/why?
18
+
19
+ **If missing critical elements:**
20
+ - Identify what's missing (e.g., "No clear objective", "Requirements too vague")
21
+ - Ask targeted questions to fill gaps:
22
+ - Missing objective: "What problem are you trying to solve?"
23
+ - Vague requirements: "Can you describe 2-3 specific things this should do?"
24
+ - No context: "Who will use this and in what situation?"
25
+ - **DO NOT** proceed to extraction until minimum viable requirements met
26
+
27
+ **Confidence indicators** (annotate extracted elements):
28
+ - **[HIGH]**: Explicitly stated multiple times with details
29
+ - **[MEDIUM]**: Mentioned once or inferred from context
30
+ - **[LOW]**: Assumed based on limited information
31
+
32
+ 2. Review the entire conversation and identify (with confidence indicators):
33
+ - **Problem/Goal** [confidence]: What is the user trying to build or solve?
34
+ - **Key Requirements** [confidence per requirement]: What features and functionality were discussed?
35
+ - **Technical Constraints** [confidence]: Any technologies, integrations, or performance needs?
36
+ - **User Needs** [confidence]: Who are the end users and what do they need?
37
+ - **Success Criteria** [confidence]: How will success be measured?
38
+ - **Context** [confidence]: Any important background or constraints?
39
+
40
+ 3. Generate TWO outputs:
21
41
 
22
42
  **Mini-PRD** (structured document):
23
43
  ```markdown
@@ -52,12 +72,18 @@ You are analyzing the conversation history and extracting optimized requirements
52
72
  [Success criteria and any important context]
53
73
  ```
54
74
 
55
- 3. **CLEAR Framework Optimization** (automatic):
56
- - After extracting the optimized prompt, it's analyzed using CLEAR framework
57
- - Applies Conciseness, Logic, and Explicitness enhancements
58
- - Displays both raw extraction and CLEAR-enhanced version
59
- - Shows CLEAR scores and improvements made
60
- - Saves CLEAR-optimized version as `clear-optimized-prompt.md`
75
+ 3. **CLEAR Framework Optimization** (automatic with labeled improvements):
76
+ - After extracting the optimized prompt, analyze using CLEAR framework
77
+ - Apply Conciseness, Logic, and Explicitness enhancements
78
+ - **Label all improvements** with CLEAR component tags:
79
+ - **[C]**: "Removed 12 conversational words, reduced from 45 to 28 words"
80
+ - **[L]**: "Restructured flow: context → requirements → constraints → success criteria"
81
+ - **[E]**: "Added explicit output format (React component), persona (senior dev), success metrics (load time < 2s)"
82
+ - Display both raw extraction and CLEAR-enhanced version
83
+ - Show CLEAR scores (before/after) and labeled improvements
84
+ - Save both versions:
85
+ - `optimized-prompt.md` (raw extraction)
86
+ - `clear-optimized-prompt.md` (CLEAR-enhanced with improvement notes)
61
87
 
62
88
  4. Highlight key insights discovered during the conversation.
63
89
 
@@ -78,12 +104,26 @@ You are analyzing the conversation history and extracting optimized requirements
78
104
 
79
105
  ## Quality Checks
80
106
 
81
- - Clear objective stated
82
- - Specific, actionable requirements
83
- - Technical constraints identified
84
- - Success criteria defined
85
- - User needs considered
86
- - CLEAR framework applied for AI consumption
107
+ - Clear objective stated
108
+ - Specific, actionable requirements
109
+ - Technical constraints identified
110
+ - Success criteria defined
111
+ - User needs considered
112
+ - CLEAR framework applied for AI consumption
113
+
114
+ ## Workflow Navigation
115
+
116
+ **You are here:** Summarize (Conversation Extraction)
117
+
118
+ **Common workflows:**
119
+ - **Standard flow**: `/clavix:start` → [conversation] → `/clavix:summarize` → Use CLEAR-optimized prompt
120
+ - **To implementation**: `/clavix:summarize` → `/clavix:plan` → `/clavix:implement` → `/clavix:archive`
121
+ - **Standalone use**: [Any conversation] → `/clavix:summarize` → Extract and optimize
122
+
123
+ **Related commands:**
124
+ - `/clavix:start` - Begin conversational exploration (typical previous step)
125
+ - `/clavix:plan` - Generate tasks from extracted mini-PRD (next step)
126
+ - `/clavix:fast` or `/clavix:deep` - Further optimize the extracted prompt
87
127
 
88
128
  ## Example
89
129
 
@@ -97,3 +137,43 @@ Technical stack: React + TypeScript frontend, integrate with existing Salesforce
97
137
 
98
138
  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.
99
139
  ```
140
+
141
+ ## Troubleshooting
142
+
143
+ ### Issue: Pre-extraction validation fails (missing objective/requirements)
144
+ **Cause**: Conversation didn't cover enough detail
145
+ **Solution** (inline - DO NOT extract):
146
+ - List what's missing specifically
147
+ - Ask targeted questions to fill gaps
148
+ - Only proceed to extraction after minimum viable requirements met
149
+ - Show confidence indicators for what WAS discussed
150
+
151
+ ### Issue: Conversation covered multiple unrelated topics
152
+ **Cause**: Exploratory discussion without focus
153
+ **Solution**:
154
+ - Ask user which topic to extract/focus on
155
+ - Or extract all topics separately into different sections
156
+ - Mark multi-topic extraction with [MULTI-TOPIC] indicator
157
+ - Suggest breaking into separate PRDs for each topic
158
+
159
+ ### Issue: CLEAR optimization doesn't significantly improve extracted prompt
160
+ **Cause**: Conversation was already well-structured and detailed
161
+ **Solution**:
162
+ - Minor improvements are normal for good conversations
163
+ - Show CLEAR scores (should be high: >80%)
164
+ - Still provide both versions but note that original extraction was already CLEAR
165
+
166
+ ### Issue: Low confidence indicators across all extracted elements
167
+ **Cause**: Conversation was too vague or high-level
168
+ **Solution** (inline):
169
+ - Don't just extract with [LOW] markers everywhere
170
+ - Ask follow-up questions to increase confidence
171
+ - Or inform user: "Our conversation was exploratory. I recommend `/clavix:start` to go deeper, or `/clavix:prd` for structured planning"
172
+
173
+ ### Issue: Extracted prompt contradicts earlier conversation
174
+ **Cause**: Requirements evolved during conversation
175
+ **Solution**:
176
+ - Use latest/final version of requirements
177
+ - Note that requirements evolved
178
+ - Ask user to confirm which version is correct
179
+ - Suggest starting fresh with `/clavix:prd` if major contradictions exist
@@ -1,5 +1,6 @@
1
1
  description = "Archive completed PRD projects"
2
2
  prompt = """
3
+
3
4
  # Clavix Archive - PRD Project Archival
4
5
 
5
6
  You are helping the user archive completed PRD projects to keep their workspace organized.
@@ -44,7 +45,33 @@ You are helping the user archive completed PRD projects to keep their workspace
44
45
  - User wants to archive work-in-progress
45
46
  - Tasks are incomplete but project is done
46
47
 
47
- 5. **List Archived Projects**:
48
+ 5. **Delete Project (Permanent Removal)**: **DESTRUCTIVE ACTION**
49
+ ```bash
50
+ clavix archive [project-name] --delete
51
+ ```
52
+
53
+ **WARNING**: This PERMANENTLY deletes the project. Cannot be restored.
54
+
55
+ **When to delete vs archive:**
56
+ - **DELETE**: Failed experiments, duplicate projects, test/demo data, abandoned prototypes with no value
57
+ - **ARCHIVE**: Completed work, incomplete but potentially useful work, anything you might reference later
58
+
59
+ **Delete decision tree:**
60
+ ```
61
+ Is this a failed experiment with no learning value? → DELETE
62
+ Is this a duplicate/test project with no unique info? → DELETE
63
+ Might you need to reference this code later? → ARCHIVE
64
+ Could this be useful for learning/reference? → ARCHIVE
65
+ Are you unsure? → ARCHIVE (safe default)
66
+ ```
67
+
68
+ **Safety confirmation required:**
69
+ - Shows project details and task status
70
+ - Requires typing project name to confirm
71
+ - Warns about permanent deletion
72
+ - Lists what will be permanently deleted
73
+
74
+ 6. **List Archived Projects**:
48
75
  ```bash
49
76
  clavix archive --list
50
77
  ```
@@ -60,14 +87,14 @@ You are helping the user archive completed PRD projects to keep their workspace
60
87
 
61
88
  ## When to Archive
62
89
 
63
- **Good times to archive**:
90
+ **Good times to archive:**
64
91
  - All implementation tasks are completed (`tasks.md` shows 100%)
65
92
  - Project has been deployed/shipped to production
66
93
  - Feature is complete and no more work planned
67
94
  - User explicitly requests archival
68
95
  - Old/abandoned projects that won't be continued
69
96
 
70
- **Don't archive when**:
97
+ **Don't archive when:**
71
98
  - Tasks are still in progress (unless using --force)
72
99
  - Project is actively being worked on
73
100
  - Future enhancements are planned in current tasks
@@ -128,6 +155,29 @@ You: "I'll restore it from the archive"
128
155
  Result: Project moved back to .clavix/outputs/user-authentication-system/
129
156
  ```
130
157
 
158
+ ### Workflow 4: Delete Failed Experiment
159
+ ```
160
+ User: "I have a test project 'api-experiment-1' that I don't need anymore"
161
+ You: "Is this something you might reference later, or can it be permanently deleted?"
162
+
163
+ User: "It was just a quick test, no value. Delete it."
164
+ You: "This will permanently delete the project. I'll run the delete command."
165
+
166
+ Run: clavix archive api-experiment-1 --delete
167
+
168
+ System shows:
169
+ Project: api-experiment-1
170
+ Tasks: 3/5 completed
171
+ Files: full-prd.md, quick-prd.md, tasks.md
172
+
173
+ WARNING: This action is PERMANENT and CANNOT be undone.
174
+ Type the project name to confirm deletion: _
175
+
176
+ User types: api-experiment-1
177
+
178
+ Result: Project permanently deleted from .clavix/outputs/api-experiment-1/
179
+ ```
180
+
131
181
  ## AI Agent Guidelines
132
182
 
133
183
  When user mentions archiving or cleaning up projects:
@@ -152,6 +202,28 @@ When user mentions archiving or cleaning up projects:
152
202
  - Use `clavix archive --list` to show what's archived
153
203
  - Offer to restore if needed
154
204
 
205
+ 5. **Handle delete requests carefully**:
206
+ - Always ask if they want to delete or archive
207
+ - Explain that delete is permanent and irreversible
208
+ - Suggest archive as the safer default
209
+ - Use decision tree to help user decide
210
+ - Only proceed with `--delete` after clear confirmation
211
+ - Double-check it's truly no-value content (failed experiments, duplicates)
212
+
213
+ ## Workflow Navigation
214
+
215
+ **You are here:** Archive (Project Cleanup)
216
+
217
+ **Common workflows:**
218
+ - **Complete workflow**: `/clavix:implement` → [all tasks done] → `/clavix:archive` → Clean workspace
219
+ - **Review and archive**: `/clavix:archive` → [select completed project] → Archive
220
+ - **Restore old work**: `/clavix:archive --list` → `/clavix:archive --restore [project]` → Resume
221
+
222
+ **Related commands:**
223
+ - `/clavix:implement` - Complete remaining tasks before archiving
224
+ - `/clavix:plan` - Review task completion status
225
+ - `/clavix:prd` - Start new project after archiving old one
226
+
155
227
  ## Tips
156
228
 
157
229
  - Archive keeps your active projects list clean and focused
@@ -159,4 +231,60 @@ When user mentions archiving or cleaning up projects:
159
231
  - Archive is searchable - you can still `grep` or find files in archive/
160
232
  - Regular archiving improves `/clavix:plan` and `/clavix:implement` performance
161
233
  - Use `--list` regularly to know what's been archived
162
- """
234
+
235
+ ## Troubleshooting
236
+
237
+ ### Issue: No projects available to archive
238
+ **Cause**: No projects in `.clavix/outputs/` OR all already archived
239
+ **Solution**:
240
+ - Run `clavix archive --list` to see archived projects
241
+ - Check `.clavix/outputs/` for active projects
242
+ - If none exist, no action needed
243
+
244
+ ### Issue: Trying to archive project with incomplete tasks
245
+ **Cause**: User wants to archive but tasks aren't 100% done
246
+ **Solution** (inline):
247
+ - Warn: "Project has X incomplete tasks. Archive anyway?"
248
+ - Show which tasks are incomplete
249
+ - Suggest `--force` flag if user confirms
250
+ - Recommend completing tasks first if they're actually unfinished (not scope-changed)
251
+
252
+ ### Issue: Cannot restore archived project (name conflict)
253
+ **Cause**: Project with same name already exists in active outputs
254
+ **Solution**:
255
+ - Error: "Project '[name]' already exists in active outputs"
256
+ - Suggest renaming one of them
257
+ - Or archive the active one first, then restore
258
+ - Or restore to different name (if CLI supports it)
259
+
260
+ ### Issue: Unsure whether to delete or archive
261
+ **Cause**: User wants to clean up but uncertain about permanence
262
+ **Solution**:
263
+ - Use the decision tree in template
264
+ - Default recommendation: ARCHIVE (safer)
265
+ - Only suggest delete for: duplicates, failed experiments, test data
266
+ - Remind: Archive is free, disk space is cheap, regret is expensive
267
+
268
+ ### Issue: Accidentally deleted project (used --delete instead of archive)
269
+ **Cause**: User error or misunderstanding of --delete flag
270
+ **Solution**:
271
+ - Cannot be recovered from Clavix
272
+ - Check if git history exists (if code was committed)
273
+ - Check if user has backups
274
+ - Learn: Use archive by default, delete only when absolutely certain
275
+
276
+ ### Issue: Archive directory getting too large
277
+ **Cause**: Many archived projects accumulating
278
+ **Solution**:
279
+ - Archive is meant to grow - this is normal
280
+ - Projects in archive don't affect performance
281
+ - If truly concerned: Review archive, delete ancient/irrelevant projects
282
+ - Or move very old archives to external backup storage
283
+
284
+ ### Issue: Archived project but forgot what it was about
285
+ **Cause**: No naming convention or time passed
286
+ **Solution**:
287
+ - Read PRD in archived project: `.clavix/outputs/archive/[project]/full-prd.md`
288
+ - PRD contains problem, goal, and features
289
+ - Consider better naming conventions: date-feature format (e.g., "2024-01-user-auth")
290
+ """
@@ -1,5 +1,6 @@
1
1
  description = "Full CLEAR framework analysis (C, L, E, A, R components)"
2
2
  prompt = """
3
+
3
4
  # Clavix Deep Mode - Full CLEAR Framework Analysis
4
5
 
5
6
  You are helping the user perform a comprehensive deep analysis using the full CLEAR Framework (all 5 components: Concise, Logical, Explicit, Adaptive, Reflective).
@@ -28,21 +29,37 @@ An academically-validated prompt engineering framework by Dr. Leo Lo (University
28
29
  - **Adaptiveness [A]**: Multiple variations and approaches
29
30
  - **Reflectiveness [R]**: Full validation and edge case analysis
30
31
 
31
- 3. **Generate Comprehensive Output**:
32
+ 3. **Strategic Scope Detection** (before detailed analysis):
33
+
34
+ **Check for strategic concerns** by identifying keywords/themes:
35
+ - **Architecture**: system design, microservices, monolith, architecture patterns, scalability patterns
36
+ - **Security**: authentication, authorization, encryption, security, OWASP, vulnerabilities, threat model
37
+ - **Scalability**: load balancing, caching, database scaling, performance optimization, high availability
38
+ - **Infrastructure**: deployment, CI/CD, DevOps, cloud infrastructure, containers, orchestration
39
+ - **Business Impact**: ROI, business metrics, KPIs, stakeholder impact, market analysis
40
+
41
+ **If 3+ strategic keywords detected**:
42
+ Ask the user: "I notice this involves strategic decisions around [detected themes]. These topics benefit from PRD-style planning with business context and architectural considerations. Would you like to:
43
+ - Switch to `/clavix:prd` for comprehensive strategic planning (recommended)
44
+ - Continue with deep mode for prompt-level analysis only"
45
+
46
+ **If user chooses to continue**, proceed with deep analysis but remind them at the end that `/clavix:prd` is available for strategic planning.
47
+
48
+ 4. **Generate Comprehensive Output**:
32
49
 
33
- a. **📊 CLEAR Assessment** (all 5 components with scores)
50
+ a. **CLEAR Assessment** (all 5 components with scores)
34
51
 
35
- b. **✨ CLEAR-Optimized Prompt** (applying all components)
52
+ b. **CLEAR-Optimized Prompt** (applying all components)
36
53
 
37
- c. **📝 CLEAR Changes Made** (labeled with [C], [L], [E], [A], [R])
54
+ c. **CLEAR Changes Made** (labeled with [C], [L], [E], [A], [R])
38
55
 
39
- d. **🔄 Adaptive Variations [A]**:
56
+ d. **Adaptive Variations [A]**:
40
57
  - 2-3 alternative phrasings
41
58
  - Alternative structures (user story, job story, structured)
42
59
  - Temperature recommendations
43
60
  - Explain when each approach is most appropriate
44
61
 
45
- e. **🤔 Reflection Checklist [R]**:
62
+ e. **Reflection Checklist [R]**:
46
63
  - Validation steps for accuracy
47
64
  - Edge cases to consider
48
65
  - "What could go wrong" analysis
@@ -59,14 +76,14 @@ An academically-validated prompt engineering framework by Dr. Leo Lo (University
59
76
 
60
77
  ## Deep Mode Features
61
78
 
62
- Include (Full CLEAR Framework):
79
+ **Include (Full CLEAR Framework):**
63
80
  - **[C, L, E]**: All fast mode analysis (conciseness, logic, explicitness)
64
81
  - **[A] Adaptive**: Alternative phrasings, structures, flexibility, temperature
65
82
  - **[R] Reflective**: Validation checklist, edge cases, quality criteria, fact-checking
66
83
  - **CLEAR Assessment**: All 5 component scores
67
84
  - **CLEAR-labeled Changes**: Educational feedback showing which component improved what
68
85
 
69
- Do NOT include (these belong in `/clavix:prd`):
86
+ **Do NOT include (these belong in `/clavix:prd`):**
70
87
  - System architecture recommendations
71
88
  - Security best practices
72
89
  - Scalability strategy
@@ -98,12 +115,12 @@ Output:
98
115
  - How to handle session expiration during active use?
99
116
 
100
117
  ## Implementation Examples
101
- Good:
118
+ **Good:**
102
119
  - Prompt specifies authentication method, error handling, and accessibility requirements
103
120
  - Includes context about existing auth system and integration points
104
121
  - Defines measurable success criteria (load time, accessibility score)
105
122
 
106
- Bad:
123
+ **Bad:**
107
124
  - "Make a login page" - no context, constraints, or success criteria
108
125
  - Missing technical stack and integration requirements
109
126
  - No consideration of security or user experience
@@ -134,6 +151,20 @@ Output:
134
151
  - **Deep mode** (`/clavix:deep`): Full CLEAR (C, L, E, A, R) - comprehensive analysis with alternatives and validation
135
152
  - **PRD mode** (`/clavix:prd`): CLEAR-validated PRD generation - strategic planning with architecture decisions
136
153
 
154
+ ## Workflow Navigation
155
+
156
+ **You are here:** Deep Mode (Comprehensive CLEAR Analysis)
157
+
158
+ **Common workflows:**
159
+ - **Thorough analysis**: `/clavix:deep` → Use optimized prompt + alternatives
160
+ - **Escalate to strategic**: `/clavix:deep` → (detects strategic scope) → `/clavix:prd` → Plan → Implement → Archive
161
+ - **From fast mode**: `/clavix:fast` → (suggests) `/clavix:deep` → Full analysis with A & R components
162
+
163
+ **Related commands:**
164
+ - `/clavix:fast` - Quick CLEAR improvements (C, L, E only)
165
+ - `/clavix:prd` - Strategic PRD generation for architecture/business decisions
166
+ - `/clavix:start` - Conversational mode for exploring unclear requirements
167
+
137
168
  ## Tips
138
169
 
139
170
  - **Apply full CLEAR framework** systematically: all 5 components
@@ -142,4 +173,34 @@ Output:
142
173
  - Use **[A] Adaptive** to explore alternative approaches
143
174
  - Use **[R] Reflective** to identify edge cases and validation needs
144
175
  - For architecture, security, and scalability, recommend `/clavix:prd`
145
- """
176
+
177
+ ## Troubleshooting
178
+
179
+ ### Issue: Strategic scope detected but user wants to continue with deep mode
180
+ **Cause**: User prefers deep analysis over PRD generation
181
+ **Solution**:
182
+ - Proceed with deep mode as requested
183
+ - Remind at end that `/clavix:prd` is available for strategic planning
184
+ - Focus on prompt-level CLEAR analysis, exclude architecture recommendations
185
+
186
+ ### Issue: Too many alternative variations making output overwhelming
187
+ **Cause**: Adaptive component generating many options
188
+ **Solution**:
189
+ - Limit to 2-3 most distinct alternatives
190
+ - Focus on meaningfully different approaches (not minor wording changes)
191
+ - Group similar variations together
192
+
193
+ ### Issue: Reflective validation finding too many edge cases
194
+ **Cause**: Complex prompt with many potential failure modes
195
+ **Solution**:
196
+ - Prioritize most likely or highest-impact edge cases
197
+ - Group related edge cases
198
+ - Suggest documenting all edge cases in PRD for complex projects
199
+
200
+ ### Issue: Deep analysis still feels insufficient for complex project
201
+ **Cause**: Project needs strategic planning, not just prompt analysis
202
+ **Solution**:
203
+ - Switch to `/clavix:prd` for comprehensive planning
204
+ - Deep mode is for prompts, PRD mode is for projects
205
+ - Use PRD workflow: PRD → Plan → Implement
206
+ """
@@ -1,5 +1,6 @@
1
1
  description = "CLEAR-guided quick improvements (C, L, E components)"
2
2
  prompt = """
3
+
3
4
  # Clavix Fast Mode - CLEAR Framework Quick Improvement
4
5
 
5
6
  You are helping the user improve their prompt using Clavix's fast mode, which applies the CLEAR Framework (Concise, Logical, Explicit components) with smart triage.
@@ -26,15 +27,25 @@ An academically-validated prompt engineering framework by Dr. Leo Lo (University
26
27
  - **Logic [L]**: Check sequencing and flow - is information presented coherently?
27
28
  - **Explicitness [E]**: Verify specifications - persona, output format, tone, success criteria
28
29
 
29
- 3. **CLEAR-Aware Smart Triage**: Check if the prompt needs deep analysis:
30
- - Is it less than 20 characters?
31
- - Missing 3+ critical elements (context, tech stack, success criteria, user needs, expected output)?
32
- - Contains vague scope words ("app", "system", "project") without context?
33
- - **Low CLEAR scores** (Conciseness < 60%, Logic < 60%, Explicitness < 50%)
30
+ 3. **CLEAR-Aware Smart Triage**: Use multi-factor content-quality assessment to determine if deep analysis is needed:
31
+
32
+ **Primary Indicators** (CLEAR scores - most important):
33
+ - **Low CLEAR scores**: Conciseness < 60%, Logic < 60%, or Explicitness < 50%
34
+
35
+ **Secondary Indicators** (content quality):
36
+ - **Missing critical elements**: 3+ missing from (context, tech stack, success criteria, user needs, expected output)
37
+ - **Scope clarity**: Contains vague words ("app", "system", "project", "feature") without defining what/who/why
38
+ - **Requirement completeness**: Lacks actionable requirements or measurable outcomes
39
+ - **Context depth**: Extremely brief (<15 words) OR overly verbose (>100 words without structure)
34
40
 
35
- If YES to any: **Recommend `/clavix:deep` instead** and explain which CLEAR component needs deeper analysis. Ask the user if they want to:
36
- - Switch to deep mode (recommended)
37
- - Continue with fast mode (at their own risk)
41
+ **Escalation Decision**:
42
+ - If **Low CLEAR scores** + **2+ Secondary Indicators**: **Strongly recommend `/clavix:deep`**
43
+ - If **Low CLEAR scores** only: **Suggest `/clavix:deep`** but can proceed with fast mode
44
+ - Explain which CLEAR component needs deeper analysis and why
45
+
46
+ Ask the user:
47
+ - Switch to deep mode (recommended when strongly recommended)
48
+ - Continue with fast mode (acceptable for suggestion-level, but at their own risk for strong recommendation)
38
49
 
39
50
  4. Generate a **CLEAR-optimized** structured prompt with these sections:
40
51
  **Objective**: Clear, specific goal
@@ -52,13 +63,13 @@ An academically-validated prompt engineering framework by Dr. Leo Lo (University
52
63
 
53
64
  ## Fast Mode Features
54
65
 
55
- Include (CLEAR C, L, E):
66
+ **Include (CLEAR C, L, E):**
56
67
  - **CLEAR Assessment** (Conciseness, Logic, Explicitness scores with issues)
57
68
  - Single CLEAR-optimized improved prompt
58
69
  - **CLEAR Changes Made** (labeled with [C], [L], [E] components)
59
70
  - Recommendation to use deep mode for Adaptive & Reflective components
60
71
 
61
- Skip (use `/clavix:deep` instead):
72
+ **Skip (use `/clavix:deep` instead):**
62
73
  - **[A] Adaptive**: Alternative phrasings, structures, flexibility
63
74
  - **[R] Reflective**: Validation checklists, edge cases, quality criteria
64
75
  - Strategic analysis (architecture, security - that's for `/clavix:prd`)
@@ -69,9 +80,9 @@ If user provides: "Please could you maybe help me create a login page?"
69
80
 
70
81
  Output:
71
82
  ```
72
- ## 🎯 CLEAR Analysis (Fast Mode)
83
+ ## CLEAR Analysis (Fast Mode)
73
84
 
74
- ### 📊 CLEAR Framework Assessment:
85
+ ### CLEAR Framework Assessment:
75
86
 
76
87
  [C] Conciseness: 45%
77
88
  • 4 unnecessary pleasantries detected ("Please", "could you", "maybe", "help me")
@@ -87,11 +98,11 @@ Output:
87
98
 
88
99
  Overall CLEAR Score: 51% (needs-improvement)
89
100
 
90
- 💡 Recommendation:
101
+ Recommendation:
91
102
  For Adaptive variations (A) and Reflective validation (R), use:
92
103
  clavix deep "<your prompt>"
93
104
 
94
- ### CLEAR-Optimized Prompt:
105
+ ### CLEAR-Optimized Prompt:
95
106
 
96
107
  Objective: Build a secure user authentication login page
97
108
 
@@ -116,13 +127,27 @@ Success Criteria:
116
127
  - Invalid credentials show appropriate errors
117
128
  - Page is accessible via keyboard navigation
118
129
 
119
- ### 📝 CLEAR Changes Made:
130
+ ### CLEAR Changes Made:
120
131
 
121
132
  [C] Removed 4 pleasantries ("Please", "could you", "maybe", "help me"), reduced from 11 words to core intent
122
133
  [L] Structured logical flow: Objective → Requirements → Technical Constraints → Expected Output → Success Criteria
123
134
  [E] Added explicit specifications: React TypeScript persona, component output format, production-ready tone, accessibility criteria
124
135
  ```
125
136
 
137
+ ## Workflow Navigation
138
+
139
+ **You are here:** Fast Mode (Quick CLEAR Improvement)
140
+
141
+ **Common workflows:**
142
+ - **Quick cleanup**: `/clavix:fast` → Use improved prompt
143
+ - **Need more depth**: `/clavix:fast` → (suggests) `/clavix:deep` → Comprehensive analysis
144
+ - **Strategic planning**: `/clavix:fast` → (suggests) `/clavix:prd` → Plan → Implement → Archive
145
+
146
+ **Related commands:**
147
+ - `/clavix:deep` - Full CLEAR analysis (all 5 components: C, L, E, A, R)
148
+ - `/clavix:prd` - Generate PRD for strategic planning
149
+ - `/clavix:start` - Conversational exploration before prompting
150
+
126
151
  ## Tips
127
152
 
128
153
  - **Apply CLEAR framework** systematically: C, L, E components
@@ -131,4 +156,27 @@ Success Criteria:
131
156
  - For comprehensive analysis with [A] and [R], recommend `/clavix:deep`
132
157
  - For strategic planning, recommend `/clavix:prd`
133
158
  - Focus on making prompts **CLEAR** quickly
134
- """
159
+
160
+ ## Troubleshooting
161
+
162
+ ### Issue: Triage keeps recommending deep mode
163
+ **Cause**: Prompt has low CLEAR scores + multiple secondary indicators
164
+ **Solution**:
165
+ - Accept the recommendation - deep mode will provide better analysis
166
+ - OR improve prompt manually before running fast mode again
167
+ - Check which CLEAR component is scoring low and address it
168
+
169
+ ### Issue: Can't determine if prompt is complex enough for deep mode
170
+ **Cause**: Borderline CLEAR scores or unclear content quality
171
+ **Solution**:
172
+ - Err on side of fast mode first
173
+ - If output feels insufficient, escalate to `/clavix:deep`
174
+ - Use triage as guidance, not absolute rule
175
+
176
+ ### Issue: Improved prompt still feels incomplete
177
+ **Cause**: Fast mode only applies C, L, E components
178
+ **Solution**:
179
+ - Use `/clavix:deep` for Adaptive variations and Reflective validation
180
+ - OR use `/clavix:prd` if strategic planning is needed
181
+ - Fast mode is for quick cleanup, not comprehensive analysis
182
+ """