clavix 2.1.2 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (138) hide show
  1. package/README.md +3 -3
  2. package/dist/cli/commands/init.js +11 -4
  3. package/dist/core/adapters/copilot-instructions-generator.d.ts +26 -0
  4. package/dist/core/adapters/copilot-instructions-generator.js +104 -0
  5. package/dist/core/agent-manager.js +0 -2
  6. package/dist/templates/agents/copilot-instructions.md +90 -0
  7. package/dist/templates/slash-commands/amp/archive.md +130 -3
  8. package/dist/templates/slash-commands/amp/deep.md +70 -10
  9. package/dist/templates/slash-commands/amp/fast.md +62 -15
  10. package/dist/templates/slash-commands/amp/implement.md +147 -2
  11. package/dist/templates/slash-commands/amp/plan.md +103 -7
  12. package/dist/templates/slash-commands/amp/prd.md +111 -13
  13. package/dist/templates/slash-commands/amp/start.md +77 -1
  14. package/dist/templates/slash-commands/amp/summarize.md +101 -21
  15. package/dist/templates/slash-commands/augment/archive.md +131 -4
  16. package/dist/templates/slash-commands/augment/deep.md +71 -11
  17. package/dist/templates/slash-commands/augment/fast.md +63 -16
  18. package/dist/templates/slash-commands/augment/implement.md +148 -3
  19. package/dist/templates/slash-commands/augment/plan.md +104 -8
  20. package/dist/templates/slash-commands/augment/prd.md +106 -8
  21. package/dist/templates/slash-commands/augment/start.md +78 -2
  22. package/dist/templates/slash-commands/augment/summarize.md +101 -21
  23. package/dist/templates/slash-commands/claude-code/archive.md +130 -3
  24. package/dist/templates/slash-commands/claude-code/deep.md +70 -10
  25. package/dist/templates/slash-commands/claude-code/fast.md +62 -15
  26. package/dist/templates/slash-commands/claude-code/implement.md +147 -2
  27. package/dist/templates/slash-commands/claude-code/plan.md +103 -7
  28. package/dist/templates/slash-commands/claude-code/prd.md +111 -13
  29. package/dist/templates/slash-commands/claude-code/start.md +77 -1
  30. package/dist/templates/slash-commands/claude-code/summarize.md +101 -21
  31. package/dist/templates/slash-commands/cline/archive.md +130 -3
  32. package/dist/templates/slash-commands/cline/deep.md +70 -10
  33. package/dist/templates/slash-commands/cline/fast.md +62 -15
  34. package/dist/templates/slash-commands/cline/implement.md +147 -2
  35. package/dist/templates/slash-commands/cline/plan.md +103 -7
  36. package/dist/templates/slash-commands/cline/prd.md +111 -13
  37. package/dist/templates/slash-commands/cline/start.md +77 -1
  38. package/dist/templates/slash-commands/cline/summarize.md +101 -21
  39. package/dist/templates/slash-commands/codebuddy/archive.md +130 -3
  40. package/dist/templates/slash-commands/codebuddy/deep.md +70 -10
  41. package/dist/templates/slash-commands/codebuddy/fast.md +62 -15
  42. package/dist/templates/slash-commands/codebuddy/implement.md +147 -2
  43. package/dist/templates/slash-commands/codebuddy/plan.md +103 -7
  44. package/dist/templates/slash-commands/codebuddy/prd.md +111 -13
  45. package/dist/templates/slash-commands/codebuddy/start.md +77 -1
  46. package/dist/templates/slash-commands/codebuddy/summarize.md +101 -21
  47. package/dist/templates/slash-commands/codex/archive.md +130 -3
  48. package/dist/templates/slash-commands/codex/deep.md +70 -10
  49. package/dist/templates/slash-commands/codex/fast.md +62 -15
  50. package/dist/templates/slash-commands/codex/implement.md +147 -2
  51. package/dist/templates/slash-commands/codex/plan.md +103 -7
  52. package/dist/templates/slash-commands/codex/prd.md +111 -13
  53. package/dist/templates/slash-commands/codex/start.md +77 -1
  54. package/dist/templates/slash-commands/codex/summarize.md +101 -21
  55. package/dist/templates/slash-commands/crush/archive.md +130 -3
  56. package/dist/templates/slash-commands/crush/deep.md +70 -10
  57. package/dist/templates/slash-commands/crush/fast.md +62 -15
  58. package/dist/templates/slash-commands/crush/implement.md +147 -2
  59. package/dist/templates/slash-commands/crush/plan.md +103 -7
  60. package/dist/templates/slash-commands/crush/prd.md +111 -13
  61. package/dist/templates/slash-commands/crush/start.md +77 -1
  62. package/dist/templates/slash-commands/crush/summarize.md +101 -21
  63. package/dist/templates/slash-commands/cursor/archive.md +130 -3
  64. package/dist/templates/slash-commands/cursor/deep.md +70 -10
  65. package/dist/templates/slash-commands/cursor/fast.md +62 -15
  66. package/dist/templates/slash-commands/cursor/implement.md +147 -2
  67. package/dist/templates/slash-commands/cursor/plan.md +103 -7
  68. package/dist/templates/slash-commands/cursor/prd.md +111 -13
  69. package/dist/templates/slash-commands/cursor/start.md +77 -1
  70. package/dist/templates/slash-commands/cursor/summarize.md +101 -21
  71. package/dist/templates/slash-commands/droid/archive.md +130 -3
  72. package/dist/templates/slash-commands/droid/deep.md +70 -10
  73. package/dist/templates/slash-commands/droid/fast.md +62 -15
  74. package/dist/templates/slash-commands/droid/implement.md +147 -2
  75. package/dist/templates/slash-commands/droid/plan.md +103 -7
  76. package/dist/templates/slash-commands/droid/prd.md +111 -13
  77. package/dist/templates/slash-commands/droid/start.md +77 -1
  78. package/dist/templates/slash-commands/droid/summarize.md +101 -21
  79. package/dist/templates/slash-commands/gemini/archive.toml +132 -4
  80. package/dist/templates/slash-commands/gemini/deep.toml +72 -11
  81. package/dist/templates/slash-commands/gemini/fast.toml +64 -16
  82. package/dist/templates/slash-commands/gemini/implement.toml +149 -3
  83. package/dist/templates/slash-commands/gemini/plan.toml +116 -13
  84. package/dist/templates/slash-commands/gemini/prd.toml +107 -8
  85. package/dist/templates/slash-commands/gemini/start.toml +79 -2
  86. package/dist/templates/slash-commands/gemini/summarize.toml +102 -21
  87. package/dist/templates/slash-commands/kilocode/archive.md +130 -3
  88. package/dist/templates/slash-commands/kilocode/deep.md +70 -10
  89. package/dist/templates/slash-commands/kilocode/fast.md +62 -15
  90. package/dist/templates/slash-commands/kilocode/implement.md +147 -2
  91. package/dist/templates/slash-commands/kilocode/plan.md +103 -7
  92. package/dist/templates/slash-commands/kilocode/prd.md +111 -13
  93. package/dist/templates/slash-commands/kilocode/start.md +77 -1
  94. package/dist/templates/slash-commands/kilocode/summarize.md +101 -21
  95. package/dist/templates/slash-commands/opencode/archive.md +130 -3
  96. package/dist/templates/slash-commands/opencode/deep.md +70 -10
  97. package/dist/templates/slash-commands/opencode/fast.md +62 -15
  98. package/dist/templates/slash-commands/opencode/implement.md +147 -2
  99. package/dist/templates/slash-commands/opencode/plan.md +103 -7
  100. package/dist/templates/slash-commands/opencode/prd.md +111 -13
  101. package/dist/templates/slash-commands/opencode/start.md +77 -1
  102. package/dist/templates/slash-commands/opencode/summarize.md +101 -21
  103. package/dist/templates/slash-commands/qwen/archive.toml +132 -4
  104. package/dist/templates/slash-commands/qwen/deep.toml +72 -11
  105. package/dist/templates/slash-commands/qwen/fast.toml +64 -16
  106. package/dist/templates/slash-commands/qwen/implement.toml +149 -3
  107. package/dist/templates/slash-commands/qwen/plan.toml +116 -13
  108. package/dist/templates/slash-commands/qwen/prd.toml +107 -8
  109. package/dist/templates/slash-commands/qwen/start.toml +79 -2
  110. package/dist/templates/slash-commands/qwen/summarize.toml +102 -21
  111. package/dist/templates/slash-commands/roocode/archive.md +130 -3
  112. package/dist/templates/slash-commands/roocode/deep.md +70 -10
  113. package/dist/templates/slash-commands/roocode/fast.md +62 -15
  114. package/dist/templates/slash-commands/roocode/implement.md +147 -2
  115. package/dist/templates/slash-commands/roocode/plan.md +103 -7
  116. package/dist/templates/slash-commands/roocode/prd.md +111 -13
  117. package/dist/templates/slash-commands/roocode/start.md +77 -1
  118. package/dist/templates/slash-commands/roocode/summarize.md +101 -21
  119. package/dist/templates/slash-commands/windsurf/archive.md +130 -3
  120. package/dist/templates/slash-commands/windsurf/deep.md +70 -10
  121. package/dist/templates/slash-commands/windsurf/fast.md +62 -15
  122. package/dist/templates/slash-commands/windsurf/implement.md +147 -2
  123. package/dist/templates/slash-commands/windsurf/plan.md +103 -7
  124. package/dist/templates/slash-commands/windsurf/prd.md +111 -13
  125. package/dist/templates/slash-commands/windsurf/start.md +77 -1
  126. package/dist/templates/slash-commands/windsurf/summarize.md +101 -21
  127. package/dist/types/agent.d.ts +1 -1
  128. package/package.json +2 -2
  129. package/dist/core/adapters/copilot-adapter.d.ts +0 -24
  130. package/dist/core/adapters/copilot-adapter.js +0 -88
  131. package/dist/templates/slash-commands/copilot/archive.agent.md +0 -164
  132. package/dist/templates/slash-commands/copilot/deep.agent.md +0 -147
  133. package/dist/templates/slash-commands/copilot/fast.agent.md +0 -136
  134. package/dist/templates/slash-commands/copilot/implement.agent.md +0 -122
  135. package/dist/templates/slash-commands/copilot/plan.agent.md +0 -69
  136. package/dist/templates/slash-commands/copilot/prd.agent.md +0 -80
  137. package/dist/templates/slash-commands/copilot/start.agent.md +0 -66
  138. package/dist/templates/slash-commands/copilot/summarize.agent.md +0 -99
