clavix 4.2.0 → 4.3.2
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.
- package/LICENSE +201 -21
- package/README.md +1 -1
- package/dist/cli/commands/deep.js +4 -58
- package/dist/cli/commands/init.js +13 -16
- package/dist/cli/commands/plan.js +2 -2
- package/dist/core/conversation-quality-tracker.d.ts +81 -0
- package/dist/core/conversation-quality-tracker.js +195 -0
- package/dist/core/intelligence/intent-detector.js +3 -0
- package/dist/core/intelligence/pattern-library.d.ts +18 -1
- package/dist/core/intelligence/pattern-library.js +131 -0
- package/dist/core/intelligence/patterns/conversation-summarizer.d.ts +25 -0
- package/dist/core/intelligence/patterns/conversation-summarizer.js +197 -0
- package/dist/core/intelligence/patterns/dependency-identifier.d.ts +21 -0
- package/dist/core/intelligence/patterns/dependency-identifier.js +149 -0
- package/dist/core/intelligence/patterns/implicit-requirement-extractor.d.ts +20 -0
- package/dist/core/intelligence/patterns/implicit-requirement-extractor.js +129 -0
- package/dist/core/intelligence/patterns/requirement-prioritizer.d.ts +22 -0
- package/dist/core/intelligence/patterns/requirement-prioritizer.js +117 -0
- package/dist/core/intelligence/patterns/success-metrics-enforcer.d.ts +22 -0
- package/dist/core/intelligence/patterns/success-metrics-enforcer.js +142 -0
- package/dist/core/intelligence/patterns/topic-coherence-analyzer.d.ts +22 -0
- package/dist/core/intelligence/patterns/topic-coherence-analyzer.js +140 -0
- package/dist/core/intelligence/patterns/user-persona-enricher.d.ts +22 -0
- package/dist/core/intelligence/patterns/user-persona-enricher.js +124 -0
- package/dist/core/intelligence/quality-assessor.js +2 -0
- package/dist/core/intelligence/types.d.ts +7 -2
- package/dist/core/intelligence/universal-optimizer.d.ts +27 -2
- package/dist/core/intelligence/universal-optimizer.js +65 -5
- package/dist/core/task-manager.d.ts +1 -2
- package/dist/core/task-manager.js +21 -26
- package/dist/templates/slash-commands/_canonical/deep.md +37 -69
- package/dist/templates/slash-commands/_canonical/fast.md +1 -0
- package/dist/templates/slash-commands/_components/sections/pattern-visibility.md +26 -2
- package/package.json +3 -3
- package/dist/templates/instructions/README 2.md +0 -311
- package/dist/templates/instructions/core 2/clavix-mode.md +0 -275
- package/dist/templates/instructions/core 2/file-operations.md +0 -330
- package/dist/templates/instructions/core 2/verification.md +0 -377
- package/dist/templates/instructions/troubleshooting 2/jumped-to-implementation.md +0 -234
- package/dist/templates/instructions/troubleshooting 2/mode-confusion.md +0 -402
- package/dist/templates/instructions/troubleshooting 2/skipped-file-creation.md +0 -385
- package/dist/templates/slash-commands/_canonical 2/archive.md +0 -410
- package/dist/templates/slash-commands/_canonical 2/deep.md +0 -512
- package/dist/templates/slash-commands/_canonical 2/execute.md +0 -80
- package/dist/templates/slash-commands/_canonical 2/fast.md +0 -370
- package/dist/templates/slash-commands/_canonical 2/implement.md +0 -364
- package/dist/templates/slash-commands/_canonical 2/plan.md +0 -329
- package/dist/templates/slash-commands/_canonical 2/prd.md +0 -320
- package/dist/templates/slash-commands/_canonical 2/prompts.md +0 -97
- package/dist/templates/slash-commands/_canonical 2/start.md +0 -204
- package/dist/templates/slash-commands/_canonical 2/summarize.md +0 -395
|
@@ -1,377 +0,0 @@
|
|
|
1
|
-
# Verification & Checkpoint Patterns
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
|
|
5
|
-
Verification ensures that critical workflow steps actually completed successfully. This document provides patterns for adding checkpoints and validation to Clavix workflows.
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Checkpoint Markers
|
|
10
|
-
|
|
11
|
-
### What Are Checkpoints?
|
|
12
|
-
|
|
13
|
-
Checkpoints are standardized markers that agents output to confirm workflow step completion. They enable:
|
|
14
|
-
- Progress tracking
|
|
15
|
-
- Failure detection
|
|
16
|
-
- Workflow validation
|
|
17
|
-
- Debugging
|
|
18
|
-
|
|
19
|
-
### Checkpoint Format
|
|
20
|
-
|
|
21
|
-
```markdown
|
|
22
|
-
**CHECKPOINT:** [Brief description of what was completed]
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
### Examples
|
|
26
|
-
|
|
27
|
-
```markdown
|
|
28
|
-
**CHECKPOINT:** Entered conversational mode (gathering requirements only)
|
|
29
|
-
**CHECKPOINT:** Asked 5 clarifying questions about authentication system
|
|
30
|
-
**CHECKPOINT:** Extracted requirements from conversation
|
|
31
|
-
**CHECKPOINT:** Created 3 output files successfully
|
|
32
|
-
**CHECKPOINT:** Files verified - all exist at expected paths
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
---
|
|
36
|
-
|
|
37
|
-
## When to Add Checkpoints
|
|
38
|
-
|
|
39
|
-
### 1. Mode Transitions
|
|
40
|
-
|
|
41
|
-
**When entering a specific mode:**
|
|
42
|
-
```markdown
|
|
43
|
-
**CHECKPOINT:** Entered conversational mode for requirements gathering
|
|
44
|
-
**CHECKPOINT:** Started PRD generation workflow
|
|
45
|
-
**CHECKPOINT:** Beginning deep analysis of prompt
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
### 2. After File Operations
|
|
49
|
-
|
|
50
|
-
**After creating files:**
|
|
51
|
-
```markdown
|
|
52
|
-
**CHECKPOINT:** Files created successfully - verified existence
|
|
53
|
-
**CHECKPOINT:** Saved prompt to .clavix/outputs/prompts/fast/fast-20251124-1430.md
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
### 3. After Complex Operations
|
|
57
|
-
|
|
58
|
-
**After multi-step processes:**
|
|
59
|
-
```markdown
|
|
60
|
-
**CHECKPOINT:** Completed Clavix Intelligence™ optimization - 5 improvements applied
|
|
61
|
-
**CHECKPOINT:** Analyzed conversation - extracted 12 requirements, 3 constraints
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
### 4. At Decision Points
|
|
65
|
-
|
|
66
|
-
**When making workflow decisions:**
|
|
67
|
-
```markdown
|
|
68
|
-
**CHECKPOINT:** Conversation complexity threshold reached (15+ exchanges) - suggesting summarization
|
|
69
|
-
**CHECKPOINT:** Missing critical requirements - requesting more information before proceeding
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
---
|
|
73
|
-
|
|
74
|
-
## Verification Patterns
|
|
75
|
-
|
|
76
|
-
### Pattern 1: File Existence Verification
|
|
77
|
-
|
|
78
|
-
**After file creation, always verify:**
|
|
79
|
-
|
|
80
|
-
```markdown
|
|
81
|
-
**Step 5: Verify File Creation**
|
|
82
|
-
|
|
83
|
-
List the created files to confirm they exist:
|
|
84
|
-
```
|
|
85
|
-
Created files:
|
|
86
|
-
✓ .clavix/outputs/[project]/mini-prd.md
|
|
87
|
-
✓ .clavix/outputs/[project]/original-prompt.md
|
|
88
|
-
✓ .clavix/outputs/[project]/optimized-prompt.md
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
**CHECKPOINT:** All files created successfully.
|
|
92
|
-
|
|
93
|
-
If any file is missing:
|
|
94
|
-
- Review file creation steps
|
|
95
|
-
- See troubleshooting: `.clavix/instructions/troubleshooting/skipped-file-creation.md`
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
---
|
|
99
|
-
|
|
100
|
-
### Pattern 2: Content Validation
|
|
101
|
-
|
|
102
|
-
**Verify content meets requirements:**
|
|
103
|
-
|
|
104
|
-
```markdown
|
|
105
|
-
**Step 6: Validate Content**
|
|
106
|
-
|
|
107
|
-
Verify each file contains:
|
|
108
|
-
- ✓ mini-prd.md: Objective, Requirements, Constraints, Success Criteria sections
|
|
109
|
-
- ✓ original-prompt.md: At least 2 paragraphs of extracted requirements
|
|
110
|
-
- ✓ optimized-prompt.md: Improvements labeled with [ADDED], [CLARIFIED], etc.
|
|
111
|
-
|
|
112
|
-
**CHECKPOINT:** Content validation passed.
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
---
|
|
116
|
-
|
|
117
|
-
### Pattern 3: Mode Boundary Verification
|
|
118
|
-
|
|
119
|
-
**Verify agent stayed in correct mode:**
|
|
120
|
-
|
|
121
|
-
```markdown
|
|
122
|
-
**Step 7: Mode Compliance Check**
|
|
123
|
-
|
|
124
|
-
Confirm you stayed in CLAVIX MODE:
|
|
125
|
-
- ✓ Did NOT implement application code
|
|
126
|
-
- ✓ Did NOT generate feature implementations
|
|
127
|
-
- ✓ Only created planning documents and prompts
|
|
128
|
-
|
|
129
|
-
**CHECKPOINT:** Mode boundaries respected.
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
---
|
|
133
|
-
|
|
134
|
-
### Pattern 4: Requirement Completeness
|
|
135
|
-
|
|
136
|
-
**Verify minimum requirements gathered:**
|
|
137
|
-
|
|
138
|
-
```markdown
|
|
139
|
-
**Pre-Extraction Validation**
|
|
140
|
-
|
|
141
|
-
Before proceeding with summarization, verify conversation includes:
|
|
142
|
-
- ✓ Clear project objective (what are we building?)
|
|
143
|
-
- ✓ At least 3 core requirements
|
|
144
|
-
- ✓ Technical constraints or framework preferences (if applicable)
|
|
145
|
-
|
|
146
|
-
If ANY are missing:
|
|
147
|
-
- DO NOT proceed with summarization
|
|
148
|
-
- Ask clarifying questions to gather missing information
|
|
149
|
-
- Reference: `.clavix/instructions/troubleshooting/incomplete-requirements.md`
|
|
150
|
-
|
|
151
|
-
**CHECKPOINT:** Minimum requirements met - proceeding with extraction.
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
---
|
|
155
|
-
|
|
156
|
-
## Self-Correction Patterns
|
|
157
|
-
|
|
158
|
-
### Detecting Premature Implementation
|
|
159
|
-
|
|
160
|
-
```markdown
|
|
161
|
-
**Self-Check: Am I Implementing?**
|
|
162
|
-
|
|
163
|
-
If you catch yourself:
|
|
164
|
-
- Writing application code (functions, components, classes)
|
|
165
|
-
- Implementing features being discussed
|
|
166
|
-
- Generating code examples for the actual feature
|
|
167
|
-
|
|
168
|
-
**IMMEDIATE ACTION:**
|
|
169
|
-
1. STOP writing implementation code
|
|
170
|
-
2. Delete the implementation attempt
|
|
171
|
-
3. Output: "I apologize - I was jumping to implementation. Let me return to requirements gathering."
|
|
172
|
-
4. Return to asking clarifying questions
|
|
173
|
-
5. Reference: `.clavix/instructions/core/clavix-mode.md`
|
|
174
|
-
|
|
175
|
-
**CHECKPOINT:** Self-corrected - returned to requirements mode.
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
---
|
|
179
|
-
|
|
180
|
-
### Detecting Skipped Steps
|
|
181
|
-
|
|
182
|
-
```markdown
|
|
183
|
-
**Self-Check: Did I Skip File Creation?**
|
|
184
|
-
|
|
185
|
-
Before completing the summarization workflow, verify:
|
|
186
|
-
- ✓ Created .clavix/outputs/[project]/ directory
|
|
187
|
-
- ✓ Wrote mini-prd.md
|
|
188
|
-
- ✓ Wrote original-prompt.md
|
|
189
|
-
- ✓ Wrote optimized-prompt.md
|
|
190
|
-
- ✓ Verified all files exist
|
|
191
|
-
|
|
192
|
-
If any step was skipped:
|
|
193
|
-
1. Go back and complete missing steps
|
|
194
|
-
2. Reference: `.clavix/instructions/core/file-operations.md`
|
|
195
|
-
3. Verify files exist before marking workflow complete
|
|
196
|
-
|
|
197
|
-
**CHECKPOINT:** All file creation steps completed.
|
|
198
|
-
```
|
|
199
|
-
|
|
200
|
-
---
|
|
201
|
-
|
|
202
|
-
## Troubleshooting Detection
|
|
203
|
-
|
|
204
|
-
### Pattern: Identify Common Failures
|
|
205
|
-
|
|
206
|
-
```markdown
|
|
207
|
-
**Troubleshooting Check**
|
|
208
|
-
|
|
209
|
-
If workflow isn't proceeding as expected, check:
|
|
210
|
-
|
|
211
|
-
1. **Files not created?**
|
|
212
|
-
- See: `.clavix/instructions/troubleshooting/skipped-file-creation.md`
|
|
213
|
-
- Common cause: Used "suggest saving" instead of explicit Write tool steps
|
|
214
|
-
|
|
215
|
-
2. **Jumped to implementation?**
|
|
216
|
-
- See: `.clavix/instructions/troubleshooting/jumped-to-implementation.md`
|
|
217
|
-
- Common cause: Didn't see CLAVIX MODE boundary or mode enforcement
|
|
218
|
-
|
|
219
|
-
3. **Conversation not progressing?**
|
|
220
|
-
- See: `.clavix/instructions/troubleshooting/mode-confusion.md`
|
|
221
|
-
- Common cause: Unclear which mode (planning vs implementation) is active
|
|
222
|
-
|
|
223
|
-
**CHECKPOINT:** Troubleshooting guidance provided if needed.
|
|
224
|
-
```
|
|
225
|
-
|
|
226
|
-
---
|
|
227
|
-
|
|
228
|
-
## Verification in Specific Workflows
|
|
229
|
-
|
|
230
|
-
### Conversational Mode (/clavix:start)
|
|
231
|
-
|
|
232
|
-
```markdown
|
|
233
|
-
**Checkpoints to include:**
|
|
234
|
-
|
|
235
|
-
1. After entering mode:
|
|
236
|
-
**CHECKPOINT:** Entered conversational mode (gathering requirements only)
|
|
237
|
-
|
|
238
|
-
2. After asking questions:
|
|
239
|
-
**CHECKPOINT:** Asked [N] clarifying questions about [topic]
|
|
240
|
-
|
|
241
|
-
3. At complexity threshold:
|
|
242
|
-
**CHECKPOINT:** Complexity threshold reached - suggesting /clavix:summarize
|
|
243
|
-
|
|
244
|
-
4. Before any implementation attempt:
|
|
245
|
-
**SELF-CHECK:** Am I about to implement? If yes, STOP and return to questions.
|
|
246
|
-
|
|
247
|
-
5. When user says "summarize":
|
|
248
|
-
**CHECKPOINT:** Transitioning to summarization workflow
|
|
249
|
-
```
|
|
250
|
-
|
|
251
|
-
---
|
|
252
|
-
|
|
253
|
-
### Summarization (/clavix:summarize)
|
|
254
|
-
|
|
255
|
-
```markdown
|
|
256
|
-
**Checkpoints to include:**
|
|
257
|
-
|
|
258
|
-
1. Before extraction:
|
|
259
|
-
**CHECKPOINT:** Pre-extraction validation passed - minimum requirements present
|
|
260
|
-
|
|
261
|
-
2. After extraction:
|
|
262
|
-
**CHECKPOINT:** Extracted [N] requirements, [M] constraints from conversation
|
|
263
|
-
|
|
264
|
-
3. Before file creation:
|
|
265
|
-
**CHECKPOINT:** Beginning file creation (3 files required)
|
|
266
|
-
|
|
267
|
-
4. After each file:
|
|
268
|
-
**CHECKPOINT:** Created mini-prd.md successfully
|
|
269
|
-
**CHECKPOINT:** Created original-prompt.md successfully
|
|
270
|
-
**CHECKPOINT:** Created optimized-prompt.md successfully
|
|
271
|
-
|
|
272
|
-
5. After verification:
|
|
273
|
-
**CHECKPOINT:** All files verified - exist at expected paths
|
|
274
|
-
|
|
275
|
-
6. After optimization:
|
|
276
|
-
**CHECKPOINT:** Applied Clavix Intelligence™ - [N] improvements added
|
|
277
|
-
|
|
278
|
-
7. Workflow complete:
|
|
279
|
-
**CHECKPOINT:** Summarization workflow complete - all outputs created
|
|
280
|
-
```
|
|
281
|
-
|
|
282
|
-
---
|
|
283
|
-
|
|
284
|
-
### Quick Improvement (/clavix:fast)
|
|
285
|
-
|
|
286
|
-
```markdown
|
|
287
|
-
**Checkpoints to include:**
|
|
288
|
-
|
|
289
|
-
1. After analysis:
|
|
290
|
-
**CHECKPOINT:** Analyzed prompt - identified [N] improvement areas
|
|
291
|
-
|
|
292
|
-
2. After optimization:
|
|
293
|
-
**CHECKPOINT:** Generated optimized prompt with [N] enhancements
|
|
294
|
-
|
|
295
|
-
3. After file creation:
|
|
296
|
-
**CHECKPOINT:** Saved prompt to .clavix/outputs/prompts/fast/[id].md
|
|
297
|
-
|
|
298
|
-
4. After verification:
|
|
299
|
-
**CHECKPOINT:** File verified - prompt saved successfully
|
|
300
|
-
```
|
|
301
|
-
|
|
302
|
-
---
|
|
303
|
-
|
|
304
|
-
### Deep Analysis (/clavix:deep)
|
|
305
|
-
|
|
306
|
-
```markdown
|
|
307
|
-
**Checkpoints to include:**
|
|
308
|
-
|
|
309
|
-
1. After initial analysis:
|
|
310
|
-
**CHECKPOINT:** Completed deep analysis - generated [N] alternative phrasings
|
|
311
|
-
|
|
312
|
-
2. After edge case analysis:
|
|
313
|
-
**CHECKPOINT:** Identified [M] edge cases and potential issues
|
|
314
|
-
|
|
315
|
-
3. After file creation:
|
|
316
|
-
**CHECKPOINT:** Created comprehensive analysis document
|
|
317
|
-
|
|
318
|
-
4. After verification:
|
|
319
|
-
**CHECKPOINT:** All outputs verified - deep analysis complete
|
|
320
|
-
```
|
|
321
|
-
|
|
322
|
-
---
|
|
323
|
-
|
|
324
|
-
## Integration with Runtime Validation (Future)
|
|
325
|
-
|
|
326
|
-
### Checkpoint Format for Parsing
|
|
327
|
-
|
|
328
|
-
Use consistent format to enable future automated validation:
|
|
329
|
-
|
|
330
|
-
```markdown
|
|
331
|
-
**CHECKPOINT:** <status> - <description>
|
|
332
|
-
|
|
333
|
-
Where:
|
|
334
|
-
- <status>: SUCCESS, WARNING, ERROR, INFO
|
|
335
|
-
- <description>: What was completed or detected
|
|
336
|
-
|
|
337
|
-
Examples:
|
|
338
|
-
**CHECKPOINT:** SUCCESS - Files created and verified
|
|
339
|
-
**CHECKPOINT:** WARNING - Complexity threshold reached
|
|
340
|
-
**CHECKPOINT:** ERROR - Missing required information
|
|
341
|
-
**CHECKPOINT:** INFO - Entered conversational mode
|
|
342
|
-
```
|
|
343
|
-
|
|
344
|
-
### Future Enhancements
|
|
345
|
-
|
|
346
|
-
- Parse checkpoint markers from agent output
|
|
347
|
-
- Detect missing expected checkpoints
|
|
348
|
-
- Validate workflow completion
|
|
349
|
-
- Generate workflow reports
|
|
350
|
-
- Identify common failure patterns
|
|
351
|
-
|
|
352
|
-
---
|
|
353
|
-
|
|
354
|
-
## Summary
|
|
355
|
-
|
|
356
|
-
**Always include:**
|
|
357
|
-
1. **Checkpoints** after major workflow steps
|
|
358
|
-
2. **Verification steps** for file operations
|
|
359
|
-
3. **Self-correction checks** at decision points
|
|
360
|
-
4. **Troubleshooting detection** for common failures
|
|
361
|
-
|
|
362
|
-
**Format:**
|
|
363
|
-
```markdown
|
|
364
|
-
**CHECKPOINT:** [Clear description of what completed]
|
|
365
|
-
```
|
|
366
|
-
|
|
367
|
-
**Use verification to:**
|
|
368
|
-
- Confirm files created
|
|
369
|
-
- Validate content structure
|
|
370
|
-
- Ensure mode boundaries respected
|
|
371
|
-
- Detect and correct failures
|
|
372
|
-
|
|
373
|
-
**Reference troubleshooting guides when:**
|
|
374
|
-
- Files not created
|
|
375
|
-
- Implementation occurred prematurely
|
|
376
|
-
- Mode confusion detected
|
|
377
|
-
- Requirements incomplete
|
|
@@ -1,234 +0,0 @@
|
|
|
1
|
-
# Troubleshooting: Agent Jumped to Implementation
|
|
2
|
-
|
|
3
|
-
## Problem Description
|
|
4
|
-
|
|
5
|
-
Agent started implementing the feature instead of staying in requirements/planning mode during Clavix workflows.
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Symptoms
|
|
10
|
-
|
|
11
|
-
- Agent generated application code during `/clavix:start` conversational mode
|
|
12
|
-
- Agent created functions, components, or classes for the feature being discussed
|
|
13
|
-
- Agent built implementation examples instead of asking clarifying questions
|
|
14
|
-
- Agent jumped from requirements gathering to coding without explicit user request
|
|
15
|
-
|
|
16
|
-
---
|
|
17
|
-
|
|
18
|
-
## Why This Happens
|
|
19
|
-
|
|
20
|
-
**Root causes:**
|
|
21
|
-
|
|
22
|
-
1. **Missing CLAVIX MODE boundary** - Agent didn't see or internalize the "DO NOT IMPLEMENT" instruction
|
|
23
|
-
2. **Default helpfulness** - Agents are trained to be helpful, which often means "solve the problem" = implement
|
|
24
|
-
3. **Implicit mode boundaries** - "Stay in conversational mode" is too subtle without explicit gates
|
|
25
|
-
4. **Premature optimization** - Agent thinks "I have enough info to implement" after 1-2 questions
|
|
26
|
-
|
|
27
|
-
---
|
|
28
|
-
|
|
29
|
-
## Immediate Fix
|
|
30
|
-
|
|
31
|
-
If an agent has already jumped to implementation:
|
|
32
|
-
|
|
33
|
-
### Step 1: Stop Implementation
|
|
34
|
-
|
|
35
|
-
Agent should:
|
|
36
|
-
1. **STOP** writing implementation code immediately
|
|
37
|
-
2. **Delete** or discard the implementation attempt
|
|
38
|
-
3. **Acknowledge** the mistake
|
|
39
|
-
|
|
40
|
-
### Step 2: Apologize and Correct
|
|
41
|
-
|
|
42
|
-
Agent should output:
|
|
43
|
-
|
|
44
|
-
```markdown
|
|
45
|
-
I apologize - I was jumping to implementation prematurely.
|
|
46
|
-
|
|
47
|
-
I'm in Clavix mode, which is for requirements gathering and planning, NOT for implementing features yet.
|
|
48
|
-
|
|
49
|
-
Let me return to asking clarifying questions about your requirements instead.
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
### Step 3: Return to Correct Mode
|
|
53
|
-
|
|
54
|
-
Agent should:
|
|
55
|
-
1. **Return** to asking clarifying questions (if in `/clavix:start`)
|
|
56
|
-
2. **Return** to extracting requirements (if in `/clavix:summarize`)
|
|
57
|
-
3. **Return** to analyzing prompts (if in `/clavix:fast` or `/clavix:deep`)
|
|
58
|
-
4. **Return** to generating PRD (if in `/clavix:prd`)
|
|
59
|
-
|
|
60
|
-
**NOT** continue with implementation.
|
|
61
|
-
|
|
62
|
-
---
|
|
63
|
-
|
|
64
|
-
## Prevention Strategies
|
|
65
|
-
|
|
66
|
-
### For Template Authors
|
|
67
|
-
|
|
68
|
-
**1. Add CLAVIX MODE Block at Top**
|
|
69
|
-
|
|
70
|
-
Every workflow template should start with:
|
|
71
|
-
|
|
72
|
-
```markdown
|
|
73
|
-
## CLAVIX MODE: Requirements & Planning Only
|
|
74
|
-
|
|
75
|
-
**You are in Clavix prompt/PRD development mode. You help create planning documents, NOT implement features.**
|
|
76
|
-
|
|
77
|
-
**YOUR ROLE:**
|
|
78
|
-
- ✓ [What you should do]
|
|
79
|
-
|
|
80
|
-
**DO NOT IMPLEMENT. DO NOT IMPLEMENT. DO NOT IMPLEMENT.**
|
|
81
|
-
- ✗ DO NOT write application code
|
|
82
|
-
- ✗ DO NOT implement the feature being discussed
|
|
83
|
-
- ✗ DO NOT generate component/function implementations
|
|
84
|
-
|
|
85
|
-
**ONLY implement if user explicitly says: "Now implement this"**
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
**2. Repeat Mode Boundaries**
|
|
89
|
-
|
|
90
|
-
Don't rely on seeing it once. Repeat critical boundaries:
|
|
91
|
-
- At workflow start
|
|
92
|
-
- Before agent might implement (e.g., after questions in conversational mode)
|
|
93
|
-
- In troubleshooting sections
|
|
94
|
-
- At least 3 times in different locations
|
|
95
|
-
|
|
96
|
-
**3. Add Self-Correction Triggers**
|
|
97
|
-
|
|
98
|
-
Include explicit checks:
|
|
99
|
-
|
|
100
|
-
```markdown
|
|
101
|
-
**Self-Check: Am I Implementing?**
|
|
102
|
-
|
|
103
|
-
If you catch yourself writing application code, STOP IMMEDIATELY.
|
|
104
|
-
1. Delete the implementation
|
|
105
|
-
2. Apologize
|
|
106
|
-
3. Return to requirements mode
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
**4. Use Explicit Imperative Language**
|
|
110
|
-
|
|
111
|
-
✓ "DO NOT write code"
|
|
112
|
-
✓ "DO NOT implement features"
|
|
113
|
-
✓ "Your role is requirements gathering, NOT execution"
|
|
114
|
-
|
|
115
|
-
✗ "Stay in conversational mode" (too subtle)
|
|
116
|
-
✗ "You are gathering requirements" (descriptive, not imperative)
|
|
117
|
-
|
|
118
|
-
---
|
|
119
|
-
|
|
120
|
-
### For Users
|
|
121
|
-
|
|
122
|
-
**1. Set Clear Expectations Upfront**
|
|
123
|
-
|
|
124
|
-
When starting a Clavix workflow, remind the agent:
|
|
125
|
-
|
|
126
|
-
```markdown
|
|
127
|
-
/clavix:start
|
|
128
|
-
|
|
129
|
-
Remember: We're just gathering requirements and planning. Don't implement anything yet - I'll ask you to build it later once we have a solid plan.
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
**2. Catch Early and Redirect**
|
|
133
|
-
|
|
134
|
-
If agent starts implementing:
|
|
135
|
-
|
|
136
|
-
```markdown
|
|
137
|
-
Hold on - I don't want implementation yet. I just want to plan and document requirements first.
|
|
138
|
-
|
|
139
|
-
Let's stay in planning mode. Ask me more questions about what I need.
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
**3. Explicit Implementation Request**
|
|
143
|
-
|
|
144
|
-
When you DO want implementation:
|
|
145
|
-
|
|
146
|
-
```markdown
|
|
147
|
-
Great PRD! Now implement this feature based on the PRD we created.
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
Be explicit. "Now implement" or "Build this" makes it clear.
|
|
151
|
-
|
|
152
|
-
---
|
|
153
|
-
|
|
154
|
-
## Testing for This Issue
|
|
155
|
-
|
|
156
|
-
### Test Scenario 1: Conversational Mode
|
|
157
|
-
|
|
158
|
-
**Setup:**
|
|
159
|
-
```markdown
|
|
160
|
-
User: /clavix:start
|
|
161
|
-
User: I want to build a todo app with authentication
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
**Expected behavior:**
|
|
165
|
-
- Agent asks clarifying questions
|
|
166
|
-
- Agent does NOT generate code
|
|
167
|
-
- Agent stays in requirements gathering mode
|
|
168
|
-
|
|
169
|
-
**Failure indicator:**
|
|
170
|
-
- Agent generates TodoApp component or authentication code
|
|
171
|
-
|
|
172
|
-
---
|
|
173
|
-
|
|
174
|
-
### Test Scenario 2: After Few Questions
|
|
175
|
-
|
|
176
|
-
**Setup:**
|
|
177
|
-
```markdown
|
|
178
|
-
User: /clavix:start
|
|
179
|
-
User: I want real-time notifications in my app
|
|
180
|
-
Agent: [Asks 2-3 questions]
|
|
181
|
-
User: [Answers questions]
|
|
182
|
-
```
|
|
183
|
-
|
|
184
|
-
**Expected behavior:**
|
|
185
|
-
- Agent asks more questions to deepen understanding
|
|
186
|
-
- Agent does NOT implement WebSockets or notification system
|
|
187
|
-
|
|
188
|
-
**Failure indicator:**
|
|
189
|
-
- Agent generates implementation after thinking "I have enough info"
|
|
190
|
-
|
|
191
|
-
---
|
|
192
|
-
|
|
193
|
-
## Related Issues
|
|
194
|
-
|
|
195
|
-
- **Mode Confusion**: See `mode-confusion.md` if agent is unclear which mode is active
|
|
196
|
-
- **Premature Completion**: Agent finishing workflows too early
|
|
197
|
-
- **Missing Checkpoints**: Agent skipping validation steps
|
|
198
|
-
|
|
199
|
-
---
|
|
200
|
-
|
|
201
|
-
## Success Indicators
|
|
202
|
-
|
|
203
|
-
Agent is working correctly when:
|
|
204
|
-
- ✓ Agent asks 5+ clarifying questions before considering summarization
|
|
205
|
-
- ✓ Agent never generates application code during Clavix workflows (unless explicitly requested)
|
|
206
|
-
- ✓ Agent explicitly states "I'm in planning mode" or similar acknowledgment
|
|
207
|
-
- ✓ Agent suggests `/clavix:summarize` instead of jumping to implementation
|
|
208
|
-
- ✓ Agent asks "Should I implement or continue planning?" when uncertain
|
|
209
|
-
|
|
210
|
-
---
|
|
211
|
-
|
|
212
|
-
## Quick Reference
|
|
213
|
-
|
|
214
|
-
**If agent implements during Clavix workflow:**
|
|
215
|
-
|
|
216
|
-
1. **Stop** - Agent stops generating code
|
|
217
|
-
2. **Apologize** - "I apologize, I was jumping to implementation..."
|
|
218
|
-
3. **Return** - Go back to requirements/planning mode
|
|
219
|
-
4. **Reference** - Point to CLAVIX MODE boundary in instructions
|
|
220
|
-
|
|
221
|
-
**Prevention checklist:**
|
|
222
|
-
- ✓ CLAVIX MODE block at top of workflow
|
|
223
|
-
- ✓ "DO NOT IMPLEMENT" repeated 3+ times
|
|
224
|
-
- ✓ Self-correction triggers included
|
|
225
|
-
- ✓ Explicit user request required for implementation
|
|
226
|
-
- ✓ Mode boundaries use imperative language
|
|
227
|
-
|
|
228
|
-
---
|
|
229
|
-
|
|
230
|
-
## See Also
|
|
231
|
-
|
|
232
|
-
- `.clavix/instructions/core/clavix-mode.md` - Complete mode boundary explanation
|
|
233
|
-
- `.clavix/instructions/workflows/start.md` - Conversational mode workflow
|
|
234
|
-
- `.clavix/instructions/troubleshooting/mode-confusion.md` - When agent is unclear about mode
|