clavix 2.3.0 → 2.4.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 (180) hide show
  1. package/dist/cli/commands/init.js +1 -1
  2. package/dist/core 2/adapters/agents-md-generator.d.ts +26 -0
  3. package/dist/core 2/adapters/agents-md-generator.js +102 -0
  4. package/dist/core 2/adapters/amp-adapter.d.ts +27 -0
  5. package/dist/core 2/adapters/amp-adapter.js +42 -0
  6. package/dist/core 2/adapters/augment-adapter.d.ts +22 -0
  7. package/dist/core 2/adapters/augment-adapter.js +77 -0
  8. package/dist/core 2/adapters/base-adapter.d.ts +45 -0
  9. package/dist/core 2/adapters/base-adapter.js +142 -0
  10. package/dist/core 2/adapters/claude-code-adapter.d.ts +32 -0
  11. package/dist/core 2/adapters/claude-code-adapter.js +116 -0
  12. package/dist/core 2/adapters/cline-adapter.d.ts +34 -0
  13. package/dist/core 2/adapters/cline-adapter.js +52 -0
  14. package/dist/core 2/adapters/codebuddy-adapter.d.ts +24 -0
  15. package/dist/core 2/adapters/codebuddy-adapter.js +82 -0
  16. package/dist/core 2/adapters/codex-adapter.d.ts +24 -0
  17. package/dist/core 2/adapters/codex-adapter.js +79 -0
  18. package/dist/core 2/adapters/copilot-instructions-generator.d.ts +26 -0
  19. package/dist/core 2/adapters/copilot-instructions-generator.js +104 -0
  20. package/dist/core 2/adapters/crush-adapter.d.ts +35 -0
  21. package/dist/core 2/adapters/crush-adapter.js +49 -0
  22. package/dist/core 2/adapters/cursor-adapter.d.ts +25 -0
  23. package/dist/core 2/adapters/cursor-adapter.js +40 -0
  24. package/dist/core 2/adapters/droid-adapter.d.ts +33 -0
  25. package/dist/core 2/adapters/droid-adapter.js +57 -0
  26. package/dist/core 2/adapters/gemini-adapter.d.ts +27 -0
  27. package/dist/core 2/adapters/gemini-adapter.js +90 -0
  28. package/dist/core 2/adapters/kilocode-adapter.d.ts +34 -0
  29. package/dist/core 2/adapters/kilocode-adapter.js +49 -0
  30. package/dist/core 2/adapters/octo-md-generator.d.ts +26 -0
  31. package/dist/core 2/adapters/octo-md-generator.js +102 -0
  32. package/dist/core 2/adapters/opencode-adapter.d.ts +33 -0
  33. package/dist/core 2/adapters/opencode-adapter.js +56 -0
  34. package/dist/core 2/adapters/qwen-adapter.d.ts +27 -0
  35. package/dist/core 2/adapters/qwen-adapter.js +90 -0
  36. package/dist/core 2/adapters/roocode-adapter.d.ts +40 -0
  37. package/dist/core 2/adapters/roocode-adapter.js +68 -0
  38. package/dist/core 2/adapters/warp-md-generator.d.ts +17 -0
  39. package/dist/core 2/adapters/warp-md-generator.js +88 -0
  40. package/dist/core 2/adapters/windsurf-adapter.d.ts +34 -0
  41. package/dist/core 2/adapters/windsurf-adapter.js +49 -0
  42. package/dist/core 2/agent-manager.d.ts +51 -0
  43. package/dist/core 2/agent-manager.js +126 -0
  44. package/dist/core 2/archive-manager.d.ts +100 -0
  45. package/dist/core 2/archive-manager.js +338 -0
  46. package/dist/core 2/conversation-analyzer.d.ts +86 -0
  47. package/dist/core 2/doc-injector.d.ts +51 -0
  48. package/dist/core 2/doc-injector.js +236 -0
  49. package/dist/core 2/git-manager.d.ts +100 -0
  50. package/dist/core 2/git-manager.js +214 -0
  51. package/dist/core 2/prompt-optimizer.d.ts +268 -0
  52. package/dist/core 2/prompt-optimizer.js +963 -0
  53. package/dist/core 2/question-engine.d.ts +167 -0
  54. package/dist/core 2/question-engine.js +395 -0
  55. package/dist/core 2/session-manager.d.ts +139 -0
  56. package/dist/core 2/session-manager.js +403 -0
  57. package/dist/core 2/task-manager.d.ts +155 -0
  58. package/dist/core 2/task-manager.js +689 -0
  59. package/dist/utils/template-loader.js +24 -22
  60. package/package.json +1 -1
  61. package/dist/templates/slash-commands/augment/archive.md +0 -291
  62. package/dist/templates/slash-commands/augment/deep.md +0 -207
  63. package/dist/templates/slash-commands/augment/fast.md +0 -183
  64. package/dist/templates/slash-commands/augment/implement.md +0 -267
  65. package/dist/templates/slash-commands/augment/plan.md +0 -173
  66. package/dist/templates/slash-commands/augment/prd.md +0 -178
  67. package/dist/templates/slash-commands/augment/start.md +0 -142
  68. package/dist/templates/slash-commands/augment/summarize.md +0 -179
  69. package/dist/templates/slash-commands/claude-code/archive.md +0 -291
  70. package/dist/templates/slash-commands/claude-code/deep.md +0 -207
  71. package/dist/templates/slash-commands/claude-code/fast.md +0 -183
  72. package/dist/templates/slash-commands/claude-code/implement.md +0 -267
  73. package/dist/templates/slash-commands/claude-code/plan.md +0 -173
  74. package/dist/templates/slash-commands/claude-code/prd.md +0 -178
  75. package/dist/templates/slash-commands/claude-code/start.md +0 -142
  76. package/dist/templates/slash-commands/claude-code/summarize.md +0 -179
  77. package/dist/templates/slash-commands/cline/archive.md +0 -291
  78. package/dist/templates/slash-commands/cline/deep.md +0 -207
  79. package/dist/templates/slash-commands/cline/fast.md +0 -183
  80. package/dist/templates/slash-commands/cline/implement.md +0 -267
  81. package/dist/templates/slash-commands/cline/plan.md +0 -173
  82. package/dist/templates/slash-commands/cline/prd.md +0 -178
  83. package/dist/templates/slash-commands/cline/start.md +0 -142
  84. package/dist/templates/slash-commands/cline/summarize.md +0 -179
  85. package/dist/templates/slash-commands/codebuddy/archive.md +0 -291
  86. package/dist/templates/slash-commands/codebuddy/deep.md +0 -207
  87. package/dist/templates/slash-commands/codebuddy/fast.md +0 -183
  88. package/dist/templates/slash-commands/codebuddy/implement.md +0 -267
  89. package/dist/templates/slash-commands/codebuddy/plan.md +0 -173
  90. package/dist/templates/slash-commands/codebuddy/prd.md +0 -178
  91. package/dist/templates/slash-commands/codebuddy/start.md +0 -142
  92. package/dist/templates/slash-commands/codebuddy/summarize.md +0 -179
  93. package/dist/templates/slash-commands/codex/archive.md +0 -291
  94. package/dist/templates/slash-commands/codex/deep.md +0 -207
  95. package/dist/templates/slash-commands/codex/fast.md +0 -183
  96. package/dist/templates/slash-commands/codex/implement.md +0 -267
  97. package/dist/templates/slash-commands/codex/plan.md +0 -173
  98. package/dist/templates/slash-commands/codex/prd.md +0 -178
  99. package/dist/templates/slash-commands/codex/start.md +0 -142
  100. package/dist/templates/slash-commands/codex/summarize.md +0 -179
  101. package/dist/templates/slash-commands/crush/archive.md +0 -291
  102. package/dist/templates/slash-commands/crush/deep.md +0 -207
  103. package/dist/templates/slash-commands/crush/fast.md +0 -183
  104. package/dist/templates/slash-commands/crush/implement.md +0 -267
  105. package/dist/templates/slash-commands/crush/plan.md +0 -173
  106. package/dist/templates/slash-commands/crush/prd.md +0 -178
  107. package/dist/templates/slash-commands/crush/start.md +0 -142
  108. package/dist/templates/slash-commands/crush/summarize.md +0 -179
  109. package/dist/templates/slash-commands/cursor/archive.md +0 -291
  110. package/dist/templates/slash-commands/cursor/deep.md +0 -207
  111. package/dist/templates/slash-commands/cursor/fast.md +0 -183
  112. package/dist/templates/slash-commands/cursor/implement.md +0 -267
  113. package/dist/templates/slash-commands/cursor/plan.md +0 -173
  114. package/dist/templates/slash-commands/cursor/prd.md +0 -178
  115. package/dist/templates/slash-commands/cursor/start.md +0 -142
  116. package/dist/templates/slash-commands/cursor/summarize.md +0 -179
  117. package/dist/templates/slash-commands/droid/archive.md +0 -291
  118. package/dist/templates/slash-commands/droid/deep.md +0 -207
  119. package/dist/templates/slash-commands/droid/fast.md +0 -183
  120. package/dist/templates/slash-commands/droid/implement.md +0 -267
  121. package/dist/templates/slash-commands/droid/plan.md +0 -173
  122. package/dist/templates/slash-commands/droid/prd.md +0 -178
  123. package/dist/templates/slash-commands/droid/start.md +0 -142
  124. package/dist/templates/slash-commands/droid/summarize.md +0 -179
  125. package/dist/templates/slash-commands/gemini/archive.toml +0 -290
  126. package/dist/templates/slash-commands/gemini/deep.toml +0 -206
  127. package/dist/templates/slash-commands/gemini/fast.toml +0 -182
  128. package/dist/templates/slash-commands/gemini/implement.toml +0 -266
  129. package/dist/templates/slash-commands/gemini/plan.toml +0 -170
  130. package/dist/templates/slash-commands/gemini/prd.toml +0 -177
  131. package/dist/templates/slash-commands/gemini/start.toml +0 -141
  132. package/dist/templates/slash-commands/gemini/summarize.toml +0 -178
  133. package/dist/templates/slash-commands/kilocode/archive.md +0 -291
  134. package/dist/templates/slash-commands/kilocode/deep.md +0 -207
  135. package/dist/templates/slash-commands/kilocode/fast.md +0 -183
  136. package/dist/templates/slash-commands/kilocode/implement.md +0 -267
  137. package/dist/templates/slash-commands/kilocode/plan.md +0 -173
  138. package/dist/templates/slash-commands/kilocode/prd.md +0 -178
  139. package/dist/templates/slash-commands/kilocode/start.md +0 -142
  140. package/dist/templates/slash-commands/kilocode/summarize.md +0 -179
  141. package/dist/templates/slash-commands/opencode/archive.md +0 -291
  142. package/dist/templates/slash-commands/opencode/deep.md +0 -207
  143. package/dist/templates/slash-commands/opencode/fast.md +0 -183
  144. package/dist/templates/slash-commands/opencode/implement.md +0 -267
  145. package/dist/templates/slash-commands/opencode/plan.md +0 -173
  146. package/dist/templates/slash-commands/opencode/prd.md +0 -178
  147. package/dist/templates/slash-commands/opencode/start.md +0 -142
  148. package/dist/templates/slash-commands/opencode/summarize.md +0 -179
  149. package/dist/templates/slash-commands/qwen/archive.toml +0 -290
  150. package/dist/templates/slash-commands/qwen/deep.toml +0 -206
  151. package/dist/templates/slash-commands/qwen/fast.toml +0 -182
  152. package/dist/templates/slash-commands/qwen/implement.toml +0 -266
  153. package/dist/templates/slash-commands/qwen/plan.toml +0 -170
  154. package/dist/templates/slash-commands/qwen/prd.toml +0 -177
  155. package/dist/templates/slash-commands/qwen/start.toml +0 -141
  156. package/dist/templates/slash-commands/qwen/summarize.toml +0 -178
  157. package/dist/templates/slash-commands/roocode/archive.md +0 -291
  158. package/dist/templates/slash-commands/roocode/deep.md +0 -207
  159. package/dist/templates/slash-commands/roocode/fast.md +0 -183
  160. package/dist/templates/slash-commands/roocode/implement.md +0 -267
  161. package/dist/templates/slash-commands/roocode/plan.md +0 -173
  162. package/dist/templates/slash-commands/roocode/prd.md +0 -178
  163. package/dist/templates/slash-commands/roocode/start.md +0 -142
  164. package/dist/templates/slash-commands/roocode/summarize.md +0 -179
  165. package/dist/templates/slash-commands/windsurf/archive.md +0 -291
  166. package/dist/templates/slash-commands/windsurf/deep.md +0 -207
  167. package/dist/templates/slash-commands/windsurf/fast.md +0 -183
  168. package/dist/templates/slash-commands/windsurf/implement.md +0 -267
  169. package/dist/templates/slash-commands/windsurf/plan.md +0 -173
  170. package/dist/templates/slash-commands/windsurf/prd.md +0 -178
  171. package/dist/templates/slash-commands/windsurf/start.md +0 -142
  172. package/dist/templates/slash-commands/windsurf/summarize.md +0 -179
  173. /package/dist/templates/slash-commands/{amp → _canonical}/archive.md +0 -0
  174. /package/dist/templates/slash-commands/{amp → _canonical}/deep.md +0 -0
  175. /package/dist/templates/slash-commands/{amp → _canonical}/fast.md +0 -0
  176. /package/dist/templates/slash-commands/{amp → _canonical}/implement.md +0 -0
  177. /package/dist/templates/slash-commands/{amp → _canonical}/plan.md +0 -0
  178. /package/dist/templates/slash-commands/{amp → _canonical}/prd.md +0 -0
  179. /package/dist/templates/slash-commands/{amp → _canonical}/start.md +0 -0
  180. /package/dist/templates/slash-commands/{amp → _canonical}/summarize.md +0 -0