@@ -1,5 +1,6 @@
1
1
  description = "Execute tasks from the implementation plan"
2
2
  prompt = """
3
+
3
4
  # Clavix Implement - AI-Assisted Task Execution
4
5
 
5
6
  You are helping the user implement tasks from their task plan with AI assistance.
@@ -80,7 +81,7 @@ Generated by Clavix /clavix:implement
80
81
 
81
82
  ## Important Rules
82
83
 
83
- **DO**:
84
+ **DO**:
84
85
  - Read tasks.md to find the current task
85
86
  - Implement ONE task at a time
86
87
  - Mark tasks complete by changing `[ ]` to `[x]`
@@ -88,13 +89,88 @@ Generated by Clavix /clavix:implement
88
89
  - Reference the PRD for detailed requirements
89
90
  - Ask for clarification when tasks are ambiguous
90
91
 
91
- **DON'T**:
92
+ **DON'T**:
92
93
  - Skip tasks or implement out of order
93
94
  - Mark tasks complete before actually implementing them
94
95
  - Modify multiple tasks' checkboxes at once (only current task)
95
96
  - Create commits if strategy is 'none'
96
97
  - Assume what code to write - use PRD as source of truth
97
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
+
98
174
  ## Example Workflow
99
175
 
100
176
  ```
@@ -110,6 +186,20 @@ Generated by Clavix /clavix:implement
110
186
  - Continue or wait for user
111
187
  ```
112
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
+
113
203
  ## Tips
114
204
 
115
205
  - The implementation is meant to be iterative and collaborative
@@ -117,4 +207,60 @@ Generated by Clavix /clavix:implement
117
207
  - Tasks are designed to be atomic and independently implementable
118
208
  - Use the PRD as the authoritative source for "what to build"
119
209
  - Use tasks.md as the guide for "in what order"
120
- """
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
+ """
@@ -1,14 +1,18 @@
1
1
  description = "Generate implementation task breakdown from PRD"
2
2
  prompt = """
