clavix 2.3.1 → 2.4.1

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 (187) hide show
  1. package/README.md +0 -116
  2. package/bin/clavix.js +7 -0
  3. package/dist/cli/commands/implement.js +25 -33
  4. package/dist/cli/commands/plan.js +22 -27
  5. package/dist/cli/commands/prd.js +7 -12
  6. package/dist/cli/commands/start.js +4 -9
  7. package/dist/cli/commands/summarize.js +15 -22
  8. package/dist/core 2/adapters/agents-md-generator.d.ts +26 -0
  9. package/dist/core 2/adapters/agents-md-generator.js +102 -0
  10. package/dist/core 2/adapters/amp-adapter.d.ts +27 -0
  11. package/dist/core 2/adapters/amp-adapter.js +42 -0
  12. package/dist/core 2/adapters/augment-adapter.d.ts +22 -0
  13. package/dist/core 2/adapters/augment-adapter.js +77 -0
  14. package/dist/core 2/adapters/base-adapter.d.ts +45 -0
  15. package/dist/core 2/adapters/base-adapter.js +142 -0
  16. package/dist/core 2/adapters/claude-code-adapter.d.ts +32 -0
  17. package/dist/core 2/adapters/claude-code-adapter.js +116 -0
  18. package/dist/core 2/adapters/cline-adapter.d.ts +34 -0
  19. package/dist/core 2/adapters/cline-adapter.js +52 -0
  20. package/dist/core 2/adapters/codebuddy-adapter.d.ts +24 -0
  21. package/dist/core 2/adapters/codebuddy-adapter.js +82 -0
  22. package/dist/core 2/adapters/codex-adapter.d.ts +24 -0
  23. package/dist/core 2/adapters/codex-adapter.js +79 -0
  24. package/dist/core 2/adapters/copilot-instructions-generator.d.ts +26 -0
  25. package/dist/core 2/adapters/copilot-instructions-generator.js +104 -0
  26. package/dist/core 2/adapters/crush-adapter.d.ts +35 -0
  27. package/dist/core 2/adapters/crush-adapter.js +49 -0
  28. package/dist/core 2/adapters/cursor-adapter.d.ts +25 -0
  29. package/dist/core 2/adapters/cursor-adapter.js +40 -0
  30. package/dist/core 2/adapters/droid-adapter.d.ts +33 -0
  31. package/dist/core 2/adapters/droid-adapter.js +57 -0
  32. package/dist/core 2/adapters/gemini-adapter.d.ts +27 -0
  33. package/dist/core 2/adapters/gemini-adapter.js +90 -0
  34. package/dist/core 2/adapters/kilocode-adapter.d.ts +34 -0
  35. package/dist/core 2/adapters/kilocode-adapter.js +49 -0
  36. package/dist/core 2/adapters/octo-md-generator.d.ts +26 -0
  37. package/dist/core 2/adapters/octo-md-generator.js +102 -0
  38. package/dist/core 2/adapters/opencode-adapter.d.ts +33 -0
  39. package/dist/core 2/adapters/opencode-adapter.js +56 -0
  40. package/dist/core 2/adapters/qwen-adapter.d.ts +27 -0
  41. package/dist/core 2/adapters/qwen-adapter.js +90 -0
  42. package/dist/core 2/adapters/roocode-adapter.d.ts +40 -0
  43. package/dist/core 2/adapters/roocode-adapter.js +68 -0
  44. package/dist/core 2/adapters/warp-md-generator.d.ts +17 -0
  45. package/dist/core 2/adapters/warp-md-generator.js +88 -0
  46. package/dist/core 2/adapters/windsurf-adapter.d.ts +34 -0
  47. package/dist/core 2/adapters/windsurf-adapter.js +49 -0
  48. package/dist/core 2/agent-manager.d.ts +51 -0
  49. package/dist/core 2/agent-manager.js +126 -0
  50. package/dist/core 2/archive-manager.d.ts +100 -0
  51. package/dist/core 2/archive-manager.js +338 -0
  52. package/dist/core 2/conversation-analyzer.d.ts +86 -0
  53. package/dist/core 2/doc-injector.d.ts +51 -0
  54. package/dist/core 2/doc-injector.js +236 -0
  55. package/dist/core 2/git-manager.d.ts +100 -0
  56. package/dist/core 2/git-manager.js +214 -0
  57. package/dist/core 2/prompt-optimizer.d.ts +268 -0
  58. package/dist/core 2/prompt-optimizer.js +963 -0
  59. package/dist/core 2/question-engine.d.ts +167 -0
  60. package/dist/core 2/question-engine.js +395 -0
  61. package/dist/core 2/session-manager.d.ts +139 -0
  62. package/dist/core 2/session-manager.js +403 -0
  63. package/dist/core 2/task-manager.d.ts +155 -0
  64. package/dist/core 2/task-manager.js +689 -0
  65. package/dist/index.js +6 -0
  66. package/dist/utils/template-loader.js +24 -22
  67. package/package.json +1 -1
  68. package/dist/templates/slash-commands/augment/archive.md +0 -291
  69. package/dist/templates/slash-commands/augment/deep.md +0 -207
  70. package/dist/templates/slash-commands/augment/fast.md +0 -183
  71. package/dist/templates/slash-commands/augment/implement.md +0 -267
  72. package/dist/templates/slash-commands/augment/plan.md +0 -173
  73. package/dist/templates/slash-commands/augment/prd.md +0 -178
  74. package/dist/templates/slash-commands/augment/start.md +0 -142
  75. package/dist/templates/slash-commands/augment/summarize.md +0 -179
  76. package/dist/templates/slash-commands/claude-code/archive.md +0 -291
  77. package/dist/templates/slash-commands/claude-code/deep.md +0 -207
  78. package/dist/templates/slash-commands/claude-code/fast.md +0 -183
  79. package/dist/templates/slash-commands/claude-code/implement.md +0 -267
  80. package/dist/templates/slash-commands/claude-code/plan.md +0 -173
  81. package/dist/templates/slash-commands/claude-code/prd.md +0 -178
  82. package/dist/templates/slash-commands/claude-code/start.md +0 -142
  83. package/dist/templates/slash-commands/claude-code/summarize.md +0 -179
  84. package/dist/templates/slash-commands/cline/archive.md +0 -291
  85. package/dist/templates/slash-commands/cline/deep.md +0 -207
  86. package/dist/templates/slash-commands/cline/fast.md +0 -183
  87. package/dist/templates/slash-commands/cline/implement.md +0 -267
  88. package/dist/templates/slash-commands/cline/plan.md +0 -173
  89. package/dist/templates/slash-commands/cline/prd.md +0 -178
  90. package/dist/templates/slash-commands/cline/start.md +0 -142
  91. package/dist/templates/slash-commands/cline/summarize.md +0 -179
  92. package/dist/templates/slash-commands/codebuddy/archive.md +0 -291
  93. package/dist/templates/slash-commands/codebuddy/deep.md +0 -207
  94. package/dist/templates/slash-commands/codebuddy/fast.md +0 -183
  95. package/dist/templates/slash-commands/codebuddy/implement.md +0 -267
  96. package/dist/templates/slash-commands/codebuddy/plan.md +0 -173
  97. package/dist/templates/slash-commands/codebuddy/prd.md +0 -178
  98. package/dist/templates/slash-commands/codebuddy/start.md +0 -142
  99. package/dist/templates/slash-commands/codebuddy/summarize.md +0 -179
  100. package/dist/templates/slash-commands/codex/archive.md +0 -291
  101. package/dist/templates/slash-commands/codex/deep.md +0 -207
  102. package/dist/templates/slash-commands/codex/fast.md +0 -183
  103. package/dist/templates/slash-commands/codex/implement.md +0 -267
  104. package/dist/templates/slash-commands/codex/plan.md +0 -173
  105. package/dist/templates/slash-commands/codex/prd.md +0 -178
  106. package/dist/templates/slash-commands/codex/start.md +0 -142
  107. package/dist/templates/slash-commands/codex/summarize.md +0 -179
  108. package/dist/templates/slash-commands/crush/archive.md +0 -291
  109. package/dist/templates/slash-commands/crush/deep.md +0 -207
  110. package/dist/templates/slash-commands/crush/fast.md +0 -183
  111. package/dist/templates/slash-commands/crush/implement.md +0 -267
  112. package/dist/templates/slash-commands/crush/plan.md +0 -173
  113. package/dist/templates/slash-commands/crush/prd.md +0 -178
  114. package/dist/templates/slash-commands/crush/start.md +0 -142
  115. package/dist/templates/slash-commands/crush/summarize.md +0 -179
  116. package/dist/templates/slash-commands/cursor/archive.md +0 -291
  117. package/dist/templates/slash-commands/cursor/deep.md +0 -207
  118. package/dist/templates/slash-commands/cursor/fast.md +0 -183
  119. package/dist/templates/slash-commands/cursor/implement.md +0 -267
  120. package/dist/templates/slash-commands/cursor/plan.md +0 -173
  121. package/dist/templates/slash-commands/cursor/prd.md +0 -178
  122. package/dist/templates/slash-commands/cursor/start.md +0 -142
  123. package/dist/templates/slash-commands/cursor/summarize.md +0 -179
  124. package/dist/templates/slash-commands/droid/archive.md +0 -291
  125. package/dist/templates/slash-commands/droid/deep.md +0 -207
  126. package/dist/templates/slash-commands/droid/fast.md +0 -183
  127. package/dist/templates/slash-commands/droid/implement.md +0 -267
  128. package/dist/templates/slash-commands/droid/plan.md +0 -173
  129. package/dist/templates/slash-commands/droid/prd.md +0 -178
  130. package/dist/templates/slash-commands/droid/start.md +0 -142
  131. package/dist/templates/slash-commands/droid/summarize.md +0 -179
  132. package/dist/templates/slash-commands/gemini/archive.toml +0 -290
  133. package/dist/templates/slash-commands/gemini/deep.toml +0 -206
  134. package/dist/templates/slash-commands/gemini/fast.toml +0 -182
  135. package/dist/templates/slash-commands/gemini/implement.toml +0 -266
  136. package/dist/templates/slash-commands/gemini/plan.toml +0 -170
  137. package/dist/templates/slash-commands/gemini/prd.toml +0 -177
  138. package/dist/templates/slash-commands/gemini/start.toml +0 -141
  139. package/dist/templates/slash-commands/gemini/summarize.toml +0 -178
  140. package/dist/templates/slash-commands/kilocode/archive.md +0 -291
  141. package/dist/templates/slash-commands/kilocode/deep.md +0 -207
  142. package/dist/templates/slash-commands/kilocode/fast.md +0 -183
  143. package/dist/templates/slash-commands/kilocode/implement.md +0 -267
  144. package/dist/templates/slash-commands/kilocode/plan.md +0 -173
  145. package/dist/templates/slash-commands/kilocode/prd.md +0 -178
  146. package/dist/templates/slash-commands/kilocode/start.md +0 -142
  147. package/dist/templates/slash-commands/kilocode/summarize.md +0 -179
  148. package/dist/templates/slash-commands/opencode/archive.md +0 -291
  149. package/dist/templates/slash-commands/opencode/deep.md +0 -207
  150. package/dist/templates/slash-commands/opencode/fast.md +0 -183
  151. package/dist/templates/slash-commands/opencode/implement.md +0 -267
  152. package/dist/templates/slash-commands/opencode/plan.md +0 -173
  153. package/dist/templates/slash-commands/opencode/prd.md +0 -178
  154. package/dist/templates/slash-commands/opencode/start.md +0 -142
  155. package/dist/templates/slash-commands/opencode/summarize.md +0 -179
  156. package/dist/templates/slash-commands/qwen/archive.toml +0 -290
  157. package/dist/templates/slash-commands/qwen/deep.toml +0 -206
  158. package/dist/templates/slash-commands/qwen/fast.toml +0 -182
  159. package/dist/templates/slash-commands/qwen/implement.toml +0 -266
  160. package/dist/templates/slash-commands/qwen/plan.toml +0 -170
  161. package/dist/templates/slash-commands/qwen/prd.toml +0 -177
  162. package/dist/templates/slash-commands/qwen/start.toml +0 -141
  163. package/dist/templates/slash-commands/qwen/summarize.toml +0 -178
  164. package/dist/templates/slash-commands/roocode/archive.md +0 -291
  165. package/dist/templates/slash-commands/roocode/deep.md +0 -207
  166. package/dist/templates/slash-commands/roocode/fast.md +0 -183
  167. package/dist/templates/slash-commands/roocode/implement.md +0 -267
  168. package/dist/templates/slash-commands/roocode/plan.md +0 -173
  169. package/dist/templates/slash-commands/roocode/prd.md +0 -178
  170. package/dist/templates/slash-commands/roocode/start.md +0 -142
  171. package/dist/templates/slash-commands/roocode/summarize.md +0 -179
  172. package/dist/templates/slash-commands/windsurf/archive.md +0 -291
  173. package/dist/templates/slash-commands/windsurf/deep.md +0 -207
  174. package/dist/templates/slash-commands/windsurf/fast.md +0 -183
  175. package/dist/templates/slash-commands/windsurf/implement.md +0 -267
  176. package/dist/templates/slash-commands/windsurf/plan.md +0 -173
  177. package/dist/templates/slash-commands/windsurf/prd.md +0 -178
  178. package/dist/templates/slash-commands/windsurf/start.md +0 -142
  179. package/dist/templates/slash-commands/windsurf/summarize.md +0 -179
  180. /package/dist/templates/slash-commands/{amp → _canonical}/archive.md +0 -0
  181. /package/dist/templates/slash-commands/{amp → _canonical}/deep.md +0 -0
  182. /package/dist/templates/slash-commands/{amp → _canonical}/fast.md +0 -0
  183. /package/dist/templates/slash-commands/{amp → _canonical}/implement.md +0 -0
  184. /package/dist/templates/slash-commands/{amp → _canonical}/plan.md +0 -0
  185. /package/dist/templates/slash-commands/{amp → _canonical}/prd.md +0 -0
  186. /package/dist/templates/slash-commands/{amp → _canonical}/start.md +0 -0
  187. /package/dist/templates/slash-commands/{amp → _canonical}/summarize.md +0 -0
