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,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
- """
@@ -1,266 +0,0 @@
1
- description = "Execute tasks from the implementation plan"
2
- prompt = """
3
-
4
- # Clavix Implement - AI-Assisted Task Execution
5
-
6
- You are helping the user implement tasks from their task plan with AI assistance.
7
-
8
- ## Instructions
9
-
10
- 1. **Run the implement command**:
11
- ```bash
12
- clavix implement
13
- ```
14
-
15
- This will:
16
- - Show interactive PRD selection (if multiple projects exist)
17
- - Locate the `tasks.md` file for the selected/specified project
18
- - Show current progress
19
- - Display the next incomplete task
20
- - Prompt for git auto-commit preferences
21
- - Create a config file for the AI agent
22
-
23
- **Note**: You can skip the selection menu by specifying a project:
24
- ```bash
25
- clavix implement --project my-feature
26
- ```
27
-
28
- 2. **As the AI agent, you should**:
29
-
30
- a. **Read the configuration**:
31
- - Load `.clavix-implement-config.json` from the PRD folder
32
- - This contains: commit strategy, current task, and progress stats
33
-
34
- b. **Read the PRD for context**:
35
- - Open the full PRD to understand requirements
36
- - Reference specific sections mentioned in tasks
37
-
38
- c. **Read tasks.md**:
39
- - Find the first incomplete task (marked `- [ ]`)
40
- - This is your current task to implement
41
-
42
- d. **Implement the task**:
43
- - Write/modify code as needed
44
- - Follow CLEAR principles
45
- - Use PRD requirements as your guide
46
- - Ask user for clarification if needed
47
-
48
- e. **Mark task as completed**:
49
- - In `tasks.md`, change `- [ ] Task description` to `- [x] Task description`
50
- - Update only the specific task you just completed
51
-
52
- f. **Create git commit (if enabled)**:
53
- - Check the `commitStrategy` in config
54
- - If `per-task`: commit after each task
55
- - If `per-5-tasks`: commit after every 5 tasks
56
- - If `per-phase`: commit when all tasks in a phase are done
57
- - Use descriptive commit messages with task description
58
-
59
- g. **Move to next task**:
60
- - Find the next `- [ ]` task in tasks.md
61
- - Repeat the process
62
-
63
- 3. **Session Resume**:
64
- - When user runs `clavix implement` again, it automatically picks up from the last incomplete task
65
- - No manual tracking needed - the checkboxes in tasks.md are the source of truth
66
-
67
- ## Git Commit Format
68
-
69
- When creating commits, use this format:
70
-
71
- ```
72
- clavix: [task description]
73
-
74
- Completed tasks:
75
- - Task 1
76
- - Task 2
77
-
78
- Project: [project-name]
79
- Generated by Clavix /clavix:implement
80
- ```
81
-
82
- ## Important Rules
83
-
84
- **DO**:
85
- - Read tasks.md to find the current task
86
- - Implement ONE task at a time
87
- - Mark tasks complete by changing `[ ]` to `[x]`
88
- - Create commits based on the strategy in config
89
- - Reference the PRD for detailed requirements
90
- - Ask for clarification when tasks are ambiguous
91
-
92
- **DON'T**:
93
- - Skip tasks or implement out of order
94
- - Mark tasks complete before actually implementing them
95
- - Modify multiple tasks' checkboxes at once (only current task)
96
- - Create commits if strategy is 'none'
97
- - Assume what code to write - use PRD as source of truth
98
-
99
- ## Task Blocking Protocol
100
-
101
- **When a task is blocked** (cannot be completed), follow this protocol:
102
-
103
- ### Step 1: Detect Blocking Issues
104
-
105
- Common blocking scenarios:
106
- - **Missing dependencies**: API keys, credentials, external services not available
107
- - **Unclear requirements**: Task description too vague or conflicts with PRD
108
- - **External blockers**: Need design assets, content, or third-party integration not ready
109
- - **Technical blockers**: Required library incompatible, environment issue, access problem
110
- - **Resource blockers**: Need database, server, or infrastructure not yet set up
111
-
112
- ### Step 2: Immediate User Communication
113
-
114
- **Stop implementation and ask user immediately:**
115
- ```
116
- "Task blocked: [Task description]
117
-
118
- Blocking issue: [Specific blocker, e.g., 'Missing Stripe API key for payment integration']
119
-
120
- Options to proceed:
121
- 1. **Provide missing resource** - [What user needs to provide]
122
- 2. **Break into sub-tasks** - I can implement [unblocked parts] now and defer [blocked part]
123
- 3. **Skip for now** - Mark as [BLOCKED], continue with next task, return later
124
-
125
- Which option would you like?"
126
- ```
127
-
128
- ### Step 3: Resolution Strategies
129
-
130
- **Option A: User Provides Resource**
131
- - Wait for user to provide (API key, design, clarification)
132
- - Once provided, continue with task implementation
133
-
134
- **Option B: Create Sub-Tasks** (preferred when possible)
135
- - Identify what CAN be done without the blocker
136
- - Break task into unblocked sub-tasks
137
- - Example: "Implement payment integration" →
138
- - [x] Create payment service interface (can do now)
139
- - [ ] [BLOCKED: Need Stripe API key] Integrate Stripe SDK
140
- - [ ] Add payment UI components (can do now)
141
- - Implement unblocked sub-tasks, mark blocked ones with [BLOCKED] tag
142
-
143
- **Option C: Skip and Mark Blocked**
144
- - Add [BLOCKED] tag to task in tasks.md: `- [ ] [BLOCKED: Missing API key] Task description`
145
- - Note the blocker reason
146
- - Move to next task
147
- - Return to blocked tasks when unblocked
148
-
149
- ### Step 4: Track Blocked Tasks
150
-
151
- **In tasks.md, use [BLOCKED] notation:**
152
- ```markdown
153
- ## Phase 2: Integration
154
- - [x] Create API client structure
155
- - [ ] [BLOCKED: Waiting for API endpoint spec] Implement data sync
156
- - [ ] Add error handling for API calls
157
- ```
158
-
159
- **At end of implement session:**
160
- - List all blocked tasks
161
- - Remind user what's needed to unblock each one
162
- - Suggest next steps
163
-
164
- ### Common Blocking Scenarios & Resolutions
165
-
166
- | Blocker Type | Detection | Resolution |
167
- |--------------|-----------|------------|
168
- | Missing API key/credentials | Code requires authentication | Ask user for credentials OR stub with mock for now |
169
- | Vague requirements | Unclear what to implement | Ask specific questions OR propose implementation for approval |
170
- | External dependency | Service/API not available | Create interface/mock OR skip and defer |
171
- | Environment issue | Can't run/test code | Ask user to fix environment OR implement without testing (note risk) |
172
- | Design/content missing | Need specific assets | Create placeholder OR wait for actual assets |
173
-
174
- ## Example Workflow
175
-
176
- ```
177
- 1. User runs: clavix implement
178
- 2. Command shows: "Next task: Implement user authentication"
179
- 3. You (AI agent):
180
- - Read PRD authentication requirements
181
- - Implement auth logic
182
- - Write tests
183
- - Update tasks.md: - [x] Implement user authentication
184
- - Create git commit (if enabled)
185
- - Find next task in tasks.md
186
- - Continue or wait for user
187
- ```
188
-
189
- ## Workflow Navigation
190
-
191
- **You are here:** Implement (Task Execution)
192
-
193
- **Common workflows:**
194
- - **Full workflow**: `/clavix:plan` → `/clavix:implement` → [execute all tasks] → `/clavix:archive`
195
- - **Resume work**: `/clavix:implement` → Continue from last incomplete task
196
- - **Iterative**: `/clavix:implement` → [complete task] → [pause] → `/clavix:implement` → [continue]
197
-
198
- **Related commands:**
199
- - `/clavix:plan` - Generate/regenerate task breakdown (previous step)
200
- - `/clavix:archive` - Archive completed project (final step)
201
- - `/clavix:prd` - Review PRD for context during implementation
202
-
203
- ## Tips
204
-
205
- - The implementation is meant to be iterative and collaborative
206
- - User can pause/resume at any time
207
- - Tasks are designed to be atomic and independently implementable
208
- - Use the PRD as the authoritative source for "what to build"
209
- - Use tasks.md as the guide for "in what order"
210
-
211
- ## Troubleshooting
212
-
213
- ### Issue: `.clavix-implement-config.json` not found
214
- **Cause**: User hasn't run `clavix implement` CLI command first
215
- **Solution** (inline):
216
- - Error: "Config file not found. Run `clavix implement` first to initialize"
217
- - CLI creates config and shows first task
218
- - AI agent should wait for config before proceeding
219
-
220
- ### Issue: Cannot find next incomplete task in tasks.md
221
- **Cause**: All tasks completed OR tasks.md corrupted
222
- **Solution**:
223
- - Check if all tasks are `[x]` - if yes, congratulate completion!
224
- - Suggest `/clavix:archive` for completed project
225
- - If tasks.md corrupted, ask user to review/regenerate
226
-
227
- ### Issue: Task description unclear or conflicts with PRD
228
- **Cause**: Task breakdown was too vague or PRD changed
229
- **Solution** (inline - covered by Task Blocking Protocol):
230
- - Stop and ask user for clarification
231
- - Reference PRD section if mentioned
232
- - Propose interpretation for user approval
233
- - Update task description in tasks.md after clarification
234
-
235
- ### Issue: Git commit fails (wrong strategy, hook error, etc.)
236
- **Cause**: Git configuration issue or commit hook failure
237
- **Solution**:
238
- - Show error to user
239
- - Suggest checking git status manually
240
- - Ask if should continue without commit or fix issue first
241
- - Note: Commits are convenience, not blocker - can proceed without
242
-
243
- ### Issue: Multiple [BLOCKED] tasks accumulating
244
- **Cause**: Dependencies or blockers not being resolved
245
- **Solution**:
246
- - After 3+ blocked tasks, pause and report to user
247
- - List all blockers and what's needed to resolve
248
- - Ask user to prioritize: unblock tasks OR continue with unblocked ones
249
- - Consider if project should be paused until blockers cleared
250
-
251
- ### Issue: Task completed but tests failing
252
- **Cause**: Implementation doesn't meet requirements
253
- **Solution**:
254
- - Do NOT mark task as complete if tests fail
255
- - Fix failing tests before marking [x]
256
- - If tests are incorrectly written, fix tests first
257
- - Task isn't done until tests pass
258
-
259
- ### Issue: Implementing in wrong order (skipped dependencies)
260
- **Cause**: AI agent or user jumped ahead
261
- **Solution**:
262
- - Stop and review tasks.md order
263
- - Check if skipped task was a dependency
264
- - Implement missed dependency first
265
- - Follow sequential order unless explicitly instructed otherwise
266
- """