3
+
3
4
  # Clavix Plan - Task Breakdown Generator
4
5
 
5
6
  You are helping the user generate a CLEAR-optimized implementation task breakdown from their PRD.
6
7
 
7
8
  ## Instructions
8
9
 
9
- 1. **Locate the PRD**:
10
- - Look for the most recent PRD in `.clavix/outputs/[project-name]/`
11
- - Find either `PRD.md` or `full-prd.md`
10
+ ### Part A: Procedural Steps (CLI Commands)
11
+
12
+ 1. **Locate the PRD outputs**:
13
+ - Look for the most recent artifacts in `.clavix/outputs/[project-name]/`
14
+ - Accepted sources: `full-prd.md`, `quick-prd.md`, `mini-prd.md`, or `optimized-prompt.md`
15
+ - **If not found**: Error inline - "No PRD found in `.clavix/outputs/`. Use `/clavix:prd` or `/clavix:summarize` first."
12
16
 
13
17
  2. **Run the plan command**:
14
18
  ```bash
@@ -20,15 +24,54 @@ You are helping the user generate a CLEAR-optimized implementation task breakdow
20
24
  clavix plan --project project-name
21
25
  ```
22
26
 
23
- 3. **Review the generated tasks**:
24
- - The command will generate `tasks.md` in the PRD folder
25
- - Tasks are organized into logical phases
26
- - Each task follows CLEAR framework principles
27
- - Tasks include checkboxes `- [ ]` for tracking completion
27
+ Or generate tasks directly from a saved session (auto-creates mini-prd.md):
28
+ ```bash
29
+ clavix plan --session SESSION_ID
30
+ ```
31
+
32
+ The CLI will prompt you to pick a project when multiple outputs are available.
33
+
34
+ ### Part B: Behavioral Guidance (Task Breakdown Strategy)
35
+
36
+ 3. **How to structure tasks** (CLEAR-optimized task breakdown):
37
+
38
+ **Task Granularity Principles:**
39
+ - **[C] Concise**: Each task = 1 clear action (not "Build authentication system", but "Create user registration endpoint")
40
+ - **[L] Logical**: Tasks flow in implementation order (database schema → backend logic → frontend UI)
41
+ - **[E] Explicit**: Tasks specify deliverable (not "Add tests", but "Write unit tests for user service with >80% coverage")
28
42
 
