clavix 4.2.0 → 4.3.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.
- 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/task-manager.d.ts +1 -2
- package/dist/core/task-manager.js +21 -26
- package/dist/templates/slash-commands/_canonical/deep.md +37 -70
- package/dist/templates/slash-commands/_components/sections/pattern-visibility.md +1 -1
- package/package.json +2 -2
- 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,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
|
|
@@ -1,402 +0,0 @@
|
|
|
1
|
-
# Troubleshooting: Mode Confusion
|
|
2
|
-
|
|
3
|
-
## Problem Description
|
|
4
|
-
|
|
5
|
-
Agent is unclear whether they should be in planning mode (gathering requirements, creating PRDs) or implementation mode (writing code, building features).
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Symptoms
|
|
10
|
-
|
|
11
|
-
- Agent asks "Should I implement this or just plan it?"
|
|
12
|
-
- Agent alternates between asking questions and generating code
|
|
13
|
-
- Agent generates partial implementation then stops uncertainly
|
|
14
|
-
- User and agent have misaligned expectations about what's happening
|
|
15
|
-
- Agent starts multiple times with different approaches
|
|
16
|
-
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
## Why This Happens
|
|
20
|
-
|
|
21
|
-
**Root causes:**
|
|
22
|
-
|
|
23
|
-
1. **Ambiguous user request** - User says "build X" which could mean "plan to build X" or "implement X now"
|
|
24
|
-
2. **Missing CLAVIX MODE context** - Agent didn't see mode boundary instructions
|
|
25
|
-
3. **Implicit mode transitions** - No clear signal when switching between planning and implementation
|
|
26
|
-
4. **Conversation drift** - Started in planning mode but gradually shifted toward implementation
|
|
27
|
-
5. **Tool ambiguity** - Clavix commands not clearly distinguished from normal conversation
|
|
28
|
-
|
|
29
|
-
---
|
|
30
|
-
|
|
31
|
-
## Immediate Fix
|
|
32
|
-
|
|
33
|
-
If mode is unclear:
|
|
34
|
-
|
|
35
|
-
### Step 1: Agent Should Ask Explicitly
|
|
36
|
-
|
|
37
|
-
When uncertain, agent should ALWAYS ask:
|
|
38
|
-
|
|
39
|
-
```markdown
|
|
40
|
-
Just to clarify - which mode should I be in?
|
|
41
|
-
|
|
42
|
-
**Option 1: Planning Mode (Clavix)**
|
|
43
|
-
- Gather requirements and create planning documents
|
|
44
|
-
- Generate PRDs and optimized prompts
|
|
45
|
-
- Ask clarifying questions
|
|
46
|
-
- **No implementation yet**
|
|
47
|
-
|
|
48
|
-
**Option 2: Implementation Mode**
|
|
49
|
-
- Write actual code
|
|
50
|
-
- Build the feature
|
|
51
|
-
- Create components/functions
|
|
52
|
-
- **Start implementing now**
|
|
53
|
-
|
|
54
|
-
Which would you like me to do?
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
---
|
|
58
|
-
|
|
59
|
-
### Step 2: User Should Clarify
|
|
60
|
-
|
|
61
|
-
User should explicitly state:
|
|
62
|
-
|
|
63
|
-
**For planning:**
|
|
64
|
-
```markdown
|
|
65
|
-
Just planning for now. Help me create a solid PRD first.
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
**For implementation:**
|
|
69
|
-
```markdown
|
|
70
|
-
Let's implement this now. Build the feature based on what we've discussed.
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
---
|
|
74
|
-
|
|
75
|
-
### Step 3: Agent Confirms Mode
|
|
76
|
-
|
|
77
|
-
Agent should acknowledge:
|
|
78
|
-
|
|
79
|
-
**Planning mode:**
|
|
80
|
-
```markdown
|
|
81
|
-
Got it - I'm in planning mode. I'll gather requirements and create documentation, but won't implement yet.
|
|
82
|
-
|
|
83
|
-
Let's start with some clarifying questions...
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
**Implementation mode:**
|
|
87
|
-
```markdown
|
|
88
|
-
Understood - I'll implement this now based on our requirements.
|
|
89
|
-
|
|
90
|
-
Let me start building...
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
---
|
|
94
|
-
|
|
95
|
-
## Prevention Strategies
|
|
96
|
-
|
|
97
|
-
### For Template Authors
|
|
98
|
-
|
|
99
|
-
**1. Clear Mode Declaration**
|
|
100
|
-
|
|
101
|
-
Every workflow should declare its mode upfront:
|
|
102
|
-
|
|
103
|
-
```markdown
|
|
104
|
-
## CLAVIX MODE: Requirements & Planning Only
|
|
105
|
-
|
|
106
|
-
You are in PLANNING mode. Do NOT implement.
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
Or for implementation:
|
|
110
|
-
|
|
111
|
-
```markdown
|
|
112
|
-
## IMPLEMENTATION MODE
|
|
113
|
-
|
|
114
|
-
You are now in implementation mode. Write code based on requirements.
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
---
|
|
118
|
-
|
|
119
|
-
**2. Mode Transition Markers**
|
|
120
|
-
|
|
121
|
-
When transitioning between modes, make it explicit:
|
|
122
|
-
|
|
123
|
-
```markdown
|
|
124
|
-
**TRANSITION:** Entering planning mode
|
|
125
|
-
**TRANSITION:** Exiting planning mode, starting implementation
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
---
|
|
129
|
-
|
|
130
|
-
**3. Decision Points Have Clarification Prompts**
|
|
131
|
-
|
|
132
|
-
When agent might be uncertain:
|
|
133
|
-
|
|
134
|
-
```markdown
|
|
135
|
-
**If uncertain whether to implement:**
|
|
136
|
-
Ask user: "Should I implement this now, or continue planning?"
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
---
|
|
140
|
-
|
|
141
|
-
### For Users
|
|
142
|
-
|
|
143
|
-
**1. Use Explicit Commands**
|
|
144
|
-
|
|
145
|
-
**For planning:**
|
|
146
|
-
- `/clavix:start` - Start conversational planning
|
|
147
|
-
- `/clavix:prd` - Generate PRD
|
|
148
|
-
- `/clavix:summarize` - Extract requirements
|
|
149
|
-
|
|
150
|
-
**For implementation:**
|
|
151
|
-
- "Now implement this"
|
|
152
|
-
- "Build the feature"
|
|
153
|
-
- "Start coding"
|
|
154
|
-
|
|
155
|
-
---
|
|
156
|
-
|
|
157
|
-
**2. Set Expectations Early**
|
|
158
|
-
|
|
159
|
-
At conversation start:
|
|
160
|
-
|
|
161
|
-
```markdown
|
|
162
|
-
Let's plan this out first before implementing. I want a solid PRD.
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
Or:
|
|
166
|
-
|
|
167
|
-
```markdown
|
|
168
|
-
I already have requirements. Let's jump straight to implementation.
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
---
|
|
172
|
-
|
|
173
|
-
**3. Clarify When Confused**
|
|
174
|
-
|
|
175
|
-
If agent seems confused:
|
|
176
|
-
|
|
177
|
-
```markdown
|
|
178
|
-
To be clear: we're just planning right now. Don't implement yet.
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
---
|
|
182
|
-
|
|
183
|
-
## Common Confusion Scenarios
|
|
184
|
-
|
|
185
|
-
### Scenario 1: Ambiguous "Build" Request
|
|
186
|
-
|
|
187
|
-
**User says:** "Help me build an authentication system"
|
|
188
|
-
|
|
189
|
-
**Agent thinks:**
|
|
190
|
-
- Option A: Help plan how to build it (planning mode)
|
|
191
|
-
- Option B: Implement it now (implementation mode)
|
|
192
|
-
|
|
193
|
-
**Solution:**
|
|
194
|
-
|
|
195
|
-
Agent asks:
|
|
196
|
-
```markdown
|
|
197
|
-
When you say "build an authentication system," do you want me to:
|
|
198
|
-
|
|
199
|
-
1. **Help plan it**: Gather requirements, create a PRD, document what needs to be built
|
|
200
|
-
2. **Implement it now**: Write the actual authentication code and components
|
|
201
|
-
|
|
202
|
-
Which would you prefer?
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
---
|
|
206
|
-
|
|
207
|
-
### Scenario 2: Mid-Conversation Shift
|
|
208
|
-
|
|
209
|
-
**Starts in planning:**
|
|
210
|
-
```markdown
|
|
211
|
-
User: /clavix:start
|
|
212
|
-
User: I want a dashboard
|
|
213
|
-
Agent: [Asks questions about dashboard]
|
|
214
|
-
User: [Answers 5 questions]
|
|
215
|
-
User: Looks good, let's do it!
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
**Agent thinks:** "Do it" = implement? Or "looks good" = continue planning?
|
|
219
|
-
|
|
220
|
-
**Solution:**
|
|
221
|
-
|
|
222
|
-
Agent asks:
|
|
223
|
-
```markdown
|
|
224
|
-
When you say "let's do it," do you mean:
|
|
225
|
-
|
|
226
|
-
1. Continue planning and create a PRD/summary?
|
|
227
|
-
2. Start implementing the dashboard now?
|
|
228
|
-
```
|
|
229
|
-
|
|
230
|
-
---
|
|
231
|
-
|
|
232
|
-
### Scenario 3: PRD Then Implementation
|
|
233
|
-
|
|
234
|
-
**Flow:**
|
|
235
|
-
```markdown
|
|
236
|
-
User: /clavix:prd
|
|
237
|
-
Agent: [Creates PRD]
|
|
238
|
-
User: Perfect! Now make it happen.
|
|
239
|
-
```
|
|
240
|
-
|
|
241
|
-
**Agent thinks:** "Make it happen" = implement? Or generate more docs?
|
|
242
|
-
|
|
243
|
-
**Solution:**
|
|
244
|
-
|
|
245
|
-
Agent interprets:
|
|
246
|
-
```markdown
|
|
247
|
-
**TRANSITION:** You've approved the PRD. I understand you want implementation now.
|
|
248
|
-
|
|
249
|
-
I'll build the features described in the PRD. Starting with [first feature]...
|
|
250
|
-
```
|
|
251
|
-
|
|
252
|
-
But if uncertain:
|
|
253
|
-
```markdown
|
|
254
|
-
By "make it happen," do you mean:
|
|
255
|
-
1. Implement the features in the PRD now?
|
|
256
|
-
2. Create additional planning documents?
|
|
257
|
-
```
|
|
258
|
-
|
|
259
|
-
---
|
|
260
|
-
|
|
261
|
-
## Decision Tree for Agents
|
|
262
|
-
|
|
263
|
-
```
|
|
264
|
-
User request received
|
|
265
|
-
│
|
|
266
|
-
├─ Is Clavix command? (/clavix:*) ────► Planning Mode
|
|
267
|
-
│
|
|
268
|
-
├─ User said "implement" / "build now" / "create code"? ────► Implementation Mode
|
|
269
|
-
│
|
|
270
|
-
├─ User said "plan" / "PRD" / "requirements"? ────► Planning Mode
|
|
271
|
-
│
|
|
272
|
-
├─ User said "help me build..."? ────► ASK FOR CLARIFICATION
|
|
273
|
-
│
|
|
274
|
-
├─ Currently in /clavix:* workflow? ────► Stay in Planning Mode
|
|
275
|
-
│
|
|
276
|
-
├─ User approved PRD and said "do it"? ────► Likely Implementation Mode (confirm if uncertain)
|
|
277
|
-
│
|
|
278
|
-
└─ Unclear? ────► ASK: "Should I plan or implement?"
|
|
279
|
-
```
|
|
280
|
-
|
|
281
|
-
---
|
|
282
|
-
|
|
283
|
-
## Mode Indicators
|
|
284
|
-
|
|
285
|
-
### Clear Planning Indicators
|
|
286
|
-
|
|
287
|
-
- `/clavix:start`
|
|
288
|
-
- `/clavix:prd`
|
|
289
|
-
- `/clavix:summarize`
|
|
290
|
-
- "Let's plan this"
|
|
291
|
-
- "Help me create a PRD"
|
|
292
|
-
- "I want to document requirements"
|
|
293
|
-
- "What should I build?"
|
|
294
|
-
|
|
295
|
-
---
|
|
296
|
-
|
|
297
|
-
### Clear Implementation Indicators
|
|
298
|
-
|
|
299
|
-
- "Now implement this"
|
|
300
|
-
- "Build the feature"
|
|
301
|
-
- "Write the code"
|
|
302
|
-
- "Create the component"
|
|
303
|
-
- "Let's start coding"
|
|
304
|
-
- "Make it work"
|
|
305
|
-
- User has approved PRD + says "go ahead"
|
|
306
|
-
|
|
307
|
-
---
|
|
308
|
-
|
|
309
|
-
### Ambiguous Phrases (ASK FOR CLARIFICATION)
|
|
310
|
-
|
|
311
|
-
- "Help me build X" ← Could be plan OR implement
|
|
312
|
-
- "Let's do X" ← Could be plan OR implement
|
|
313
|
-
- "Create an X" ← Could be PRD OR implementation
|
|
314
|
-
- "I need an X" ← Could be plan OR implement
|
|
315
|
-
- "Make it happen" ← Could be continue planning OR start implementing
|
|
316
|
-
|
|
317
|
-
**When hearing ambiguous phrase → Agent asks for clarification**
|
|
318
|
-
|
|
319
|
-
---
|
|
320
|
-
|
|
321
|
-
## Testing for Mode Confusion
|
|
322
|
-
|
|
323
|
-
### Test: Ambiguous Request Handling
|
|
324
|
-
|
|
325
|
-
**Input:**
|
|
326
|
-
```markdown
|
|
327
|
-
User: Help me build a todo app
|
|
328
|
-
```
|
|
329
|
-
|
|
330
|
-
**Expected behavior:**
|
|
331
|
-
- Agent asks: "Should I help plan it, or implement it now?"
|
|
332
|
-
- Agent does NOT assume one or the other
|
|
333
|
-
|
|
334
|
-
**Failure indicator:**
|
|
335
|
-
- Agent immediately starts planning without asking
|
|
336
|
-
- Agent immediately starts implementing without asking
|
|
337
|
-
|
|
338
|
-
---
|
|
339
|
-
|
|
340
|
-
### Test: Mid-Workflow Ambiguity
|
|
341
|
-
|
|
342
|
-
**Input:**
|
|
343
|
-
```markdown
|
|
344
|
-
User: /clavix:start
|
|
345
|
-
[Conversation about requirements]
|
|
346
|
-
User: Sounds great, let's go!
|
|
347
|
-
```
|
|
348
|
-
|
|
349
|
-
**Expected behavior:**
|
|
350
|
-
- Agent asks: "Should I summarize our requirements, or start implementing?"
|
|
351
|
-
- Agent does NOT assume "let's go" means implement
|
|
352
|
-
|
|
353
|
-
---
|
|
354
|
-
|
|
355
|
-
## Success Indicators
|
|
356
|
-
|
|
357
|
-
Mode clarity is working when:
|
|
358
|
-
- ✓ Agent knows whether to plan or implement
|
|
359
|
-
- ✓ Agent asks when uncertain instead of guessing
|
|
360
|
-
- ✓ User and agent expectations are aligned
|
|
361
|
-
- ✓ No confusion about what's being produced (PRD vs code)
|
|
362
|
-
- ✓ Clear transitions between modes when they occur
|
|
363
|
-
|
|
364
|
-
---
|
|
365
|
-
|
|
366
|
-
## Quick Reference
|
|
367
|
-
|
|
368
|
-
**Agent is confused?**
|
|
369
|
-
|
|
370
|
-
Agent should ask:
|
|
371
|
-
```markdown
|
|
372
|
-
Should I:
|
|
373
|
-
1. Plan and document (create PRDs, gather requirements)?
|
|
374
|
-
2. Implement (write code and build features)?
|
|
375
|
-
```
|
|
376
|
-
|
|
377
|
-
**User wants to clarify?**
|
|
378
|
-
|
|
379
|
-
User should say:
|
|
380
|
-
```markdown
|
|
381
|
-
Planning mode: "Just create a PRD / gather requirements for now"
|
|
382
|
-
Implementation mode: "Implement this now / start coding"
|
|
383
|
-
```
|
|
384
|
-
|
|
385
|
-
**Template authors preventing confusion?**
|
|
386
|
-
|
|
387
|
-
Add to templates:
|
|
388
|
-
```markdown
|
|
389
|
-
## CLAVIX MODE: Requirements & Planning Only
|
|
390
|
-
|
|
391
|
-
[Clear mode boundary]
|
|
392
|
-
|
|
393
|
-
**If uncertain whether to implement, ASK the user.**
|
|
394
|
-
```
|
|
395
|
-
|
|
396
|
-
---
|
|
397
|
-
|
|
398
|
-
## See Also
|
|
399
|
-
|
|
400
|
-
- `.clavix/instructions/core/clavix-mode.md` - Complete mode boundary explanation
|
|
401
|
-
- `.clavix/instructions/troubleshooting/jumped-to-implementation.md` - Agent implementing prematurely
|
|
402
|
-
- `.clavix/instructions/workflows/start.md` - Conversational mode workflow
|