@@ -1,290 +0,0 @@
1
- description = "Archive completed PRD projects"
2
- prompt = """
3
-
4
- # Clavix Archive - PRD Project Archival
5
-
6
- You are helping the user archive completed PRD projects to keep their workspace organized.
7
-
8
- ## Instructions
9
-
10
- 1. **Understanding Archive**:
11
- - Archives move completed PRD projects from `.clavix/outputs/` to `.clavix/outputs/archive/`
12
- - Archived projects are no longer shown in active project lists
13
- - Projects can be restored from archive if needed
14
- - Only projects with all tasks completed should typically be archived
15
-
16
- 2. **Interactive Archive Mode**:
17
- ```bash
18
- clavix archive
19
- ```
20
-
21
- This will:
22
- - List all PRD projects with 100% tasks completed
23
- - Allow user to select which project to archive
24
- - Confirm before archiving
25
- - Move the project to archive directory
26
-
27
- 3. **Archive Specific Project**:
28
- ```bash
29
- clavix archive [project-name]
30
- ```
31
-
32
- This will:
33
- - Check task completion status
34
- - Warn if tasks are incomplete
35
- - Ask for confirmation
36
- - Archive the specific project
37
-
38
- 4. **Force Archive (Incomplete Tasks)**:
39
- ```bash
40
- clavix archive [project-name] --force
41
- ```
42
-
43
- Use this when:
44
- - Project scope changed and some tasks are no longer relevant
45
- - User wants to archive work-in-progress
46
- - Tasks are incomplete but project is done
47
-
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**:
75
- ```bash
76
- clavix archive --list
77
- ```
78
-
79
- Shows all projects currently in archive with their task completion status
80
-
81
- 6. **Restore from Archive**:
82
- ```bash
83
- clavix archive --restore [project-name]
84
- ```
85
-
86
- Moves a project back from archive to active outputs
87
-
88
- ## When to Archive
89
-
90
- **Good times to archive:**
91
- - All implementation tasks are completed (`tasks.md` shows 100%)
92
- - Project has been deployed/shipped to production
93
- - Feature is complete and no more work planned
94
- - User explicitly requests archival
95
- - Old/abandoned projects that won't be continued
96
-
97
- **Don't archive when:**
98
- - Tasks are still in progress (unless using --force)
99
- - Project is actively being worked on
100
- - Future enhancements are planned in current tasks
101
-
102
- ## Archive Behavior
103
-
104
- **What gets archived:**
105
- - The entire PRD project folder
106
- - All files: PRD.md, PRD-quick.md, tasks.md, .clavix-implement-config.json
107
- - Complete directory structure preserved
108
-
109
- **Where it goes:**
110
- - From: `.clavix/outputs/[project-name]/`
111
- - To: `.clavix/outputs/archive/[project-name]/`
112
-
113
- **What changes:**
114
- - Archived projects won't show in `/clavix:plan` searches
115
- - Archived projects won't show in `/clavix:implement` searches
116
- - They're still accessible in archive directory
117
- - Can be restored at any time
118
-
119
- ## Example Workflows
120
-
121
- ### Workflow 1: Complete Project
122
- ```
123
- User: "I've finished implementing the user authentication feature"
124
- You: "Great! Let me help you archive it."
125
-
126
- Run: clavix archive
127
-
128
- User selects: user-authentication-system
129
- System shows: All 15 tasks completed (100%)
130
- User confirms: Yes, archive it
131
-
132
- Result: Project moved to .clavix/outputs/archive/user-authentication-system/
133
- ```
134
-
135
- ### Workflow 2: Force Archive WIP
136
- ```
137
- User: "We're pivoting, I want to archive the old API design even though tasks aren't done"
138
- You: "I'll archive it with --force"
139
-
140
- Run: clavix archive old-api-design --force
141
-
142
- System shows: 8 incomplete tasks
143
- User confirms: Yes, archive anyway
144
-
145
- Result: Project archived despite incomplete tasks
146
- ```
147
-
148
- ### Workflow 3: Restore Archived Project
149
- ```
150
- User: "Actually, we need to revisit that authentication feature"
151
- You: "I'll restore it from the archive"
152
-
153
- Run: clavix archive --restore user-authentication-system
154
-
155
- Result: Project moved back to .clavix/outputs/user-authentication-system/
156
- ```
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
-
181
- ## AI Agent Guidelines
182
-
183
- When user mentions archiving or cleaning up projects:
184
-
185
- 1. **Check completion status first**:
186
- - Run `clavix archive` to see archivable projects
187
- - Review task completion percentages
188
- - Suggest archiving only completed projects
189
-
190
- 2. **Confirm before archiving**:
191
- - Always confirm which project to archive
192
- - Mention the archive location
193
- - Explain that it can be restored
194
-
195
- 3. **Use --force cautiously**:
196
- - Only when user explicitly wants to archive incomplete work
197
- - Explain which tasks will remain incomplete
198
- - Confirm they won't lose data (just moving location)
199
-
200
- 4. **Suggest restoration**:
201
- - If user mentions old work, check archive
202
- - Use `clavix archive --list` to show what's archived
203
- - Offer to restore if needed
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
-
227
- ## Tips
228
-
229
- - Archive keeps your active projects list clean and focused
230
- - Archived projects maintain all their data (nothing is deleted)
231
- - Archive is searchable - you can still `grep` or find files in archive/
232
- - Regular archiving improves `/clavix:plan` and `/clavix:implement` performance
233
- - Use `--list` regularly to know what's been archived
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,206 +0,0 @@
1
- description = "Full CLEAR framework analysis (C, L, E, A, R components)"
2
- prompt = """
3
-
4
- # Clavix Deep Mode - Full CLEAR Framework Analysis
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).
7
-
8
- ## CLEAR Framework (Deep Mode)
9
-
10
- **What is CLEAR?**
11
- An academically-validated prompt engineering framework by Dr. Leo Lo (University of New Mexico).
12
-
13
- **Deep Mode Uses ALL Components:**
14
- - **[C] Concise**: Remove verbosity, pleasantries, unnecessary words
15
- - **[L] Logical**: Ensure coherent sequencing (context → requirements → constraints → output)
16
- - **[E] Explicit**: Add persona, format, tone, success criteria
17
- - **[A] Adaptive**: Generate alternative phrasings, structures, flexibility
18
- - **[R] Reflective**: Create validation checklists, edge cases, quality criteria
19
-
20
- ## Instructions
21
-
22
- 1. Take the user's prompt: `{{ARGS}}`
23
-
24
- 2. **Apply Full CLEAR Framework** (C, L, E, A, R):
25
-
26
- - **Conciseness [C]**: Detailed verbosity analysis
27
- - **Logic [L]**: Comprehensive flow analysis
28
- - **Explicitness [E]**: Complete specification check
29
- - **Adaptiveness [A]**: Multiple variations and approaches
30
- - **Reflectiveness [R]**: Full validation and edge case analysis
31
-
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**:
49
-
50
- a. **CLEAR Assessment** (all 5 components with scores)
51
-
52
- b. **CLEAR-Optimized Prompt** (applying all components)
53
-
54
- c. **CLEAR Changes Made** (labeled with [C], [L], [E], [A], [R])
55
-
56
- d. **Adaptive Variations [A]**:
57
- - 2-3 alternative phrasings
58
- - Alternative structures (user story, job story, structured)
59
- - Temperature recommendations
60
- - Explain when each approach is most appropriate
61
-
62
- e. **Reflection Checklist [R]**:
63
- - Validation steps for accuracy
64
- - Edge cases to consider
65
- - "What could go wrong" analysis
66
- - Fact-checking steps
67
- - Quality criteria
68
-
69
- 4. **CLEAR-labeled educational feedback**:
70
- - Label all changes with CLEAR component tags
71
- - Example: "[C] Removed 15 unnecessary pleasantries"
72
- - Example: "[A] See Alternative Structures for 3 different approaches"
73
- - Example: "[R] See Reflection Checklist for 5 validation steps"
74
-
75
- 5. Present everything in comprehensive, CLEAR-organized format.
76
-
77
- ## Deep Mode Features
78
-
79
- **Include (Full CLEAR Framework):**
80
- - **[C, L, E]**: All fast mode analysis (conciseness, logic, explicitness)
81
- - **[A] Adaptive**: Alternative phrasings, structures, flexibility, temperature
82
- - **[R] Reflective**: Validation checklist, edge cases, quality criteria, fact-checking
83
- - **CLEAR Assessment**: All 5 component scores
84
- - **CLEAR-labeled Changes**: Educational feedback showing which component improved what
85
-
86
- **Do NOT include (these belong in `/clavix:prd`):**
87
- - System architecture recommendations
88
- - Security best practices
89
- - Scalability strategy
90
- - Business impact analysis
91
-
92
- ## Example
93
-
94
- If user provides: "Create a login page"
95
-
96
- Output:
97
- ```
98
- ## Analysis
99
- [All fast mode analysis: gaps, ambiguities, strengths, suggestions]
100
-
101
- ## Changes Made
102
- - Added authentication context and user needs
103
- - Specified technical stack and constraints
104
- - Defined success criteria and expected output
105
-
106
- ## Alternative Phrasings
107
- 1. "Implement a user authentication interface that enables secure access to the platform"
108
- 2. "Design and build a login system that validates user credentials and manages sessions"
109
- 3. "Create an authentication flow that allows registered users to access their accounts"
110
-
111
- ## Edge Cases to Consider
112
- - What happens when a user enters incorrect credentials 3+ times?
113
- - How to handle users who've forgotten both email and password?
114
- - What about users trying to log in from a new device?
115
- - How to handle session expiration during active use?
116
-
117
- ## Implementation Examples
118
- **Good:**
119
- - Prompt specifies authentication method, error handling, and accessibility requirements
120
- - Includes context about existing auth system and integration points
121
- - Defines measurable success criteria (load time, accessibility score)
122
-
123
- **Bad:**
124
- - "Make a login page" - no context, constraints, or success criteria
125
- - Missing technical stack and integration requirements
126
- - No consideration of security or user experience
127
-
128
- ## Alternative Prompt Structures
129
- 1. **User Story**: "As a registered user, I want to log into my account so that I can access my personalized dashboard"
130
- → Focuses on user value and benefits
131
-
132
- 2. **Job Story**: "When I visit the app, I want to authenticate securely, so I can access my saved data"
133
- → Emphasizes context and motivation
134
-
135
- 3. **Structured Sections**: Objective, Requirements, Constraints, Success Criteria
136
- → Provides comprehensive organization
137
-
138
- ## What Could Go Wrong
139
- - Without security requirements, implementation might miss OWASP best practices
140
- - Vague "login page" could be interpreted as OAuth, email/password, or social login
141
- - Missing error handling specification could lead to poor UX
142
- - No accessibility requirements might exclude users with disabilities
143
-
144
- ## Improved Prompt
145
- [Structured prompt with all sections]
146
- ```
147
-
148
- ## When to Use Deep vs Fast vs PRD
149
-
150
- - **Fast mode** (`/clavix:fast`): C, L, E components - quick CLEAR cleanup
151
- - **Deep mode** (`/clavix:deep`): Full CLEAR (C, L, E, A, R) - comprehensive analysis with alternatives and validation
152
- - **PRD mode** (`/clavix:prd`): CLEAR-validated PRD generation - strategic planning with architecture decisions
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
-
168
- ## Tips
169
-
170
- - **Apply full CLEAR framework** systematically: all 5 components
171
- - Label all changes with CLEAR components for education
172
- - Deep mode focuses on **prompt-level** CLEAR analysis, not strategic architecture
173
- - Use **[A] Adaptive** to explore alternative approaches
174
- - Use **[R] Reflective** to identify edge cases and validation needs
175
- - For architecture, security, and scalability, recommend `/clavix:prd`
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,182 +0,0 @@
1
- description = "CLEAR-guided quick improvements (C, L, E components)"
2
- prompt = """
3
-
4
- # Clavix Fast Mode - CLEAR Framework Quick Improvement
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.
7
-
8
- ## CLEAR Framework (Fast Mode)
9
-
10
- **What is CLEAR?**
11
- An academically-validated prompt engineering framework by Dr. Leo Lo (University of New Mexico).
12
-
13
- **Fast Mode Uses:**
14
- - **[C] Concise**: Remove verbosity, pleasantries, unnecessary words
15
- - **[L] Logical**: Ensure coherent sequencing (context → requirements → constraints → output)
16
- - **[E] Explicit**: Add persona, format, tone, success criteria
17
-
18
- **Deep Mode Adds:** [A] Adaptive variations, [R] Reflective validation (use `/clavix:deep` for these)
19
-
20
- ## Instructions
21
-
22
- 1. Take the user's prompt: `{{ARGS}}`
23
-
24
- 2. **CLEAR Analysis** - Assess the prompt using three components:
25
-
26
- - **Conciseness [C]**: Identify verbose language, pleasantries ("please", "could you"), unnecessary qualifiers
27
- - **Logic [L]**: Check sequencing and flow - is information presented coherently?
28
- - **Explicitness [E]**: Verify specifications - persona, output format, tone, success criteria
29
-
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)
40
-
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)
49
-
50
- 4. Generate a **CLEAR-optimized** structured prompt with these sections:
51
- **Objective**: Clear, specific goal
52
- **Requirements**: Detailed, actionable requirements
53
- **Technical Constraints**: Technologies, performance needs, integrations
54
- **Expected Output**: What the result should look like
55
- **Success Criteria**: How to measure completion
56
-
57
- 5. **CLEAR Changes Made**: List improvements with CLEAR component labels:
58
- - **[C]** "Removed 15 unnecessary words and pleasantries"
59
- - **[L]** "Restructured: context → requirements → constraints → output"
60
- - **[E]** "Added explicit persona (senior developer), output format (React component), tone (production-ready)"
61
-
62
- 6. Present the CLEAR-optimized prompt in a code block for easy copying.
63
-
64
- ## Fast Mode Features
65
-
66
- **Include (CLEAR C, L, E):**
67
- - **CLEAR Assessment** (Conciseness, Logic, Explicitness scores with issues)
68
- - Single CLEAR-optimized improved prompt
69
- - **CLEAR Changes Made** (labeled with [C], [L], [E] components)
70
- - Recommendation to use deep mode for Adaptive & Reflective components
71
-
72
- **Skip (use `/clavix:deep` instead):**
73
- - **[A] Adaptive**: Alternative phrasings, structures, flexibility
74
- - **[R] Reflective**: Validation checklists, edge cases, quality criteria
75
- - Strategic analysis (architecture, security - that's for `/clavix:prd`)
76
-
77
- ## Example
78
-
79
- If user provides: "Please could you maybe help me create a login page?"
80
-
81
- Output:
82
- ```
83
- ## CLEAR Analysis (Fast Mode)
84
-
85
- ### CLEAR Framework Assessment:
86
-
87
- [C] Conciseness: 45%
88
- • 4 unnecessary pleasantries detected ("Please", "could you", "maybe", "help me")
89
- • Low signal-to-noise ratio (core request is only 4 words)
90
-
91
- [L] Logic: 85%
92
- • Single request, coherent but minimal
93
- • Suggested flow: Context → Requirements → Constraints → Output
94
-
95
- [E] Explicitness: 25%
96
- • Missing: persona, output format, tone, success criteria, technical constraints
97
- • No authentication context specified
98
-
99
- Overall CLEAR Score: 51% (needs-improvement)
100
-
101
- Recommendation:
102
- For Adaptive variations (A) and Reflective validation (R), use:
103
- clavix deep "<your prompt>"
104
-
105
- ### CLEAR-Optimized Prompt:
106
-
107
- Objective: Build a secure user authentication login page
108
-
109
- Requirements:
110
- - Email and password input fields with validation
111
- - "Remember me" checkbox
112
- - "Forgot password" link
113
- - Clear error messages for invalid credentials
114
- - Responsive design for mobile and desktop
115
-
116
- Technical Constraints:
117
- - Use React with TypeScript
118
- - Integrate with existing JWT authentication API
119
- - Follow WCAG 2.1 AA accessibility standards
120
-
121
- Expected Output:
122
- - Fully functional login component
123
- - Unit tests with >80% coverage
124
-
125
- Success Criteria:
126
- - Users can log in successfully
127
- - Invalid credentials show appropriate errors
128
- - Page is accessible via keyboard navigation
129
-
130
- ### CLEAR Changes Made:
131
-
132
- [C] Removed 4 pleasantries ("Please", "could you", "maybe", "help me"), reduced from 11 words to core intent
133
- [L] Structured logical flow: Objective → Requirements → Technical Constraints → Expected Output → Success Criteria
134
- [E] Added explicit specifications: React TypeScript persona, component output format, production-ready tone, accessibility criteria
135
- ```
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
-
151
- ## Tips
152
-
153
- - **Apply CLEAR framework** systematically: C, L, E components
154
- - Use **CLEAR-aware triage** to prevent inadequate analysis
155
- - Label all changes with CLEAR components for education
156
- - For comprehensive analysis with [A] and [R], recommend `/clavix:deep`
157
- - For strategic planning, recommend `/clavix:prd`
158
- - Focus on making prompts **CLEAR** quickly
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
- """