29
- 4. **Next steps**:
43
+ **Atomic Task Guidelines:**
44
+ - **Ideal size**: Completable in 15-60 minutes
45
+ - **Too large**: "Implement user authentication" → Break into registration, login, logout, password reset
46
+ - **Too small**: "Import React" → Combine with "Setup component structure"
47
+ - **Dependencies**: If Task B needs Task A, ensure A comes first
48
+
49
+ **Phase Organization:**
50
+ - Group related tasks into phases (Setup, Core Features, Testing, Polish)
51
+ - Each phase should be independently deployable when possible
52
+ - Critical path first (must-haves before nice-to-haves)
53
+
54
+ 4. **Review and customize generated tasks**:
55
+ - The command will generate `tasks.md` in the PRD folder
56
+ - Tasks are organized into logical phases with CLEAR principles
57
+ - Each task includes:
58
+ - Checkbox `- [ ]` for tracking
59
+ - Clear deliverable description
60
+ - Optional reference to PRD section `(ref: PRD Section)`
61
+ - **You can edit tasks.md** before implementing:
62
+ - Add/remove tasks
63
+ - Adjust granularity
64
+ - Reorder for better flow
65
+ - Add notes or sub-tasks
66
+
67
+ 5. **CLEAR Task Labeling** (optional, for education):
68
+ When reviewing tasks, you can annotate improvements:
69
+ - **[C]**: "Split vague 'Add UI' into 3 concrete tasks"
70
+ - **[L]**: "Reordered tasks: database schema before API endpoints"
71
+ - **[E]**: "Added specific acceptance criteria (>80% test coverage)"
72
+
73
+ 6. **Next steps**:
30
74
  - Review and edit `tasks.md` if needed
31
- - Add, remove, or modify tasks as appropriate
32
75
  - Then run `/clavix:implement` to start implementation
33
76
 
34
77
  ## Task Format
@@ -41,7 +84,6 @@ The generated `tasks.md` will look like:
41
84
  **Project**: [Project Name]
42
85
  **Generated**: [Timestamp]
43
86
 
44
- ---
45
87
 