@@ -1,267 +0,0 @@
1
- ---
2
- name: "Clavix: Implement"
3
- description: Execute tasks from the implementation plan
4
- ---
5
-
6
- # Clavix Implement - AI-Assisted Task Execution
7
-
8
- You are helping the user implement tasks from their task plan with AI assistance.
9
-
10
- ## Instructions
11
-
12
- 1. **Run the implement command**:
13
- ```bash
14
- clavix implement
15
- ```
16
-
17
- This will:
18
- - Show interactive PRD selection (if multiple projects exist)
19
- - Locate the `tasks.md` file for the selected/specified project
20
- - Show current progress
21
- - Display the next incomplete task
22
- - Prompt for git auto-commit preferences
23
- - Create a config file for the AI agent
24
-
25
- **Note**: You can skip the selection menu by specifying a project:
26
- ```bash
27
- clavix implement --project my-feature
28
- ```
29
-
30
- 2. **As the AI agent, you should**:
31
-
32
- a. **Read the configuration**:
33
- - Load `.clavix-implement-config.json` from the PRD folder
34
- - This contains: commit strategy, current task, and progress stats
35
-
36
- b. **Read the PRD for context**:
37
- - Open the full PRD to understand requirements
38
- - Reference specific sections mentioned in tasks
39
-
40
- c. **Read tasks.md**:
41
- - Find the first incomplete task (marked `- [ ]`)
42
- - This is your current task to implement
43
-
44
- d. **Implement the task**:
45
- - Write/modify code as needed
46
- - Follow CLEAR principles
47
- - Use PRD requirements as your guide
48
- - Ask user for clarification if needed
49
-
50
- e. **Mark task as completed**:
51
- - In `tasks.md`, change `- [ ] Task description` to `- [x] Task description`
52
- - Update only the specific task you just completed
53
-
54
- f. **Create git commit (if enabled)**:
55
- - Check the `commitStrategy` in config
56
- - If `per-task`: commit after each task
57
- - If `per-5-tasks`: commit after every 5 tasks
58
- - If `per-phase`: commit when all tasks in a phase are done
59
- - Use descriptive commit messages with task description
60
-
61
- g. **Move to next task**:
62
- - Find the next `- [ ]` task in tasks.md
63
- - Repeat the process
64
-
65
- 3. **Session Resume**:
66
- - When user runs `clavix implement` again, it automatically picks up from the last incomplete task
67
- - No manual tracking needed - the checkboxes in tasks.md are the source of truth
68
-
69
- ## Git Commit Format
70
-
71
- When creating commits, use this format:
72
-
73
- ```
74
- clavix: [task description]
75
-
76
- Completed tasks:
77
- - Task 1
78
- - Task 2
79
-
80
- Project: [project-name]
81
- Generated by Clavix /clavix:implement
82
- ```
83
-
84
- ## Important Rules
85
-
86
- **DO**:
87
- - Read tasks.md to find the current task
88
- - Implement ONE task at a time
89
- - Mark tasks complete by changing `[ ]` to `[x]`
90
- - Create commits based on the strategy in config
91
- - Reference the PRD for detailed requirements
92
- - Ask for clarification when tasks are ambiguous
93
-
94
- **DON'T**:
95
- - Skip tasks or implement out of order
96
- - Mark tasks complete before actually implementing them
97
- - Modify multiple tasks' checkboxes at once (only current task)
98
- - Create commits if strategy is 'none'
99
- - Assume what code to write - use PRD as source of truth
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
-
176
- ## Example Workflow
177
-
178
- ```
179
- 1. User runs: clavix implement
180
- 2. Command shows: "Next task: Implement user authentication"
181
- 3. You (AI agent):
182
- - Read PRD authentication requirements
183
- - Implement auth logic
184
- - Write tests
185
- - Update tasks.md: - [x] Implement user authentication
186
- - Create git commit (if enabled)
187
- - Find next task in tasks.md
188
- - Continue or wait for user
189
- ```
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
-
205
- ## Tips
206
-
207
- - The implementation is meant to be iterative and collaborative
208
- - User can pause/resume at any time
209
- - Tasks are designed to be atomic and independently implementable
210
- - Use the PRD as the authoritative source for "what to build"
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
@@ -1,173 +0,0 @@
1
- ---
2
- name: "Clavix: Plan"
3
- description: Generate implementation task breakdown from PRD
4
- ---
5
-
6
- # Clavix Plan - Task Breakdown Generator
7
-
8
- You are helping the user generate a CLEAR-optimized implementation task breakdown from their PRD.
9
-
10
- ## Instructions
11
-
12
- ### Part A: Procedural Steps (CLI Commands)
13
-
14
- 1. **Locate the PRD outputs**:
15
- - Look for the most recent artifacts in `.clavix/outputs/[project-name]/`
16
- - Accepted sources: `full-prd.md`, `quick-prd.md`, `mini-prd.md`, or `optimized-prompt.md`
17
- - **If not found**: Error inline - "No PRD found in `.clavix/outputs/`. Use `/clavix:prd` or `/clavix:summarize` first."
18
-
19
- 2. **Run the plan command**:
20
- ```bash
21
- clavix plan
22
- ```
23
-
24
- Or specify a project:
25
- ```bash
26
- clavix plan --project project-name
27
- ```
28
-
29
- Or generate tasks directly from a saved session (auto-creates mini-prd.md):
30
- ```bash
31
- clavix plan --session SESSION_ID
32
- ```
33
-
34
- The CLI will prompt you to pick a project when multiple outputs are available.
35
-
36
- ### Part B: Behavioral Guidance (Task Breakdown Strategy)
37
-
38
- 3. **How to structure tasks** (CLEAR-optimized task breakdown):
39
-
40
- **Task Granularity Principles:**
41
- - **[C] Concise**: Each task = 1 clear action (not "Build authentication system", but "Create user registration endpoint")
42
- - **[L] Logical**: Tasks flow in implementation order (database schema → backend logic → frontend UI)
43
- - **[E] Explicit**: Tasks specify deliverable (not "Add tests", but "Write unit tests for user service with >80% coverage")
44
-
45
- **Atomic Task Guidelines:**
46
- - **Ideal size**: Completable in 15-60 minutes
47
- - **Too large**: "Implement user authentication" → Break into registration, login, logout, password reset
48
- - **Too small**: "Import React" → Combine with "Setup component structure"
49
- - **Dependencies**: If Task B needs Task A, ensure A comes first
50
-
51
- **Phase Organization:**
52
- - Group related tasks into phases (Setup, Core Features, Testing, Polish)
53
- - Each phase should be independently deployable when possible
54
- - Critical path first (must-haves before nice-to-haves)
55
-
56
- 4. **Review and customize generated tasks**:
57
- - The command will generate `tasks.md` in the PRD folder
58
- - Tasks are organized into logical phases with CLEAR principles
59
- - Each task includes:
60
- - Checkbox `- [ ]` for tracking
61
- - Clear deliverable description
62
- - Optional reference to PRD section `(ref: PRD Section)`
63
- - **You can edit tasks.md** before implementing:
64
- - Add/remove tasks
65
- - Adjust granularity
66
- - Reorder for better flow
67
- - Add notes or sub-tasks
68
-
69
- 5. **CLEAR Task Labeling** (optional, for education):
70
- When reviewing tasks, you can annotate improvements:
71
- - **[C]**: "Split vague 'Add UI' into 3 concrete tasks"
72
- - **[L]**: "Reordered tasks: database schema before API endpoints"
73
- - **[E]**: "Added specific acceptance criteria (>80% test coverage)"
74
-
75
- 6. **Next steps**:
76
- - Review and edit `tasks.md` if needed
77
- - Then run `/clavix:implement` to start implementation
78
-
79
- ## Task Format
80
-
81
- The generated `tasks.md` will look like:
82
-
83
- ```markdown
84
- # Implementation Tasks
85
-
86
- **Project**: [Project Name]
87
- **Generated**: [Timestamp]
88
-
89
- ---
90
-
91
- ## Phase 1: Feature Name
92
- - [ ] Task 1 description (ref: PRD Section)
93
- - [ ] Task 2 description
94
- - [ ] Task 3 description
95
-
96
- ## Phase 2: Another Feature
97
- - [ ] Task 4 description
98
- - [ ] Task 5 description
99
-
100
- ---
101
-
102
- *Generated by Clavix /clavix:plan*
103
- ```
104
-
105
- ## Workflow Navigation
106
-
107
- **You are here:** Plan (Task Breakdown)
108
-
109
- **Common workflows:**
110
- - **PRD workflow**: `/clavix:prd` → `/clavix:plan` → `/clavix:implement` → `/clavix:archive`
111
- - **Conversation workflow**: `/clavix:summarize` → `/clavix:plan` → `/clavix:implement` → `/clavix:archive`
112
- - **Standalone**: [Existing PRD] → `/clavix:plan` → Review tasks.md → `/clavix:implement`
113
-
114
- **Related commands:**
115
- - `/clavix:prd` - Generate PRD (typical previous step)
116
- - `/clavix:summarize` - Extract mini-PRD from conversation (alternative previous step)
117
- - `/clavix:implement` - Execute generated tasks (next step)
118
-
119
- ## Tips
120
-
121
- - Tasks are automatically optimized using CLEAR framework
122
- - Each task is concise and actionable
123
- - Tasks can reference specific PRD sections
124
- - Supports mini-PRD outputs from `/clavix:summarize` and session workflows via `--session` or `--active-session`
125
- - You can manually edit tasks.md before implementing
126
- - Use `--overwrite` flag to regenerate if needed
127
-
128
- ## Troubleshooting
129
-
130
- ### Issue: No PRD found in `.clavix/outputs/`
131
- **Cause**: User hasn't generated a PRD yet
132
- **Solution** (inline - already in template):
133
- - Show error: "No PRD found in `.clavix/outputs/`"
134
- - Suggest: "Use `/clavix:prd` or `/clavix:summarize` to generate one first"
135
- - Do not proceed with plan generation
136
-
137
- ### Issue: Generated tasks are too granular (100+ tasks)
138
- **Cause**: Over-decomposition or large project scope
139
- **Solution**:
140
- - Group related micro-tasks into larger atomic tasks
141
- - Each task should be 15-60 minutes, not 5 minutes
142
- - Combine setup/configuration tasks
143
- - Suggest breaking project into multiple PRDs if truly massive
144
-
145
- ### Issue: Generated tasks are too high-level (only 3-4 tasks)
146
- **Cause**: PRD was too vague or task breakdown too coarse
147
- **Solution**:
148
- - Review PRD - if vague, regenerate with more detail
149
- - Break each high-level task into 3-5 concrete sub-tasks
150
- - Each task should have a clear, testable deliverable
151
-
152
- ### Issue: Tasks don't follow logical dependency order
153
- **Cause**: Generator didn't detect dependencies correctly
154
- **Solution**:
155
- - Manually reorder in tasks.md (database before API, API before UI)
156
- - Follow CLEAR [L] Logic principle: ensure sequential coherence
157
- - Group by technical layers or feature completion
158
-
159
- ### Issue: Tasks conflict with PRD or duplicate work
160
- **Cause**: Misinterpretation of PRD or redundant task generation
161
- **Solution**:
162
- - Review PRD and tasks side-by-side
163
- - Remove duplicate tasks
164
- - Align tasks with PRD requirements
165
- - Use `--overwrite` to regenerate after PRD clarification
166
-
167
- ### Issue: `tasks.md` already exists, unsure if should regenerate
168
- **Cause**: Previous plan exists for this PRD
169
- **Solution**:
170
- - Check if tasks.md has progress (any [x] checkboxes)
171
- - If no progress: Safe to use `--overwrite`
172
- - If progress exists: Review carefully before overwriting
173
- - Consider manual edits instead of full regeneration
@@ -1,178 +0,0 @@
1
- ---
2
- name: "Clavix: PRD"
3
- description: CLEAR-validated PRD generation through Socratic questioning
4
- ---
5
-
6
- # Clavix PRD Generation - CLEAR Framework Validated
7
-
8
- You are helping the user create a Product Requirements Document (PRD) using Clavix's Socratic questioning approach. **Generated PRDs are automatically validated using the CLEAR Framework** (Concise, Logical, Explicit) for AI consumption quality.
9
-
10
- ## Instructions
11
-
12
- 1. Guide the user through these strategic questions, **one at a time** with validation:
13
-
14
- **Question 1**: What are we building and why? (Problem + goal in 2-3 sentences)
15
-
16
- - **Validation**: Must have both problem AND goal stated clearly
17
- - **If vague/short** (e.g., "a dashboard"): Ask probing questions:
18
- - "What specific problem does this dashboard solve?"
19
- - "Who will use this and what decisions will they make with it?"
20
- - "What happens if this doesn't exist?"
21
- - **If "I don't know"**: Ask:
22
- - "What triggered the need for this?"
23
- - "Can you describe the current pain point or opportunity?"
24
- - **Good answer example**: "Sales managers can't quickly identify at-risk deals in our 10K+ deal pipeline. Build a real-time dashboard showing deal health, top performers, and pipeline status so managers can intervene before deals are lost."
25
-
26
- **Question 2**: What are the must-have core features? (List 3-5 critical features)
27
-
28
- - **Validation**: At least 2 concrete features provided
29
- - **If vague** (e.g., "user management"): Probe deeper:
30
- - "What specific user management capabilities? (registration, roles, permissions, profile management?)"
31
- - "Which feature would you build first if you could only build one?"
32
- - **If too many** (7+ features): Help prioritize:
33
- - "If you had to launch with only 3 features, which would they be?"
34
- - "Which features are launch-blockers vs nice-to-have?"
35
- - **If "I don't know"**: Ask:
36
- - "Walk me through how someone would use this - what would they do first?"
37
- - "What's the core value this provides?"
38
-
39
- **Question 3**: Tech stack and requirements? (Technologies, integrations, constraints)
40
-
41
- - **Optional**: Can skip if extending existing project
42
- - **If vague** (e.g., "modern stack"): Probe:
43
- - "What technologies are already in use that this must integrate with?"
44
- - "Any specific frameworks or languages your team prefers?"
45
- - "Are there performance requirements (load time, concurrent users)?"
46
- - **If "I don't know"**: Suggest common stacks based on project type or skip
47
-
48
- **Question 4**: What is explicitly OUT of scope? (What are we NOT building?)
49
-
50
- - **Validation**: At least 1 explicit exclusion
51
- - **Why important**: Prevents scope creep and clarifies boundaries
52
- - **If stuck**: Suggest common exclusions:
53
- - "Are we building admin dashboards? Mobile apps? API integrations?"
54
- - "Are we handling payments? User authentication? Email notifications?"
55
- - **If "I don't know"**: Provide project-specific prompts based on previous answers
56
-
57
- **Question 5**: Any additional context or requirements?
58
-
59
- - **Optional**: Press Enter to skip
60
- - **Helpful areas**: Compliance needs, accessibility, localization, deadlines, team constraints
61
-
62
- 2. **Before proceeding to document generation**, verify minimum viable answers:
63
- - Q1: Both problem AND goal stated
64
- - Q2: At least 2 concrete features
65
- - Q4: At least 1 explicit scope exclusion
66
- - If missing critical info, ask targeted follow-ups
67
-
68
- 3. After collecting and validating all answers, generate TWO documents:
69
-
70
- **Full PRD** (comprehensive):
71
- ```markdown
72
- # Product Requirements Document: [Project Name]
73
-
74
- ## Problem & Goal
75
- [User's answer to Q1]
76
-
77
- ## Requirements
78
- ### Must-Have Features
79
- [User's answer to Q2, expanded with details]
80
-
81
- ### Technical Requirements
82
- [User's answer to Q3, detailed]
83
-
84
- ## Out of Scope
85
- [User's answer to Q4]
86
-
87
- ## Additional Context
88
- [User's answer to Q5 if provided]
89
- ```
90
-
91
- **Quick PRD** (2-3 paragraphs, AI-optimized):
92
- ```markdown
93
- [Concise summary combining problem, goal, and must-have features from Q1+Q2]
94
-
95
- [Technical requirements and constraints from Q3]
96
-
97
- [Out of scope and additional context from Q4+Q5]
98
- ```
99
-
100
- 3. Save both documents to `.clavix/outputs/[project-name]/`
101
-
102
- 4. **CLEAR Framework Validation** (automatic):
103
- - After PRD generation, the quick-prd.md is analyzed using CLEAR framework
104
- - Assesses AI consumption quality (Conciseness, Logic, Explicitness)
105
- - Displays CLEAR scores and improvement suggestions
106
- - Only C, L, E components apply (Adaptive & Reflective not applicable to PRDs)
107
-
108
- 5. Display file paths, CLEAR validation results, and suggest next steps.
109
-
110
- ## CLEAR Validation
111
-
112
- **What gets validated:**
113
- - **[C] Concise**: Is the PRD focused and to-the-point for AI agents?
114
- - **[L] Logical**: Does information flow coherently (context → requirements → constraints)?
115
- - **[E] Explicit**: Are specifications, formats, and success criteria clear?
116
-
117
- **Note:** Adaptive (A) and Reflective (R) components are not applicable to PRDs. For prompt-level CLEAR analysis with all 5 components, use `/clavix:deep` instead.
118
-
119
- ## Workflow Navigation
120
-
121
- **You are here:** PRD Generation (Strategic Planning)
122
-
123
- **Common workflows:**
124
- - **Full PRD workflow**: `/clavix:prd` → `/clavix:plan` → `/clavix:implement` → `/clavix:archive`
125
- - **From deep mode**: `/clavix:deep` → (strategic scope detected) → `/clavix:prd`
126
- - **Quick to strategic**: `/clavix:fast` → (realizes complexity) → `/clavix:prd`
127
-
128
- **Related commands:**
129
- - `/clavix:plan` - Generate task breakdown from PRD (next step)
130
- - `/clavix:implement` - Execute tasks (after plan)
131
- - `/clavix:summarize` - Alternative: Extract PRD from conversation instead of Q&A
132
-
133
- ## Tips
134
-
135
- - Ask follow-up questions if answers are too vague
136
- - Help users think through edge cases
137
- - Keep the process conversational and supportive
138
- - Generated PRDs are automatically CLEAR-validated for optimal AI consumption
139
-
140
- ## Troubleshooting
141
-
142
- ### Issue: User's answers to Q1 are too vague ("make an app")
143
- **Cause**: User hasn't thought through the problem/goal deeply enough
144
- **Solution** (inline):
145
- - Stop and ask probing questions before proceeding
146
- - "What specific problem does this app solve?"
147
- - "Who will use this and what pain point does it address?"
148
- - Don't proceed until both problem AND goal are clear
149
-
150
- ### Issue: User lists 10+ features in Q2
151
- **Cause**: Unclear priorities or scope creep
152
- **Solution** (inline):
153
- - Help prioritize: "If you could only launch with 3 features, which would they be?"
154
- - Separate must-have from nice-to-have
155
- - Document extras in "Additional Context" or "Out of scope"
156
-
157
- ### Issue: User says "I don't know" to critical questions
158
- **Cause**: Genuine uncertainty or needs exploration
159
- **Solution**:
160
- - For Q1: Ask about what triggered the need, current pain points
161
- - For Q2: Walk through user journey step-by-step
162
- - For Q4: Suggest common exclusions based on project type
163
- - Consider suggesting `/clavix:start` for conversational exploration first
164
-
165
- ### Issue: CLEAR validation shows low scores after generation
166
- **Cause**: Answers were too vague or incomplete
167
- **Solution**:
168
- - Review the generated PRD
169
- - Identify specific gaps (missing context, vague requirements)
170
- - Ask targeted follow-up questions
171
- - Regenerate PRD with enhanced answers
172
-
173
- ### Issue: Generated PRD doesn't match user's vision
174
- **Cause**: Miscommunication during Q&A or assumptions made
175
- **Solution**:
176
- - Review each section with user
177
- - Ask "What's missing or inaccurate?"
178
- - Update PRD manually or regenerate with corrected answers