clavix 2.1.2 → 2.2.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 (130) hide show
  1. package/README.md +1 -1
  2. package/dist/templates/slash-commands/amp/archive.md +130 -3
  3. package/dist/templates/slash-commands/amp/deep.md +70 -10
  4. package/dist/templates/slash-commands/amp/fast.md +62 -15
  5. package/dist/templates/slash-commands/amp/implement.md +147 -2
  6. package/dist/templates/slash-commands/amp/plan.md +103 -7
  7. package/dist/templates/slash-commands/amp/prd.md +111 -13
  8. package/dist/templates/slash-commands/amp/start.md +77 -1
  9. package/dist/templates/slash-commands/amp/summarize.md +101 -21
  10. package/dist/templates/slash-commands/augment/archive.md +131 -4
  11. package/dist/templates/slash-commands/augment/deep.md +71 -11
  12. package/dist/templates/slash-commands/augment/fast.md +63 -16
  13. package/dist/templates/slash-commands/augment/implement.md +148 -3
  14. package/dist/templates/slash-commands/augment/plan.md +104 -8
  15. package/dist/templates/slash-commands/augment/prd.md +106 -8
  16. package/dist/templates/slash-commands/augment/start.md +78 -2
  17. package/dist/templates/slash-commands/augment/summarize.md +101 -21
  18. package/dist/templates/slash-commands/claude-code/archive.md +130 -3
  19. package/dist/templates/slash-commands/claude-code/deep.md +70 -10
  20. package/dist/templates/slash-commands/claude-code/fast.md +62 -15
  21. package/dist/templates/slash-commands/claude-code/implement.md +147 -2
  22. package/dist/templates/slash-commands/claude-code/plan.md +103 -7
  23. package/dist/templates/slash-commands/claude-code/prd.md +111 -13
  24. package/dist/templates/slash-commands/claude-code/start.md +77 -1
  25. package/dist/templates/slash-commands/claude-code/summarize.md +101 -21
  26. package/dist/templates/slash-commands/cline/archive.md +130 -3
  27. package/dist/templates/slash-commands/cline/deep.md +70 -10
  28. package/dist/templates/slash-commands/cline/fast.md +62 -15
  29. package/dist/templates/slash-commands/cline/implement.md +147 -2
  30. package/dist/templates/slash-commands/cline/plan.md +103 -7
  31. package/dist/templates/slash-commands/cline/prd.md +111 -13
  32. package/dist/templates/slash-commands/cline/start.md +77 -1
  33. package/dist/templates/slash-commands/cline/summarize.md +101 -21
  34. package/dist/templates/slash-commands/codebuddy/archive.md +130 -3
  35. package/dist/templates/slash-commands/codebuddy/deep.md +70 -10
  36. package/dist/templates/slash-commands/codebuddy/fast.md +62 -15
  37. package/dist/templates/slash-commands/codebuddy/implement.md +147 -2
  38. package/dist/templates/slash-commands/codebuddy/plan.md +103 -7
  39. package/dist/templates/slash-commands/codebuddy/prd.md +111 -13
  40. package/dist/templates/slash-commands/codebuddy/start.md +77 -1
  41. package/dist/templates/slash-commands/codebuddy/summarize.md +101 -21
  42. package/dist/templates/slash-commands/codex/archive.md +130 -3
  43. package/dist/templates/slash-commands/codex/deep.md +70 -10
  44. package/dist/templates/slash-commands/codex/fast.md +62 -15
  45. package/dist/templates/slash-commands/codex/implement.md +147 -2
  46. package/dist/templates/slash-commands/codex/plan.md +103 -7
  47. package/dist/templates/slash-commands/codex/prd.md +111 -13
  48. package/dist/templates/slash-commands/codex/start.md +77 -1
  49. package/dist/templates/slash-commands/codex/summarize.md +101 -21
  50. package/dist/templates/slash-commands/copilot/archive.agent.md +130 -3
  51. package/dist/templates/slash-commands/copilot/deep.agent.md +70 -10
  52. package/dist/templates/slash-commands/copilot/fast.agent.md +62 -15
  53. package/dist/templates/slash-commands/copilot/implement.agent.md +147 -2
  54. package/dist/templates/slash-commands/copilot/plan.agent.md +114 -10
  55. package/dist/templates/slash-commands/copilot/prd.agent.md +111 -13
  56. package/dist/templates/slash-commands/copilot/start.agent.md +77 -1
  57. package/dist/templates/slash-commands/copilot/summarize.agent.md +101 -21
  58. package/dist/templates/slash-commands/crush/archive.md +130 -3
  59. package/dist/templates/slash-commands/crush/deep.md +70 -10
  60. package/dist/templates/slash-commands/crush/fast.md +62 -15
  61. package/dist/templates/slash-commands/crush/implement.md +147 -2
  62. package/dist/templates/slash-commands/crush/plan.md +103 -7
  63. package/dist/templates/slash-commands/crush/prd.md +111 -13
  64. package/dist/templates/slash-commands/crush/start.md +77 -1
  65. package/dist/templates/slash-commands/crush/summarize.md +101 -21
  66. package/dist/templates/slash-commands/cursor/archive.md +130 -3
  67. package/dist/templates/slash-commands/cursor/deep.md +70 -10
  68. package/dist/templates/slash-commands/cursor/fast.md +62 -15
  69. package/dist/templates/slash-commands/cursor/implement.md +147 -2
  70. package/dist/templates/slash-commands/cursor/plan.md +103 -7
  71. package/dist/templates/slash-commands/cursor/prd.md +111 -13
  72. package/dist/templates/slash-commands/cursor/start.md +77 -1
  73. package/dist/templates/slash-commands/cursor/summarize.md +101 -21
  74. package/dist/templates/slash-commands/droid/archive.md +130 -3
  75. package/dist/templates/slash-commands/droid/deep.md +70 -10
  76. package/dist/templates/slash-commands/droid/fast.md +62 -15
  77. package/dist/templates/slash-commands/droid/implement.md +147 -2
  78. package/dist/templates/slash-commands/droid/plan.md +103 -7
  79. package/dist/templates/slash-commands/droid/prd.md +111 -13
  80. package/dist/templates/slash-commands/droid/start.md +77 -1
  81. package/dist/templates/slash-commands/droid/summarize.md +101 -21
  82. package/dist/templates/slash-commands/gemini/archive.toml +132 -4
  83. package/dist/templates/slash-commands/gemini/deep.toml +72 -11
  84. package/dist/templates/slash-commands/gemini/fast.toml +64 -16
  85. package/dist/templates/slash-commands/gemini/implement.toml +149 -3
  86. package/dist/templates/slash-commands/gemini/plan.toml +116 -13
  87. package/dist/templates/slash-commands/gemini/prd.toml +107 -8
  88. package/dist/templates/slash-commands/gemini/start.toml +79 -2
  89. package/dist/templates/slash-commands/gemini/summarize.toml +102 -21
  90. package/dist/templates/slash-commands/kilocode/archive.md +130 -3
  91. package/dist/templates/slash-commands/kilocode/deep.md +70 -10
  92. package/dist/templates/slash-commands/kilocode/fast.md +62 -15
  93. package/dist/templates/slash-commands/kilocode/implement.md +147 -2
  94. package/dist/templates/slash-commands/kilocode/plan.md +103 -7
  95. package/dist/templates/slash-commands/kilocode/prd.md +111 -13
  96. package/dist/templates/slash-commands/kilocode/start.md +77 -1
  97. package/dist/templates/slash-commands/kilocode/summarize.md +101 -21
  98. package/dist/templates/slash-commands/opencode/archive.md +130 -3
  99. package/dist/templates/slash-commands/opencode/deep.md +70 -10
  100. package/dist/templates/slash-commands/opencode/fast.md +62 -15
  101. package/dist/templates/slash-commands/opencode/implement.md +147 -2
  102. package/dist/templates/slash-commands/opencode/plan.md +103 -7
  103. package/dist/templates/slash-commands/opencode/prd.md +111 -13
  104. package/dist/templates/slash-commands/opencode/start.md +77 -1
  105. package/dist/templates/slash-commands/opencode/summarize.md +101 -21
  106. package/dist/templates/slash-commands/qwen/archive.toml +132 -4
  107. package/dist/templates/slash-commands/qwen/deep.toml +72 -11
  108. package/dist/templates/slash-commands/qwen/fast.toml +64 -16
  109. package/dist/templates/slash-commands/qwen/implement.toml +149 -3
  110. package/dist/templates/slash-commands/qwen/plan.toml +116 -13
  111. package/dist/templates/slash-commands/qwen/prd.toml +107 -8
  112. package/dist/templates/slash-commands/qwen/start.toml +79 -2
  113. package/dist/templates/slash-commands/qwen/summarize.toml +102 -21
  114. package/dist/templates/slash-commands/roocode/archive.md +130 -3
  115. package/dist/templates/slash-commands/roocode/deep.md +70 -10
  116. package/dist/templates/slash-commands/roocode/fast.md +62 -15
  117. package/dist/templates/slash-commands/roocode/implement.md +147 -2
  118. package/dist/templates/slash-commands/roocode/plan.md +103 -7
  119. package/dist/templates/slash-commands/roocode/prd.md +111 -13
  120. package/dist/templates/slash-commands/roocode/start.md +77 -1
  121. package/dist/templates/slash-commands/roocode/summarize.md +101 -21
  122. package/dist/templates/slash-commands/windsurf/archive.md +130 -3
  123. package/dist/templates/slash-commands/windsurf/deep.md +70 -10
  124. package/dist/templates/slash-commands/windsurf/fast.md +62 -15
  125. package/dist/templates/slash-commands/windsurf/implement.md +147 -2
  126. package/dist/templates/slash-commands/windsurf/plan.md +103 -7
  127. package/dist/templates/slash-commands/windsurf/prd.md +111 -13
  128. package/dist/templates/slash-commands/windsurf/start.md +77 -1
  129. package/dist/templates/slash-commands/windsurf/summarize.md +101 -21
  130. package/package.json +2 -2