46
88
  ## Phase 1: Feature Name
47
89
  - [ ] Task 1 description (ref: PRD Section)
@@ -52,16 +94,77 @@ The generated `tasks.md` will look like:
52
94
  - [ ] Task 4 description
53
95
  - [ ] Task 5 description
54
96
 
55
- ---
56
97
 
57
98
  *Generated by Clavix /clavix:plan*
58
99
  ```
59
100
 
101
+ ## Workflow Navigation
102
+
103
+ **You are here:** Plan (Task Breakdown)
104
+
105
+ **Common workflows:**
106
+ - **PRD workflow**: `/clavix:prd` → `/clavix:plan` → `/clavix:implement` → `/clavix:archive`
107
+ - **Conversation workflow**: `/clavix:summarize` → `/clavix:plan` → `/clavix:implement` → `/clavix:archive`
108
+ - **Standalone**: [Existing PRD] → `/clavix:plan` → Review tasks.md → `/clavix:implement`
109
+
110
+ **Related commands:**
111
+ - `/clavix:prd` - Generate PRD (typical previous step)
112
+ - `/clavix:summarize` - Extract mini-PRD from conversation (alternative previous step)
113
+ - `/clavix:implement` - Execute generated tasks (next step)
114
+
60
115
  ## Tips
61
116
 
62
117
  - Tasks are automatically optimized using CLEAR framework
63
118
  - Each task is concise and actionable
64
119
  - Tasks can reference specific PRD sections
120
+ - Supports mini-PRD outputs from `/clavix:summarize` and session workflows via `--session` or `--active-session`
65
121
  - You can manually edit tasks.md before implementing
66
122
  - Use `--overwrite` flag to regenerate if needed
67
- """
123
+
124
+ ## Troubleshooting
125
+
126
+ ### Issue: No PRD found in `.clavix/outputs/`
127
+ **Cause**: User hasn't generated a PRD yet
128
+ **Solution** (inline - already in template):
129
+ - Show error: "No PRD found in `.clavix/outputs/`"
130
+ - Suggest: "Use `/clavix:prd` or `/clavix:summarize` to generate one first"
131
+ - Do not proceed with plan generation
132
+
133
+ ### Issue: Generated tasks are too granular (100+ tasks)
134
+ **Cause**: Over-decomposition or large project scope
135
+ **Solution**:
136
+ - Group related micro-tasks into larger atomic tasks
137
+ - Each task should be 15-60 minutes, not 5 minutes
138
+ - Combine setup/configuration tasks
139
+ - Suggest breaking project into multiple PRDs if truly massive
140
+
141
+ ### Issue: Generated tasks are too high-level (only 3-4 tasks)
142
+ **Cause**: PRD was too vague or task breakdown too coarse
143
+ **Solution**:
144
+ - Review PRD - if vague, regenerate with more detail
145
+ - Break each high-level task into 3-5 concrete sub-tasks
146
+ - Each task should have a clear, testable deliverable
147
+
148
+ ### Issue: Tasks don't follow logical dependency order
149
+ **Cause**: Generator didn't detect dependencies correctly
150
+ **Solution**:
151
+ - Manually reorder in tasks.md (database before API, API before UI)
152
+ - Follow CLEAR [L] Logic principle: ensure sequential coherence
153
+ - Group by technical layers or feature completion
154
+
155
+ ### Issue: Tasks conflict with PRD or duplicate work
156
+ **Cause**: Misinterpretation of PRD or redundant task generation
157
+ **Solution**:
158
+ - Review PRD and tasks side-by-side
159
+ - Remove duplicate tasks
160
+ - Align tasks with PRD requirements
161
+ - Use `--overwrite` to regenerate after PRD clarification
162
+
163
+ ### Issue: `tasks.md` already exists, unsure if should regenerate
164
+ **Cause**: Previous plan exists for this PRD
165
+ **Solution**:
166
+ - Check if tasks.md has progress (any [x] checkboxes)
167
+ - If no progress: Safe to use `--overwrite`
168
+ - If progress exists: Review carefully before overwriting
169
+ - Consider manual edits instead of full regeneration
170
+ """
@@ -1,24 +1,69 @@
1
1
  description = "CLEAR-validated PRD generation through Socratic questioning"
2
2
  prompt = """
3
+
3
4
  # Clavix PRD Generation - CLEAR Framework Validated
4
5
 
5
6
  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.
6
7
 
7
8
  ## Instructions
8
9
 
9
- 1. Guide the user through these strategic questions, one at a time:
10
+ 1. Guide the user through these strategic questions, **one at a time** with validation:
11
+
12
+ **Question 1**: What are we building and why? (Problem + goal in 2-3 sentences)
13
+
14
+ - **Validation**: Must have both problem AND goal stated clearly
15
+ - **If vague/short** (e.g., "a dashboard"): Ask probing questions:
16
+ - "What specific problem does this dashboard solve?"
17
+ - "Who will use this and what decisions will they make with it?"
18
+ - "What happens if this doesn't exist?"
19
+ - **If "I don't know"**: Ask:
20
+ - "What triggered the need for this?"
21
+ - "Can you describe the current pain point or opportunity?"
22
+ - **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."
23
+
24
+ **Question 2**: What are the must-have core features? (List 3-5 critical features)
25
+
26
+ - **Validation**: At least 2 concrete features provided
27
+ - **If vague** (e.g., "user management"): Probe deeper:
28
+ - "What specific user management capabilities? (registration, roles, permissions, profile management?)"
29
+ - "Which feature would you build first if you could only build one?"
30
+ - **If too many** (7+ features): Help prioritize:
31
+ - "If you had to launch with only 3 features, which would they be?"
32
+ - "Which features are launch-blockers vs nice-to-have?"
33
+ - **If "I don't know"**: Ask:
34
+ - "Walk me through how someone would use this - what would they do first?"
35
+ - "What's the core value this provides?"
36
+
37
+ **Question 3**: Tech stack and requirements? (Technologies, integrations, constraints)
10
38
 
11
- **Question 1**: 🎯 What are we building and why? (Problem + goal in 2-3 sentences)
39
+ - **Optional**: Can skip if extending existing project
40
+ - **If vague** (e.g., "modern stack"): Probe:
41
+ - "What technologies are already in use that this must integrate with?"
42
+ - "Any specific frameworks or languages your team prefers?"
43
+ - "Are there performance requirements (load time, concurrent users)?"
44
+ - **If "I don't know"**: Suggest common stacks based on project type or skip
12
45
 
13
- **Question 2**: What are the must-have core features? (List 3-5 critical features)
46
+ **Question 4**: What is explicitly OUT of scope? (What are we NOT building?)
14
47
 
15
- **Question 3**: 🔧 Tech stack and requirements? (Technologies, integrations, constraints - press Enter to skip if extending existing project)
48
+ - **Validation**: At least 1 explicit exclusion
49
+ - **Why important**: Prevents scope creep and clarifies boundaries
50
+ - **If stuck**: Suggest common exclusions:
51
+ - "Are we building admin dashboards? Mobile apps? API integrations?"
52
+ - "Are we handling payments? User authentication? Email notifications?"
53
+ - **If "I don't know"**: Provide project-specific prompts based on previous answers
16
54
 
17
- **Question 4**: 🚫 What is explicitly OUT of scope? (What are we NOT building?)
55
+ **Question 5**: Any additional context or requirements?
18
56
 
19
- **Question 5**: 💡 Any additional context or requirements? (Optional - press Enter to skip)
57
+ - **Optional**: Press Enter to skip
58
+ - **Helpful areas**: Compliance needs, accessibility, localization, deadlines, team constraints
20
59
 
21
- 2. After collecting all answers, generate TWO documents:
60
+ 2. **Before proceeding to document generation**, verify minimum viable answers:
61
+ - Q1: Both problem AND goal stated
62
+ - Q2: At least 2 concrete features
63
+ - Q4: At least 1 explicit scope exclusion
64
+ - If missing critical info, ask targeted follow-ups
65
+
66
+ 3. After collecting and validating all answers, generate TWO documents:
22
67
 
23
68
  **Full PRD** (comprehensive):
24
69
  ```markdown
