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,275 +0,0 @@
|
|
|
1
|
-
# Understanding Clavix Modes
|
|
2
|
-
|
|
3
|
-
## Two Types of Clavix Workflows
|
|
4
|
-
|
|
5
|
-
Clavix has **two distinct modes** based on the command type:
|
|
6
|
-
|
|
7
|
-
### CLAVIX PLANNING MODE (Requirements & Documentation)
|
|
8
|
-
|
|
9
|
-
**Commands:** `/clavix:start`, `/clavix:summarize`, `/clavix:fast`, `/clavix:deep`, `/clavix:prd`
|
|
10
|
-
|
|
11
|
-
**Your role:**
|
|
12
|
-
- Ask questions about requirements
|
|
13
|
-
- Create PRDs (Product Requirements Documents)
|
|
14
|
-
- Generate optimized prompts
|
|
15
|
-
- Extract and structure requirements
|
|
16
|
-
- Analyze and improve prompt quality
|
|
17
|
-
- Document features, constraints, success criteria
|
|
18
|
-
|
|
19
|
-
**DO NOT implement features during these workflows.**
|
|
20
|
-
|
|
21
|
-
### CLAVIX IMPLEMENTATION MODE (Code Execution)
|
|
22
|
-
|
|
23
|
-
**Commands:** `/clavix:implement`, `/clavix:execute`, `/clavix:task-complete`
|
|
24
|
-
|
|
25
|
-
**Your role:**
|
|
26
|
-
- Write code and implement features
|
|
27
|
-
- Execute tasks from tasks.md
|
|
28
|
-
- Complete implementation work
|
|
29
|
-
- Mark tasks as completed
|
|
30
|
-
|
|
31
|
-
**DO implement code during these workflows.**
|
|
32
|
-
|
|
33
|
-
---
|
|
34
|
-
|
|
35
|
-
## Core Principle
|
|
36
|
-
|
|
37
|
-
**Know which mode you're in based on the command:**
|
|
38
|
-
|
|
39
|
-
| Command | Mode | Implement? |
|
|
40
|
-
|---------|------|------------|
|
|
41
|
-
| `/clavix:start` | Planning | ✗ NO |
|
|
42
|
-
| `/clavix:summarize` | Planning | ✗ NO |
|
|
43
|
-
| `/clavix:fast` | Planning | ✗ NO |
|
|
44
|
-
| `/clavix:deep` | Planning | ✗ NO |
|
|
45
|
-
| `/clavix:prd` | Planning | ✗ NO |
|
|
46
|
-
| `/clavix:plan` | Planning (Pre-Implementation) | ✗ NO |
|
|
47
|
-
| `/clavix:implement` | Implementation | ✓ YES |
|
|
48
|
-
| `/clavix:execute` | Implementation | ✓ YES |
|
|
49
|
-
| `/clavix:task-complete` | Implementation | ✓ YES |
|
|
50
|
-
|
|
51
|
-
---
|
|
52
|
-
|
|
53
|
-
## What You Should Do
|
|
54
|
-
|
|
55
|
-
✓ **Ask questions** about what the user wants to build
|
|
56
|
-
✓ **Generate PRDs** that describe the requirements
|
|
57
|
-
✓ **Create optimized prompts** that can be used for implementation later
|
|
58
|
-
✓ **Extract and structure requirements** from conversations
|
|
59
|
-
✓ **Analyze and improve** prompt quality
|
|
60
|
-
✓ **Document** features, constraints, and success criteria
|
|
61
|
-
|
|
62
|
-
---
|
|
63
|
-
|
|
64
|
-
## What You Should NOT Do
|
|
65
|
-
|
|
66
|
-
**DO NOT IMPLEMENT. DO NOT IMPLEMENT. DO NOT IMPLEMENT.**
|
|
67
|
-
|
|
68
|
-
✗ **DO NOT write application code** for the feature being discussed
|
|
69
|
-
✗ **DO NOT implement** the feature or component
|
|
70
|
-
✗ **DO NOT generate** functions, classes, or modules for the actual application
|
|
71
|
-
✗ **DO NOT start building** the feature itself
|
|
72
|
-
✗ **DO NOT create example implementations** unless explicitly asked
|
|
73
|
-
|
|
74
|
-
---
|
|
75
|
-
|
|
76
|
-
## Standard Workflow: PRD → Plan → Implement → Archive
|
|
77
|
-
|
|
78
|
-
**The typical Clavix workflow:**
|
|
79
|
-
|
|
80
|
-
1. **Planning Phase** (`/clavix:prd`)
|
|
81
|
-
- Creates PRD (full + quick versions)
|
|
82
|
-
- Mode: PLANNING
|
|
83
|
-
- Output: `.clavix/outputs/{project}/full-prd.md` + `quick-prd.md`
|
|
84
|
-
|
|
85
|
-
2. **Task Preparation** (`/clavix:plan`)
|
|
86
|
-
- Transforms PRD into curated tasks.md
|
|
87
|
-
- Mode: PLANNING (Pre-Implementation)
|
|
88
|
-
- Output: `.clavix/outputs/{project}/tasks.md`
|
|
89
|
-
|
|
90
|
-
3. **Implementation Phase** (`/clavix:implement`)
|
|
91
|
-
- Agent executes tasks systematically
|
|
92
|
-
- Mode: IMPLEMENTATION
|
|
93
|
-
- Uses `task-complete` to mark progress
|
|
94
|
-
|
|
95
|
-
4. **Completion** (`/clavix:archive`)
|
|
96
|
-
- Archives completed project
|
|
97
|
-
- Mode: Management
|
|
98
|
-
|
|
99
|
-
**Key principle:** Planning workflows create documents. Implementation workflows write code.
|
|
100
|
-
|
|
101
|
-
---
|
|
102
|
-
|
|
103
|
-
## When to Switch Modes
|
|
104
|
-
|
|
105
|
-
**User says:** "Now implement this" or "Build this feature"
|
|
106
|
-
→ **Switch to IMPLEMENTATION MODE** if not already in implementation command
|
|
107
|
-
|
|
108
|
-
**User runs:** `/clavix:implement` or `/clavix:execute`
|
|
109
|
-
→ **You are in IMPLEMENTATION MODE** - write code
|
|
110
|
-
|
|
111
|
-
**User runs:** `/clavix:prd` or `/clavix:fast` or `/clavix:start`
|
|
112
|
-
→ **You are in PLANNING MODE** - gather requirements, don't implement
|
|
113
|
-
|
|
114
|
-
---
|
|
115
|
-
|
|
116
|
-
## When Unsure
|
|
117
|
-
|
|
118
|
-
If you're not sure whether the user wants planning or implementation, **ASK:**
|
|
119
|
-
|
|
120
|
-
> "Should I implement this feature now, or continue with requirements and planning?"
|
|
121
|
-
|
|
122
|
-
---
|
|
123
|
-
|
|
124
|
-
## Common Mistakes to Avoid
|
|
125
|
-
|
|
126
|
-
### ❌ Wrong: Jumping to Implementation
|
|
127
|
-
|
|
128
|
-
**User:** "I want to build a todo app with authentication"
|
|
129
|
-
|
|
130
|
-
**Wrong response:**
|
|
131
|
-
```typescript
|
|
132
|
-
// Creating TodoApp component
|
|
133
|
-
export function TodoApp() {
|
|
134
|
-
const [todos, setTodos] = useState([]);
|
|
135
|
-
// ... implementation
|
|
136
|
-
}
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
### ✓ Right: Gathering Requirements
|
|
140
|
-
|
|
141
|
-
**User:** "I want to build a todo app with authentication"
|
|
142
|
-
|
|
143
|
-
**Right response:**
|
|
144
|
-
> "Let me help you plan this todo app. A few clarifying questions:
|
|
145
|
-
>
|
|
146
|
-
> 1. What authentication method do you want? (OAuth, email/password, magic link?)
|
|
147
|
-
> 2. Should todos be per-user or shared across teams?
|
|
148
|
-
> 3. What todo features are essential? (priority levels, due dates, categories?)
|
|
149
|
-
> 4. Any specific technical constraints or framework preferences?
|
|
150
|
-
>
|
|
151
|
-
> Once we've gathered all requirements, I'll create a comprehensive PRD and optimized prompt for implementation."
|
|
152
|
-
|
|
153
|
-
---
|
|
154
|
-
|
|
155
|
-
## Mode Detection Examples
|
|
156
|
-
|
|
157
|
-
### Scenario 1: User Starts Conversational Mode
|
|
158
|
-
|
|
159
|
-
**Command:** `/clavix:start`
|
|
160
|
-
|
|
161
|
-
**Your mode:** CLAVIX PLANNING MODE
|
|
162
|
-
|
|
163
|
-
**Actions:**
|
|
164
|
-
- Enter conversational mode
|
|
165
|
-
- Ask clarifying questions
|
|
166
|
-
- Track requirements
|
|
167
|
-
- DO NOT implement anything
|
|
168
|
-
- Remind user to use `/clavix:summarize` when ready
|
|
169
|
-
|
|
170
|
-
---
|
|
171
|
-
|
|
172
|
-
### Scenario 2: User Asks for Summarization
|
|
173
|
-
|
|
174
|
-
**Command:** `/clavix:summarize`
|
|
175
|
-
|
|
176
|
-
**Your mode:** CLAVIX PLANNING MODE
|
|
177
|
-
|
|
178
|
-
**Actions:**
|
|
179
|
-
- Analyze conversation
|
|
180
|
-
- Extract requirements
|
|
181
|
-
- Create mini-PRD
|
|
182
|
-
- Create optimized prompts
|
|
183
|
-
- Save files
|
|
184
|
-
- DO NOT implement the feature
|
|
185
|
-
|
|
186
|
-
---
|
|
187
|
-
|
|
188
|
-
### Scenario 3: User Runs Implement Command
|
|
189
|
-
|
|
190
|
-
**Command:** `/clavix:implement`
|
|
191
|
-
|
|
192
|
-
**Your mode:** CLAVIX IMPLEMENTATION MODE
|
|
193
|
-
|
|
194
|
-
**Actions:**
|
|
195
|
-
- Read tasks.md from `.clavix/outputs/{project}/`
|
|
196
|
-
- Execute tasks systematically
|
|
197
|
-
- Write actual implementation code
|
|
198
|
-
- Use `/clavix:task-complete` to mark tasks done
|
|
199
|
-
- Continue until all tasks completed
|
|
200
|
-
|
|
201
|
-
---
|
|
202
|
-
|
|
203
|
-
### Scenario 4: User Runs Execute Command
|
|
204
|
-
|
|
205
|
-
**Command:** `/clavix:execute` or `/clavix:execute --latest`
|
|
206
|
-
|
|
207
|
-
**Your mode:** CLAVIX IMPLEMENTATION MODE
|
|
208
|
-
|
|
209
|
-
**Actions:**
|
|
210
|
-
- Load saved prompt from fast/deep workflow
|
|
211
|
-
- Implement the feature described in the prompt
|
|
212
|
-
- Write actual code
|
|
213
|
-
- Complete the implementation
|
|
214
|
-
|
|
215
|
-
---
|
|
216
|
-
|
|
217
|
-
### Scenario 5: Ambiguous Request During Planning
|
|
218
|
-
|
|
219
|
-
**User:** "What do you think about adding real-time updates?"
|
|
220
|
-
|
|
221
|
-
**Context:** Currently in conversational mode (`/clavix:start`)
|
|
222
|
-
|
|
223
|
-
**Your mode:** CLAVIX PLANNING MODE (clarify first)
|
|
224
|
-
|
|
225
|
-
**Response:**
|
|
226
|
-
> "Are you asking me to:
|
|
227
|
-
> 1. Discuss the requirements for real-time updates and add them to our planning? (I'll stay in planning mode)
|
|
228
|
-
> 2. Implement real-time updates now? (You'd need to run `/clavix:implement` for that)
|
|
229
|
-
>
|
|
230
|
-
> Since we're in planning mode, I'll assume option 1 unless you explicitly request implementation."
|
|
231
|
-
|
|
232
|
-
---
|
|
233
|
-
|
|
234
|
-
### Scenario 6: User Gives Direct Implementation Request
|
|
235
|
-
|
|
236
|
-
**User:** "Now implement this feature" or "Build the dashboard we discussed"
|
|
237
|
-
|
|
238
|
-
**Your mode:** Check context first
|
|
239
|
-
|
|
240
|
-
**If no `/clavix:implement` command was run:**
|
|
241
|
-
- Suggest: "To implement this, please run `/clavix:implement` or `/clavix:execute`. This ensures proper task tracking and file management."
|
|
242
|
-
|
|
243
|
-
**If `/clavix:implement` command was run:**
|
|
244
|
-
- You're already in CLAVIX IMPLEMENTATION MODE
|
|
245
|
-
- Proceed with implementation
|
|
246
|
-
|
|
247
|
-
---
|
|
248
|
-
|
|
249
|
-
## Self-Correction
|
|
250
|
-
|
|
251
|
-
If you catch yourself implementing during a Clavix workflow:
|
|
252
|
-
|
|
253
|
-
1. **STOP immediately**
|
|
254
|
-
2. **Delete** the implementation attempt
|
|
255
|
-
3. **Apologize**: "I apologize - I was jumping to implementation. Let me continue with requirements gathering instead."
|
|
256
|
-
4. **Return** to asking questions or documenting requirements
|
|
257
|
-
5. **Reference** this file for clarification
|
|
258
|
-
|
|
259
|
-
---
|
|
260
|
-
|
|
261
|
-
## Summary
|
|
262
|
-
|
|
263
|
-
**Two distinct Clavix modes:**
|
|
264
|
-
|
|
265
|
-
1. **CLAVIX PLANNING MODE** (`start`, `summarize`, `fast`, `deep`, `prd`, `plan`)
|
|
266
|
-
- Create PRDs, prompts, documentation
|
|
267
|
-
- DO NOT implement features
|
|
268
|
-
|
|
269
|
-
2. **CLAVIX IMPLEMENTATION MODE** (`implement`, `execute`, `task-complete`)
|
|
270
|
-
- Write code and build features
|
|
271
|
-
- DO implement what's been planned
|
|
272
|
-
|
|
273
|
-
**Standard workflow:** PRD → Plan → Implement → Archive
|
|
274
|
-
|
|
275
|
-
**When in doubt:** Check which command was run, or ask the user to clarify.
|
|
@@ -1,330 +0,0 @@
|
|
|
1
|
-
# File Operations: Step-by-Step Patterns
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
|
|
5
|
-
This guide provides proven patterns for file creation in Clavix workflows. These patterns ensure files are actually created (not just "suggested") and verified.
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## The Proven Pattern (Copy This)
|
|
10
|
-
|
|
11
|
-
### Complete File Creation Workflow
|
|
12
|
-
|
|
13
|
-
```markdown
|
|
14
|
-
**Step 1: Create Directory Structure**
|
|
15
|
-
|
|
16
|
-
Use mkdir to create the output directory:
|
|
17
|
-
```bash
|
|
18
|
-
mkdir -p .clavix/outputs/[project-name]
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
**Step 2: Write First File**
|
|
22
|
-
|
|
23
|
-
Use the Write tool to create `.clavix/outputs/[project-name]/file-name.md` with this content:
|
|
24
|
-
|
|
25
|
-
[Provide exact content template here]
|
|
26
|
-
|
|
27
|
-
**Step 3: Write Second File**
|
|
28
|
-
|
|
29
|
-
Use the Write tool to create `.clavix/outputs/[project-name]/another-file.md` with this content:
|
|
30
|
-
|
|
31
|
-
[Provide exact content template here]
|
|
32
|
-
|
|
33
|
-
**Step 4: Verify File Creation**
|
|
34
|
-
|
|
35
|
-
List the created files to confirm they exist:
|
|
36
|
-
```
|
|
37
|
-
Created files:
|
|
38
|
-
✓ .clavix/outputs/[project-name]/file-name.md
|
|
39
|
-
✓ .clavix/outputs/[project-name]/another-file.md
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
**CHECKPOINT:** Files created successfully.
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
---
|
|
46
|
-
|
|
47
|
-
## Why This Pattern Works
|
|
48
|
-
|
|
49
|
-
### ✅ Effective Elements
|
|
50
|
-
|
|
51
|
-
1. **Numbered steps** - Clear sequence prevents skipping steps
|
|
52
|
-
2. **Imperative language** - "Use the Write tool" not "You could save"
|
|
53
|
-
3. **Explicit tool names** - "Write tool" not vague "create" or "save"
|
|
54
|
-
4. **Content templates** - Show exactly what goes in each file
|
|
55
|
-
5. **Verification step** - Confirm files exist
|
|
56
|
-
6. **Checkpoint marker** - Enables validation
|
|
57
|
-
|
|
58
|
-
### ❌ What Doesn't Work
|
|
59
|
-
|
|
60
|
-
1. ~~"Suggest saving to..."~~ - Too passive, agents skip it
|
|
61
|
-
2. ~~"If filesystem access available"~~ - Makes it optional
|
|
62
|
-
3. ~~"Save outputs:"~~ - Doesn't specify HOW
|
|
63
|
-
4. ~~No verification~~ - Can't detect failure
|
|
64
|
-
5. ~~Visual markers only~~ - Agents don't process emoji as semantic content
|
|
65
|
-
|
|
66
|
-
---
|
|
67
|
-
|
|
68
|
-
## Pattern Variations
|
|
69
|
-
|
|
70
|
-
### Single File Creation
|
|
71
|
-
|
|
72
|
-
```markdown
|
|
73
|
-
**Create Output File (REQUIRED)**
|
|
74
|
-
|
|
75
|
-
**Step 1: Create directory**
|
|
76
|
-
```bash
|
|
77
|
-
mkdir -p .clavix/outputs/[project-name]
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
**Step 2: Write file**
|
|
81
|
-
Use the Write tool to create `.clavix/outputs/[project-name]/output.md`:
|
|
82
|
-
|
|
83
|
-
```markdown
|
|
84
|
-
# [Project Name]
|
|
85
|
-
|
|
86
|
-
[Content here]
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
**Step 3: Verify file exists**
|
|
90
|
-
Confirm file created: `.clavix/outputs/[project-name]/output.md` ✓
|
|
91
|
-
|
|
92
|
-
**CHECKPOINT:** File created successfully.
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
---
|
|
96
|
-
|
|
97
|
-
### Multiple Files with Templates
|
|
98
|
-
|
|
99
|
-
```markdown
|
|
100
|
-
**Create Output Files (REQUIRED)**
|
|
101
|
-
|
|
102
|
-
You MUST create three files. This is not optional.
|
|
103
|
-
|
|
104
|
-
**Step 1: Create directory structure**
|
|
105
|
-
```bash
|
|
106
|
-
mkdir -p .clavix/outputs/[project-name]
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
**Step 2: Write mini-prd.md**
|
|
110
|
-
Use the Write tool to create `.clavix/outputs/[project-name]/mini-prd.md`
|
|
111
|
-
|
|
112
|
-
Content template:
|
|
113
|
-
```markdown
|
|
114
|
-
# Requirements: [Project Name]
|
|
115
|
-
|
|
116
|
-
## Objective
|
|
117
|
-
[Clear goal]
|
|
118
|
-
|
|
119
|
-
## Core Requirements
|
|
120
|
-
- [HIGH] Requirement 1
|
|
121
|
-
- [MEDIUM] Requirement 2
|
|
122
|
-
|
|
123
|
-
## Technical Constraints
|
|
124
|
-
[Constraints]
|
|
125
|
-
|
|
126
|
-
## Success Criteria
|
|
127
|
-
[Criteria]
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
**Step 3: Write original-prompt.md**
|
|
131
|
-
Use the Write tool to create `.clavix/outputs/[project-name]/original-prompt.md`
|
|
132
|
-
|
|
133
|
-
Content: [Raw extraction in paragraph form]
|
|
134
|
-
|
|
135
|
-
**Step 4: Write optimized-prompt.md**
|
|
136
|
-
Use the Write tool to create `.clavix/outputs/[project-name]/optimized-prompt.md`
|
|
137
|
-
|
|
138
|
-
Content: [Enhanced version with labeled improvements]
|
|
139
|
-
|
|
140
|
-
**Step 5: Verify all files exist**
|
|
141
|
-
List created files:
|
|
142
|
-
```
|
|
143
|
-
✓ .clavix/outputs/[project-name]/mini-prd.md
|
|
144
|
-
✓ .clavix/outputs/[project-name]/original-prompt.md
|
|
145
|
-
✓ .clavix/outputs/[project-name]/optimized-prompt.md
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
**CHECKPOINT:** All files created successfully.
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
---
|
|
152
|
-
|
|
153
|
-
### Timestamped Sessions
|
|
154
|
-
|
|
155
|
-
```markdown
|
|
156
|
-
**Step 1: Generate session timestamp**
|
|
157
|
-
Create timestamp: `YYYY-MM-DD-HHMM` format (e.g., `2025-11-24-1430`)
|
|
158
|
-
|
|
159
|
-
**Step 2: Create session directory**
|
|
160
|
-
```bash
|
|
161
|
-
mkdir -p .clavix/sessions/[timestamp]
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
**Step 3: Write session file**
|
|
165
|
-
Use the Write tool to create `.clavix/sessions/[timestamp]/conversation.md`
|
|
166
|
-
|
|
167
|
-
[Content here]
|
|
168
|
-
|
|
169
|
-
**Step 4: Verify**
|
|
170
|
-
Confirm: `.clavix/sessions/[timestamp]/conversation.md` ✓
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
---
|
|
174
|
-
|
|
175
|
-
## Troubleshooting File Creation
|
|
176
|
-
|
|
177
|
-
### Problem: Files Not Created
|
|
178
|
-
|
|
179
|
-
**Symptoms:**
|
|
180
|
-
- Agent says "files created" but they don't exist
|
|
181
|
-
- Agent provides content in chat instead of creating files
|
|
182
|
-
- Agent skips file creation step entirely
|
|
183
|
-
|
|
184
|
-
**Solution:**
|
|
185
|
-
1. Check instructions use **imperative language**: "You MUST create" not "Suggest saving"
|
|
186
|
-
2. Verify **step-by-step pattern** is present
|
|
187
|
-
3. Ensure **Write tool** is explicitly named
|
|
188
|
-
4. Add **verification step** to detect failure
|
|
189
|
-
5. Make step ordering clear: Create directory → Write files → Verify
|
|
190
|
-
|
|
191
|
-
**See:** `.clavix/instructions/troubleshooting/skipped-file-creation.md`
|
|
192
|
-
|
|
193
|
-
---
|
|
194
|
-
|
|
195
|
-
### Problem: Wrong File Paths
|
|
196
|
-
|
|
197
|
-
**Symptoms:**
|
|
198
|
-
- Files created in wrong location
|
|
199
|
-
- Missing directory structure
|
|
200
|
-
- Path format inconsistent
|
|
201
|
-
|
|
202
|
-
**Solution:**
|
|
203
|
-
1. Always use `mkdir -p` to create parent directories
|
|
204
|
-
2. Show complete path: `.clavix/outputs/[project]/file.md`
|
|
205
|
-
3. Don't use relative paths without context
|
|
206
|
-
4. Verify path format matches project standards
|
|
207
|
-
|
|
208
|
-
---
|
|
209
|
-
|
|
210
|
-
### Problem: Missing Content
|
|
211
|
-
|
|
212
|
-
**Symptoms:**
|
|
213
|
-
- Files created but empty
|
|
214
|
-
- Incomplete content
|
|
215
|
-
- Wrong content structure
|
|
216
|
-
|
|
217
|
-
**Solution:**
|
|
218
|
-
1. Provide **complete content template** in instructions
|
|
219
|
-
2. Use markdown code blocks to show exact format
|
|
220
|
-
3. Include all required sections
|
|
221
|
-
4. Don't assume agent knows content structure
|
|
222
|
-
|
|
223
|
-
---
|
|
224
|
-
|
|
225
|
-
## Integration Platform Adaptations
|
|
226
|
-
|
|
227
|
-
### For Agents with Full File Access (Octofriend, agents.md, Warp)
|
|
228
|
-
|
|
229
|
-
Use standard pattern above. No adaptations needed.
|
|
230
|
-
|
|
231
|
-
---
|
|
232
|
-
|
|
233
|
-
### For Agents with Limited File Access (GitHub Copilot)
|
|
234
|
-
|
|
235
|
-
Add fallback pattern:
|
|
236
|
-
|
|
237
|
-
```markdown
|
|
238
|
-
**Step 2: Write file (with fallback)**
|
|
239
|
-
|
|
240
|
-
**Primary approach:** Use the Write tool to create `.clavix/outputs/[project]/file.md`
|
|
241
|
-
|
|
242
|
-
**Fallback if Write tool unavailable:**
|
|
243
|
-
If file creation fails, display content and instruct user:
|
|
244
|
-
|
|
245
|
-
```
|
|
246
|
-
⚠️ File creation unavailable. Please save this content manually:
|
|
247
|
-
|
|
248
|
-
**File path:** `.clavix/outputs/[project]/file.md`
|
|
249
|
-
|
|
250
|
-
**Content:**
|
|
251
|
-
```markdown
|
|
252
|
-
[Content here]
|
|
253
|
-
```
|
|
254
|
-
```
|
|
255
|
-
|
|
256
|
-
Copy the content above and save to the specified path.
|
|
257
|
-
```
|
|
258
|
-
```
|
|
259
|
-
|
|
260
|
-
---
|
|
261
|
-
|
|
262
|
-
## Examples from Proven Workflows
|
|
263
|
-
|
|
264
|
-
### From fast.md (WORKS ✓)
|
|
265
|
-
|
|
266
|
-
```markdown
|
|
267
|
-
### Saving the Prompt (REQUIRED)
|
|
268
|
-
|
|
269
|
-
After displaying the optimized prompt, you MUST save it to the Clavix system for future reference.
|
|
270
|
-
|
|
271
|
-
#### Step 1: Create Directory Structure
|
|
272
|
-
```bash
|
|
273
|
-
mkdir -p .clavix/outputs/prompts/fast
|
|
274
|
-
```
|
|
275
|
-
|
|
276
|
-
#### Step 2: Generate Unique Prompt ID
|
|
277
|
-
Create a unique identifier: `fast-YYYYMMDD-HHMM`
|
|
278
|
-
|
|
279
|
-
#### Step 3: Save Prompt File
|
|
280
|
-
Use the Write tool to create the prompt file at:
|
|
281
|
-
`.clavix/outputs/prompts/fast/[prompt-id].md`
|
|
282
|
-
|
|
283
|
-
[Content template]
|
|
284
|
-
|
|
285
|
-
#### Step 5: Verify Saving Succeeded
|
|
286
|
-
Confirm the file path and display to user:
|
|
287
|
-
```
|
|
288
|
-
✓ Prompt saved: .clavix/outputs/prompts/fast/[prompt-id].md
|
|
289
|
-
```
|
|
290
|
-
```
|
|
291
|
-
|
|
292
|
-
**Why it works:**
|
|
293
|
-
- Header says "REQUIRED"
|
|
294
|
-
- "you MUST save" (imperative)
|
|
295
|
-
- Numbered steps
|
|
296
|
-
- Explicit Write tool instruction
|
|
297
|
-
- Verification step
|
|
298
|
-
|
|
299
|
-
---
|
|
300
|
-
|
|
301
|
-
### From summarize.md OLD (BROKEN ✗)
|
|
302
|
-
|
|
303
|
-
```markdown
|
|
304
|
-
5. Suggest saving to `.clavix/outputs/[session-name]/`
|
|
305
|
-
```
|
|
306
|
-
|
|
307
|
-
**Why it failed:**
|
|
308
|
-
- "Suggest" is passive
|
|
309
|
-
- No Write tool instruction
|
|
310
|
-
- No step-by-step breakdown
|
|
311
|
-
- No verification
|
|
312
|
-
- Buried at step 5 (should be step 3-4)
|
|
313
|
-
|
|
314
|
-
---
|
|
315
|
-
|
|
316
|
-
## Summary
|
|
317
|
-
|
|
318
|
-
**Always use this pattern for file creation:**
|
|
319
|
-
1. Step 1: mkdir
|
|
320
|
-
2. Step 2-N: Write tool for each file
|
|
321
|
-
3. Step N+1: Verify files exist
|
|
322
|
-
4. Add CHECKPOINT marker
|
|
323
|
-
|
|
324
|
-
**Never use:**
|
|
325
|
-
- "Suggest saving"
|
|
326
|
-
- "If available"
|
|
327
|
-
- Vague "create" or "save" without tool name
|
|
328
|
-
- No verification step
|
|
329
|
-
|
|
330
|
-
Copy the proven patterns from this document into your workflow instructions.
|