package/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # Clavix
2
- > AI prompt improvement & PRD generation CLI (CLEAR Framework)
2
+ > Transform vague ideas into production-ready prompts. Analyze gaps, generate PRDs, and supercharge your AI coding workflow with the CLEAR framework.
3
3
 
4
4
  ## Table of contents
5
5
  - [Why Clavix?](#why-clavix)
@@ -47,7 +47,33 @@ You are helping the user archive completed PRD projects to keep their workspace
47
47
  - User wants to archive work-in-progress
48
48
  - Tasks are incomplete but project is done
49
49
 
50
- 5. **List Archived Projects**:
50
+ 5. **Delete Project (Permanent Removal)**: **DESTRUCTIVE ACTION**
51
+ ```bash
52
+ clavix archive [project-name] --delete
53
+ ```
54
+
55
+ **WARNING**: This PERMANENTLY deletes the project. Cannot be restored.
56
+
57
+ **When to delete vs archive:**
58
+ - **DELETE**: Failed experiments, duplicate projects, test/demo data, abandoned prototypes with no value
59
+ - **ARCHIVE**: Completed work, incomplete but potentially useful work, anything you might reference later
60
+
61
+ **Delete decision tree:**
62
+ ```
63
+ Is this a failed experiment with no learning value? → DELETE
64
+ Is this a duplicate/test project with no unique info? → DELETE
65
+ Might you need to reference this code later? → ARCHIVE
66
+ Could this be useful for learning/reference? → ARCHIVE
67
+ Are you unsure? → ARCHIVE (safe default)
68
+ ```
69
+
70
+ **Safety confirmation required:**
71
+ - Shows project details and task status
72
+ - Requires typing project name to confirm
73
+ - Warns about permanent deletion
74
+ - Lists what will be permanently deleted
75
+
76
+ 6. **List Archived Projects**:
51
77
  ```bash
52
78
  clavix archive --list
53
79
  ```
@@ -63,14 +89,14 @@ You are helping the user archive completed PRD projects to keep their workspace
63
89
 
64
90
  ## When to Archive
65
91
 
66
- **Good times to archive**:
92
+ **Good times to archive:**
67
93
  - All implementation tasks are completed (`tasks.md` shows 100%)
68
94
  - Project has been deployed/shipped to production
69
95
  - Feature is complete and no more work planned
70
96
  - User explicitly requests archival
71
97
  - Old/abandoned projects that won't be continued
72
98
 
73
- **Don't archive when**:
99
+ **Don't archive when:**
74
100
  - Tasks are still in progress (unless using --force)
75
101
  - Project is actively being worked on
76
102
  - Future enhancements are planned in current tasks
@@ -131,6 +157,29 @@ You: "I'll restore it from the archive"
131
157
  Result: Project moved back to .clavix/outputs/user-authentication-system/
132
158
  ```
133
159
 
160
+ ### Workflow 4: Delete Failed Experiment
161
+ ```
162
+ User: "I have a test project 'api-experiment-1' that I don't need anymore"
163
+ You: "Is this something you might reference later, or can it be permanently deleted?"
164
+
165
+ User: "It was just a quick test, no value. Delete it."
166
+ You: "This will permanently delete the project. I'll run the delete command."
167
+
168
+ Run: clavix archive api-experiment-1 --delete
169
+
170
+ System shows:
171
+ Project: api-experiment-1
172
+ Tasks: 3/5 completed
173
+ Files: full-prd.md, quick-prd.md, tasks.md
174
+
175
+ WARNING: This action is PERMANENT and CANNOT be undone.
176
+ Type the project name to confirm deletion: _
177
+
178
+ User types: api-experiment-1
179
+
180
+ Result: Project permanently deleted from .clavix/outputs/api-experiment-1/
181
+ ```
182
+
134
183
  ## AI Agent Guidelines
135
184
 
136
185
  When user mentions archiving or cleaning up projects:
@@ -155,6 +204,28 @@ When user mentions archiving or cleaning up projects:
155
204
  - Use `clavix archive --list` to show what's archived
156
205
  - Offer to restore if needed
157
206
 
207
+ 5. **Handle delete requests carefully**:
208
+ - Always ask if they want to delete or archive
209
+ - Explain that delete is permanent and irreversible
210
+ - Suggest archive as the safer default
211
+ - Use decision tree to help user decide
212
+ - Only proceed with `--delete` after clear confirmation
213
+ - Double-check it's truly no-value content (failed experiments, duplicates)
214
+
215
+ ## Workflow Navigation
216
+
217
+ **You are here:** Archive (Project Cleanup)
218
+
219
+ **Common workflows:**
220
+ - **Complete workflow**: `/clavix:implement` → [all tasks done] → `/clavix:archive` → Clean workspace
221
+ - **Review and archive**: `/clavix:archive` → [select completed project] → Archive
222
+ - **Restore old work**: `/clavix:archive --list` → `/clavix:archive --restore [project]` → Resume
223
+
224
+ **Related commands:**
225
+ - `/clavix:implement` - Complete remaining tasks before archiving
226
+ - `/clavix:plan` - Review task completion status
227
+ - `/clavix:prd` - Start new project after archiving old one
228
+
158
229
  ## Tips
159
230
 
160
231
  - Archive keeps your active projects list clean and focused
@@ -162,3 +233,59 @@ When user mentions archiving or cleaning up projects:
162
233
  - Archive is searchable - you can still `grep` or find files in archive/
163
234
  - Regular archiving improves `/clavix:plan` and `/clavix:implement` performance
164
235
  - Use `--list` regularly to know what's been archived
236
+
237
+ ## Troubleshooting
238
+
239
+ ### Issue: No projects available to archive
240
+ **Cause**: No projects in `.clavix/outputs/` OR all already archived
241
+ **Solution**:
242
+ - Run `clavix archive --list` to see archived projects
243
+ - Check `.clavix/outputs/` for active projects
244
+ - If none exist, no action needed
245
+
246
+ ### Issue: Trying to archive project with incomplete tasks
247
+ **Cause**: User wants to archive but tasks aren't 100% done
248
+ **Solution** (inline):
249
+ - Warn: "Project has X incomplete tasks. Archive anyway?"
250
+ - Show which tasks are incomplete
251
+ - Suggest `--force` flag if user confirms
252
+ - Recommend completing tasks first if they're actually unfinished (not scope-changed)
253
+
254
+ ### Issue: Cannot restore archived project (name conflict)
255
+ **Cause**: Project with same name already exists in active outputs
256
+ **Solution**:
257
+ - Error: "Project '[name]' already exists in active outputs"
258
+ - Suggest renaming one of them
259
+ - Or archive the active one first, then restore
260
+ - Or restore to different name (if CLI supports it)
261
+
262
+ ### Issue: Unsure whether to delete or archive
263
+ **Cause**: User wants to clean up but uncertain about permanence
264
+ **Solution**:
265
+ - Use the decision tree in template
266
+ - Default recommendation: ARCHIVE (safer)
267
+ - Only suggest delete for: duplicates, failed experiments, test data
268
+ - Remind: Archive is free, disk space is cheap, regret is expensive
269
+
270
+ ### Issue: Accidentally deleted project (used --delete instead of archive)
271
+ **Cause**: User error or misunderstanding of --delete flag
272
+ **Solution**:
273
+ - Cannot be recovered from Clavix
274
+ - Check if git history exists (if code was committed)
275
+ - Check if user has backups
276
+ - Learn: Use archive by default, delete only when absolutely certain
277
+
278
+ ### Issue: Archive directory getting too large
279
+ **Cause**: Many archived projects accumulating
280
+ **Solution**:
281
+ - Archive is meant to grow - this is normal
282
+ - Projects in archive don't affect performance
283
+ - If truly concerned: Review archive, delete ancient/irrelevant projects
284
+ - Or move very old archives to external backup storage
285
+
286
+ ### Issue: Archived project but forgot what it was about
287
+ **Cause**: No naming convention or time passed
288
+ **Solution**:
289
+ - Read PRD in archived project: `.clavix/outputs/archive/[project]/full-prd.md`
290
+ - PRD contains problem, goal, and features
291
+ - Consider better naming conventions: date-feature format (e.g., "2024-01-user-auth")
@@ -31,21 +31,37 @@ An academically-validated prompt engineering framework by Dr. Leo Lo (University
31
31
  - **Adaptiveness [A]**: Multiple variations and approaches
32
32
  - **Reflectiveness [R]**: Full validation and edge case analysis
33
33
 
34
- 3. **Generate Comprehensive Output**:
34
+ 3. **Strategic Scope Detection** (before detailed analysis):
35
35
 
36
- a. **📊 CLEAR Assessment** (all 5 components with scores)
36
+ **Check for strategic concerns** by identifying keywords/themes:
37
+ - **Architecture**: system design, microservices, monolith, architecture patterns, scalability patterns
38
+ - **Security**: authentication, authorization, encryption, security, OWASP, vulnerabilities, threat model
39
+ - **Scalability**: load balancing, caching, database scaling, performance optimization, high availability
40
+ - **Infrastructure**: deployment, CI/CD, DevOps, cloud infrastructure, containers, orchestration
41
+ - **Business Impact**: ROI, business metrics, KPIs, stakeholder impact, market analysis
37
42
 
38
- b. **✨ CLEAR-Optimized Prompt** (applying all components)
43
+ **If 3+ strategic keywords detected**:
44
+ 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:
45
+ - Switch to `/clavix:prd` for comprehensive strategic planning (recommended)
46
+ - Continue with deep mode for prompt-level analysis only"
39
47
 
40
- c. **📝 CLEAR Changes Made** (labeled with [C], [L], [E], [A], [R])
48
+ **If user chooses to continue**, proceed with deep analysis but remind them at the end that `/clavix:prd` is available for strategic planning.
41
49
 
42
- d. **🔄 Adaptive Variations [A]**:
50
+ 4. **Generate Comprehensive Output**:
51
+
52
+ a. **CLEAR Assessment** (all 5 components with scores)
53
+
54
+ b. **CLEAR-Optimized Prompt** (applying all components)
55
+
56
+ c. **CLEAR Changes Made** (labeled with [C], [L], [E], [A], [R])
57
+
58
+ d. **Adaptive Variations [A]**:
43
59
  - 2-3 alternative phrasings
44
60
  - Alternative structures (user story, job story, structured)
45
61
  - Temperature recommendations
46
62
  - Explain when each approach is most appropriate
47
63
 
48
- e. **🤔 Reflection Checklist [R]**:
64
+ e. **Reflection Checklist [R]**:
49
65
  - Validation steps for accuracy
50
66
  - Edge cases to consider
51
67
  - "What could go wrong" analysis
@@ -62,14 +78,14 @@ An academically-validated prompt engineering framework by Dr. Leo Lo (University
62
78
 
63
79
  ## Deep Mode Features
64
80
 
65
- Include (Full CLEAR Framework):
81
+ **Include (Full CLEAR Framework):**
66
82
  - **[C, L, E]**: All fast mode analysis (conciseness, logic, explicitness)
67
83
  - **[A] Adaptive**: Alternative phrasings, structures, flexibility, temperature
68
84
  - **[R] Reflective**: Validation checklist, edge cases, quality criteria, fact-checking
69
85
  - **CLEAR Assessment**: All 5 component scores
70
86
  - **CLEAR-labeled Changes**: Educational feedback showing which component improved what
71
87
 
72
- Do NOT include (these belong in `/clavix:prd`):
88
+ **Do NOT include (these belong in `/clavix:prd`):**
73
89
  - System architecture recommendations
74
90
  - Security best practices
75
91
  - Scalability strategy
@@ -101,12 +117,12 @@ Output:
101
117
  - How to handle session expiration during active use?
102
118
 
103
119
  ## Implementation Examples
104
- Good:
120
+ **Good:**
105
121
  - Prompt specifies authentication method, error handling, and accessibility requirements
106
122
  - Includes context about existing auth system and integration points
107
123
  - Defines measurable success criteria (load time, accessibility score)
108
124
 
109
- Bad:
125
+ **Bad:**
110
126
  - "Make a login page" - no context, constraints, or success criteria
111
127
  - Missing technical stack and integration requirements
112
128
  - No consideration of security or user experience
@@ -137,6 +153,20 @@ Output:
137
153
  - **Deep mode** (`/clavix:deep`): Full CLEAR (C, L, E, A, R) - comprehensive analysis with alternatives and validation
138
154
  - **PRD mode** (`/clavix:prd`): CLEAR-validated PRD generation - strategic planning with architecture decisions
139
155
 
156
+ ## Workflow Navigation
157
+
158
+ **You are here:** Deep Mode (Comprehensive CLEAR Analysis)
159
+
160
+ **Common workflows:**
161
+ - **Thorough analysis**: `/clavix:deep` → Use optimized prompt + alternatives
162
+ - **Escalate to strategic**: `/clavix:deep` → (detects strategic scope) → `/clavix:prd` → Plan → Implement → Archive
163
+ - **From fast mode**: `/clavix:fast` → (suggests) `/clavix:deep` → Full analysis with A & R components
164
+
165
+ **Related commands:**
166
+ - `/clavix:fast` - Quick CLEAR improvements (C, L, E only)
167
+ - `/clavix:prd` - Strategic PRD generation for architecture/business decisions
168
+ - `/clavix:start` - Conversational mode for exploring unclear requirements
169
+
140
170
  ## Tips
141
171
 
142
172
  - **Apply full CLEAR framework** systematically: all 5 components
@@ -145,3 +175,33 @@ Output:
145
175
  - Use **[A] Adaptive** to explore alternative approaches
146
176
  - Use **[R] Reflective** to identify edge cases and validation needs
147
177
  - For architecture, security, and scalability, recommend `/clavix:prd`
178
+
179
+ ## Troubleshooting
180
+
181
+ ### Issue: Strategic scope detected but user wants to continue with deep mode
182
+ **Cause**: User prefers deep analysis over PRD generation
183
+ **Solution**:
184
+ - Proceed with deep mode as requested
185
+ - Remind at end that `/clavix:prd` is available for strategic planning
186
+ - Focus on prompt-level CLEAR analysis, exclude architecture recommendations
187
+
188
+ ### Issue: Too many alternative variations making output overwhelming
189
+ **Cause**: Adaptive component generating many options
190
+ **Solution**:
191
+ - Limit to 2-3 most distinct alternatives
192
+ - Focus on meaningfully different approaches (not minor wording changes)
193
+ - Group similar variations together
194
+
195
+ ### Issue: Reflective validation finding too many edge cases
196
+ **Cause**: Complex prompt with many potential failure modes
197
+ **Solution**:
198
+ - Prioritize most likely or highest-impact edge cases
199
+ - Group related edge cases
200
+ - Suggest documenting all edge cases in PRD for complex projects
201
+
202
+ ### Issue: Deep analysis still feels insufficient for complex project
203
+ **Cause**: Project needs strategic planning, not just prompt analysis
204
+ **Solution**:
205
+ - Switch to `/clavix:prd` for comprehensive planning
206
+ - Deep mode is for prompts, PRD mode is for projects
207
+ - Use PRD workflow: PRD → Plan → Implement
@@ -29,15 +29,25 @@ An academically-validated prompt engineering framework by Dr. Leo Lo (University
29
29
  - **Logic [L]**: Check sequencing and flow - is information presented coherently?
30
30
  - **Explicitness [E]**: Verify specifications - persona, output format, tone, success criteria
31
31
 
32
- 3. **CLEAR-Aware Smart Triage**: Check if the prompt needs deep analysis:
33
- - Is it less than 20 characters?
34
- - Missing 3+ critical elements (context, tech stack, success criteria, user needs, expected output)?
35
- - Contains vague scope words ("app", "system", "project") without context?
36
- - **Low CLEAR scores** (Conciseness < 60%, Logic < 60%, Explicitness < 50%)
32
+ 3. **CLEAR-Aware Smart Triage**: Use multi-factor content-quality assessment to determine if deep analysis is needed:
37
33
 
38
- If YES to any: **Recommend `/clavix:deep` instead** and explain which CLEAR component needs deeper analysis. Ask the user if they want to:
39
- - Switch to deep mode (recommended)
40
- - Continue with fast mode (at their own risk)
34
+ **Primary Indicators** (CLEAR scores - most important):
35
+ - **Low CLEAR scores**: Conciseness < 60%, Logic < 60%, or Explicitness < 50%
36
+
37
+ **Secondary Indicators** (content quality):
38
+ - **Missing critical elements**: 3+ missing from (context, tech stack, success criteria, user needs, expected output)
39
+ - **Scope clarity**: Contains vague words ("app", "system", "project", "feature") without defining what/who/why
40
+ - **Requirement completeness**: Lacks actionable requirements or measurable outcomes
41
+ - **Context depth**: Extremely brief (<15 words) OR overly verbose (>100 words without structure)
42
+
43
+ **Escalation Decision**:
44
+ - If **Low CLEAR scores** + **2+ Secondary Indicators**: **Strongly recommend `/clavix:deep`**
45
+ - If **Low CLEAR scores** only: **Suggest `/clavix:deep`** but can proceed with fast mode
46
+ - Explain which CLEAR component needs deeper analysis and why
47
+
48
+ Ask the user:
49
+ - Switch to deep mode (recommended when strongly recommended)
50
+ - Continue with fast mode (acceptable for suggestion-level, but at their own risk for strong recommendation)
41
51
 
42
52
  4. Generate a **CLEAR-optimized** structured prompt with these sections:
43
53
  **Objective**: Clear, specific goal
@@ -55,13 +65,13 @@ An academically-validated prompt engineering framework by Dr. Leo Lo (University
55
65
 
56
66
  ## Fast Mode Features
57
67
 
58
- Include (CLEAR C, L, E):
68
+ **Include (CLEAR C, L, E):**
59
69
  - **CLEAR Assessment** (Conciseness, Logic, Explicitness scores with issues)
60
70
  - Single CLEAR-optimized improved prompt
61
71
  - **CLEAR Changes Made** (labeled with [C], [L], [E] components)
62
72
  - Recommendation to use deep mode for Adaptive & Reflective components
63
73
 
64
- Skip (use `/clavix:deep` instead):
74
+ **Skip (use `/clavix:deep` instead):**
65
75
  - **[A] Adaptive**: Alternative phrasings, structures, flexibility
66
76
  - **[R] Reflective**: Validation checklists, edge cases, quality criteria
67
77
  - Strategic analysis (architecture, security - that's for `/clavix:prd`)
@@ -72,9 +82,9 @@ If user provides: "Please could you maybe help me create a login page?"
72
82
 
73
83
  Output:
74
84
  ```
75
- ## 🎯 CLEAR Analysis (Fast Mode)
85
+ ## CLEAR Analysis (Fast Mode)
76
86
 
77
- ### 📊 CLEAR Framework Assessment:
87
+ ### CLEAR Framework Assessment:
78
88
 
79
89
  [C] Conciseness: 45%
80
90
  • 4 unnecessary pleasantries detected ("Please", "could you", "maybe", "help me")
@@ -90,11 +100,11 @@ Output:
90
100
 
91
101
  Overall CLEAR Score: 51% (needs-improvement)
92
102
 
93
- 💡 Recommendation:
103
+ Recommendation:
94
104
  For Adaptive variations (A) and Reflective validation (R), use:
95
105
  clavix deep "<your prompt>"
96
106
 
97
- ### CLEAR-Optimized Prompt:
107
+ ### CLEAR-Optimized Prompt:
98
108
 
99
109
  Objective: Build a secure user authentication login page
100
110
 
@@ -119,13 +129,27 @@ Success Criteria:
119
129
  - Invalid credentials show appropriate errors
120
130
  - Page is accessible via keyboard navigation
121
131
 
122
- ### 📝 CLEAR Changes Made:
132
+ ### CLEAR Changes Made:
123
133
 
124
134
  [C] Removed 4 pleasantries ("Please", "could you", "maybe", "help me"), reduced from 11 words to core intent
125
135
  [L] Structured logical flow: Objective → Requirements → Technical Constraints → Expected Output → Success Criteria
126
136
  [E] Added explicit specifications: React TypeScript persona, component output format, production-ready tone, accessibility criteria
127
137
  ```
128
138
 
139
+ ## Workflow Navigation
140
+
141
+ **You are here:** Fast Mode (Quick CLEAR Improvement)
142
+
143
+ **Common workflows:**
144
+ - **Quick cleanup**: `/clavix:fast` → Use improved prompt
145
+ - **Need more depth**: `/clavix:fast` → (suggests) `/clavix:deep` → Comprehensive analysis
146
+ - **Strategic planning**: `/clavix:fast` → (suggests) `/clavix:prd` → Plan → Implement → Archive
147
+
148
+ **Related commands:**
149
+ - `/clavix:deep` - Full CLEAR analysis (all 5 components: C, L, E, A, R)
150
+ - `/clavix:prd` - Generate PRD for strategic planning
151
+ - `/clavix:start` - Conversational exploration before prompting
152
+
129
153
  ## Tips
130
154
 
131
155
  - **Apply CLEAR framework** systematically: C, L, E components
@@ -134,3 +158,26 @@ Success Criteria:
134
158
  - For comprehensive analysis with [A] and [R], recommend `/clavix:deep`
135
159
  - For strategic planning, recommend `/clavix:prd`
136
160
  - Focus on making prompts **CLEAR** quickly
161
+
162
+ ## Troubleshooting
163
+
164
+ ### Issue: Triage keeps recommending deep mode
165
+ **Cause**: Prompt has low CLEAR scores + multiple secondary indicators
166
+ **Solution**:
167
+ - Accept the recommendation - deep mode will provide better analysis
168
+ - OR improve prompt manually before running fast mode again
169
+ - Check which CLEAR component is scoring low and address it
170
+
171
+ ### Issue: Can't determine if prompt is complex enough for deep mode
172
+ **Cause**: Borderline CLEAR scores or unclear content quality
173
+ **Solution**:
174
+ - Err on side of fast mode first
175
+ - If output feels insufficient, escalate to `/clavix:deep`
176
+ - Use triage as guidance, not absolute rule
177
+
178
+ ### Issue: Improved prompt still feels incomplete
179
+ **Cause**: Fast mode only applies C, L, E components
180
+ **Solution**:
181
+ - Use `/clavix:deep` for Adaptive variations and Reflective validation
182
+ - OR use `/clavix:prd` if strategic planning is needed
183
+ - Fast mode is for quick cleanup, not comprehensive analysis
@@ -83,7 +83,7 @@ Generated by Clavix /clavix:implement
83
83
 
84
84
  ## Important Rules
85
85
 
86
- **DO**:
86
+ **DO**:
87
87
  - Read tasks.md to find the current task
88
88
  - Implement ONE task at a time
89
89
  - Mark tasks complete by changing `[ ]` to `[x]`
@@ -91,13 +91,88 @@ Generated by Clavix /clavix:implement
91
91
  - Reference the PRD for detailed requirements
92
92
  - Ask for clarification when tasks are ambiguous
93
93
 
94
- **DON'T**:
94
+ **DON'T**:
95
95
  - Skip tasks or implement out of order
96
96
  - Mark tasks complete before actually implementing them
97
97
  - Modify multiple tasks' checkboxes at once (only current task)
98
98
  - Create commits if strategy is 'none'
99
99
  - Assume what code to write - use PRD as source of truth
100
100
 
101
+ ## Task Blocking Protocol
102
+
103
+ **When a task is blocked** (cannot be completed), follow this protocol:
104
+
105
+ ### Step 1: Detect Blocking Issues
106
+
107
+ Common blocking scenarios:
108
+ - **Missing dependencies**: API keys, credentials, external services not available
109
+ - **Unclear requirements**: Task description too vague or conflicts with PRD
110
+ - **External blockers**: Need design assets, content, or third-party integration not ready
111
+ - **Technical blockers**: Required library incompatible, environment issue, access problem
112
+ - **Resource blockers**: Need database, server, or infrastructure not yet set up
113
+
114
+ ### Step 2: Immediate User Communication
115
+
116
+ **Stop implementation and ask user immediately:**
117
+ ```
118
+ "Task blocked: [Task description]
119
+
120
+ Blocking issue: [Specific blocker, e.g., 'Missing Stripe API key for payment integration']
121
+
122
+ Options to proceed:
123
+ 1. **Provide missing resource** - [What user needs to provide]
124
+ 2. **Break into sub-tasks** - I can implement [unblocked parts] now and defer [blocked part]
125
+ 3. **Skip for now** - Mark as [BLOCKED], continue with next task, return later
126
+
127
+ Which option would you like?"
128
+ ```
129
+
130
+ ### Step 3: Resolution Strategies
131
+
132
+ **Option A: User Provides Resource**
133
+ - Wait for user to provide (API key, design, clarification)
134
+ - Once provided, continue with task implementation
135
+
136
+ **Option B: Create Sub-Tasks** (preferred when possible)
137
+ - Identify what CAN be done without the blocker
138
+ - Break task into unblocked sub-tasks
139
+ - Example: "Implement payment integration" →
140
+ - [x] Create payment service interface (can do now)
141
+ - [ ] [BLOCKED: Need Stripe API key] Integrate Stripe SDK
142
+ - [ ] Add payment UI components (can do now)
143
+ - Implement unblocked sub-tasks, mark blocked ones with [BLOCKED] tag
144
+
145
+ **Option C: Skip and Mark Blocked**
146
+ - Add [BLOCKED] tag to task in tasks.md: `- [ ] [BLOCKED: Missing API key] Task description`
147
+ - Note the blocker reason
148
+ - Move to next task
149
+ - Return to blocked tasks when unblocked
150
+
151
+ ### Step 4: Track Blocked Tasks
152
+
153
+ **In tasks.md, use [BLOCKED] notation:**
154
+ ```markdown
155
+ ## Phase 2: Integration
156
+ - [x] Create API client structure
157
+ - [ ] [BLOCKED: Waiting for API endpoint spec] Implement data sync
158
+ - [ ] Add error handling for API calls
159
+ ```
160
+
161
+ **At end of implement session:**
162
+ - List all blocked tasks
163
+ - Remind user what's needed to unblock each one
164
+ - Suggest next steps
165
+
166
+ ### Common Blocking Scenarios & Resolutions
167
+
168
+ | Blocker Type | Detection | Resolution |
169
+ |--------------|-----------|------------|
170
+ | Missing API key/credentials | Code requires authentication | Ask user for credentials OR stub with mock for now |
171
+ | Vague requirements | Unclear what to implement | Ask specific questions OR propose implementation for approval |
172
+ | External dependency | Service/API not available | Create interface/mock OR skip and defer |
173
+ | Environment issue | Can't run/test code | Ask user to fix environment OR implement without testing (note risk) |
174
+ | Design/content missing | Need specific assets | Create placeholder OR wait for actual assets |
175
+
101
176
  ## Example Workflow
102
177
 
103
178
  ```
@@ -113,6 +188,20 @@ Generated by Clavix /clavix:implement
113
188
  - Continue or wait for user
114
189
  ```
115
190
 
191
+ ## Workflow Navigation
192
+
193
+ **You are here:** Implement (Task Execution)
194
+
195
+ **Common workflows:**
196
+ - **Full workflow**: `/clavix:plan` → `/clavix:implement` → [execute all tasks] → `/clavix:archive`
197
+ - **Resume work**: `/clavix:implement` → Continue from last incomplete task
198
+ - **Iterative**: `/clavix:implement` → [complete task] → [pause] → `/clavix:implement` → [continue]
199
+
200
+ **Related commands:**
201
+ - `/clavix:plan` - Generate/regenerate task breakdown (previous step)
202
+ - `/clavix:archive` - Archive completed project (final step)
203
+ - `/clavix:prd` - Review PRD for context during implementation
204
+
116
205
  ## Tips
117
206
 
118
207
  - The implementation is meant to be iterative and collaborative
@@ -120,3 +209,59 @@ Generated by Clavix /clavix:implement
120
209
  - Tasks are designed to be atomic and independently implementable
121
210
  - Use the PRD as the authoritative source for "what to build"
122
211
  - Use tasks.md as the guide for "in what order"
212
+
213
+ ## Troubleshooting
214
+
215
+ ### Issue: `.clavix-implement-config.json` not found
216
+ **Cause**: User hasn't run `clavix implement` CLI command first
217
+ **Solution** (inline):
218
+ - Error: "Config file not found. Run `clavix implement` first to initialize"
219
+ - CLI creates config and shows first task
220
+ - AI agent should wait for config before proceeding
221
+
222
+ ### Issue: Cannot find next incomplete task in tasks.md
223
+ **Cause**: All tasks completed OR tasks.md corrupted
224
+ **Solution**:
225
+ - Check if all tasks are `[x]` - if yes, congratulate completion!
226
+ - Suggest `/clavix:archive` for completed project
227
+ - If tasks.md corrupted, ask user to review/regenerate
228
+
229
+ ### Issue: Task description unclear or conflicts with PRD
230
+ **Cause**: Task breakdown was too vague or PRD changed
231
+ **Solution** (inline - covered by Task Blocking Protocol):
232
+ - Stop and ask user for clarification
233
+ - Reference PRD section if mentioned
234
+ - Propose interpretation for user approval
235
+ - Update task description in tasks.md after clarification
236
+
237
+ ### Issue: Git commit fails (wrong strategy, hook error, etc.)
238
+ **Cause**: Git configuration issue or commit hook failure
239
+ **Solution**:
240
+ - Show error to user
241
+ - Suggest checking git status manually
242
+ - Ask if should continue without commit or fix issue first
243
+ - Note: Commits are convenience, not blocker - can proceed without
244
+
245
+ ### Issue: Multiple [BLOCKED] tasks accumulating
246
+ **Cause**: Dependencies or blockers not being resolved
247
+ **Solution**:
248
+ - After 3+ blocked tasks, pause and report to user
249
+ - List all blockers and what's needed to resolve
250
+ - Ask user to prioritize: unblock tasks OR continue with unblocked ones
251
+ - Consider if project should be paused until blockers cleared
252
+
253
+ ### Issue: Task completed but tests failing
254
+ **Cause**: Implementation doesn't meet requirements
255
+ **Solution**:
256
+ - Do NOT mark task as complete if tests fail
257
+ - Fix failing tests before marking [x]
258
+ - If tests are incorrectly written, fix tests first
259
+ - Task isn't done until tests pass
260
+
261
+ ### Issue: Implementing in wrong order (skipped dependencies)
262
+ **Cause**: AI agent or user jumped ahead
263
+ **Solution**:
264
+ - Stop and review tasks.md order
265
+ - Check if skipped task was a dependency
266
+ - Implement missed dependency first
267
+ - Follow sequential order unless explicitly instructed otherwise