@@ -69,10 +114,64 @@ You are helping the user create a Product Requirements Document (PRD) using Clav
69
114
 
70
115
  **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.
71
116
 
117
+ ## Workflow Navigation
118
+
119
+ **You are here:** PRD Generation (Strategic Planning)
120
+
121
+ **Common workflows:**
122
+ - **Full PRD workflow**: `/clavix:prd` → `/clavix:plan` → `/clavix:implement` → `/clavix:archive`
123
+ - **From deep mode**: `/clavix:deep` → (strategic scope detected) → `/clavix:prd`
124
+ - **Quick to strategic**: `/clavix:fast` → (realizes complexity) → `/clavix:prd`
125
+
126
+ **Related commands:**
127
+ - `/clavix:plan` - Generate task breakdown from PRD (next step)
128
+ - `/clavix:implement` - Execute tasks (after plan)
129
+ - `/clavix:summarize` - Alternative: Extract PRD from conversation instead of Q&A
130
+
72
131
  ## Tips
73
132
 
74
133
  - Ask follow-up questions if answers are too vague
75
134
  - Help users think through edge cases
76
135
  - Keep the process conversational and supportive
77
136
  - Generated PRDs are automatically CLEAR-validated for optimal AI consumption
78
- """
137
+
138
+ ## Troubleshooting
139
+
140
+ ### Issue: User's answers to Q1 are too vague ("make an app")
141
+ **Cause**: User hasn't thought through the problem/goal deeply enough
142
+ **Solution** (inline):
143
+ - Stop and ask probing questions before proceeding
144
+ - "What specific problem does this app solve?"
145
+ - "Who will use this and what pain point does it address?"
146
+ - Don't proceed until both problem AND goal are clear
147
+
148
+ ### Issue: User lists 10+ features in Q2
149
+ **Cause**: Unclear priorities or scope creep
150
+ **Solution** (inline):
151
+ - Help prioritize: "If you could only launch with 3 features, which would they be?"
152
+ - Separate must-have from nice-to-have
153
+ - Document extras in "Additional Context" or "Out of scope"
154
+
155
+ ### Issue: User says "I don't know" to critical questions
156
+ **Cause**: Genuine uncertainty or needs exploration
157
+ **Solution**:
158
+ - For Q1: Ask about what triggered the need, current pain points
159
+ - For Q2: Walk through user journey step-by-step
160
+ - For Q4: Suggest common exclusions based on project type
161
+ - Consider suggesting `/clavix:start` for conversational exploration first
162
+
163
+ ### Issue: CLEAR validation shows low scores after generation
164
+ **Cause**: Answers were too vague or incomplete
165
+ **Solution**:
166
+ - Review the generated PRD
167
+ - Identify specific gaps (missing context, vague requirements)
168
+ - Ask targeted follow-up questions
169
+ - Regenerate PRD with enhanced answers
170
+
171
+ ### Issue: Generated PRD doesn't match user's vision
172
+ **Cause**: Miscommunication during Q&A or assumptions made
173
+ **Solution**:
174
+ - Review each section with user
175
+ - Ask "What's missing or inaccurate?"
176
+ - Update PRD manually or regenerate with corrected answers
177
+ """
@@ -1,5 +1,6 @@
1
1
  description = "Start conversational mode for iterative prompt development"
2
2
  prompt = """
3
+
3
4
  # Clavix Conversational Mode - CLEAR Framework Enhanced
4
5
 
5
6
  You are starting a Clavix conversational session for iterative prompt and requirements development. **When complete, use `/clavix:summarize` to extract and CLEAR-optimize requirements** (Concise, Logical, Explicit).
@@ -21,7 +22,9 @@ You are starting a Clavix conversational session for iterative prompt and requir
21
22
  - Help them think through user needs
22
23
  - Identify potential challenges
23
24
 
24
- 3. Keep track of key points discussed:
25
+ 3. **Track conversation topics and manage complexity**:
26
+
27
+ **Key points to track:**
25
28
  - Problem statement
26
29
  - Target users
27
30
  - Core features
@@ -29,6 +32,27 @@ You are starting a Clavix conversational session for iterative prompt and requir
29
32
  - Success criteria
30
33
  - Constraints and scope
31
34
 
35
+ **Multi-topic detection** (track distinct topics being discussed):
36
+ - Consider topics distinct if they address different problems/features/user needs
37
+ - Examples: "dashboard for sales" + "API for integrations" + "mobile app" = 3 topics
38
+
39
+ **When 3+ distinct topics detected**:
40
+ Auto-suggest focusing: "I notice we're discussing multiple distinct areas: [Topic A: summary], [Topic B: summary], and [Topic C: summary]. To ensure we develop clear requirements for each, would you like to:
41
+ - **Focus on one** - Pick the most important topic to explore thoroughly first
42
+ - **Continue multi-topic** - We'll track all of them, but the resulting prompt may need refinement
43
+ - **Create separate sessions** - Start fresh for each topic with dedicated focus"
44
+
45
+ **Complexity indicators** (suggest wrapping up/summarizing):
46
+ - Conversation > 15 exchanges
47
+ - Requirements for 5+ major features discussed
48
+ - Multiple technology stacks mentioned
49
+ - Significant scope changes or pivots occurred
50
+
51
+ When complexity threshold reached: "We've covered substantial ground. Would you like to:
52
+ - Continue exploring
53
+ - Use `/clavix:summarize` to extract what we have so far
54
+ - Switch to `/clavix:prd` for more structured planning"
55
+
32
56
  4. Be conversational and supportive:
33
57
  - Don't interrogate - have a natural discussion
34
58
  - Build on their ideas
@@ -58,7 +82,60 @@ After the conversational session, `/clavix:summarize` will:
58
82
 
59
83
  [Continue conversational refinement...]
60
84
 
85
+ ## Workflow Navigation
86
+
87
+ **You are here:** Conversational Mode (Iterative Exploration)
88
+
89
+ **Common workflows:**
90
+ - **Exploration to prompt**: `/clavix:start` → [conversation] → `/clavix:summarize` → CLEAR-optimized prompt
91
+ - **Exploration to PRD**: `/clavix:start` → [conversation] → `/clavix:prd` (answer questions with discussed info)
92
+ - **Exploration to planning**: `/clavix:start` → `/clavix:summarize` → `/clavix:plan` → Implement
93
+
94
+ **Related commands:**
95
+ - `/clavix:summarize` - Extract and CLEAR-optimize conversation (typical next step)
96
+ - `/clavix:prd` - Switch to structured PRD generation
97
+ - `/clavix:fast` or `/clavix:deep` - Direct prompt improvement instead of conversation
98
+
61
99
  ## Note
62
100
 
63
101
  The goal is natural exploration of requirements, not a rigid questionnaire. Follow the user's lead while gently guiding toward clarity.
64
- """
102
+
103
+ ## Troubleshooting
104
+
105
+ ### Issue: Conversation going in circles without progress
106
+ **Cause**: Unclear focus or too many topics being explored
107
+ **Solution** (inline):
108
+ - Pause and summarize: "So far we've discussed [A], [B], [C]. Which should we focus on?"
109
+ - Suggest focusing on one topic at a time
110
+ - Or suggest `/clavix:summarize` to extract what's been discussed
111
+
112
+ ### Issue: User provides very high-level descriptions ("build something cool")
113
+ **Cause**: User hasn't crystallized their ideas yet
114
+ **Solution**:
115
+ - Ask open-ended questions: "What made you think of this?"
116
+ - Probe for use cases: "Walk me through how someone would use this"
117
+ - Be patient - this mode is for exploration
118
+ - Multiple exchanges are normal and expected
119
+
120
+ ### Issue: Detecting 3+ distinct topics but user keeps adding more
121
+ **Cause**: Brainstorming mode or unclear priorities
122
+ **Solution** (inline):
123
+ - Interrupt after 3+ topics detected (per multi-topic protocol)
124
+ - Strongly suggest focusing on one topic
125
+ - Alternative: Document all topics and help prioritize
126
+ - Consider suggesting `/clavix:prd` for each topic separately
127
+
128
+ ### Issue: Conversation exceeds 20 exchanges without clarity
129
+ **Cause**: Too exploratory without convergence
130
+ **Solution**:
131
+ - Suggest wrapping up: "We've covered a lot. Ready to `/clavix:summarize`?"
132
+ - Or pivot to `/clavix:prd` for structured planning
133
+ - Or focus conversation: "Let's nail down the core problem first"
134
+
135
+ ### Issue: User wants to switch topics mid-conversation
136
+ **Cause**: New idea occurred or original topic wasn't right
137
+ **Solution**:
138
+ - Note what was discussed so far
139
+ - Ask: "Should we continue with [original topic] or switch to [new topic]?"
140
+ - Suggest summarizing current topic first before switching
141
+ """